diff --git a/.eslintignore b/.eslintignore index ea62efdf1f..ff10944af7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,2 @@ **/node_modules/** -**/out/** -server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperersigv4client.d.ts -server/aws-lsp-codewhisperer/src/client/token/codewhispererbearertokenclient.d.ts \ No newline at end of file +**/out/** \ No newline at end of file diff --git a/.github/workflows/create-agent-standalone.yml b/.github/workflows/create-agent-standalone.yml index 2807a50aea..12a8fdfb12 100644 --- a/.github/workflows/create-agent-standalone.yml +++ b/.github/workflows/create-agent-standalone.yml @@ -3,6 +3,7 @@ name: Create agent-standalone bundles on: push: branches: [main, feature/*, release/agentic/*] + workflow_dispatch: jobs: build: @@ -18,7 +19,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '24' cache: 'npm' - name: Install dependencies diff --git a/.github/workflows/create-agentic-github-prerelease.yml b/.github/workflows/create-agentic-github-prerelease.yml index e5f98178dc..48873b7503 100644 --- a/.github/workflows/create-agentic-github-prerelease.yml +++ b/.github/workflows/create-agentic-github-prerelease.yml @@ -101,7 +101,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '24' cache: 'npm' # To run a ts script to create the manifest diff --git a/.github/workflows/create-release-candidate-branch.yml b/.github/workflows/create-release-candidate-branch.yml index 2071f69ed4..7c6b449a94 100644 --- a/.github/workflows/create-release-candidate-branch.yml +++ b/.github/workflows/create-release-candidate-branch.yml @@ -28,20 +28,21 @@ jobs: setupRcBranch: name: Set up a Release Candidate Branch runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Sync code uses: actions/checkout@v4 with: ref: ${{ inputs.commitId }} - # Use RELEASE_CANDIDATE_BRANCH_CREATION_PAT to ensure workflow triggering works - token: ${{ secrets.RELEASE_CANDIDATE_BRANCH_CREATION_PAT }} + token: ${{ secrets.GITHUB_TOKEN }} persist-credentials: true - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '24' cache: 'npm' # Needed to format the json file being checked in @@ -109,15 +110,8 @@ jobs: env: BRANCH_NAME: ${{ steps.release-branch.outputs.BRANCH_NAME }} RELEASE_VERSION: ${{ steps.release-version.outputs.RELEASE_VERSION }} - # We use the toolkit-automation account, basically something that - # isn't the default GitHub Token, because you cannot chain actions with that. - # In our case, after pushing a commit (below), we want create-agent-standalone.yml - # to start automatically. - REPO_PAT: ${{ secrets.RELEASE_CANDIDATE_BRANCH_CREATION_PAT }} run: | git config --global user.email "<>" git config --global user.name "aws-toolkit-automation" - # Configure git to use the PAT token for authentication - git remote set-url origin "https://x-access-token:${REPO_PAT}@github.com/${{ github.repository }}.git" - git commit -m "chore: bump agentic version: $RELEASE_VERSION" + git commit --no-verify -m "chore: bump agentic version: $RELEASE_VERSION" git push --set-upstream origin "$BRANCH_NAME" diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 3226ca9fde..48da971401 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -37,7 +37,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 24 - name: Download build artifacts uses: actions/download-artifact@v4 with: diff --git a/.github/workflows/lsp-ci.yaml b/.github/workflows/lsp-ci.yaml index bda44ec74a..814c198f05 100644 --- a/.github/workflows/lsp-ci.yaml +++ b/.github/workflows/lsp-ci.yaml @@ -1,9 +1,9 @@ name: Language Server CI on: push: - branches: [main, dev, feature/*] + branches: [main, dev, feature/*, release/agentic/*] pull_request: - branches: [main, dev, feature/*] + branches: [main, dev, feature/*, release/agentic/*] jobs: test: @@ -15,7 +15,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 24 - name: Build run: | npm ci @@ -38,7 +38,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 24 - name: Build run: | npm ci @@ -63,7 +63,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 24 - name: Build run: | npm ci @@ -79,7 +79,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 24 - name: Build run: | npm ci diff --git a/.github/workflows/npm-packaging.yaml b/.github/workflows/npm-packaging.yaml index 724c9a0c05..4b509d9294 100644 --- a/.github/workflows/npm-packaging.yaml +++ b/.github/workflows/npm-packaging.yaml @@ -1,9 +1,9 @@ name: NPM Packaging on: push: - branches: [main, dev, feature/*] + branches: [main, dev, feature/*, release/agentic/*] pull_request: - branches: [main, dev, feature/*] + branches: [main, dev, feature/*, release/agentic/*] jobs: build: @@ -15,7 +15,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 24 - name: Install dependencies run: npm ci - name: Build all monorepo packages diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index a8574c045c..e35abe9de0 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -50,7 +50,7 @@ jobs: - name: Setup Nodejs uses: actions/setup-node@v4 with: - node-version: '20.x' + node-version: '24.x' registry-url: 'https://registry.npmjs.org' scope: '@aws' if: ${{ fromJson(steps.release.outputs.releases_created) }} diff --git a/.gitignore b/.gitignore index fbdc246265..8f3af70b45 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ build **/*.tgz !core/codewhisperer-streaming/amzn-codewhisperer-streaming-*.tgz !core/q-developer-streaming-client/amzn-amazon-q-developer-streaming-client-*.tgz +!core/codewhisperer-runtime/amzn-codewhisperer-runtime-*.tgz +!core/codewhisperer/amzn-codewhisperer-*.tgz !server/aws-lsp-codewhisperer/types/types-local-indexing-*.tgz .testresults/** diff --git a/.prettierignore b/.prettierignore index d115549b16..89ecd86fb3 100644 --- a/.prettierignore +++ b/.prettierignore @@ -4,7 +4,5 @@ node_modules/ out/ **/bin/ **/obj/ -server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperersigv4client.d.ts -server/aws-lsp-codewhisperer/src/client/token/codewhispererbearertokenclient.d.ts **/*.md **/antlr-generated/ \ No newline at end of file diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e6abdf7be2..cc727d85a6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,9 +1,9 @@ { - "chat-client": "0.1.32", - "core/aws-lsp-core": "0.0.13", - "server/aws-lsp-antlr4": "0.1.17", - "server/aws-lsp-codewhisperer": "0.0.73", - "server/aws-lsp-json": "0.1.17", - "server/aws-lsp-partiql": "0.0.16", - "server/aws-lsp-yaml": "0.1.17" + "chat-client": "0.1.40", + "core/aws-lsp-core": "0.0.16", + "server/aws-lsp-antlr4": "0.1.20", + "server/aws-lsp-codewhisperer": "0.0.88", + "server/aws-lsp-json": "0.1.21", + "server/aws-lsp-partiql": "0.0.18", + "server/aws-lsp-yaml": "0.1.21" } diff --git a/app/aws-lsp-antlr4-runtimes/package.json b/app/aws-lsp-antlr4-runtimes/package.json index bf7cf47bf1..747645c40d 100644 --- a/app/aws-lsp-antlr4-runtimes/package.json +++ b/app/aws-lsp-antlr4-runtimes/package.json @@ -12,10 +12,10 @@ "webpack": "webpack" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-antlr4": "*", - "antlr4-c3": "^3.4.1", - "antlr4ng": "^3.0.4" + "antlr4-c3": "^3.4.2", + "antlr4ng": "^3.0.14" }, "devDependencies": { "@types/chai": "^4.3.5", @@ -26,7 +26,7 @@ "chai-as-promised": "^7.1.1", "mocha": "^11.0.1", "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" } diff --git a/app/aws-lsp-buildspec-runtimes/package.json b/app/aws-lsp-buildspec-runtimes/package.json index b9c36946b2..8daa91b5e1 100644 --- a/app/aws-lsp-buildspec-runtimes/package.json +++ b/app/aws-lsp-buildspec-runtimes/package.json @@ -7,7 +7,7 @@ "compile": "tsc --build" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-buildspec": "^0.0.1" } } diff --git a/app/aws-lsp-cloudformation-runtimes/package.json b/app/aws-lsp-cloudformation-runtimes/package.json index a88386db4e..e4e277ecde 100644 --- a/app/aws-lsp-cloudformation-runtimes/package.json +++ b/app/aws-lsp-cloudformation-runtimes/package.json @@ -7,7 +7,7 @@ "compile": "tsc --build" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-cloudformation": "^0.0.1" } } diff --git a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-darwin-arm64.zip b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-darwin-arm64.zip index 24fbdb712c..fdd736d602 100644 --- a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-darwin-arm64.zip +++ b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-darwin-arm64.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5f651f5364b2417df24d40cbd2d34d69f8b338f3f00aca9c5afd5b4f9ea3d22d -size 96647490 +oid sha256:f4fbd67484ea48363077bbfaa576154196558a4048a862abac84d496fec6b636 +size 96644452 diff --git a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-darwin-x64.zip b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-darwin-x64.zip index 14d5e51377..4ef652e06a 100644 --- a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-darwin-x64.zip +++ b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-darwin-x64.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:03ef43ac80e2a16e8c842e92a3f3285d5424f2ea99bba167b9cbb9dabb751262 -size 98328127 +oid sha256:2bcfa7697a0ecdc4ff43f84d1a8c8b7840c144080e51b921dd7c5d3478613a82 +size 98325089 diff --git a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-linux-arm64.zip b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-linux-arm64.zip index af6aae68c3..dacf7cc25a 100644 --- a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-linux-arm64.zip +++ b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-linux-arm64.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33bf50f87b67a330b3dc28f9a2fb1678f5c9cd6eb33beb964b6b068790b05b6c -size 102589811 +oid sha256:1f644daa198d026a091ac87a33fa54b7c1faf1e929ce8ef3ab7e25b7510335e7 +size 102586773 diff --git a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-linux-x64.zip b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-linux-x64.zip index 4923a60a7f..882e8901d3 100644 --- a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-linux-x64.zip +++ b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-linux-x64.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec71aea47b7cb08c13e94fe4ca284b3656d23266bcdd728a3525abd7939730f0 -size 114552140 +oid sha256:1f6add24d8ae6d1248e3ff8281a8c9e8b402370fd00fcc8bf65c553457715f27 +size 114549102 diff --git a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-win32-x64.zip b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-win32-x64.zip index fe962b88c0..da87d337a6 100644 --- a/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-win32-x64.zip +++ b/app/aws-lsp-codewhisperer-runtimes/_bundle-assets/qserver-win32-x64.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cd8190acad1f1c2b37a818fcf606cc3d2fa4e1929c82ef967ac360b7345864b4 -size 113890248 +oid sha256:5949d0c3d13d02c31f6bf06ea7a0339a851be1824f90c81d48e66c48c79e4930 +size 113887210 diff --git a/app/aws-lsp-codewhisperer-runtimes/package.json b/app/aws-lsp-codewhisperer-runtimes/package.json index 487d2c5b1a..fac1a07ce9 100644 --- a/app/aws-lsp-codewhisperer-runtimes/package.json +++ b/app/aws-lsp-codewhisperer-runtimes/package.json @@ -23,7 +23,7 @@ "local-build": "node scripts/local-build.js" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-codewhisperer": "*", "copyfiles": "^2.4.1", "cross-env": "^7.0.3", @@ -35,6 +35,7 @@ "process": "^0.11.10", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", + "url": "^0.11.4", "vscode-languageserver": "^9.0.1", "wdio": "^6.0.1", "webpack-dev-server": "^5.2.0" diff --git a/app/aws-lsp-codewhisperer-runtimes/scripts/download-node.sh b/app/aws-lsp-codewhisperer-runtimes/scripts/download-node.sh index f0635fd8ff..35322d871b 100755 --- a/app/aws-lsp-codewhisperer-runtimes/scripts/download-node.sh +++ b/app/aws-lsp-codewhisperer-runtimes/scripts/download-node.sh @@ -4,17 +4,20 @@ # build/node-assets, which is picked up # by src/scripts/copy-node-assets.ts, to produce the final bundle. -set -e -NODE_VERSION="18" -BASE_URL="https://nodejs.org/download/release/latest-v${NODE_VERSION}.x" +set -eo pipefail +NODE_VERSION="24" +BASE_URL="https://nodejs.org/download/release/v24.9.0" SHASUMS_FILE="SHASUMS256.txt" ASSETS_DIR="build/node-assets" # Download SHASUMS256.txt -wget -q "$BASE_URL/$SHASUMS_FILE" -O "$SHASUMS_FILE" +curl -s "$BASE_URL/$SHASUMS_FILE" -o "$SHASUMS_FILE" # Extract exact Node.js version from any entry in SHASUMS256.txt -NODE_SEMVER=$(grep -o 'node-v[0-9]*\.[0-9]*\.[0-9]*' SHASUMS256.txt | head -1 | cut -d'v' -f2) +# NODE_SEMVER=$(grep -o 'node-v[0-9]*\.[0-9]*\.[0-9]*' SHASUMS256.txt | head -1 | cut -d'v' -f2) + +# temporarily lock node.js version to 24.9.0 due to https://github.com/nodejs/node/issues/60176 +NODE_SEMVER="24.9.0" if [ -z "$NODE_SEMVER" ]; then echo "Failed to extract Node.js version from SHASUMS256.txt" @@ -47,7 +50,7 @@ for actual_file in "${EXPECTED_FILES[@]}"; do echo "Updating $actual_file" mkdir -p "$(dirname "$filepath")" - wget -q "$BASE_URL/$actual_file" -O $filepath + curl -s "$BASE_URL/$actual_file" -o "$filepath" else echo "Warning: $actual_file not found in SHASUMS256.txt" fi @@ -58,7 +61,7 @@ LICENSE_URL="https://raw.githubusercontent.com/nodejs/node/v${NODE_SEMVER}/LICEN LICENSE_FILE="$ASSETS_DIR/LICENSE" echo "Fetching Node.js license from $LICENSE_URL" -wget -q "$LICENSE_URL" -O "$LICENSE_FILE" +curl -s "$LICENSE_URL" -o "$LICENSE_FILE" # Verify the license file was downloaded successfully if [ ! -s "$LICENSE_FILE" ]; then @@ -69,9 +72,6 @@ fi echo "License file has been updated in $LICENSE_FILE" -# Read the escaped license text -LICENSE_TEXT=$(cat "$LICENSE_FILE") - # Update the attribution overrides file ATTRIBUTION_FILE="../../attribution/overrides.json" @@ -86,12 +86,14 @@ fi jq --indent 4 \ --arg name "Node.js" \ --arg version "$NODE_SEMVER" \ - --arg licenseText "$LICENSE_TEXT" \ + --rawfile licenseText "$LICENSE_FILE" \ --arg url "https://github.com/nodejs/node" \ --arg license "MIT" \ '.node.name = $name | .node.version = $version | .node.url = $url | .node.license = $license | .node.licenseText = $licenseText' \ - "$ATTRIBUTION_FILE" > "$ATTRIBUTION_FILE.tmp" && mv "$ATTRIBUTION_FILE.tmp" "$ATTRIBUTION_FILE" + "$ATTRIBUTION_FILE" > "$ATTRIBUTION_FILE.tmp" + +mv "$ATTRIBUTION_FILE.tmp" "$ATTRIBUTION_FILE" echo "Successfully updated Node.js version and license in $ATTRIBUTION_FILE" # Cleanup -rm -f "$SHASUMS_FILE" \ No newline at end of file +rm -f "$SHASUMS_FILE" diff --git a/app/aws-lsp-codewhisperer-runtimes/scripts/package.sh b/app/aws-lsp-codewhisperer-runtimes/scripts/package.sh index 021b4b8080..5ebfc9aafc 100755 --- a/app/aws-lsp-codewhisperer-runtimes/scripts/package.sh +++ b/app/aws-lsp-codewhisperer-runtimes/scripts/package.sh @@ -18,6 +18,18 @@ TARGET_BUILD_DIR=./build/private/bundle/client mkdir -p $TARGET_BUILD_DIR cp -r $CHAT_CLIENT_BUNDLE_DIR/* $TARGET_BUILD_DIR +# Add benign files to avoid single-file archive flagging +echo "Amazon Q Developer UI Bundle - $(date)" > $TARGET_BUILD_DIR/README.txt +echo "This archive contains UI assets for Amazon Q Developer." >> $TARGET_BUILD_DIR/README.txt +cat > $TARGET_BUILD_DIR/client-metadata.json << EOF +{ + "name": "amazonq-ui-bundle", + "description": "UI assets for Amazon Q Developer", + "main": "amazonq-ui.js", + "dateCreated": "$(date -u +%Y-%m-%dT%H:%M:%SZ)" +} +EOF + # ZIP client files ARCHIVES_DIR=./build/archives mkdir -p $ARCHIVES_DIR/shared diff --git a/app/aws-lsp-codewhisperer-runtimes/src/agent-standalone.ts b/app/aws-lsp-codewhisperer-runtimes/src/agent-standalone.ts index 7996472ada..49600a91b8 100644 --- a/app/aws-lsp-codewhisperer-runtimes/src/agent-standalone.ts +++ b/app/aws-lsp-codewhisperer-runtimes/src/agent-standalone.ts @@ -3,7 +3,7 @@ import { AmazonQServiceServerIAM, AmazonQServiceServerToken, CodeWhispererSecurityScanServerTokenProxy, - CodeWhispererServerTokenProxy, + CodeWhispererServer, QAgenticChatServerProxy, QConfigurationServerTokenProxy, QLocalProjectContextServerProxy, @@ -25,7 +25,7 @@ const version = versionJson.agenticChat const props = { version: version, servers: [ - CodeWhispererServerTokenProxy, + CodeWhispererServer, CodeWhispererSecurityScanServerTokenProxy, QConfigurationServerTokenProxy, QNetTransformServerTokenProxy, diff --git a/app/aws-lsp-codewhisperer-runtimes/src/version.json b/app/aws-lsp-codewhisperer-runtimes/src/version.json index 4c93c3f549..14a063ffd1 100644 --- a/app/aws-lsp-codewhisperer-runtimes/src/version.json +++ b/app/aws-lsp-codewhisperer-runtimes/src/version.json @@ -1,3 +1,3 @@ { - "agenticChat": "1.27.0" + "agenticChat": "1.42.0" } diff --git a/app/aws-lsp-codewhisperer-runtimes/webpack.config.js b/app/aws-lsp-codewhisperer-runtimes/webpack.config.js index 2882ae8ac9..f10f3d0202 100644 --- a/app/aws-lsp-codewhisperer-runtimes/webpack.config.js +++ b/app/aws-lsp-codewhisperer-runtimes/webpack.config.js @@ -80,6 +80,7 @@ const webworkerConfig = { http: 'stream-http', crypto: 'crypto-browserify', stream: 'stream-browserify', + url: require.resolve('url/'), fs: path.resolve(__dirname, 'src/mock-fs.js'), child_process: false, vm: false, diff --git a/app/aws-lsp-identity-runtimes/package.json b/app/aws-lsp-identity-runtimes/package.json index 46abf7d958..74fa7c332b 100644 --- a/app/aws-lsp-identity-runtimes/package.json +++ b/app/aws-lsp-identity-runtimes/package.json @@ -7,7 +7,7 @@ "compile": "tsc --build" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-identity": "^0.0.1" } } diff --git a/app/aws-lsp-json-runtimes/package.json b/app/aws-lsp-json-runtimes/package.json index 24ae3535ac..4348ae866a 100644 --- a/app/aws-lsp-json-runtimes/package.json +++ b/app/aws-lsp-json-runtimes/package.json @@ -11,7 +11,7 @@ "webpack": "webpack" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-json": "*" }, "devDependencies": { @@ -22,7 +22,7 @@ "chai-as-promised": "^7.1.1", "mocha": "^11.0.1", "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" } diff --git a/app/aws-lsp-notification-runtimes/package.json b/app/aws-lsp-notification-runtimes/package.json index 1e7641e2a8..47ea043b34 100644 --- a/app/aws-lsp-notification-runtimes/package.json +++ b/app/aws-lsp-notification-runtimes/package.json @@ -7,7 +7,7 @@ "compile": "tsc --build" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-notification": "^0.0.1" } } diff --git a/app/aws-lsp-partiql-runtimes/package.json b/app/aws-lsp-partiql-runtimes/package.json index 0d5e07cddf..9b8ef07a25 100644 --- a/app/aws-lsp-partiql-runtimes/package.json +++ b/app/aws-lsp-partiql-runtimes/package.json @@ -11,12 +11,12 @@ "package": "npm run compile && npm run compile:webpack" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.120", - "@aws/lsp-partiql": "^0.0.5" + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-partiql": "^0.0.18" }, "devDependencies": { "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" } diff --git a/app/aws-lsp-s3-runtimes/package.json b/app/aws-lsp-s3-runtimes/package.json index ad84f62776..6afd693a46 100644 --- a/app/aws-lsp-s3-runtimes/package.json +++ b/app/aws-lsp-s3-runtimes/package.json @@ -10,7 +10,7 @@ "compile": "tsc --build" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-s3": "^0.0.1" } } diff --git a/app/aws-lsp-yaml-json-webworker/package.json b/app/aws-lsp-yaml-json-webworker/package.json index 7079d1fa3b..262e48b798 100644 --- a/app/aws-lsp-yaml-json-webworker/package.json +++ b/app/aws-lsp-yaml-json-webworker/package.json @@ -11,7 +11,7 @@ "serve:webpack": "NODE_ENV=development webpack serve" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-json": "*", "@aws/lsp-yaml": "*" }, diff --git a/app/aws-lsp-yaml-runtimes/package.json b/app/aws-lsp-yaml-runtimes/package.json index a59f919477..6bd43690ef 100644 --- a/app/aws-lsp-yaml-runtimes/package.json +++ b/app/aws-lsp-yaml-runtimes/package.json @@ -11,7 +11,7 @@ "webpack": "webpack" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-yaml": "*" }, "devDependencies": { @@ -22,7 +22,7 @@ "chai-as-promised": "^7.1.1", "mocha": "^11.0.1", "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "umd-compat-loader": "^2.1.2", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" diff --git a/app/hello-world-lsp-runtimes/package.json b/app/hello-world-lsp-runtimes/package.json index 54018d89d0..7b1bf6f9cd 100644 --- a/app/hello-world-lsp-runtimes/package.json +++ b/app/hello-world-lsp-runtimes/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@aws/hello-world-lsp": "^0.0.1", - "@aws/language-server-runtimes": "^0.2.123" + "@aws/language-server-runtimes": "^0.3.1" }, "devDependencies": { "@types/chai": "^4.3.5", @@ -25,7 +25,7 @@ "chai-as-promised": "^7.1.1", "mocha": "^11.0.1", "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" } diff --git a/chat-client/CHANGELOG.md b/chat-client/CHANGELOG.md index 1cd9acfbe0..52c8aef308 100644 --- a/chat-client/CHANGELOG.md +++ b/chat-client/CHANGELOG.md @@ -1,5 +1,75 @@ # Changelog +## [0.1.40](https://github.com/aws/language-servers/compare/chat-client/v0.1.39...chat-client/v0.1.40) (2025-10-21) + + +### Features + +* send pinned context button immediately with pending state ([#2353](https://github.com/aws/language-servers/issues/2353)) ([bee5cad](https://github.com/aws/language-servers/commit/bee5cadeaf8840a8af08acfe8b58442aac7ad567)) + +## [0.1.39](https://github.com/aws/language-servers/compare/chat-client/v0.1.38...chat-client/v0.1.39) (2025-10-09) + + +### Features + +* add model description to dropdown ([#2374](https://github.com/aws/language-servers/issues/2374)) ([ed8c6dd](https://github.com/aws/language-servers/commit/ed8c6dda1312f728e9ee7472f7ca447196ad9d84)) + +## [0.1.38](https://github.com/aws/language-servers/compare/chat-client/v0.1.37...chat-client/v0.1.38) (2025-10-01) + + +### Bug Fixes + +* **amazonq:** Fix mock fs clean; Node version upgrade ([#2324](https://github.com/aws/language-servers/issues/2324)) ([1d9afd4](https://github.com/aws/language-servers/commit/1d9afd410e19624223e300ca06ea7d08a112cc82)) +* optimize memory bank token usage and add new tab support ([#2366](https://github.com/aws/language-servers/issues/2366)) ([3057d56](https://github.com/aws/language-servers/commit/3057d56e4a3047d1715d6e3560e9f934d1de469c)) + +## [0.1.37](https://github.com/aws/language-servers/compare/chat-client/v0.1.36...chat-client/v0.1.37) (2025-09-24) + + +### Features + +* memory bank support ([#2314](https://github.com/aws/language-servers/issues/2314)) ([0e215fc](https://github.com/aws/language-servers/commit/0e215fc0e475b4c40a8237492371716982d4d532)) + +## [0.1.36](https://github.com/aws/language-servers/compare/chat-client/v0.1.35...chat-client/v0.1.36) (2025-09-16) + + +### Bug Fixes + +* migration from /agents ux ([#2248](https://github.com/aws/language-servers/issues/2248)) ([debeb41](https://github.com/aws/language-servers/commit/debeb414fd0d4d873af2f36cde0ebbeab16d16a4)) + +## [0.1.35](https://github.com/aws/language-servers/compare/chat-client/v0.1.34...chat-client/v0.1.35) (2025-09-09) + + +### Features + +* add support for getSupplementalContext LSP API ([#2212](https://github.com/aws/language-servers/issues/2212)) ([2ddcae7](https://github.com/aws/language-servers/commit/2ddcae7a4fac6b89cbc9784911959743ea0a6d11)) +* **amazonq:** default to diff-based scans ([#2195](https://github.com/aws/language-servers/issues/2195)) ([da4c3db](https://github.com/aws/language-servers/commit/da4c3db5329bd50cfe249bf8c1d59afa9bcb0157)) + +## [0.1.34](https://github.com/aws/language-servers/compare/chat-client/v0.1.33...chat-client/v0.1.34) (2025-08-27) + + +### Features + +* Auto fetch models from listAvailableModels API ([#2171](https://github.com/aws/language-servers/issues/2171)) ([8600c52](https://github.com/aws/language-servers/commit/8600c524877abb459e9338399352446c0dcff6f0)) + + +### Bug Fixes + +* **amazonq:** disable typewriter animation ([#2160](https://github.com/aws/language-servers/issues/2160)) ([db45d01](https://github.com/aws/language-servers/commit/db45d01adba10e8a04d868e1062f899df4f5b7e4)) + +## [0.1.33](https://github.com/aws/language-servers/compare/chat-client/v0.1.32...chat-client/v0.1.33) (2025-08-19) + + +### Features + +* **amazonq:** added mcp admin level configuration with GetProfile ([#2000](https://github.com/aws/language-servers/issues/2000)) ([fd6e9a8](https://github.com/aws/language-servers/commit/fd6e9a829c6229c276de5340dffce52b426a864d)) +* **amazonq:** read tool ui revamp ([#2113](https://github.com/aws/language-servers/issues/2113)) ([#2121](https://github.com/aws/language-servers/issues/2121)) ([93cf229](https://github.com/aws/language-servers/commit/93cf229149ba60491f9f5763793db4a9f570b611)) + + +### Bug Fixes + +* fix for button text and remove profilearn caching ([#2137](https://github.com/aws/language-servers/issues/2137)) ([2a4171a](https://github.com/aws/language-servers/commit/2a4171a74c15c23c23c481060496162bcc9e6284)) +* Use file context override in the inline completion params for Jupyter Notebook ([#2114](https://github.com/aws/language-servers/issues/2114)) ([91c8398](https://github.com/aws/language-servers/commit/91c839857f8aa4d79098189f9fb620b361c51289)) + ## [0.1.32](https://github.com/aws/language-servers/compare/chat-client/v0.1.31...chat-client/v0.1.32) (2025-08-11) @@ -433,8 +503,8 @@ ### Changed -- Update `@aws/chat-client-ui-types` to 0.1.35 -- Update `@aws/language-server-runtimes-types` to 0.1.29 +- Update `@aws/chat-client-ui-types` to 0.1.63 +- Update `@aws/language-server-runtimes-types` to 0.1.57 - Shortened legal text in the footer ## [0.0.9] - 2024-11-20 @@ -458,8 +528,8 @@ ### Changed - Changed legal text in the footer -- Update `@aws/chat-client-ui-types` to 0.1.35 -- Update `@aws/language-server-runtimes-types` to 0.1.29 +- Update `@aws/chat-client-ui-types` to 0.1.63 +- Update `@aws/language-server-runtimes-types` to 0.1.57 - Upgraded dependency: `@aws/mynah-ui` from 4.15.11 to 4.18.0: - Inline code elements now wrap onto new lines - Send button no longer shifts out of the window when horizontally filling the prompt input without spaces (now it wraps) diff --git a/chat-client/package.json b/chat-client/package.json index df0378f3e4..6a43de457e 100644 --- a/chat-client/package.json +++ b/chat-client/package.json @@ -1,6 +1,6 @@ { "name": "@aws/chat-client", - "version": "0.1.32", + "version": "0.1.40", "description": "AWS Chat Client", "main": "out/index.js", "repository": { @@ -24,10 +24,10 @@ "package": "webpack" }, "dependencies": { - "@aws/chat-client-ui-types": "^0.1.56", - "@aws/language-server-runtimes": "^0.2.123", - "@aws/language-server-runtimes-types": "^0.1.50", - "@aws/mynah-ui": "^4.36.4" + "@aws/chat-client-ui-types": "^0.1.63", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/language-server-runtimes-types": "^0.1.57", + "@aws/mynah-ui": "^4.36.8" }, "devDependencies": { "@types/jsdom": "^21.1.6", diff --git a/chat-client/src/client/chat.ts b/chat-client/src/client/chat.ts index d090a33f70..58519d96ef 100644 --- a/chat-client/src/client/chat.ts +++ b/chat-client/src/client/chat.ts @@ -116,7 +116,6 @@ import { InboundChatApi, createMynahUi } from './mynahUi' import { TabFactory } from './tabs/tabFactory' import { ChatClientAdapter } from '../contracts/chatClientAdapter' import { toMynahContextCommand, toMynahIcon } from './utils' -import { modelSelectionForRegion } from './texts/modelSelection' const getDefaultTabConfig = (agenticMode?: boolean) => { return { @@ -264,20 +263,6 @@ export const createChat = ( return option }), }) - } else if (message.params.region) { - // TODO: This can be removed after all clients support aws/chat/listAvailableModels - // get all tabs and update region - const allExistingTabs: MynahUITabStoreModel = mynahUi.getAllTabs() - for (const tabId in allExistingTabs) { - const options = mynahUi.getTabData(tabId).getStore()?.promptInputOptions - mynahUi.updateStore(tabId, { - promptInputOptions: options?.map(option => - option.id === 'model-selection' - ? modelSelectionForRegion[message.params.region] - : option - ), - }) - } } else { tabFactory.setInfoMessages((message.params as ChatOptionsUpdateParams).chatNotifications) } diff --git a/chat-client/src/client/features/rules.test.ts b/chat-client/src/client/features/rules.test.ts index c8f93ed4eb..e37be8cdb8 100644 --- a/chat-client/src/client/features/rules.test.ts +++ b/chat-client/src/client/features/rules.test.ts @@ -16,12 +16,17 @@ describe('rules', () => { mynahUi = { openTopBarButtonOverlay: sinon.stub(), showCustomForm: sinon.stub(), + getAllTabs: sinon.stub().returns({}), + updateStore: sinon.stub().returns('new-tab-id'), + notify: sinon.stub(), } as unknown as MynahUI openTopBarButtonOverlayStub = mynahUi.openTopBarButtonOverlay as sinon.SinonStub showCustomFormStub = mynahUi.showCustomForm as sinon.SinonStub messager = { onRuleClick: sinon.stub(), + onChatPrompt: sinon.stub(), + onTabAdd: sinon.stub(), } as unknown as Messager rulesList = new RulesList(mynahUi, messager) @@ -142,6 +147,27 @@ describe('rules', () => { assert.equal(formArgs[2][1].id, ContextRule.SubmitButtonId) }) + it('calls messager when create memory bank is clicked', () => { + const createMemoryBankItem: DetailedListItem = { + id: ContextRule.CreateMemoryBankId, + description: 'Generate Memory Bank', + } + + onItemClick(createMemoryBankItem) + + // Should create new tab and send chat prompt + sinon.assert.calledOnce(messager.onTabAdd as sinon.SinonStub) + sinon.assert.calledOnce(messager.onChatPrompt as sinon.SinonStub) + + const tabAddArgs = (messager.onTabAdd as sinon.SinonStub).getCall(0).args[0] + assert.equal(tabAddArgs, 'new-tab-id') + + const chatPromptArgs = (messager.onChatPrompt as sinon.SinonStub).getCall(0).args[0] + assert.equal(chatPromptArgs.prompt.prompt, 'Generate a Memory Bank for this project') + assert.equal(chatPromptArgs.prompt.escapedPrompt, 'Generate a Memory Bank for this project') + assert.equal(chatPromptArgs.tabId, 'new-tab-id') + }) + it('calls messager when regular rule is clicked', () => { const ruleItem: DetailedListItem = { id: 'test-rule-id', @@ -267,21 +293,27 @@ describe('rules', () => { const result = convertRulesListToDetailedListGroup(rulesFolder) - assert.equal(result.length, 3) // 2 folders + create rule group + assert.equal(result.length, 3) // 2 folders + actions group assert.equal(result[0].groupName, 'test-folder') assert.equal(result[0].children?.length, 2) assert.equal(result[0].children?.[0].id, 'rule-1') assert.equal(result[0].children?.[0].description, 'Test Rule 1') assert.equal(result[1].groupName, 'inactive-folder') assert.equal(result[1].children?.length, 0) - assert.equal(result[2].children?.[0].id, ContextRule.CreateRuleId) + assert.equal(result[2].groupName, 'Actions') + assert.equal(result[2].children?.length, 2) // Memory Bank + Create Rule + assert.equal(result[2].children?.[0].id, ContextRule.CreateMemoryBankId) + assert.equal(result[2].children?.[1].id, ContextRule.CreateRuleId) }) it('handles empty rules array', () => { const result = convertRulesListToDetailedListGroup([]) - assert.equal(result.length, 1) // Only create rule group - assert.equal(result[0].children?.[0].id, ContextRule.CreateRuleId) + assert.equal(result.length, 1) // Only actions group + assert.equal(result[0].groupName, 'Actions') + assert.equal(result[0].children?.length, 2) // Memory Bank + Create Rule + assert.equal(result[0].children?.[0].id, ContextRule.CreateMemoryBankId) + assert.equal(result[0].children?.[1].id, ContextRule.CreateRuleId) }) }) }) diff --git a/chat-client/src/client/features/rules.ts b/chat-client/src/client/features/rules.ts index f5ea2cca22..585b33144c 100644 --- a/chat-client/src/client/features/rules.ts +++ b/chat-client/src/client/features/rules.ts @@ -1,4 +1,11 @@ -import { MynahIconsType, MynahUI, DetailedListItem, DetailedListItemGroup, MynahIcons } from '@aws/mynah-ui' +import { + MynahIconsType, + MynahUI, + DetailedListItem, + DetailedListItemGroup, + MynahIcons, + NotificationType, +} from '@aws/mynah-ui' import { Messager } from '../messager' import { ListRulesResult } from '@aws/language-server-runtimes-types' import { RulesFolder } from '@aws/language-server-runtimes-types' @@ -6,6 +13,7 @@ import { MynahDetailedList } from './history' export const ContextRule = { CreateRuleId: 'create-rule', + CreateMemoryBankId: 'create-memory-bank', CancelButtonId: 'cancel-create-rule', SubmitButtonId: 'submit-create-rule', RuleNameFieldId: 'rule-name', @@ -68,12 +76,53 @@ export class RulesList { ], `Create a rule` ) + } else if (item.id === ContextRule.CreateMemoryBankId) { + this.rulesList?.close() + this.handleMemoryBankCreation() } else { this.messager.onRuleClick({ tabId: this.tabId, type: 'rule', id: item.id }) } } } + private handleMemoryBankCreation = () => { + // Close the rules list first + this.rulesList?.close() + + // Check if we're at the tab limit (10 tabs max) + const currentTabCount = Object.keys(this.mynahUi.getAllTabs()).length + if (currentTabCount >= 10) { + // Show notification that max tabs reached + this.mynahUi.notify({ + content: 'You can only open ten conversation tabs at a time.', + type: NotificationType.WARNING, + }) + return + } + + // Create a new tab for the memory bank generation + const newTabId = this.mynahUi.updateStore('', { tabTitle: 'Memory Bank' }) + if (newTabId) { + // Add the new tab and switch to it + this.messager.onTabAdd(newTabId) + + // Send the chat prompt to the new tab + this.messager.onChatPrompt({ + prompt: { + prompt: 'Generate a Memory Bank for this project', + escapedPrompt: 'Generate a Memory Bank for this project', + }, + tabId: newTabId, + }) + } else { + // Show error notification if tab creation failed + this.mynahUi.notify({ + content: 'Failed to create new tab for Memory Bank generation.', + type: NotificationType.ERROR, + }) + } + } + showLoading(tabId: string) { this.tabId = tabId const rulesList = this.mynahUi.openTopBarButtonOverlay({ @@ -156,6 +205,24 @@ const createRuleListItem: DetailedListItem = { id: ContextRule.CreateRuleId, } +function createMemoryBankListItem(rules: RulesFolder[]): DetailedListItem { + // Handles button text changes between "Generation" and "Regenerate" + const memoryBankFiles = ['product', 'structure', 'tech', 'guidelines'] + + const memoryBankFolder = rules.find(folder => folder.folderName === 'memory-bank') + + const hasMemoryBankFiles = + memoryBankFolder && memoryBankFolder.rules.some(rule => memoryBankFiles.includes(rule.name)) + + const buttonText = hasMemoryBankFiles ? 'Regenerate Memory Bank' : 'Generate Memory Bank' + + return { + description: buttonText, + icon: MynahIcons.FOLDER, + id: ContextRule.CreateMemoryBankId, + } +} + export function convertRulesListToDetailedListGroup(rules: RulesFolder[]): DetailedListItemGroup[] { return rules .map( @@ -179,7 +246,10 @@ export function convertRulesListToDetailedListGroup(rules: RulesFolder[]): Detai })), }) as DetailedListItemGroup ) - .concat({ children: [createRuleListItem] }) + .concat({ + groupName: 'Actions', + children: [createMemoryBankListItem(rules), createRuleListItem], + }) } function convertRuleStatusToIcon(status: boolean | 'indeterminate'): MynahIcons | undefined { diff --git a/chat-client/src/client/mcpMynahUi.test.ts b/chat-client/src/client/mcpMynahUi.test.ts index 9d1dec5407..947e5bc604 100644 --- a/chat-client/src/client/mcpMynahUi.test.ts +++ b/chat-client/src/client/mcpMynahUi.test.ts @@ -107,10 +107,8 @@ describe('McpMynahUi', () => { assert.strictEqual(callArgs.detailedList.header.description, 'Test Description') assert.deepStrictEqual(callArgs.detailedList.header.status, { status: 'success' }) - // Verify the actions in the header - assert.strictEqual(callArgs.detailedList.header.actions.length, 2) - assert.strictEqual(callArgs.detailedList.header.actions[0].id, 'add-new-mcp') - assert.strictEqual(callArgs.detailedList.header.actions[1].id, 'refresh-mcp-list') + // Verify the actions in the header (no default actions are added when header is provided) + assert.strictEqual(callArgs.detailedList.header.actions.length, 0) // Verify the list structure assert.strictEqual(callArgs.detailedList.list.length, 1) diff --git a/chat-client/src/client/mcpMynahUi.ts b/chat-client/src/client/mcpMynahUi.ts index f9216b8168..5cdae85da1 100644 --- a/chat-client/src/client/mcpMynahUi.ts +++ b/chat-client/src/client/mcpMynahUi.ts @@ -272,20 +272,12 @@ export class McpMynahUi { title: params.header.title, description: params.header.description, status: params.header.status, - actions: [ - { - id: MCP_IDS.ADD_NEW, - icon: toMynahIcon('plus'), - status: 'clear', - description: 'Add new MCP', - }, - { - id: MCP_IDS.REFRESH_LIST, - icon: toMynahIcon('refresh'), - status: 'clear', - description: 'Refresh MCP servers', - }, - ], + actions: + params.header.actions?.map(action => ({ + ...action, + icon: action.icon ? toMynahIcon(action.icon) : undefined, + text: undefined, + })) || [], } : undefined, filterOptions: params.filterOptions?.map(filter => ({ diff --git a/chat-client/src/client/mynahUi.test.ts b/chat-client/src/client/mynahUi.test.ts index 31e64f0e76..1f9f6c4e57 100644 --- a/chat-client/src/client/mynahUi.test.ts +++ b/chat-client/src/client/mynahUi.test.ts @@ -246,9 +246,16 @@ describe('MynahUI', () => { }) describe('sendGenericCommand', () => { - it('should create a new tab if none exits', () => { + it('should create a new tab if none exits', function () { + this.timeout(10000) // Increase timeout to 10 seconds // clear create tab stub since set up process calls it twice createTabStub.resetHistory() + // Stub setTimeout to execute immediately + const setTimeoutStub = sinon.stub(global, 'setTimeout').callsFake((fn: Function) => { + fn() + return {} as any + }) + const genericCommand = 'Explain' const selection = 'const x = 5;' const tabId = '' @@ -258,11 +265,18 @@ describe('MynahUI', () => { sinon.assert.calledOnceWithExactly(createTabStub, false) sinon.assert.calledThrice(updateStoreSpy) + setTimeoutStub.restore() }) - it('should create a new tab if current tab is loading', () => { + it('should create a new tab if current tab is loading', function () { + this.timeout(10000) // clear create tab stub since set up process calls it twice createTabStub.resetHistory() + // Stub setTimeout to execute immediately + const setTimeoutStub = sinon.stub(global, 'setTimeout').callsFake((fn: Function) => { + fn() + return {} as any + }) getAllTabsStub.returns({ 'tab-1': { store: { loadingChat: true } } }) const genericCommand = 'Explain' @@ -274,10 +288,16 @@ describe('MynahUI', () => { sinon.assert.calledOnceWithExactly(createTabStub, false) sinon.assert.calledThrice(updateStoreSpy) + setTimeoutStub.restore() }) it('should not create a new tab if one exists already', () => { createTabStub.resetHistory() + // Stub setTimeout to execute immediately + const setTimeoutStub = sinon.stub(global, 'setTimeout').callsFake((fn: Function) => { + fn() + return {} as any + }) const genericCommand = 'Explain' const selection = 'const x = 5;' const tabId = 'tab-1' @@ -287,9 +307,15 @@ describe('MynahUI', () => { sinon.assert.notCalled(createTabStub) sinon.assert.calledOnce(updateStoreSpy) + setTimeoutStub.restore() }) it('should call handleChatPrompt when sendGenericCommand is called', () => { + // Stub setTimeout to execute immediately + const setTimeoutStub = sinon.stub(global, 'setTimeout').callsFake((fn: Function) => { + fn() + return {} as any + }) const genericCommand = 'Explain' const selection = 'const x = 5;' const tabId = 'tab-1' @@ -319,6 +345,7 @@ describe('MynahUI', () => { loadingChat: true, promptInputDisabledState: false, }) + setTimeoutStub.restore() }) }) @@ -544,7 +571,7 @@ describe('MynahUI', () => { // Simulate the response from the server const models = [ { id: 'CLAUDE_3_7_SONNET_20250219_V1_0', name: 'Claude Sonnet 3.7' }, - { id: 'CLAUDE_SONNET_4_20250514_V1_0', name: 'Claude Sonnet 4' }, + { id: 'CLAUDE_SONNET_4_20250514_V1_0', name: 'Claude Sonnet 4', description: 'Test description' }, ] const result: ListAvailableModelsResult = { @@ -562,8 +589,12 @@ describe('MynahUI', () => { { id: 'model-selection', options: [ - { value: 'CLAUDE_3_7_SONNET_20250219_V1_0', label: 'Claude Sonnet 3.7' }, - { value: 'CLAUDE_SONNET_4_20250514_V1_0', label: 'Claude Sonnet 4' }, + { value: 'CLAUDE_3_7_SONNET_20250219_V1_0', label: 'Claude Sonnet 3.7', description: '' }, + { + value: 'CLAUDE_SONNET_4_20250514_V1_0', + label: 'Claude Sonnet 4', + description: 'Test description', + }, ], type: 'select', value: 'CLAUDE_3_7_SONNET_20250219_V1_0', @@ -603,6 +634,7 @@ describe('MynahUI', () => { route: ['/workspace', 'src/file1.ts'], icon: 'file', children: undefined, + disabled: false, }, ], promptTopBarTitle: '@', @@ -659,6 +691,7 @@ describe('MynahUI', () => { ...activeEditorCommand, description: 'file:///workspace/src/active.ts', children: undefined, + disabled: false, }, ], promptTopBarTitle: '@Pin Context', @@ -698,7 +731,7 @@ describe('MynahUI', () => { // Verify updateStore was called with empty context items // Active editor should be removed since no textDocument was provided sinon.assert.calledWith(updateStoreSpy, tabId, { - promptTopBarContextItems: [{ ...fileCommand, children: undefined }], + promptTopBarContextItems: [{ ...fileCommand, children: undefined, disabled: false }], promptTopBarTitle: '@', promptTopBarButton: null, }) diff --git a/chat-client/src/client/mynahUi.ts b/chat-client/src/client/mynahUi.ts index 3b42249331..63995c6bc8 100644 --- a/chat-client/src/client/mynahUi.ts +++ b/chat-client/src/client/mynahUi.ts @@ -69,12 +69,7 @@ import { toMynahIcon, } from './utils' import { ChatHistory, ChatHistoryList } from './features/history' -import { - pairProgrammingModeOff, - pairProgrammingModeOn, - programmerModeCard, - createRerouteCard, -} from './texts/pairProgramming' +import { pairProgrammingModeOff, pairProgrammingModeOn, programmerModeCard } from './texts/pairProgramming' import { ContextRule, RulesList } from './features/rules' import { getModelSelectionChatItem, modelUnavailableBanner, modelThrottledBanner } from './texts/modelSelection' import { @@ -151,11 +146,20 @@ export const handlePromptInputChange = (mynahUi: MynahUI, tabId: string, options } } + const updatedPromptInputOptions = promptInputOptions?.map(option => { + option.value = optionsValues[option.id] + return option + }) + mynahUi.updateStore(tabId, { - promptInputOptions: promptInputOptions?.map(option => { - option.value = optionsValues[option.id] - return option - }), + promptInputOptions: updatedPromptInputOptions, + }) + + // Store the updated values in tab defaults for new tabs + mynahUi.updateTabDefaults({ + store: { + promptInputOptions: updatedPromptInputOptions, + }, }) } @@ -276,11 +280,6 @@ export const handleChatPrompt = ( // For /doc command, don't show any prompt in UI const displayPrompt = isReroutedCommand && prompt.command === '/doc' ? '' : userPrompt initializeChatResponse(mynahUi, tabId, displayPrompt, agenticMode) - - // If this is a rerouted command AND reroute feature is enabled, show the reroute card after the prompt - if (isReroutedCommand && tabFactory?.isRerouteEnabled() && prompt.command) { - mynahUi.addChatItem(tabId, createRerouteCard(prompt.command)) - } } const initializeChatResponse = (mynahUi: MynahUI, tabId: string, userPrompt?: string, agenticMode?: boolean) => { @@ -395,9 +394,6 @@ export const createMynahUi = ( const defaultTabBarData = tabFactory.getDefaultTabData() const defaultTabConfig: Partial = { quickActionCommands: defaultTabBarData.quickActionCommands, - ...(tabFactory.isRerouteEnabled() - ? { quickActionCommandsHeader: defaultTabBarData.quickActionCommandsHeader } - : {}), tabBarButtons: defaultTabBarData.tabBarButtons, contextCommands: [ ...(contextCommandGroups || []), @@ -414,6 +410,12 @@ export const createMynahUi = ( } const tabStore = mynahUi.getTabData(tabId).getStore() + const storedPromptInputOptions = mynahUi.getTabDefaults().store?.promptInputOptions + + // Retrieve stored model selection and pair programming mode from defaults + if (storedPromptInputOptions) { + defaultTabConfig.promptInputOptions = storedPromptInputOptions + } // Tabs can be opened through different methods, including server-initiated 'openTab' requests. // The 'openTab' request is specifically used for loading historical chat sessions with pre-existing messages. @@ -827,6 +829,7 @@ export const createMynahUi = ( // if we want to max user input as 500000, need to configure the maxUserInput as 500096 maxUserInput: 500096, userInputLengthWarningThreshold: 450000, + disableTypewriterAnimation: true, }, } @@ -1353,10 +1356,15 @@ export const createMynahUi = ( fileTreeTitle: '', hideFileCount: true, details: toDetailsWithoutIcon(header.fileList.details), + renderAsPills: + !header.fileList.details || + (Object.values(header.fileList.details).every(detail => !detail.changes) && + (!header.buttons || !header.buttons.some(button => button.id === 'undo-changes')) && + !header.status?.icon), } } if (!isPartialResult) { - if (processedHeader) { + if (processedHeader && !message.header?.status) { processedHeader.status = undefined } } @@ -1369,7 +1377,8 @@ export const createMynahUi = ( processedHeader.buttons !== null && processedHeader.buttons.length > 0) || processedHeader.status !== undefined || - processedHeader.icon !== undefined) + processedHeader.icon !== undefined || + processedHeader.fileList !== undefined) const padding = message.type === 'tool' ? (fileList ? true : message.messageId?.endsWith('_permission')) : undefined @@ -1380,8 +1389,10 @@ export const createMynahUi = ( // Adding this conditional check to show the stop message in the center. const contentHorizontalAlignment: ChatItem['contentHorizontalAlignment'] = undefined - // If message.header?.status?.text is Stopped or Rejected or Ignored or Completed etc.. card should be in disabled state. - const shouldMute = message.header?.status?.text !== undefined && message.header?.status?.text !== 'Completed' + // If message.header?.status?.text is Stopped or Rejected or Ignored etc.. card should be in disabled state. + const shouldMute = + message.header?.status?.text !== undefined && + ['Stopped', 'Rejected', 'Ignored', 'Failed', 'Error'].includes(message.header.status.text) return { body: message.body, @@ -1549,6 +1560,7 @@ ${params.message}`, commands: toContextCommands(child.commands), })), icon: toMynahIcon(command.icon), + disabled: command.disabledText != null, })) } @@ -1726,7 +1738,11 @@ ${params.message}`, ? { ...option, type: 'select', - options: params.models.map(model => ({ value: model.id, label: model.name })), + options: params.models.map(model => ({ + value: model.id, + label: model.name, + description: model.description ?? '', + })), value: params.selectedModelId, } : option @@ -1769,7 +1785,7 @@ const DEFAULT_TEST_PROMPT = `You are Amazon Q. Start with a warm greeting, then const DEFAULT_DEV_PROMPT = `You are Amazon Q. Start with a warm greeting, then ask the user to specify what kind of help they need in code development. Present common questions asked (like Creating a new project, Adding a new feature, Modifying your files). Keep the question brief and friendly. Don't make assumptions about existing content or context. Wait for their response before providing specific guidance.` -const DEFAULT_REVIEW_PROMPT = `You are Amazon Q. Start with a warm greeting, then use code review tool to perform code analysis of the open file. If there is no open file, ask what the user would like to review.` +const DEFAULT_REVIEW_PROMPT = `You are Amazon Q. Start with a warm greeting, then use code review tool to perform a diff review code analysis of the open file. If there is no open file, ask what the user would like to review. Please tell the user that the scan is a diff scan.` export const uiComponentsTexts = { mainTitle: 'Amazon Q (Preview)', diff --git a/chat-client/src/client/tabs/tabFactory.test.ts b/chat-client/src/client/tabs/tabFactory.test.ts index c398c709eb..815e81a22e 100644 --- a/chat-client/src/client/tabs/tabFactory.test.ts +++ b/chat-client/src/client/tabs/tabFactory.test.ts @@ -2,7 +2,7 @@ import { ChatHistory } from '../features/history' import { TabFactory } from './tabFactory' import * as assert from 'assert' import { pairProgrammingPromptInput } from '../texts/pairProgramming' -import { modelSelectionForRegion } from '../texts/modelSelection' +import { modelSelection } from '../texts/modelSelection' describe('tabFactory', () => { describe('getDefaultTabData', () => { @@ -92,10 +92,7 @@ describe('tabFactory', () => { const result = tabFactory.createTab(false) - assert.deepStrictEqual(result.promptInputOptions, [ - pairProgrammingPromptInput, - modelSelectionForRegion['us-east-1'], - ]) + assert.deepStrictEqual(result.promptInputOptions, [pairProgrammingPromptInput, modelSelection]) }) it('should not include model selection when only agentic mode is enabled', () => { diff --git a/chat-client/src/client/tabs/tabFactory.ts b/chat-client/src/client/tabs/tabFactory.ts index 3a6012471a..bfb3091911 100644 --- a/chat-client/src/client/tabs/tabFactory.ts +++ b/chat-client/src/client/tabs/tabFactory.ts @@ -4,14 +4,13 @@ import { MynahIcons, MynahUIDataModel, QuickActionCommandGroup, - QuickActionCommandsHeader, TabBarMainAction, } from '@aws/mynah-ui' import { disclaimerCard } from '../texts/disclaimer' import { ChatMessage } from '@aws/language-server-runtimes-types' import { ChatHistory } from '../features/history' import { pairProgrammingPromptInput, programmerModeCard } from '../texts/pairProgramming' -import { modelSelectionForRegion } from '../texts/modelSelection' +import { modelSelection } from '../texts/modelSelection' export type DefaultTabData = MynahUIDataModel @@ -52,10 +51,7 @@ export class TabFactory { ...this.getDefaultTabData(), ...(disclaimerCardActive ? { promptInputStickyCard: disclaimerCard } : {}), promptInputOptions: this.agenticMode - ? [ - pairProgrammingPromptInput, - ...(this.modelSelectionEnabled ? [modelSelectionForRegion['us-east-1']] : []), - ] + ? [pairProgrammingPromptInput, ...(this.modelSelectionEnabled ? [modelSelection] : [])] : [], cancelButtonWhenLoading: this.agenticMode, // supported for agentic chat only } @@ -146,17 +142,6 @@ Select code & ask me to explain, debug or optimize it, or type \`/\` for quick a quickActionCommands: this.quickActionCommands, } : {}), - ...(this.reroute - ? { - quickActionCommandsHeader: { - status: 'warning', - icon: MynahIcons.INFO, - title: 'Q Developer agentic capabilities', - description: - "You can now ask Q directly in the chat to generate code, documentation, and unit tests. You don't need to explicitly use /dev, /test, /review or /doc", - } as QuickActionCommandsHeader, - } - : {}), } tabData.tabBarButtons = this.getTabBarButtons() @@ -232,50 +217,4 @@ Select code & ask me to explain, debug or optimize it, or type \`/\` for quick a return tabBarButtons.length ? tabBarButtons : undefined } - - // Enhanced welcome messages block for non-agentic mode - private getEnhancedWelcomeBlock() { - return { - text: '', - options: [ - { - pillText: 'Getting Started', - prompt: 'What can Amazon Q help me with?', - type: 'help', - }, - ], - } - } - - // Agentic welcome messages block - private getAgenticWelcomeBlock() { - return { - text: '', - options: [ - { - pillText: 'Getting Started', - prompt: 'What can Amazon Q help me with?', - type: 'help', - }, - ], - } - } - - // Legacy welcome messages block - private getWelcomeBlock() { - return { - text: 'Try Examples:', - options: [ - { - pillText: 'Explain selected code', - prompt: 'Explain selected code', - type: 'init-prompt', - }, - { - pillText: 'How can Amazon Q help me?', - type: 'help', - }, - ], - } - } } diff --git a/chat-client/src/client/texts/modelSelection.test.ts b/chat-client/src/client/texts/modelSelection.test.ts index c36dfad976..abd010436e 100644 --- a/chat-client/src/client/texts/modelSelection.test.ts +++ b/chat-client/src/client/texts/modelSelection.test.ts @@ -1,60 +1,11 @@ import * as assert from 'assert' -import { - BedrockModel, - modelSelectionForRegion, - getModelSelectionChatItem, - modelUnavailableBanner, - modelThrottledBanner, -} from './modelSelection' +import { getModelSelectionChatItem, modelUnavailableBanner, modelThrottledBanner } from './modelSelection' import { ChatItemType } from '@aws/mynah-ui' /** * Tests for modelSelection functionality - * - * Note: Some tests are for deprecated code (marked with 'legacy') that is maintained - * for backward compatibility with older clients. These should be removed once - * all clients have been updated to use the new API (aws/chat/listAvailableModels). */ describe('modelSelection', () => { - describe('BedrockModel enum (legacy)', () => { - it('should have the correct model IDs', () => { - assert.strictEqual(BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0, 'CLAUDE_3_7_SONNET_20250219_V1_0') - assert.strictEqual(BedrockModel.CLAUDE_SONNET_4_20250514_V1_0, 'CLAUDE_SONNET_4_20250514_V1_0') - }) - }) - - describe('modelSelectionForRegion (legacy)', () => { - it('should provide all models for us-east-1 region', () => { - const usEast1ModelSelection = modelSelectionForRegion['us-east-1'] - assert.ok(usEast1ModelSelection, 'usEast1ModelSelection should exist') - assert.ok(usEast1ModelSelection.type === 'select', 'usEast1ModelSelection should be type select') - assert.ok(Array.isArray(usEast1ModelSelection.options), 'options should be an array') - assert.strictEqual(usEast1ModelSelection.options.length, 2, 'should have 2 options') - - const modelIds = usEast1ModelSelection.options.map(option => option.value) - assert.ok(modelIds.includes(BedrockModel.CLAUDE_SONNET_4_20250514_V1_0), 'should include Claude Sonnet 4') - assert.ok( - modelIds.includes(BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0), - 'should include Claude Sonnet 3.7' - ) - }) - - it('should provide all models for eu-central-1 region', () => { - const euCentral1ModelSelection = modelSelectionForRegion['eu-central-1'] - assert.ok(euCentral1ModelSelection, 'euCentral1ModelSelection should exist') - assert.ok(euCentral1ModelSelection.type === 'select', 'euCentral1ModelSelection should be type select') - assert.ok(Array.isArray(euCentral1ModelSelection.options), 'options should be an array') - assert.strictEqual(euCentral1ModelSelection.options.length, 2, 'should have 2 option') - - const modelIds = euCentral1ModelSelection.options.map(option => option.value) - assert.ok(modelIds.includes(BedrockModel.CLAUDE_SONNET_4_20250514_V1_0), 'should include Claude Sonnet 4') - assert.ok( - modelIds.includes(BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0), - 'should include Claude Sonnet 3.7' - ) - }) - }) - describe('getModelSelectionChatItem', () => { it('should return a chat item with the correct model name', () => { const modelName = 'Claude Sonnet 4' diff --git a/chat-client/src/client/texts/modelSelection.ts b/chat-client/src/client/texts/modelSelection.ts index 18df833419..6cfd25b7fe 100644 --- a/chat-client/src/client/texts/modelSelection.ts +++ b/chat-client/src/client/texts/modelSelection.ts @@ -5,41 +5,36 @@ import { ChatItem, ChatItemFormItem, ChatItemType } from '@aws/mynah-ui' */ export enum BedrockModel { CLAUDE_SONNET_4_20250514_V1_0 = 'CLAUDE_SONNET_4_20250514_V1_0', - CLAUDE_3_7_SONNET_20250219_V1_0 = 'CLAUDE_3_7_SONNET_20250219_V1_0', } type ModelDetails = { label: string + description: string } const modelRecord: Record = { - [BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0]: { label: 'Claude Sonnet 3.7' }, - [BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: { label: 'Claude Sonnet 4' }, + [BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: { + label: 'Claude Sonnet 4', + description: 'Hybrid reasoning and coding for regular use', + }, } -const modelOptions = Object.entries(modelRecord).map(([value, { label }]) => ({ +const modelOptions = Object.entries(modelRecord).map(([value, { label, description }]) => ({ value, label, + description, })) -const modelSelection: ChatItemFormItem = { +export const modelSelection: ChatItemFormItem = { type: 'select', id: 'model-selection', - options: modelOptions, mandatory: true, hideMandatoryIcon: true, + options: modelOptions, border: false, autoWidth: true, } -/** - * @deprecated use aws/chat/listAvailableModels server request instead - */ -export const modelSelectionForRegion: Record = { - 'us-east-1': modelSelection, - 'eu-central-1': modelSelection, -} - export const getModelSelectionChatItem = (modelName: string): ChatItem => ({ type: ChatItemType.DIRECTIVE, contentHorizontalAlignment: 'center', diff --git a/chat-client/src/client/texts/pairProgramming.test.ts b/chat-client/src/client/texts/pairProgramming.test.ts index 3ffec1bcaf..8181f50c8b 100644 --- a/chat-client/src/client/texts/pairProgramming.test.ts +++ b/chat-client/src/client/texts/pairProgramming.test.ts @@ -1,14 +1,10 @@ import * as assert from 'assert' -import { ChatItemType, MynahIcons } from '@aws/mynah-ui' +import { ChatItemType } from '@aws/mynah-ui' import { programmerModeCard, pairProgrammingPromptInput, pairProgrammingModeOn, pairProgrammingModeOff, - testRerouteCard, - docRerouteCard, - devRerouteCard, - createRerouteCard, } from './pairProgramming' describe('pairProgramming', () => { @@ -56,67 +52,4 @@ describe('pairProgramming', () => { assert.equal(pairProgrammingModeOff.body, 'Agentic coding - OFF') }) }) - - describe('testRerouteCard', () => { - it('has correct properties', () => { - assert.equal(testRerouteCard.type, ChatItemType.ANSWER) - assert.equal(testRerouteCard.border, true) - assert.equal(testRerouteCard.header?.padding, true) - assert.equal(testRerouteCard.header?.iconForegroundStatus, 'warning') - assert.equal(testRerouteCard.header?.icon, MynahIcons.INFO) - assert.ok(testRerouteCard.header?.body?.includes('generate unit tests')) - assert.ok(testRerouteCard.body?.includes("You don't need to explicitly use /test")) - }) - }) - - describe('docRerouteCard', () => { - it('has correct properties', () => { - assert.equal(docRerouteCard.type, ChatItemType.ANSWER) - assert.equal(docRerouteCard.border, true) - assert.equal(docRerouteCard.header?.padding, true) - assert.equal(docRerouteCard.header?.iconForegroundStatus, 'warning') - assert.equal(docRerouteCard.header?.icon, MynahIcons.INFO) - assert.ok(docRerouteCard.header?.body?.includes('generate documentation')) - assert.ok(docRerouteCard.body?.includes("You don't need to explicitly use /doc")) - }) - }) - - describe('devRerouteCard', () => { - it('has correct properties', () => { - assert.equal(devRerouteCard.type, ChatItemType.ANSWER) - assert.equal(devRerouteCard.border, true) - assert.equal(devRerouteCard.header?.padding, true) - assert.equal(devRerouteCard.header?.iconForegroundStatus, 'warning') - assert.equal(devRerouteCard.header?.icon, MynahIcons.INFO) - assert.ok(devRerouteCard.header?.body?.includes('generate code')) - assert.ok(devRerouteCard.body?.includes("You don't need to explicitly use /dev")) - }) - }) - - describe('createRerouteCard', () => { - it('returns testRerouteCard for /test command', () => { - const result = createRerouteCard('/test') - assert.deepEqual(result, testRerouteCard) - }) - - it('returns docRerouteCard for /doc command', () => { - const result = createRerouteCard('/doc') - assert.deepEqual(result, docRerouteCard) - }) - - it('returns devRerouteCard for /dev command', () => { - const result = createRerouteCard('/dev') - assert.deepEqual(result, devRerouteCard) - }) - - it('returns devRerouteCard for unknown command', () => { - const result = createRerouteCard('/unknown') - assert.deepEqual(result, devRerouteCard) - }) - - it('returns devRerouteCard for empty string', () => { - const result = createRerouteCard('') - assert.deepEqual(result, devRerouteCard) - }) - }) }) diff --git a/chat-client/src/client/texts/pairProgramming.ts b/chat-client/src/client/texts/pairProgramming.ts index c93918317f..335a37069c 100644 --- a/chat-client/src/client/texts/pairProgramming.ts +++ b/chat-client/src/client/texts/pairProgramming.ts @@ -1,4 +1,4 @@ -import { ChatItem, ChatItemFormItem, ChatItemType, MynahIcons } from '@aws/mynah-ui' +import { ChatItem, ChatItemFormItem, ChatItemType } from '@aws/mynah-ui' export const programmerModeCard: ChatItem = { type: ChatItemType.ANSWER, @@ -36,76 +36,3 @@ export const pairProgrammingModeOff: ChatItem = { fullWidth: true, body: 'Agentic coding - OFF', } - -export const testRerouteCard: ChatItem = { - type: ChatItemType.ANSWER, - border: true, - header: { - padding: true, - iconForegroundStatus: 'warning', - icon: MynahIcons.INFO, - body: 'You can now ask to generate unit tests directly in the chat.', - }, - body: `You don't need to explicitly use /test. We've redirected your request to chat. -Ask me to do things like: -• Add unit tests for highlighted functions in my active file -• Generate tests for null and empty inputs in my project`, -} - -export const docRerouteCard: ChatItem = { - type: ChatItemType.ANSWER, - border: true, - header: { - padding: true, - iconForegroundStatus: 'warning', - icon: MynahIcons.INFO, - body: 'You can now ask to generate documentation directly in the chat.', - }, - body: `You don't need to explicitly use /doc. We've redirected your request to chat.`, -} - -export const devRerouteCard: ChatItem = { - type: ChatItemType.ANSWER, - border: true, - header: { - padding: true, - iconForegroundStatus: 'warning', - icon: MynahIcons.INFO, - body: 'You can now ask to generate code directly in the chat.', - }, - body: `You don't need to explicitly use /dev. We've redirected your request to chat. -Ask me to do things like: -1. Create a project -2. Add a feature -3. Modify your files`, -} - -export const reviewRerouteCard: ChatItem = { - type: ChatItemType.ANSWER, - border: true, - header: { - padding: true, - iconForegroundStatus: 'warning', - icon: MynahIcons.INFO, - body: 'You can now ask to run code reviews directly in the chat.', - }, - body: `You don't need to explicitly use /review. We've redirected your request to chat. -Ask me to do things like: -• Perform a code review of uncommitted changes in my active file -• Perform a code review of my active file`, -} - -export const createRerouteCard = (command: string): ChatItem => { - switch (command) { - case '/test': - return testRerouteCard - case '/doc': - return docRerouteCard - case '/dev': - return devRerouteCard - case '/review': - return reviewRerouteCard - default: - return devRerouteCard // Default fallback - } -} diff --git a/client/vscode/package.json b/client/vscode/package.json index 975a395d66..7a2e502264 100644 --- a/client/vscode/package.json +++ b/client/vscode/package.json @@ -351,8 +351,8 @@ "devDependencies": { "@aws-sdk/credential-providers": "^3.731.1", "@aws-sdk/types": "^3.734.0", - "@aws/chat-client-ui-types": "^0.1.56", - "@aws/language-server-runtimes": "^0.2.123", + "@aws/chat-client-ui-types": "^0.1.63", + "@aws/language-server-runtimes": "^0.3.1", "@types/uuid": "^9.0.8", "@types/vscode": "^1.98.0", "jose": "^5.2.4", diff --git a/core/aws-lsp-core/CHANGELOG.md b/core/aws-lsp-core/CHANGELOG.md index 9e2e616f55..935777970e 100644 --- a/core/aws-lsp-core/CHANGELOG.md +++ b/core/aws-lsp-core/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## [0.0.16](https://github.com/aws/language-servers/compare/lsp-core/v0.0.15...lsp-core/v0.0.16) (2025-10-01) + + +### Bug Fixes + +* **amazonq:** Fix mock fs clean; Node version upgrade ([#2324](https://github.com/aws/language-servers/issues/2324)) ([1d9afd4](https://github.com/aws/language-servers/commit/1d9afd410e19624223e300ca06ea7d08a112cc82)) +* **amazonq:** handle IAM credentials expiration field to be aws sdk versions compatible and add refresh logic to codewhisperer IAM client ([#2349](https://github.com/aws/language-servers/issues/2349)) ([5eb3768](https://github.com/aws/language-servers/commit/5eb3768bf020d61d0ade767d62e13839048146e4)) + +## [0.0.15](https://github.com/aws/language-servers/compare/lsp-core/v0.0.14...lsp-core/v0.0.15) (2025-09-09) + + +### Features + +* add support for getSupplementalContext LSP API ([#2212](https://github.com/aws/language-servers/issues/2212)) ([2ddcae7](https://github.com/aws/language-servers/commit/2ddcae7a4fac6b89cbc9784911959743ea0a6d11)) + +## [0.0.14](https://github.com/aws/language-servers/compare/lsp-core/v0.0.13...lsp-core/v0.0.14) (2025-08-19) + + +### Features + +* **amazonq:** added mcp admin level configuration with GetProfile ([#2000](https://github.com/aws/language-servers/issues/2000)) ([fd6e9a8](https://github.com/aws/language-servers/commit/fd6e9a829c6229c276de5340dffce52b426a864d)) + + +### Bug Fixes + +* Use file context override in the inline completion params for Jupyter Notebook ([#2114](https://github.com/aws/language-servers/issues/2114)) ([91c8398](https://github.com/aws/language-servers/commit/91c839857f8aa4d79098189f9fb620b361c51289)) + ## [0.0.13](https://github.com/aws/language-servers/compare/lsp-core/v0.0.12...lsp-core/v0.0.13) (2025-08-04) diff --git a/core/aws-lsp-core/package.json b/core/aws-lsp-core/package.json index aeff582d34..156ccb8814 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.13", + "version": "0.0.16", "description": "Core library, contains common code and utilities", "main": "out/index.js", "repository": { @@ -28,7 +28,7 @@ "prepack": "shx cp ../../LICENSE ../../NOTICE ../../SECURITY.md ." }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@gerhobbelt/gitignore-parser": "^0.2.0-9", "cross-spawn": "7.0.6", "jose": "^5.2.4", diff --git a/core/aws-lsp-core/src/content/cache/uriCacheRepository.test.ts b/core/aws-lsp-core/src/content/cache/uriCacheRepository.test.ts index 695a49995c..8487e886bd 100644 --- a/core/aws-lsp-core/src/content/cache/uriCacheRepository.test.ts +++ b/core/aws-lsp-core/src/content/cache/uriCacheRepository.test.ts @@ -12,7 +12,7 @@ import path = require('path') describe('Test UriCacheRepository', async () => { const sampleUri = URI.parse('https://aws.amazon.com/') const currentTimeMs = 1234 - const metadataPath = '//cache/cachedUris/metadata' + const metadataPath = 'cache/cachedUris/metadata' let timeProviderStub: SinonStubbedInstance @@ -20,7 +20,7 @@ describe('Test UriCacheRepository', async () => { beforeEach(async () => { mockfs({ - '//cache': { + cache: { cachedUris: { metadata: '{}', }, @@ -30,7 +30,7 @@ describe('Test UriCacheRepository', async () => { timeProviderStub = stub(new TimeProvider()) timeProviderStub.currentMilliseconds.returns(currentTimeMs) - sut = new UriCacheRepository('//cache', timeProviderStub) + sut = new UriCacheRepository('cache', timeProviderStub) }) afterEach(async () => { @@ -89,7 +89,7 @@ describe('Test UriCacheRepository', async () => { }) function getCachePath(uri: URI): string { - return path.join('//cache/cachedUris', getHash(uri)) + return path.join('cache/cachedUris', getHash(uri)) } function getHash(uri: URI): string { diff --git a/core/aws-lsp-core/src/content/handlers/cachedContentHandler.test.ts b/core/aws-lsp-core/src/content/handlers/cachedContentHandler.test.ts index ade872313f..aaf316c6d6 100644 --- a/core/aws-lsp-core/src/content/handlers/cachedContentHandler.test.ts +++ b/core/aws-lsp-core/src/content/handlers/cachedContentHandler.test.ts @@ -43,7 +43,7 @@ describe('Test CachedContentHandler', async () => { beforeEach(async () => { mockfs({ - '//cache': { + cache: { cachedUris: { metadata: '{}', }, @@ -54,7 +54,7 @@ describe('Test CachedContentHandler', async () => { timeProviderStub = stub(new TimeProvider()) timeProviderStub.currentMilliseconds.returns(currentTimeMs) - cacheRepository = new UriCacheRepository('//cache', timeProviderStub) + cacheRepository = new UriCacheRepository('cache', timeProviderStub) sut = new CachedContentHandler({ cacheRepository, timeProvider: timeProviderStub, diff --git a/core/aws-lsp-core/src/credentials/credentialsProvider.ts b/core/aws-lsp-core/src/credentials/credentialsProvider.ts index a56be8e0ad..1f5186eea7 100644 --- a/core/aws-lsp-core/src/credentials/credentialsProvider.ts +++ b/core/aws-lsp-core/src/credentials/credentialsProvider.ts @@ -4,6 +4,7 @@ export interface IamCredentials { accessKeyId: string secretAccessKey: string sessionToken?: string + expiration?: Date // v3 format } export interface BearerToken { diff --git a/core/aws-lsp-core/src/credentials/ideCredentialsProvider.test.ts b/core/aws-lsp-core/src/credentials/ideCredentialsProvider.test.ts new file mode 100644 index 0000000000..a2fbb51834 --- /dev/null +++ b/core/aws-lsp-core/src/credentials/ideCredentialsProvider.test.ts @@ -0,0 +1,48 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +import * as assert from 'assert' +import { IdeCredentialsProvider } from './ideCredentialsProvider' +import { IamCredentials } from './credentialsProvider' +import { Connection } from 'vscode-languageserver' +import * as sinon from 'sinon' + +describe('IdeCredentialsProvider', function () { + let provider: IdeCredentialsProvider + let mockConnection: sinon.SinonStubbedInstance + + beforeEach(function () { + mockConnection = { + console: { + info: sinon.stub(), + log: sinon.stub(), + warn: sinon.stub(), + error: sinon.stub(), + }, + } as any + provider = new IdeCredentialsProvider(mockConnection as any) + }) + + describe('validateIamCredentialsFields', function () { + it('throws error when accessKeyId is missing', function () { + const credentials = { + secretAccessKey: 'secret', + } as IamCredentials + + assert.throws(() => provider['validateIamCredentialsFields'](credentials), /Missing property: accessKeyId/) + }) + + it('throws error when secretAccessKey is missing', function () { + const credentials = { + accessKeyId: 'key', + } as IamCredentials + + assert.throws( + () => provider['validateIamCredentialsFields'](credentials), + /Missing property: secretAccessKey/ + ) + }) + }) +}) diff --git a/core/aws-lsp-core/src/credentials/ideCredentialsProvider.ts b/core/aws-lsp-core/src/credentials/ideCredentialsProvider.ts index 08231ad33d..6f389594b8 100644 --- a/core/aws-lsp-core/src/credentials/ideCredentialsProvider.ts +++ b/core/aws-lsp-core/src/credentials/ideCredentialsProvider.ts @@ -58,7 +58,15 @@ export class IdeCredentialsProvider implements CredentialsProvider { credentialsProtocolMethodNames.iamCredentialsUpdate, async (request: UpdateCredentialsRequest) => { try { - const iamCredentials = await this.decodeCredentialsRequestToken(request) + const rawCredentials = await this.decodeCredentialsRequestToken< + IamCredentials & { expireTime?: Date } + >(request) + + // Normalize legacy expireTime field to standard expiration field + const iamCredentials: IamCredentials = { + ...rawCredentials, + expiration: rawCredentials.expiration || rawCredentials.expireTime, + } this.validateIamCredentialsFields(iamCredentials) diff --git a/core/aws-lsp-core/src/index.ts b/core/aws-lsp-core/src/index.ts index 1ad391dc8f..030a4fa2e3 100644 --- a/core/aws-lsp-core/src/index.ts +++ b/core/aws-lsp-core/src/index.ts @@ -19,3 +19,4 @@ export * as workspaceUtils from './util/workspaceUtils' export * as processUtils from './util/processUtils' export * as collectionUtils from './util/collectionUtils' export * as loggingUtils from './util/loggingUtils' +export * as retryUtils from './util/retryUtils' diff --git a/core/aws-lsp-core/src/util/retryUtils.test.ts b/core/aws-lsp-core/src/util/retryUtils.test.ts new file mode 100644 index 0000000000..4223e1f3bf --- /dev/null +++ b/core/aws-lsp-core/src/util/retryUtils.test.ts @@ -0,0 +1,120 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +import { expect } from 'chai' +import * as sinon from 'sinon' +import { retryWithBackoff, DEFAULT_MAX_RETRIES, DEFAULT_BASE_DELAY } from './retryUtils' + +describe('retryUtils', () => { + let clock: sinon.SinonFakeTimers + + beforeEach(() => { + clock = sinon.useFakeTimers() + }) + + afterEach(() => { + clock.restore() + }) + + describe('retryWithBackoff', () => { + it('should return result on first success', async () => { + const fn = sinon.stub().resolves('success') + + const result = await retryWithBackoff(fn) + + expect(result).to.equal('success') + expect(fn.callCount).to.equal(1) + }) + + it('should retry on retryable errors', async () => { + const fn = sinon.stub() + fn.onFirstCall().rejects({ code: 'ThrottlingException' }) + fn.onSecondCall().resolves('success') + + const promise = retryWithBackoff(fn) + await clock.tickAsync(DEFAULT_BASE_DELAY) + const result = await promise + + expect(result).to.equal('success') + expect(fn.callCount).to.equal(2) + }) + + it('should not retry on non-retryable client errors', async () => { + const error = { statusCode: 404 } + const fn = sinon.stub().rejects(error) + + try { + await retryWithBackoff(fn) + expect.fail('Expected function to throw') + } catch (e) { + expect(e).to.equal(error) + } + expect(fn.callCount).to.equal(1) + }) + + it('should retry on server errors', async () => { + const fn = sinon.stub() + fn.onFirstCall().rejects({ statusCode: 500 }) + fn.onSecondCall().resolves('success') + + const promise = retryWithBackoff(fn) + await clock.tickAsync(DEFAULT_BASE_DELAY) + const result = await promise + + expect(result).to.equal('success') + expect(fn.callCount).to.equal(2) + }) + + it('should use exponential backoff by default', async () => { + const fn = sinon.stub() + const error = { code: 'ThrottlingException' } + fn.onFirstCall().rejects(error) + fn.onSecondCall().rejects(error) + + const promise = retryWithBackoff(fn) + + // First retry after baseDelay * 1 + await clock.tickAsync(DEFAULT_BASE_DELAY) + // Second retry after baseDelay * 2 + await clock.tickAsync(DEFAULT_BASE_DELAY * 2) + + try { + await promise + expect.fail('Expected function to throw') + } catch (e) { + expect(e).to.equal(error) + } + expect(fn.callCount).to.equal(DEFAULT_MAX_RETRIES) + }) + + it('should respect custom maxRetries', async () => { + const error = { code: 'ThrottlingException' } + const fn = sinon.stub().rejects(error) + + try { + await retryWithBackoff(fn, { maxRetries: 1 }) + expect.fail('Expected function to throw') + } catch (e) { + expect(e).to.equal(error) + } + expect(fn.callCount).to.equal(1) + }) + + it('should use custom isRetryable function', async () => { + const error = { custom: 'error' } + const fn = sinon.stub().rejects(error) + const isRetryable = sinon.stub().returns(false) + + try { + await retryWithBackoff(fn, { isRetryable }) + expect.fail('Expected function to throw') + } catch (e) { + expect(e).to.equal(error) + } + expect(fn.callCount).to.equal(1) + expect(isRetryable.calledWith(error)).to.equal(true) + }) + }) +}) diff --git a/core/aws-lsp-core/src/util/retryUtils.ts b/core/aws-lsp-core/src/util/retryUtils.ts new file mode 100644 index 0000000000..dc135ce23d --- /dev/null +++ b/core/aws-lsp-core/src/util/retryUtils.ts @@ -0,0 +1,77 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +// Default retry configuration constants +export const DEFAULT_MAX_RETRIES = 2 +export const DEFAULT_BASE_DELAY = 500 +export const DEFAULT_EXPONENTIAL_BACKOFF = true + +// HTTP status code constants +const CLIENT_ERROR_MIN = 400 +const CLIENT_ERROR_MAX = 500 +const INTERNAL_SERVER_ERROR = 500 +const SERVICE_UNAVAILABLE = 503 + +// AWS error code constants +const THROTTLING_EXCEPTION = 'ThrottlingException' +const INTERNAL_SERVER_EXCEPTION = 'InternalServerException' + +export interface RetryOptions { + /** Maximum number of retry attempts (default: DEFAULT_MAX_RETRIES) */ + maxRetries?: number + /** Base delay in milliseconds (default: DEFAULT_BASE_DELAY) */ + baseDelay?: number + /** Whether to use exponential backoff (default: DEFAULT_EXPONENTIAL_BACKOFF) */ + exponentialBackoff?: boolean + /** Custom function to determine if an error is retryable */ + isRetryable?: (error: any) => boolean +} + +/** + * Default AWS error retry logic + */ +function defaultIsRetryable(error: any): boolean { + const errorCode = error.code || error.name + const statusCode = error.statusCode + + // Fast fail on non-retryable client errors (except throttling) + if (statusCode >= CLIENT_ERROR_MIN && statusCode < CLIENT_ERROR_MAX && errorCode !== THROTTLING_EXCEPTION) { + return false + } + + // Retry on throttling, server errors, and specific status codes + return ( + errorCode === THROTTLING_EXCEPTION || + errorCode === INTERNAL_SERVER_EXCEPTION || + statusCode === INTERNAL_SERVER_ERROR || + statusCode === SERVICE_UNAVAILABLE + ) +} + +/** + * Executes a function with retry logic and exponential backoff + */ +export async function retryWithBackoff(fn: () => Promise, options: RetryOptions = {}): Promise { + const { + maxRetries = DEFAULT_MAX_RETRIES, + baseDelay = DEFAULT_BASE_DELAY, + exponentialBackoff = DEFAULT_EXPONENTIAL_BACKOFF, + isRetryable = defaultIsRetryable, + } = options + + for (let attempt = 0; attempt < maxRetries; attempt++) { + try { + return await fn() + } catch (error: any) { + if (!isRetryable(error) || attempt === maxRetries - 1) { + throw error + } + + const delay = exponentialBackoff ? baseDelay * (attempt + 1) : baseDelay + await new Promise(resolve => setTimeout(resolve, delay)) + } + } + throw new Error('Retry failed') +} diff --git a/core/codewhisperer-runtime/amzn-codewhisperer-runtime-1.0.0.tgz b/core/codewhisperer-runtime/amzn-codewhisperer-runtime-1.0.0.tgz new file mode 100644 index 0000000000..7c122f9a06 Binary files /dev/null and b/core/codewhisperer-runtime/amzn-codewhisperer-runtime-1.0.0.tgz differ diff --git a/core/codewhisperer/amzn-codewhisperer-1.0.0.tgz b/core/codewhisperer/amzn-codewhisperer-1.0.0.tgz new file mode 100644 index 0000000000..18ab19948c Binary files /dev/null and b/core/codewhisperer/amzn-codewhisperer-1.0.0.tgz differ diff --git a/integration-tests/q-agentic-chat-server/package.json b/integration-tests/q-agentic-chat-server/package.json index 5431142f5c..92882f1859 100644 --- a/integration-tests/q-agentic-chat-server/package.json +++ b/integration-tests/q-agentic-chat-server/package.json @@ -9,7 +9,7 @@ "test-integ": "npm run compile && mocha --timeout 30000 \"./out/**/*.test.js\" --retries 2" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-core": "*" }, "devDependencies": { diff --git a/integration-tests/q-agentic-chat-server/src/tests/agenticChatInteg.test.ts b/integration-tests/q-agentic-chat-server/src/tests/agenticChatInteg.test.ts index 897ee02071..c5a8046bd5 100644 --- a/integration-tests/q-agentic-chat-server/src/tests/agenticChatInteg.test.ts +++ b/integration-tests/q-agentic-chat-server/src/tests/agenticChatInteg.test.ts @@ -169,11 +169,11 @@ describe('Q Agentic Chat Server Integration Tests', async () => { expect(decryptedResult.additionalMessages).to.be.an('array') const fsReadMessage = decryptedResult.additionalMessages?.find( - msg => msg.type === 'tool' && msg.fileList?.rootFolderTitle === '1 file read' + msg => msg.type === 'tool' && msg.header?.body === '1 file read' ) expect(fsReadMessage).to.exist const expectedPath = path.join(rootPath, 'test.py') - const actualPaths = fsReadMessage?.fileList?.filePaths?.map(normalizePath) || [] + const actualPaths = fsReadMessage?.header?.fileList?.filePaths?.map(normalizePath) || [] expect(actualPaths).to.include.members([normalizePath(expectedPath)]) expect(fsReadMessage?.messageId?.startsWith('tooluse_')).to.be.true }) @@ -191,10 +191,10 @@ describe('Q Agentic Chat Server Integration Tests', async () => { expect(decryptedResult.additionalMessages).to.be.an('array') const listDirectoryMessage = decryptedResult.additionalMessages?.find( - msg => msg.type === 'tool' && msg.fileList?.rootFolderTitle === '1 directory listed' + msg => msg.type === 'tool' && msg.header?.body === '1 directory listed' ) expect(listDirectoryMessage).to.exist - const actualPaths = listDirectoryMessage?.fileList?.filePaths?.map(normalizePath) || [] + const actualPaths = listDirectoryMessage?.header?.fileList?.filePaths?.map(normalizePath) || [] expect(actualPaths).to.include.members([normalizePath(rootPath)]) expect(listDirectoryMessage?.messageId?.startsWith('tooluse_')).to.be.true }) @@ -371,11 +371,12 @@ describe('Q Agentic Chat Server Integration Tests', async () => { expect(decryptedResult.additionalMessages).to.be.an('array') const fileSearchMessage = decryptedResult.additionalMessages?.find( - msg => msg.type === 'tool' && msg.fileList?.rootFolderTitle === '1 directory searched' + msg => msg.type === 'tool' && msg.header?.body === 'Searched for "test" in ' ) expect(fileSearchMessage).to.exist expect(fileSearchMessage?.messageId?.startsWith('tooluse_')).to.be.true - const actualPaths = fileSearchMessage?.fileList?.filePaths?.map(normalizePath) || [] + expect(fileSearchMessage?.header?.status?.text).to.equal('3 results found') + const actualPaths = fileSearchMessage?.header?.fileList?.filePaths?.map(normalizePath) || [] expect(actualPaths).to.include.members([normalizePath(rootPath)]) }) }) diff --git a/package-lock.json b/package-lock.json index b42f206c44..cded37cce6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "integration-tests/*" ], "dependencies": { - "@aws/language-server-runtimes": "^0.2.116", + "@aws/language-server-runtimes": "^0.3.1", "@smithy/types": "4.2.0", "clean": "^4.0.2", "typescript": "^5.8.2" @@ -48,10 +48,10 @@ "name": "@aws/lsp-antlr4-runtimes", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-antlr4": "*", - "antlr4-c3": "^3.4.1", - "antlr4ng": "^3.0.4" + "antlr4-c3": "^3.4.2", + "antlr4ng": "^3.0.14" }, "devDependencies": { "@types/chai": "^4.3.5", @@ -62,7 +62,7 @@ "chai-as-promised": "^7.1.1", "mocha": "^11.0.1", "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" } @@ -71,7 +71,7 @@ "name": "@aws/lsp-buildspec-runtimes", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-buildspec": "^0.0.1" } }, @@ -79,7 +79,7 @@ "name": "@aws/lsp-cloudformation-runtimes", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-cloudformation": "^0.0.1" } }, @@ -87,7 +87,7 @@ "name": "@aws/lsp-codewhisperer-runtimes", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-codewhisperer": "*", "copyfiles": "^2.4.1", "cross-env": "^7.0.3", @@ -99,6 +99,7 @@ "process": "^0.11.10", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", + "url": "^0.11.4", "vscode-languageserver": "^9.0.1", "wdio": "^6.0.1", "webpack-dev-server": "^5.2.0" @@ -116,11 +117,26 @@ "webpack-cli": "^6.0.1" } }, + "app/aws-lsp-codewhisperer-runtimes/node_modules/punycode": { + "version": "1.4.1", + "license": "MIT" + }, + "app/aws-lsp-codewhisperer-runtimes/node_modules/url": { + "version": "0.11.4", + "license": "MIT", + "dependencies": { + "punycode": "^1.4.1", + "qs": "^6.12.3" + }, + "engines": { + "node": ">= 0.4" + } + }, "app/aws-lsp-identity-runtimes": { "name": "@aws/lsp-identity-runtimes", "version": "0.1.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-identity": "^0.0.1" } }, @@ -128,7 +144,7 @@ "name": "@aws/lsp-json-runtimes", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-json": "*" }, "devDependencies": { @@ -139,7 +155,7 @@ "chai-as-promised": "^7.1.1", "mocha": "^11.0.1", "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" } @@ -148,7 +164,7 @@ "name": "@aws/lsp-notification-runtimes", "version": "0.1.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-notification": "^0.0.1" } }, @@ -156,32 +172,21 @@ "name": "@aws/lsp-partiql-runtimes", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.120", - "@aws/lsp-partiql": "^0.0.5" + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-partiql": "^0.0.18" }, "devDependencies": { "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" } }, - "app/aws-lsp-partiql-runtimes/node_modules/@aws/lsp-partiql": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@aws/lsp-partiql/-/lsp-partiql-0.0.5.tgz", - "integrity": "sha512-WGRJIR2H13avwNWtTp8od1q1s2IJlUNLXft1OQxDV7xKnL4AJ0O/r3+X2oTg3PbT7j8n5a9CY9HzIU8LTMaR0Q==", - "dependencies": { - "@aws/language-server-runtimes": "^0.2.40", - "antlr4-c3": "3.4.2", - "antlr4ng": "3.0.14", - "web-tree-sitter": "0.22.6" - } - }, "app/aws-lsp-s3-runtimes": { "name": "@aws/lsp-s3-runtimes", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-s3": "^0.0.1" }, "bin": { @@ -192,7 +197,7 @@ "name": "@aws/lsp-yaml-json-webworker", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-json": "*", "@aws/lsp-yaml": "*" }, @@ -212,7 +217,7 @@ "name": "@aws/lsp-yaml-runtimes", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-yaml": "*" }, "devDependencies": { @@ -223,7 +228,7 @@ "chai-as-promised": "^7.1.1", "mocha": "^11.0.1", "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "umd-compat-loader": "^2.1.2", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" @@ -234,7 +239,7 @@ "version": "0.0.1", "dependencies": { "@aws/hello-world-lsp": "^0.0.1", - "@aws/language-server-runtimes": "^0.2.123" + "@aws/language-server-runtimes": "^0.3.1" }, "devDependencies": { "@types/chai": "^4.3.5", @@ -244,20 +249,20 @@ "chai-as-promised": "^7.1.1", "mocha": "^11.0.1", "ts-loader": "^9.4.4", - "ts-lsp-client": "^1.0.3", + "ts-lsp-client": "1.0.3", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" } }, "chat-client": { "name": "@aws/chat-client", - "version": "0.1.32", + "version": "0.1.40", "license": "Apache-2.0", "dependencies": { - "@aws/chat-client-ui-types": "^0.1.56", - "@aws/language-server-runtimes": "^0.2.123", - "@aws/language-server-runtimes-types": "^0.1.50", - "@aws/mynah-ui": "^4.36.4" + "@aws/chat-client-ui-types": "^0.1.63", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/language-server-runtimes-types": "^0.1.57", + "@aws/mynah-ui": "^4.36.8" }, "devDependencies": { "@types/jsdom": "^21.1.6", @@ -272,6 +277,42 @@ "webpack-cli": "^6.0.1" } }, + "chat-client/node_modules/ts-mocha": { + "version": "11.1.0", + "dev": true, + "license": "MIT", + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X || ^11.X.X", + "ts-node": "^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X", + "tsconfig-paths": "^4.X.X" + }, + "peerDependenciesMeta": { + "tsconfig-paths": { + "optional": true + } + } + }, + "chat-client/node_modules/tsconfig-paths": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "client/vscode": { "name": "awsdocuments-ls-client", "version": "0.1.0", @@ -279,8 +320,8 @@ "devDependencies": { "@aws-sdk/credential-providers": "^3.731.1", "@aws-sdk/types": "^3.734.0", - "@aws/chat-client-ui-types": "^0.1.56", - "@aws/language-server-runtimes": "^0.2.123", + "@aws/chat-client-ui-types": "^0.1.63", + "@aws/language-server-runtimes": "^0.3.1", "@types/uuid": "^9.0.8", "@types/vscode": "^1.98.0", "jose": "^5.2.4", @@ -293,10 +334,10 @@ }, "core/aws-lsp-core": { "name": "@aws/lsp-core", - "version": "0.0.13", + "version": "0.0.16", "license": "Apache-2.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@gerhobbelt/gitignore-parser": "^0.2.0-9", "cross-spawn": "7.0.6", "jose": "^5.2.4", @@ -327,7 +368,7 @@ "name": "@aws/q-agentic-chat-server-integration-tests", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-core": "*" }, "devDependencies": { @@ -345,19 +386,6 @@ "yauzl-promise": "^4.0.0" } }, - "node_modules/@ampproject/remapping": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", - "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", - "dev": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.24" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@amzn/amazon-q-developer-streaming-client": { "version": "1.0.0", "resolved": "file:core/q-developer-streaming-client/amzn-amazon-q-developer-streaming-client-1.0.0.tgz", @@ -421,45 +449,127 @@ "node": ">=18.0.0" } }, - "node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", + "node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@amzn/codewhisperer": { + "version": "1.0.0", + "resolved": "file:core/codewhisperer/amzn-codewhisperer-1.0.0.tgz", + "integrity": "sha512-ukYWlVbn0d2d+ERE/uPaYatbpsob3RNDfRIDgH3V/MWVSNjX+Kgdzo9QgKwXYBLf9rWtIOkviGxi9INr3qV3MA==", "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.731.0", + "@aws-sdk/credential-provider-node": "3.731.1", + "@aws-sdk/middleware-host-header": "3.731.0", + "@aws-sdk/middleware-logger": "3.731.0", + "@aws-sdk/middleware-recursion-detection": "3.731.0", + "@aws-sdk/middleware-user-agent": "3.731.0", + "@aws-sdk/region-config-resolver": "3.731.0", + "@aws-sdk/types": "3.731.0", + "@aws-sdk/util-user-agent-browser": "3.731.0", + "@aws-sdk/util-user-agent-node": "3.731.0", + "@smithy/config-resolver": "^4.0.1", + "@smithy/core": "^3.1.1", + "@smithy/fetch-http-handler": "^5.0.1", + "@smithy/hash-node": "^4.0.1", + "@smithy/invalid-dependency": "^4.0.1", + "@smithy/middleware-content-length": "^4.0.1", + "@smithy/middleware-retry": "^4.0.3", + "@smithy/middleware-serde": "^4.0.1", + "@smithy/middleware-stack": "^4.0.1", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/node-http-handler": "^4.0.2", + "@smithy/protocol-http": "^5.0.1", + "@smithy/smithy-client": "^4.1.2", + "@smithy/types": "^4.1.0", + "@smithy/url-parser": "^4.0.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.3", + "@smithy/util-defaults-mode-node": "^4.0.3", + "@smithy/util-middleware": "^4.0.1", + "@smithy/util-retry": "^4.0.1", + "@smithy/util-utf8": "^4.0.0", + "@types/uuid": "^9.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", + "node_modules/@amzn/codewhisperer-runtime": { + "version": "1.0.0", + "resolved": "file:core/codewhisperer-runtime/amzn-codewhisperer-runtime-1.0.0.tgz", + "integrity": "sha512-M4ijcbACU/FCCyMhamVGqCaK01/hyz8lJaUmACeIgYYlFOF4BrKivs24N2nLMCQx78mEg/Z/6mmWT6bw7MjOug==", "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.731.0", + "@aws-sdk/middleware-host-header": "3.731.0", + "@aws-sdk/middleware-logger": "3.731.0", + "@aws-sdk/middleware-recursion-detection": "3.731.0", + "@aws-sdk/middleware-user-agent": "3.731.0", + "@aws-sdk/region-config-resolver": "3.731.0", + "@aws-sdk/token-providers": "3.731.1", + "@aws-sdk/types": "3.731.0", + "@aws-sdk/util-user-agent-browser": "3.731.0", + "@aws-sdk/util-user-agent-node": "3.731.0", + "@smithy/config-resolver": "^4.0.1", + "@smithy/core": "^3.1.1", + "@smithy/fetch-http-handler": "^5.0.1", + "@smithy/hash-node": "^4.0.1", + "@smithy/invalid-dependency": "^4.0.1", + "@smithy/middleware-content-length": "^4.0.1", + "@smithy/middleware-retry": "^4.0.3", + "@smithy/middleware-serde": "^4.0.1", + "@smithy/middleware-stack": "^4.0.1", + "@smithy/node-config-provider": "^4.0.1", + "@smithy/node-http-handler": "^4.0.2", + "@smithy/protocol-http": "^5.0.1", + "@smithy/smithy-client": "^4.1.2", + "@smithy/types": "^4.1.0", + "@smithy/url-parser": "^4.0.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-body-length-node": "^4.0.0", + "@smithy/util-defaults-mode-browser": "^4.0.3", + "@smithy/util-defaults-mode-node": "^4.0.3", + "@smithy/util-middleware": "^4.0.1", + "@smithy/util-retry": "^4.0.1", + "@smithy/util-utf8": "^4.0.0", + "@types/uuid": "^9.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "node_modules/@amzn/codewhisperer-runtime/node_modules/@aws-sdk/types": { + "version": "3.731.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.731.0.tgz", + "integrity": "sha512-NrdkJg6oOUbXR2r9WvHP408CLyvST8cJfp1/jP9pemtjvjPoh6NukbCtiSFdOOb1eryP02CnqQWItfJC1p2Y/Q==", "dependencies": { + "@smithy/types": "^4.0.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@amzn/amazon-q-developer-streaming-client/node_modules/uuid": { + "node_modules/@amzn/codewhisperer-runtime/node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", @@ -522,22 +632,6 @@ "node": ">=18.0.0" } }, - "node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/token-providers": { - "version": "3.731.1", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.731.1.tgz", - "integrity": "sha512-t34GOPwBZsX7zGHjiTXmMHGY3kHM7fLiQ60Jqk0On9P0ASHTDE5U75RgCXboE3u+qEv9wyKyaqMNyMWj9qQlFg==", - "dependencies": { - "@aws-sdk/nested-clients": "3.731.1", - "@aws-sdk/types": "3.731.0", - "@smithy/property-provider": "^4.0.0", - "@smithy/shared-ini-file-loader": "^4.0.0", - "@smithy/types": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@amzn/codewhisperer-streaming/node_modules/@aws-sdk/types": { "version": "3.731.0", "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.731.0.tgz", @@ -550,45 +644,31 @@ "node": ">=18.0.0" } }, - "node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" + "node_modules/@amzn/codewhisperer-streaming/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, - "node_modules/@amzn/codewhisperer-streaming/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "node_modules/@amzn/codewhisperer/node_modules/@aws-sdk/types": { + "version": "3.731.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.731.0.tgz", + "integrity": "sha512-NrdkJg6oOUbXR2r9WvHP408CLyvST8cJfp1/jP9pemtjvjPoh6NukbCtiSFdOOb1eryP02CnqQWItfJC1p2Y/Q==", "dependencies": { + "@smithy/types": "^4.0.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@amzn/codewhisperer-streaming/node_modules/uuid": { + "node_modules/@amzn/codewhisperer/node_modules/uuid": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", @@ -617,12 +697,6 @@ "lru-cache": "^10.4.3" } }, - "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "dev": true - }, "node_modules/@aws-crypto/crc32": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-5.2.0.tgz", @@ -810,49 +884,49 @@ } }, "node_modules/@aws-sdk/client-cognito-identity": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.839.0.tgz", - "integrity": "sha512-Pq/A5W46Z0JrRTIl4eVvguQjXWwVHiiBC3WyrLxlIH0hMS6bILgC7H+z+JiCm4mXR/oF2ZobQ8Wei/Sga1Uxkw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.901.0.tgz", + "integrity": "sha512-cDJ+npYeAiS9u/52RwR0AHgneEF+rnyxiYm4d/c4FTI6xTQId3hSD0zdK0EgZ1wfoMk0/+5Ft6mYk0V6JN+cbQ==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/credential-provider-node": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/credential-provider-node": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -860,48 +934,48 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/client-sso": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.839.0.tgz", - "integrity": "sha512-AZABysUhbfcwXVlMo97/vwHgsfJNF81wypCAowpqAJkSjP2KrqsqHpb71/RoR2w8JGmEnBBXRD4wIxDhnmifWg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.901.0.tgz", + "integrity": "sha512-sGyDjjkJ7ppaE+bAKL/Q5IvVCxtoyBIzN+7+hWTS/mUxWJ9EOq9238IqmVIIK6sYNIzEf9yhobfMARasPYVTNg==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -909,25 +983,23 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/core": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.839.0.tgz", - "integrity": "sha512-KdwL5RaK7eUIlOpdOoZ5u+2t4X1rdX/MTZgz3IV/aBzjVUoGsp+uUnbyqXomLQSUitPHp72EE/NHDsvWW/IHvQ==", - "dev": true, - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@aws-sdk/xml-builder": "3.821.0", - "@smithy/core": "^3.6.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/signature-v4": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-utf8": "^4.0.0", - "fast-xml-parser": "4.4.1", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.901.0.tgz", + "integrity": "sha512-brKAc3y64tdhyuEf+OPIUln86bRTqkLgb9xkd6kUdIeA5+qmp/N6amItQz+RN4k4O3kqkCPYnAd3LonTKluobw==", + "dev": true, + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@aws-sdk/xml-builder": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/signature-v4": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -935,15 +1007,15 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.839.0.tgz", - "integrity": "sha512-cWTadewPPz1OvObZJB+olrgh8VwcgIVcT293ZUT9V0CMF0UU7QaPwJP7uNXcNxltTh+sk1yhjH4UlcnJigZZbA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.901.0.tgz", + "integrity": "sha512-5hAdVl3tBuARh3zX5MLJ1P/d+Kr5kXtDU3xm1pxUEF4xt2XkEEpwiX5fbkNkz2rbh3BCt2gOHsAbh6b3M7n+DA==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -951,20 +1023,20 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-http": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.839.0.tgz", - "integrity": "sha512-fv0BZwrDhWDju4D1MCLT4I2aPjr0dVQ6P+MpqvcGNOA41Oa9UdRhYTV5iuy5NLXzIzoCmnS+XfSq5Kbsf6//xw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.901.0.tgz", + "integrity": "sha512-Ggr7+0M6QZEsrqRkK7iyJLf4LkIAacAxHz9c4dm9hnDdU7vqrlJm6g73IxMJXWN1bIV7IxfpzB11DsRrB/oNjQ==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-stream": "^4.4.0", "tslib": "^2.6.2" }, "engines": { @@ -972,23 +1044,23 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.839.0.tgz", - "integrity": "sha512-GHm0hF4CiDxIDR7TauMaA6iI55uuSqRxMBcqTAHaTPm6+h1A+MS+ysQMxZ+Jvwtoy8WmfTIGrJVxSCw0sK2hvA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.901.0.tgz", + "integrity": "sha512-zxadcDS0hNJgv8n4hFYJNOXyfjaNE1vvqIiF/JzZSQpSSYXzCd+WxXef5bQh+W3giDtRUmkvP5JLbamEFjZKyw==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/credential-provider-env": "3.839.0", - "@aws-sdk/credential-provider-http": "3.839.0", - "@aws-sdk/credential-provider-process": "3.839.0", - "@aws-sdk/credential-provider-sso": "3.839.0", - "@aws-sdk/credential-provider-web-identity": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/credential-provider-env": "3.901.0", + "@aws-sdk/credential-provider-http": "3.901.0", + "@aws-sdk/credential-provider-process": "3.901.0", + "@aws-sdk/credential-provider-sso": "3.901.0", + "@aws-sdk/credential-provider-web-identity": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -996,22 +1068,22 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.839.0.tgz", - "integrity": "sha512-7bR+U2h+ft0V8chyeu9Bh/pvau4ZkQMeRt5f0dAULoepZQ77QQVRP4H04yJPTg9DCtqbVULQ3uf5YOp1/08vQw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.901.0.tgz", + "integrity": "sha512-dPuFzMF7L1s/lQyT3wDxqLe82PyTH+5o1jdfseTEln64LJMl0ZMWaKX/C1UFNDxaTd35Cgt1bDbjjAWHMiKSFQ==", "dev": true, "dependencies": { - "@aws-sdk/credential-provider-env": "3.839.0", - "@aws-sdk/credential-provider-http": "3.839.0", - "@aws-sdk/credential-provider-ini": "3.839.0", - "@aws-sdk/credential-provider-process": "3.839.0", - "@aws-sdk/credential-provider-sso": "3.839.0", - "@aws-sdk/credential-provider-web-identity": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/credential-provider-env": "3.901.0", + "@aws-sdk/credential-provider-http": "3.901.0", + "@aws-sdk/credential-provider-ini": "3.901.0", + "@aws-sdk/credential-provider-process": "3.901.0", + "@aws-sdk/credential-provider-sso": "3.901.0", + "@aws-sdk/credential-provider-web-identity": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1019,16 +1091,16 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.839.0.tgz", - "integrity": "sha512-qShpekjociUZ+isyQNa0P7jo+0q3N2+0eJDg8SGyP6K6hHTcGfiqxTDps+IKl6NreCPhZCBzyI9mWkP0xSDR6g==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.901.0.tgz", + "integrity": "sha512-/IWgmgM3Cl1wTdJA5HqKMAojxLkYchh5kDuphApxKhupLu6Pu0JBOHU8A5GGeFvOycyaVwosod6zDduINZxe+A==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1036,18 +1108,18 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.839.0.tgz", - "integrity": "sha512-w10zBLHhU8SBQcdrSPMI02haLoRGZg+gP7mH/Er8VhIXfHefbr7o4NirmB0hwdw/YAH8MLlC9jj7c2SJlsNhYA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.901.0.tgz", + "integrity": "sha512-SjmqZQHmqFSET7+6xcZgtH7yEyh5q53LN87GqwYlJZ6KJ5oNw11acUNEhUOL1xTSJEvaWqwTIkS2zqrzLcM9bw==", "dev": true, "dependencies": { - "@aws-sdk/client-sso": "3.839.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/token-providers": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/client-sso": "3.901.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/token-providers": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1055,16 +1127,17 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.839.0.tgz", - "integrity": "sha512-EvqTc7J1kgmiuxknpCp1S60hyMQvmKxsI5uXzQtcogl/N55rxiXEqnCLI5q6p33q91PJegrcMCM5Q17Afhm5qA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.901.0.tgz", + "integrity": "sha512-NYjy/6NLxH9m01+pfpB4ql8QgAorJcu8tw69kzHwUd/ql6wUDTbC7HcXqtKlIwWjzjgj2BKL7j6SyFapgCuafA==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1072,14 +1145,14 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.821.0.tgz", - "integrity": "sha512-xSMR+sopSeWGx5/4pAGhhfMvGBHioVBbqGvDs6pG64xfNwM5vq5s5v6D04e2i+uSTj4qGa71dLUs5I0UzAK3sw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.901.0.tgz", + "integrity": "sha512-yWX7GvRmqBtbNnUW7qbre3GvZmyYwU0WHefpZzDTYDoNgatuYq6LgUIQ+z5C04/kCRoFkAFrHag8a3BXqFzq5A==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1087,13 +1160,13 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-logger": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.821.0.tgz", - "integrity": "sha512-0cvI0ipf2tGx7fXYEEN5fBeZDz2RnHyb9xftSgUsEq7NBxjV0yTZfLJw6Za5rjE6snC80dRN8+bTNR1tuG89zA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.901.0.tgz", + "integrity": "sha512-UoHebjE7el/tfRo8/CQTj91oNUm+5Heus5/a4ECdmWaSCHCS/hXTsU3PTTHAY67oAQR8wBLFPfp3mMvXjB+L2A==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1101,14 +1174,15 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.821.0.tgz", - "integrity": "sha512-efmaifbhBoqKG3bAoEfDdcM8hn1psF+4qa7ykWuYmfmah59JBeqHLfz5W9m9JoTwoKPkFcVLWZxnyZzAnVBOIg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.901.0.tgz", + "integrity": "sha512-Wd2t8qa/4OL0v/oDpCHHYkgsXJr8/ttCxrvCKAt0H1zZe2LlRhY9gpDVKqdertfHrHDj786fOvEQA28G1L75Dg==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@aws/lambda-invoke-store": "^0.0.1", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1116,17 +1190,17 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.839.0.tgz", - "integrity": "sha512-2u74uRM1JWq6Sf7+3YpjejPM9YkomGt4kWhrmooIBEq1k5r2GTbkH7pNCxBQwBueXM21jAGVDxxeClpTx+5hig==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.901.0.tgz", + "integrity": "sha512-Zby4F03fvD9xAgXGPywyk4bC1jCbnyubMEYChLYohD+x20ULQCf+AimF/Btn7YL+hBpzh1+RmqmvZcx+RgwgNQ==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@smithy/core": "^3.6.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1134,48 +1208,48 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/nested-clients": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.839.0.tgz", - "integrity": "sha512-Glic0pg2THYP3aRhJORwJJBe1JLtJoEdWV/MFZNyzCklfMwEzpWtZAyxy+tQyFmMeW50uBAnh2R0jhMMcf257w==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.901.0.tgz", + "integrity": "sha512-feAAAMsVwctk2Tms40ONybvpfJPLCmSdI+G+OTrNpizkGLNl6ik2Ng2RzxY6UqOfN8abqKP/DOUj1qYDRDG8ag==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -1183,16 +1257,34 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/region-config-resolver": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.821.0.tgz", - "integrity": "sha512-t8og+lRCIIy5nlId0bScNpCkif8sc0LhmtaKsbm0ZPm3sCa/WhCbSZibjbZ28FNjVCV+p0D9RYZx0VDDbtWyjw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.901.0.tgz", + "integrity": "sha512-7F0N888qVLHo4CSQOsnkZ4QAp8uHLKJ4v3u09Ly5k4AEStrSlFpckTPyUx6elwGL+fxGjNE2aakK8vEgzzCV0A==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "@smithy/util-config-provider": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-config-provider": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/token-providers": { + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.901.0.tgz", + "integrity": "sha512-pJEr1Ggbc/uVTDqp9IbNu9hdr0eQf3yZix3s4Nnyvmg4xmJSGAlbPC9LrNr5u3CDZoc8Z9CuLrvbP4MwYquNpQ==", + "dev": true, + "dependencies": { + "@aws-sdk/core": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1200,27 +1292,27 @@ } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.821.0.tgz", - "integrity": "sha512-irWZHyM0Jr1xhC+38OuZ7JB6OXMLPZlj48thElpsO1ZSLRkLZx5+I7VV6k3sp2yZ7BYbKz/G2ojSv4wdm7XTLw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.901.0.tgz", + "integrity": "sha512-Ntb6V/WFI21Ed4PDgL/8NSfoZQQf9xzrwNgiwvnxgAl/KvAvRBgQtqj5gHsDX8Nj2YmJuVoHfH9BGjL9VQ4WNg==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.839.0.tgz", - "integrity": "sha512-MuunkIG1bJVMtTH7MbjXOrhHleU5wjHz5eCAUc6vj7M9rwol71nqjj9b8RLnkO5gsJcKc29Qk8iV6xQuzKWNMw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.901.0.tgz", + "integrity": "sha512-l59KQP5TY7vPVUfEURc7P5BJKuNg1RSsAKBQW7LHLECXjLqDUbo2SMLrexLBEoArSt6E8QOrIN0C8z/0Xk0jYw==", "dev": true, "dependencies": { - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1235,182 +1327,150 @@ } } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", + "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/types": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dev": true, "dependencies": { - "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dev": true, + "node_modules/@aws-sdk/client-s3": { + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.901.0.tgz", + "integrity": "sha512-wyKhZ51ur1tFuguZ6PgrUsot9KopqD0Tmxw8O8P/N3suQDxFPr0Yo7Y77ezDRDZQ95Ml3C0jlvx79HCo8VxdWA==", "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-crypto/sha1-browser": "5.2.0", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/credential-provider-node": "3.901.0", + "@aws-sdk/middleware-bucket-endpoint": "3.901.0", + "@aws-sdk/middleware-expect-continue": "3.901.0", + "@aws-sdk/middleware-flexible-checksums": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-location-constraint": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-sdk-s3": "3.901.0", + "@aws-sdk/middleware-ssec": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/signature-v4-multi-region": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@aws-sdk/xml-builder": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/eventstream-serde-browser": "^4.2.0", + "@smithy/eventstream-serde-config-resolver": "^4.3.0", + "@smithy/eventstream-serde-node": "^4.2.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-blob-browser": "^4.2.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/hash-stream-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/md5-js": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-stream": "^4.4.0", + "@smithy/util-utf8": "^4.2.0", + "@smithy/util-waiter": "^4.2.0", + "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "dev": true, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso": { + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.901.0.tgz", + "integrity": "sha512-sGyDjjkJ7ppaE+bAKL/Q5IvVCxtoyBIzN+7+hWTS/mUxWJ9EOq9238IqmVIIK6sYNIzEf9yhobfMARasPYVTNg==", "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-s3": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-s3/-/client-s3-3.839.0.tgz", - "integrity": "sha512-7zDInY+qltKxeG+9d/97nbs+FWINcAi5bChBrleUQkuQ/dA9pSP1URo/6JlVzD2Ejvksm+hVK6z3VUWZaIAVOw==", + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/core": { + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.901.0.tgz", + "integrity": "sha512-brKAc3y64tdhyuEf+OPIUln86bRTqkLgb9xkd6kUdIeA5+qmp/N6amItQz+RN4k4O3kqkCPYnAd3LonTKluobw==", "dependencies": { - "@aws-crypto/sha1-browser": "5.2.0", - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/credential-provider-node": "3.839.0", - "@aws-sdk/middleware-bucket-endpoint": "3.830.0", - "@aws-sdk/middleware-expect-continue": "3.821.0", - "@aws-sdk/middleware-flexible-checksums": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-location-constraint": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-sdk-s3": "3.839.0", - "@aws-sdk/middleware-ssec": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/signature-v4-multi-region": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@aws-sdk/xml-builder": "3.821.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/eventstream-serde-browser": "^4.0.4", - "@smithy/eventstream-serde-config-resolver": "^4.1.2", - "@smithy/eventstream-serde-node": "^4.0.4", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-blob-browser": "^4.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/hash-stream-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/md5-js": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-stream": "^4.2.2", - "@smithy/util-utf8": "^4.0.0", - "@smithy/util-waiter": "^4.0.6", - "@types/uuid": "^9.0.1", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/client-sso": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.839.0.tgz", - "integrity": "sha512-AZABysUhbfcwXVlMo97/vwHgsfJNF81wypCAowpqAJkSjP2KrqsqHpb71/RoR2w8JGmEnBBXRD4wIxDhnmifWg==", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/core": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.839.0.tgz", - "integrity": "sha512-KdwL5RaK7eUIlOpdOoZ5u+2t4X1rdX/MTZgz3IV/aBzjVUoGsp+uUnbyqXomLQSUitPHp72EE/NHDsvWW/IHvQ==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@aws-sdk/xml-builder": "3.821.0", - "@smithy/core": "^3.6.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/signature-v4": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-utf8": "^4.0.0", - "fast-xml-parser": "4.4.1", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/xml-builder": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/signature-v4": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -1418,14 +1478,14 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.839.0.tgz", - "integrity": "sha512-cWTadewPPz1OvObZJB+olrgh8VwcgIVcT293ZUT9V0CMF0UU7QaPwJP7uNXcNxltTh+sk1yhjH4UlcnJigZZbA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.901.0.tgz", + "integrity": "sha512-5hAdVl3tBuARh3zX5MLJ1P/d+Kr5kXtDU3xm1pxUEF4xt2XkEEpwiX5fbkNkz2rbh3BCt2gOHsAbh6b3M7n+DA==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1433,19 +1493,19 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-http": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.839.0.tgz", - "integrity": "sha512-fv0BZwrDhWDju4D1MCLT4I2aPjr0dVQ6P+MpqvcGNOA41Oa9UdRhYTV5iuy5NLXzIzoCmnS+XfSq5Kbsf6//xw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.901.0.tgz", + "integrity": "sha512-Ggr7+0M6QZEsrqRkK7iyJLf4LkIAacAxHz9c4dm9hnDdU7vqrlJm6g73IxMJXWN1bIV7IxfpzB11DsRrB/oNjQ==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-stream": "^4.4.0", "tslib": "^2.6.2" }, "engines": { @@ -1453,22 +1513,22 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.839.0.tgz", - "integrity": "sha512-GHm0hF4CiDxIDR7TauMaA6iI55uuSqRxMBcqTAHaTPm6+h1A+MS+ysQMxZ+Jvwtoy8WmfTIGrJVxSCw0sK2hvA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.901.0.tgz", + "integrity": "sha512-zxadcDS0hNJgv8n4hFYJNOXyfjaNE1vvqIiF/JzZSQpSSYXzCd+WxXef5bQh+W3giDtRUmkvP5JLbamEFjZKyw==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/credential-provider-env": "3.839.0", - "@aws-sdk/credential-provider-http": "3.839.0", - "@aws-sdk/credential-provider-process": "3.839.0", - "@aws-sdk/credential-provider-sso": "3.839.0", - "@aws-sdk/credential-provider-web-identity": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/credential-provider-env": "3.901.0", + "@aws-sdk/credential-provider-http": "3.901.0", + "@aws-sdk/credential-provider-process": "3.901.0", + "@aws-sdk/credential-provider-sso": "3.901.0", + "@aws-sdk/credential-provider-web-identity": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1476,21 +1536,21 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.839.0.tgz", - "integrity": "sha512-7bR+U2h+ft0V8chyeu9Bh/pvau4ZkQMeRt5f0dAULoepZQ77QQVRP4H04yJPTg9DCtqbVULQ3uf5YOp1/08vQw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.901.0.tgz", + "integrity": "sha512-dPuFzMF7L1s/lQyT3wDxqLe82PyTH+5o1jdfseTEln64LJMl0ZMWaKX/C1UFNDxaTd35Cgt1bDbjjAWHMiKSFQ==", "dependencies": { - "@aws-sdk/credential-provider-env": "3.839.0", - "@aws-sdk/credential-provider-http": "3.839.0", - "@aws-sdk/credential-provider-ini": "3.839.0", - "@aws-sdk/credential-provider-process": "3.839.0", - "@aws-sdk/credential-provider-sso": "3.839.0", - "@aws-sdk/credential-provider-web-identity": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/credential-provider-env": "3.901.0", + "@aws-sdk/credential-provider-http": "3.901.0", + "@aws-sdk/credential-provider-ini": "3.901.0", + "@aws-sdk/credential-provider-process": "3.901.0", + "@aws-sdk/credential-provider-sso": "3.901.0", + "@aws-sdk/credential-provider-web-identity": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1498,15 +1558,15 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.839.0.tgz", - "integrity": "sha512-qShpekjociUZ+isyQNa0P7jo+0q3N2+0eJDg8SGyP6K6hHTcGfiqxTDps+IKl6NreCPhZCBzyI9mWkP0xSDR6g==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.901.0.tgz", + "integrity": "sha512-/IWgmgM3Cl1wTdJA5HqKMAojxLkYchh5kDuphApxKhupLu6Pu0JBOHU8A5GGeFvOycyaVwosod6zDduINZxe+A==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1514,17 +1574,17 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.839.0.tgz", - "integrity": "sha512-w10zBLHhU8SBQcdrSPMI02haLoRGZg+gP7mH/Er8VhIXfHefbr7o4NirmB0hwdw/YAH8MLlC9jj7c2SJlsNhYA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.901.0.tgz", + "integrity": "sha512-SjmqZQHmqFSET7+6xcZgtH7yEyh5q53LN87GqwYlJZ6KJ5oNw11acUNEhUOL1xTSJEvaWqwTIkS2zqrzLcM9bw==", "dependencies": { - "@aws-sdk/client-sso": "3.839.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/token-providers": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/client-sso": "3.901.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/token-providers": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1532,15 +1592,16 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.839.0.tgz", - "integrity": "sha512-EvqTc7J1kgmiuxknpCp1S60hyMQvmKxsI5uXzQtcogl/N55rxiXEqnCLI5q6p33q91PJegrcMCM5Q17Afhm5qA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.901.0.tgz", + "integrity": "sha512-NYjy/6NLxH9m01+pfpB4ql8QgAorJcu8tw69kzHwUd/ql6wUDTbC7HcXqtKlIwWjzjgj2BKL7j6SyFapgCuafA==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1548,13 +1609,13 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.821.0.tgz", - "integrity": "sha512-xSMR+sopSeWGx5/4pAGhhfMvGBHioVBbqGvDs6pG64xfNwM5vq5s5v6D04e2i+uSTj4qGa71dLUs5I0UzAK3sw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.901.0.tgz", + "integrity": "sha512-yWX7GvRmqBtbNnUW7qbre3GvZmyYwU0WHefpZzDTYDoNgatuYq6LgUIQ+z5C04/kCRoFkAFrHag8a3BXqFzq5A==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1562,12 +1623,12 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-logger": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.821.0.tgz", - "integrity": "sha512-0cvI0ipf2tGx7fXYEEN5fBeZDz2RnHyb9xftSgUsEq7NBxjV0yTZfLJw6Za5rjE6snC80dRN8+bTNR1tuG89zA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.901.0.tgz", + "integrity": "sha512-UoHebjE7el/tfRo8/CQTj91oNUm+5Heus5/a4ECdmWaSCHCS/hXTsU3PTTHAY67oAQR8wBLFPfp3mMvXjB+L2A==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1575,13 +1636,14 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.821.0.tgz", - "integrity": "sha512-efmaifbhBoqKG3bAoEfDdcM8hn1psF+4qa7ykWuYmfmah59JBeqHLfz5W9m9JoTwoKPkFcVLWZxnyZzAnVBOIg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.901.0.tgz", + "integrity": "sha512-Wd2t8qa/4OL0v/oDpCHHYkgsXJr8/ttCxrvCKAt0H1zZe2LlRhY9gpDVKqdertfHrHDj786fOvEQA28G1L75Dg==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@aws/lambda-invoke-store": "^0.0.1", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1589,16 +1651,16 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.839.0.tgz", - "integrity": "sha512-2u74uRM1JWq6Sf7+3YpjejPM9YkomGt4kWhrmooIBEq1k5r2GTbkH7pNCxBQwBueXM21jAGVDxxeClpTx+5hig==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.901.0.tgz", + "integrity": "sha512-Zby4F03fvD9xAgXGPywyk4bC1jCbnyubMEYChLYohD+x20ULQCf+AimF/Btn7YL+hBpzh1+RmqmvZcx+RgwgNQ==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@smithy/core": "^3.6.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1606,47 +1668,47 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/nested-clients": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.839.0.tgz", - "integrity": "sha512-Glic0pg2THYP3aRhJORwJJBe1JLtJoEdWV/MFZNyzCklfMwEzpWtZAyxy+tQyFmMeW50uBAnh2R0jhMMcf257w==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.901.0.tgz", + "integrity": "sha512-feAAAMsVwctk2Tms40ONybvpfJPLCmSdI+G+OTrNpizkGLNl6ik2Ng2RzxY6UqOfN8abqKP/DOUj1qYDRDG8ag==", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -1654,15 +1716,32 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/region-config-resolver": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.821.0.tgz", - "integrity": "sha512-t8og+lRCIIy5nlId0bScNpCkif8sc0LhmtaKsbm0ZPm3sCa/WhCbSZibjbZ28FNjVCV+p0D9RYZx0VDDbtWyjw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.901.0.tgz", + "integrity": "sha512-7F0N888qVLHo4CSQOsnkZ4QAp8uHLKJ4v3u09Ly5k4AEStrSlFpckTPyUx6elwGL+fxGjNE2aakK8vEgzzCV0A==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "@smithy/util-config-provider": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-config-provider": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/token-providers": { + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.901.0.tgz", + "integrity": "sha512-pJEr1Ggbc/uVTDqp9IbNu9hdr0eQf3yZix3s4Nnyvmg4xmJSGAlbPC9LrNr5u3CDZoc8Z9CuLrvbP4MwYquNpQ==", + "dependencies": { + "@aws-sdk/core": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1670,25 +1749,25 @@ } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.821.0.tgz", - "integrity": "sha512-irWZHyM0Jr1xhC+38OuZ7JB6OXMLPZlj48thElpsO1ZSLRkLZx5+I7VV6k3sp2yZ7BYbKz/G2ojSv4wdm7XTLw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.901.0.tgz", + "integrity": "sha512-Ntb6V/WFI21Ed4PDgL/8NSfoZQQf9xzrwNgiwvnxgAl/KvAvRBgQtqj5gHsDX8Nj2YmJuVoHfH9BGjL9VQ4WNg==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "node_modules/@aws-sdk/client-s3/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.839.0.tgz", - "integrity": "sha512-MuunkIG1bJVMtTH7MbjXOrhHleU5wjHz5eCAUc6vj7M9rwol71nqjj9b8RLnkO5gsJcKc29Qk8iV6xQuzKWNMw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.901.0.tgz", + "integrity": "sha512-l59KQP5TY7vPVUfEURc7P5BJKuNg1RSsAKBQW7LHLECXjLqDUbo2SMLrexLBEoArSt6E8QOrIN0C8z/0Xk0jYw==", "dependencies": { - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1703,37 +1782,10 @@ } } }, - "node_modules/@aws-sdk/client-s3/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-s3/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/client-s3/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -1741,18 +1793,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-s3/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@aws-sdk/client-sso": { "version": "3.731.0", "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.731.0.tgz", @@ -1802,48 +1842,48 @@ } }, "node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.839.0.tgz", - "integrity": "sha512-7QnMApYfQBT441YkxObxt1hZ8TdqZH7h0NdYsvbLdEqGROXBDDT+Wq7ZVfsnKjuVUGQ/t75bIqFn7M8cdyESfA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.901.0.tgz", + "integrity": "sha512-b2BJ8WU7hIDkUsaNYK/VX/gTYV9ywN2SXddPcuHvvX8wxb9bfqBz1vNE+30oDh6/SLEjJt8gAVYQGlxpoAGa8g==", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/credential-provider-node": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/credential-provider-node": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -1851,47 +1891,47 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/client-sso": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.839.0.tgz", - "integrity": "sha512-AZABysUhbfcwXVlMo97/vwHgsfJNF81wypCAowpqAJkSjP2KrqsqHpb71/RoR2w8JGmEnBBXRD4wIxDhnmifWg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.901.0.tgz", + "integrity": "sha512-sGyDjjkJ7ppaE+bAKL/Q5IvVCxtoyBIzN+7+hWTS/mUxWJ9EOq9238IqmVIIK6sYNIzEf9yhobfMARasPYVTNg==", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -1899,24 +1939,22 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/core": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.839.0.tgz", - "integrity": "sha512-KdwL5RaK7eUIlOpdOoZ5u+2t4X1rdX/MTZgz3IV/aBzjVUoGsp+uUnbyqXomLQSUitPHp72EE/NHDsvWW/IHvQ==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@aws-sdk/xml-builder": "3.821.0", - "@smithy/core": "^3.6.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/signature-v4": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-utf8": "^4.0.0", - "fast-xml-parser": "4.4.1", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.901.0.tgz", + "integrity": "sha512-brKAc3y64tdhyuEf+OPIUln86bRTqkLgb9xkd6kUdIeA5+qmp/N6amItQz+RN4k4O3kqkCPYnAd3LonTKluobw==", + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@aws-sdk/xml-builder": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/signature-v4": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -1924,14 +1962,14 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.839.0.tgz", - "integrity": "sha512-cWTadewPPz1OvObZJB+olrgh8VwcgIVcT293ZUT9V0CMF0UU7QaPwJP7uNXcNxltTh+sk1yhjH4UlcnJigZZbA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.901.0.tgz", + "integrity": "sha512-5hAdVl3tBuARh3zX5MLJ1P/d+Kr5kXtDU3xm1pxUEF4xt2XkEEpwiX5fbkNkz2rbh3BCt2gOHsAbh6b3M7n+DA==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1939,19 +1977,19 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/credential-provider-http": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.839.0.tgz", - "integrity": "sha512-fv0BZwrDhWDju4D1MCLT4I2aPjr0dVQ6P+MpqvcGNOA41Oa9UdRhYTV5iuy5NLXzIzoCmnS+XfSq5Kbsf6//xw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.901.0.tgz", + "integrity": "sha512-Ggr7+0M6QZEsrqRkK7iyJLf4LkIAacAxHz9c4dm9hnDdU7vqrlJm6g73IxMJXWN1bIV7IxfpzB11DsRrB/oNjQ==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-stream": "^4.4.0", "tslib": "^2.6.2" }, "engines": { @@ -1959,22 +1997,22 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.839.0.tgz", - "integrity": "sha512-GHm0hF4CiDxIDR7TauMaA6iI55uuSqRxMBcqTAHaTPm6+h1A+MS+ysQMxZ+Jvwtoy8WmfTIGrJVxSCw0sK2hvA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.901.0.tgz", + "integrity": "sha512-zxadcDS0hNJgv8n4hFYJNOXyfjaNE1vvqIiF/JzZSQpSSYXzCd+WxXef5bQh+W3giDtRUmkvP5JLbamEFjZKyw==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/credential-provider-env": "3.839.0", - "@aws-sdk/credential-provider-http": "3.839.0", - "@aws-sdk/credential-provider-process": "3.839.0", - "@aws-sdk/credential-provider-sso": "3.839.0", - "@aws-sdk/credential-provider-web-identity": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/credential-provider-env": "3.901.0", + "@aws-sdk/credential-provider-http": "3.901.0", + "@aws-sdk/credential-provider-process": "3.901.0", + "@aws-sdk/credential-provider-sso": "3.901.0", + "@aws-sdk/credential-provider-web-identity": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -1982,21 +2020,21 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.839.0.tgz", - "integrity": "sha512-7bR+U2h+ft0V8chyeu9Bh/pvau4ZkQMeRt5f0dAULoepZQ77QQVRP4H04yJPTg9DCtqbVULQ3uf5YOp1/08vQw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.901.0.tgz", + "integrity": "sha512-dPuFzMF7L1s/lQyT3wDxqLe82PyTH+5o1jdfseTEln64LJMl0ZMWaKX/C1UFNDxaTd35Cgt1bDbjjAWHMiKSFQ==", "dependencies": { - "@aws-sdk/credential-provider-env": "3.839.0", - "@aws-sdk/credential-provider-http": "3.839.0", - "@aws-sdk/credential-provider-ini": "3.839.0", - "@aws-sdk/credential-provider-process": "3.839.0", - "@aws-sdk/credential-provider-sso": "3.839.0", - "@aws-sdk/credential-provider-web-identity": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/credential-provider-env": "3.901.0", + "@aws-sdk/credential-provider-http": "3.901.0", + "@aws-sdk/credential-provider-ini": "3.901.0", + "@aws-sdk/credential-provider-process": "3.901.0", + "@aws-sdk/credential-provider-sso": "3.901.0", + "@aws-sdk/credential-provider-web-identity": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2004,15 +2042,15 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.839.0.tgz", - "integrity": "sha512-qShpekjociUZ+isyQNa0P7jo+0q3N2+0eJDg8SGyP6K6hHTcGfiqxTDps+IKl6NreCPhZCBzyI9mWkP0xSDR6g==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.901.0.tgz", + "integrity": "sha512-/IWgmgM3Cl1wTdJA5HqKMAojxLkYchh5kDuphApxKhupLu6Pu0JBOHU8A5GGeFvOycyaVwosod6zDduINZxe+A==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2020,17 +2058,17 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.839.0.tgz", - "integrity": "sha512-w10zBLHhU8SBQcdrSPMI02haLoRGZg+gP7mH/Er8VhIXfHefbr7o4NirmB0hwdw/YAH8MLlC9jj7c2SJlsNhYA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.901.0.tgz", + "integrity": "sha512-SjmqZQHmqFSET7+6xcZgtH7yEyh5q53LN87GqwYlJZ6KJ5oNw11acUNEhUOL1xTSJEvaWqwTIkS2zqrzLcM9bw==", "dependencies": { - "@aws-sdk/client-sso": "3.839.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/token-providers": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/client-sso": "3.901.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/token-providers": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2038,15 +2076,16 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.839.0.tgz", - "integrity": "sha512-EvqTc7J1kgmiuxknpCp1S60hyMQvmKxsI5uXzQtcogl/N55rxiXEqnCLI5q6p33q91PJegrcMCM5Q17Afhm5qA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.901.0.tgz", + "integrity": "sha512-NYjy/6NLxH9m01+pfpB4ql8QgAorJcu8tw69kzHwUd/ql6wUDTbC7HcXqtKlIwWjzjgj2BKL7j6SyFapgCuafA==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2054,13 +2093,13 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.821.0.tgz", - "integrity": "sha512-xSMR+sopSeWGx5/4pAGhhfMvGBHioVBbqGvDs6pG64xfNwM5vq5s5v6D04e2i+uSTj4qGa71dLUs5I0UzAK3sw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.901.0.tgz", + "integrity": "sha512-yWX7GvRmqBtbNnUW7qbre3GvZmyYwU0WHefpZzDTYDoNgatuYq6LgUIQ+z5C04/kCRoFkAFrHag8a3BXqFzq5A==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2068,12 +2107,12 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/middleware-logger": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.821.0.tgz", - "integrity": "sha512-0cvI0ipf2tGx7fXYEEN5fBeZDz2RnHyb9xftSgUsEq7NBxjV0yTZfLJw6Za5rjE6snC80dRN8+bTNR1tuG89zA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.901.0.tgz", + "integrity": "sha512-UoHebjE7el/tfRo8/CQTj91oNUm+5Heus5/a4ECdmWaSCHCS/hXTsU3PTTHAY67oAQR8wBLFPfp3mMvXjB+L2A==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2081,13 +2120,14 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.821.0.tgz", - "integrity": "sha512-efmaifbhBoqKG3bAoEfDdcM8hn1psF+4qa7ykWuYmfmah59JBeqHLfz5W9m9JoTwoKPkFcVLWZxnyZzAnVBOIg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.901.0.tgz", + "integrity": "sha512-Wd2t8qa/4OL0v/oDpCHHYkgsXJr8/ttCxrvCKAt0H1zZe2LlRhY9gpDVKqdertfHrHDj786fOvEQA28G1L75Dg==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@aws/lambda-invoke-store": "^0.0.1", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2095,16 +2135,16 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.839.0.tgz", - "integrity": "sha512-2u74uRM1JWq6Sf7+3YpjejPM9YkomGt4kWhrmooIBEq1k5r2GTbkH7pNCxBQwBueXM21jAGVDxxeClpTx+5hig==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.901.0.tgz", + "integrity": "sha512-Zby4F03fvD9xAgXGPywyk4bC1jCbnyubMEYChLYohD+x20ULQCf+AimF/Btn7YL+hBpzh1+RmqmvZcx+RgwgNQ==", "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@smithy/core": "^3.6.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2112,47 +2152,47 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/nested-clients": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.839.0.tgz", - "integrity": "sha512-Glic0pg2THYP3aRhJORwJJBe1JLtJoEdWV/MFZNyzCklfMwEzpWtZAyxy+tQyFmMeW50uBAnh2R0jhMMcf257w==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.901.0.tgz", + "integrity": "sha512-feAAAMsVwctk2Tms40ONybvpfJPLCmSdI+G+OTrNpizkGLNl6ik2Ng2RzxY6UqOfN8abqKP/DOUj1qYDRDG8ag==", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -2160,15 +2200,32 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/region-config-resolver": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.821.0.tgz", - "integrity": "sha512-t8og+lRCIIy5nlId0bScNpCkif8sc0LhmtaKsbm0ZPm3sCa/WhCbSZibjbZ28FNjVCV+p0D9RYZx0VDDbtWyjw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.901.0.tgz", + "integrity": "sha512-7F0N888qVLHo4CSQOsnkZ4QAp8uHLKJ4v3u09Ly5k4AEStrSlFpckTPyUx6elwGL+fxGjNE2aakK8vEgzzCV0A==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "@smithy/util-config-provider": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-config-provider": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/token-providers": { + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.901.0.tgz", + "integrity": "sha512-pJEr1Ggbc/uVTDqp9IbNu9hdr0eQf3yZix3s4Nnyvmg4xmJSGAlbPC9LrNr5u3CDZoc8Z9CuLrvbP4MwYquNpQ==", + "dependencies": { + "@aws-sdk/core": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2176,25 +2233,25 @@ } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.821.0.tgz", - "integrity": "sha512-irWZHyM0Jr1xhC+38OuZ7JB6OXMLPZlj48thElpsO1ZSLRkLZx5+I7VV6k3sp2yZ7BYbKz/G2ojSv4wdm7XTLw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.901.0.tgz", + "integrity": "sha512-Ntb6V/WFI21Ed4PDgL/8NSfoZQQf9xzrwNgiwvnxgAl/KvAvRBgQtqj5gHsDX8Nj2YmJuVoHfH9BGjL9VQ4WNg==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.839.0.tgz", - "integrity": "sha512-MuunkIG1bJVMtTH7MbjXOrhHleU5wjHz5eCAUc6vj7M9rwol71nqjj9b8RLnkO5gsJcKc29Qk8iV6xQuzKWNMw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.901.0.tgz", + "integrity": "sha512-l59KQP5TY7vPVUfEURc7P5BJKuNg1RSsAKBQW7LHLECXjLqDUbo2SMLrexLBEoArSt6E8QOrIN0C8z/0Xk0jYw==", "dependencies": { - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2209,37 +2266,10 @@ } } }, - "node_modules/@aws-sdk/client-sso-oidc/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/client-sso-oidc/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -2273,44 +2303,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/core": { "version": "3.731.0", "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.731.0.tgz", @@ -2345,15 +2337,15 @@ } }, "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.839.0.tgz", - "integrity": "sha512-dXJsdSEVzG+8nIihqVnWzyW8Dc41kNKZEXYguHDb+VM/cIjRSVkaw9jXc+KAvbwcGkEB7BfAuW9VMjxpTR5eAA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.901.0.tgz", + "integrity": "sha512-irVFwiiEC+JRFQTZwI7264LOGXRjqdp3AvmqiEmmZS0+sJsEaF65prCs+nzw6J1WqQ6IZKClKKQsH7x8FfOPrQ==", "dev": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/client-cognito-identity": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2361,9 +2353,9 @@ } }, "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dev": true, "dependencies": { "tslib": "^2.6.2" @@ -2431,44 +2423,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/credential-provider-ini": { "version": "3.731.1", "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.731.1.tgz", @@ -2584,22 +2538,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers": { - "version": "3.731.1", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.731.1.tgz", - "integrity": "sha512-t34GOPwBZsX7zGHjiTXmMHGY3kHM7fLiQ60Jqk0On9P0ASHTDE5U75RgCXboE3u+qEv9wyKyaqMNyMWj9qQlFg==", - "dependencies": { - "@aws-sdk/nested-clients": "3.731.1", - "@aws-sdk/types": "3.731.0", - "@smithy/property-provider": "^4.0.0", - "@smithy/shared-ini-file-loader": "^4.0.0", - "@smithy/types": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/types": { "version": "3.731.0", "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.731.0.tgz", @@ -2641,29 +2579,29 @@ } }, "node_modules/@aws-sdk/credential-providers": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.839.0.tgz", - "integrity": "sha512-hiM7vY2qYAdNT87+Qd3vvfNA+bqhtecsPIduIxkhwispEs9NGcQYtOaG3KQRcHkJBb4kaMYpudVNMXeYUYi2Aw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.901.0.tgz", + "integrity": "sha512-jaJ+sVF9xuBwYiQznjrbDkw2W8/aQijGGdzroDL1mJfwyZA0hj3zfYUion+iWwjYhb0vS0bAyrIHtjtTfA2Qpw==", "dev": true, "dependencies": { - "@aws-sdk/client-cognito-identity": "3.839.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/credential-provider-cognito-identity": "3.839.0", - "@aws-sdk/credential-provider-env": "3.839.0", - "@aws-sdk/credential-provider-http": "3.839.0", - "@aws-sdk/credential-provider-ini": "3.839.0", - "@aws-sdk/credential-provider-node": "3.839.0", - "@aws-sdk/credential-provider-process": "3.839.0", - "@aws-sdk/credential-provider-sso": "3.839.0", - "@aws-sdk/credential-provider-web-identity": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/client-cognito-identity": "3.901.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/credential-provider-cognito-identity": "3.901.0", + "@aws-sdk/credential-provider-env": "3.901.0", + "@aws-sdk/credential-provider-http": "3.901.0", + "@aws-sdk/credential-provider-ini": "3.901.0", + "@aws-sdk/credential-provider-node": "3.901.0", + "@aws-sdk/credential-provider-process": "3.901.0", + "@aws-sdk/credential-provider-sso": "3.901.0", + "@aws-sdk/credential-provider-web-identity": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2671,48 +2609,48 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/client-sso": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.839.0.tgz", - "integrity": "sha512-AZABysUhbfcwXVlMo97/vwHgsfJNF81wypCAowpqAJkSjP2KrqsqHpb71/RoR2w8JGmEnBBXRD4wIxDhnmifWg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.901.0.tgz", + "integrity": "sha512-sGyDjjkJ7ppaE+bAKL/Q5IvVCxtoyBIzN+7+hWTS/mUxWJ9EOq9238IqmVIIK6sYNIzEf9yhobfMARasPYVTNg==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -2720,25 +2658,23 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/core": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.839.0.tgz", - "integrity": "sha512-KdwL5RaK7eUIlOpdOoZ5u+2t4X1rdX/MTZgz3IV/aBzjVUoGsp+uUnbyqXomLQSUitPHp72EE/NHDsvWW/IHvQ==", - "dev": true, - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@aws-sdk/xml-builder": "3.821.0", - "@smithy/core": "^3.6.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/signature-v4": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-utf8": "^4.0.0", - "fast-xml-parser": "4.4.1", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.901.0.tgz", + "integrity": "sha512-brKAc3y64tdhyuEf+OPIUln86bRTqkLgb9xkd6kUdIeA5+qmp/N6amItQz+RN4k4O3kqkCPYnAd3LonTKluobw==", + "dev": true, + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@aws-sdk/xml-builder": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/signature-v4": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -2746,15 +2682,15 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.839.0.tgz", - "integrity": "sha512-cWTadewPPz1OvObZJB+olrgh8VwcgIVcT293ZUT9V0CMF0UU7QaPwJP7uNXcNxltTh+sk1yhjH4UlcnJigZZbA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.901.0.tgz", + "integrity": "sha512-5hAdVl3tBuARh3zX5MLJ1P/d+Kr5kXtDU3xm1pxUEF4xt2XkEEpwiX5fbkNkz2rbh3BCt2gOHsAbh6b3M7n+DA==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2762,20 +2698,20 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-http": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.839.0.tgz", - "integrity": "sha512-fv0BZwrDhWDju4D1MCLT4I2aPjr0dVQ6P+MpqvcGNOA41Oa9UdRhYTV5iuy5NLXzIzoCmnS+XfSq5Kbsf6//xw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.901.0.tgz", + "integrity": "sha512-Ggr7+0M6QZEsrqRkK7iyJLf4LkIAacAxHz9c4dm9hnDdU7vqrlJm6g73IxMJXWN1bIV7IxfpzB11DsRrB/oNjQ==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-stream": "^4.4.0", "tslib": "^2.6.2" }, "engines": { @@ -2783,23 +2719,23 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.839.0.tgz", - "integrity": "sha512-GHm0hF4CiDxIDR7TauMaA6iI55uuSqRxMBcqTAHaTPm6+h1A+MS+ysQMxZ+Jvwtoy8WmfTIGrJVxSCw0sK2hvA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.901.0.tgz", + "integrity": "sha512-zxadcDS0hNJgv8n4hFYJNOXyfjaNE1vvqIiF/JzZSQpSSYXzCd+WxXef5bQh+W3giDtRUmkvP5JLbamEFjZKyw==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/credential-provider-env": "3.839.0", - "@aws-sdk/credential-provider-http": "3.839.0", - "@aws-sdk/credential-provider-process": "3.839.0", - "@aws-sdk/credential-provider-sso": "3.839.0", - "@aws-sdk/credential-provider-web-identity": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/credential-provider-env": "3.901.0", + "@aws-sdk/credential-provider-http": "3.901.0", + "@aws-sdk/credential-provider-process": "3.901.0", + "@aws-sdk/credential-provider-sso": "3.901.0", + "@aws-sdk/credential-provider-web-identity": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2807,22 +2743,22 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.839.0.tgz", - "integrity": "sha512-7bR+U2h+ft0V8chyeu9Bh/pvau4ZkQMeRt5f0dAULoepZQ77QQVRP4H04yJPTg9DCtqbVULQ3uf5YOp1/08vQw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.901.0.tgz", + "integrity": "sha512-dPuFzMF7L1s/lQyT3wDxqLe82PyTH+5o1jdfseTEln64LJMl0ZMWaKX/C1UFNDxaTd35Cgt1bDbjjAWHMiKSFQ==", "dev": true, "dependencies": { - "@aws-sdk/credential-provider-env": "3.839.0", - "@aws-sdk/credential-provider-http": "3.839.0", - "@aws-sdk/credential-provider-ini": "3.839.0", - "@aws-sdk/credential-provider-process": "3.839.0", - "@aws-sdk/credential-provider-sso": "3.839.0", - "@aws-sdk/credential-provider-web-identity": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/credential-provider-env": "3.901.0", + "@aws-sdk/credential-provider-http": "3.901.0", + "@aws-sdk/credential-provider-ini": "3.901.0", + "@aws-sdk/credential-provider-process": "3.901.0", + "@aws-sdk/credential-provider-sso": "3.901.0", + "@aws-sdk/credential-provider-web-identity": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2830,16 +2766,16 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.839.0.tgz", - "integrity": "sha512-qShpekjociUZ+isyQNa0P7jo+0q3N2+0eJDg8SGyP6K6hHTcGfiqxTDps+IKl6NreCPhZCBzyI9mWkP0xSDR6g==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.901.0.tgz", + "integrity": "sha512-/IWgmgM3Cl1wTdJA5HqKMAojxLkYchh5kDuphApxKhupLu6Pu0JBOHU8A5GGeFvOycyaVwosod6zDduINZxe+A==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2847,18 +2783,18 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.839.0.tgz", - "integrity": "sha512-w10zBLHhU8SBQcdrSPMI02haLoRGZg+gP7mH/Er8VhIXfHefbr7o4NirmB0hwdw/YAH8MLlC9jj7c2SJlsNhYA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.901.0.tgz", + "integrity": "sha512-SjmqZQHmqFSET7+6xcZgtH7yEyh5q53LN87GqwYlJZ6KJ5oNw11acUNEhUOL1xTSJEvaWqwTIkS2zqrzLcM9bw==", "dev": true, "dependencies": { - "@aws-sdk/client-sso": "3.839.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/token-providers": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/client-sso": "3.901.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/token-providers": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2866,16 +2802,17 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.839.0.tgz", - "integrity": "sha512-EvqTc7J1kgmiuxknpCp1S60hyMQvmKxsI5uXzQtcogl/N55rxiXEqnCLI5q6p33q91PJegrcMCM5Q17Afhm5qA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.901.0.tgz", + "integrity": "sha512-NYjy/6NLxH9m01+pfpB4ql8QgAorJcu8tw69kzHwUd/ql6wUDTbC7HcXqtKlIwWjzjgj2BKL7j6SyFapgCuafA==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2883,14 +2820,14 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.821.0.tgz", - "integrity": "sha512-xSMR+sopSeWGx5/4pAGhhfMvGBHioVBbqGvDs6pG64xfNwM5vq5s5v6D04e2i+uSTj4qGa71dLUs5I0UzAK3sw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.901.0.tgz", + "integrity": "sha512-yWX7GvRmqBtbNnUW7qbre3GvZmyYwU0WHefpZzDTYDoNgatuYq6LgUIQ+z5C04/kCRoFkAFrHag8a3BXqFzq5A==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2898,13 +2835,13 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-logger": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.821.0.tgz", - "integrity": "sha512-0cvI0ipf2tGx7fXYEEN5fBeZDz2RnHyb9xftSgUsEq7NBxjV0yTZfLJw6Za5rjE6snC80dRN8+bTNR1tuG89zA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.901.0.tgz", + "integrity": "sha512-UoHebjE7el/tfRo8/CQTj91oNUm+5Heus5/a4ECdmWaSCHCS/hXTsU3PTTHAY67oAQR8wBLFPfp3mMvXjB+L2A==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2912,14 +2849,15 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.821.0.tgz", - "integrity": "sha512-efmaifbhBoqKG3bAoEfDdcM8hn1psF+4qa7ykWuYmfmah59JBeqHLfz5W9m9JoTwoKPkFcVLWZxnyZzAnVBOIg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.901.0.tgz", + "integrity": "sha512-Wd2t8qa/4OL0v/oDpCHHYkgsXJr8/ttCxrvCKAt0H1zZe2LlRhY9gpDVKqdertfHrHDj786fOvEQA28G1L75Dg==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@aws/lambda-invoke-store": "^0.0.1", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2927,17 +2865,17 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.839.0.tgz", - "integrity": "sha512-2u74uRM1JWq6Sf7+3YpjejPM9YkomGt4kWhrmooIBEq1k5r2GTbkH7pNCxBQwBueXM21jAGVDxxeClpTx+5hig==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.901.0.tgz", + "integrity": "sha512-Zby4F03fvD9xAgXGPywyk4bC1jCbnyubMEYChLYohD+x20ULQCf+AimF/Btn7YL+hBpzh1+RmqmvZcx+RgwgNQ==", "dev": true, "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@smithy/core": "^3.6.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -2945,48 +2883,48 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/nested-clients": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.839.0.tgz", - "integrity": "sha512-Glic0pg2THYP3aRhJORwJJBe1JLtJoEdWV/MFZNyzCklfMwEzpWtZAyxy+tQyFmMeW50uBAnh2R0jhMMcf257w==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.901.0.tgz", + "integrity": "sha512-feAAAMsVwctk2Tms40ONybvpfJPLCmSdI+G+OTrNpizkGLNl6ik2Ng2RzxY6UqOfN8abqKP/DOUj1qYDRDG8ag==", "dev": true, "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -2994,16 +2932,34 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/region-config-resolver": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.821.0.tgz", - "integrity": "sha512-t8og+lRCIIy5nlId0bScNpCkif8sc0LhmtaKsbm0ZPm3sCa/WhCbSZibjbZ28FNjVCV+p0D9RYZx0VDDbtWyjw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.901.0.tgz", + "integrity": "sha512-7F0N888qVLHo4CSQOsnkZ4QAp8uHLKJ4v3u09Ly5k4AEStrSlFpckTPyUx6elwGL+fxGjNE2aakK8vEgzzCV0A==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "@smithy/util-config-provider": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-config-provider": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/token-providers": { + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.901.0.tgz", + "integrity": "sha512-pJEr1Ggbc/uVTDqp9IbNu9hdr0eQf3yZix3s4Nnyvmg4xmJSGAlbPC9LrNr5u3CDZoc8Z9CuLrvbP4MwYquNpQ==", + "dev": true, + "dependencies": { + "@aws-sdk/core": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3011,27 +2967,27 @@ } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.821.0.tgz", - "integrity": "sha512-irWZHyM0Jr1xhC+38OuZ7JB6OXMLPZlj48thElpsO1ZSLRkLZx5+I7VV6k3sp2yZ7BYbKz/G2ojSv4wdm7XTLw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.901.0.tgz", + "integrity": "sha512-Ntb6V/WFI21Ed4PDgL/8NSfoZQQf9xzrwNgiwvnxgAl/KvAvRBgQtqj5gHsDX8Nj2YmJuVoHfH9BGjL9VQ4WNg==", "dev": true, "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.839.0.tgz", - "integrity": "sha512-MuunkIG1bJVMtTH7MbjXOrhHleU5wjHz5eCAUc6vj7M9rwol71nqjj9b8RLnkO5gsJcKc29Qk8iV6xQuzKWNMw==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.901.0.tgz", + "integrity": "sha512-l59KQP5TY7vPVUfEURc7P5BJKuNg1RSsAKBQW7LHLECXjLqDUbo2SMLrexLBEoArSt6E8QOrIN0C8z/0Xk0jYw==", "dev": true, "dependencies": { - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3046,39 +3002,10 @@ } } }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dev": true, - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dev": true, - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dev": true, "dependencies": { "tslib": "^2.6.2" @@ -3088,16 +3015,16 @@ } }, "node_modules/@aws-sdk/middleware-bucket-endpoint": { - "version": "3.830.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.830.0.tgz", - "integrity": "sha512-ElVeCReZSH5Ds+/pkL5ebneJjuo8f49e9JXV1cYizuH0OAOQfYaBU9+M+7+rn61pTttOFE8W//qKzrXBBJhfMg==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-arn-parser": "3.804.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-config-provider": "^4.0.0", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-bucket-endpoint/-/middleware-bucket-endpoint-3.901.0.tgz", + "integrity": "sha512-mPF3N6eZlVs9G8aBSzvtoxR1RZqMo1aIwR+X8BAZSkhfj55fVF2no4IfPXfdFO3I66N+zEQ8nKoB0uTATWrogQ==", + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-arn-parser": "3.893.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-config-provider": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -3105,9 +3032,9 @@ } }, "node_modules/@aws-sdk/middleware-bucket-endpoint/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3116,13 +3043,13 @@ } }, "node_modules/@aws-sdk/middleware-expect-continue": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.821.0.tgz", - "integrity": "sha512-zAOoSZKe1njOrtynvK6ZORU57YGv5I7KP4+rwOvUN3ZhJbQ7QPf8gKtFUCYAPRMegaXCKF/ADPtDZBAmM+zZ9g==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-expect-continue/-/middleware-expect-continue-3.901.0.tgz", + "integrity": "sha512-bwq9nj6MH38hlJwOY9QXIDwa6lI48UsaZpaXbdD71BljEIRlxDzfB4JaYb+ZNNK7RIAdzsP/K05mJty6KJAQHw==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3130,9 +3057,9 @@ } }, "node_modules/@aws-sdk/middleware-expect-continue/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3141,22 +3068,22 @@ } }, "node_modules/@aws-sdk/middleware-flexible-checksums": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.839.0.tgz", - "integrity": "sha512-2LEuDUviV3wardiHoHCKx0WUvmiK1gBGmnw12aj5f/KKcWOaqnWI2h1K7nDQC/ZARQ1bbMZZ5kvOv5ueuMg1RA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-flexible-checksums/-/middleware-flexible-checksums-3.901.0.tgz", + "integrity": "sha512-63lcKfggVUFyXhE4SsFXShCTCyh7ZHEqXLyYEL4DwX+VWtxutf9t9m3fF0TNUYDE8eEGWiRXhegj8l4FjuW+wA==", "dependencies": { "@aws-crypto/crc32": "5.2.0", "@aws-crypto/crc32c": "5.2.0", "@aws-crypto/util": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/is-array-buffer": "^4.0.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-stream": "^4.2.2", - "@smithy/util-utf8": "^4.0.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/is-array-buffer": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-stream": "^4.4.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -3164,24 +3091,22 @@ } }, "node_modules/@aws-sdk/middleware-flexible-checksums/node_modules/@aws-sdk/core": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.839.0.tgz", - "integrity": "sha512-KdwL5RaK7eUIlOpdOoZ5u+2t4X1rdX/MTZgz3IV/aBzjVUoGsp+uUnbyqXomLQSUitPHp72EE/NHDsvWW/IHvQ==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@aws-sdk/xml-builder": "3.821.0", - "@smithy/core": "^3.6.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/signature-v4": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-utf8": "^4.0.0", - "fast-xml-parser": "4.4.1", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.901.0.tgz", + "integrity": "sha512-brKAc3y64tdhyuEf+OPIUln86bRTqkLgb9xkd6kUdIeA5+qmp/N6amItQz+RN4k4O3kqkCPYnAd3LonTKluobw==", + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@aws-sdk/xml-builder": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/signature-v4": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -3189,9 +3114,9 @@ } }, "node_modules/@aws-sdk/middleware-flexible-checksums/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3226,12 +3151,12 @@ } }, "node_modules/@aws-sdk/middleware-location-constraint": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.821.0.tgz", - "integrity": "sha512-sKrm80k0t3R0on8aA/WhWFoMaAl4yvdk+riotmMElLUpcMcRXAd1+600uFVrxJqZdbrKQ0mjX0PjT68DlkYXLg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-location-constraint/-/middleware-location-constraint-3.901.0.tgz", + "integrity": "sha512-MuCS5R2ngNoYifkVt05CTULvYVWX0dvRT0/Md4jE3a0u0yMygYy31C1zorwfE/SUgAQXyLmUx8ATmPp9PppImQ==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3239,9 +3164,9 @@ } }, "node_modules/@aws-sdk/middleware-location-constraint/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3301,23 +3226,23 @@ } }, "node_modules/@aws-sdk/middleware-sdk-s3": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.839.0.tgz", - "integrity": "sha512-NwprpzJdkuUnUWxoZwKqAcL1/AsrM1YESVpLeL0pW747Vq6rIiUgkuoyQ1fASV9r5mUoWor7iMu8k5ZCisAh7A==", - "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-arn-parser": "3.804.0", - "@smithy/core": "^3.6.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/protocol-http": "^5.1.2", - "@smithy/signature-v4": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-config-provider": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-stream": "^4.2.2", - "@smithy/util-utf8": "^4.0.0", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-sdk-s3/-/middleware-sdk-s3-3.901.0.tgz", + "integrity": "sha512-prgjVC3fDT2VIlmQPiw/cLee8r4frTam9GILRUVQyDdNtshNwV3MiaSCLzzQJjKJlLgnBLNUHJCSmvUVtg+3iA==", + "dependencies": { + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-arn-parser": "3.893.0", + "@smithy/core": "^3.14.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/signature-v4": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-config-provider": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-stream": "^4.4.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -3325,24 +3250,22 @@ } }, "node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@aws-sdk/core": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.839.0.tgz", - "integrity": "sha512-KdwL5RaK7eUIlOpdOoZ5u+2t4X1rdX/MTZgz3IV/aBzjVUoGsp+uUnbyqXomLQSUitPHp72EE/NHDsvWW/IHvQ==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@aws-sdk/xml-builder": "3.821.0", - "@smithy/core": "^3.6.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/signature-v4": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-utf8": "^4.0.0", - "fast-xml-parser": "4.4.1", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.901.0.tgz", + "integrity": "sha512-brKAc3y64tdhyuEf+OPIUln86bRTqkLgb9xkd6kUdIeA5+qmp/N6amItQz+RN4k4O3kqkCPYnAd3LonTKluobw==", + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@aws-sdk/xml-builder": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/signature-v4": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -3350,9 +3273,9 @@ } }, "node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3361,12 +3284,12 @@ } }, "node_modules/@aws-sdk/middleware-ssec": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.821.0.tgz", - "integrity": "sha512-YYi1Hhr2AYiU/24cQc8HIB+SWbQo6FBkMYojVuz/zgrtkFmALxENGF/21OPg7f/QWd+eadZJRxCjmRwh5F2Cxg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-ssec/-/middleware-ssec-3.901.0.tgz", + "integrity": "sha512-YiLLJmA3RvjL38mFLuu8fhTTGWtp2qT24VqpucgfoyziYcTgIQkJJmKi90Xp6R6/3VcArqilyRgM1+x8i/em+Q==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3374,9 +3297,9 @@ } }, "node_modules/@aws-sdk/middleware-ssec/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3501,48 +3424,10 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.731.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.731.0.tgz", - "integrity": "sha512-XlDpRNkDVHF59f07JmkuAidEv//m3hT6/JL85h0l3+zrpaRWhf8n8lVUyAPNq35ZujK8AcorYM+93u7hdWsliQ==", + "node_modules/@aws-sdk/region-config-resolver": { + "version": "3.731.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.731.0.tgz", + "integrity": "sha512-XlDpRNkDVHF59f07JmkuAidEv//m3hT6/JL85h0l3+zrpaRWhf8n8lVUyAPNq35ZujK8AcorYM+93u7hdWsliQ==", "dependencies": { "@aws-sdk/types": "3.731.0", "@smithy/node-config-provider": "^4.0.0", @@ -3568,15 +3453,15 @@ } }, "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.839.0.tgz", - "integrity": "sha512-/O+lh6qXKTMWPcip8ccGL7OgTceUTDmy3wBD22+tPHLeOUSMGUQTZcsmHeDB7vSHLpVY9H6GhOsdes7uQQMUwA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.901.0.tgz", + "integrity": "sha512-2IWxbll/pRucp1WQkHi2W5E2SVPGBvk4Is923H7gpNksbVFws18ItjMM8ZpGm44cJEoy1zR5gjhLFklatpuoOw==", "dependencies": { - "@aws-sdk/middleware-sdk-s3": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/signature-v4": "^5.1.2", - "@smithy/types": "^4.3.1", + "@aws-sdk/middleware-sdk-s3": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/signature-v4": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3584,9 +3469,9 @@ } }, "node_modules/@aws-sdk/signature-v4-multi-region/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3595,235 +3480,27 @@ } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.839.0.tgz", - "integrity": "sha512-2nlafqdSbet/2WtYIoZ7KEGFowFonPBDYlTjrUvwU2yooE10VhvzhLSCTB2aKIVzo2Z2wL5WGFQsqAY5QwK6Bw==", - "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/nested-clients": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/core": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.839.0.tgz", - "integrity": "sha512-KdwL5RaK7eUIlOpdOoZ5u+2t4X1rdX/MTZgz3IV/aBzjVUoGsp+uUnbyqXomLQSUitPHp72EE/NHDsvWW/IHvQ==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@aws-sdk/xml-builder": "3.821.0", - "@smithy/core": "^3.6.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/signature-v4": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-utf8": "^4.0.0", - "fast-xml-parser": "4.4.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/middleware-host-header": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.821.0.tgz", - "integrity": "sha512-xSMR+sopSeWGx5/4pAGhhfMvGBHioVBbqGvDs6pG64xfNwM5vq5s5v6D04e2i+uSTj4qGa71dLUs5I0UzAK3sw==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/middleware-logger": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.821.0.tgz", - "integrity": "sha512-0cvI0ipf2tGx7fXYEEN5fBeZDz2RnHyb9xftSgUsEq7NBxjV0yTZfLJw6Za5rjE6snC80dRN8+bTNR1tuG89zA==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.821.0.tgz", - "integrity": "sha512-efmaifbhBoqKG3bAoEfDdcM8hn1psF+4qa7ykWuYmfmah59JBeqHLfz5W9m9JoTwoKPkFcVLWZxnyZzAnVBOIg==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.839.0.tgz", - "integrity": "sha512-2u74uRM1JWq6Sf7+3YpjejPM9YkomGt4kWhrmooIBEq1k5r2GTbkH7pNCxBQwBueXM21jAGVDxxeClpTx+5hig==", - "dependencies": { - "@aws-sdk/core": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@smithy/core": "^3.6.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/nested-clients": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.839.0.tgz", - "integrity": "sha512-Glic0pg2THYP3aRhJORwJJBe1JLtJoEdWV/MFZNyzCklfMwEzpWtZAyxy+tQyFmMeW50uBAnh2R0jhMMcf257w==", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.839.0", - "@aws-sdk/middleware-host-header": "3.821.0", - "@aws-sdk/middleware-logger": "3.821.0", - "@aws-sdk/middleware-recursion-detection": "3.821.0", - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.828.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.839.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.6.0", - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/hash-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-retry": "^4.1.14", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-body-length-node": "^4.0.0", - "@smithy/util-defaults-mode-browser": "^4.0.21", - "@smithy/util-defaults-mode-node": "^4.0.21", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/region-config-resolver": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.821.0.tgz", - "integrity": "sha512-t8og+lRCIIy5nlId0bScNpCkif8sc0LhmtaKsbm0ZPm3sCa/WhCbSZibjbZ28FNjVCV+p0D9RYZx0VDDbtWyjw==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "@smithy/util-config-provider": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.821.0.tgz", - "integrity": "sha512-irWZHyM0Jr1xhC+38OuZ7JB6OXMLPZlj48thElpsO1ZSLRkLZx5+I7VV6k3sp2yZ7BYbKz/G2ojSv4wdm7XTLw==", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.839.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.839.0.tgz", - "integrity": "sha512-MuunkIG1bJVMtTH7MbjXOrhHleU5wjHz5eCAUc6vj7M9rwol71nqjj9b8RLnkO5gsJcKc29Qk8iV6xQuzKWNMw==", - "dependencies": { - "@aws-sdk/middleware-user-agent": "3.839.0", - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "aws-crt": ">=1.0.0" - }, - "peerDependenciesMeta": { - "aws-crt": { - "optional": true - } - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", + "version": "3.731.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.731.1.tgz", + "integrity": "sha512-t34GOPwBZsX7zGHjiTXmMHGY3kHM7fLiQ60Jqk0On9P0ASHTDE5U75RgCXboE3u+qEv9wyKyaqMNyMWj9qQlFg==", "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", + "@aws-sdk/nested-clients": "3.731.1", + "@aws-sdk/types": "3.731.0", + "@smithy/property-provider": "^4.0.0", + "@smithy/shared-ini-file-loader": "^4.0.0", + "@smithy/types": "^4.0.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/types": { + "version": "3.731.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.731.0.tgz", + "integrity": "sha512-NrdkJg6oOUbXR2r9WvHP408CLyvST8cJfp1/jP9pemtjvjPoh6NukbCtiSFdOOb1eryP02CnqQWItfJC1p2Y/Q==", "dependencies": { + "@smithy/types": "^4.0.0", "tslib": "^2.6.2" }, "engines": { @@ -3831,11 +3508,11 @@ } }, "node_modules/@aws-sdk/types": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.821.0.tgz", - "integrity": "sha512-Znroqdai1a90TlxGaJ+FK1lwC0fHpo97Xjsp5UKGR5JODYm7f9+/fF17ebO1KdoBr/Rm0UIFiF5VmI8ts9F1eA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.901.0.tgz", + "integrity": "sha512-FfEM25hLEs4LoXsLXQ/q6X6L4JmKkKkbVFpKD4mwfVHtRVQG6QxJiCPcrkcPISquiy6esbwK2eh64TWbiD60cg==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -3843,9 +3520,9 @@ } }, "node_modules/@aws-sdk/types/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3854,9 +3531,9 @@ } }, "node_modules/@aws-sdk/util-arn-parser": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.804.0.tgz", - "integrity": "sha512-wmBJqn1DRXnZu3b4EkE6CWnoWMo1ZMvlfkqU5zPz67xx1GMaXlDCchFvKAXMjk4jn/L1O3tKnoFDNsoLV1kgNQ==", + "version": "3.893.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-arn-parser/-/util-arn-parser-3.893.0.tgz", + "integrity": "sha512-u8H4f2Zsi19DGnwj5FSZzDMhytYF/bCh37vAtBsn3cNDL3YG578X5oc+wSX54pM3tOxS+NY7tvOAo52SW7koUA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3865,13 +3542,14 @@ } }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.828.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.828.0.tgz", - "integrity": "sha512-RvKch111SblqdkPzg3oCIdlGxlQs+k+P7Etory9FmxPHyPDvsP1j1c74PmgYqtzzMWmoXTjd+c9naUHh9xG8xg==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.901.0.tgz", + "integrity": "sha512-5nZP3hGA8FHEtKvEQf4Aww5QZOkjLW1Z+NixSd+0XKfHvA39Ah5sZboScjLx0C9kti/K3OGW1RCx5K9Zc3bZqg==", "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "@smithy/util-endpoints": "^3.0.6", + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", "tslib": "^2.6.2" }, "engines": { @@ -3879,9 +3557,9 @@ } }, "node_modules/@aws-sdk/util-endpoints/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -3890,9 +3568,9 @@ } }, "node_modules/@aws-sdk/util-locate-window": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.804.0.tgz", - "integrity": "sha512-zVoRfpmBVPodYlnMjgVjfGoEZagyRF5IPn3Uo6ZvOZp24chnW/FRstH7ESDHDDRga4z3V+ElUQHKpFDXWyBW5A==", + "version": "3.893.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.893.0.tgz", + "integrity": "sha512-T89pFfgat6c8nMmpI8eKjBcDcgJq36+m9oiXbcUzeU55MP9ZuGgBomGjGnHaEyF36jenW9gmg3NfZDm0AO2XPg==", "dependencies": { "tslib": "^2.6.2" }, @@ -3992,11 +3670,12 @@ } }, "node_modules/@aws-sdk/xml-builder": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.821.0.tgz", - "integrity": "sha512-DIIotRnefVL6DiaHtO6/21DhJ4JZnnIwdNbpwiAhdt/AVbttcE4yw925gsjur0OGv5BTYXQXU3YnANBYnZjuQA==", + "version": "3.901.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.901.0.tgz", + "integrity": "sha512-pxFCkuAP7Q94wMTNPAwi6hEtNrp/BdFf+HOrIEeFQsk4EoOmpKY3I6S+u6A9Wg295J80Kh74LqDWM22ux3z6Aw==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", + "fast-xml-parser": "5.2.5", "tslib": "^2.6.2" }, "engines": { @@ -4004,9 +3683,9 @@ } }, "node_modules/@aws-sdk/xml-builder/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -4014,17 +3693,44 @@ "node": ">=18.0.0" } }, + "node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser": { + "version": "5.2.5", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.5.tgz", + "integrity": "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "dependencies": { + "strnum": "^2.1.0" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/@aws-sdk/xml-builder/node_modules/strnum": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", + "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ] + }, "node_modules/@aws/chat-client": { "resolved": "chat-client", "link": true }, "node_modules/@aws/chat-client-ui-types": { - "version": "0.1.56", - "resolved": "https://registry.npmjs.org/@aws/chat-client-ui-types/-/chat-client-ui-types-0.1.56.tgz", - "integrity": "sha512-5FAFyzo0KzqnVBbZuhN4drCmLnREbb4IpAzb/OS8omNLf1/yUsP89DBCNoW6WxqFuWSASwaPEffmQOuMT3bWIg==", - "license": "Apache-2.0", + "version": "0.1.63", + "resolved": "https://registry.npmjs.org/@aws/chat-client-ui-types/-/chat-client-ui-types-0.1.63.tgz", + "integrity": "sha512-LTiDodg/9jXJSoTmbPa056zRtKjz4Z4szAb7loZa7J7uOMpJ8ah/MxdpOKltW9PgcZ3F7u7585U5LuNPuoY+2A==", "dependencies": { - "@aws/language-server-runtimes-types": "^0.1.50" + "@aws/language-server-runtimes-types": "^0.1.57" } }, "node_modules/@aws/hello-world-lsp": { @@ -4035,13 +3741,20 @@ "resolved": "app/hello-world-lsp-runtimes", "link": true }, + "node_modules/@aws/lambda-invoke-store": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.0.1.tgz", + "integrity": "sha512-ORHRQ2tmvnBXc8t/X9Z8IcSbBA4xTLKuN873FopzklHMeqBst7YG0d+AX97inkvDX+NChYtSr+qGfcqGFaI8Zw==", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@aws/language-server-runtimes": { - "version": "0.2.123", - "resolved": "https://registry.npmjs.org/@aws/language-server-runtimes/-/language-server-runtimes-0.2.123.tgz", - "integrity": "sha512-gxjnBcQY+HR9+F1NXQUEQ6ikJhrLMJEbrpIxlBLILtQ75hVtRDsfGET3KW5Nn0dgbrQTx6VqwvXDfolUkmi06g==", - "license": "Apache-2.0", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@aws/language-server-runtimes/-/language-server-runtimes-0.3.1.tgz", + "integrity": "sha512-Ttn7r/xwP0Q2c4nquRJYEDuwvd8N1DUsrFuaq9zstuj3Y1G4WD9hBV773CaGuqgEdqE5+n2hyeOxfkwTAbzddg==", "dependencies": { - "@aws/language-server-runtimes-types": "^0.1.55", + "@aws/language-server-runtimes-types": "^0.1.57", "@opentelemetry/api": "^1.9.0", "@opentelemetry/api-logs": "^0.200.0", "@opentelemetry/core": "^2.0.0", @@ -4052,7 +3765,6 @@ "@opentelemetry/sdk-metrics": "^2.0.1", "@smithy/node-http-handler": "^4.0.4", "ajv": "^8.17.1", - "aws-sdk": "^2.1692.0", "hpagent": "^1.2.0", "jose": "^5.9.6", "mac-ca": "^3.1.1", @@ -4068,53 +3780,14 @@ } }, "node_modules/@aws/language-server-runtimes-types": { - "version": "0.1.55", - "resolved": "https://registry.npmjs.org/@aws/language-server-runtimes-types/-/language-server-runtimes-types-0.1.55.tgz", - "integrity": "sha512-KRy3fTCNGvAQxA4amTODXPuubxrYlqKsyJOXPaIn+YDACwJa7shrOryHg6xrib6uHAHT2fEkcTMk9TT4MRPxQA==", - "license": "Apache-2.0", + "version": "0.1.57", + "resolved": "https://registry.npmjs.org/@aws/language-server-runtimes-types/-/language-server-runtimes-types-0.1.57.tgz", + "integrity": "sha512-Poy8BW4njSBt6jf3ATnc3YRZQTFnNvFcYs/wcCAvPj314XRdDCS731y3EESVVdXfXlTIqLZrnHsvQgtbNm59Tw==", "dependencies": { "vscode-languageserver-textdocument": "^1.0.12", "vscode-languageserver-types": "^3.17.5" } }, - "node_modules/@aws/language-server-runtimes/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws/language-server-runtimes/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws/language-server-runtimes/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws/lsp-antlr4": { "resolved": "server/aws-lsp-antlr4", "link": true @@ -4204,11 +3877,10 @@ "link": true }, "node_modules/@aws/mynah-ui": { - "version": "4.36.4", - "resolved": "https://registry.npmjs.org/@aws/mynah-ui/-/mynah-ui-4.36.4.tgz", - "integrity": "sha512-vGW4wlNindpr2Ep9x3iuKbrZTXe5KrE8vWpg15DjkN3qK42KMuMEQ67Pqtfgl5EseNYC1ukZm4HIQIMmt+vevA==", + "version": "4.36.8", + "resolved": "https://registry.npmjs.org/@aws/mynah-ui/-/mynah-ui-4.36.8.tgz", + "integrity": "sha512-1IDUjzX42ASOuf6DD+uv/MYlIB50U0wZxX3Rqpc0aR4KFHpoX5mUIwGvqS/uHj42aySFN2QL+T6vUEvD0l6v1A==", "hasInstallScript": true, - "license": "Apache License 2.0", "dependencies": { "escape-html": "^1.0.3", "highlight.js": "^11.11.0", @@ -4245,30 +3917,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.7.tgz", - "integrity": "sha512-xgu/ySj2mTiUFmdE9yCMfBxLp4DHd5DwmbbD05YAuICfodYT3VvRxbrh81LGQ/8UpSdtMdfKMn3KouYDX59DGQ==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.28.4.tgz", + "integrity": "sha512-YsmSKC29MJwf0gF8Rjjrg5LQCmyh+j/nD8/eP7f+BeoQTKYqs9RoWbjGOdy0+1Ekr68RJZMUOPVQaQisnIo4Rw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.27.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.7.tgz", - "integrity": "sha512-BU2f9tlKQ5CAthiMIgpzAh4eDTLWo1mqi9jqE2OxMG0E/OM199VJt2q8BztTxpnSW0i1ymdwLXRJnYzvDM5r2w==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.4.tgz", + "integrity": "sha512-2BCOP7TN8M+gVDj7/ht3hsaO/B/n5oDbiAyyvnRlNOs+u1o+JWNYTQrmpuNp1/Wq2gcFrI01JAW+paEKDMx/CA==", "dev": true, "dependencies": { - "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.5", + "@babel/generator": "^7.28.3", "@babel/helper-compilation-targets": "^7.27.2", - "@babel/helper-module-transforms": "^7.27.3", - "@babel/helpers": "^7.27.6", - "@babel/parser": "^7.27.7", + "@babel/helper-module-transforms": "^7.28.3", + "@babel/helpers": "^7.28.4", + "@babel/parser": "^7.28.4", "@babel/template": "^7.27.2", - "@babel/traverse": "^7.27.7", - "@babel/types": "^7.27.7", + "@babel/traverse": "^7.28.4", + "@babel/types": "^7.28.4", + "@jridgewell/remapping": "^2.3.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -4283,22 +3955,41 @@ "url": "https://opencollective.com/babel" } }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/@babel/generator": { - "version": "7.27.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", - "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.28.3.tgz", + "integrity": "sha512-3lSpxGgvnmZznmBkCRnVREPUFJv2wrv9iAoFDvADJc0ypmdOxdUtcLeBgBJ6zE0PMeTKnxeQzyk0xTBq4Ep7zw==", "dev": true, "dependencies": { - "@babel/parser": "^7.27.5", - "@babel/types": "^7.27.3", - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25", + "@babel/parser": "^7.28.3", + "@babel/types": "^7.28.2", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/@babel/generator/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@babel/helper-compilation-targets": { "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.27.2.tgz", @@ -4315,6 +4006,33 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.28.0.tgz", + "integrity": "sha512-+W6cISkXFa1jXsDEdYA8HeevQT/FULhxzR99pxphltZcVaugps53THCeiWA8SguxxpSp3gKPiuYfSWopkLQ4hw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-module-imports": { "version": "7.27.1", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.27.1.tgz", @@ -4329,14 +4047,14 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", - "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", + "version": "7.28.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.28.3.tgz", + "integrity": "sha512-gytXUbs8k2sXS9PnQptz5o0QnpLL51SwASIORY6XaBKF88nsOT0Zw9szLqlSGQDP/4TljBAD5y98p2U1fqkdsw==", "dev": true, "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.3" + "@babel/traverse": "^7.28.3" }, "engines": { "node": ">=6.9.0" @@ -4382,25 +4100,25 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", - "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.4.tgz", + "integrity": "sha512-HFN59MmQXGHVyYadKLVumYsA9dBFun/ldYxipEjzA4196jpLZd8UjEEBLkbEkvfYreDqJhZxYAWFPtrfhNpj4w==", "dev": true, "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.27.6" + "@babel/types": "^7.28.4" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.7.tgz", - "integrity": "sha512-qnzXzDXdr/po3bOTbTIQZ7+TxNKxpkN5IifVLXS+r7qwynkZfPyjZfE7hCXbo7IoO9TNcSyibgONsf2HauUd3Q==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.28.4.tgz", + "integrity": "sha512-yZbBqeM6TkpP9du/I2pUZnJsRMGGvOuIrhjzC1AwHwW+6he4mni6Bp/m8ijn0iOuZuPI2BfkCoSRunpyjnrQKg==", "dev": true, "dependencies": { - "@babel/types": "^7.27.7" + "@babel/types": "^7.28.4" }, "bin": { "parser": "bin/babel-parser.js" @@ -4647,16 +4365,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/runtime": { - "version": "7.27.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.27.6.tgz", - "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/template": { "version": "7.27.2", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.27.2.tgz", @@ -4672,27 +4380,27 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.7.tgz", - "integrity": "sha512-X6ZlfR/O/s5EQ/SnUSLzr+6kGnkg8HXGMzpgsMsrJVcfDtH1vIp6ctCN4eZ1LS5c0+te5Cb6Y514fASjMRJ1nw==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.28.4.tgz", + "integrity": "sha512-YEzuboP2qvQavAcjgQNVgsvHIDv6ZpwXvcvjmyySP2DIMuByS/6ioU5G9pYrWHM6T2YDfc7xga9iNzYOs12CFQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.5", - "@babel/parser": "^7.27.7", + "@babel/generator": "^7.28.3", + "@babel/helper-globals": "^7.28.0", + "@babel/parser": "^7.28.4", "@babel/template": "^7.27.2", - "@babel/types": "^7.27.7", - "debug": "^4.3.1", - "globals": "^11.1.0" + "@babel/types": "^7.28.4", + "debug": "^4.3.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/types": { - "version": "7.27.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.7.tgz", - "integrity": "sha512-8OLQgDScAOHXnAz2cV+RfzzNMipuLVBz2biuAJFMV9bfkNf393je3VM8CLkjQodW5+iWsSJdSgSWT6rsZoXHPw==", + "version": "7.28.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.28.4.tgz", + "integrity": "sha512-bkFqkLhh3pMBUQQkpVgWDWq/lqzc2678eUyDlTBhRqhCHFguYYGM0Efga7tYk4TogG/3x0EEl66/OQ+WGbWB/Q==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.27.1", @@ -4822,18 +4530,6 @@ "node": ">=v18" } }, - "node_modules/@commitlint/is-ignored/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@commitlint/lint": { "version": "19.8.1", "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-19.8.1.tgz", @@ -4987,20 +4683,10 @@ "node": ">=12" } }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@csstools/color-helpers": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.0.2.tgz", - "integrity": "sha512-JqWH1vsgdGcw2RR6VliXXdA0/59LttzlU8UlRT/iUUsEeWfYq8I+K0yhihEUTTHLRm1EXvpsCx3083EU15ecsA==", + "node_modules/@csstools/color-helpers": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-5.1.0.tgz", + "integrity": "sha512-S11EXWJyy0Mz5SYvRmY8nJYTFFd1LCNV+7cXyAgQtOOuzb4EsgfqDufL+9esx72/eLhsRdGZwaldu/h+E4t4BA==", "dev": true, "funding": [ { @@ -5040,9 +4726,9 @@ } }, "node_modules/@csstools/css-color-parser": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.0.10.tgz", - "integrity": "sha512-TiJ5Ajr6WRd1r8HSiwJvZBiJOqtH86aHpUjq5aEKWHiII2Qfjqd/HCWKPOW8EP4vcspXbHnXrwIDlu5savQipg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-3.1.0.tgz", + "integrity": "sha512-nbtKwh3a6xNVIp/VRuXV64yTKnb1IjTAEEh3irzS+HkKjAOYLTGNb9pmVNntZ8iVBHcWDA2Dof0QtPgFI1BaTA==", "dev": true, "funding": [ { @@ -5055,7 +4741,7 @@ } ], "dependencies": { - "@csstools/color-helpers": "^5.0.2", + "@csstools/color-helpers": "^5.1.0", "@csstools/css-calc": "^2.1.4" }, "engines": { @@ -5117,43 +4803,40 @@ } }, "node_modules/@emnapi/core": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.4.4.tgz", - "integrity": "sha512-A9CnAbC6ARNMKcIcrQwq6HeHCjpcBZ5wSx4U01WXCqEKlrzB9F9315WDNHkrs2xbx7YjjSxbUYxuN6EQzpcY2g==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.5.0.tgz", + "integrity": "sha512-sbP8GzB1WDzacS8fgNPpHlp6C9VZe+SJP3F90W9rLemaQj2PzIuTEl1qDOYQf58YIpyjViI24y9aPWCjEzY2cg==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.0.3", + "@emnapi/wasi-threads": "1.1.0", "tslib": "^2.4.0" } }, "node_modules/@emnapi/runtime": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.4.tgz", - "integrity": "sha512-hHyapA4A3gPaDCNfiqyZUStTMqIkKRshqPIuDOXv1hcBnD4U3l8cP0T1HMCfGRxQ6V64TGCcoswChANyOAwbQg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.5.0.tgz", + "integrity": "sha512-97/BJ3iXHww3djw6hYIfErCZFee7qCtrneuLa20UXFCOTCfBM2cvQHjWJ2EG0s0MtdNwInarqCTz35i4wWXHsQ==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "tslib": "^2.4.0" } }, "node_modules/@emnapi/wasi-threads": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.0.3.tgz", - "integrity": "sha512-8K5IFFsQqF9wQNJptGbS6FNKgUTsSRYnTqNCG1vPP8jFdjSv18n2mQfJpkt2Oibo9iBEzcDnDxNwKTzC7svlJw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.1.0.tgz", + "integrity": "sha512-WI0DdZ8xFSbgMjR1sFsKABJ/C5OnRrjT06JXbZKexJGrDuPTzZdDYfFlsgcCXCyf+suG5QU2e/y1Wo2V/OapLQ==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "tslib": "^2.4.0" } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", - "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.10.tgz", + "integrity": "sha512-0NFWnA+7l41irNuaSVlLfgNT12caWJVLzp5eAVhZ0z1qpxbockccEt3s+149rE64VUI3Ml2zt8Nv5JVc4QXTsw==", "cpu": [ "ppc64" ], @@ -5167,9 +4850,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", - "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.10.tgz", + "integrity": "sha512-dQAxF1dW1C3zpeCDc5KqIYuZ1tgAdRXNoZP7vkBIRtKZPYe2xVr/d3SkirklCHudW1B45tGiUlz2pUWDfbDD4w==", "cpu": [ "arm" ], @@ -5183,9 +4866,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", - "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.10.tgz", + "integrity": "sha512-LSQa7eDahypv/VO6WKohZGPSJDq5OVOo3UoFR1E4t4Gj1W7zEQMUhI+lo81H+DtB+kP+tDgBp+M4oNCwp6kffg==", "cpu": [ "arm64" ], @@ -5199,9 +4882,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", - "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.10.tgz", + "integrity": "sha512-MiC9CWdPrfhibcXwr39p9ha1x0lZJ9KaVfvzA0Wxwz9ETX4v5CHfF09bx935nHlhi+MxhA63dKRRQLiVgSUtEg==", "cpu": [ "x64" ], @@ -5215,9 +4898,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", - "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.10.tgz", + "integrity": "sha512-JC74bdXcQEpW9KkV326WpZZjLguSZ3DfS8wrrvPMHgQOIEIG/sPXEN/V8IssoJhbefLRcRqw6RQH2NnpdprtMA==", "cpu": [ "arm64" ], @@ -5231,9 +4914,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", - "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.10.tgz", + "integrity": "sha512-tguWg1olF6DGqzws97pKZ8G2L7Ig1vjDmGTwcTuYHbuU6TTjJe5FXbgs5C1BBzHbJ2bo1m3WkQDbWO2PvamRcg==", "cpu": [ "x64" ], @@ -5247,9 +4930,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", - "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.10.tgz", + "integrity": "sha512-3ZioSQSg1HT2N05YxeJWYR+Libe3bREVSdWhEEgExWaDtyFbbXWb49QgPvFH8u03vUPX10JhJPcz7s9t9+boWg==", "cpu": [ "arm64" ], @@ -5263,9 +4946,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", - "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.10.tgz", + "integrity": "sha512-LLgJfHJk014Aa4anGDbh8bmI5Lk+QidDmGzuC2D+vP7mv/GeSN+H39zOf7pN5N8p059FcOfs2bVlrRr4SK9WxA==", "cpu": [ "x64" ], @@ -5279,9 +4962,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", - "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.10.tgz", + "integrity": "sha512-oR31GtBTFYCqEBALI9r6WxoU/ZofZl962pouZRTEYECvNF/dtXKku8YXcJkhgK/beU+zedXfIzHijSRapJY3vg==", "cpu": [ "arm" ], @@ -5295,9 +4978,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", - "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.10.tgz", + "integrity": "sha512-5luJWN6YKBsawd5f9i4+c+geYiVEw20FVW5x0v1kEMWNq8UctFjDiMATBxLvmmHA4bf7F6hTRaJgtghFr9iziQ==", "cpu": [ "arm64" ], @@ -5311,9 +4994,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", - "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.10.tgz", + "integrity": "sha512-NrSCx2Kim3EnnWgS4Txn0QGt0Xipoumb6z6sUtl5bOEZIVKhzfyp/Lyw4C1DIYvzeW/5mWYPBFJU3a/8Yr75DQ==", "cpu": [ "ia32" ], @@ -5327,9 +5010,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", - "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.10.tgz", + "integrity": "sha512-xoSphrd4AZda8+rUDDfD9J6FUMjrkTz8itpTITM4/xgerAZZcFW7Dv+sun7333IfKxGG8gAq+3NbfEMJfiY+Eg==", "cpu": [ "loong64" ], @@ -5343,9 +5026,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", - "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.10.tgz", + "integrity": "sha512-ab6eiuCwoMmYDyTnyptoKkVS3k8fy/1Uvq7Dj5czXI6DF2GqD2ToInBI0SHOp5/X1BdZ26RKc5+qjQNGRBelRA==", "cpu": [ "mips64el" ], @@ -5359,9 +5042,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", - "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.10.tgz", + "integrity": "sha512-NLinzzOgZQsGpsTkEbdJTCanwA5/wozN9dSgEl12haXJBzMTpssebuXR42bthOF3z7zXFWH1AmvWunUCkBE4EA==", "cpu": [ "ppc64" ], @@ -5375,9 +5058,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", - "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.10.tgz", + "integrity": "sha512-FE557XdZDrtX8NMIeA8LBJX3dC2M8VGXwfrQWU7LB5SLOajfJIxmSdyL/gU1m64Zs9CBKvm4UAuBp5aJ8OgnrA==", "cpu": [ "riscv64" ], @@ -5391,9 +5074,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", - "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.10.tgz", + "integrity": "sha512-3BBSbgzuB9ajLoVZk0mGu+EHlBwkusRmeNYdqmznmMc9zGASFjSsxgkNsqmXugpPk00gJ0JNKh/97nxmjctdew==", "cpu": [ "s390x" ], @@ -5407,9 +5090,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", - "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.10.tgz", + "integrity": "sha512-QSX81KhFoZGwenVyPoberggdW1nrQZSvfVDAIUXr3WqLRZGZqWk/P4T8p2SP+de2Sr5HPcvjhcJzEiulKgnxtA==", "cpu": [ "x64" ], @@ -5423,9 +5106,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", - "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.10.tgz", + "integrity": "sha512-AKQM3gfYfSW8XRk8DdMCzaLUFB15dTrZfnX8WXQoOUpUBQ+NaAFCP1kPS/ykbbGYz7rxn0WS48/81l9hFl3u4A==", "cpu": [ "arm64" ], @@ -5439,9 +5122,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", - "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.10.tgz", + "integrity": "sha512-7RTytDPGU6fek/hWuN9qQpeGPBZFfB4zZgcz2VK2Z5VpdUxEI8JKYsg3JfO0n/Z1E/6l05n0unDCNc4HnhQGig==", "cpu": [ "x64" ], @@ -5455,9 +5138,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", - "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.10.tgz", + "integrity": "sha512-5Se0VM9Wtq797YFn+dLimf2Zx6McttsH2olUBsDml+lm0GOCRVebRWUvDtkY4BWYv/3NgzS8b/UM3jQNh5hYyw==", "cpu": [ "arm64" ], @@ -5471,9 +5154,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", - "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.10.tgz", + "integrity": "sha512-XkA4frq1TLj4bEMB+2HnI0+4RnjbuGZfet2gs/LNs5Hc7D89ZQBHQ0gL2ND6Lzu1+QVkjp3x1gIcPKzRNP8bXw==", "cpu": [ "x64" ], @@ -5486,10 +5169,26 @@ "node": ">=18" } }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.10.tgz", + "integrity": "sha512-AVTSBhTX8Y/Fz6OmIVBip9tJzZEUcY8WLh7I59+upa5/GPhh2/aM6bvOMQySspnCCHvFi79kMtdJS1w0DXAeag==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", - "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.10.tgz", + "integrity": "sha512-fswk3XT0Uf2pGJmOpDB7yknqhVkJQkAQOcW/ccVOtfx05LkbWOaRAtn5SaqXypeKQra1QaEa841PgrSL9ubSPQ==", "cpu": [ "x64" ], @@ -5503,9 +5202,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", - "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.10.tgz", + "integrity": "sha512-ah+9b59KDTSfpaCg6VdJoOQvKjI33nTaQr4UluQwW7aEwZQsbMCfTmfEO4VyewOxx4RaDT/xCy9ra2GPWmO7Kw==", "cpu": [ "arm64" ], @@ -5519,9 +5218,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", - "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.10.tgz", + "integrity": "sha512-QHPDbKkrGO8/cz9LKVnJU22HOi4pxZnZhhA2HYHez5Pz4JeffhDjf85E57Oyco163GnzNCVkZK0b/n4Y0UHcSw==", "cpu": [ "ia32" ], @@ -5535,9 +5234,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", - "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.10.tgz", + "integrity": "sha512-9KpxSVFCu0iK1owoez6aC/s/EdUQLDN3adTxGCqxMVhrPDj6bt5dbrHDXUuq+Bs2vATFBBrQS5vdQ/Ed2P+nbw==", "cpu": [ "x64" ], @@ -5551,9 +5250,9 @@ } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", - "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, "dependencies": { "eslint-visitor-keys": "^3.4.3" @@ -5626,21 +5325,6 @@ "concat-map": "0.0.1" } }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@eslint/eslintrc/node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -5668,18 +5352,6 @@ "node": "*" } }, - "node_modules/@eslint/eslintrc/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/@eslint/js": { "version": "8.57.1", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", @@ -5760,79 +5432,96 @@ "deprecated": "Use @eslint/object-schema instead", "dev": true }, + "node_modules/@inquirer/ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/ansi/-/ansi-1.0.0.tgz", + "integrity": "sha512-JWaTfCxI1eTmJ1BIv86vUfjVatOdxwD0DAVKYevY8SazeUUZtW+tNbsdejVO1GYE0GXJW1N1ahmiC3TFd+7wZA==", + "dev": true, + "engines": { + "node": ">=18" + } + }, "node_modules/@inquirer/checkbox": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-3.0.1.tgz", - "integrity": "sha512-0hm2nrToWUdD6/UHnel/UKGdk1//ke5zGUpHIvk5ZWmaKezlGxZkOJXNSWsdxO/rEqTkbB3lNC2J6nBElV2aAQ==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-4.2.4.tgz", + "integrity": "sha512-2n9Vgf4HSciFq8ttKXk+qy+GsyTXPV1An6QAwe/8bkbbqvG4VW1I/ZY1pNu2rf+h9bdzMLPbRSfcNxkHBy/Ydw==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/figures": "^1.0.6", - "@inquirer/type": "^2.0.0", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/confirm": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-4.0.1.tgz", - "integrity": "sha512-46yL28o2NJ9doViqOy0VDcoTzng7rAb6yPQKU7VDLqkmbCaH4JqK4yk4XqlzNWy9PVC5pG1ZUXPBQv+VqnYs2w==", + "version": "5.1.18", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-5.1.18.tgz", + "integrity": "sha512-MilmWOzHa3Ks11tzvuAmFoAd/wRuaP3SwlT1IZhyMke31FKLxPiuDWcGXhU+PKveNOpAc4axzAgrgxuIJJRmLw==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/type": "^2.0.0" + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/core": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.2.1.tgz", - "integrity": "sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-10.2.2.tgz", + "integrity": "sha512-yXq/4QUnk4sHMtmbd7irwiepjB8jXU0kkFRL4nr/aDBA2mDz13cMakEWdDwX3eSCTkk03kwcndD1zfRAIlELxA==", "dev": true, "dependencies": { - "@inquirer/figures": "^1.0.6", - "@inquirer/type": "^2.0.0", - "@types/mute-stream": "^0.0.4", - "@types/node": "^22.5.5", - "@types/wrap-ansi": "^3.0.0", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.0", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "cli-width": "^4.1.0", - "mute-stream": "^1.0.0", + "mute-stream": "^2.0.0", "signal-exit": "^4.1.0", - "strip-ansi": "^6.0.1", "wrap-ansi": "^6.2.0", "yoctocolors-cjs": "^2.1.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, - "node_modules/@inquirer/core/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@inquirer/core/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@inquirer/core/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "node_modules/@inquirer/core/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -5862,158 +5551,272 @@ } }, "node_modules/@inquirer/editor": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-3.0.1.tgz", - "integrity": "sha512-VA96GPFaSOVudjKFraokEEmUQg/Lub6OXvbIEZU1SDCmBzRkHGhxoFAVaF30nyiB4m5cEbDgiI2QRacXZ2hw9Q==", + "version": "4.2.20", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-4.2.20.tgz", + "integrity": "sha512-7omh5y5bK672Q+Brk4HBbnHNowOZwrb/78IFXdrEB9PfdxL3GudQyDk8O9vQ188wj3xrEebS2M9n18BjJoI83g==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/type": "^2.0.0", - "external-editor": "^3.1.0" + "@inquirer/core": "^10.2.2", + "@inquirer/external-editor": "^1.0.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/expand": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-3.0.1.tgz", - "integrity": "sha512-ToG8d6RIbnVpbdPdiN7BCxZGiHOTomOX94C2FaT5KOHupV40tKEDozp12res6cMIfRKrXLJyexAZhWVHgbALSQ==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-4.0.20.tgz", + "integrity": "sha512-Dt9S+6qUg94fEvgn54F2Syf0Z3U8xmnBI9ATq2f5h9xt09fs2IJXSCIXyyVHwvggKWFXEY/7jATRo2K6Dkn6Ow==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/type": "^2.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@inquirer/external-editor/-/external-editor-1.0.2.tgz", + "integrity": "sha512-yy9cOoBnx58TlsPrIxauKIFQTiyH+0MK4e97y4sV9ERbI+zDxw7i2hxHLCIEGIE/8PPvDxGhgzIOTSOWcs6/MQ==", + "dev": true, + "dependencies": { + "chardet": "^2.1.0", + "iconv-lite": "^0.7.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/@inquirer/external-editor/node_modules/iconv-lite": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/@inquirer/figures": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.12.tgz", - "integrity": "sha512-MJttijd8rMFcKJC8NYmprWr6hD3r9Gd9qUC0XwPNwoEPWSMVJwA2MlXxF+nhZZNMY+HXsWa+o7KY2emWYIn0jQ==", + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.13.tgz", + "integrity": "sha512-lGPVU3yO9ZNqA7vTYz26jny41lE7yoQansmqdMLBEfqaGsmdg7V3W9mK9Pvb5IL4EVZ9GnSDGMO/cJXud5dMaw==", "dev": true, "engines": { "node": ">=18" } }, "node_modules/@inquirer/input": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-3.0.1.tgz", - "integrity": "sha512-BDuPBmpvi8eMCxqC5iacloWqv+5tQSJlUafYWUe31ow1BVXjW2a5qe3dh4X/Z25Wp22RwvcaLCc2siHobEOfzg==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-4.2.4.tgz", + "integrity": "sha512-cwSGpLBMwpwcZZsc6s1gThm0J+it/KIJ+1qFL2euLmSKUMGumJ5TcbMgxEjMjNHRGadouIYbiIgruKoDZk7klw==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/type": "^2.0.0" + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/number": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-2.0.1.tgz", - "integrity": "sha512-QpR8jPhRjSmlr/mD2cw3IR8HRO7lSVOnqUvQa8scv1Lsr3xoAMMworcYW3J13z3ppjBFBD2ef1Ci6AE5Qn8goQ==", + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-3.0.20.tgz", + "integrity": "sha512-bbooay64VD1Z6uMfNehED2A2YOPHSJnQLs9/4WNiV/EK+vXczf/R988itL2XLDGTgmhMF2KkiWZo+iEZmc4jqg==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/type": "^2.0.0" + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/password": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-3.0.1.tgz", - "integrity": "sha512-haoeEPUisD1NeE2IanLOiFr4wcTXGWrBOyAyPZi1FfLJuXOzNmxCJPgUrGYKVh+Y8hfGJenIfz5Wb/DkE9KkMQ==", + "version": "4.0.20", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-4.0.20.tgz", + "integrity": "sha512-nxSaPV2cPvvoOmRygQR+h0B+Av73B01cqYLcr7NXcGXhbmsYfUb8fDdw2Us1bI2YsX+VvY7I7upgFYsyf8+Nug==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/type": "^2.0.0", - "ansi-escapes": "^4.3.2" + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/prompts": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-6.0.1.tgz", - "integrity": "sha512-yl43JD/86CIj3Mz5mvvLJqAOfIup7ncxfJ0Btnl0/v5TouVUyeEdcpknfgc+yMevS/48oH9WAkkw93m7otLb/A==", + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-7.8.6.tgz", + "integrity": "sha512-68JhkiojicX9SBUD8FE/pSKbOKtwoyaVj1kwqLfvjlVXZvOy3iaSWX4dCLsZyYx/5Ur07Fq+yuDNOen+5ce6ig==", "dev": true, "dependencies": { - "@inquirer/checkbox": "^3.0.1", - "@inquirer/confirm": "^4.0.1", - "@inquirer/editor": "^3.0.1", - "@inquirer/expand": "^3.0.1", - "@inquirer/input": "^3.0.1", - "@inquirer/number": "^2.0.1", - "@inquirer/password": "^3.0.1", - "@inquirer/rawlist": "^3.0.1", - "@inquirer/search": "^2.0.1", - "@inquirer/select": "^3.0.1" + "@inquirer/checkbox": "^4.2.4", + "@inquirer/confirm": "^5.1.18", + "@inquirer/editor": "^4.2.20", + "@inquirer/expand": "^4.0.20", + "@inquirer/input": "^4.2.4", + "@inquirer/number": "^3.0.20", + "@inquirer/password": "^4.0.20", + "@inquirer/rawlist": "^4.1.8", + "@inquirer/search": "^3.1.3", + "@inquirer/select": "^4.3.4" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/rawlist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-3.0.1.tgz", - "integrity": "sha512-VgRtFIwZInUzTiPLSfDXK5jLrnpkuSOh1ctfaoygKAdPqjcjKYmGh6sCY1pb0aGnCGsmhUxoqLDUAU0ud+lGXQ==", + "version": "4.1.8", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-4.1.8.tgz", + "integrity": "sha512-CQ2VkIASbgI2PxdzlkeeieLRmniaUU1Aoi5ggEdm6BIyqopE9GuDXdDOj9XiwOqK5qm72oI2i6J+Gnjaa26ejg==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/type": "^2.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/search": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-2.0.1.tgz", - "integrity": "sha512-r5hBKZk3g5MkIzLVoSgE4evypGqtOannnB3PKTG9NRZxyFRKcfzrdxXXPcoJQsxJPzvdSU2Rn7pB7lw0GCmGAg==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-3.1.3.tgz", + "integrity": "sha512-D5T6ioybJJH0IiSUK/JXcoRrrm8sXwzrVMjibuPs+AgxmogKslaafy1oxFiorNI4s3ElSkeQZbhYQgLqiL8h6Q==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/figures": "^1.0.6", - "@inquirer/type": "^2.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/select": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-3.0.1.tgz", - "integrity": "sha512-lUDGUxPhdWMkN/fHy1Lk7pF3nK1fh/gqeyWXmctefhxLYxlDsc7vsPBEpxrfVGDsVdyYJsiJoD4bJ1b623cV1Q==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-4.3.4.tgz", + "integrity": "sha512-Qp20nySRmfbuJBBsgPU7E/cL62Hf250vMZRzYDcBHty2zdD1kKCnoDFWRr0WO2ZzaXp3R7a4esaVGJUx0E6zvA==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/figures": "^1.0.6", - "@inquirer/type": "^2.0.0", - "ansi-escapes": "^4.3.2", + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/figures": "^1.0.13", + "@inquirer/type": "^3.0.8", "yoctocolors-cjs": "^2.1.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@inquirer/type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-2.0.0.tgz", - "integrity": "sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-3.0.8.tgz", + "integrity": "sha512-lg9Whz8onIHRthWaN1Q9EGLa/0LFJjyM8mEUbL1eTi6yMGvBf8gvyDLtxSXztQsxMvhxxNpJYrwa1YHdq+w4Jw==", "dev": true, - "dependencies": { - "mute-stream": "^1.0.0" - }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/@isaacs/cliui": { @@ -6033,9 +5836,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "engines": { "node": ">=12" }, @@ -6043,37 +5846,85 @@ "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/@isaacs/cliui/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dependencies": { - "ansi-regex": "^6.0.1" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dependencies": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" + "ansi-regex": "^6.0.1" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", @@ -6082,6 +5933,15 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -6182,21 +6042,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/console/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@jest/console/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -6260,21 +6105,6 @@ } } }, - "node_modules/@jest/core/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@jest/core/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -6358,9 +6188,9 @@ } }, "node_modules/@jest/get-type": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.0.1.tgz", - "integrity": "sha512-AyYdemXCptSRFirI5EPazNxyPwAL0jXt3zceFjaj8NFiKP9pOi0bfXonf6qkf82z2t3QWPeLCWWw4stPBzctLw==", + "version": "30.1.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.1.0.tgz", + "integrity": "sha512-eMbZE2hUnx1WV0pmURZY9XoXPkUYjpc55mb0CrhtdWLtzMQPFvu/rZkTLZFTsdaVQa+Tr4eWAteqcUzoawq/uA==", "dev": true, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" @@ -6452,29 +6282,14 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "node_modules/@jest/reporters/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@jest/reporters/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "node_modules/@jest/reporters/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@jest/reporters/node_modules/chalk": { @@ -6493,37 +6308,34 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@jest/reporters/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/@jest/reporters/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/reporters/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/@jest/reporters/node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "has-flag": "^4.0.0" }, "engines": { - "node": "*" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/@jest/schemas": { @@ -6552,6 +6364,16 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/source-map/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@jest/test-result": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", @@ -6608,19 +6430,14 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/transform/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/@jest/transform/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@jest/transform/node_modules/chalk": { @@ -6656,21 +6473,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jest/types/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@jest/types/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -6688,15 +6490,45 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.9.tgz", - "integrity": "sha512-xpz6C/vXOegF9VEtlMBlkNNIjHrLhKaFBsO4lmQGr00x5BHp7p+oliR6i7LwIcM5cZU2VjLSwm2R+/zj5IjPWg==", + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "devOptional": true, "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0", "@jridgewell/trace-mapping": "^0.3.24" } }, + "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "devOptional": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", @@ -6707,29 +6539,39 @@ } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "version": "0.3.11", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.11.tgz", + "integrity": "sha512-ZMp1V8ZFcPG5dIWnQLr3NSI1MiCU7UETdS/A0G8V/XWHvJv3ZsFqutJn1Y5RPmAPX6F3BiE397OqveU/9NCuIA==", "devOptional": true, "dependencies": { "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25" } }, + "node_modules/@jridgewell/source-map/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "devOptional": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", - "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "devOptional": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", - "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", - "devOptional": true, + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@jsonjoy.com/base64": { @@ -6747,15 +6589,67 @@ "tslib": "2" } }, - "node_modules/@jsonjoy.com/json-pack": { + "node_modules/@jsonjoy.com/buffers": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.2.0.tgz", - "integrity": "sha512-io1zEbbYcElht3tdlqEOFxZ0dMTYrHz9iMf0gqn1pPjZFTCgM5R4R5IMA20Chb2UPYYsxjzs8CgZ7Nb5n2K2rA==", - "dependencies": { - "@jsonjoy.com/base64": "^1.1.1", - "@jsonjoy.com/util": "^1.1.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/buffers/-/buffers-1.2.0.tgz", + "integrity": "sha512-6RX+W5a+ZUY/c/7J5s5jK9UinLfJo5oWKh84fb4X0yK2q4WXEWUWZWuEMjvCb1YNUQhEAhUfr5scEGOH7jC4YQ==", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/codegen": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/codegen/-/codegen-1.0.0.tgz", + "integrity": "sha512-E8Oy+08cmCf0EK/NMxpaJZmOxPqM+6iSe2S4nlSBrPZOORoDJILxtbSUEDKQyTamm/BVAhIGllOBNU79/dwf0g==", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pack": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pack/-/json-pack-1.16.0.tgz", + "integrity": "sha512-L4/W6WRI7pXYJbPGqzYH1zJfckE/0ZP8ttNg/EPLwC+P23wSZYRmz2DNydAu2a8uc20bPlxsvWcYvDYoBJ5BYQ==", + "dependencies": { + "@jsonjoy.com/base64": "^1.1.2", + "@jsonjoy.com/buffers": "^1.2.0", + "@jsonjoy.com/codegen": "^1.0.0", + "@jsonjoy.com/json-pointer": "^1.0.2", + "@jsonjoy.com/util": "^1.9.0", "hyperdyperid": "^1.2.0", - "thingies": "^1.20.0" + "thingies": "^2.5.0" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, + "node_modules/@jsonjoy.com/json-pointer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/json-pointer/-/json-pointer-1.0.2.tgz", + "integrity": "sha512-Fsn6wM2zlDzY1U+v4Nc8bo3bVqgfNTGcn6dMgs6FjrEnt4ZCe60o6ByKRjOGlI2gow0aE/Q41QOigdTqkyK5fg==", + "dependencies": { + "@jsonjoy.com/codegen": "^1.0.0", + "@jsonjoy.com/util": "^1.9.0" }, "engines": { "node": ">=10.0" @@ -6769,9 +6663,13 @@ } }, "node_modules/@jsonjoy.com/util": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.6.0.tgz", - "integrity": "sha512-sw/RMbehRhN68WRtcKCpQOPfnH6lLP4GJfqzi3iYej8tnzpZUDr6UkZYJjcjjC0FWEJOJbyM3PTIwxucUmDG2A==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@jsonjoy.com/util/-/util-1.9.0.tgz", + "integrity": "sha512-pLuQo+VPRnN8hfPqUTLTHk126wuYdXVxE6aDmjSeV4NCAgyxWbiOIeNJVtID3h1Vzpoi9m4jXezf73I6LgabgQ==", + "dependencies": { + "@jsonjoy.com/buffers": "^1.0.0", + "@jsonjoy.com/codegen": "^1.0.0" + }, "engines": { "node": ">=10.0" }, @@ -6789,10 +6687,9 @@ "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==" }, "node_modules/@modelcontextprotocol/sdk": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.15.0.tgz", - "integrity": "sha512-67hnl/ROKdb03Vuu0YOr+baKTvf1/5YBHBm9KnZdjdAh8hjt4FRCPD5ucwxGB237sBpzlqQsLy1PFu7z/ekZ9Q==", - "license": "MIT", + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.19.1.tgz", + "integrity": "sha512-3Y2h3MZKjec1eAqSTBclATlX+AbC6n1LgfVzRMJLt3v6w0RCYgwLrjbxPDbhsYHt6Wdqc/aCceNJYgj448ELQQ==", "dependencies": { "ajv": "^6.12.6", "content-type": "^1.0.5", @@ -6832,16 +6729,15 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.11", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.11.tgz", - "integrity": "sha512-9DPkXtvHydrcOsopiYpUgPHpmj0HWZKMUnL2dZqpvC42lsratuBG06V5ipyno0fUek5VlFsNQ+AcFATSrJXgMA==", + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", + "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "@emnapi/core": "^1.4.3", "@emnapi/runtime": "^1.4.3", - "@tybys/wasm-util": "^0.9.0" + "@tybys/wasm-util": "^0.10.0" } }, "node_modules/@node-rs/crc32": { @@ -6849,7 +6745,6 @@ "resolved": "https://registry.npmjs.org/@node-rs/crc32/-/crc32-1.10.6.tgz", "integrity": "sha512-+llXfqt+UzgoDzT9of5vPQPGqTAVCohU74I9zIBkNo5TH6s2P31DFJOGsJQKN207f0GHnYv5pV3wh3BCY/un/A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 10" }, @@ -6882,7 +6777,6 @@ "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "android" @@ -6899,7 +6793,6 @@ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "android" @@ -6916,7 +6809,6 @@ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" @@ -6933,7 +6825,6 @@ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "darwin" @@ -6950,7 +6841,6 @@ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "freebsd" @@ -6967,7 +6857,6 @@ "arm" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" @@ -6984,7 +6873,6 @@ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" @@ -7001,7 +6889,6 @@ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" @@ -7018,7 +6905,6 @@ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" @@ -7035,7 +6921,6 @@ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" @@ -7052,7 +6937,6 @@ "wasm32" ], "dev": true, - "license": "MIT", "optional": true, "dependencies": { "@napi-rs/wasm-runtime": "^0.2.5" @@ -7069,7 +6953,6 @@ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" @@ -7086,7 +6969,6 @@ "ia32" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" @@ -7103,7 +6985,6 @@ "x64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "win32" @@ -7208,9 +7089,9 @@ } }, "node_modules/@opentelemetry/core": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.0.1.tgz", - "integrity": "sha512-MaZk9SJIDgo1peKevlbhP6+IwIiNPNmswNL4AF0WaQJLbHXjr9SrZMgS12+iqr9ToV4ZVosCcc0f8Rg67LXjxw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-2.1.0.tgz", + "integrity": "sha512-RMEtHsxJs/GiHHxYT58IY57UXAQTuUnZVco6ymDEqTNlJKTimM4qPUPVe8InNFyBjhHBEAx4k3Q8LtNayBsbUQ==", "dependencies": { "@opentelemetry/semantic-conventions": "^1.29.0" }, @@ -7409,11 +7290,11 @@ } }, "node_modules/@opentelemetry/resources": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.0.1.tgz", - "integrity": "sha512-dZOB3R6zvBwDKnHDTB4X1xtMArB/d324VsbiPkX/Yu0Q8T2xceRthoIVFhJdvgVM2QhGVUyX9tzwiNxGtoBJUw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-2.1.0.tgz", + "integrity": "sha512-1CJjf3LCvoefUOgegxi8h6r4B/wLSzInyhGP2UmIBYNlo4Qk5CZ73e1eEyWmfXvFtm1ybkmfb2DqWvspsYLrWw==", "dependencies": { - "@opentelemetry/core": "2.0.1", + "@opentelemetry/core": "2.1.0", "@opentelemetry/semantic-conventions": "^1.29.0" }, "engines": { @@ -7469,12 +7350,12 @@ } }, "node_modules/@opentelemetry/sdk-metrics": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.0.1.tgz", - "integrity": "sha512-wf8OaJoSnujMAHWR3g+/hGvNcsC16rf9s1So4JlMiFaFHiE4HpIA3oUh+uWZQ7CNuK8gVW/pQSkgoa5HkkOl0g==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics/-/sdk-metrics-2.1.0.tgz", + "integrity": "sha512-J9QX459mzqHLL9Y6FZ4wQPRZG4TOpMCyPOh6mkr/humxE1W2S3Bvf4i75yiMW9uyed2Kf5rxmLhTm/UK8vNkAw==", "dependencies": { - "@opentelemetry/core": "2.0.1", - "@opentelemetry/resources": "2.0.1" + "@opentelemetry/core": "2.1.0", + "@opentelemetry/resources": "2.1.0" }, "engines": { "node": "^18.19.0 || >=20.6.0" @@ -7529,9 +7410,9 @@ } }, "node_modules/@opentelemetry/semantic-conventions": { - "version": "1.34.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.34.0.tgz", - "integrity": "sha512-aKcOkyrorBGlajjRdVoJWHTxfxO1vCNHLJVlSDaRHDIdjU+pX8IYQPvPDkYiujKLbRnWU+1TBwEt0QRgSm4SGA==", + "version": "1.37.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-1.37.0.tgz", + "integrity": "sha512-JD6DerIKdJGmRp4jQyX5FlrQjA4tjOw1cvfsPAZXfOOEErMUHjPcPSICS+6WnM0nB0efSFARh0KAZss+bvExOA==", "engines": { "node": ">=14" } @@ -7546,9 +7427,9 @@ } }, "node_modules/@pkgr/core": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.7.tgz", - "integrity": "sha512-YLT9Zo3oNPJoBjBc4q8G2mjU4tqIbf5CEOORbUUr48dCD9q3umJ3IPlVqOqDakPfd2HuwccBaqlGhN4Gmr5OWg==", + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", "dev": true, "engines": { "node": "^12.20.0 || ^14.18.0 || >=16.0.0" @@ -7631,17 +7512,17 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "node_modules/@puppeteer/browsers": { - "version": "2.10.5", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.5.tgz", - "integrity": "sha512-eifa0o+i8dERnngJwKrfp3dEq7ia5XFyoqB17S4gK8GhsQE4/P8nxOfQSE0zQHxzzLo/cmF+7+ywEQ7wK7Fb+w==", + "version": "2.10.10", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.10.10.tgz", + "integrity": "sha512-3ZG500+ZeLql8rE0hjfhkycJjDj0pI/btEh3L9IkWUYcOrgP0xCNRq3HbtbqOPbvDhFaAWD88pDFtlLv8ns8gA==", "dev": true, "dependencies": { - "debug": "^4.4.1", + "debug": "^4.4.3", "extract-zip": "^2.0.1", "progress": "^2.0.3", "proxy-agent": "^6.5.0", "semver": "^7.7.2", - "tar-fs": "^3.0.8", + "tar-fs": "^3.1.0", "yargs": "^17.7.2" }, "bin": { @@ -7651,22 +7532,10 @@ "node": ">=18" } }, - "node_modules/@puppeteer/browsers/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@puppeteer/browsers/node_modules/tar-fs": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.10.tgz", - "integrity": "sha512-C1SwlQGNLe/jPNqapK8epDsXME7CAJR5RL3GcE6KWx1d9OUByzoHVcbu1VPI8tevg9H8Alae0AApHHFGzrD5zA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz", + "integrity": "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==", "dev": true, "dependencies": { "pump": "^3.0.0", @@ -7677,6 +7546,17 @@ "bare-path": "^3.0.0" } }, + "node_modules/@puppeteer/browsers/node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dev": true, + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", @@ -7746,13 +7626,12 @@ } }, "node_modules/@sinonjs/samsam": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.2.tgz", - "integrity": "sha512-v46t/fwnhejRSFTGqbpn9u+LQ9xJDse10gNnPgAcxgdoCDMXj/G2asWAC/8Qs+BAZDicX+MNZouXT1A7c83kVw==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.3.tgz", + "integrity": "sha512-hw6HbX+GyVZzmaYNh82Ecj1vdGZrqVIn/keDTg63IgAwiQPO+xCz99uG6Woqgb4tM0mUiFENKZ4cqd7IX94AXQ==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.1", - "lodash.get": "^4.4.2", "type-detect": "^4.1.0" } }, @@ -7763,32 +7642,32 @@ "dev": true }, "node_modules/@smithy/abort-controller": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.9.tgz", - "integrity": "sha512-yiW0WI30zj8ZKoSYNx90no7ugVn3khlyH/z5W8qtKBtVE6awRALbhSG+2SAHA1r6bO/6M9utxYKVZ3PCJ1rWxw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.0.tgz", + "integrity": "sha512-PLUYa+SUKOEZtXFURBu/CNxlsxfaFGxSBPcStL13KpVeVWIfdezWyDqkz7iDLmwnxojXD0s5KzuB5HGHvt4Aeg==", "dependencies": { - "@smithy/types": "^3.7.2", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/abort-controller/node_modules/@smithy/types": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.7.2.tgz", - "integrity": "sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/chunked-blob-reader": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-5.0.0.tgz", - "integrity": "sha512-+sKqDBQqb036hh4NPaUiEkYFkTUGYzRsn3EuFhyfQfMy6oGHEUJDurLP9Ufb5dasr/XiAmPNMr6wa9afjQB+Gw==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader/-/chunked-blob-reader-5.2.0.tgz", + "integrity": "sha512-WmU0TnhEAJLWvfSeMxBNe5xtbselEO8+4wG0NtZeL8oR21WgH1xiO37El+/Y+H/Ie4SCwBy3MxYWmOYaGgZueA==", "dependencies": { "tslib": "^2.6.2" }, @@ -7797,11 +7676,11 @@ } }, "node_modules/@smithy/chunked-blob-reader-native": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-4.0.0.tgz", - "integrity": "sha512-R9wM2yPmfEMsUmlMlIgSzOyICs0x9uu7UTHoccMyt7BWw8shcGM8HqB355+BZCPBcySvbTYMs62EgEQkNxz2ig==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/chunked-blob-reader-native/-/chunked-blob-reader-native-4.2.0.tgz", + "integrity": "sha512-HNbGWdyTfSM1nfrZKQjYTvD8k086+M8s1EYkBUdGC++lhxegUp2HgNf5RIt6oOGVvsC26hBCW/11tv8KbwLn/Q==", "dependencies": { - "@smithy/util-base64": "^4.0.0", + "@smithy/util-base64": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -7809,14 +7688,14 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.1.4.tgz", - "integrity": "sha512-prmU+rDddxHOH0oNcwemL+SwnzcG65sBF2yXRO7aeXIn/xTlq2pX7JLVbkBnVLowHLg4/OL4+jBmv9hVrVGS+w==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.3.0.tgz", + "integrity": "sha512-9oH+n8AVNiLPK/iK/agOsoWfrKZ3FGP3502tkksd6SRsKMYiu7AFX0YXo6YBADdsAj7C+G/aLKdsafIJHxuCkQ==", "dependencies": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "@smithy/util-config-provider": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-config-provider": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -7824,9 +7703,9 @@ } }, "node_modules/@smithy/config-resolver/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -7835,18 +7714,19 @@ } }, "node_modules/@smithy/core": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.6.0.tgz", - "integrity": "sha512-Pgvfb+TQ4wUNLyHzvgCP4aYZMh16y7GcfF59oirRHcgGgkH1e/s9C0nv/v3WP+Quymyr5je71HeFQCwh+44XLg==", + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.14.0.tgz", + "integrity": "sha512-XJ4z5FxvY/t0Dibms/+gLJrI5niRoY0BCmE02fwmPcRYFPI4KI876xaE79YGWIKnEslMbuQPsIEsoU/DXa0DoA==", "dependencies": { - "@smithy/middleware-serde": "^4.0.8", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-stream": "^4.2.2", - "@smithy/util-utf8": "^4.0.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-stream": "^4.4.0", + "@smithy/util-utf8": "^4.2.0", + "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" }, "engines": { @@ -7854,9 +7734,9 @@ } }, "node_modules/@smithy/core/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -7865,14 +7745,14 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.6.tgz", - "integrity": "sha512-hKMWcANhUiNbCJouYkZ9V3+/Qf9pteR1dnwgdyzR09R4ODEYx8BbUysHwRSyex4rZ9zapddZhLFTnT4ZijR4pw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.0.tgz", + "integrity": "sha512-SOhFVvFH4D5HJZytb0bLKxCrSnwcqPiNlrw+S4ZXjMnsC+o9JcUQzbZOEQcA8yv9wJFNhfsUiIUKiEnYL68Big==", "dependencies": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -7880,9 +7760,9 @@ } }, "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -7891,13 +7771,13 @@ } }, "node_modules/@smithy/eventstream-codec": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.0.4.tgz", - "integrity": "sha512-7XoWfZqWb/QoR/rAU4VSi0mWnO2vu9/ltS6JZ5ZSZv0eovLVfDfu0/AX4ub33RsJTOth3TiFWSHS5YdztvFnig==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-4.2.0.tgz", + "integrity": "sha512-XE7CtKfyxYiNZ5vz7OvyTf1osrdbJfmUy+rbh+NLQmZumMGvY0mT0Cq1qKSfhrvLtRYzMsOBuRpi10dyI0EBPg==", "dependencies": { "@aws-crypto/crc32": "5.2.0", - "@smithy/types": "^4.3.1", - "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/types": "^4.6.0", + "@smithy/util-hex-encoding": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -7905,9 +7785,9 @@ } }, "node_modules/@smithy/eventstream-codec/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -7916,12 +7796,12 @@ } }, "node_modules/@smithy/eventstream-serde-browser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.0.4.tgz", - "integrity": "sha512-3fb/9SYaYqbpy/z/H3yIi0bYKyAa89y6xPmIqwr2vQiUT2St+avRt8UKwsWt9fEdEasc5d/V+QjrviRaX1JRFA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-4.2.0.tgz", + "integrity": "sha512-U53p7fcrk27k8irLhOwUu+UYnBqsXNLKl1XevOpsxK3y1Lndk8R7CSiZV6FN3fYFuTPuJy5pP6qa/bjDzEkRvA==", "dependencies": { - "@smithy/eventstream-serde-universal": "^4.0.4", - "@smithy/types": "^4.3.1", + "@smithy/eventstream-serde-universal": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -7929,9 +7809,9 @@ } }, "node_modules/@smithy/eventstream-serde-browser/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -7940,11 +7820,11 @@ } }, "node_modules/@smithy/eventstream-serde-config-resolver": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.1.2.tgz", - "integrity": "sha512-JGtambizrWP50xHgbzZI04IWU7LdI0nh/wGbqH3sJesYToMi2j/DcoElqyOcqEIG/D4tNyxgRuaqBXWE3zOFhQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-4.3.0.tgz", + "integrity": "sha512-uwx54t8W2Yo9Jr3nVF5cNnkAAnMCJ8Wrm+wDlQY6rY/IrEgZS3OqagtCu/9ceIcZFQ1zVW/zbN9dxb5esuojfA==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -7952,9 +7832,9 @@ } }, "node_modules/@smithy/eventstream-serde-config-resolver/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -7963,12 +7843,12 @@ } }, "node_modules/@smithy/eventstream-serde-node": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.0.4.tgz", - "integrity": "sha512-RD6UwNZ5zISpOWPuhVgRz60GkSIp0dy1fuZmj4RYmqLVRtejFqQ16WmfYDdoSoAjlp1LX+FnZo+/hkdmyyGZ1w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.2.0.tgz", + "integrity": "sha512-yjM2L6QGmWgJjVu/IgYd6hMzwm/tf4VFX0lm8/SvGbGBwc+aFl3hOzvO/e9IJ2XI+22Tx1Zg3vRpFRs04SWFcg==", "dependencies": { - "@smithy/eventstream-serde-universal": "^4.0.4", - "@smithy/types": "^4.3.1", + "@smithy/eventstream-serde-universal": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -7976,9 +7856,9 @@ } }, "node_modules/@smithy/eventstream-serde-node/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -7987,12 +7867,12 @@ } }, "node_modules/@smithy/eventstream-serde-universal": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.0.4.tgz", - "integrity": "sha512-UeJpOmLGhq1SLox79QWw/0n2PFX+oPRE1ZyRMxPIaFEfCqWaqpB7BU9C8kpPOGEhLF7AwEqfFbtwNxGy4ReENA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.2.0.tgz", + "integrity": "sha512-C3jxz6GeRzNyGKhU7oV656ZbuHY93mrfkT12rmjDdZch142ykjn8do+VOkeRNjSGKw01p4g+hdalPYPhmMwk1g==", "dependencies": { - "@smithy/eventstream-codec": "^4.0.4", - "@smithy/types": "^4.3.1", + "@smithy/eventstream-codec": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8000,9 +7880,9 @@ } }, "node_modules/@smithy/eventstream-serde-universal/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8011,14 +7891,14 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.4.tgz", - "integrity": "sha512-AMtBR5pHppYMVD7z7G+OlHHAcgAN7v0kVKEpHuTO4Gb199Gowh0taYi9oDStFeUhetkeP55JLSVlTW1n9rFtUw==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.0.tgz", + "integrity": "sha512-BG3KSmsx9A//KyIfw+sqNmWFr1YBUr+TwpxFT7yPqAk0yyDh7oSNgzfNH7pS6OC099EGx2ltOULvumCFe8bcgw==", "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/querystring-builder": "^4.2.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8026,9 +7906,9 @@ } }, "node_modules/@smithy/fetch-http-handler/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8037,13 +7917,13 @@ } }, "node_modules/@smithy/hash-blob-browser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-4.0.4.tgz", - "integrity": "sha512-WszRiACJiQV3QG6XMV44i5YWlkrlsM5Yxgz4jvsksuu7LDXA6wAtypfPajtNTadzpJy3KyJPoWehYpmZGKUFIQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/hash-blob-browser/-/hash-blob-browser-4.2.0.tgz", + "integrity": "sha512-MWmrRTPqVKpN8NmxmJPTeQuhewTt8Chf+waB38LXHZoA02+BeWYVQ9ViAwHjug8m7lQb1UWuGqp3JoGDOWvvuA==", "dependencies": { - "@smithy/chunked-blob-reader": "^5.0.0", - "@smithy/chunked-blob-reader-native": "^4.0.0", - "@smithy/types": "^4.3.1", + "@smithy/chunked-blob-reader": "^5.2.0", + "@smithy/chunked-blob-reader-native": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8051,9 +7931,9 @@ } }, "node_modules/@smithy/hash-blob-browser/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8062,13 +7942,13 @@ } }, "node_modules/@smithy/hash-node": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.4.tgz", - "integrity": "sha512-qnbTPUhCVnCgBp4z4BUJUhOEkVwxiEi1cyFM+Zj6o+aY8OFGxUQleKWq8ltgp3dujuhXojIvJWdoqpm6dVO3lQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.0.tgz", + "integrity": "sha512-ugv93gOhZGysTctZh9qdgng8B+xO0cj+zN0qAZ+Sgh7qTQGPOJbMdIuyP89KNfUyfAqFSNh5tMvC+h2uCpmTtA==", "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", + "@smithy/types": "^4.6.0", + "@smithy/util-buffer-from": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8076,9 +7956,9 @@ } }, "node_modules/@smithy/hash-node/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8087,12 +7967,12 @@ } }, "node_modules/@smithy/hash-stream-node": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-4.0.4.tgz", - "integrity": "sha512-wHo0d8GXyVmpmMh/qOR0R7Y46/G1y6OR8U+bSTB4ppEzRxd1xVAQ9xOE9hOc0bSjhz0ujCPAbfNLkLrpa6cevg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/hash-stream-node/-/hash-stream-node-4.2.0.tgz", + "integrity": "sha512-8dELAuGv+UEjtzrpMeNBZc1sJhO8GxFVV/Yh21wE35oX4lOE697+lsMHBoUIFAUuYkTMIeu0EuJSEsH7/8Y+UQ==", "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-utf8": "^4.0.0", + "@smithy/types": "^4.6.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8100,9 +7980,9 @@ } }, "node_modules/@smithy/hash-stream-node/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8111,11 +7991,11 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.4.tgz", - "integrity": "sha512-bNYMi7WKTJHu0gn26wg8OscncTt1t2b8KcsZxvOv56XA6cyXtOAAAaNP7+m45xfppXfOatXF3Sb1MNsLUgVLTw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.0.tgz", + "integrity": "sha512-ZmK5X5fUPAbtvRcUPtk28aqIClVhbfcmfoS4M7UQBTnDdrNxhsrxYVv0ZEl5NaPSyExsPWqL4GsPlRvtlwg+2A==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8123,9 +8003,9 @@ } }, "node_modules/@smithy/invalid-dependency/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8134,9 +8014,9 @@ } }, "node_modules/@smithy/is-array-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.0.0.tgz", - "integrity": "sha512-saYhF8ZZNoJDTvJBEWgeBccCg+yvp1CX+ed12yORU3NilJScfc6gfch2oVb4QgxZrGUx3/ZJlb+c/dJbyupxlw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-4.2.0.tgz", + "integrity": "sha512-DZZZBvC7sjcYh4MazJSGiWMI2L7E0oCiRHREDzIxi/M2LY79/21iXt6aPLHge82wi5LsuRF5A06Ds3+0mlh6CQ==", "dependencies": { "tslib": "^2.6.2" }, @@ -8145,12 +8025,12 @@ } }, "node_modules/@smithy/md5-js": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-4.0.4.tgz", - "integrity": "sha512-uGLBVqcOwrLvGh/v/jw423yWHq/ofUGK1W31M2TNspLQbUV1Va0F5kTxtirkoHawODAZcjXTSGi7JwbnPcDPJg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/md5-js/-/md5-js-4.2.0.tgz", + "integrity": "sha512-LFEPniXGKRQArFmDQ3MgArXlClFJMsXDteuQQY8WG1/zzv6gVSo96+qpkuu1oJp4MZsKrwchY0cuAoPKzEbaNA==", "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-utf8": "^4.0.0", + "@smithy/types": "^4.6.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8158,9 +8038,9 @@ } }, "node_modules/@smithy/md5-js/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8169,12 +8049,12 @@ } }, "node_modules/@smithy/middleware-content-length": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.0.4.tgz", - "integrity": "sha512-F7gDyfI2BB1Kc+4M6rpuOLne5LOcEknH1n6UQB69qv+HucXBR1rkzXBnQTB2q46sFy1PM/zuSJOB532yc8bg3w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.0.tgz", + "integrity": "sha512-6ZAnwrXFecrA4kIDOcz6aLBhU5ih2is2NdcZtobBDSdSHtE9a+MThB5uqyK4XXesdOCvOcbCm2IGB95birTSOQ==", "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8182,9 +8062,9 @@ } }, "node_modules/@smithy/middleware-content-length/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8193,17 +8073,17 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "4.1.13", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.13.tgz", - "integrity": "sha512-xg3EHV/Q5ZdAO5b0UiIMj3RIOCobuS40pBBODguUDVdko6YK6QIzCVRrHTogVuEKglBWqWenRnZ71iZnLL3ZAQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.0.tgz", + "integrity": "sha512-jFVjuQeV8TkxaRlcCNg0GFVgg98tscsmIrIwRFeC74TIUyLE3jmY9xgc1WXrPQYRjQNK3aRoaIk6fhFRGOIoGw==", "dependencies": { - "@smithy/core": "^3.6.0", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-middleware": "^4.0.4", + "@smithy/core": "^3.14.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8211,9 +8091,9 @@ } }, "node_modules/@smithy/middleware-endpoint/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8222,28 +8102,28 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "4.1.14", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.14.tgz", - "integrity": "sha512-eoXaLlDGpKvdmvt+YBfRXE7HmIEtFF+DJCbTPwuLunP0YUnrydl+C4tS+vEM0+nyxXrX3PSUFqC+lP1+EHB1Tw==", - "dependencies": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/protocol-http": "^5.1.2", - "@smithy/service-error-classification": "^4.0.6", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.6", - "tslib": "^2.6.2", - "uuid": "^9.0.1" + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.0.tgz", + "integrity": "sha512-yaVBR0vQnOnzex45zZ8ZrPzUnX73eUC8kVFaAAbn04+6V7lPtxn56vZEBBAhgS/eqD6Zm86o6sJs6FuQVoX5qg==", + "dependencies": { + "@smithy/node-config-provider": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/service-error-classification": "^4.2.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/uuid": "^1.1.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, "node_modules/@smithy/middleware-retry/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8251,25 +8131,13 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-retry/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@smithy/middleware-serde": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz", - "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.0.tgz", + "integrity": "sha512-rpTQ7D65/EAbC6VydXlxjvbifTf4IH+sADKg6JmAvhkflJO2NvDeyU9qsWUNBelJiQFcXKejUHWRSdmpJmEmiw==", "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8277,9 +8145,9 @@ } }, "node_modules/@smithy/middleware-serde/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8288,11 +8156,11 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz", - "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.0.tgz", + "integrity": "sha512-G5CJ//eqRd9OARrQu9MK1H8fNm2sMtqFh6j8/rPozhEL+Dokpvi1Og+aCixTuwDAGZUkJPk6hJT5jchbk/WCyg==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8300,9 +8168,9 @@ } }, "node_modules/@smithy/middleware-stack/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8311,13 +8179,13 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz", - "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.0.tgz", + "integrity": "sha512-5QgHNuWdT9j9GwMPPJCKxy2KDxZ3E5l4M3/5TatSZrqYVoEiqQrDfAq8I6KWZw7RZOHtVtCzEPdYz7rHZixwcA==", "dependencies": { - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8325,9 +8193,9 @@ } }, "node_modules/@smithy/node-config-provider/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8336,73 +8204,37 @@ } }, "node_modules/@smithy/node-http-handler": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.3.3.tgz", - "integrity": "sha512-BrpZOaZ4RCbcJ2igiSNG16S+kgAc65l/2hmxWdmhyoGWHTLlzQzr06PXavJp9OBlPEG/sHlqdxjWmjzV66+BSQ==", - "dependencies": { - "@smithy/abort-controller": "^3.1.9", - "@smithy/protocol-http": "^4.1.8", - "@smithy/querystring-builder": "^3.0.11", - "@smithy/types": "^3.7.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-http-handler/node_modules/@smithy/protocol-http": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.8.tgz", - "integrity": "sha512-hmgIAVyxw1LySOwkgMIUN0kjN8TG9Nc85LJeEmEE/cNEe2rkHDUWhnJf2gxcSRFLWsyqWsrZGw40ROjUogg+Iw==", - "dependencies": { - "@smithy/types": "^3.7.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-http-handler/node_modules/@smithy/querystring-builder": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.11.tgz", - "integrity": "sha512-u+5HV/9uJaeLj5XTb6+IEF/dokWWkEqJ0XiaRRogyREmKGUgZnNecLucADLdauWFKUNbQfulHFEZEdjwEBjXRg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.3.0.tgz", + "integrity": "sha512-RHZ/uWCmSNZ8cneoWEVsVwMZBKy/8123hEpm57vgGXA3Irf/Ja4v9TVshHK2ML5/IqzAZn0WhINHOP9xl+Qy6Q==", "dependencies": { - "@smithy/types": "^3.7.2", - "@smithy/util-uri-escape": "^3.0.0", + "@smithy/abort-controller": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/querystring-builder": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/node-http-handler/node_modules/@smithy/types": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.7.2.tgz", - "integrity": "sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-http-handler/node_modules/@smithy/util-uri-escape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", - "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/property-provider": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz", - "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.0.tgz", + "integrity": "sha512-rV6wFre0BU6n/tx2Ztn5LdvEdNZ2FasQbPQmDOPfV9QQyDmsCkOAB0osQjotRCQg+nSKFmINhyda0D3AnjSBJw==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8410,9 +8242,9 @@ } }, "node_modules/@smithy/property-provider/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8421,11 +8253,11 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.0.tgz", + "integrity": "sha512-6POSYlmDnsLKb7r1D3SVm7RaYW6H1vcNcTWGWrF7s9+2noNYvUsm7E4tz5ZQ9HXPmKn6Hb67pBDRIjrT4w/d7Q==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8433,9 +8265,9 @@ } }, "node_modules/@smithy/protocol-http/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8444,12 +8276,12 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.4.tgz", - "integrity": "sha512-SwREZcDnEYoh9tLNgMbpop+UTGq44Hl9tdj3rf+yeLcfH7+J8OXEBaMc2kDxtyRHu8BhSg9ADEx0gFHvpJgU8w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.0.tgz", + "integrity": "sha512-Q4oFD0ZmI8yJkiPPeGUITZj++4HHYCW3pYBYfIobUCkYpI6mbkzmG1MAQQ3lJYYWj3iNqfzOenUZu+jqdPQ16A==", "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", + "@smithy/types": "^4.6.0", + "@smithy/util-uri-escape": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8457,9 +8289,9 @@ } }, "node_modules/@smithy/querystring-builder/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8468,11 +8300,11 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz", - "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.0.tgz", + "integrity": "sha512-BjATSNNyvVbQxOOlKse0b0pSezTWGMvA87SvoFoFlkRsKXVsN3bEtjCxvsNXJXfnAzlWFPaT9DmhWy1vn0sNEA==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8480,9 +8312,9 @@ } }, "node_modules/@smithy/querystring-parser/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8491,20 +8323,20 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.6.tgz", - "integrity": "sha512-RRoTDL//7xi4tn5FrN2NzH17jbgmnKidUqd4KvquT0954/i6CXXkh1884jBiunq24g9cGtPBEXlU40W6EpNOOg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.0.tgz", + "integrity": "sha512-Ylv1ttUeKatpR0wEOMnHf1hXMktPUMObDClSWl2TpCVT4DwtJhCeighLzSLbgH3jr5pBNM0LDXT5yYxUvZ9WpA==", "dependencies": { - "@smithy/types": "^4.3.1" + "@smithy/types": "^4.6.0" }, "engines": { "node": ">=18.0.0" } }, "node_modules/@smithy/service-error-classification/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8513,11 +8345,11 @@ } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz", - "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.3.0.tgz", + "integrity": "sha512-VCUPPtNs+rKWlqqntX0CbVvWyjhmX30JCtzO+s5dlzzxrvSfRh5SY0yxnkirvc1c80vdKQttahL71a9EsdolSQ==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8525,9 +8357,9 @@ } }, "node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8536,17 +8368,17 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.1.2.tgz", - "integrity": "sha512-d3+U/VpX7a60seHziWnVZOHuEgJlclufjkS6zhXvxcJgkJq4UWdH5eOBLzHRMx6gXjsdT9h6lfpmLzbrdupHgQ==", - "dependencies": { - "@smithy/is-array-buffer": "^4.0.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-hex-encoding": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-uri-escape": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.0.tgz", + "integrity": "sha512-MKNyhXEs99xAZaFhm88h+3/V+tCRDQ+PrDzRqL0xdDpq4gjxcMmf5rBA3YXgqZqMZ/XwemZEurCBQMfxZOWq/g==", + "dependencies": { + "@smithy/is-array-buffer": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-hex-encoding": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-uri-escape": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8554,9 +8386,9 @@ } }, "node_modules/@smithy/signature-v4/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8565,16 +8397,16 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "4.4.5", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.5.tgz", - "integrity": "sha512-+lynZjGuUFJaMdDYSTMnP/uPBBXXukVfrJlP+1U/Dp5SFTEI++w6NMga8DjOENxecOF71V9Z2DllaVDYRnGlkg==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.7.0.tgz", + "integrity": "sha512-3BDx/aCCPf+kkinYf5QQhdQ9UAGihgOVqI3QO5xQfSaIWvUE4KYLtiGRWsNe1SR7ijXC0QEPqofVp5Sb0zC8xQ==", "dependencies": { - "@smithy/core": "^3.6.0", - "@smithy/middleware-endpoint": "^4.1.13", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", + "@smithy/core": "^3.14.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-stream": "^4.4.0", "tslib": "^2.6.2" }, "engines": { @@ -8582,9 +8414,9 @@ } }, "node_modules/@smithy/smithy-client/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8604,12 +8436,12 @@ } }, "node_modules/@smithy/url-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz", - "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.0.tgz", + "integrity": "sha512-AlBmD6Idav2ugmoAL6UtR6ItS7jU5h5RNqLMZC7QrLCoITA9NzIN3nx9GWi8g4z1pfWh2r9r96SX/jHiNwPJ9A==", "dependencies": { - "@smithy/querystring-parser": "^4.0.4", - "@smithy/types": "^4.3.1", + "@smithy/querystring-parser": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8617,9 +8449,9 @@ } }, "node_modules/@smithy/url-parser/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8628,12 +8460,12 @@ } }, "node_modules/@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.2.0.tgz", + "integrity": "sha512-+erInz8WDv5KPe7xCsJCp+1WCjSbah9gWcmUXc9NqmhyPx59tf7jqFz+za1tRG1Y5KM1Cy1rWCcGypylFp4mvA==", "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", + "@smithy/util-buffer-from": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8641,9 +8473,9 @@ } }, "node_modules/@smithy/util-body-length-browser": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.0.0.tgz", - "integrity": "sha512-sNi3DL0/k64/LO3A256M+m3CDdG6V7WKWHdAiBBMUN8S3hK3aMPhwnPik2A/a2ONN+9doY9UxaLfgqsIRg69QA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-4.2.0.tgz", + "integrity": "sha512-Fkoh/I76szMKJnBXWPdFkQJl2r9SjPt3cMzLdOB6eJ4Pnpas8hVoWPYemX/peO0yrrvldgCUVJqOAjUrOLjbxg==", "dependencies": { "tslib": "^2.6.2" }, @@ -8652,9 +8484,9 @@ } }, "node_modules/@smithy/util-body-length-node": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.0.0.tgz", - "integrity": "sha512-q0iDP3VsZzqJyje8xJWEJCNIu3lktUGVoSy1KB0UWym2CL1siV3artm+u1DFYTLejpsrdGyCSWBdGNjJzfDPjg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-4.2.0.tgz", + "integrity": "sha512-U8q1WsSZFjXijlD7a4wsDQOvOwV+72iHSfq1q7VD+V75xP/pdtm0WIGuaFJ3gcADDOKj2MIBn4+zisi140HEnQ==", "dependencies": { "tslib": "^2.6.2" }, @@ -8663,11 +8495,11 @@ } }, "node_modules/@smithy/util-buffer-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.0.0.tgz", - "integrity": "sha512-9TOQ7781sZvddgO8nxueKi3+yGvkY35kotA0Y6BWRajAv8jjmigQ1sBwz0UX47pQMYXJPahSKEKYFgt+rXdcug==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-4.2.0.tgz", + "integrity": "sha512-kAY9hTKulTNevM2nlRtxAG2FQ3B2OR6QIrPY3zE5LqJy1oxzmgBGsHLWTcNhWXKchgA0WHW+mZkQrng/pgcCew==", "dependencies": { - "@smithy/is-array-buffer": "^4.0.0", + "@smithy/is-array-buffer": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8675,9 +8507,9 @@ } }, "node_modules/@smithy/util-config-provider": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.0.0.tgz", - "integrity": "sha512-L1RBVzLyfE8OXH+1hsJ8p+acNUSirQnWQ6/EgpchV88G6zGBTDPdXiiExei6Z1wR2RxYvxY/XLw6AMNCCt8H3w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-4.2.0.tgz", + "integrity": "sha512-YEjpl6XJ36FTKmD+kRJJWYvrHeUvm5ykaUS5xK+6oXffQPHeEM4/nXlZPe+Wu0lsgRUcNZiliYNh/y7q9c2y6Q==", "dependencies": { "tslib": "^2.6.2" }, @@ -8686,13 +8518,13 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "4.0.21", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.21.tgz", - "integrity": "sha512-wM0jhTytgXu3wzJoIqpbBAG5U6BwiubZ6QKzSbP7/VbmF1v96xlAbX2Am/mz0Zep0NLvLh84JT0tuZnk3wmYQA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.2.0.tgz", + "integrity": "sha512-qzHp7ZDk1Ba4LDwQVCNp90xPGqSu7kmL7y5toBpccuhi3AH7dcVBIT/pUxYcInK4jOy6FikrcTGq5wxcka8UaQ==", "dependencies": { - "@smithy/property-provider": "^4.0.4", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", + "@smithy/property-provider": "^4.2.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", "bowser": "^2.11.0", "tslib": "^2.6.2" }, @@ -8701,9 +8533,9 @@ } }, "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8712,16 +8544,16 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "4.0.21", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.21.tgz", - "integrity": "sha512-/F34zkoU0GzpUgLJydHY8Rxu9lBn8xQC/s/0M0U9lLBkYbA1htaAFjWYJzpzsbXPuri5D1H8gjp2jBum05qBrA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.0.tgz", + "integrity": "sha512-FxUHS3WXgx3bTWR6yQHNHHkQHZm/XKIi/CchTnKvBulN6obWpcbzJ6lDToXn+Wp0QlVKd7uYAz2/CTw1j7m+Kg==", "dependencies": { - "@smithy/config-resolver": "^4.1.4", - "@smithy/credential-provider-imds": "^4.0.6", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/smithy-client": "^4.4.5", - "@smithy/types": "^4.3.1", + "@smithy/config-resolver": "^4.3.0", + "@smithy/credential-provider-imds": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8729,9 +8561,9 @@ } }, "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8740,12 +8572,12 @@ } }, "node_modules/@smithy/util-endpoints": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.6.tgz", - "integrity": "sha512-YARl3tFL3WgPuLzljRUnrS2ngLiUtkwhQtj8PAL13XZSyUiNLQxwG3fBBq3QXFqGFUXepIN73pINp3y8c2nBmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.2.0.tgz", + "integrity": "sha512-TXeCn22D56vvWr/5xPqALc9oO+LN+QpFjrSM7peG/ckqEPoI3zaKZFp+bFwfmiHhn5MGWPaLCqDOJPPIixk9Wg==", "dependencies": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8753,9 +8585,9 @@ } }, "node_modules/@smithy/util-endpoints/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8764,9 +8596,9 @@ } }, "node_modules/@smithy/util-hex-encoding": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.0.0.tgz", - "integrity": "sha512-Yk5mLhHtfIgW2W2WQZWSg5kuMZCVbvhFmC7rV4IO2QqnZdbEFPmQnCcGMAX2z/8Qj3B9hYYNjZOhWym+RwhePw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-4.2.0.tgz", + "integrity": "sha512-CCQBwJIvXMLKxVbO88IukazJD9a4kQ9ZN7/UMGBjBcJYvatpWk+9g870El4cB8/EJxfe+k+y0GmR9CAzkF+Nbw==", "dependencies": { "tslib": "^2.6.2" }, @@ -8775,11 +8607,11 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz", - "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.0.tgz", + "integrity": "sha512-u9OOfDa43MjagtJZ8AapJcmimP+K2Z7szXn8xbty4aza+7P1wjFmy2ewjSbhEiYQoW1unTlOAIV165weYAaowA==", "dependencies": { - "@smithy/types": "^4.3.1", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8787,9 +8619,9 @@ } }, "node_modules/@smithy/util-middleware/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8798,12 +8630,12 @@ } }, "node_modules/@smithy/util-retry": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.6.tgz", - "integrity": "sha512-+YekoF2CaSMv6zKrA6iI/N9yva3Gzn4L6n35Luydweu5MMPYpiGZlWqehPHDHyNbnyaYlz/WJyYAZnC+loBDZg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.0.tgz", + "integrity": "sha512-BWSiuGbwRnEE2SFfaAZEX0TqaxtvtSYPM/J73PFVm+A29Fg1HTPiYFb8TmX1DXp4hgcdyJcNQmprfd5foeORsg==", "dependencies": { - "@smithy/service-error-classification": "^4.0.6", - "@smithy/types": "^4.3.1", + "@smithy/service-error-classification": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { @@ -8811,9 +8643,9 @@ } }, "node_modules/@smithy/util-retry/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8822,44 +8654,17 @@ } }, "node_modules/@smithy/util-stream": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.2.tgz", - "integrity": "sha512-aI+GLi7MJoVxg24/3J1ipwLoYzgkB4kUfogZfnslcYlynj3xsQ0e7vk4TnTro9hhsS5PvX1mwmkRqqHQjwcU7w==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.4.0.tgz", + "integrity": "sha512-vtO7ktbixEcrVzMRmpQDnw/Ehr9UWjBvSJ9fyAbadKkC4w5Cm/4lMO8cHz8Ysb8uflvQUNRcuux/oNHKPXkffg==", "dependencies": { - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-hex-encoding": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-stream/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-stream/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-buffer-from": "^4.2.0", + "@smithy/util-hex-encoding": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8867,9 +8672,9 @@ } }, "node_modules/@smithy/util-stream/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8878,9 +8683,9 @@ } }, "node_modules/@smithy/util-uri-escape": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.0.0.tgz", - "integrity": "sha512-77yfbCbQMtgtTylO9itEAdpPXSog3ZxMe09AEhm0dU0NLTalV70ghDZFR+Nfi1C60jnJoh/Re4090/DuZh2Omg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", + "integrity": "sha512-igZpCKV9+E/Mzrpq6YacdTQ0qTiLm85gD6N/IrmyDvQFA4UnU3d5g3m8tMT/6zG/vVkWSU+VxeUyGonL62DuxA==", "dependencies": { "tslib": "^2.6.2" }, @@ -8889,11 +8694,11 @@ } }, "node_modules/@smithy/util-utf8": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", - "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.2.0.tgz", + "integrity": "sha512-zBPfuzoI8xyBtR2P6WQj63Rz8i3AmfAaJLuNG8dWsfvPe8lO4aCPYLn879mEgHndZH1zQ2oXmG8O1GGzzaoZiw==", "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-buffer-from": "^4.2.0", "tslib": "^2.6.2" }, "engines": { @@ -8901,34 +8706,33 @@ } }, "node_modules/@smithy/util-waiter": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.0.6.tgz", - "integrity": "sha512-slcr1wdRbX7NFphXZOxtxRNA7hXAAtJAXJDE/wdoMAos27SIquVCKiSqfB6/28YzQ8FCsB5NKkhdM5gMADbqxg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.2.0.tgz", + "integrity": "sha512-0Z+nxUU4/4T+SL8BCNN4ztKdQjToNvUYmkF1kXO5T7Yz3Gafzh0HeIG6mrkN8Fz3gn9hSyxuAT+6h4vM+iQSBQ==", "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/types": "^4.3.1", + "@smithy/abort-controller": "^4.2.0", + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-waiter/node_modules/@smithy/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", + "node_modules/@smithy/util-waiter/node_modules/@smithy/types": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.6.0.tgz", + "integrity": "sha512-4lI9C8NzRPOv66FaY1LL1O/0v0aLVrq/mXP/keUa9mJOApEeae43LsLd2kZRUJw91gxOQfLIrV3OvqPgWz1YsA==", "dependencies": { - "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/util-waiter/node_modules/@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", + "node_modules/@smithy/uuid": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@smithy/uuid/-/uuid-1.1.0.tgz", + "integrity": "sha512-4aUIteuyxtBUhVdiQqcDhKFitwfd9hqoSDYY2KRXiWtgoWJ9Bmise+KfEPDiVHWeJepvF8xJO9/9+WDIciMFFw==", "dependencies": { "tslib": "^2.6.2" }, @@ -8978,11 +8782,10 @@ "dev": true }, "node_modules/@tybys/wasm-util": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.9.0.tgz", - "integrity": "sha512-6+7nlbMVX/PVDCwaIQ8nTOPveOcFLSt8GcXdx8hD0bt39uWxYT88uXzqTd4fTvqta7oeUJqudepapKNt2DYJFw==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", "dev": true, - "license": "MIT", "optional": true, "dependencies": { "tslib": "^2.4.0" @@ -9039,12 +8842,12 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.7.tgz", - "integrity": "sha512-dkO5fhS7+/oos4ciWxyEyjWe48zmG6wbCheo/G2ZnHx4fs3EU6YC6UM8rk56gAjNJ9P3MTH2jo5jb92/K6wbng==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", "dev": true, "dependencies": { - "@babel/types": "^7.20.7" + "@babel/types": "^7.28.2" } }, "node_modules/@types/body-parser": { @@ -9135,8 +8938,13 @@ "version": "2.2.1", "resolved": "https://registry.npmjs.org/@types/encoding-japanese/-/encoding-japanese-2.2.1.tgz", "integrity": "sha512-6jjepuTusvySxMLP7W6usamlbgf0F4sIDvm7EzYePjLHY7zWUv4yz2PLUnu0vuNVtXOTLu2cRdFcDg40J5Owsw==", - "dev": true, - "license": "MIT" + "dev": true + }, + "node_modules/@types/escape-html": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@types/escape-html/-/escape-html-1.0.4.tgz", + "integrity": "sha512-qZ72SFTgUAZ5a7Tj6kf2SHLetiH5S6f8G5frB2SPQ3EyF02kxdyBFf4Tz4banE3xCgGnKgWLt//a6VuYHKYJTg==", + "dev": true }, "node_modules/@types/eslint": { "version": "9.6.1", @@ -9176,9 +8984,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.19.6", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.6.tgz", - "integrity": "sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==", + "version": "4.19.7", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.19.7.tgz", + "integrity": "sha512-FvPtiIf1LfhzsaIXhv/PHan/2FeQBbtBDtfX2QfvPxdUelMDEckK08SM6nqo1MIZY3RUlfA+HV8+hFUSio78qg==", "dependencies": { "@types/node": "*", "@types/qs": "*", @@ -9324,27 +9132,18 @@ "@types/node": "*" } }, - "node_modules/@types/mute-stream": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz", - "integrity": "sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/node": { - "version": "22.15.34", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.15.34.tgz", - "integrity": "sha512-8Y6E5WUupYy1Dd0II32BsWAx5MWdcnRd8L84Oys3veg1YrYtNtzgO4CFhiBg6MDSjk7Ay36HYOnU7/tuOzIzcw==", + "version": "22.18.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.18.8.tgz", + "integrity": "sha512-pAZSHMiagDR7cARo/cch1f3rXy0AEXwsVsVH09FcyeJVAzCnGgmYis7P3JidtTUjyadhTeSo8TgRPswstghDaw==", "dependencies": { "undici-types": "~6.21.0" } }, "node_modules/@types/node-forge": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", - "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", + "version": "1.3.14", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.14.tgz", + "integrity": "sha512-mhVF2BnD4BO+jtOp7z1CdzaK4mbuK0LLQYAvdOLqHTavxFNq4zA1EmYkpnFjP8HOUzedfQkRnp0E2ulSAYSzAw==", "dependencies": { "@types/node": "*" } @@ -9388,11 +9187,10 @@ "integrity": "sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==" }, "node_modules/@types/send": { - "version": "0.17.5", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", - "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.0.tgz", + "integrity": "sha512-zBF6vZJn1IaMpg3xUF25VK3gd3l8zwE0ZLRX7dsQyQi+jp4E8mMDJNGDYnYse+bQhYwWERTxVwHpi3dMOq7RKQ==", "dependencies": { - "@types/mime": "^1", "@types/node": "*" } }, @@ -9405,13 +9203,22 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.8", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.8.tgz", - "integrity": "sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.9.tgz", + "integrity": "sha512-dOTIuqpWLyl3BBXU3maNQsS4A3zuuoYRNIvYSxxhebPfXg2mzWQEPne/nlJ37yOse6uGgR386uTpdsx4D0QZWA==", "dependencies": { "@types/http-errors": "*", "@types/node": "*", - "@types/send": "*" + "@types/send": "<1" + } + }, + "node_modules/@types/serve-static/node_modules/@types/send": { + "version": "0.17.5", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.5.tgz", + "integrity": "sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==", + "dependencies": { + "@types/mime": "^1", + "@types/node": "*" } }, "node_modules/@types/sinon": { @@ -9465,9 +9272,9 @@ "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==" }, "node_modules/@types/vscode": { - "version": "1.101.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.101.0.tgz", - "integrity": "sha512-ZWf0IWa+NGegdW3iU42AcDTFHWW7fApLdkdnBqwYEtHVIBGbTu0ZNQKP/kX3Ds/uMJXIMQNAojHR4vexCEEz5Q==", + "version": "1.104.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.104.0.tgz", + "integrity": "sha512-0KwoU2rZ2ecsTGFxo4K1+f+AErRsYW0fsp6A0zufzGuhyczc2IoKqYqcwXidKXmy2u8YB2GsYsOtiI9Izx3Tig==", "dev": true }, "node_modules/@types/which": { @@ -9476,12 +9283,6 @@ "integrity": "sha512-113D3mDkZDjo+EeUEHCFy0qniNc1ZpecGiAU7WSo7YDoSzolZIQKpYFHrPpjkB2nuyahcKfrmLXeQlh7gqJYdw==", "dev": true }, - "node_modules/@types/wrap-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", - "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==", - "dev": true - }, "node_modules/@types/ws": { "version": "8.18.1", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", @@ -9529,22 +9330,21 @@ "resolved": "https://registry.npmjs.org/@types/yauzl-promise/-/yauzl-promise-4.0.1.tgz", "integrity": "sha512-qYEC3rJwqiJpdQ9b+bPNeuSY0c3JUM8vIuDy08qfuVN7xHm3ZDsHn2kGphUIB0ruEXrPGNXZ64nMUcu4fDjViQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.0.tgz", - "integrity": "sha512-ijItUYaiWuce0N1SoSMrEd0b6b6lYkYt99pqCPfybd+HKVXtEvYhICfLdwp42MhiI5mp0oq7PKEL+g1cNiz/Eg==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.46.0.tgz", + "integrity": "sha512-hA8gxBq4ukonVXPy0OKhiaUh/68D0E88GSmtC1iAEnGaieuDi38LhS7jdCHRLi6ErJBNDGCzvh5EnzdPwUc0DA==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.35.0", - "@typescript-eslint/type-utils": "8.35.0", - "@typescript-eslint/utils": "8.35.0", - "@typescript-eslint/visitor-keys": "8.35.0", + "@typescript-eslint/scope-manager": "8.46.0", + "@typescript-eslint/type-utils": "8.46.0", + "@typescript-eslint/utils": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -9558,21 +9358,21 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.35.0", + "@typescript-eslint/parser": "^8.46.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.35.0.tgz", - "integrity": "sha512-6sMvZePQrnZH2/cJkwRpkT7DxoAWh+g6+GFRK6bV3YQo7ogi3SX5rgF6099r5Q53Ma5qeT7LGmOmuIutF4t3lA==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.46.0.tgz", + "integrity": "sha512-n1H6IcDhmmUEG7TNVSspGmiHHutt7iVKtZwRppD7e04wha5MrkV1h3pti9xQLcCMt6YWsncpoT0HMjkH1FNwWQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.35.0", - "@typescript-eslint/types": "8.35.0", - "@typescript-eslint/typescript-estree": "8.35.0", - "@typescript-eslint/visitor-keys": "8.35.0", + "@typescript-eslint/scope-manager": "8.46.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0", "debug": "^4.3.4" }, "engines": { @@ -9584,17 +9384,17 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.35.0.tgz", - "integrity": "sha512-41xatqRwWZuhUMF/aZm2fcUsOFKNcG28xqRSS6ZVr9BVJtGExosLAm5A1OxTjRMagx8nJqva+P5zNIGt8RIgbQ==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.0.tgz", + "integrity": "sha512-OEhec0mH+U5Je2NZOeK1AbVCdm0ChyapAyTeXVIYTPXDJ3F07+cu87PPXcGoYqZ7M9YJVvFnfpGg1UmCIqM+QQ==", "dev": true, "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.35.0", - "@typescript-eslint/types": "^8.35.0", + "@typescript-eslint/tsconfig-utils": "^8.46.0", + "@typescript-eslint/types": "^8.46.0", "debug": "^4.3.4" }, "engines": { @@ -9605,17 +9405,17 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.35.0.tgz", - "integrity": "sha512-+AgL5+mcoLxl1vGjwNfiWq5fLDZM1TmTPYs2UkyHfFhgERxBbqHlNjRzhThJqz+ktBqTChRYY6zwbMwy0591AA==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.0.tgz", + "integrity": "sha512-lWETPa9XGcBes4jqAMYD9fW0j4n6hrPtTJwWDmtqgFO/4HF4jmdH/Q6wggTw5qIT5TXjKzbt7GsZUBnWoO3dqw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.35.0", - "@typescript-eslint/visitor-keys": "8.35.0" + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -9626,9 +9426,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.35.0.tgz", - "integrity": "sha512-04k/7247kZzFraweuEirmvUj+W3bJLI9fX6fbo1Qm2YykuBvEhRTPl8tcxlYO8kZZW+HIXfkZNoasVb8EV4jpA==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.0.tgz", + "integrity": "sha512-WrYXKGAHY836/N7zoK/kzi6p8tXFhasHh8ocFL9VZSAkvH956gfeRfcnhs3xzRy8qQ/dq3q44v1jvQieMFg2cw==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -9638,17 +9438,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.35.0.tgz", - "integrity": "sha512-ceNNttjfmSEoM9PW87bWLDEIaLAyR+E6BoYJQ5PfaDau37UGca9Nyq3lBk8Bw2ad0AKvYabz6wxc7DMTO2jnNA==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.46.0.tgz", + "integrity": "sha512-hy+lvYV1lZpVs2jRaEYvgCblZxUoJiPyCemwbQZ+NGulWkQRy0HRPYAoef/CNSzaLt+MLvMptZsHXHlkEilaeg==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "8.35.0", - "@typescript-eslint/utils": "8.35.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0", + "@typescript-eslint/utils": "8.46.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -9661,13 +9462,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.35.0.tgz", - "integrity": "sha512-0mYH3emanku0vHw2aRLNGqe7EXh9WHEhi7kZzscrMDf6IIRUQ5Jk4wp1QrledE/36KtdZrVfKnE32eZCf/vaVQ==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.0.tgz", + "integrity": "sha512-bHGGJyVjSE4dJJIO5yyEWt/cHyNwga/zXGJbJJ8TiO01aVREK6gCTu3L+5wrkb1FbDkQ+TKjMNe9R/QQQP9+rA==", "dev": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -9678,15 +9479,15 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.35.0.tgz", - "integrity": "sha512-F+BhnaBemgu1Qf8oHrxyw14wq6vbL8xwWKKMwTMwYIRmFFY/1n/9T/jpbobZL8vp7QyEUcC6xGrnAO4ua8Kp7w==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.0.tgz", + "integrity": "sha512-ekDCUfVpAKWJbRfm8T1YRrCot1KFxZn21oV76v5Fj4tr7ELyk84OS+ouvYdcDAwZL89WpEkEj2DKQ+qg//+ucg==", "dev": true, "dependencies": { - "@typescript-eslint/project-service": "8.35.0", - "@typescript-eslint/tsconfig-utils": "8.35.0", - "@typescript-eslint/types": "8.35.0", - "@typescript-eslint/visitor-keys": "8.35.0", + "@typescript-eslint/project-service": "8.46.0", + "@typescript-eslint/tsconfig-utils": "8.46.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/visitor-keys": "8.46.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -9702,31 +9503,19 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/utils": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.35.0.tgz", - "integrity": "sha512-nqoMu7WWM7ki5tPgLVsmPM8CkqtoPUG6xXGeefM5t4x3XumOEKMoUZPdi+7F+/EotukN4R9OWdmDxN80fqoZeg==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.0.tgz", + "integrity": "sha512-nD6yGWPj1xiOm4Gk0k6hLSZz2XkNXhuYmyIrOWcHoPuAhjT9i5bAG+xbWPgFeNR8HPHHtpNKdYUXJl/D3x7f5g==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.35.0", - "@typescript-eslint/types": "8.35.0", - "@typescript-eslint/typescript-estree": "8.35.0" + "@typescript-eslint/scope-manager": "8.46.0", + "@typescript-eslint/types": "8.46.0", + "@typescript-eslint/typescript-estree": "8.46.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -9737,16 +9526,16 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.35.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.35.0.tgz", - "integrity": "sha512-zTh2+1Y8ZpmeQaQVIc/ZZxsx8UzgKJyNg1PTvjzC7WMhPSVS8bfDX34k1SrwOf016qd5RU3az2UxUNue3IfQ5g==", + "version": "8.46.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.0.tgz", + "integrity": "sha512-FrvMpAK+hTbFy7vH5j1+tMYHMSKLE6RzluFJlkFNKD0p9YsUT75JlBSmr5so3QRzvMwU5/bIEdeNrxm8du8l3Q==", "dev": true, "dependencies": { - "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/types": "8.46.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -9802,34 +9591,30 @@ } }, "node_modules/@wdio/cli": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/cli/-/cli-9.16.2.tgz", - "integrity": "sha512-mb17CsZ+mM5WBSDA3/Nx0snCitqTWyRVzRfTjP1yOMMgVmc6toZ8b7Nfbv30nvn/bZiZ/jQFAL2SyafpJEMYcw==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/cli/-/cli-9.20.0.tgz", + "integrity": "sha512-dGkZFp09aIyoN6HlJah7zJApG/FzN0O/HaTfTkWrOM5GBli9th/9VIfbsT3vx4I9mBdETiYPmgfl4LqDP2p0VQ==", "dev": true, "dependencies": { - "@types/node": "^20.1.1", "@vitest/snapshot": "^2.1.1", - "@wdio/config": "9.16.2", - "@wdio/globals": "9.16.2", - "@wdio/logger": "9.16.2", + "@wdio/config": "9.20.0", + "@wdio/globals": "9.17.0", + "@wdio/logger": "9.18.0", "@wdio/protocols": "9.16.2", - "@wdio/types": "9.16.2", - "@wdio/utils": "9.16.2", + "@wdio/types": "9.20.0", + "@wdio/utils": "9.20.0", "async-exit-hook": "^2.0.1", - "chalk": "^5.2.0", + "chalk": "^5.4.1", "chokidar": "^4.0.0", - "dotenv": "^16.3.1", - "ejs": "^3.1.9", - "execa": "^9.2.0", + "create-wdio": "9.18.2", + "dotenv": "^17.2.0", "import-meta-resolve": "^4.0.0", - "inquirer": "^11.0.1", "lodash.flattendeep": "^4.4.0", "lodash.pickby": "^4.6.0", "lodash.union": "^4.6.0", "read-pkg-up": "^10.0.0", - "recursive-readdir": "^2.2.3", "tsx": "^4.7.2", - "webdriverio": "9.16.2", + "webdriverio": "9.20.0", "yargs": "^17.7.2" }, "bin": { @@ -9839,167 +9624,190 @@ "node": ">=18.20.0" } }, - "node_modules/@wdio/cli/node_modules/@types/node": { - "version": "20.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.2.tgz", - "integrity": "sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==", - "dev": true, - "dependencies": { - "undici-types": "~6.21.0" - } - }, - "node_modules/@wdio/cli/node_modules/execa": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-9.6.0.tgz", - "integrity": "sha512-jpWzZ1ZhwUmeWRhS7Qv3mhpOhLfwI+uAX4e5fOcXqwMR7EcJ0pj2kV1CVzHVMX/LphnKWD3LObjZCoJ71lKpHw==", + "node_modules/@wdio/cli/node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", "dev": true, "dependencies": { - "@sindresorhus/merge-streams": "^4.0.0", - "cross-spawn": "^7.0.6", - "figures": "^6.1.0", - "get-stream": "^9.0.0", - "human-signals": "^8.0.1", - "is-plain-obj": "^4.1.0", - "is-stream": "^4.0.1", - "npm-run-path": "^6.0.0", - "pretty-ms": "^9.2.0", - "signal-exit": "^4.1.0", - "strip-final-newline": "^4.0.0", - "yoctocolors": "^2.1.1" + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" }, "engines": { - "node": "^18.19.0 || >=20.5.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@wdio/cli/node_modules/get-stream": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", - "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", + "node_modules/@wdio/cli/node_modules/hosted-git-info": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", "dev": true, "dependencies": { - "@sec-ant/readable-stream": "^0.4.1", - "is-stream": "^4.0.1" + "lru-cache": "^10.0.1" }, "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@wdio/cli/node_modules/human-signals": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.1.tgz", - "integrity": "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==", + "node_modules/@wdio/cli/node_modules/json-parse-even-better-errors": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", "dev": true, "engines": { - "node": ">=18.18.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/@wdio/cli/node_modules/is-plain-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", - "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", + "node_modules/@wdio/cli/node_modules/lines-and-columns": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", + "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", "dev": true, "engines": { - "node": ">=12" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/@wdio/cli/node_modules/normalize-package-data": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", + "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", + "dev": true, + "dependencies": { + "hosted-git-info": "^7.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/@wdio/cli/node_modules/is-stream": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", - "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", + "node_modules/@wdio/cli/node_modules/parse-json": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.1.tgz", + "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", "dev": true, + "dependencies": { + "@babel/code-frame": "^7.21.4", + "error-ex": "^1.3.2", + "json-parse-even-better-errors": "^3.0.0", + "lines-and-columns": "^2.0.3", + "type-fest": "^3.8.0" + }, "engines": { - "node": ">=18" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@wdio/cli/node_modules/npm-run-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", - "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", + "node_modules/@wdio/cli/node_modules/parse-json/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", "dev": true, - "dependencies": { - "path-key": "^4.0.0", - "unicorn-magic": "^0.3.0" - }, "engines": { - "node": ">=18" + "node": ">=14.16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@wdio/cli/node_modules/path-key": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", - "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "node_modules/@wdio/cli/node_modules/read-pkg": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-8.1.0.tgz", + "integrity": "sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==", "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.1", + "normalize-package-data": "^6.0.0", + "parse-json": "^7.0.0", + "type-fest": "^4.2.0" + }, "engines": { - "node": ">=12" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@wdio/cli/node_modules/strip-final-newline": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", - "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", + "node_modules/@wdio/cli/node_modules/read-pkg-up": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-10.1.0.tgz", + "integrity": "sha512-aNtBq4jR8NawpKJQldrQcSW9y/d+KWH4v24HWkHljOZ7H0av+YTGANBzRh9A5pw7v/bLVsLVPpOhJ7gHNVy8lA==", "dev": true, + "dependencies": { + "find-up": "^6.3.0", + "read-pkg": "^8.1.0", + "type-fest": "^4.2.0" + }, "engines": { - "node": ">=18" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@wdio/cli/node_modules/unicorn-magic": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", - "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "node_modules/@wdio/cli/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", "dev": true, "engines": { - "node": ">=18" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/@wdio/config": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/config/-/config-9.16.2.tgz", - "integrity": "sha512-a7zDSNzpGgkb6mWrg9GWPmvh/sZFzaf86/iBjCv+n2DTY0+8v8NLruRQmWuCaQAlLVhM3XAqmB+fWLqxDhdvOA==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/config/-/config-9.20.0.tgz", + "integrity": "sha512-ggwd3EMsVj/LTcbYw2h+hma+/7fQ1cTXMuy9B5WTkLjDlOtbLjsqs9QLt4BLIo1cdsxvAw/UVpRVUuYy7rTmtQ==", "dev": true, "dependencies": { - "@wdio/logger": "9.16.2", - "@wdio/types": "9.16.2", - "@wdio/utils": "9.16.2", + "@wdio/logger": "9.18.0", + "@wdio/types": "9.20.0", + "@wdio/utils": "9.20.0", "deepmerge-ts": "^7.0.3", "glob": "^10.2.2", - "import-meta-resolve": "^4.0.0" + "import-meta-resolve": "^4.0.0", + "jiti": "^2.5.1" }, "engines": { "node": ">=18.20.0" } }, + "node_modules/@wdio/config/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@wdio/dot-reporter": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/dot-reporter/-/dot-reporter-9.16.2.tgz", - "integrity": "sha512-JzFegviZdpzgvt8w8uwI0pyJguIuJzfzlkkyWz1WUoqtilH4yrf5IYKzObnm3peh7iQ/y2J1SSeAjKr0Hr5xTg==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/dot-reporter/-/dot-reporter-9.20.0.tgz", + "integrity": "sha512-lRhihDQ56dApJcKOIEkVHThl8t2e5h7f3FW3JVmMLcGgbbkkLgXqVWPpbEGJcLld3wL4CipAPojVE/YEWp80hw==", "dev": true, "dependencies": { - "@wdio/reporter": "9.16.2", - "@wdio/types": "9.16.2", + "@wdio/reporter": "9.20.0", + "@wdio/types": "9.20.0", "chalk": "^5.0.1" }, "engines": { @@ -10007,15 +9815,15 @@ } }, "node_modules/@wdio/globals": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/globals/-/globals-9.16.2.tgz", - "integrity": "sha512-PBPBfNPIVC76g6IXadZQeqo6TwjVnfCW31PBVgYsTuhb1MB2wQi00rkBP8JFndr7C0Lhyce+gdIJl6VXURO0FA==", + "version": "9.17.0", + "resolved": "https://registry.npmjs.org/@wdio/globals/-/globals-9.17.0.tgz", + "integrity": "sha512-i38o7wlipLllNrk2hzdDfAmk6nrqm3lR2MtAgWgtHbwznZAKkB84KpkNFfmUXw5Kg3iP1zKlSjwZpKqenuLc+Q==", "dev": true, "engines": { "node": ">=18.20.0" }, "peerDependencies": { - "expect-webdriverio": "^5.3.2", + "expect-webdriverio": "^5.3.4", "webdriverio": "^9.0.0" }, "peerDependenciesMeta": { @@ -10028,18 +9836,19 @@ } }, "node_modules/@wdio/local-runner": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/local-runner/-/local-runner-9.16.2.tgz", - "integrity": "sha512-ChHTXXknq8hDXhyMjjtWiPqsXenyvxrHqqgq3zDI8EXuGNjVfG6/CzcKXyry7LBXq2Bu78LoymKfvoLdZu+7JQ==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/local-runner/-/local-runner-9.20.0.tgz", + "integrity": "sha512-Q2zuSlWVf/GEuzV1c5xGHSH8Y/l9GXZQBZgXeNLp9unVMP4dqQToHgadMihW+8owdva7LVMjoGa2dxcdE6m8HQ==", "dev": true, "dependencies": { "@types/node": "^20.1.0", - "@wdio/logger": "9.16.2", + "@wdio/logger": "9.18.0", "@wdio/repl": "9.16.2", - "@wdio/runner": "9.16.2", - "@wdio/types": "9.16.2", + "@wdio/runner": "9.20.0", + "@wdio/types": "9.20.0", + "@wdio/xvfb": "9.20.0", "exit-hook": "^4.0.0", - "expect-webdriverio": "^5.3.2", + "expect-webdriverio": "^5.3.4", "split2": "^4.1.0", "stream-buffers": "^3.0.2" }, @@ -10048,23 +9857,24 @@ } }, "node_modules/@wdio/local-runner/node_modules/@types/node": { - "version": "20.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.2.tgz", - "integrity": "sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==", + "version": "20.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", + "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "dev": true, "dependencies": { "undici-types": "~6.21.0" } }, "node_modules/@wdio/logger": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-9.16.2.tgz", - "integrity": "sha512-6A1eVpNPToWupLIo8CXStth4HJGTfxKsAiKtwE0xQFKyDM8uPTm3YO3Nf15vCSHbmsncbYVEo7QrUwRUEB4YUg==", + "version": "9.18.0", + "resolved": "https://registry.npmjs.org/@wdio/logger/-/logger-9.18.0.tgz", + "integrity": "sha512-HdzDrRs+ywAqbXGKqe1i/bLtCv47plz4TvsHFH3j729OooT5VH38ctFn5aLXgECmiAKDkmH/A6kOq2Zh5DIxww==", "dev": true, "dependencies": { "chalk": "^5.1.2", "loglevel": "^1.6.0", "loglevel-plugin-prefix": "^0.8.4", + "safe-regex2": "^5.0.0", "strip-ansi": "^7.1.0" }, "engines": { @@ -10072,9 +9882,9 @@ } }, "node_modules/@wdio/logger/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "engines": { "node": ">=12" @@ -10084,9 +9894,9 @@ } }, "node_modules/@wdio/logger/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "dependencies": { "ansi-regex": "^6.0.1" @@ -10099,16 +9909,16 @@ } }, "node_modules/@wdio/mocha-framework": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/mocha-framework/-/mocha-framework-9.16.2.tgz", - "integrity": "sha512-t+SxdS539Gy0iYudmCWV8FSDGQLdTKR8dnYTaPePCGXI3kkeh95h9ODloLOITOi/ndjLe5vsFH/Vd5rBr12rFA==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/mocha-framework/-/mocha-framework-9.20.0.tgz", + "integrity": "sha512-kqLaGJ2okdNyOjBsTJcmZ9fvl2nrcdbgaXHk9V1znhAzuHiTEPicaIRPG5T0Itb/vOKb72rp0BdisuJ/PBfs7g==", "dev": true, "dependencies": { "@types/mocha": "^10.0.6", "@types/node": "^20.11.28", - "@wdio/logger": "9.16.2", - "@wdio/types": "9.16.2", - "@wdio/utils": "9.16.2", + "@wdio/logger": "9.18.0", + "@wdio/types": "9.20.0", + "@wdio/utils": "9.20.0", "mocha": "^10.3.0" }, "engines": { @@ -10116,29 +9926,14 @@ } }, "node_modules/@wdio/mocha-framework/node_modules/@types/node": { - "version": "20.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.2.tgz", - "integrity": "sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==", + "version": "20.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", + "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "dev": true, "dependencies": { "undici-types": "~6.21.0" } }, - "node_modules/@wdio/mocha-framework/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/@wdio/mocha-framework/node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -10183,12 +9978,6 @@ "node": ">=0.3.1" } }, - "node_modules/@wdio/mocha-framework/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "node_modules/@wdio/mocha-framework/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -10237,8 +10026,17 @@ "node": ">= 6" } }, - "node_modules/@wdio/mocha-framework/node_modules/locate-path": { - "version": "6.0.0", + "node_modules/@wdio/mocha-framework/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@wdio/mocha-framework/node_modules/locate-path": { + "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, @@ -10299,6 +10097,21 @@ "node": ">= 14.0.0" } }, + "node_modules/@wdio/mocha-framework/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@wdio/mocha-framework/node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -10323,18 +10136,6 @@ "node": ">=8" } }, - "node_modules/@wdio/mocha-framework/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/@wdio/mocha-framework/node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -10382,23 +10183,6 @@ "integrity": "sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA==", "dev": true }, - "node_modules/@wdio/mocha-framework/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/@wdio/mocha-framework/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -10426,6 +10210,18 @@ "node": ">=10" } }, + "node_modules/@wdio/mocha-framework/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@wdio/protocols": { "version": "9.16.2", "resolved": "https://registry.npmjs.org/@wdio/protocols/-/protocols-9.16.2.tgz", @@ -10445,24 +10241,24 @@ } }, "node_modules/@wdio/repl/node_modules/@types/node": { - "version": "20.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.2.tgz", - "integrity": "sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==", + "version": "20.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", + "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "dev": true, "dependencies": { "undici-types": "~6.21.0" } }, "node_modules/@wdio/reporter": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/reporter/-/reporter-9.16.2.tgz", - "integrity": "sha512-th+APMRuK03OzpiJKnfhCwnXoJb57mRmP/NQYGc+k9GEF3Z3yPDD7LxnBlwPANGxt/hdzirQ6OvQyJYLwpmmuQ==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/reporter/-/reporter-9.20.0.tgz", + "integrity": "sha512-HjKJzm8o0MCcnwGVGprzaCAyau0OB8mWHwH1ZI/ka+z1nmVBr2tsr7H53SdHsGIhAg/XuZObobqdzeVF63ApeA==", "dev": true, "dependencies": { "@types/node": "^20.1.0", - "@wdio/logger": "9.16.2", - "@wdio/types": "9.16.2", - "diff": "^7.0.0", + "@wdio/logger": "9.18.0", + "@wdio/types": "9.20.0", + "diff": "^8.0.2", "object-inspect": "^1.12.0" }, "engines": { @@ -10470,36 +10266,45 @@ } }, "node_modules/@wdio/reporter/node_modules/@types/node": { - "version": "20.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.2.tgz", - "integrity": "sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==", + "version": "20.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", + "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "dev": true, "dependencies": { "undici-types": "~6.21.0" } }, + "node_modules/@wdio/reporter/node_modules/diff": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-8.0.2.tgz", + "integrity": "sha512-sSuxWU5j5SR9QQji/o2qMvqRNYRDOcBTgsJ/DeCf4iSN4gW+gNMXM7wFIP+fdXZxoNiAnHUTGjCr+TSWXdRDKg==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/@wdio/runner": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/runner/-/runner-9.16.2.tgz", - "integrity": "sha512-cETsJivOD2yzJfzwKi1n7NNXL3zF/yTcA+578fiu48iGVmhOJNhgW9sv4oVH/aDCt09PPUZw6DEBOT3mcKDSGw==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/runner/-/runner-9.20.0.tgz", + "integrity": "sha512-z6CFANs5F02ww5mDTF1WUc1DA2mqJiCPKGr+xNXhpd3YH+537aFSsjww/S5SO4gFlAwf0cQiQZTKWUY3uJUGJQ==", "dev": true, "dependencies": { "@types/node": "^20.11.28", - "@wdio/config": "9.16.2", - "@wdio/dot-reporter": "9.16.2", - "@wdio/globals": "9.16.2", - "@wdio/logger": "9.16.2", - "@wdio/types": "9.16.2", - "@wdio/utils": "9.16.2", + "@wdio/config": "9.20.0", + "@wdio/dot-reporter": "9.20.0", + "@wdio/globals": "9.17.0", + "@wdio/logger": "9.18.0", + "@wdio/types": "9.20.0", + "@wdio/utils": "9.20.0", "deepmerge-ts": "^7.0.3", - "webdriver": "9.16.2", - "webdriverio": "9.16.2" + "webdriver": "9.20.0", + "webdriverio": "9.20.0" }, "engines": { "node": ">=18.20.0" }, "peerDependencies": { - "expect-webdriverio": "^5.3.2", + "expect-webdriverio": "^5.3.4", "webdriverio": "^9.0.0" }, "peerDependenciesMeta": { @@ -10512,22 +10317,22 @@ } }, "node_modules/@wdio/runner/node_modules/@types/node": { - "version": "20.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.2.tgz", - "integrity": "sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==", + "version": "20.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", + "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "dev": true, "dependencies": { "undici-types": "~6.21.0" } }, "node_modules/@wdio/spec-reporter": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/spec-reporter/-/spec-reporter-9.16.2.tgz", - "integrity": "sha512-14HhLSvc+sHns0v07yL8MTfd9BVQ1VhEsywQFA6RbFvKc5PkyoLcxmQSzcH0FOjHhXAfwBh6YxL1mbJwy6+L+w==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/spec-reporter/-/spec-reporter-9.20.0.tgz", + "integrity": "sha512-YHj3kF86RoOVVR+k3eb+e/Fki6Mq1FIrJQ380Cz5SSWbIc9gL8HXG3ydReldY6/80KLFOuHn9ZHvDHrCIXRjiw==", "dev": true, "dependencies": { - "@wdio/reporter": "9.16.2", - "@wdio/types": "9.16.2", + "@wdio/reporter": "9.20.0", + "@wdio/types": "9.20.0", "chalk": "^5.1.2", "easy-table": "^1.2.0", "pretty-ms": "^9.0.0" @@ -10537,9 +10342,9 @@ } }, "node_modules/@wdio/types": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/types/-/types-9.16.2.tgz", - "integrity": "sha512-P86FvM/4XQGpJKwlC2RKF3I21TglPvPOozJGG9HoL0Jmt6jRF20ggO/nRTxU0XiWkRdqESUTmfA87bdCO4GRkQ==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/types/-/types-9.20.0.tgz", + "integrity": "sha512-zMmAtse2UMCSOW76mvK3OejauAdcFGuKopNRH7crI0gwKTZtvV89yXWRziz9cVXpFgfmJCjf9edxKFWdhuF5yw==", "dev": true, "dependencies": { "@types/node": "^20.1.0" @@ -10549,30 +10354,31 @@ } }, "node_modules/@wdio/types/node_modules/@types/node": { - "version": "20.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.2.tgz", - "integrity": "sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==", + "version": "20.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", + "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "dev": true, "dependencies": { "undici-types": "~6.21.0" } }, "node_modules/@wdio/utils": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-9.16.2.tgz", - "integrity": "sha512-bsRdEUXUTYvznXH/Z+p6HDzHSjMI6I6bnu8WXWTeDDDyqybWK5D8cbZvs8A/kMmGXoz1GZkSBHxy4Z5NTg8OQg==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/utils/-/utils-9.20.0.tgz", + "integrity": "sha512-T1ze005kncUTocYImSBQc/FAVcOwP/vOU4MDJFgzz/RTcps600qcKX98sVdWM5/ukXCVkjOufWteDHIbX5/tEA==", "dev": true, "dependencies": { "@puppeteer/browsers": "^2.2.0", - "@wdio/logger": "9.16.2", - "@wdio/types": "9.16.2", + "@wdio/logger": "9.18.0", + "@wdio/types": "9.20.0", "decamelize": "^6.0.0", "deepmerge-ts": "^7.0.3", - "edgedriver": "^6.1.1", + "edgedriver": "^6.1.2", "geckodriver": "^5.0.0", "get-port": "^7.0.0", "import-meta-resolve": "^4.0.0", "locate-app": "^2.2.24", + "mitt": "^3.0.1", "safaridriver": "^1.0.0", "split2": "^4.2.0", "wait-port": "^1.1.0" @@ -10582,9 +10388,9 @@ } }, "node_modules/@wdio/utils/node_modules/decamelize": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz", - "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.1.tgz", + "integrity": "sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==", "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -10593,6 +10399,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@wdio/xvfb": { + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/@wdio/xvfb/-/xvfb-9.20.0.tgz", + "integrity": "sha512-shllZH9CsLiZqTXkqBTJrwi6k/ajBE7/78fQgvafMUIQU1Hpb2RdsmydKfPFZ5NDoA+LNm67PD2cPkvkXy4pSw==", + "dev": true, + "dependencies": { + "@wdio/logger": "9.18.0" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", @@ -10796,14 +10614,14 @@ "devOptional": true }, "node_modules/@zip.js/zip.js": { - "version": "2.7.62", - "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.7.62.tgz", - "integrity": "sha512-OaLvZ8j4gCkLn048ypkZu29KX30r8/OfFF2w4Jo5WXFr+J04J+lzJ5TKZBVgFXhlvSkqNFQdfnY1Q8TMTCyBVA==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.7.tgz", + "integrity": "sha512-8daf29EMM3gUpH/vSBSCYo2bY/wbamgRPxPpE2b+cDnbOLBHAcZikWad79R4Guemth/qtipzEHrZMq1lFXxWIA==", "dev": true, "engines": { "bun": ">=0.7.0", "deno": ">=1.0.0", - "node": ">=16.5.0" + "node": ">=18.0.0" } }, "node_modules/abbrev": { @@ -10835,6 +10653,17 @@ "node": ">= 0.6" } }, + "node_modules/accepts/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", @@ -10847,6 +10676,18 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-import-phases": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/acorn-import-phases/-/acorn-import-phases-1.0.4.tgz", + "integrity": "sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==", + "devOptional": true, + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "acorn": "^8.14.0" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -10877,9 +10718,9 @@ } }, "node_modules/agent-base": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", - "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", "engines": { "node": ">= 14" } @@ -10950,6 +10791,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ansi-html-community": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz", @@ -10970,38 +10823,38 @@ } }, "node_modules/ansi-styles": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", - "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", - "dev": true, + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=10" + "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/antlr4-c3": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/antlr4-c3/-/antlr4-c3-3.4.2.tgz", - "integrity": "sha512-rISIjeelkeun6Y/YrdVqWtJBDg7SRT9d0Cqov8f6vGe5O5w8wY9HE00jcdevcRjwYOSExHjFi/gUqC3BMSvBuQ==", + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/antlr4-c3/-/antlr4-c3-3.4.4.tgz", + "integrity": "sha512-ixp1i17ypbRzZnffdarIfCVEXJwPydtDt61SHMGkc+UCD7rrbfvHESTMTgx8jFhUgKAgcHyt9060kQ8nU3vlxA==", "dependencies": { - "antlr4ng": "3.0.14" + "antlr4ng": "3.0.16" } }, "node_modules/antlr4ng": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/antlr4ng/-/antlr4ng-3.0.14.tgz", - "integrity": "sha512-EVEn3B3zpxgbq/731dhwMYCls9e8mAudBvo479hoXbX/yTL24Do1HNZEU+v1U6GayIFrow5EcHMdyXqqRXTtBw==", - "peerDependencies": { - "antlr4ng-cli": "^2.0.0" - } + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/antlr4ng/-/antlr4ng-3.0.16.tgz", + "integrity": "sha512-DQuJkC7kX3xunfF4K2KsWTSvoxxslv+FQp/WHQZTJSsH2Ec3QfFmrxC3Nky2ok9yglXn6nHM4zUaVDxcN5f6kA==" }, "node_modules/antlr4ng-cli": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/antlr4ng-cli/-/antlr4ng-cli-2.0.0.tgz", "integrity": "sha512-oAt5OSSYhRQn1PgahtpAP4Vp3BApCoCqlzX7Q8ZUWWls4hX59ryYuu0t7Hwrnfk796OxP/vgIJaqxdltd/oEvQ==", "deprecated": "This package is deprecated and will no longer be updated. Please use the new antlr-ng package instead: https://github.com/mike-lischke/antlr-ng", + "dev": true, "bin": { "antlr4ng": "index.js" } @@ -11018,22 +10871,10 @@ "node": ">= 8" } }, - "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", - "license": "ISC" + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" }, "node_modules/archiver": { "version": "7.0.1", @@ -11069,75 +10910,208 @@ "node": ">= 14" } }, - "node_modules/are-we-there-yet": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", - "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", - "deprecated": "This package is no longer supported.", - "license": "ISC", + "node_modules/archiver-utils/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" } }, - "node_modules/are-we-there-yet/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "license": "MIT", + "node_modules/archiver-utils/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/are-we-there-yet/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT" - }, - "node_modules/are-we-there-yet/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "license": "MIT", + "node_modules/archiver-utils/node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", "dependencies": { - "safe-buffer": "~5.1.0" + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "node_modules/archiver-utils/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, - "node_modules/args": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/args/-/args-5.0.3.tgz", - "integrity": "sha512-h6k/zfFgusnv3i5TU08KQkVKuCPBtL/PWQbWkHUxvJrZ2nAyeaUupneemcrgn1xmqxPQsPIzwkUhOpoqPDRZuA==", - "dev": true, + "node_modules/archiver-utils/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dependencies": { - "camelcase": "5.0.0", - "chalk": "2.4.2", - "leven": "2.1.0", - "mri": "1.1.4" - }, - "engines": { - "node": ">= 6.0.0" + "safe-buffer": "~5.2.0" } }, - "node_modules/args/node_modules/ansi-styles": { + "node_modules/archiver/node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" + }, + "node_modules/archiver/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/archiver/node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/archiver/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/archiver/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/archiver/node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, + "node_modules/are-we-there-yet": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "deprecated": "This package is no longer supported.", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/args": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/args/-/args-5.0.3.tgz", + "integrity": "sha512-h6k/zfFgusnv3i5TU08KQkVKuCPBtL/PWQbWkHUxvJrZ2nAyeaUupneemcrgn1xmqxPQsPIzwkUhOpoqPDRZuA==", + "dev": true, + "dependencies": { + "camelcase": "5.0.0", + "chalk": "2.4.2", + "leven": "2.1.0", + "mri": "1.1.4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/args/node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", @@ -11436,9 +11410,9 @@ } }, "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", + "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" }, "node_modules/async-exit-hook": { "version": "2.0.1", @@ -11494,44 +11468,14 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/aws-sdk": { - "version": "2.1692.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1692.0.tgz", - "integrity": "sha512-x511uiJ/57FIsbgUe5csJ13k3uzu25uWQE+XqfBis/sB0SFoiElJWXRkgEAUh0U6n40eT3ay5Ue4oPkRMu1LYw==", - "hasInstallScript": true, - "dependencies": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.16.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "util": "^0.12.4", - "uuid": "8.0.0", - "xml2js": "0.6.2" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/aws-sdk/node_modules/uuid": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.0.0.tgz", - "integrity": "sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/awsdocuments-ls-client": { "resolved": "client/vscode", "link": true }, "node_modules/axios": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.11.0.tgz", - "integrity": "sha512-1Lx3WLFQWm3ooKDYZD1eXmoGO9fxYQjrycfHFC8P0sCfQVXyROp0p9PFWBehewBOdCwHc+f/b8I0fMto5eSfwA==", - "license": "MIT", + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz", + "integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", @@ -11539,9 +11483,17 @@ } }, "node_modules/b4a": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", - "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==" + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", + "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==", + "peerDependencies": { + "react-native-b4a": "*" + }, + "peerDependenciesMeta": { + "react-native-b4a": { + "optional": true + } + } }, "node_modules/babel-jest": { "version": "29.7.0", @@ -11564,21 +11516,6 @@ "@babel/core": "^7.8.0" } }, - "node_modules/babel-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/babel-jest/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -11621,27 +11558,6 @@ "concat-map": "0.0.1" } }, - "node_modules/babel-plugin-istanbul/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/babel-plugin-istanbul/node_modules/istanbul-lib-instrument": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", @@ -11670,6 +11586,15 @@ "node": "*" } }, + "node_modules/babel-plugin-istanbul/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/babel-plugin-istanbul/node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -11713,9 +11638,9 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", - "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", "dev": true, "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", @@ -11735,7 +11660,7 @@ "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0 || ^8.0.0-0" } }, "node_modules/babel-preset-jest": { @@ -11760,21 +11685,22 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/bare-events": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.4.tgz", - "integrity": "sha512-+gFfDkR8pj4/TrWCGUGWmJIkBwuxPS5F+a5yWjOHQt2hHvNZd5YLzadjmDUtFmMM4y429bnKLa8bYBMHcYdnQA==", - "optional": true + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.7.0.tgz", + "integrity": "sha512-b3N5eTW1g7vXkw+0CXh/HazGTcO5KYuu/RCNaJbDMPI6LHDi+7qe8EmxKUVe1sUbY2KZOVZFyj62x0OEz9qyAA==" }, "node_modules/bare-fs": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.1.5.tgz", - "integrity": "sha512-1zccWBMypln0jEE05LzZt+V/8y8AQsQQqxtklqaIyg5nu6OAYFhZxPXinJTSG+kU5qyNmeLgcn9AW7eHiCHVLA==", + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.4.5.tgz", + "integrity": "sha512-TCtu93KGLu6/aiGWzMr12TmSRS6nKdfhAnzTQRbXoSWxkbb9eRd53jQ51jG7g1gYjjtto3hbBrrhzg6djcgiKg==", "dev": true, "optional": true, "dependencies": { "bare-events": "^2.5.4", "bare-path": "^3.0.0", - "bare-stream": "^2.6.4" + "bare-stream": "^2.6.4", + "bare-url": "^2.2.2", + "fast-fifo": "^1.3.2" }, "engines": { "bare": ">=1.16.0" @@ -11789,9 +11715,9 @@ } }, "node_modules/bare-os": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.1.tgz", - "integrity": "sha512-uaIjxokhFidJP+bmmvKSgiMzj2sV5GPHaZVAIktcxcpCyBFFWO+YlikVAdhmUo2vYFvFhOXIAlldqV29L8126g==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.2.tgz", + "integrity": "sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A==", "dev": true, "optional": true, "engines": { @@ -11809,9 +11735,9 @@ } }, "node_modules/bare-stream": { - "version": "2.6.5", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.6.5.tgz", - "integrity": "sha512-jSmxKJNJmHySi6hC42zlZnq00rga4jjxcgNZjY9N5WlOe/iOoGRtdwGsHzQv2RlH2KOYMwGUXhf2zXd32BA9RA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.7.0.tgz", + "integrity": "sha512-oyXQNicV1y8nc2aKffH+BUHFRXmx6VrPzlnaEvMhram0nPBrKcEdcyBg5r08D0i8VxngHFAiVyn1QKXpSG0B8A==", "dev": true, "optional": true, "dependencies": { @@ -11830,6 +11756,16 @@ } } }, + "node_modules/bare-url": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.2.2.tgz", + "integrity": "sha512-g+ueNGKkrjMazDG3elZO1pNs3HY5+mMmOet1jtKyhOaCnkLzitxf26z7hoAEkDNgdNmnc1KIlt/dw6Po6xZMpA==", + "dev": true, + "optional": true, + "dependencies": { + "bare-path": "^3.0.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -11849,6 +11785,15 @@ } ] }, + "node_modules/baseline-browser-mapping": { + "version": "2.8.13", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.13.tgz", + "integrity": "sha512-7s16KR8io8nIBWQyCYhmFhd+ebIzb9VKTzki+wOJXHTxTnV6+mFGH3+Jwn1zoKaY9/H9T/0BcKCZnzXljPnpSQ==", + "devOptional": true, + "bin": { + "baseline-browser-mapping": "dist/cli.js" + } + }, "node_modules/basic-ftp": { "version": "5.0.5", "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", @@ -11887,42 +11832,16 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "license": "MIT", "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" } }, - "node_modules/bl/node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "node_modules/bl/node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -12006,16 +11925,6 @@ "node": ">=0.10.0" } }, - "node_modules/bower-json/node_modules/deep-extend": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", - "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, "node_modules/bower-license": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/bower-license/-/bower-license-0.4.4.tgz", @@ -12082,9 +11991,9 @@ } }, "node_modules/bowser": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", - "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.12.1.tgz", + "integrity": "sha512-z4rE2Gxh7tvshQ4hluIT7XcFrgLIQaw9X3A+kTTRdovCz5PMukm/0QC/BKSYPj3omF5Qfypn9O/c5kgpmvYUCw==" }, "node_modules/brace-expansion": { "version": "2.0.2", @@ -12163,62 +12072,67 @@ "node": ">= 0.10" } }, + "node_modules/browserify-rsa/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/browserify-sign": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.3.tgz", - "integrity": "sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==", + "version": "4.2.5", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.5.tgz", + "integrity": "sha512-C2AUdAJg6rlM2W5QMp2Q4KGQMVBwR1lIimTsUnutJ8bMpW5B52pGpR2gEnNBNwijumDo5FojQ0L9JrXA8m4YEw==", "dependencies": { - "bn.js": "^5.2.1", - "browserify-rsa": "^4.1.0", + "bn.js": "^5.2.2", + "browserify-rsa": "^4.1.1", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.5", - "hash-base": "~3.0", + "elliptic": "^6.6.1", "inherits": "^2.0.4", - "parse-asn1": "^5.1.7", + "parse-asn1": "^5.1.9", "readable-stream": "^2.3.8", "safe-buffer": "^5.2.1" }, "engines": { - "node": ">= 0.12" + "node": ">= 0.10" } }, - "node_modules/browserify-sign/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/browserify-sign/node_modules/readable-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/browserify-sign/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/browserify-sign/node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + "node_modules/browserify-sign/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/browserslist": { - "version": "4.25.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz", - "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==", + "version": "4.26.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.26.3.tgz", + "integrity": "sha512-lAUU+02RFBuCKQPj/P6NgjlbCnLBMp4UtgTx7vNHd3XSIJF87s9a5rA3aH2yw3GS9DqZAUbOtZdCCiZeVRqt0w==", "devOptional": true, "funding": [ { @@ -12235,9 +12149,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001726", - "electron-to-chromium": "^1.5.173", - "node-releases": "^2.0.19", + "baseline-browser-mapping": "^2.8.9", + "caniuse-lite": "^1.0.30001746", + "electron-to-chromium": "^1.5.227", + "node-releases": "^2.0.21", "update-browserslist-db": "^1.1.3" }, "bin": { @@ -12269,13 +12184,26 @@ } }, "node_modules/buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "node_modules/buffer-crc32": { @@ -12388,6 +12316,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/c8/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/c8/node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -12412,6 +12355,18 @@ "node": ">=8" } }, + "node_modules/c8/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -12437,6 +12392,20 @@ "node": ">=8" } }, + "node_modules/cacheable-request/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/call-bind": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", @@ -12501,18 +12470,18 @@ } }, "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", "dev": true, "engines": { - "node": ">=6" + "node": ">=0.10.0" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001726", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001726.tgz", - "integrity": "sha512-VQAUIUzBiZ/UnlM28fSp2CRF3ivUn1BWEvxMcVTNwpw91Py1pGbPIyIKtd+tzct9C3ouceCVdGAXxZOpZAsgdw==", + "version": "1.0.30001748", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001748.tgz", + "integrity": "sha512-5P5UgAr0+aBmNiplks08JLw+AW/XG/SurlgZLgB1dDLfAw7EfRGxIwzPHxdSCGY/BTKDqIVyJL87cCN6s0ZR0w==", "devOptional": true, "funding": [ { @@ -12560,9 +12529,9 @@ } }, "node_modules/chalk": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz", - "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz", + "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==", "dev": true, "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" @@ -12581,9 +12550,9 @@ } }, "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-2.1.0.tgz", + "integrity": "sha512-bNFETTG/pM5ryzQ9Ad0lJOTa6HWD/YsScAR3EnCPZRPlQh77JocYktSHOUHelyhm8IARL+o4c4F1bP5KVOjiRA==", "dev": true }, "node_modules/check-error": { @@ -12599,25 +12568,25 @@ } }, "node_modules/cheerio": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.1.0.tgz", - "integrity": "sha512-+0hMx9eYhJvWbgpKV9hN7jg0JcwydpopZE4hgi+KvQtByZXPp04NiCWU0LzcAbP63abZckIHkTQaXVF52mX3xQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.1.2.tgz", + "integrity": "sha512-IkxPpb5rS/d1IiLbHMgfPuS0FgiWTtFIm/Nj+2woXDLTZ7fOT2eqzgYbdMlLweqlHbsZjxEChoVK+7iph7jyQg==", "dev": true, "dependencies": { "cheerio-select": "^2.1.0", "dom-serializer": "^2.0.0", "domhandler": "^5.0.3", "domutils": "^3.2.2", - "encoding-sniffer": "^0.2.0", + "encoding-sniffer": "^0.2.1", "htmlparser2": "^10.0.0", "parse5": "^7.3.0", "parse5-htmlparser2-tree-adapter": "^7.1.0", "parse5-parser-stream": "^7.1.2", - "undici": "^7.10.0", + "undici": "^7.12.0", "whatwg-mimetype": "^4.0.0" }, "engines": { - "node": ">=18.17" + "node": ">=20.18.1" }, "funding": { "url": "https://github.com/cheeriojs/cheerio?sponsor=1" @@ -12774,9 +12743,9 @@ } }, "node_modules/cheerio/node_modules/undici": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.11.0.tgz", - "integrity": "sha512-heTSIac3iLhsmZhUCjyS3JQEkZELateufzZuBaVM5RHXdSBMb1LPMQf5x+FH7qjsZYDP0ttAc3nnVpUB+wYbOg==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.16.0.tgz", + "integrity": "sha512-QEg3HPMll0o3t2ourKwOeUAZ159Kn9mx5pnzHRQO8+Wixmh88YdZRiIwat0iNzNNXn0yoEtXJqFpyW7eM8BV7g==", "dev": true, "engines": { "node": ">=20.18.1" @@ -12799,8 +12768,7 @@ "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "license": "ISC" + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "node_modules/chrome-trace-event": { "version": "1.0.4", @@ -12827,17 +12795,37 @@ } }, "node_modules/cipher-base": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.6.tgz", - "integrity": "sha512-3Ek9H3X6pj5TgenXYtNWdaBon1tgYCaebd+XPg0keyjEbEfkD4KkmAxkQ/i1vYvxdcT5nscLBfq9VJRmCBcFSw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.7.tgz", + "integrity": "sha512-Mz9QMT5fJe7bKI7MH31UilT5cEK5EHHRCccw/YRFsRY47AuNgaV6HY3rscp0/I4Q+tTW/5zoqpSeRRI54TkDWA==", "dependencies": { "inherits": "^2.0.4", - "safe-buffer": "^5.2.1" + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.2" }, "engines": { "node": ">= 0.10" } }, + "node_modules/cipher-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/cjs-module-lexer": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", @@ -12867,11 +12855,6 @@ "node": ">= 10.0" } }, - "node_modules/clean/node_modules/async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" - }, "node_modules/cli-width": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", @@ -12895,27 +12878,15 @@ "node": ">=12" } }, - "node_modules/cliui/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/cliui/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, "node_modules/cliui/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -12930,23 +12901,6 @@ "node": ">=8" } }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/clone": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", @@ -12971,6 +12925,18 @@ "node": ">=6" } }, + "node_modules/clone-deep/node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/clone-response": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", @@ -12982,6 +12948,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/clone-response/node_modules/mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "engines": { + "node": ">=4" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -12996,7 +12970,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -13070,6 +13043,71 @@ "node": ">= 14" } }, + "node_modules/compress-commons/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/compress-commons/node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/compress-commons/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/compress-commons/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -13085,7 +13123,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz", "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==", - "license": "MIT", "dependencies": { "bytes": "3.1.2", "compressible": "~2.0.18", @@ -13120,11 +13157,30 @@ "node": ">= 0.6" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, + "node_modules/compression/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, "node_modules/connect-history-api-fallback": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz", @@ -13136,8 +13192,7 @@ "node_modules/console-control-strings": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", - "license": "ISC" + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" }, "node_modules/content-disposition": { "version": "1.0.0", @@ -13150,6 +13205,25 @@ "node": ">= 0.6" } }, + "node_modules/content-disposition/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/content-type": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", @@ -13240,20 +13314,6 @@ "copyup": "copyfiles" } }, - "node_modules/copyfiles/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/copyfiles/node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -13273,29 +13333,12 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/copyfiles/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/copyfiles/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, + "node_modules/copyfiles/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=8" } }, "node_modules/copyfiles/node_modules/minimatch": { @@ -13309,6 +13352,17 @@ "node": "*" } }, + "node_modules/copyfiles/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/copyfiles/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -13322,22 +13376,6 @@ "node": ">=8" } }, - "node_modules/copyfiles/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, "node_modules/copyfiles/node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -13446,6 +13484,71 @@ "node": ">= 14" } }, + "node_modules/crc32-stream/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/crc32-stream/node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/crc32-stream/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/crc32-stream/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/create-ecdh": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", @@ -13506,21 +13609,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/create-jest/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/create-jest/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -13543,85 +13631,285 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, - "node_modules/cross-env": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", - "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "node_modules/create-wdio": { + "version": "9.18.2", + "resolved": "https://registry.npmjs.org/create-wdio/-/create-wdio-9.18.2.tgz", + "integrity": "sha512-atf81YJfyTNAJXsNu3qhpqF4OO43tHGTpr88duAc1Hk4a0uXJAPUYLnYxshOuMnfmeAxlWD+NqGU7orRiXEuJg==", + "dev": true, "dependencies": { - "cross-spawn": "^7.0.1" + "chalk": "^5.3.0", + "commander": "^14.0.0", + "cross-spawn": "^7.0.3", + "ejs": "^3.1.10", + "execa": "^9.6.0", + "import-meta-resolve": "^4.1.0", + "inquirer": "^12.7.0", + "normalize-package-data": "^7.0.0", + "read-pkg-up": "^10.1.0", + "recursive-readdir": "^2.2.3", + "semver": "^7.6.3", + "type-fest": "^4.41.0", + "yargs": "^17.7.2" }, "bin": { - "cross-env": "src/bin/cross-env.js", - "cross-env-shell": "src/bin/cross-env-shell.js" + "create-wdio": "bin/wdio.js" }, "engines": { - "node": ">=10.14", - "npm": ">=6", - "yarn": ">=1" + "node": ">=12.0.0" } }, - "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, + "node_modules/create-wdio/node_modules/commander": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.1.tgz", + "integrity": "sha512-2JkV3gUZUVrbNA+1sjBOYLsMZ5cEEl8GTFP2a4AVz5hvasAMCQ1D2l2le/cX+pV4N6ZU17zjUahLpIXRrnWL8A==", + "dev": true, "engines": { - "node": ">= 8" + "node": ">=20" } }, - "node_modules/crypto-browserify": { - "version": "3.12.1", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", - "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", + "node_modules/create-wdio/node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, "dependencies": { - "browserify-cipher": "^1.0.1", - "browserify-sign": "^4.2.3", - "create-ecdh": "^4.0.4", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "diffie-hellman": "^5.0.3", - "hash-base": "~3.0.4", - "inherits": "^2.0.4", - "pbkdf2": "^3.1.2", - "public-encrypt": "^4.0.3", - "randombytes": "^2.1.0", - "randomfill": "^1.0.4" + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" }, "engines": { - "node": ">= 0.10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/css-select": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", - "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "node_modules/create-wdio/node_modules/hosted-git-info": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-8.1.0.tgz", + "integrity": "sha512-Rw/B2DNQaPBICNXEm8balFz9a6WpZrkCGpcWFpy7nCj+NyhSdqXipmfvtmWt9xGfp0wZnBxB+iVpLmQMYt47Tw==", "dev": true, "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.0.1", - "domhandler": "^4.3.1", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" + "lru-cache": "^10.0.1" }, - "funding": { - "url": "https://github.com/sponsors/fb55" + "engines": { + "node": "^18.17.0 || >=20.5.0" } }, - "node_modules/css-shorthand-properties": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/css-shorthand-properties/-/css-shorthand-properties-1.1.2.tgz", - "integrity": "sha512-C2AugXIpRGQTxaCW0N7n5jD/p5irUmCrwl03TrnMFBHDbdq44CFWR2zO7rK9xPN4Eo3pUxC4vQzQgbIpzrD1PQ==", - "dev": true - }, - "node_modules/css-value": { - "version": "0.0.1", + "node_modules/create-wdio/node_modules/json-parse-even-better-errors": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", + "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/create-wdio/node_modules/lines-and-columns": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", + "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/create-wdio/node_modules/normalize-package-data": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-7.0.1.tgz", + "integrity": "sha512-linxNAT6M0ebEYZOx2tO6vBEFsVgnPpv+AVjk0wJHfaUIbq31Jm3T6vvZaarnOeWDh8ShnwXuaAyM7WT3RzErA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^8.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/create-wdio/node_modules/parse-json": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.1.tgz", + "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.21.4", + "error-ex": "^1.3.2", + "json-parse-even-better-errors": "^3.0.0", + "lines-and-columns": "^2.0.3", + "type-fest": "^3.8.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/create-wdio/node_modules/parse-json/node_modules/type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/create-wdio/node_modules/read-pkg": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-8.1.0.tgz", + "integrity": "sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.1", + "normalize-package-data": "^6.0.0", + "parse-json": "^7.0.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/create-wdio/node_modules/read-pkg-up": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-10.1.0.tgz", + "integrity": "sha512-aNtBq4jR8NawpKJQldrQcSW9y/d+KWH4v24HWkHljOZ7H0av+YTGANBzRh9A5pw7v/bLVsLVPpOhJ7gHNVy8lA==", + "dev": true, + "dependencies": { + "find-up": "^6.3.0", + "read-pkg": "^8.1.0", + "type-fest": "^4.2.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/create-wdio/node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", + "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", + "dev": true, + "dependencies": { + "lru-cache": "^10.0.1" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/create-wdio/node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", + "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", + "dev": true, + "dependencies": { + "hosted-git-info": "^7.0.0", + "semver": "^7.3.5", + "validate-npm-package-license": "^3.0.4" + }, + "engines": { + "node": "^16.14.0 || >=18.0.0" + } + }, + "node_modules/create-wdio/node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-browserify": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.1.tgz", + "integrity": "sha512-r4ESw/IlusD17lgQi1O20Fa3qNnsckR126TdUuBgAu7GBYSIPvdNyONd3Zrxh0xCwA4+6w/TDArBPsMvhur+KQ==", + "dependencies": { + "browserify-cipher": "^1.0.1", + "browserify-sign": "^4.2.3", + "create-ecdh": "^4.0.4", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "diffie-hellman": "^5.0.3", + "hash-base": "~3.0.4", + "inherits": "^2.0.4", + "pbkdf2": "^3.1.2", + "public-encrypt": "^4.0.3", + "randombytes": "^2.1.0", + "randomfill": "^1.0.4" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/css-select": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", + "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.0.1", + "domhandler": "^4.3.1", + "domutils": "^2.8.0", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-shorthand-properties": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/css-shorthand-properties/-/css-shorthand-properties-1.1.2.tgz", + "integrity": "sha512-C2AugXIpRGQTxaCW0N7n5jD/p5irUmCrwl03TrnMFBHDbdq44CFWR2zO7rK9xPN4Eo3pUxC4vQzQgbIpzrD1PQ==", + "dev": true + }, + "node_modules/css-value": { + "version": "0.0.1", "resolved": "https://registry.npmjs.org/css-value/-/css-value-0.0.1.tgz", "integrity": "sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==", "dev": true @@ -13752,9 +14040,9 @@ } }, "node_modules/debug": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", - "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dependencies": { "ms": "^2.1.3" }, @@ -13778,52 +14066,35 @@ } }, "node_modules/decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, "node_modules/decimal.js": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz", - "integrity": "sha512-8vDa8Qxvr/+d94hSh5P3IJwI5t8/c0KsMp+g8bNw9cY2icONa5aPfvKeieW1WlG0WQYwwhJ7mjui2xtiePQSXw==", + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", "dev": true }, "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" + "mimic-response": "^2.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/decompress-response/node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=8" } }, "node_modules/dedent": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.6.0.tgz", - "integrity": "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", + "integrity": "sha512-HGFtf8yhuhGhqO07SV79tRp+br4MnbdjeVxotpn1QBl30pcLLCQjX5b2295ll0fv8RKDKsmWYrl05usHM9CewQ==", "dev": true, "peerDependencies": { "babel-plugin-macros": "^3.1.0" @@ -13847,12 +14118,13 @@ } }, "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "license": "MIT", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", + "dev": true, "engines": { - "node": ">=4.0.0" + "iojs": ">=1.0.0", + "node": ">=0.10.0" } }, "node_modules/deep-is": { @@ -13994,8 +14266,7 @@ "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", - "license": "MIT" + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" }, "node_modules/depd": { "version": "2.0.0", @@ -14027,7 +14298,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", - "license": "Apache-2.0", "bin": { "detect-libc": "bin/detect-libc.js" }, @@ -14060,10 +14330,11 @@ } }, "node_modules/diff": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", - "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", - "engines": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { "node": ">=0.3.1" } }, @@ -14209,9 +14480,9 @@ } }, "node_modules/dotenv": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", - "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", "dev": true, "engines": { "node": ">=12" @@ -14293,9 +14564,9 @@ } }, "node_modules/edgedriver": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-6.1.1.tgz", - "integrity": "sha512-/dM/PoBf22Xg3yypMWkmRQrBKEnSyNaZ7wHGCT9+qqT14izwtFT+QvdR89rjNkMfXwW+bSFoqOfbcvM+2Cyc7w==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/edgedriver/-/edgedriver-6.1.2.tgz", + "integrity": "sha512-UvFqd/IR81iPyWMcxXbUNi+xKWR7JjfoHjfuwjqsj9UHQKn80RpQmS0jf+U25IPi+gKVPcpOSKm0XkqgGMq4zQ==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -14303,7 +14574,7 @@ "@zip.js/zip.js": "^2.7.53", "decamelize": "^6.0.0", "edge-paths": "^3.0.5", - "fast-xml-parser": "^4.5.0", + "fast-xml-parser": "^5.0.8", "http-proxy-agent": "^7.0.2", "https-proxy-agent": "^7.0.5", "node-fetch": "^3.3.2", @@ -14317,9 +14588,9 @@ } }, "node_modules/edgedriver/node_modules/decamelize": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz", - "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.1.tgz", + "integrity": "sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==", "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -14329,9 +14600,9 @@ } }, "node_modules/edgedriver/node_modules/fast-xml-parser": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.3.tgz", - "integrity": "sha512-RKihhV+SHsIUGXObeVy9AXiBbFwkVk7Syp8XgwN5U3JV416+Gwp/GO9i0JYKmikykgz/UHRrrV4ROuZEo/T0ig==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.3.0.tgz", + "integrity": "sha512-gkWGshjYcQCF+6qtlrqBqELqNqnt4CxruY6UVAWWnqb3DQ6qaNFEIKqzYep1XzHLM/QtrHVCxyPOtTk4LTQ7Aw==", "dev": true, "funding": [ { @@ -14340,7 +14611,7 @@ } ], "dependencies": { - "strnum": "^1.1.1" + "strnum": "^2.1.0" }, "bin": { "fxparser": "src/cli/cli.js" @@ -14355,6 +14626,18 @@ "node": ">=16" } }, + "node_modules/edgedriver/node_modules/strnum": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", + "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ] + }, "node_modules/edgedriver/node_modules/which": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", @@ -14391,9 +14674,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.177", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.177.tgz", - "integrity": "sha512-7EH2G59nLsEMj97fpDuvVcYi6lwTcM1xuWw3PssD8xzboAW7zj7iB3COEEEATUfjLHrs5uKBLQT03V/8URx06g==", + "version": "1.5.232", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.232.tgz", + "integrity": "sha512-ENirSe7wf8WzyPCibqKUG1Cg43cPaxH4wRR7AJsX7MCABCHBIOFqvaYODSLKUuZdraxUTHRE/0A2Aq8BYKEHOg==", "devOptional": true }, "node_modules/elliptic": { @@ -14428,9 +14711,9 @@ } }, "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/emojis-list": { "version": "3.0.0", @@ -14453,7 +14736,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/encoding-japanese/-/encoding-japanese-2.2.0.tgz", "integrity": "sha512-EuJWwlHPZ1LbADuKTClvHtwbaFn4rOD+dRAbWysqEOXRc2Uui0hJInNJrsdH0c+OhJA4nrCBdSkW4DD5YxAo6A==", - "license": "MIT", "engines": { "node": ">=8.10.0" } @@ -14489,9 +14771,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.18.2", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz", - "integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==", + "version": "5.18.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.3.tgz", + "integrity": "sha512-d4lC8xfavMeBjzGr2vECC3fsGXziXZQyJxD868h2M/mBI3PwAuODxAkLkq5HYuvrPYcUtiLzsTo8U3PgX3Ocww==", "devOptional": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -14522,9 +14804,9 @@ } }, "node_modules/envinfo": { - "version": "7.14.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", - "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.17.0.tgz", + "integrity": "sha512-GpfViocsFM7viwClFgxK26OtjMlKN67GCR5v6ASFkotxtpBWd9d+vNy+AH7F2E1TUkMDZ8P/dDPZX71/NG8xnQ==", "dev": true, "bin": { "envinfo": "dist/cli.js" @@ -14534,9 +14816,9 @@ } }, "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", "dev": true, "dependencies": { "is-arrayish": "^0.2.1" @@ -14687,9 +14969,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", - "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", + "version": "0.25.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.10.tgz", + "integrity": "sha512-9RiGKvCwaqxO2owP61uQ4BgNborAQskMR6QusfWzQqv7AZOg5oGehdY2pRJMTKuwxd1IDBP4rSbI5lHzU7SMsQ==", "dev": true, "hasInstallScript": true, "bin": { @@ -14699,31 +14981,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.5", - "@esbuild/android-arm": "0.25.5", - "@esbuild/android-arm64": "0.25.5", - "@esbuild/android-x64": "0.25.5", - "@esbuild/darwin-arm64": "0.25.5", - "@esbuild/darwin-x64": "0.25.5", - "@esbuild/freebsd-arm64": "0.25.5", - "@esbuild/freebsd-x64": "0.25.5", - "@esbuild/linux-arm": "0.25.5", - "@esbuild/linux-arm64": "0.25.5", - "@esbuild/linux-ia32": "0.25.5", - "@esbuild/linux-loong64": "0.25.5", - "@esbuild/linux-mips64el": "0.25.5", - "@esbuild/linux-ppc64": "0.25.5", - "@esbuild/linux-riscv64": "0.25.5", - "@esbuild/linux-s390x": "0.25.5", - "@esbuild/linux-x64": "0.25.5", - "@esbuild/netbsd-arm64": "0.25.5", - "@esbuild/netbsd-x64": "0.25.5", - "@esbuild/openbsd-arm64": "0.25.5", - "@esbuild/openbsd-x64": "0.25.5", - "@esbuild/sunos-x64": "0.25.5", - "@esbuild/win32-arm64": "0.25.5", - "@esbuild/win32-ia32": "0.25.5", - "@esbuild/win32-x64": "0.25.5" + "@esbuild/aix-ppc64": "0.25.10", + "@esbuild/android-arm": "0.25.10", + "@esbuild/android-arm64": "0.25.10", + "@esbuild/android-x64": "0.25.10", + "@esbuild/darwin-arm64": "0.25.10", + "@esbuild/darwin-x64": "0.25.10", + "@esbuild/freebsd-arm64": "0.25.10", + "@esbuild/freebsd-x64": "0.25.10", + "@esbuild/linux-arm": "0.25.10", + "@esbuild/linux-arm64": "0.25.10", + "@esbuild/linux-ia32": "0.25.10", + "@esbuild/linux-loong64": "0.25.10", + "@esbuild/linux-mips64el": "0.25.10", + "@esbuild/linux-ppc64": "0.25.10", + "@esbuild/linux-riscv64": "0.25.10", + "@esbuild/linux-s390x": "0.25.10", + "@esbuild/linux-x64": "0.25.10", + "@esbuild/netbsd-arm64": "0.25.10", + "@esbuild/netbsd-x64": "0.25.10", + "@esbuild/openbsd-arm64": "0.25.10", + "@esbuild/openbsd-x64": "0.25.10", + "@esbuild/openharmony-arm64": "0.25.10", + "@esbuild/sunos-x64": "0.25.10", + "@esbuild/win32-arm64": "0.25.10", + "@esbuild/win32-ia32": "0.25.10", + "@esbuild/win32-x64": "0.25.10" } }, "node_modules/escalade": { @@ -14937,18 +15220,6 @@ "node": ">=0.10.0" } }, - "node_modules/eslint-plugin-import/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -14961,31 +15232,19 @@ "node": "*" } }, - "node_modules/eslint-plugin-import/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-plugin-import/node_modules/tsconfig-paths": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", - "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, - "dependencies": { - "@types/json5": "^0.0.29", - "json5": "^1.0.2", - "minimist": "^1.2.6", - "strip-bom": "^3.0.0" + "bin": { + "semver": "bin/semver.js" } }, "node_modules/eslint-plugin-unused-imports": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.1.4.tgz", - "integrity": "sha512-YptD6IzQjDardkl0POxnnRBhU1OEePMV0nd6siHaRBbd+lyh6NAhFEobiznKU7kTsSsDeSD62Pe7kAM1b7dAZQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-4.2.0.tgz", + "integrity": "sha512-hLbJ2/wnjKq4kGA9AUaExVFIbNzyxYdVo49QZmKCnhk5pc9wcYRbfgLHvWJ8tnsdcseGhoUAddm9gn/lt+d74w==", "dev": true, "peerDependencies": { "@typescript-eslint/eslint-plugin": "^8.0.0-0 || ^7.0.0 || ^6.0.0 || ^5.0.0", @@ -15041,21 +15300,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/eslint/node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -15098,21 +15342,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.24.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", - "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", - "dev": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint/node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -15155,6 +15384,21 @@ "node": "*" } }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint/node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -15179,10 +15423,10 @@ "node": ">=8" } }, - "node_modules/eslint/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "node_modules/eslint/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, "engines": { "node": ">=10" @@ -15284,11 +15528,19 @@ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" }, "node_modules/events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "engines": { - "node": ">=0.4.x" + "node": ">=0.8.x" + } + }, + "node_modules/events-universal": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz", + "integrity": "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==", + "dependencies": { + "bare-events": "^2.7.0" } }, "node_modules/eventsource": { @@ -15303,11 +15555,11 @@ } }, "node_modules/eventsource-parser": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.3.tgz", - "integrity": "sha512-nVpZkTMM9rF6AQ9gPJpFsNAMt48wIzB5TQgiTLdHiuO8XEDhUgZEhqKlZWXbIzo9VmJ/HvysHqEaVeD5v9TPvA==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz", + "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==", "engines": { - "node": ">=20.0.0" + "node": ">=18.0.0" } }, "node_modules/evp_bytestokey": { @@ -15320,45 +15572,54 @@ } }, "node_modules/execa": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", - "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-9.6.0.tgz", + "integrity": "sha512-jpWzZ1ZhwUmeWRhS7Qv3mhpOhLfwI+uAX4e5fOcXqwMR7EcJ0pj2kV1CVzHVMX/LphnKWD3LObjZCoJ71lKpHw==", "dev": true, "dependencies": { - "cross-spawn": "^7.0.3", - "get-stream": "^6.0.0", - "human-signals": "^2.1.0", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.1", - "onetime": "^5.1.2", - "signal-exit": "^3.0.3", - "strip-final-newline": "^2.0.0" + "@sindresorhus/merge-streams": "^4.0.0", + "cross-spawn": "^7.0.6", + "figures": "^6.1.0", + "get-stream": "^9.0.0", + "human-signals": "^8.0.1", + "is-plain-obj": "^4.1.0", + "is-stream": "^4.0.1", + "npm-run-path": "^6.0.0", + "pretty-ms": "^9.2.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^4.0.0", + "yoctocolors": "^2.1.1" }, "engines": { - "node": ">=10" + "node": "^18.19.0 || >=20.5.0" }, "funding": { "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/execa/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "node_modules/execa/node_modules/is-plain-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", + "integrity": "sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/execa/node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "node_modules/execa/node_modules/is-stream": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/exit": { "version": "0.1.2", @@ -15385,7 +15646,6 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "license": "(MIT OR WTFPL)", "engines": { "node": ">=6" } @@ -15407,15 +15667,15 @@ } }, "node_modules/expect-webdriverio": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/expect-webdriverio/-/expect-webdriverio-5.3.4.tgz", - "integrity": "sha512-FU+96C0nqeYTXrJcGLUDB6hPKKaSm1/tVHjFDE4EDHGCYvajAHCC2MBQJ5MomjCmp6lGMz36lDHeZj52LHylyA==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/expect-webdriverio/-/expect-webdriverio-5.4.3.tgz", + "integrity": "sha512-/XxRRR90gNSuNf++w1jOQjhC5LE9Ixf/iAQctVb/miEI3dwzPZTuG27/omoh5REfSLDoPXofM84vAH/ULtz35g==", "dev": true, "dependencies": { "@vitest/snapshot": "^3.2.4", + "deep-eql": "^5.0.2", "expect": "^30.0.0", - "jest-matcher-utils": "^30.0.0", - "lodash.isequal": "^4.5.0" + "jest-matcher-utils": "^30.0.0" }, "engines": { "node": ">=18 || >=20 || >=22" @@ -15438,21 +15698,21 @@ } }, "node_modules/expect-webdriverio/node_modules/@jest/expect-utils": { - "version": "30.0.3", - "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.0.3.tgz", - "integrity": "sha512-SMtBvf2sfX2agcT0dA9pXwcUrKvOSDqBY4e4iRfT+Hya33XzV35YVg+98YQFErVGA/VR1Gto5Y2+A6G9LSQ3Yg==", + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.2.0.tgz", + "integrity": "sha512-1JnRfhqpD8HGpOmQp180Fo9Zt69zNtC+9lR+kT7NVL05tNXIi+QC8Csz7lfidMoVLPD3FnOtcmp0CEFnxExGEA==", "dev": true, "dependencies": { - "@jest/get-type": "30.0.1" + "@jest/get-type": "30.1.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/expect-webdriverio/node_modules/@jest/schemas": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.1.tgz", - "integrity": "sha512-+g/1TKjFuGrf1Hh0QPCv0gISwBxJ+MQSNXmG9zjHy7BmFhtoJ9fdNhWJp3qUKRi93AOZHXtdxZgJ1vAtz6z65w==", + "version": "30.0.5", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.0.5.tgz", + "integrity": "sha512-DmdYgtezMkh3cpU8/1uyXakv3tJRcmcXxBOcO0tbaozPwpmh4YMsnWrQm9ZmZMfa5ocbxzbFk6O4bDPEc/iAnA==", "dev": true, "dependencies": { "@sinclair/typebox": "^0.34.0" @@ -15462,13 +15722,13 @@ } }, "node_modules/expect-webdriverio/node_modules/@jest/types": { - "version": "30.0.1", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.0.1.tgz", - "integrity": "sha512-HGwoYRVF0QSKJu1ZQX0o5ZrUrrhj0aOOFA8hXrumD7SIzjouevhawbTjmXdwOmURdGluU9DM/XvGm3NyFoiQjw==", + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.2.0.tgz", + "integrity": "sha512-H9xg1/sfVvyfU7o3zMfBEjQ1gcsdeTMgqHoYdN79tuLqfTtuu7WckRA1R5whDwOzxaZAeMKTYWqP+WCAi0CHsg==", "dev": true, "dependencies": { "@jest/pattern": "30.0.1", - "@jest/schemas": "30.0.1", + "@jest/schemas": "30.0.5", "@types/istanbul-lib-coverage": "^2.0.6", "@types/istanbul-reports": "^3.0.4", "@types/node": "*", @@ -15480,9 +15740,9 @@ } }, "node_modules/expect-webdriverio/node_modules/@sinclair/typebox": { - "version": "0.34.37", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.37.tgz", - "integrity": "sha512-2TRuQVgQYfy+EzHRTIvkhv2ADEouJ2xNS/Vq+W5EuuewBdOrvATvljZTxHWZSTYr2sTjTHpGvucaGAt67S2akw==", + "version": "0.34.41", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.41.tgz", + "integrity": "sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==", "dev": true }, "node_modules/expect-webdriverio/node_modules/@vitest/pretty-format": { @@ -15527,25 +15787,10 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/expect-webdriverio/node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/expect-webdriverio/node_modules/ci-info": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.2.0.tgz", - "integrity": "sha512-cYY9mypksY8NRqgDB1XD1RiJL338v/551niynFTGkZOO2LHuB2OmOYxDIe/ttN9AHwrqdum1360G3ald0W9kCg==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.3.1.tgz", + "integrity": "sha512-Wdy2Igu8OcBpI2pZePZ5oWjPC38tmDVx5WKUXKwlLYkA0ozo85sLsLvkBbBn/sZaSCMFOGZJ14fvW9t5/d7kdA==", "dev": true, "funding": [ { @@ -15557,66 +15802,75 @@ "node": ">=8" } }, + "node_modules/expect-webdriverio/node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/expect-webdriverio/node_modules/expect": { - "version": "30.0.3", - "resolved": "https://registry.npmjs.org/expect/-/expect-30.0.3.tgz", - "integrity": "sha512-HXg6NvK35/cSYZCUKAtmlgCFyqKM4frEPbzrav5hRqb0GMz0E0lS5hfzYjSaiaE5ysnp/qI2aeZkeyeIAOeXzQ==", + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.2.0.tgz", + "integrity": "sha512-u/feCi0GPsI+988gU2FLcsHyAHTU0MX1Wg68NhAnN7z/+C5wqG+CY8J53N9ioe8RXgaoz0nBR/TYMf3AycUuPw==", "dev": true, "dependencies": { - "@jest/expect-utils": "30.0.3", - "@jest/get-type": "30.0.1", - "jest-matcher-utils": "30.0.3", - "jest-message-util": "30.0.2", - "jest-mock": "30.0.2", - "jest-util": "30.0.2" + "@jest/expect-utils": "30.2.0", + "@jest/get-type": "30.1.0", + "jest-matcher-utils": "30.2.0", + "jest-message-util": "30.2.0", + "jest-mock": "30.2.0", + "jest-util": "30.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/expect-webdriverio/node_modules/jest-diff": { - "version": "30.0.3", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.0.3.tgz", - "integrity": "sha512-Q1TAV0cUcBTic57SVnk/mug0/ASyAqtSIOkr7RAlxx97llRYsM74+E8N5WdGJUlwCKwgxPAkVjKh653h1+HA9A==", + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.2.0.tgz", + "integrity": "sha512-dQHFo3Pt4/NLlG5z4PxZ/3yZTZ1C7s9hveiOj+GCN+uT109NC2QgsoVZsVOAvbJ3RgKkvyLGXZV9+piDpWbm6A==", "dev": true, "dependencies": { "@jest/diff-sequences": "30.0.1", - "@jest/get-type": "30.0.1", + "@jest/get-type": "30.1.0", "chalk": "^4.1.2", - "pretty-format": "30.0.2" + "pretty-format": "30.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/expect-webdriverio/node_modules/jest-matcher-utils": { - "version": "30.0.3", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.0.3.tgz", - "integrity": "sha512-hMpVFGFOhYmIIRGJ0HgM9htC5qUiJ00famcc9sRFchJJiLZbbVKrAztcgE6VnXLRxA3XZ0bvNA7hQWh3oHXo/A==", + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.2.0.tgz", + "integrity": "sha512-dQ94Nq4dbzmUWkQ0ANAWS9tBRfqCrn0bV9AMYdOi/MHW726xn7eQmMeRTpX2ViC00bpNaWXq+7o4lIQ3AX13Hg==", "dev": true, "dependencies": { - "@jest/get-type": "30.0.1", + "@jest/get-type": "30.1.0", "chalk": "^4.1.2", - "jest-diff": "30.0.3", - "pretty-format": "30.0.2" + "jest-diff": "30.2.0", + "pretty-format": "30.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/expect-webdriverio/node_modules/jest-message-util": { - "version": "30.0.2", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.0.2.tgz", - "integrity": "sha512-vXywcxmr0SsKXF/bAD7t7nMamRvPuJkras00gqYeB1V0WllxZrbZ0paRr3XqpFU2sYYjD0qAaG2fRyn/CGZ0aw==", + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.2.0.tgz", + "integrity": "sha512-y4DKFLZ2y6DxTWD4cDe07RglV88ZiNEdlRfGtqahfbIjfsw1nMCPx49Uev4IA/hWn3sDKyAnSPwoYSsAEdcimw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.27.1", - "@jest/types": "30.0.1", + "@jest/types": "30.2.0", "@types/stack-utils": "^2.0.3", "chalk": "^4.1.2", "graceful-fs": "^4.2.11", "micromatch": "^4.0.8", - "pretty-format": "30.0.2", + "pretty-format": "30.2.0", "slash": "^3.0.0", "stack-utils": "^2.0.6" }, @@ -15625,26 +15879,26 @@ } }, "node_modules/expect-webdriverio/node_modules/jest-mock": { - "version": "30.0.2", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.0.2.tgz", - "integrity": "sha512-PnZOHmqup/9cT/y+pXIVbbi8ID6U1XHRmbvR7MvUy4SLqhCbwpkmXhLbsWbGewHrV5x/1bF7YDjs+x24/QSvFA==", + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.2.0.tgz", + "integrity": "sha512-JNNNl2rj4b5ICpmAcq+WbLH83XswjPbjH4T7yvGzfAGCPh1rw+xVNbtk+FnRslvt9lkCcdn9i1oAoKUuFsOxRw==", "dev": true, "dependencies": { - "@jest/types": "30.0.1", + "@jest/types": "30.2.0", "@types/node": "*", - "jest-util": "30.0.2" + "jest-util": "30.2.0" }, "engines": { "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, "node_modules/expect-webdriverio/node_modules/jest-util": { - "version": "30.0.2", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.0.2.tgz", - "integrity": "sha512-8IyqfKS4MqprBuUpZNlFB5l+WFehc8bfCe1HSZFHzft2mOuND8Cvi9r1musli+u6F3TqanCZ/Ik4H4pXUolZIg==", + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.2.0.tgz", + "integrity": "sha512-QKNsM0o3Xe6ISQU869e+DhG+4CK/48aHYdJZGlFQVTjnbvgpcKyxpzk29fGiO7i/J8VENZ+d2iGnSsvmuHywlA==", "dev": true, "dependencies": { - "@jest/types": "30.0.1", + "@jest/types": "30.2.0", "@types/node": "*", "chalk": "^4.1.2", "ci-info": "^4.2.0", @@ -15661,13 +15915,25 @@ "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true }, + "node_modules/expect-webdriverio/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/expect-webdriverio/node_modules/pretty-format": { - "version": "30.0.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.0.2.tgz", - "integrity": "sha512-yC5/EBSOrTtqhCKfLHqoUIAXVRZnukHPwWBJWR7h84Q3Be1DRQZLncwcfLoPA5RPQ65qfiCMqgYwdUuQ//eVpg==", + "version": "30.2.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.2.0.tgz", + "integrity": "sha512-9uBdv/B4EefsuAL+pWqueZyZS2Ba+LxfFeQ9DN14HU4bN8bhaxKdkpjpB6fs9+pSjIBu+FXQHImEg8j/Lw0+vA==", "dev": true, "dependencies": { - "@jest/schemas": "30.0.1", + "@jest/schemas": "30.0.5", "ansi-styles": "^5.2.0", "react-is": "^18.3.1" }, @@ -15675,6 +15941,18 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, + "node_modules/expect-webdriverio/node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/expect-webdriverio/node_modules/tinyrainbow": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", @@ -15739,39 +16017,24 @@ "express": ">= 4.11" } }, - "node_modules/ext-list": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", - "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", - "dev": true, - "dependencies": { - "mime-db": "^1.28.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, + "node_modules/express/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" + "mime-db": "^1.54.0" }, "engines": { - "node": ">=4" + "node": ">= 0.6" } }, - "node_modules/external-editor/node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "node_modules/ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", "dev": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" + "mime-db": "^1.28.0" }, "engines": { "node": ">=0.10.0" @@ -15797,18 +16060,33 @@ "@types/yauzl": "^2.9.1" } }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/fast-fifo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", - "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" - }, - "node_modules/fast-glob": { - "version": "3.3.3", + "node_modules/extract-zip/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-fifo": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", + "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==" + }, + "node_modules/fast-glob": { + "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", "dependencies": { @@ -15860,9 +16138,9 @@ "dev": true }, "node_modules/fast-uri": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.6.tgz", - "integrity": "sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", "funding": [ { "type": "github", @@ -15940,19 +16218,6 @@ "pend": "~1.2.0" } }, - "node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", - "peerDependencies": { - "picomatch": "^3 || ^4" - }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } - } - }, "node_modules/fetch-blob": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", @@ -15991,18 +16256,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/figures/node_modules/is-unicode-supported": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", - "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -16110,9 +16363,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", "funding": [ { "type": "individual", @@ -16161,7 +16414,6 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", - "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -16173,25 +16425,6 @@ "node": ">= 6" } }, - "node_modules/form-data/node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/form-data/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/formdata-polyfill": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", @@ -16223,8 +16456,7 @@ "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "license": "MIT" + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, "node_modules/fs-jetpack": { "version": "0.12.0", @@ -16248,27 +16480,6 @@ "concat-map": "0.0.1" } }, - "node_modules/fs-jetpack/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/fs-jetpack/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -16281,18 +16492,6 @@ "node": "*" } }, - "node_modules/fs-jetpack/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/fs-jetpack/node_modules/rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -16374,7 +16573,6 @@ "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", "deprecated": "This package is no longer supported.", - "license": "ISC", "dependencies": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -16390,19 +16588,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/gauge/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "license": "MIT", - "dependencies": { - "number-is-nan": "^1.0.0" - }, "engines": { "node": ">=0.10.0" } @@ -16410,28 +16595,12 @@ "node_modules/gauge/node_modules/signal-exit": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "license": "ISC" - }, - "node_modules/gauge/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "license": "MIT", - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" }, "node_modules/gauge/node_modules/strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "license": "MIT", "dependencies": { "ansi-regex": "^2.0.0" }, @@ -16463,9 +16632,9 @@ } }, "node_modules/geckodriver/node_modules/decamelize": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.0.tgz", - "integrity": "sha512-Fv96DCsdOgB6mdGl67MT5JaTNKRzrzill5OH5s8bjYJXVlcXyPYGyPsUkWyGV5p1TXI5esYIYMMeDJL0hEIwaA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-6.0.1.tgz", + "integrity": "sha512-G7Cqgaelq68XHJNGlZ7lrNQyhZGsFqpwtGFexqUv4IQdjKoSYF7ipZ9UuTJZUSQXFj/XaoBLuEVIVqr8EJngEQ==", "dev": true, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" @@ -16484,9 +16653,9 @@ } }, "node_modules/geckodriver/node_modules/tar-fs": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.10.tgz", - "integrity": "sha512-C1SwlQGNLe/jPNqapK8epDsXME7CAJR5RL3GcE6KWx1d9OUByzoHVcbu1VPI8tevg9H8Alae0AApHHFGzrD5zA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz", + "integrity": "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==", "dev": true, "dependencies": { "pump": "^3.0.0", @@ -16497,6 +16666,17 @@ "bare-path": "^3.0.0" } }, + "node_modules/geckodriver/node_modules/tar-stream": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "dev": true, + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "node_modules/geckodriver/node_modules/which": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/which/-/which-5.0.0.tgz", @@ -16512,6 +16692,15 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -16595,14 +16784,28 @@ } }, "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-9.0.1.tgz", + "integrity": "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==", + "dev": true, "dependencies": { - "pump": "^3.0.0" + "@sec-ant/readable-stream": "^0.4.1", + "is-stream": "^4.0.1" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream/node_modules/is-stream": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-4.0.1.tgz", + "integrity": "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==", + "dev": true, + "engines": { + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -16626,9 +16829,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", - "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.11.0.tgz", + "integrity": "sha512-sNsqf7XKQ38IawiVGPOoAlqZo1DMrO7TU+ZcZwi7yLl7/7S0JwmoBMKz/IkUPhSoXM0Ng3vT0yB1iCe5XavDeQ==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -16638,9 +16841,9 @@ } }, "node_modules/get-uri": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", - "integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz", + "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==", "dev": true, "dependencies": { "basic-ftp": "^5.0.2", @@ -16680,23 +16883,23 @@ "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "license": "MIT" + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" }, "node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, - "bin": { - "glob": "dist/esm/bin.mjs" + "engines": { + "node": "*" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -16714,12 +16917,47 @@ "node": ">=10.13.0" } }, + "node_modules/glob-to-regex.js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/glob-to-regex.js/-/glob-to-regex.js-1.2.0.tgz", + "integrity": "sha512-QMwlOQKU/IzqMUOAZWubUOT8Qft+Y0KQWnX9nK3ch0CJg0tTp4TvGZsTfudYKv2NzoQSyPcnA6TYeIQ3jGichQ==", + "engines": { + "node": ">=10.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, "node_modules/glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "devOptional": true }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/global-directory": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", @@ -16736,12 +16974,18 @@ } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { @@ -16795,16 +17039,41 @@ "url": "https://github.com/sindresorhus/got?sponsor=1" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true + "node_modules/got/node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/got/node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" + }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true }, "node_modules/graphemer": { "version": "1.4.0", @@ -16817,6 +17086,27 @@ "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==" }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, "node_modules/has-ansi": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-0.1.0.tgz", @@ -16915,8 +17205,7 @@ "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", - "license": "ISC" + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" }, "node_modules/hash-base": { "version": "3.0.5", @@ -16930,6 +17219,25 @@ "node": ">= 0.10" } }, + "node_modules/hash-base/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/hash.js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", @@ -16978,21 +17286,9 @@ } }, "node_modules/hosted-git-info": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-7.0.2.tgz", - "integrity": "sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==", - "dev": true, - "dependencies": { - "lru-cache": "^10.0.1" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" - } - }, - "node_modules/hosted-git-info/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "node_modules/hpack.js": { @@ -17006,33 +17302,6 @@ "wbuf": "^1.1.0" } }, - "node_modules/hpack.js/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/hpack.js/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/hpack.js/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/hpagent": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz", @@ -17110,9 +17379,9 @@ } }, "node_modules/html-webpack-plugin": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.3.tgz", - "integrity": "sha512-QSf1yjtSAsmf7rYBV7XX86uua4W/vkhIt0xNXKbsi2foEeW7vjJQz4bhnpL3xH+l1ryl1680uNv968Z+X6jSYg==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.6.4.tgz", + "integrity": "sha512-V/PZeWsqhfpE27nKeX9EO2sbR+D17A+tLf6qU+ht66jdUsN0QLKJN27Z+1+gHrVMKgndBahes0PU6rRihDgHTw==", "dev": true, "dependencies": { "@types/html-minifier-terser": "^6.0.0", @@ -17172,9 +17441,9 @@ } }, "node_modules/htmlfy": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/htmlfy/-/htmlfy-0.6.7.tgz", - "integrity": "sha512-r8hRd+oIM10lufovN+zr3VKPTYEIvIwqXGucidh2XQufmiw6sbUXFUFjWlfjo3AnefIDTyzykVzQ8IUVuT1peQ==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/htmlfy/-/htmlfy-0.8.1.tgz", + "integrity": "sha512-xWROBw9+MEGwxpotll0h672KCaLrKKiCYzsyN8ZgL9cQbVumFnyvsk2JqiB9ELAV1GLj1GG/jxZUjV9OZZi/yQ==", "dev": true }, "node_modules/htmlparser2": { @@ -17333,12 +17602,12 @@ } }, "node_modules/human-signals": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", - "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-8.0.1.tgz", + "integrity": "sha512-eKCa6bwnJhvxj14kZk5NCPc6Hb6BdsU9DZcOnmQKSnO1VKrfV0zCvtttPZUsBvjmNDn8rpcJfpwSYnHBjc95MQ==", "dev": true, "engines": { - "node": ">=10.17.0" + "node": ">=18.18.0" } }, "node_modules/husky": { @@ -17376,9 +17645,23 @@ } }, "node_modules/ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/ignore": { "version": "7.0.5", @@ -17449,9 +17732,9 @@ } }, "node_modules/import-meta-resolve": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", - "integrity": "sha512-I6fiaX09Xivtk+THaMfAwnA3MVA5Big1WHF1Dfx9hFuvNIWpXnorlkzhcQf6ehrqQiiZECRt1poOAkPmer3ruw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz", + "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==", "dev": true, "funding": { "type": "github", @@ -17492,22 +17775,29 @@ } }, "node_modules/inquirer": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-11.1.0.tgz", - "integrity": "sha512-CmLAZT65GG/v30c+D2Fk8+ceP6pxD6RL+hIUOWAltCmeyEqWYwqu9v76q03OvjyZ3AB0C1Ala2stn1z/rMqGEw==", + "version": "12.9.6", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-12.9.6.tgz", + "integrity": "sha512-603xXOgyfxhuis4nfnWaZrMaotNT0Km9XwwBNWUKbIDqeCY89jGr2F9YPEMiNhU6XjIP4VoWISMBFfcc5NgrTw==", "dev": true, "dependencies": { - "@inquirer/core": "^9.2.1", - "@inquirer/prompts": "^6.0.1", - "@inquirer/type": "^2.0.0", - "@types/mute-stream": "^0.0.4", - "ansi-escapes": "^4.3.2", - "mute-stream": "^1.0.0", - "run-async": "^3.0.0", - "rxjs": "^7.8.1" + "@inquirer/ansi": "^1.0.0", + "@inquirer/core": "^10.2.2", + "@inquirer/prompts": "^7.8.6", + "@inquirer/type": "^3.0.8", + "mute-stream": "^2.0.0", + "run-async": "^4.0.5", + "rxjs": "^7.8.2" }, "engines": { "node": ">=18" + }, + "peerDependencies": { + "@types/node": ">=18" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } } }, "node_modules/internal-slot": { @@ -17549,24 +17839,14 @@ } }, "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.0.1.tgz", + "integrity": "sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==", "dev": true, - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, "engines": { "node": ">= 12" } }, - "node_modules/ip-address/node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", - "dev": true - }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -17579,6 +17859,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", + "dev": true, "dependencies": { "call-bound": "^1.0.2", "has-tostringtag": "^1.0.2" @@ -17776,11 +18057,14 @@ } }, "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dependencies": { + "number-is-nan": "^1.0.0" + }, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/is-generator-fn": { @@ -17793,12 +18077,14 @@ } }, "node_modules/is-generator-function": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.0.tgz", - "integrity": "sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "dev": true, "dependencies": { - "call-bound": "^1.0.3", - "get-proto": "^1.0.0", + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" }, @@ -17838,13 +18124,11 @@ } }, "node_modules/is-it-type": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/is-it-type/-/is-it-type-5.1.2.tgz", - "integrity": "sha512-q/gOZQTNYABAxaXWnBKZjTFH4yACvWEFtgVOj+LbgxYIgAJG1xVmUZOsECSrZPIemYUQvaQWVilSFVbh4Eyt8A==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/is-it-type/-/is-it-type-5.1.3.tgz", + "integrity": "sha512-AX2uU0HW+TxagTgQXOJY7+2fbFHemC7YFBwN1XqD8qQMKdtfbOC8OC3fUb4s5NU59a3662Dzwto8tWDdZYRXxg==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/runtime": "^7.16.7", "globalthis": "^1.0.2" }, "engines": { @@ -17892,9 +18176,9 @@ } }, "node_modules/is-network-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.1.0.tgz", - "integrity": "sha512-tUdRRAnhT+OtCZR/LxZelH/C7QtjtFrTu5tXCA8pl55eTUElUHT+GPYV8MBMBvea/j+NxQqVt3LbWMRir7Gx9g==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.3.0.tgz", + "integrity": "sha512-6oIwpsgRfnDiyEDLMay/GqCl3HoAtH5+RUKW29gYkL0QA+ipzpDLA16yQs7/RHCSu+BwgbJaOUqa4A99qNVQVw==", "engines": { "node": ">=16" }, @@ -17945,22 +18229,18 @@ } }, "node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", "dev": true, "engines": { - "node": ">=8" + "node": ">=0.10.0" } }, "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", "engines": { "node": ">=0.10.0" } @@ -17980,6 +18260,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "dev": true, "dependencies": { "call-bound": "^1.0.2", "gopd": "^1.2.0", @@ -18091,12 +18372,12 @@ } }, "node_modules/is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.1.0.tgz", + "integrity": "sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==", "dev": true, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -18227,18 +18508,6 @@ "node": ">=10" } }, - "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", @@ -18268,9 +18537,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", - "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -18295,15 +18564,14 @@ } }, "node_modules/jake": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", - "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "version": "10.9.4", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.4.tgz", + "integrity": "sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==", "dev": true, "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", + "async": "^3.2.6", "filelist": "^1.0.4", - "minimatch": "^3.1.2" + "picocolors": "^1.1.1" }, "bin": { "jake": "bin/cli.js" @@ -18312,58 +18580,11 @@ "node": ">=10" } }, - "node_modules/jake/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jake/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/jake/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jake/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } + "node_modules/jake/node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true }, "node_modules/jest": { "version": "29.7.0", @@ -18405,15 +18626,113 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", - "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "node_modules/jest-changed-files/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "dev": true, "dependencies": { - "@jest/environment": "^29.7.0", - "@jest/expect": "^29.7.0", - "@jest/test-result": "^29.7.0", + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/jest-changed-files/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-changed-files/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/jest-changed-files/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-changed-files/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-changed-files/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/jest-changed-files/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-changed-files/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", "@jest/types": "^29.6.3", "@types/node": "*", "chalk": "^4.0.0", @@ -18436,35 +18755,47 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-circus/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jest-circus/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-circus/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/jest-circus/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "yocto-queue": "^0.1.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-circus/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/jest-cli": { @@ -18500,21 +18831,6 @@ } } }, - "node_modules/jest-cli/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-cli/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -18576,31 +18892,6 @@ } } }, - "node_modules/jest-config/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-config/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/jest-config/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -18617,39 +18908,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-config/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-config/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/jest-diff": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", @@ -18665,21 +18923,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-diff/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-diff/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -18724,21 +18967,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-each/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-each/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -18806,6 +19034,36 @@ "fsevents": "^2.3.2" } }, + "node_modules/jest-haste-map/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", + "dev": true, + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/jest-leak-detector": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", @@ -18834,21 +19092,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-matcher-utils/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-matcher-utils/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -18885,21 +19128,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-message-util/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-message-util/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -18989,21 +19217,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-resolve/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-resolve/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -19052,35 +19265,87 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runner/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/jest-runner/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-runner/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/jest-runner/node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/jest-runner/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runner/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/jest-runtime": { @@ -19116,31 +19381,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-runtime/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jest-runtime/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/jest-runtime/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -19157,37 +19397,13 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-runtime/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/jest-runtime/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/jest-runtime/node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, "engines": { - "node": "*" + "node": ">=8" } }, "node_modules/jest-snapshot": { @@ -19221,21 +19437,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-snapshot/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-snapshot/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -19252,18 +19453,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/jest-util": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", @@ -19281,21 +19470,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-util/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-util/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -19312,18 +19486,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/jest-util/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/jest-validate": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", @@ -19341,21 +19503,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-validate/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-validate/node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -19403,21 +19550,6 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-watcher/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/jest-watcher/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -19435,25 +19567,24 @@ } }, "node_modules/jest-worker": { - "version": "29.7.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", - "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", - "dev": true, + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "devOptional": true, "dependencies": { "@types/node": "*", - "jest-util": "^29.7.0", "merge-stream": "^2.0.0", "supports-color": "^8.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">= 10.13.0" } }, "node_modules/jest-worker/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, + "devOptional": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -19465,18 +19596,19 @@ } }, "node_modules/jiti": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.4.2.tgz", - "integrity": "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", "dev": true, "bin": { "jiti": "lib/jiti-cli.mjs" } }, "node_modules/jmespath": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", - "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", + "integrity": "sha512-+kHj8HXArPfpPEKGLZ+kB5ONRTCiGQXo8RQYL0hH8t6pWXUBBK5KkkQmTNOwKK4LEsd0yTsgtjJVm4UBSZea4w==", + "dev": true, "engines": { "node": ">= 0.6.0" } @@ -19485,7 +19617,6 @@ "version": "5.10.0", "resolved": "https://registry.npmjs.org/jose/-/jose-5.10.0.tgz", "integrity": "sha512-s+3Al/p9g32Iq+oqXxkW//7jk2Vig6FF1CFqzVXoTUXt2qz89YWbL+OwS17NFYEvxC35n0FKeGO2LGYSxeM2Gg==", - "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" } @@ -19522,12 +19653,6 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", - "dev": true - }, "node_modules/jsdom": { "version": "24.1.3", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-24.1.3.tgz", @@ -19595,8 +19720,7 @@ "version": "1.7.1", "resolved": "https://registry.npmjs.org/json-rpc-2.0/-/json-rpc-2.0-1.7.1.tgz", "integrity": "sha512-JqZjhjAanbpkXIzFE7u8mE/iFblawwlXtONaCvRqI+pyABVz7B4M1EUNpyVW+dZjqgQ2L5HFmZCmOCgUKm00hg==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/json-schema-traverse": { "version": "1.0.0", @@ -19662,33 +19786,6 @@ "setimmediate": "^1.0.5" } }, - "node_modules/jszip/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/jszip/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/jszip/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/just-clone": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/just-clone/-/just-clone-6.2.0.tgz", @@ -19727,12 +19824,12 @@ } }, "node_modules/launch-editor": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.10.0.tgz", - "integrity": "sha512-D7dBRJo/qcGX9xlvt/6wUYzQxjh5G1RvZPgPv8vi4KRU99DVQL/oW7tnVOCCTm2HGeo3C5HvGE5Yrh6UBoZ0vA==", + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.11.1.tgz", + "integrity": "sha512-SEET7oNfgSaB6Ym0jufAdCeo3meJVeCaaDyzRygy0xsp2BFKCprcfHljTq4QkzTLUxEKkFK6OK4811YM2oSrRg==", "dependencies": { - "picocolors": "^1.0.0", - "shell-quote": "^1.8.1" + "picocolors": "^1.1.1", + "shell-quote": "^1.8.3" } }, "node_modules/lazystream": { @@ -19746,33 +19843,6 @@ "node": ">= 0.6.3" } }, - "node_modules/lazystream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/lazystream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/lazystream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", @@ -19896,18 +19966,6 @@ "node": ">=4" } }, - "node_modules/license-checker/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/license-checker/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -19971,15 +20029,6 @@ "node": ">=0.10.0" } }, - "node_modules/load-json-file/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/load-json-file/node_modules/strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", @@ -20093,13 +20142,6 @@ "deprecated": "This package is deprecated. Use the optional chaining (?.) operator instead.", "dev": true }, - "node_modules/lodash.isequal": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", - "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", - "deprecated": "This package is deprecated. Use require('node:util').isDeepStrictEqual instead.", - "dev": true - }, "node_modules/lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", @@ -20188,21 +20230,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-symbols/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/log-symbols/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -20219,6 +20246,18 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/loglevel": { "version": "1.9.2", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.9.2.tgz", @@ -20275,13 +20314,9 @@ } }, "node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "dependencies": { - "yallist": "^3.0.2" - } + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" }, "node_modules/mac-ca": { "version": "3.1.3", @@ -20293,12 +20328,12 @@ } }, "node_modules/magic-string": { - "version": "0.30.17", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", - "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "version": "0.30.19", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz", + "integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==", "dev": true, "dependencies": { - "@jridgewell/sourcemap-codec": "^1.5.0" + "@jridgewell/sourcemap-codec": "^1.5.5" } }, "node_modules/make-array": { @@ -20324,18 +20359,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/make-dir/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -20389,18 +20412,17 @@ } }, "node_modules/memfs": { - "version": "4.17.2", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.17.2.tgz", - "integrity": "sha512-NgYhCOWgovOXSzvYgUW0LQ7Qy72rWQMGGFJDoWg4G30RHd3z77VbYdtJ4fembJXBy8pMIUA31XNAupobOQlwdg==", - "dependencies": { - "@jsonjoy.com/json-pack": "^1.0.3", - "@jsonjoy.com/util": "^1.3.0", - "tree-dump": "^1.0.1", + "version": "4.49.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.49.0.tgz", + "integrity": "sha512-L9uC9vGuc4xFybbdOpRLoOAOq1YEBBsocCs5NVW32DfU+CZWWIn3OVF+lB8Gp4ttBVSMazwrTrjv8ussX/e3VQ==", + "dependencies": { + "@jsonjoy.com/json-pack": "^1.11.0", + "@jsonjoy.com/util": "^1.9.0", + "glob-to-regex.js": "^1.0.1", + "thingies": "^2.5.0", + "tree-dump": "^1.0.3", "tslib": "^2.0.0" }, - "engines": { - "node": ">= 4.0.0" - }, "funding": { "type": "github", "url": "https://github.com/sponsors/streamich" @@ -20463,17 +20485,6 @@ "node": ">=8.6" } }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", @@ -20511,16 +20522,24 @@ } }, "node_modules/mime-types": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", - "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dependencies": { - "mime-db": "^1.54.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" } }, + "node_modules/mime-types/node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", @@ -20531,11 +20550,14 @@ } }, "node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/minimalistic-assert": { @@ -20578,6 +20600,12 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true + }, "node_modules/mix2": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/mix2/-/mix2-1.0.5.tgz", @@ -20587,26 +20615,26 @@ } }, "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, "bin": { "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "license": "MIT" + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" }, "node_modules/mocha": { - "version": "11.7.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.1.tgz", - "integrity": "sha512-5EK+Cty6KheMS/YLPPMJC64g5V61gIR25KsRItHw6x4hEKT6Njp1n9LOlH4gpevuwMVS66SXaBBpg+RWZkza4A==", + "version": "11.7.4", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-11.7.4.tgz", + "integrity": "sha512-1jYAaY8x0kAZ0XszLWu14pzsf4KV740Gld4HXkhNTXwcHx4AUEDkPzgEHg9CM5dVcW+zv036tjpsEbLraPJj4w==", "dev": true, "dependencies": { "browser-stdout": "^1.3.1", @@ -20617,6 +20645,7 @@ "find-up": "^5.0.0", "glob": "^10.4.5", "he": "^1.2.0", + "is-path-inside": "^3.0.3", "js-yaml": "^4.1.0", "log-symbols": "^4.1.0", "minimatch": "^9.0.5", @@ -20638,6 +20667,15 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/mocha/node_modules/diff": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/mocha/node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -20654,6 +20692,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mocha/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/mocha/node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -20669,6 +20727,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mocha/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mocha/node_modules/p-locate": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", @@ -20708,6 +20781,18 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/mocha/node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mock-fs": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.5.0.tgz", @@ -20744,12 +20829,12 @@ } }, "node_modules/mute-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", - "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-2.0.0.tgz", + "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", "dev": true, "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/nanoid": { @@ -20772,8 +20857,7 @@ "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "license": "MIT" + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" }, "node_modules/natural-compare": { "version": "1.4.0", @@ -20840,7 +20924,6 @@ "version": "2.30.1", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", - "license": "MIT", "dependencies": { "semver": "^5.4.1" } @@ -20849,7 +20932,6 @@ "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "license": "ISC", "bin": { "semver": "bin/semver" } @@ -20857,8 +20939,7 @@ "node_modules/node-addon-api": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", - "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==", - "license": "MIT" + "integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A==" }, "node_modules/node-domexception": { "version": "1.0.0", @@ -20932,9 +21013,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", - "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "version": "2.0.23", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.23.tgz", + "integrity": "sha512-cCmFDMSm26S6tQSDpBCg/NR8NENrVPhAJSf+XbxBG4rPFaaonlEoE9wHQmun+cls499TQGSb7ZyPBRlzgKfpeg==", "devOptional": true }, "node_modules/noms": { @@ -20970,8 +21051,7 @@ "node_modules/noop-logger": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", - "integrity": "sha512-6kM8CLXvuW5crTxsAtva2YLrRrDaiTIkIePWs9moLHqbFWT94WpNFjwS/5dfLfECg5i/lkmw3aoqVidxt23TEQ==", - "license": "MIT" + "integrity": "sha512-6kM8CLXvuW5crTxsAtva2YLrRrDaiTIkIePWs9moLHqbFWT94WpNFjwS/5dfLfECg5i/lkmw3aoqVidxt23TEQ==" }, "node_modules/nopt": { "version": "4.0.3", @@ -20993,29 +21073,24 @@ "dev": true }, "node_modules/normalize-package-data": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-6.0.2.tgz", - "integrity": "sha512-V6gygoYb/5EmNI+MEGrWkC+e6+Rr7mTmfHrxDbLzxQogBkgzo76rkok0Am6thgSF7Mv2nLOajAJj5vDJZEFn7g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, "dependencies": { - "hosted-git-info": "^7.0.0", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^16.14.0 || >=18.0.0" + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" } }, "node_modules/normalize-package-data/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "semver": "bin/semver" } }, "node_modules/normalize-path": { @@ -21056,18 +21131,6 @@ "npm-license": "bin/npm-license" } }, - "node_modules/npm-license/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/npm-license/node_modules/nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -21102,15 +21165,43 @@ "dev": true }, "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", + "integrity": "sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==", "dev": true, "dependencies": { - "path-key": "^3.0.0" + "path-key": "^4.0.0", + "unicorn-magic": "^0.3.0" }, "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/unicorn-magic": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", + "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/npmlog": { @@ -21118,7 +21209,6 @@ "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "deprecated": "This package is no longer supported.", - "license": "ISC", "dependencies": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", @@ -21142,15 +21232,14 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/nwsapi": { - "version": "2.2.20", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.20.tgz", - "integrity": "sha512-/ieB+mDe4MrrKMT8z+mQL8klXydZWGR5Dowt4RAGKbJ3kIGEx3X4ljUo+6V73IXtUPWgfOlU5B9MlGxFO5T+cA==", + "version": "2.2.22", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.22.tgz", + "integrity": "sha512-ujSMe1OWVn55euT1ihwCI1ZcAaAU3nxUiDwfDQldc51ZXaB9m2AyOn6/jh1BLe2t/G8xd6uKG1UBF2aZJeg2SQ==", "dev": true }, "node_modules/object-assign": { @@ -21293,7 +21382,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", - "license": "MIT", "engines": { "node": ">= 0.8" } @@ -21322,14 +21410,14 @@ } }, "node_modules/open": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/open/-/open-10.1.2.tgz", - "integrity": "sha512-cxN6aIDPz6rm8hbebcP7vrQNhvRcveZoJU72Y7vskh4oIm+BZwBECnx5nTmrlres1Qapvx27Qo1Auukpf8PKXw==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/open/-/open-10.2.0.tgz", + "integrity": "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA==", "dependencies": { "default-browser": "^5.2.1", "define-lazy-prop": "^3.0.0", "is-inside-container": "^1.0.0", - "is-wsl": "^3.1.0" + "wsl-utils": "^0.1.0" }, "engines": { "node": ">=18" @@ -21440,15 +21528,6 @@ "node": ">=0.10.0" } }, - "node_modules/oss-attribution-generator/node_modules/camelcase": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", - "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/oss-attribution-generator/node_modules/chalk": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.5.1.tgz", @@ -21506,15 +21585,6 @@ "ms": "2.0.0" } }, - "node_modules/oss-attribution-generator/node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/oss-attribution-generator/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -21524,43 +21594,12 @@ "node": ">=0.8.0" } }, - "node_modules/oss-attribution-generator/node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/oss-attribution-generator/node_modules/get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", "dev": true }, - "node_modules/oss-attribution-generator/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/oss-attribution-generator/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", - "dev": true, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/oss-attribution-generator/node_modules/license-checker": { "version": "13.1.0", "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-13.1.0.tgz", @@ -21607,57 +21646,6 @@ "nopt": "bin/nopt.js" } }, - "node_modules/oss-attribution-generator/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/oss-attribution-generator/node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "dependencies": { - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/oss-attribution-generator/node_modules/read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/oss-attribution-generator/node_modules/read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "dev": true, - "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/oss-attribution-generator/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -21731,41 +21719,6 @@ "integrity": "sha512-xMXXC4eLKaIskvZm89nZi/MstVv1UtGk3nJz9BBKjreMVyoWisWFKfboH+kJS97+wUyBLpO/8ghV9M5VvrwwrA==", "dev": true }, - "node_modules/oss-attribution-generator/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", - "dev": true, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/oss-attribution-generator/node_modules/string-width/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/oss-attribution-generator/node_modules/string-width/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/oss-attribution-generator/node_modules/strip-ansi": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.3.0.tgz", @@ -21890,15 +21843,15 @@ } }, "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", "dev": true, "dependencies": { - "yocto-queue": "^0.1.0" + "yocto-queue": "^1.0.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -21919,33 +21872,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate/node_modules/yocto-queue": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", - "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-retry": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.1.tgz", @@ -22042,21 +21968,39 @@ } }, "node_modules/parse-asn1": { - "version": "5.1.7", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.7.tgz", - "integrity": "sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.9.tgz", + "integrity": "sha512-fIYNuZ/HastSb80baGOuPRo1O9cf4baWw5WsAp7dBuUzeTD/BoaG8sVTdlPFksBE2lF21dN+A1AnrpIjSWqHHg==", "dependencies": { "asn1.js": "^4.10.1", "browserify-aes": "^1.2.0", "evp_bytestokey": "^1.0.3", - "hash-base": "~3.0", - "pbkdf2": "^3.1.2", + "pbkdf2": "^3.1.5", "safe-buffer": "^5.2.1" }, "engines": { "node": ">= 0.10" } }, + "node_modules/parse-asn1/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -22235,17 +22179,13 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==" - }, "node_modules/path-to-regexp": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.2.0.tgz", - "integrity": "sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==", - "engines": { - "node": ">=16" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/path-type": { @@ -22262,15 +22202,6 @@ "node": ">=0.10.0" } }, - "node_modules/path-type/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/path/node_modules/inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", @@ -22302,48 +22233,39 @@ } }, "node_modules/pbkdf2": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.3.tgz", - "integrity": "sha512-wfRLBZ0feWRhCIkoMB6ete7czJcnNnqRpcoWQBLqatqXXmelSRqfdDK4F3u9T2s2cXas/hQJcryI/4lAL+XTlA==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.5.tgz", + "integrity": "sha512-Q3CG/cYvCO1ye4QKkuH7EXxs3VC/rI1/trd+qX2+PolbaKG0H+bgcZzrTt96mMyRtejk+JMCiLUn3y29W8qmFQ==", "dependencies": { - "create-hash": "~1.1.3", + "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "ripemd160": "=2.0.1", + "ripemd160": "^2.0.3", "safe-buffer": "^5.2.1", - "sha.js": "^2.4.11", - "to-buffer": "^1.2.0" + "sha.js": "^2.4.12", + "to-buffer": "^1.2.1" }, "engines": { - "node": ">=0.12" - } - }, - "node_modules/pbkdf2/node_modules/create-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", - "integrity": "sha512-snRpch/kwQhcdlnZKYanNF1m0RDlrCdSKQaH87w1FCFPVPNCQ/Il9QJKAX2jVBZddRdaHBMC+zXa9Gw9tmkNUA==", - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "sha.js": "^2.4.0" - } - }, - "node_modules/pbkdf2/node_modules/hash-base": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", - "integrity": "sha512-0TROgQ1/SxE6KmxWSvXHvRj90/Xo1JvZShofnYF+f6ZsGtR4eES7WfrQzPalmyagfKZCXpVnitiRebZulWsbiw==", - "dependencies": { - "inherits": "^2.0.1" + "node": ">= 0.10" } }, - "node_modules/pbkdf2/node_modules/ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha512-J7f4wutN8mdbV08MJnXibYpCOPHR+yzy+iQ/AsjMv2j8cLavQ8VGagDFUwwTAdF8FmRKVeNpbTTEwNHCW1g94w==", - "dependencies": { - "hash-base": "^2.0.0", - "inherits": "^2.0.1" - } + "node_modules/pbkdf2/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/pend": { "version": "1.2.0", @@ -22357,22 +22279,23 @@ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==" }, "node_modules/picomatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", - "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "engines": { - "node": ">=12" + "node": ">=8.6" }, "funding": { "url": "https://github.com/sponsors/jonschlinkert" } }, "node_modules/pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, "engines": { - "node": ">=4" + "node": ">=0.10.0" } }, "node_modules/pinkie": { @@ -22451,21 +22374,6 @@ "pino-pretty": "bin.js" } }, - "node_modules/pino-pretty/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/pino-pretty/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -22482,15 +22390,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/pino-pretty/node_modules/jmespath": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz", - "integrity": "sha512-+kHj8HXArPfpPEKGLZ+kB5ONRTCiGQXo8RQYL0hH8t6pWXUBBK5KkkQmTNOwKK4LEsd0yTsgtjJVm4UBSZea4w==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/pino-pretty/node_modules/readable-stream": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", @@ -22658,7 +22557,6 @@ "version": "5.3.6", "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.6.tgz", "integrity": "sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg==", - "license": "MIT", "dependencies": { "detect-libc": "^1.0.3", "expand-template": "^2.0.3", @@ -22731,6 +22629,18 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/pretty-hrtime": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", @@ -22741,9 +22651,9 @@ } }, "node_modules/pretty-ms": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.2.0.tgz", - "integrity": "sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-9.3.0.tgz", + "integrity": "sha512-gjVS5hOP+M3wMm5nmNOucbIrqudzs9v/57bWRHQWLYklXqoXKrVfYW2W9+glfGsqtPgpiz5WwyEEB+ksXIx3gQ==", "dev": true, "dependencies": { "parse-ms": "^4.0.0" @@ -22782,6 +22692,18 @@ "prettier": "^3.0.0" } }, + "node_modules/pretty-quick/node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/pretty-quick/node_modules/tinyexec": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", @@ -22839,9 +22761,9 @@ } }, "node_modules/protobufjs": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz", - "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", + "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", "hasInstallScript": true, "dependencies": { "@protobufjs/aspromise": "^1.1.2", @@ -22918,15 +22840,6 @@ "url": "https://github.com/sponsors/lupomontero" } }, - "node_modules/psl/node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/public-encrypt": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", @@ -22955,9 +22868,12 @@ } }, "node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "engines": { + "node": ">=6" + } }, "node_modules/pure-rand": { "version": "6.1.0", @@ -23006,15 +22922,6 @@ "integrity": "sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==", "dev": true }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "engines": { - "node": ">=0.4.x" - } - }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -23095,24 +23002,38 @@ "dev": true }, "node_modules/raw-body": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.0.tgz", - "integrity": "sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.1.tgz", + "integrity": "sha512-9G8cA+tuMS75+6G/TzW8OtLzmBDMo8p1JRxN5AZ+LAp8uxGA8V8GZm4GQ4/N5QNQEnLmg6SS7wyuSmbKepiKqA==", "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", - "iconv-lite": "0.6.3", + "iconv-lite": "0.7.0", "unpipe": "1.0.0" }, "engines": { - "node": ">= 0.8" + "node": ">= 0.10" + } + }, + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.0.tgz", + "integrity": "sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" } }, "node_modules/rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -23123,17 +23044,23 @@ "rc": "cli.js" } }, + "node_modules/rc/node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/rc/node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "license": "ISC" + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/rc/node_modules/strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -23184,282 +23111,89 @@ "npm-normalize-package-bin": "^1.0.0" } }, - "node_modules/read-package-json/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", "dev": true, "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/read-package-json/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", "dev": true, "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=0.10.0" } }, - "node_modules/read-package-json/node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/read-package-json/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" }, "engines": { - "node": "*" + "node": ">=0.10.0" } }, - "node_modules/read-package-json/node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "node_modules/read-pkg-up/node_modules/path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", "dev": true, "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, - "node_modules/read-package-json/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true, - "bin": { - "semver": "bin/semver" + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, - "node_modules/read-pkg": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-8.1.0.tgz", - "integrity": "sha512-PORM8AgzXeskHO/WEv312k9U03B8K9JSiWF/8N9sUuFjBa+9SF2u6K7VClzXwDXab51jCd8Nd36CNM+zR97ScQ==", - "dev": true, + "node_modules/readdir-glob": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", + "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", "dependencies": { - "@types/normalize-package-data": "^2.4.1", - "normalize-package-data": "^6.0.0", - "parse-json": "^7.0.0", - "type-fest": "^4.2.0" + "minimatch": "^5.1.0" + } + }, + "node_modules/readdir-glob/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-10.1.0.tgz", - "integrity": "sha512-aNtBq4jR8NawpKJQldrQcSW9y/d+KWH4v24HWkHljOZ7H0av+YTGANBzRh9A5pw7v/bLVsLVPpOhJ7gHNVy8lA==", - "dev": true, - "dependencies": { - "find-up": "^6.3.0", - "read-pkg": "^8.1.0", - "type-fest": "^4.2.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/find-up": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", - "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", - "dev": true, - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg-up/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/json-parse-even-better-errors": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.2.tgz", - "integrity": "sha512-fi0NG4bPjCHunUJffmLd0gxssIgkNmArMvis4iNah6Owg1MCJjWhEcDLmsK6iGkJq3tHwbDkTlce70/tmXN4cQ==", - "dev": true, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/read-pkg/node_modules/lines-and-columns": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-2.0.4.tgz", - "integrity": "sha512-wM1+Z03eypVAVUCE7QdSqpVIvelbOakn1M0bPDoA4SGWPx3sNDVUiMo3L6To6WWGClB7VyXnhQ4Sn7gxiJbE6A==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/read-pkg/node_modules/parse-json": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-7.1.1.tgz", - "integrity": "sha512-SgOTCX/EZXtZxBE5eJ97P4yGM5n37BwRU+YMsH4vNzFqJV/oWFXXCmwFlgWUM4PrakybVOueJJ6pwHqSVhTFDw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.21.4", - "error-ex": "^1.3.2", - "json-parse-even-better-errors": "^3.0.0", - "lines-and-columns": "^2.0.3", - "type-fest": "^3.8.0" - }, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/parse-json/node_modules/type-fest": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", - "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/read-pkg/node_modules/type-fest": { - "version": "4.41.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", - "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", - "dev": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/readable-stream": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", - "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", - "dependencies": { - "abort-controller": "^3.0.0", - "buffer": "^6.0.3", - "events": "^3.3.0", - "process": "^0.11.10", - "string_decoder": "^1.3.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, - "node_modules/readable-stream/node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, - "node_modules/readable-stream/node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/readable-stream/node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/readdir-glob": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/readdir-glob/-/readdir-glob-1.1.3.tgz", - "integrity": "sha512-v05I2k7xN8zXvPD9N+z/uhXPaj0sUFCe2rcWZIpBsqxfP7xXFQ0tipAd/wjj1YxWyWtUS5IDJpOG82JKt2EAVA==", - "dependencies": { - "minimatch": "^5.1.0" - } - }, - "node_modules/readdir-glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" + "node": ">=10" } }, "node_modules/readdir-scoped-modules": { @@ -23635,7 +23369,6 @@ "resolved": "https://registry.npmjs.org/registry-js/-/registry-js-1.16.1.tgz", "integrity": "sha512-pQ2kD36lh+YNtpaXm6HCCb0QZtV/zQEeKnkfEIj5FDSpF/oFts7pwizEUkWSvP8IbGb4A4a5iBhhS9eUearMmQ==", "hasInstallScript": true, - "license": "MIT", "dependencies": { "node-addon-api": "^3.2.1", "prebuild-install": "^5.3.5" @@ -23785,6 +23518,15 @@ "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==", "dev": true }, + "node_modules/ret": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.5.0.tgz", + "integrity": "sha512-I1XxrZSQ+oErkRR4jYbAyEEu2I0avBvvMM5JN+6EBprOGRCs63ENqZ3vjavq8fBw2+62G5LF5XelKwuJpcvcxw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/retry": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz", @@ -23830,57 +23572,50 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, + "node_modules/ripemd160": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.3.tgz", + "integrity": "sha512-5Di9UC0+8h1L6ZD2d7awM7E/T4uA1fJRlx6zk/NvdCCVEoAnFqvHmCuNeIKoCeIixBX/q8uM+6ycDvF8woqosA==", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "hash-base": "^3.1.2", + "inherits": "^2.0.4" }, "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">= 0.8" } }, - "node_modules/rimraf/node_modules/minimatch": { + "node_modules/ripemd160/node_modules/hash-base": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.2.tgz", + "integrity": "sha512-Bb33KbowVTIj5s7Ked1OsqHUeCpz//tPwR+E2zJgJKo9Z5XolZ9b6bdUgjmYlwnWhoOQKoTd1TYToZGn5mAYOg==", "dependencies": { - "brace-expansion": "^1.1.7" + "inherits": "^2.0.4", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.1" }, "engines": { - "node": "*" + "node": ">= 0.8" } }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } + "node_modules/ripemd160/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] }, "node_modules/router": { "version": "2.2.0", @@ -23904,9 +23639,9 @@ "dev": true }, "node_modules/run-applescript": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.0.0.tgz", - "integrity": "sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", "engines": { "node": ">=18" }, @@ -23915,9 +23650,9 @@ } }, "node_modules/run-async": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", - "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-4.0.6.tgz", + "integrity": "sha512-IoDlSLTs3Yq593mb3ZoKWKXMNu3UpObxhgA/Xuid5p4bbfi2jdY1Hj0m1K+0/tEuQTxIGMhQDqGjKb7RuxGpAQ==", "dev": true, "engines": { "node": ">=0.12.0" @@ -23988,23 +23723,9 @@ "dev": true }, "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, "node_modules/safe-push-apply": { "version": "1.0.0", @@ -24032,6 +23753,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "dev": true, "dependencies": { "call-bound": "^1.0.2", "es-errors": "^1.3.0", @@ -24044,6 +23766,25 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-regex2": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-5.0.0.tgz", + "integrity": "sha512-YwJwe5a51WlK7KbOJREPdjNrpViQBI3p4T50lfwPuDhZnE3XGVTlGvi+aolc5+RvxDD6bnUmjVsU9n1eboLUYw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "dependencies": { + "ret": "~0.5.0" + } + }, "node_modules/safe-stable-stringify": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", @@ -24129,18 +23870,10 @@ "entities": "^4.4.0" } }, - "node_modules/sanitize-html/node_modules/is-plain-object": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", - "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" }, "node_modules/saxes": { "version": "6.0.0", @@ -24155,9 +23888,9 @@ } }, "node_modules/schema-utils": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.2.tgz", - "integrity": "sha512-Gn/JaSk/Mt9gYubxTtSn/QCV4em9mpAPiR1rqy/Ocu19u/G9J5WWdNoUT4SiV6mFC3y6cxyFcFwdzPM3FgxGAQ==", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz", + "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==", "dependencies": { "@types/json-schema": "^7.0.9", "ajv": "^8.9.0", @@ -24190,12 +23923,14 @@ } }, "node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/send": { @@ -24219,28 +23954,39 @@ "node": ">= 18" } }, + "node_modules/send/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/serialize-error": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-11.0.3.tgz", - "integrity": "sha512-2G2y++21dhj2R7iHAdd0FIzjGwuKZld+7Pl/bTU6YIkrC2ZMbVUjm+luj6A6V34Rv9XfKJDKpTWu9W4Gse1D9g==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-12.0.0.tgz", + "integrity": "sha512-ZYkZLAvKTKQXWuh5XpBw7CdbSzagarX39WyZ2H07CDLC5/KfsRGlIXV8d4+tfqX1M7916mRqR1QfNHSij+c9Pw==", "dev": true, "dependencies": { - "type-fest": "^2.12.2" + "type-fest": "^4.31.0" }, "engines": { - "node": ">=14.16" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/serialize-error/node_modules/type-fest": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-2.19.0.tgz", - "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", "dev": true, "engines": { - "node": ">=12.20" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -24319,25 +24065,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" }, - "node_modules/serve-index/node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/serve-index/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/serve-index/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -24381,8 +24108,7 @@ "node_modules/set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "license": "ISC" + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, "node_modules/set-function-length": { "version": "1.2.2", @@ -24440,17 +24166,43 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" }, "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" }, "bin": { "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/sha.js/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/shallow-clone": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", @@ -24510,49 +24262,6 @@ "node": ">=4" } }, - "node_modules/shelljs/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/shelljs/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/shelljs/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, "node_modules/shlex": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/shlex/-/shlex-2.1.2.tgz", @@ -24670,50 +24379,23 @@ "type": "consulting", "url": "https://feross.org/support" } - ], - "license": "MIT" + ] }, "node_modules/simple-get": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", - "license": "MIT", "dependencies": { "decompress-response": "^4.2.0", "once": "^1.3.1", "simple-concat": "^1.0.0" } }, - "node_modules/simple-get/node_modules/decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", - "license": "MIT", - "dependencies": { - "mimic-response": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/simple-get/node_modules/mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", - "license": "MIT", - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/simple-invariant": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/simple-invariant/-/simple-invariant-2.0.1.tgz", "integrity": "sha512-1sbhsxqI+I2tqlmjbz99GXNmZtr6tKIyEgGGnJw/MKGblalqk/XoOYYFJlBzTKZCxx8kLaD3FD5s9BEEjx5Pyg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } @@ -24745,6 +24427,15 @@ "@sinonjs/commons": "^3.0.1" } }, + "node_modules/sinon/node_modules/diff": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-7.0.0.tgz", + "integrity": "sha512-PJWHUb1RFevKCwaFA9RlG5tCd+FO5iRh9A8HEtkmBH2Li03iJriB6m6JIN4rGz3K3JLawI7/veA1xzRKP6ISBw==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -24761,11 +24452,6 @@ "mix2": "^1.0.0" } }, - "node_modules/skema/node_modules/async": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz", - "integrity": "sha512-l6ToIJIotphWahxxHyzK9bnLR6kM4jJIIgLShZeqLY7iboHoGkdgFl7W2/Ivi4SkMJYGKqW8vSuk0uKUj6qsSw==" - }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -24813,12 +24499,12 @@ } }, "node_modules/socks": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.5.tgz", - "integrity": "sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==", + "version": "2.8.7", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", + "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", "dev": true, "dependencies": { - "ip-address": "^9.0.5", + "ip-address": "^10.0.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -24873,15 +24559,6 @@ "node": ">=0.10.0" } }, - "node_modules/sort-keys/node_modules/is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -24900,10 +24577,10 @@ } }, "node_modules/source-map-support": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", - "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", - "dev": true, + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "devOptional": true, "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -24974,9 +24651,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.21", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", - "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", + "version": "3.0.22", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", + "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", "dev": true }, "node_modules/spdx-licenses": { @@ -25197,23 +24874,21 @@ "dev": true }, "node_modules/streamx": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.22.1.tgz", - "integrity": "sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==", + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.23.0.tgz", + "integrity": "sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg==", "dependencies": { + "events-universal": "^1.0.0", "fast-fifo": "^1.3.2", "text-decoder": "^1.1.0" - }, - "optionalDependencies": { - "bare-events": "^2.2.0" } }, "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dependencies": { - "safe-buffer": "~5.2.0" + "safe-buffer": "~5.1.0" } }, "node_modules/string-length": { @@ -25230,19 +24905,16 @@ } }, "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=0.10.0" } }, "node_modules/string-width-cjs": { @@ -25259,34 +24931,31 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "node_modules/string-width-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } }, "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "node": ">=0.10.0" } }, "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^2.0.0" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=0.10.0" } }, "node_modules/string.prototype.trim": { @@ -25369,21 +25038,24 @@ } }, "node_modules/strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=4" } }, "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-4.0.0.tgz", + "integrity": "sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==", "dev": true, "engines": { - "node": ">=6" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/strip-json-comments": { @@ -25526,19 +25198,22 @@ } }, "node_modules/tapable": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.2.tgz", - "integrity": "sha512-Re10+NauLTMCudc7T5WLFLAwDhQ0JWdrMK+9B2M8zR5hRExKmsRDCBA7/aV/pNJFltmBFO5BAMlQFi/vq3nKOg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.0.tgz", + "integrity": "sha512-g9ljZiwki/LfxmQADO3dEY1CbpmXT5Hm2fJ+QaGKwSXUylMybePR7/67YW7jOrrvjEgL1Fmz5kzyAjWVWLlucg==", "devOptional": true, "engines": { "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" } }, "node_modules/tar-fs": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.3.tgz", - "integrity": "sha512-090nwYJDmlhwFwEW3QQl+vaNnxsO2yVsd45eTKRBzSzu+hlb1w2K9inVq5b0ngXuLVqQ4ApvsUHHnu/zQNkWAg==", - "license": "MIT", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz", + "integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -25546,25 +25221,10 @@ "tar-stream": "^2.1.4" } }, - "node_modules/tar-fs/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/tar-fs/node_modules/tar-stream": { + "node_modules/tar-stream": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "license": "MIT", "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -25576,24 +25236,27 @@ "node": ">=6" } }, - "node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "node_modules/tar-stream/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" } }, "node_modules/terser": { - "version": "5.43.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.43.1.tgz", - "integrity": "sha512-+6erLbBm0+LROX2sPXlUYx/ux5PyE9K/a92Wrt6oA+WDAoFTdpHE5tCYCI5PNzq2y8df4rA+QgHLJuR4jNymsg==", + "version": "5.44.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.44.0.tgz", + "integrity": "sha512-nIVck8DK+GM/0Frwd+nIhZ84pR/BX7rmXMfYwyg+Sri5oGVE99/E3KvXqpC2xHFxyqXyGHTKBSioxxplrO4I4w==", "devOptional": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", - "acorn": "^8.14.0", + "acorn": "^8.15.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -25638,43 +25301,14 @@ } } }, - "node_modules/terser-webpack-plugin/node_modules/jest-worker": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", - "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", - "devOptional": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": ">= 10.13.0" - } - }, - "node_modules/terser-webpack-plugin/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "devOptional": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/terser/node_modules/source-map-support": { - "version": "0.5.21", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", - "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "node_modules/terser-webpack-plugin/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "devOptional": true, "dependencies": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/test-exclude": { @@ -25691,6 +25325,26 @@ "node": ">=18" } }, + "node_modules/test-exclude/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/text-decoder": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", @@ -25718,12 +25372,16 @@ "dev": true }, "node_modules/thingies": { - "version": "1.21.0", - "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.21.0.tgz", - "integrity": "sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-2.5.0.tgz", + "integrity": "sha512-s+2Bwztg6PhWUD7XMfeYm5qliDdSiZm7M7n8KjTkIsm3l/2lgVRc2/Gx/v+ZX8lT4FMA+i8aQvhcWylldc+ZNw==", "engines": { "node": ">=10.18" }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, "peerDependencies": { "tslib": "^2" } @@ -25751,33 +25409,6 @@ "xtend": "~4.0.1" } }, - "node_modules/through2/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/through2/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/through2/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/thunky": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz", @@ -25798,18 +25429,6 @@ "node": ">=14.0.0" } }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -25817,9 +25436,9 @@ "dev": true }, "node_modules/to-buffer": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.1.tgz", - "integrity": "sha512-tB82LpAIWjhLYbqjx3X4zEeHN6M8CiuOEy2JY8SEQVdYRe3CCHOFaqrBW1doLDrfpWhplcW7BL+bO3/6S3pcDQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", + "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==", "dependencies": { "isarray": "^2.0.5", "safe-buffer": "^5.2.1", @@ -25834,6 +25453,25 @@ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, + "node_modules/to-buffer/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -25868,15 +25506,6 @@ "node": ">=6" } }, - "node_modules/tough-cookie/node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/tr46": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.1.1.tgz", @@ -25889,19 +25518,10 @@ "node": ">=18" } }, - "node_modules/tr46/node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/tree-dump": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.0.3.tgz", - "integrity": "sha512-il+Cv80yVHFBwokQSfd4bldvr1Md951DpgAGfmhydt04L+YzHgubm2tQ7zueWDcGENKHq0ZvGFR/hjvNXilHEg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/tree-dump/-/tree-dump-1.1.0.tgz", + "integrity": "sha512-rMuvhU4MCDbcbnleZTFezWsaZXRFemSqAM+7jPnzUl1fo9w3YEKOxAeui0fz3OI4EU4hf23iyA7uQRVko+UaBA==", "engines": { "node": ">=10.0" }, @@ -25935,14 +25555,14 @@ } }, "node_modules/ts-jest": { - "version": "29.4.0", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.0.tgz", - "integrity": "sha512-d423TJMnJGu80/eSgfQ5w/R+0zFJvdtTxwtF9KzFFunOpSeD+79lHJQIiAhluJoyGRbvj9NZJsl9WjCUo0ND7Q==", + "version": "29.4.4", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.4.tgz", + "integrity": "sha512-ccVcRABct5ZELCT5U0+DZwkXMCcOCLi2doHRrKy1nK/s7J7bch6TzJMsrY09WxgUUIP/ITfmcDS8D2yl63rnXw==", "dev": true, "dependencies": { "bs-logger": "^0.2.6", - "ejs": "^3.1.10", "fast-json-stable-stringify": "^2.1.0", + "handlebars": "^4.7.8", "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", @@ -25986,18 +25606,6 @@ } } }, - "node_modules/ts-jest/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ts-jest/node_modules/type-fest": { "version": "4.41.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", @@ -26011,9 +25619,9 @@ } }, "node_modules/ts-loader": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.2.tgz", - "integrity": "sha512-Qo4piXvOTWcMGIgRiuFa6nHNm+54HbYaZCKqc9eeZCLRy3XqafQgwX2F7mofrbJG3g7EEb+lkiR+z2Lic2s3Zw==", + "version": "9.5.4", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.5.4.tgz", + "integrity": "sha512-nCz0rEwunlTZiy6rXFByQU1kVVpCIgUpc/psFiKVrUwrizdnIbRFu8w7bxhUF0X613DYwT4XzrZHpVyMe758hQ==", "dev": true, "dependencies": { "chalk": "^4.1.0", @@ -26030,21 +25638,6 @@ "webpack": "^5.0.0" } }, - "node_modules/ts-loader/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/ts-loader/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -26061,25 +25654,13 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/ts-loader/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ts-loader/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.6.tgz", + "integrity": "sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==", "dev": true, "engines": { - "node": ">= 8" + "node": ">= 12" } }, "node_modules/ts-lsp-client": { @@ -26104,28 +25685,6 @@ "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", "dev": true }, - "node_modules/ts-mocha": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-11.1.0.tgz", - "integrity": "sha512-yT7FfzNRCu8ZKkYvAOiH01xNma/vLq6Vit7yINKYFNVP8e5UyrYXSOMIipERTpzVKJQ4Qcos5bQo1tNERNZevQ==", - "dev": true, - "bin": { - "ts-mocha": "bin/ts-mocha" - }, - "engines": { - "node": ">= 6.X.X" - }, - "peerDependencies": { - "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X || ^11.X.X", - "ts-node": "^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X", - "tsconfig-paths": "^4.X.X" - }, - "peerDependenciesMeta": { - "tsconfig-paths": { - "optional": true - } - } - }, "node_modules/ts-node": { "version": "10.9.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", @@ -26169,15 +25728,6 @@ } } }, - "node_modules/ts-node/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/ts-sinon": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ts-sinon/-/ts-sinon-2.0.2.tgz", @@ -26234,15 +25784,6 @@ "@types/sinonjs__fake-timers": "*" } }, - "node_modules/ts-sinon/node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/ts-sinon/node_modules/isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", @@ -26306,30 +25847,27 @@ } }, "node_modules/tsconfig-paths": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", - "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, - "optional": true, - "peer": true, "dependencies": { - "json5": "^2.2.2", + "@types/json5": "^0.0.29", + "json5": "^1.0.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" - }, - "engines": { - "node": ">=6" } }, - "node_modules/tsconfig-paths/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=4" + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" } }, "node_modules/tslib": { @@ -26338,9 +25876,9 @@ "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/tsx": { - "version": "4.20.3", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.3.tgz", - "integrity": "sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==", + "version": "4.20.6", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.6.tgz", + "integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==", "dev": true, "dependencies": { "esbuild": "~0.25.0", @@ -26360,7 +25898,6 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -26390,9 +25927,9 @@ } }, "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { "node": ">=10" @@ -26414,6 +25951,17 @@ "node": ">= 0.6" } }, + "node_modules/type-is/node_modules/mime-types": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/typed-array-buffer": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", @@ -26488,9 +26036,9 @@ } }, "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -26504,6 +26052,19 @@ "resolved": "https://registry.npmjs.org/typescript-collections/-/typescript-collections-1.3.3.tgz", "integrity": "sha512-7sI4e/bZijOzyURng88oOFZCISQPTHozfE2sUu5AviFYk5QV7fYGb6YiDl+vKjF/pICA354JImBImL9XJWUvdQ==" }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/umd-compat-loader": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/umd-compat-loader/-/umd-compat-loader-2.1.2.tgz", @@ -26575,9 +26136,9 @@ "dev": true }, "node_modules/undici": { - "version": "6.21.3", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.21.3.tgz", - "integrity": "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw==", + "version": "6.22.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.22.0.tgz", + "integrity": "sha512-hU/10obOIu62MGYjdskASR3CUAiYaFTtC9Pa6vHyf//mAipSvSQg6od2CnJswq7fvzNS3zJhxoRkgNVaHurWKw==", "engines": { "node": ">=18.17" } @@ -26667,23 +26228,6 @@ "punycode": "^2.1.0" } }, - "node_modules/uri-js/node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "engines": { - "node": ">=6" - } - }, - "node_modules/url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==", - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", @@ -26713,6 +26257,7 @@ "version": "0.12.5", "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, "dependencies": { "inherits": "^2.0.3", "is-arguments": "^1.0.4", @@ -26778,6 +26323,16 @@ "node": ">=10.12.0" } }, + "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, "node_modules/validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -26845,18 +26400,6 @@ "node": ">=10" } }, - "node_modules/vscode-languageclient/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/vscode-languageserver": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", @@ -26926,21 +26469,6 @@ "node": ">=10" } }, - "node_modules/wait-port/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/wait-port/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -27021,20 +26549,6 @@ "wdio": "bin/wdio.js" } }, - "node_modules/wdio/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/wdio/node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -27058,17 +26572,6 @@ "node": ">= 12" } }, - "node_modules/wdio/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/web-streams-polyfill": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", @@ -27084,20 +26587,21 @@ "integrity": "sha512-hS87TH71Zd6mGAmYCvlgxeGDjqd9GTeqXNqTT+u0Gs51uIozNIaaq/kUAbV/Zf56jb2ZOyG8BxZs2GG9wbLi6Q==" }, "node_modules/webdriver": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.16.2.tgz", - "integrity": "sha512-T7QKqD+N0hfvrxq/am5wqdOuyOy7F2tGS7X2f/7jyhrxSPG6Q0cNkSt4gCwla+q3nDMivCP0QIPc7mAVSx5AYQ==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/webdriver/-/webdriver-9.20.0.tgz", + "integrity": "sha512-Kk+AGV1xWLNHVpzUynQJDULMzbcO3IjXo3s0BzfC30OpGxhpaNmoazMQodhtv0Lp242Mb1VYXD89dCb4oAHc4w==", "dev": true, "dependencies": { "@types/node": "^20.1.0", "@types/ws": "^8.5.3", - "@wdio/config": "9.16.2", - "@wdio/logger": "9.16.2", + "@wdio/config": "9.20.0", + "@wdio/logger": "9.18.0", "@wdio/protocols": "9.16.2", - "@wdio/types": "9.16.2", - "@wdio/utils": "9.16.2", + "@wdio/types": "9.20.0", + "@wdio/utils": "9.20.0", "deepmerge-ts": "^7.0.3", - "undici": "^6.20.1", + "https-proxy-agent": "^7.0.6", + "undici": "^6.21.3", "ws": "^8.8.0" }, "engines": { @@ -27105,35 +26609,35 @@ } }, "node_modules/webdriver/node_modules/@types/node": { - "version": "20.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.2.tgz", - "integrity": "sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==", + "version": "20.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", + "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "dev": true, "dependencies": { "undici-types": "~6.21.0" } }, "node_modules/webdriverio": { - "version": "9.16.2", - "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.16.2.tgz", - "integrity": "sha512-aRcfBZyY+OFqz2DI0ZYmMahGlH3h/clAXXOQSFN5QfrHG4Cjuo5xy3lq4tVfszjEJ813+wwC4HJLbgDmMrPXkA==", + "version": "9.20.0", + "resolved": "https://registry.npmjs.org/webdriverio/-/webdriverio-9.20.0.tgz", + "integrity": "sha512-cqaXfahTzCFaQLlk++feZaze6tAsW8OSdaVRgmOGJRII1z2A4uh4YGHtusTpqOiZAST7OBPqycOwfh01G/Ktbg==", "dev": true, "dependencies": { "@types/node": "^20.11.30", "@types/sinonjs__fake-timers": "^8.1.5", - "@wdio/config": "9.16.2", - "@wdio/logger": "9.16.2", + "@wdio/config": "9.20.0", + "@wdio/logger": "9.18.0", "@wdio/protocols": "9.16.2", "@wdio/repl": "9.16.2", - "@wdio/types": "9.16.2", - "@wdio/utils": "9.16.2", + "@wdio/types": "9.20.0", + "@wdio/utils": "9.20.0", "archiver": "^7.0.1", "aria-query": "^5.3.0", "cheerio": "^1.0.0-rc.12", "css-shorthand-properties": "^1.1.1", "css-value": "^0.0.1", "grapheme-splitter": "^1.0.4", - "htmlfy": "^0.6.0", + "htmlfy": "^0.8.1", "is-plain-obj": "^4.1.0", "jszip": "^3.10.1", "lodash.clonedeep": "^4.5.0", @@ -27141,9 +26645,9 @@ "query-selector-shadow-dom": "^1.0.1", "resq": "^1.11.0", "rgb2hex": "0.2.5", - "serialize-error": "^11.0.3", + "serialize-error": "^12.0.0", "urlpattern-polyfill": "^10.0.0", - "webdriver": "9.16.2" + "webdriver": "9.20.0" }, "engines": { "node": ">=18.20.0" @@ -27158,9 +26662,9 @@ } }, "node_modules/webdriverio/node_modules/@types/node": { - "version": "20.19.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.2.tgz", - "integrity": "sha512-9pLGGwdzOUBDYi0GNjM97FIA+f92fqSke6joWeBjWXllfNxZBs7qeMF7tvtOIsbY45xkWkxrdwUfUf3MnQa9gA==", + "version": "20.19.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.19.tgz", + "integrity": "sha512-pb1Uqj5WJP7wrcbLU7Ru4QtA0+3kAXrkutGiD26wUKzSMgNNaPARTUDQmElUXp64kh3cWdou3Q0C7qwwxqSFmg==", "dev": true, "dependencies": { "undici-types": "~6.21.0" @@ -27188,21 +26692,22 @@ } }, "node_modules/webpack": { - "version": "5.99.9", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.99.9.tgz", - "integrity": "sha512-brOPwM3JnmOa+7kd3NsmOUOwbDAj8FT9xDsG3IW0MgbN9yZV7Oi/s/+MNQ/EcSMqw7qfoRyXPoeEWT8zLVdVGg==", + "version": "5.102.1", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.102.1.tgz", + "integrity": "sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ==", "devOptional": true, "dependencies": { "@types/eslint-scope": "^3.7.7", - "@types/estree": "^1.0.6", + "@types/estree": "^1.0.8", "@types/json-schema": "^7.0.15", "@webassemblyjs/ast": "^1.14.1", "@webassemblyjs/wasm-edit": "^1.14.1", "@webassemblyjs/wasm-parser": "^1.14.1", - "acorn": "^8.14.0", - "browserslist": "^4.24.0", + "acorn": "^8.15.0", + "acorn-import-phases": "^1.0.3", + "browserslist": "^4.26.3", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", + "enhanced-resolve": "^5.17.3", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", @@ -27212,11 +26717,11 @@ "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^4.3.2", - "tapable": "^2.1.1", + "schema-utils": "^4.3.3", + "tapable": "^2.3.0", "terser-webpack-plugin": "^5.3.11", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" + "watchpack": "^2.4.4", + "webpack-sources": "^3.3.3" }, "bin": { "webpack": "bin/webpack.js" @@ -27307,13 +26812,13 @@ } }, "node_modules/webpack-dev-middleware": { - "version": "7.4.2", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.4.2.tgz", - "integrity": "sha512-xOO8n6eggxnwYpy1NlzUKpvrjfJTvae5/D6WOK0S2LSo7vjmo5gCM1DbLUmFqrMTJP+W/0YZNctm7jasWvLuBA==", + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-7.4.5.tgz", + "integrity": "sha512-uxQ6YqGdE4hgDKNf7hUiPXOdtkXvBJXrfEGYSx7P7LC8hnUYGK70X6xQXUvXeNyBDDcsiQXpG2m3G9vxowaEuA==", "dependencies": { "colorette": "^2.0.10", - "memfs": "^4.6.0", - "mime-types": "^2.1.31", + "memfs": "^4.43.1", + "mime-types": "^3.0.1", "on-finished": "^2.4.1", "range-parser": "^1.2.1", "schema-utils": "^4.0.0" @@ -27334,20 +26839,12 @@ } } }, - "node_modules/webpack-dev-middleware/node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/webpack-dev-middleware/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.1.tgz", + "integrity": "sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==", "dependencies": { - "mime-db": "1.52.0" + "mime-db": "^1.54.0" }, "engines": { "node": ">= 0.6" @@ -27620,25 +27117,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/webpack-dev-server/node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/webpack-dev-server/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/webpack-dev-server/node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -27652,17 +27130,6 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==" }, - "node_modules/webpack-dev-server/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/webpack-dev-server/node_modules/qs": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", @@ -27702,6 +27169,25 @@ "node": ">=8.10.0" } }, + "node_modules/webpack-dev-server/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/webpack-dev-server/node_modules/send": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", @@ -27812,36 +27298,6 @@ "node": ">=4.0" } }, - "node_modules/webpack/node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "devOptional": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/webpack/node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "devOptional": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/webpack/node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "devOptional": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/websocket-driver": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", @@ -27991,7 +27447,6 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.1.0.tgz", "integrity": "sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==", - "license": "MIT", "engines": { "node": ">=4" } @@ -28020,31 +27475,10 @@ "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "license": "ISC", "dependencies": { "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "node_modules/wide-align/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/wide-align/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/wildcard": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", @@ -28074,6 +27508,14 @@ "node": ">=4" } }, + "node_modules/win-ca/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "engines": { + "node": ">=4" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -28083,23 +27525,29 @@ "node": ">=0.10.0" } }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true + }, "node_modules/workerpool": { - "version": "9.3.3", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.3.tgz", - "integrity": "sha512-slxCaKbYjEdFT/o2rH9xS1hf4uRDch1w7Uo+apxhZ+sf/1d9e0ZVkn42kPNGP2dgjIx6YFvSevj0zHvbWe2jdw==", + "version": "9.3.4", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-9.3.4.tgz", + "integrity": "sha512-TmPRQYYSAnnDiEB0P/Ytip7bFGvqnSU6I2BcuSw7Hx+JSg/DsUi5ebYfc8GYaSdpuvOcEs6dXxPurOYpe9QFwg==", "dev": true }, "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { "url": "https://github.com/chalk/wrap-ansi?sponsor=1" @@ -28122,25 +27570,14 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dependencies": { - "color-convert": "^2.0.1" - }, + "node_modules/wrap-ansi-cjs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, "node_modules/wrap-ansi-cjs/node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -28154,40 +27591,25 @@ "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dependencies": { - "ansi-regex": "^6.0.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=8" } }, "node_modules/wrappy": { @@ -28234,6 +27656,20 @@ } } }, + "node_modules/wsl-utils": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-0.1.0.tgz", + "integrity": "sha512-h3Fbisa2nKGPxCpm89Hk33lBLsnaGBvctQopaBSOW/uIs6FTe1ATyAnKFJrzVs9vpGdsTe73WF3V4lIsk4Gacw==", + "dependencies": { + "is-wsl": "^3.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/xml-name-validator": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", @@ -28463,11 +27899,35 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } }, "node_modules/yargs/node_modules/string-width": { "version": "4.2.3", @@ -28498,7 +27958,6 @@ "resolved": "https://registry.npmjs.org/yauzl-promise/-/yauzl-promise-4.0.0.tgz", "integrity": "sha512-/HCXpyHXJQQHvFq9noqrjfa/WpQC2XYs3vI7tBiAi4QiIU1knvYhZGaO1QPjwIVMdqflxbmwgMXtYeaRiAE0CA==", "dev": true, - "license": "MIT", "dependencies": { "@node-rs/crc32": "^1.7.0", "is-it-type": "^5.1.2", @@ -28527,21 +27986,21 @@ } }, "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz", + "integrity": "sha512-AyeEbWOu/TAXdxlV9wmGcR0+yh2j3vYPGOECcIj2S7MkrLyC7ne+oye2BKTItt0ii2PHk4cDy+95+LshzbXnGg==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12.20" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/yoctocolors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.1.tgz", - "integrity": "sha512-GQHQqAopRhwU8Kt1DDM8NjibDXHC8eoh1erhGAJPEyveY9qqVeXvVikNKrDz69sHowPMorbPUrH/mx8c50eiBQ==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yoctocolors/-/yoctocolors-2.1.2.tgz", + "integrity": "sha512-CzhO+pFNo8ajLM2d2IW/R93ipy99LWjtwblvC1RsoSUMZgyLbYFr221TnSNT7GjGdYui6P459mw9JH/g/zW2ug==", "dev": true, "engines": { "node": ">=18" @@ -28551,9 +28010,9 @@ } }, "node_modules/yoctocolors-cjs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz", - "integrity": "sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", "dev": true, "engines": { "node": ">=18" @@ -28575,10 +28034,75 @@ "node": ">= 14" } }, + "node_modules/zip-stream/node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/zip-stream/node_modules/readable-stream": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.7.0.tgz", + "integrity": "sha512-oIGGmcpTLwPga8Bn6/Z75SVaH1z5dUut2ibSyAMVhmUggWpmDn2dapB0n7f8nwaSiRtepAsfJyfXIO5DCVAODg==", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/zip-stream/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/zip-stream/node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/zod": { - "version": "3.25.67", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.67.tgz", - "integrity": "sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw==", + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "funding": { "url": "https://github.com/sponsors/colinhacks" } @@ -28592,9 +28116,9 @@ } }, "node_modules/zx": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/zx/-/zx-8.6.0.tgz", - "integrity": "sha512-CpOskNj7nNW19z5DkOTHX24Yh1qnnx1oANn8EnD3QbCUBnZpuennJaYkb4zea5GJCxT6/IdxeiA5nweQ1S2YtA==", + "version": "8.8.4", + "resolved": "https://registry.npmjs.org/zx/-/zx-8.8.4.tgz", + "integrity": "sha512-44GcD+ZlM/v1OQtbwnSxLPcoE1ZEUICmR+RSbJZLAqfIixNLuMjLyh0DcS75OyfJ/sWYAwCWDmDvJ4hdnANAPQ==", "dev": true, "bin": { "zx": "build/cli.js" @@ -28605,17 +28129,17 @@ }, "server/aws-lsp-antlr4": { "name": "@aws/lsp-antlr4", - "version": "0.1.17", + "version": "0.1.20", "license": "Apache-2.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.13" + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16" }, "devDependencies": { "@babel/plugin-transform-modules-commonjs": "^7.24.1", "@types/jest": "29.5.14", - "antlr4-c3": "3.4.2", - "antlr4ng": "3.0.14", + "antlr4-c3": "3.4.4", + "antlr4ng": "3.0.16", "antlr4ng-cli": "^2.0.0", "babel-plugin-transform-import-meta": "^2.3.2", "jest": "^29.7.0", @@ -28633,9 +28157,8 @@ }, "server/aws-lsp-antlr4/node_modules/prettier": { "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin-prettier.js" }, @@ -28650,7 +28173,7 @@ "name": "@aws/lsp-buildspec", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-json": "*", "@aws/lsp-yaml": "*", "vscode-languageserver": "^9.0.1", @@ -28661,7 +28184,7 @@ "name": "@aws/lsp-cloudformation", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-core": "*", "@aws/lsp-json": "*", "vscode-languageserver": "^9.0.1", @@ -28670,8 +28193,10 @@ }, "server/aws-lsp-codewhisperer": { "name": "@aws/lsp-codewhisperer", - "version": "0.0.73", + "version": "0.0.88", "bundleDependencies": [ + "@amzn/codewhisperer", + "@amzn/codewhisperer-runtime", "@amzn/codewhisperer-streaming", "@amzn/amazon-q-developer-streaming-client" ], @@ -28679,18 +28204,20 @@ "license": "Apache-2.0", "dependencies": { "@amzn/amazon-q-developer-streaming-client": "file:../../core/q-developer-streaming-client/amzn-amazon-q-developer-streaming-client-1.0.0.tgz", + "@amzn/codewhisperer": "file:../../core/codewhisperer/amzn-codewhisperer-1.0.0.tgz", + "@amzn/codewhisperer-runtime": "file:../../core/codewhisperer-runtime/amzn-codewhisperer-runtime-1.0.0.tgz", "@amzn/codewhisperer-streaming": "file:../../core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz", + "@aws-sdk/types": "^3.734.0", "@aws-sdk/util-arn-parser": "^3.723.0", "@aws-sdk/util-retry": "^3.374.0", - "@aws/chat-client-ui-types": "^0.1.56", - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.13", + "@aws/chat-client-ui-types": "^0.1.63", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", "@modelcontextprotocol/sdk": "^1.15.0", "@smithy/node-http-handler": "^2.5.0", "adm-zip": "^0.5.10", "archiver": "^7.0.1", "async-mutex": "^0.5.0", - "aws-sdk": "^2.1403.0", "axios": "^1.8.4", "chokidar": "^4.0.3", "deepmerge": "^4.3.1", @@ -28721,6 +28248,7 @@ "@types/archiver": "^6.0.2", "@types/diff": "^7.0.2", "@types/encoding-japanese": "^2.2.1", + "@types/escape-html": "^1.0.4", "@types/ignore-walk": "^4.0.3", "@types/local-indexing": "file:./types/types-local-indexing-1.1.0.tgz", "@types/lokijs": "^1.5.14", @@ -28744,8 +28272,7 @@ }, "server/aws-lsp-codewhisperer/node_modules/@smithy/abort-controller": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.2.0.tgz", - "integrity": "sha512-wRlta7GuLWpTqtFfGo+nZyOO1vEvewdNR1R4rTxpC8XU6vG/NDyrFBhwLZsqg1NUoR1noVaXJPC/7ZK47QCySw==", + "license": "Apache-2.0", "dependencies": { "@smithy/types": "^2.12.0", "tslib": "^2.6.2" @@ -28756,8 +28283,7 @@ }, "server/aws-lsp-codewhisperer/node_modules/@smithy/node-http-handler": { "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.5.0.tgz", - "integrity": "sha512-mVGyPBzkkGQsPoxQUbxlEfRjrj6FPyA3u3u2VXGr9hT8wilsoQdZdvKpMBFMB8Crfhv5dNkKHIW0Yyuc7eABqA==", + "license": "Apache-2.0", "dependencies": { "@smithy/abort-controller": "^2.2.0", "@smithy/protocol-http": "^3.3.0", @@ -28771,8 +28297,7 @@ }, "server/aws-lsp-codewhisperer/node_modules/@smithy/protocol-http": { "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.3.0.tgz", - "integrity": "sha512-Xy5XK1AFWW2nlY/biWZXu6/krgbaf2dg0q492D8M5qthsnU2H+UgFeZLbM76FnH7s6RO/xhQRkj+T6KBO3JzgQ==", + "license": "Apache-2.0", "dependencies": { "@smithy/types": "^2.12.0", "tslib": "^2.6.2" @@ -28783,8 +28308,7 @@ }, "server/aws-lsp-codewhisperer/node_modules/@smithy/querystring-builder": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.2.0.tgz", - "integrity": "sha512-L1kSeviUWL+emq3CUVSgdogoM/D9QMFaqxL/dd0X7PCNWmPXqt+ExtrBjqT0V7HLN03Vs9SuiLrG3zy3JGnE5A==", + "license": "Apache-2.0", "dependencies": { "@smithy/types": "^2.12.0", "@smithy/util-uri-escape": "^2.2.0", @@ -28796,8 +28320,7 @@ }, "server/aws-lsp-codewhisperer/node_modules/@smithy/types": { "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.12.0.tgz", - "integrity": "sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -28807,8 +28330,7 @@ }, "server/aws-lsp-codewhisperer/node_modules/@smithy/util-uri-escape": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.2.0.tgz", - "integrity": "sha512-jtmJMyt1xMD/d8OtbVJ2gFZOSKc+ueYJZPW20ULW1GOp/q/YIM0wNh+u8ZFao9UaIGz4WoPW8hC64qlWLIfoDA==", + "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, @@ -28816,6 +28338,74 @@ "node": ">=14.0.0" } }, + "server/aws-lsp-codewhisperer/node_modules/diff": { + "version": "7.0.0", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.3.1" + } + }, + "server/aws-lsp-codewhisperer/node_modules/fdir": { + "version": "6.5.0", + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "server/aws-lsp-codewhisperer/node_modules/picomatch": { + "version": "4.0.3", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "server/aws-lsp-codewhisperer/node_modules/ts-mocha": { + "version": "11.1.0", + "dev": true, + "license": "MIT", + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X || ^11.X.X", + "ts-node": "^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X", + "tsconfig-paths": "^4.X.X" + }, + "peerDependenciesMeta": { + "tsconfig-paths": { + "optional": true + } + } + }, + "server/aws-lsp-codewhisperer/node_modules/tsconfig-paths": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "server/aws-lsp-identity": { "name": "@aws/lsp-identity", "version": "0.0.1", @@ -28823,8 +28413,8 @@ "dependencies": { "@aws-sdk/client-sso-oidc": "^3.616.0", "@aws-sdk/token-providers": "^3.744.0", - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.12", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", "@smithy/node-http-handler": "^3.2.5", "@smithy/shared-ini-file-loader": "^4.0.1", "https-proxy-agent": "^7.0.5", @@ -28852,64 +28442,565 @@ "node": ">=18.0.0" } }, - "server/aws-lsp-identity/node_modules/@aws/lsp-core": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/@aws/lsp-core/-/lsp-core-0.0.12.tgz", - "integrity": "sha512-FNbbvzUZQKtUE/LHGsI8b05+M44h47f7ExlET1WeOnhfjDWu7n+wlHRkPZkdsEe1z5pbluGNBaiTO/cV9A2qQQ==", + "server/aws-lsp-identity/node_modules/@aws-sdk/core": { + "version": "3.901.0", "license": "Apache-2.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.109", - "@gerhobbelt/gitignore-parser": "^0.2.0-9", - "cross-spawn": "7.0.6", - "jose": "^5.2.4", - "request-light": "^0.8.0", - "vscode-languageserver-textdocument": "^1.0.8", - "vscode-languageserver-types": "^3.17.3", - "vscode-uri": "^3.1.0" + "@aws-sdk/types": "3.901.0", + "@aws-sdk/xml-builder": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/signature-v4": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", + "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "server/aws-lsp-identity/node_modules/@smithy/types": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.7.2.tgz", - "integrity": "sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg==", - "dev": true, + "server/aws-lsp-identity/node_modules/@aws-sdk/core/node_modules/@smithy/protocol-http": { + "version": "5.3.0", + "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^4.6.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, - "server/aws-lsp-json": { - "name": "@aws/lsp-json", - "version": "0.1.17", + "server/aws-lsp-identity/node_modules/@aws-sdk/core/node_modules/@smithy/types": { + "version": "4.6.0", "license": "Apache-2.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.13", - "vscode-languageserver": "^9.0.1", - "vscode-languageserver-textdocument": "^1.0.8" - }, - "devDependencies": { - "c8": "^10.1.2" + "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "server/aws-lsp-notification": { - "name": "@aws/lsp-notification", - "version": "0.0.1", + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-host-header": { + "version": "3.901.0", "license": "Apache-2.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.12", - "vscode-languageserver": "^9.0.1" + "@aws-sdk/types": "3.901.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" }, - "devDependencies": { + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/protocol-http": { + "version": "5.3.0", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/types": { + "version": "4.6.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-logger": { + "version": "3.901.0", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-logger/node_modules/@smithy/types": { + "version": "4.6.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-recursion-detection": { + "version": "3.901.0", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@aws/lambda-invoke-store": "^0.0.1", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/protocol-http": { + "version": "5.3.0", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/types": { + "version": "4.6.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.901.0", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@smithy/core": "^3.14.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/protocol-http": { + "version": "5.3.0", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/types": { + "version": "4.6.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/nested-clients": { + "version": "3.901.0", + "license": "Apache-2.0", + "dependencies": { + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@aws-sdk/core": "3.901.0", + "@aws-sdk/middleware-host-header": "3.901.0", + "@aws-sdk/middleware-logger": "3.901.0", + "@aws-sdk/middleware-recursion-detection": "3.901.0", + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/region-config-resolver": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@aws-sdk/util-endpoints": "3.901.0", + "@aws-sdk/util-user-agent-browser": "3.901.0", + "@aws-sdk/util-user-agent-node": "3.901.0", + "@smithy/config-resolver": "^4.3.0", + "@smithy/core": "^3.14.0", + "@smithy/fetch-http-handler": "^5.3.0", + "@smithy/hash-node": "^4.2.0", + "@smithy/invalid-dependency": "^4.2.0", + "@smithy/middleware-content-length": "^4.2.0", + "@smithy/middleware-endpoint": "^4.3.0", + "@smithy/middleware-retry": "^4.4.0", + "@smithy/middleware-serde": "^4.2.0", + "@smithy/middleware-stack": "^4.2.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/node-http-handler": "^4.3.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/smithy-client": "^4.7.0", + "@smithy/types": "^4.6.0", + "@smithy/url-parser": "^4.2.0", + "@smithy/util-base64": "^4.2.0", + "@smithy/util-body-length-browser": "^4.2.0", + "@smithy/util-body-length-node": "^4.2.0", + "@smithy/util-defaults-mode-browser": "^4.2.0", + "@smithy/util-defaults-mode-node": "^4.2.0", + "@smithy/util-endpoints": "^3.2.0", + "@smithy/util-middleware": "^4.2.0", + "@smithy/util-retry": "^4.2.0", + "@smithy/util-utf8": "^4.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/abort-controller": { + "version": "4.2.0", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler": { + "version": "4.3.0", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.2.0", + "@smithy/protocol-http": "^5.3.0", + "@smithy/querystring-builder": "^4.2.0", + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/protocol-http": { + "version": "5.3.0", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/querystring-builder": { + "version": "4.2.0", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.6.0", + "@smithy/util-uri-escape": "^4.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/types": { + "version": "4.6.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-uri-escape": { + "version": "4.2.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/region-config-resolver": { + "version": "3.901.0", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", + "@smithy/util-config-provider": "^4.2.0", + "@smithy/util-middleware": "^4.2.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/types": { + "version": "4.6.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/token-providers": { + "version": "3.901.0", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "3.901.0", + "@aws-sdk/nested-clients": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/property-provider": "^4.2.0", + "@smithy/shared-ini-file-loader": "^4.3.0", + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/token-providers/node_modules/@smithy/types": { + "version": "4.6.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/util-user-agent-browser": { + "version": "3.901.0", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "3.901.0", + "@smithy/types": "^4.6.0", + "bowser": "^2.11.0", + "tslib": "^2.6.2" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/util-user-agent-browser/node_modules/@smithy/types": { + "version": "4.6.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/util-user-agent-node": { + "version": "3.901.0", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/middleware-user-agent": "3.901.0", + "@aws-sdk/types": "3.901.0", + "@smithy/node-config-provider": "^4.3.0", + "@smithy/types": "^4.6.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + }, + "peerDependencies": { + "aws-crt": ">=1.0.0" + }, + "peerDependenciesMeta": { + "aws-crt": { + "optional": true + } + } + }, + "server/aws-lsp-identity/node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/types": { + "version": "4.6.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@smithy/abort-controller": { + "version": "3.1.9", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.7.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@smithy/node-http-handler": { + "version": "3.3.3", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^3.1.9", + "@smithy/protocol-http": "^4.1.8", + "@smithy/querystring-builder": "^3.0.11", + "@smithy/types": "^3.7.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@smithy/protocol-http": { + "version": "4.1.8", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.7.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@smithy/querystring-builder": { + "version": "3.0.11", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^3.7.2", + "@smithy/util-uri-escape": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@smithy/types": { + "version": "3.7.2", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "server/aws-lsp-identity/node_modules/@smithy/util-uri-escape": { + "version": "3.0.0", + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "server/aws-lsp-identity/node_modules/ts-mocha": { + "version": "11.1.0", + "dev": true, + "license": "MIT", + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X || ^11.X.X", + "ts-node": "^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X", + "tsconfig-paths": "^4.X.X" + }, + "peerDependenciesMeta": { + "tsconfig-paths": { + "optional": true + } + } + }, + "server/aws-lsp-identity/node_modules/tsconfig-paths": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "server/aws-lsp-json": { + "name": "@aws/lsp-json", + "version": "0.1.21", + "license": "Apache-2.0", + "dependencies": { + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", + "vscode-languageserver": "^9.0.1", + "vscode-languageserver-textdocument": "^1.0.8" + }, + "devDependencies": { + "c8": "^10.1.2", + "ts-mocha": "^11.1.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "server/aws-lsp-json/node_modules/ts-mocha": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-11.1.0.tgz", + "integrity": "sha512-yT7FfzNRCu8ZKkYvAOiH01xNma/vLq6Vit7yINKYFNVP8e5UyrYXSOMIipERTpzVKJQ4Qcos5bQo1tNERNZevQ==", + "dev": true, + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X || ^11.X.X", + "ts-node": "^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X", + "tsconfig-paths": "^4.X.X" + }, + "peerDependenciesMeta": { + "tsconfig-paths": { + "optional": true + } + } + }, + "server/aws-lsp-json/node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "server/aws-lsp-notification": { + "name": "@aws/lsp-notification", + "version": "0.0.1", + "license": "Apache-2.0", + "dependencies": { + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", + "vscode-languageserver": "^9.0.1" + }, + "devDependencies": { "@aws-sdk/types": "^3.734.0", "@smithy/types": "^3.4.1", "@types/chai": "^4.3.5", @@ -28930,45 +29021,61 @@ "node": ">=18.0.0" } }, - "server/aws-lsp-notification/node_modules/@aws/lsp-core": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/@aws/lsp-core/-/lsp-core-0.0.12.tgz", - "integrity": "sha512-FNbbvzUZQKtUE/LHGsI8b05+M44h47f7ExlET1WeOnhfjDWu7n+wlHRkPZkdsEe1z5pbluGNBaiTO/cV9A2qQQ==", + "server/aws-lsp-notification/node_modules/@smithy/types": { + "version": "3.7.2", + "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.109", - "@gerhobbelt/gitignore-parser": "^0.2.0-9", - "cross-spawn": "7.0.6", - "jose": "^5.2.4", - "request-light": "^0.8.0", - "vscode-languageserver-textdocument": "^1.0.8", - "vscode-languageserver-types": "^3.17.3", - "vscode-uri": "^3.1.0" + "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=16.0.0" } }, - "server/aws-lsp-notification/node_modules/@smithy/types": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.7.2.tgz", - "integrity": "sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg==", + "server/aws-lsp-notification/node_modules/ts-mocha": { + "version": "11.1.0", "dev": true, + "license": "MIT", + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X || ^11.X.X", + "ts-node": "^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X", + "tsconfig-paths": "^4.X.X" + }, + "peerDependenciesMeta": { + "tsconfig-paths": { + "optional": true + } + } + }, + "server/aws-lsp-notification/node_modules/tsconfig-paths": { + "version": "4.2.0", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "tslib": "^2.6.2" + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" }, "engines": { - "node": ">=16.0.0" + "node": ">=6" } }, "server/aws-lsp-partiql": { "name": "@aws/lsp-partiql", - "version": "0.0.16", + "version": "0.0.18", "license": "Apache-2.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "antlr4-c3": "3.4.2", - "antlr4ng": "3.0.14", + "@aws/language-server-runtimes": "^0.3.1", + "antlr4-c3": "3.4.4", + "antlr4ng": "3.0.16", "web-tree-sitter": "0.22.6" }, "devDependencies": { @@ -28988,19 +29095,17 @@ "dependencies": { "@aws-sdk/client-s3": "^3.623.0", "@aws-sdk/types": "^3.734.0", - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.12", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.15", "vscode-languageserver": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.8" } }, "server/aws-lsp-s3/node_modules/@aws/lsp-core": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/@aws/lsp-core/-/lsp-core-0.0.12.tgz", - "integrity": "sha512-FNbbvzUZQKtUE/LHGsI8b05+M44h47f7ExlET1WeOnhfjDWu7n+wlHRkPZkdsEe1z5pbluGNBaiTO/cV9A2qQQ==", + "version": "0.0.15", "license": "Apache-2.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.109", + "@aws/language-server-runtimes": "^0.2.128", "@gerhobbelt/gitignore-parser": "^0.2.0-9", "cross-spawn": "7.0.6", "jose": "^5.2.4", @@ -29013,14 +29118,44 @@ "node": ">=18.0.0" } }, + "server/aws-lsp-s3/node_modules/@aws/lsp-core/node_modules/@aws/language-server-runtimes": { + "version": "0.2.129", + "license": "Apache-2.0", + "dependencies": { + "@aws/language-server-runtimes-types": "^0.1.57", + "@opentelemetry/api": "^1.9.0", + "@opentelemetry/api-logs": "^0.200.0", + "@opentelemetry/core": "^2.0.0", + "@opentelemetry/exporter-logs-otlp-http": "^0.200.0", + "@opentelemetry/exporter-metrics-otlp-http": "^0.200.0", + "@opentelemetry/resources": "^2.0.1", + "@opentelemetry/sdk-logs": "^0.200.0", + "@opentelemetry/sdk-metrics": "^2.0.1", + "@smithy/node-http-handler": "^4.0.4", + "ajv": "^8.17.1", + "aws-sdk": "^2.1692.0", + "hpagent": "^1.2.0", + "jose": "^5.9.6", + "mac-ca": "^3.1.1", + "registry-js": "^1.16.1", + "rxjs": "^7.8.2", + "vscode-languageserver": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-uri": "^3.1.0", + "win-ca": "^3.5.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, "server/aws-lsp-yaml": { "name": "@aws/lsp-yaml", - "version": "0.1.17", + "version": "0.1.21", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.13", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", "vscode-languageserver": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.8", "yaml-language-server": "1.13.0" @@ -29033,7 +29168,7 @@ "name": "@amzn/device-sso-auth-lsp", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "vscode-languageserver": "^9.0.1" }, "devDependencies": { @@ -29044,15 +29179,54 @@ "name": "@aws/hello-world-lsp", "version": "0.0.1", "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "vscode-languageserver": "^9.0.1" }, "devDependencies": { "c8": "^10.1.2", "ts-loader": "^9.4.4", + "ts-mocha": "^11.1.0", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" } + }, + "server/hello-world-lsp/node_modules/ts-mocha": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/ts-mocha/-/ts-mocha-11.1.0.tgz", + "integrity": "sha512-yT7FfzNRCu8ZKkYvAOiH01xNma/vLq6Vit7yINKYFNVP8e5UyrYXSOMIipERTpzVKJQ4Qcos5bQo1tNERNZevQ==", + "dev": true, + "bin": { + "ts-mocha": "bin/ts-mocha" + }, + "engines": { + "node": ">= 6.X.X" + }, + "peerDependencies": { + "mocha": "^3.X.X || ^4.X.X || ^5.X.X || ^6.X.X || ^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X || ^11.X.X", + "ts-node": "^7.X.X || ^8.X.X || ^9.X.X || ^10.X.X", + "tsconfig-paths": "^4.X.X" + }, + "peerDependenciesMeta": { + "tsconfig-paths": { + "optional": true + } + } + }, + "server/hello-world-lsp/node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } } } } diff --git a/package.json b/package.json index 82468102ab..e314f953fe 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "ci:generate:agentic:attribution": "ts-node ./script/prepare-agentic-attribution-dependencies.ts && ./script/generate-agentic-attribution.sh && git restore package.json" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.116", + "@aws/language-server-runtimes": "^0.3.1", "@smithy/types": "4.2.0", "clean": "^4.0.2", "typescript": "^5.8.2" diff --git a/server/aws-lsp-antlr4/CHANGELOG.md b/server/aws-lsp-antlr4/CHANGELOG.md index bde43f2c3c..a928a4900b 100644 --- a/server/aws-lsp-antlr4/CHANGELOG.md +++ b/server/aws-lsp-antlr4/CHANGELOG.md @@ -1,5 +1,42 @@ # Changelog +## [0.1.20](https://github.com/aws/language-servers/compare/lsp-antlr4/v0.1.19...lsp-antlr4/v0.1.20) (2025-10-01) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.15 to ^0.0.16 + +## [0.1.19](https://github.com/aws/language-servers/compare/lsp-antlr4/v0.1.18...lsp-antlr4/v0.1.19) (2025-09-09) + + +### Features + +* add support for getSupplementalContext LSP API ([#2212](https://github.com/aws/language-servers/issues/2212)) ([2ddcae7](https://github.com/aws/language-servers/commit/2ddcae7a4fac6b89cbc9784911959743ea0a6d11)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.14 to ^0.0.15 + +## [0.1.18](https://github.com/aws/language-servers/compare/lsp-antlr4/v0.1.17...lsp-antlr4/v0.1.18) (2025-08-19) + + +### Bug Fixes + +* Use file context override in the inline completion params for Jupyter Notebook ([#2114](https://github.com/aws/language-servers/issues/2114)) ([91c8398](https://github.com/aws/language-servers/commit/91c839857f8aa4d79098189f9fb620b361c51289)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.13 to ^0.0.14 + ## [0.1.17](https://github.com/aws/language-servers/compare/lsp-antlr4/v0.1.16...lsp-antlr4/v0.1.17) (2025-08-04) diff --git a/server/aws-lsp-antlr4/package.json b/server/aws-lsp-antlr4/package.json index 9d6c925b40..e515580e58 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.17", + "version": "0.1.20", "description": "ANTLR4 language server", "main": "out/index.js", "repository": { @@ -28,8 +28,8 @@ "clean": "rm -rf node_modules" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.13" + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16" }, "peerDependencies": { "antlr4-c3": ">=3.4 < 4", @@ -38,8 +38,8 @@ "devDependencies": { "@babel/plugin-transform-modules-commonjs": "^7.24.1", "@types/jest": "29.5.14", - "antlr4-c3": "3.4.2", - "antlr4ng": "3.0.14", + "antlr4-c3": "3.4.4", + "antlr4ng": "3.0.16", "antlr4ng-cli": "^2.0.0", "babel-plugin-transform-import-meta": "^2.3.2", "jest": "^29.7.0", diff --git a/server/aws-lsp-buildspec/package.json b/server/aws-lsp-buildspec/package.json index f59edb5549..562ed8d18a 100644 --- a/server/aws-lsp-buildspec/package.json +++ b/server/aws-lsp-buildspec/package.json @@ -7,7 +7,7 @@ "compile": "tsc --build" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-json": "*", "@aws/lsp-yaml": "*", "vscode-languageserver": "^9.0.1", diff --git a/server/aws-lsp-cloudformation/package.json b/server/aws-lsp-cloudformation/package.json index bfc8ebd7e5..155a075ca7 100644 --- a/server/aws-lsp-cloudformation/package.json +++ b/server/aws-lsp-cloudformation/package.json @@ -7,7 +7,7 @@ "compile": "tsc --build" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "@aws/lsp-core": "*", "@aws/lsp-json": "*", "vscode-languageserver": "^9.0.1", diff --git a/server/aws-lsp-codewhisperer/.prettierignore b/server/aws-lsp-codewhisperer/.prettierignore index f1287fa3c5..0dbb1b11cb 100644 --- a/server/aws-lsp-codewhisperer/.prettierignore +++ b/server/aws-lsp-codewhisperer/.prettierignore @@ -5,5 +5,4 @@ out/ **/bin/ **/obj/ src/client/sigv4/codewhisperersigv4client.d.ts -src/client/token/codewhispererbearertokenclient.d.ts **/*.md diff --git a/server/aws-lsp-codewhisperer/CHANGELOG.md b/server/aws-lsp-codewhisperer/CHANGELOG.md index 1b2f1011df..bc8b15cb21 100644 --- a/server/aws-lsp-codewhisperer/CHANGELOG.md +++ b/server/aws-lsp-codewhisperer/CHANGELOG.md @@ -1,5 +1,267 @@ # Changelog +## [0.0.88](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.87...lsp-codewhisperer/v0.0.88) (2025-10-28) + + +### Bug Fixes + +* add venv in the common gitignore patterns ([#2445](https://github.com/aws/language-servers/issues/2445)) ([d030288](https://github.com/aws/language-servers/commit/d030288a2508356db337dfa34ee64c8be1deb8e9)) +* enforce MAX_TOOL_NAME_LENGTH check in createNamespacedToolName ([#2447](https://github.com/aws/language-servers/issues/2447)) ([6663f87](https://github.com/aws/language-servers/commit/6663f87e68c9645af6ffb004eaf725e5102fe5ab)) +* strenghen NEP trigger conditions ([#2438](https://github.com/aws/language-servers/issues/2438)) ([82e2340](https://github.com/aws/language-servers/commit/82e2340cf86a5eba20f8d18f1293c136c0022dd9)) + +## [0.0.87](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.86...lsp-codewhisperer/v0.0.87) (2025-10-21) + + +### Features + +* **amazonq:** add user requirement to zipfile for code review tool ([#2430](https://github.com/aws/language-servers/issues/2430)) ([2c33b38](https://github.com/aws/language-servers/commit/2c33b384a0e406bcd8d3888a911d5482ce1f38ef)) +* nep auto trigger ([#2424](https://github.com/aws/language-servers/issues/2424)) ([2292bd7](https://github.com/aws/language-servers/commit/2292bd75fded0848208de9401d15d3399a9c297b)) +* send pinned context button immediately with pending state ([#2353](https://github.com/aws/language-servers/issues/2353)) ([bee5cad](https://github.com/aws/language-servers/commit/bee5cadeaf8840a8af08acfe8b58442aac7ad567)) + + +### Bug Fixes + +* classifier last token sometimes fail to capture the right values ([#2434](https://github.com/aws/language-servers/issues/2434)) ([7420d59](https://github.com/aws/language-servers/commit/7420d591a0fcf5da834f0165696aa50b99fd4d3a)) + +## [0.0.86](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.85...lsp-codewhisperer/v0.0.86) (2025-10-15) + + +### Reverts + +* revert for mid-loop compaction ([3f48b12](https://github.com/aws/language-servers/commit/3f48b12bce4faba474404f7c74a9520c379552fe)) + +## [0.0.85](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.84...lsp-codewhisperer/v0.0.85) (2025-10-14) + + +### Bug Fixes + +* inline, nep telemetry not sent and throw sessionId not found ([#2419](https://github.com/aws/language-servers/issues/2419)) ([c96106d](https://github.com/aws/language-servers/commit/c96106d18c9e9d846765665ce2ee50304af4ff7f)) + +## [0.0.84](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.83...lsp-codewhisperer/v0.0.84) (2025-10-09) + + +### Features + +* add model description to dropdown ([#2374](https://github.com/aws/language-servers/issues/2374)) ([ed8c6dd](https://github.com/aws/language-servers/commit/ed8c6dda1312f728e9ee7472f7ca447196ad9d84)) +* **amazonq:** adding classification based retry strategy for chat ([#2234](https://github.com/aws/language-servers/issues/2234)) ([#2409](https://github.com/aws/language-servers/issues/2409)) ([15d1b1f](https://github.com/aws/language-servers/commit/15d1b1f5947a1b83dab65c9d3fef901ab8a033c9)) +* **amazonq:** env var change for JupyterLab conversation history on refresh support ([#2395](https://github.com/aws/language-servers/issues/2395)) ([a908195](https://github.com/aws/language-servers/commit/a9081954bcaf20b7d0fbe0af11e61b8f82c7e82f)) +* **amazonq:** support JupyterLab conversation history on refresh ([#2325](https://github.com/aws/language-servers/issues/2325)) ([0980351](https://github.com/aws/language-servers/commit/09803514d1ce31ca77a532161e071e1d037e3fb1)) + + +### Bug Fixes + +* add in-loop compaction ([#2387](https://github.com/aws/language-servers/issues/2387)) ([35f0795](https://github.com/aws/language-servers/commit/35f0795fa5d09f3610e6a29cb72d49f32cc5534e)) +* addonly EDITS should be handled as COMPLETIONS ([#2133](https://github.com/aws/language-servers/issues/2133)) ([4f5a9da](https://github.com/aws/language-servers/commit/4f5a9dacf3bfd68aeb40920fb800adf001ed43d5)) +* patch [#2133](https://github.com/aws/language-servers/issues/2133) and handle more variants of FIM suggestions ([#2407](https://github.com/aws/language-servers/issues/2407)) ([f3086d7](https://github.com/aws/language-servers/commit/f3086d71808bd49336e0df9ba30f5be5fda837c3)) + +## [0.0.83](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.82...lsp-codewhisperer/v0.0.83) (2025-10-01) + + +### Bug Fixes + +* **amazonq:** escaping user input to mitigate xss issue ([#2360](https://github.com/aws/language-servers/issues/2360)) ([45b86be](https://github.com/aws/language-servers/commit/45b86bef1a93cf9ced6fbf0c222cf5410de04c81)) +* **amazonq:** fix to add opt-out header to streaming client ([#2365](https://github.com/aws/language-servers/issues/2365)) ([692e77b](https://github.com/aws/language-servers/commit/692e77bc99770ac7d676928e95e3dc43bb91e7f0)) +* **amazonq:** handle IAM credentials expiration field to be aws sdk versions compatible and add refresh logic to codewhisperer IAM client ([#2349](https://github.com/aws/language-servers/issues/2349)) ([5eb3768](https://github.com/aws/language-servers/commit/5eb3768bf020d61d0ade767d62e13839048146e4)) +* **amazonq:** send full finding details to plugin, partial to agent ([#2356](https://github.com/aws/language-servers/issues/2356)) ([961e6ca](https://github.com/aws/language-servers/commit/961e6ca11b122481685f9f65b3da14c6a2497cc4)) +* improve history management ([#2312](https://github.com/aws/language-servers/issues/2312)) ([#2357](https://github.com/aws/language-servers/issues/2357)) ([e7aa2a6](https://github.com/aws/language-servers/commit/e7aa2a6545bcb1a8238abfde69a05432be0b6615)) +* optimize memory bank token usage and add new tab support ([#2366](https://github.com/aws/language-servers/issues/2366)) ([3057d56](https://github.com/aws/language-servers/commit/3057d56e4a3047d1715d6e3560e9f934d1de469c)) +* private package mapping during artifact generation ([#2348](https://github.com/aws/language-servers/issues/2348)) ([d56bfa1](https://github.com/aws/language-servers/commit/d56bfa191954fac8068e2bf390c2d0b88ef8b168)) +* trim new line when emitting error message ([#2359](https://github.com/aws/language-servers/issues/2359)) ([d8733a7](https://github.com/aws/language-servers/commit/d8733a75487f74815302b838802eccbf3ffec55e)) + + +### Reverts + +* fix to add opt-out header to streaming client ([#2365](https://github.com/aws/language-servers/issues/2365)) ([#2370](https://github.com/aws/language-servers/issues/2370)) ([b29478f](https://github.com/aws/language-servers/commit/b29478fa1ecc58e331ff330ff79f46b0d8c38d9e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.15 to ^0.0.16 + +## [0.0.82](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.81...lsp-codewhisperer/v0.0.82) (2025-09-24) + + +### Features + +* memory bank support ([#2314](https://github.com/aws/language-servers/issues/2314)) ([0e215fc](https://github.com/aws/language-servers/commit/0e215fc0e475b4c40a8237492371716982d4d532)) + + +### Bug Fixes + +* **amazonq:** fix to emit event for same region profile switch ([#2320](https://github.com/aws/language-servers/issues/2320)) ([aa1a482](https://github.com/aws/language-servers/commit/aa1a4827871a1cfa9fcd76f7ba420107a5d44b01)) +* **amazonq:** reduce number of findings to 30 as a quick fix ([#2318](https://github.com/aws/language-servers/issues/2318)) ([b31cf67](https://github.com/aws/language-servers/commit/b31cf67ddc68a2ca2e0a4ebd9ee94d0545afc656)) +* **amazonq:** removing a bracket from full review message ([#2317](https://github.com/aws/language-servers/issues/2317)) ([6d321ac](https://github.com/aws/language-servers/commit/6d321ac6f318c27b01f9f97eee45a62798a60cf5)) +* emit error code on failed user messages ([#2322](https://github.com/aws/language-servers/issues/2322)) ([a949ac0](https://github.com/aws/language-servers/commit/a949ac0a9d7a4dbce5fb7c8480952cee0a674b55)) +* inline latency telemetry should account for preprocess time ([#2323](https://github.com/aws/language-servers/issues/2323)) ([68c6d14](https://github.com/aws/language-servers/commit/68c6d1465a3325612052740496cc1e6e50f56b9a)) +* userTriggerDecision STE suggestionType validation error ([#2313](https://github.com/aws/language-servers/issues/2313)) ([8f30ac0](https://github.com/aws/language-servers/commit/8f30ac0ec5f4f7b7c343f5e889aec64a282897ea)) + +## [0.0.81](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.80...lsp-codewhisperer/v0.0.81) (2025-09-19) + + +### Bug Fixes + +* **amazonq:** fix for delete mcp for mcp config, disable and create corresponding agent file ([#2298](https://github.com/aws/language-servers/issues/2298)) ([8641860](https://github.com/aws/language-servers/commit/8641860295c4e089d09154fa5411c305f2f4ecce)) +* **amazonq:** fix for legacy mcp permission consistentcy and config update ([#2300](https://github.com/aws/language-servers/issues/2300)) ([c8aa7bd](https://github.com/aws/language-servers/commit/c8aa7bd3e9d39ed327972bbc950ad72e8e401581)) +* **amazonq:** fix for mcp permissions read/write inconsistencies ([#2296](https://github.com/aws/language-servers/issues/2296)) ([c7a9a8e](https://github.com/aws/language-servers/commit/c7a9a8e1ba5c1a284d661e683dd46133860a1d3d)) +* **amazonq:** fix to add filewatcher for mcp config files ([#2295](https://github.com/aws/language-servers/issues/2295)) ([fcee77c](https://github.com/aws/language-servers/commit/fcee77c1b06e69f9096d8e98a0cfcc42d7fddb01)) +* **amazonq:** fix to normlize workspace paths in windows ([#2306](https://github.com/aws/language-servers/issues/2306)) ([fab073c](https://github.com/aws/language-servers/commit/fab073c855109b15005bfd880894471c35652ffc)) +* **amazonq:** improve messaging for code review ([#2303](https://github.com/aws/language-servers/issues/2303)) ([60bc68d](https://github.com/aws/language-servers/commit/60bc68d1d4d2ce8a0373be6ce7551e961fc2cdb8)) +* **amazonq:** support mcp config files for backwards compatbility ([#2292](https://github.com/aws/language-servers/issues/2292)) ([41c99af](https://github.com/aws/language-servers/commit/41c99af02b3f415e39898f11c3c21ac530f9c406)) +* inline UTD empty cases dont differentiate Edit and Completion ([#2287](https://github.com/aws/language-servers/issues/2287)) ([84e2c8c](https://github.com/aws/language-servers/commit/84e2c8c12f5d828192a302fa11483063d33b059c)) +* inline UTD telemetry empty cases dont differentiate Edit and Completion ([#2288](https://github.com/aws/language-servers/issues/2288)) ([d207b6e](https://github.com/aws/language-servers/commit/d207b6e9dfded650c6f65c675ee45c52f8222571)) +* quick fix for repeated logging from squashed commit ([#2291](https://github.com/aws/language-servers/issues/2291)) ([36f3eed](https://github.com/aws/language-servers/commit/36f3eedd1cad3fca4fc48792ba40b6470f733bfa)) + + +### Reverts + +* inline UTD telemetry empty cases dont differentiate Edit and Completion ([#2288](https://github.com/aws/language-servers/issues/2288)) ([#2297](https://github.com/aws/language-servers/issues/2297)) ([eb081e6](https://github.com/aws/language-servers/commit/eb081e6bc6bef4182ab89e295bff97c4e828096b)) + +## [0.0.80](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.79...lsp-codewhisperer/v0.0.80) (2025-09-16) + + +### Features + +* **amazonq:** semantic search tool integration ([#2283](https://github.com/aws/language-servers/issues/2283)) ([8eb3c34](https://github.com/aws/language-servers/commit/8eb3c340534f3c66fd9082a83b31e84a4d9348bb)) +* **amazonq:** support for wildcard permissions from agent config ([#2249](https://github.com/aws/language-servers/issues/2249)) ([2f6e86b](https://github.com/aws/language-servers/commit/2f6e86b0a676674744b962b0e335543c6c39e9e1)) +* support sending requests with the 'external_idp' type ([#2247](https://github.com/aws/language-servers/issues/2247)) ([4d3b938](https://github.com/aws/language-servers/commit/4d3b938b7e961def0db2a51fba57e8fe73ea0a01)) + + +### Bug Fixes + +* filetype filtering and consolidation of other filtering logic during artifact generation ([#2233](https://github.com/aws/language-servers/issues/2233)) ([a3e66f2](https://github.com/aws/language-servers/commit/a3e66f2d414060adde90cc7312f07c6359ae3246)) + +## [0.0.79](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.78...lsp-codewhisperer/v0.0.79) (2025-09-10) + + +### Features + +* feature to add iam inline suggestion support in codeWhispererservice ([#2223](https://github.com/aws/language-servers/issues/2223)) ([8e19f19](https://github.com/aws/language-servers/commit/8e19f19a71e63a1196f4cb67ded8360c8da8129e)) + +## [0.0.78](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.77...lsp-codewhisperer/v0.0.78) (2025-09-09) + + +### Features + +* add custom_transformation folder support to artifact.zip ([#2201](https://github.com/aws/language-servers/issues/2201)) ([1222905](https://github.com/aws/language-servers/commit/12229059421b773d3e99d28809fdff4abf242b26)) +* add support for getSupplementalContext LSP API ([#2212](https://github.com/aws/language-servers/issues/2212)) ([2ddcae7](https://github.com/aws/language-servers/commit/2ddcae7a4fac6b89cbc9784911959743ea0a6d11)) +* **amazonq:** default to diff-based scans ([#2195](https://github.com/aws/language-servers/issues/2195)) ([da4c3db](https://github.com/aws/language-servers/commit/da4c3db5329bd50cfe249bf8c1d59afa9bcb0157)) +* model selection for code review tool ([#2196](https://github.com/aws/language-servers/issues/2196)) ([34bc9bd](https://github.com/aws/language-servers/commit/34bc9bd1d3433bbb1d903eb0f212b10709ea8412)) + + +### Bug Fixes + +* **amazonq:** add IntelliSense autotriggerType ([#2199](https://github.com/aws/language-servers/issues/2199)) ([013aa59](https://github.com/aws/language-servers/commit/013aa5913c242451a91ed36b0dcf961a3f8ec697)) +* **amazonq:** fix to correct the client for getProfile request ([#2211](https://github.com/aws/language-servers/issues/2211)) ([8bde8c9](https://github.com/aws/language-servers/commit/8bde8c97e1e3bcd67d9816a3385c50c7765c3b2f)) +* **amazonq:** fix to update MCP servers list when last server is removed from agent config ([#2206](https://github.com/aws/language-servers/issues/2206)) ([512502a](https://github.com/aws/language-servers/commit/512502af947dcfed9288be2f67fc58affd4445fe)) +* **amazonq:** update to the agent config format to bring parity with Q CLI ([#2202](https://github.com/aws/language-servers/issues/2202)) ([698d06c](https://github.com/aws/language-servers/commit/698d06c643897da6ca37a49e6544b150b72678a3)) +* potential xss issue reported in `mynah-ui` ([#2209](https://github.com/aws/language-servers/issues/2209)) ([cf585cd](https://github.com/aws/language-servers/commit/cf585cd400dab6274f8220139ae94287c0d96824)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.14 to ^0.0.15 + +## [0.0.77](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.76...lsp-codewhisperer/v0.0.77) (2025-09-02) + + +### Features + +* passing suggestionTypes and pluginVersion/lspVersion to STE ([#2180](https://github.com/aws/language-servers/issues/2180)) ([66742ad](https://github.com/aws/language-servers/commit/66742adfc44f33efbd8dd33b803000e08241e5ce)) + + +### Bug Fixes + +* auto trigger should only respect previous decisions in the past 2mins ([#2189](https://github.com/aws/language-servers/issues/2189)) ([852b21b](https://github.com/aws/language-servers/commit/852b21b66f793102c52e35c2baec07a772e5134a)) +* compact UI is not updated correctly when multiple nudges are displayed ([#2192](https://github.com/aws/language-servers/issues/2192)) ([ef7d793](https://github.com/aws/language-servers/commit/ef7d7931954f5083e4a5c358e67c6dc652fa1a40)) +* emit acceptedLineCount metric and AgenticCodeAccepted interaction type ([#2167](https://github.com/aws/language-servers/issues/2167)) ([c53f672](https://github.com/aws/language-servers/commit/c53f672b6173ebda530917ccb4e0c2f26f5c8f79)) +* emit errorMessage in addMessage ([#2197](https://github.com/aws/language-servers/issues/2197)) ([58f2064](https://github.com/aws/language-servers/commit/58f20649d345f159080006120e23cde559826df1)) +* fix calculation for num-lines contributed by the LLM ([#2191](https://github.com/aws/language-servers/issues/2191)) ([fd71e6c](https://github.com/aws/language-servers/commit/fd71e6cf3fc843242936564061061418edf83f56)) +* should send classifier score after taking sigmoid ([#2188](https://github.com/aws/language-servers/issues/2188)) ([f4e2e6e](https://github.com/aws/language-servers/commit/f4e2e6e885e665834a5d7b7cbb5f4ba4ff9bbb65)) + + +### Performance Improvements + +* only process edit requests 1 at a time ([#2187](https://github.com/aws/language-servers/issues/2187)) ([b497540](https://github.com/aws/language-servers/commit/b4975409a3ed518550290b72ac310895a293be4b)) + + +### Reverts + +* PR 2172 dedupe openTabs supplemental contexts ([#2194](https://github.com/aws/language-servers/issues/2194)) ([94723d4](https://github.com/aws/language-servers/commit/94723d46073a1ea8211e7ae8f9dfce3fcb809604)) + +## [0.0.76](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.75...lsp-codewhisperer/v0.0.76) (2025-08-27) + + +### Features + +* add basic OAuth client for remote MCP ([#2136](https://github.com/aws/language-servers/issues/2136)) ([2fb896e](https://github.com/aws/language-servers/commit/2fb896e094de0bc5a1b4881067e7dcceb3826015)) +* **amazonq:** emit metric for each issue ([#2179](https://github.com/aws/language-servers/issues/2179)) ([5a3f481](https://github.com/aws/language-servers/commit/5a3f481ebe8c6033e3833abcd81799d26c2aa03e)) +* Auto fetch models from listAvailableModels API ([#2171](https://github.com/aws/language-servers/issues/2171)) ([8600c52](https://github.com/aws/language-servers/commit/8600c524877abb459e9338399352446c0dcff6f0)) +* disable pkce flow during plugin load ([#2153](https://github.com/aws/language-servers/issues/2153)) ([71b3595](https://github.com/aws/language-servers/commit/71b35952333e7581921644ce40fabbc1e6d3c02f)) +* update MCP manager and utilities ([#2158](https://github.com/aws/language-servers/issues/2158)) ([b99df82](https://github.com/aws/language-servers/commit/b99df82826d0ba1a1d52df578cb80674c90505b9)) + + +### Bug Fixes + +* adding streakTracker to track streakLength across Completions and Edits ([#2147](https://github.com/aws/language-servers/issues/2147)) ([a6c64f2](https://github.com/aws/language-servers/commit/a6c64f2995a17697e3d71d30a1f411f5cf0db279)) +* **amazonq:** dedupe openTabs supplemental contexts ([#2172](https://github.com/aws/language-servers/issues/2172)) ([aa87ae2](https://github.com/aws/language-servers/commit/aa87ae2bd95edc1f38bf90f56093c5bf5ff18c53)) +* **amazonq:** fix for mcp servers operations to edit server config only ([#2165](https://github.com/aws/language-servers/issues/2165)) ([d28df09](https://github.com/aws/language-servers/commit/d28df09ae41871430cd53064eac1f3050c95ea84)) +* **amazonq:** fix to add mcp server tool error handling and status for card ([#2176](https://github.com/aws/language-servers/issues/2176)) ([23f5ec3](https://github.com/aws/language-servers/commit/23f5ec343cb4e0de32926204dbcf99e51af829f9)) +* **amazonq:** status message update for mcp tool permission accpetance ([#2178](https://github.com/aws/language-servers/issues/2178)) ([4893344](https://github.com/aws/language-servers/commit/489334466fa084774d6e4737569468d654dc6359)) +* fix pkce windows url path ([#2173](https://github.com/aws/language-servers/issues/2173)) ([d7b184c](https://github.com/aws/language-servers/commit/d7b184cb12979877722fa0293e9aebec91ff2c18)) +* multiple fixes on auth flow edge cases ([#2155](https://github.com/aws/language-servers/issues/2155)) ([472220a](https://github.com/aws/language-servers/commit/472220a745cff4fe91a2cabae4ae059a164ceddd)) +* reduce auto trigger frequency for VSC ([#2168](https://github.com/aws/language-servers/issues/2168)) ([00e11ff](https://github.com/aws/language-servers/commit/00e11ff48eafaa0baec48177fa4aa6d60048af2f)) + + +### Reverts + +* reduce auto trigger frequency for VSC ([#2168](https://github.com/aws/language-servers/issues/2168))" ([#2177](https://github.com/aws/language-servers/issues/2177)) ([08720c6](https://github.com/aws/language-servers/commit/08720c6c3fa83f9b3b6775d4ae4d848ce145b94b)) + +## [0.0.75](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.74...lsp-codewhisperer/v0.0.75) (2025-08-21) + + +### Bug Fixes + +* **amazonq:** don't let flare send discard for the still valid suggestion in JB ([#2145](https://github.com/aws/language-servers/issues/2145)) ([0767e07](https://github.com/aws/language-servers/commit/0767e074c91682a91d2fe7a6b2a7369c4dea280c)) + +## [0.0.74](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.73...lsp-codewhisperer/v0.0.74) (2025-08-19) + + +### Features + +* **amazonq:** added mcp admin level configuration with GetProfile ([#2000](https://github.com/aws/language-servers/issues/2000)) ([fd6e9a8](https://github.com/aws/language-servers/commit/fd6e9a829c6229c276de5340dffce52b426a864d)) +* **amazonq:** read tool ui revamp ([#2113](https://github.com/aws/language-servers/issues/2113)) ([#2121](https://github.com/aws/language-servers/issues/2121)) ([93cf229](https://github.com/aws/language-servers/commit/93cf229149ba60491f9f5763793db4a9f570b611)) +* remove project type validation from LSP layer ([#2103](https://github.com/aws/language-servers/issues/2103)) ([d397161](https://github.com/aws/language-servers/commit/d397161cc3448c63016e27f5ac2a1917cdaae1cb)) + + +### Bug Fixes + +* **amazonq:** add server side control for WCS features ([#2128](https://github.com/aws/language-servers/issues/2128)) ([5e4435d](https://github.com/aws/language-servers/commit/5e4435dfaea7bf8c00e6a27b9bb0d40f699d4e01)) +* **amazonq:** fix regression of mcp config in agent config ([#2101](https://github.com/aws/language-servers/issues/2101)) ([e4e8bbb](https://github.com/aws/language-servers/commit/e4e8bbb89e4b597926582bead2b14ffc43f2a7f8)) +* **amazonq:** handle case where multiple rules are provided with the same name ([#2118](https://github.com/aws/language-servers/issues/2118)) ([0e23e2d](https://github.com/aws/language-servers/commit/0e23e2d29b8cad14403d372b9bbb08ca8ffa7ac7)) +* **amazonq:** persist mcp configs in agent json on start-up ([#2112](https://github.com/aws/language-servers/issues/2112)) ([817cfe2](https://github.com/aws/language-servers/commit/817cfe2656cb1deec6111c699c4ba46b4ba53e00)) +* empty userTriggerDecision not being sent for NEP code path ([#2140](https://github.com/aws/language-servers/issues/2140)) ([b8e5268](https://github.com/aws/language-servers/commit/b8e52682ac2b2337e1d0a32759e8beccde889cee)) +* fix for button text and remove profilearn caching ([#2137](https://github.com/aws/language-servers/issues/2137)) ([2a4171a](https://github.com/aws/language-servers/commit/2a4171a74c15c23c23c481060496162bcc9e6284)) +* fix to add disk caching for mcp admin state ([#2139](https://github.com/aws/language-servers/issues/2139)) ([f947e1a](https://github.com/aws/language-servers/commit/f947e1a9da4431d6089b22825f992010c30a470b)) +* fix to turn on and off MCP servers incase of error based on last state ([#2143](https://github.com/aws/language-servers/issues/2143)) ([04588df](https://github.com/aws/language-servers/commit/04588dfc33f0d85dbd488814a474b5e354398df0)) +* proper path handling for additional context ([#2129](https://github.com/aws/language-servers/issues/2129)) ([971eaa5](https://github.com/aws/language-servers/commit/971eaa505d948e9d2090c85f9b965f554ea7f2c8)) +* Use file context override in the inline completion params for Jupyter Notebook ([#2114](https://github.com/aws/language-servers/issues/2114)) ([91c8398](https://github.com/aws/language-servers/commit/91c839857f8aa4d79098189f9fb620b361c51289)) + + +### Performance Improvements + +* remove edit completion retry mechanism on document change ([#2124](https://github.com/aws/language-servers/issues/2124)) ([963b6e9](https://github.com/aws/language-servers/commit/963b6e9b7887da23a85a826c55a6ed95ff36d956)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.13 to ^0.0.14 + ## [0.0.73](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.72...lsp-codewhisperer/v0.0.73) (2025-08-11) diff --git a/server/aws-lsp-codewhisperer/package.json b/server/aws-lsp-codewhisperer/package.json index fdd34884b1..6680066db1 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.73", + "version": "0.0.88", "description": "CodeWhisperer Language Server", "main": "out/index.js", "repository": { @@ -14,8 +14,6 @@ }, "scripts": { "compile": "tsc --build", - "postcompile": "npm run copyServiceClient", - "copyServiceClient": "copyfiles -u 1 --error ./src/client/sigv4/*.json out && copyfiles -u 1 --error ./src/client/token/*.json out", "fix": "npm run fix:prettier", "fix:prettier": "prettier . --write", "lint": "npm run lint:src", @@ -32,18 +30,20 @@ }, "dependencies": { "@amzn/amazon-q-developer-streaming-client": "file:../../core/q-developer-streaming-client/amzn-amazon-q-developer-streaming-client-1.0.0.tgz", + "@amzn/codewhisperer": "file:../../core/codewhisperer/amzn-codewhisperer-1.0.0.tgz", + "@amzn/codewhisperer-runtime": "file:../../core/codewhisperer-runtime/amzn-codewhisperer-runtime-1.0.0.tgz", "@amzn/codewhisperer-streaming": "file:../../core/codewhisperer-streaming/amzn-codewhisperer-streaming-1.0.0.tgz", + "@aws-sdk/types": "^3.734.0", "@aws-sdk/util-arn-parser": "^3.723.0", "@aws-sdk/util-retry": "^3.374.0", - "@aws/chat-client-ui-types": "^0.1.56", - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.13", + "@aws/chat-client-ui-types": "^0.1.63", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", "@modelcontextprotocol/sdk": "^1.15.0", "@smithy/node-http-handler": "^2.5.0", "adm-zip": "^0.5.10", "archiver": "^7.0.1", "async-mutex": "^0.5.0", - "aws-sdk": "^2.1403.0", "axios": "^1.8.4", "chokidar": "^4.0.3", "deepmerge": "^4.3.1", @@ -74,6 +74,7 @@ "@types/archiver": "^6.0.2", "@types/diff": "^7.0.2", "@types/encoding-japanese": "^2.2.1", + "@types/escape-html": "^1.0.4", "@types/ignore-walk": "^4.0.3", "@types/local-indexing": "file:./types/types-local-indexing-1.1.0.tgz", "@types/lokijs": "^1.5.14", @@ -102,6 +103,8 @@ "endOfLine": "lf" }, "bundleDependencies": [ + "@amzn/codewhisperer", + "@amzn/codewhisperer-runtime", "@amzn/codewhisperer-streaming", "@amzn/amazon-q-developer-streaming-client" ] diff --git a/server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperer.ts b/server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperer.ts index 0395a639f6..22bb8a5641 100644 --- a/server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperer.ts +++ b/server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperer.ts @@ -1,25 +1,68 @@ -import { Service } from 'aws-sdk' -import { ServiceConfigurationOptions } from 'aws-sdk/lib/service' -const apiConfig = require('./service.json') -import CodeWhispererClient = require('./codewhisperersigv4client') +import { CodeWhispererClient, CodeWhispererClientConfig } from '@amzn/codewhisperer' import { SDKInitializator, Logging } from '@aws/language-server-runtimes/server-interface' +import { HttpResponse } from '@smithy/types' -export type CodeWhispererSigv4ClientConfigurationOptions = ServiceConfigurationOptions +export type CodeWhispererSigv4ClientConfigurationOptions = CodeWhispererClientConfig export function createCodeWhispererSigv4Client( - options: ServiceConfigurationOptions, + options: CodeWhispererClientConfig, sdkInitializator: SDKInitializator, - logging: Logging + logging: Logging, + shareCodeWhispererContentWithAWS: boolean = false ): CodeWhispererClient { - return createService(options, sdkInitializator, logging) as CodeWhispererClient -} + logging.log( + `Passing client for class CodeWhispererClient to sdkInitializator (v3) for additional setup (e.g. proxy)` + ) + + const client = sdkInitializator(CodeWhispererClient, { + ...options, + }) + + // Add middleware to set opt-out header + client.middlewareStack.add( + next => async args => { + if ( + args.request && + typeof args.request === 'object' && + args.request !== null && + 'headers' in args.request + ) { + ;(args.request as any).headers['x-amzn-codewhisperer-optout'] = `${!shareCodeWhispererContentWithAWS}` + } + return next(args) + }, + { + step: 'build', + name: 'addOptOutHeader', + priority: 'high', + } + ) + + // Add middleware to capture HTTP headers + client.middlewareStack.add( + next => async args => { + const result = await next(args) + + // Store headers on the response metadata + if (result.response) { + const httpResponse = result.response as HttpResponse + if (httpResponse.headers && result.output?.$metadata) { + // Extend metadata to include headers + ;(result.output.$metadata as any).httpHeaders = httpResponse.headers + } + } + + return result + }, + { + step: 'deserialize', + name: 'captureHeaders', + priority: 'high', + } + ) -function createService( - options: ServiceConfigurationOptions, - sdkInitializator: SDKInitializator, - logging: Logging -): Service { - logging.log(`Passing client for class Service to sdkInitializator (v2) for additional setup (e.g. proxy)`) - const client = sdkInitializator.v2(Service, { apiConfig, ...options } as any) return client } + +// Export the V3 client type for compatibility +export type CodeWhispererSigv4Client = CodeWhispererClient diff --git a/server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperersigv4client.d.ts b/server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperersigv4client.d.ts deleted file mode 100644 index 308ead42ee..0000000000 --- a/server/aws-lsp-codewhisperer/src/client/sigv4/codewhisperersigv4client.d.ts +++ /dev/null @@ -1,605 +0,0 @@ - -/** - * THIS FILE IS AUTOGENERATED BY 'generateServiceClient.ts'. - * DO NOT EDIT BY HAND. - */ - -import {Request} from 'aws-sdk/lib/request'; -import {Response} from 'aws-sdk/lib/response'; -import {AWSError} from 'aws-sdk/lib/error'; -import {Service} from 'aws-sdk/lib/service'; -import {ServiceConfigurationOptions} from 'aws-sdk/lib/service'; -import {ConfigBase as Config} from 'aws-sdk/lib/config-base'; -interface Blob {} -declare class CodeWhispererSigV4Client extends Service { - /** - * Constructs a service object. This object has one method for each API operation. - */ - constructor(options?: CodeWhispererSigV4Client.Types.ClientConfiguration) - config: Config & CodeWhispererSigV4Client.Types.ClientConfiguration; - /** - * Internal API to authorize a CodeWhisperer resource for vended log delivery. - */ - allowVendedLogDeliveryForResource(params: CodeWhispererSigV4Client.Types.AllowVendedLogDeliveryForResourceRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.AllowVendedLogDeliveryForResourceResponse) => void): Request; - /** - * Internal API to authorize a CodeWhisperer resource for vended log delivery. - */ - allowVendedLogDeliveryForResource(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.AllowVendedLogDeliveryForResourceResponse) => void): Request; - /** - * Add permission for an Identity Center User/Group to use the Customization. - */ - associateCustomizationPermission(params: CodeWhispererSigV4Client.Types.AssociateCustomizationPermissionRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.AssociateCustomizationPermissionResponse) => void): Request; - /** - * Add permission for an Identity Center User/Group to use the Customization. - */ - associateCustomizationPermission(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.AssociateCustomizationPermissionResponse) => void): Request; - /** - * - */ - createCustomization(params: CodeWhispererSigV4Client.Types.CreateCustomizationRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.CreateCustomizationResponse) => void): Request; - /** - * - */ - createCustomization(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.CreateCustomizationResponse) => void): Request; - /** - * Creates a CodeWhisperer profile which can then be associated to users/groups of an identity source - */ - createProfile(params: CodeWhispererSigV4Client.Types.CreateProfileRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.CreateProfileResponse) => void): Request; - /** - * Creates a CodeWhisperer profile which can then be associated to users/groups of an identity source - */ - createProfile(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.CreateProfileResponse) => void): Request; - /** - * Deletes CodeWhisperer Customization and associated resources - */ - deleteCustomization(params: CodeWhispererSigV4Client.Types.DeleteCustomizationRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.DeleteCustomizationResponse) => void): Request; - /** - * Deletes CodeWhisperer Customization and associated resources - */ - deleteCustomization(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.DeleteCustomizationResponse) => void): Request; - /** - * Deletes CodeWhisperer profile and associated resources - */ - deleteProfile(params: CodeWhispererSigV4Client.Types.DeleteProfileRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.DeleteProfileResponse) => void): Request; - /** - * Deletes CodeWhisperer profile and associated resources - */ - deleteProfile(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.DeleteProfileResponse) => void): Request; - /** - * Disassociate the permission for a Customization from an Identity Center User/Group. - */ - disassociateCustomizationPermission(params: CodeWhispererSigV4Client.Types.DisassociateCustomizationPermissionRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.DisassociateCustomizationPermissionResponse) => void): Request; - /** - * Disassociate the permission for a Customization from an Identity Center User/Group. - */ - disassociateCustomizationPermission(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.DisassociateCustomizationPermissionResponse) => void): Request; - /** - * Generates recommendations based on the provided file context. - */ - generateRecommendations(params: CodeWhispererSigV4Client.Types.GenerateRecommendationsRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.GenerateRecommendationsResponse) => void): Request; - /** - * Generates recommendations based on the provided file context. - */ - generateRecommendations(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.GenerateRecommendationsResponse) => void): Request; - /** - * - */ - getCustomization(params: CodeWhispererSigV4Client.Types.GetCustomizationRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.GetCustomizationResponse) => void): Request; - /** - * - */ - getCustomization(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.GetCustomizationResponse) => void): Request; - /** - * List User(s)/Group(s) who have permissions to use a Customization. - */ - listCustomizationPermissions(params: CodeWhispererSigV4Client.Types.ListCustomizationPermissionsRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListCustomizationPermissionsResponse) => void): Request; - /** - * List User(s)/Group(s) who have permissions to use a Customization. - */ - listCustomizationPermissions(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListCustomizationPermissionsResponse) => void): Request; - /** - * List actionable versions associated with a Customization. - */ - listCustomizationVersions(params: CodeWhispererSigV4Client.Types.ListCustomizationVersionsRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListCustomizationVersionsResponse) => void): Request; - /** - * List actionable versions associated with a Customization. - */ - listCustomizationVersions(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListCustomizationVersionsResponse) => void): Request; - /** - * - */ - listCustomizations(params: CodeWhispererSigV4Client.Types.ListCustomizationsRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListCustomizationsResponse) => void): Request; - /** - * - */ - listCustomizations(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListCustomizationsResponse) => void): Request; - /** - * Lists one or more CodeWhisperer profiles that you have created. - */ - listProfiles(params: CodeWhispererSigV4Client.Types.ListProfilesRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListProfilesResponse) => void): Request; - /** - * Lists one or more CodeWhisperer profiles that you have created. - */ - listProfiles(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListProfilesResponse) => void): Request; - /** - * List tags of an existing CodeWhisperer profile. - */ - listTagsForResource(params: CodeWhispererSigV4Client.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListTagsForResourceResponse) => void): Request; - /** - * List tags of an existing CodeWhisperer profile. - */ - listTagsForResource(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.ListTagsForResourceResponse) => void): Request; - /** - * Add tags to an existing CodeWhisperer profile. - */ - tagResource(params: CodeWhispererSigV4Client.Types.TagResourceRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.TagResourceResponse) => void): Request; - /** - * Add tags to an existing CodeWhisperer profile. - */ - tagResource(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.TagResourceResponse) => void): Request; - /** - * Remove tags from an existing CodeWhisperer profile. - */ - untagResource(params: CodeWhispererSigV4Client.Types.UntagResourceRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.UntagResourceResponse) => void): Request; - /** - * Remove tags from an existing CodeWhisperer profile. - */ - untagResource(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.UntagResourceResponse) => void): Request; - /** - * - */ - updateCustomization(params: CodeWhispererSigV4Client.Types.UpdateCustomizationRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.UpdateCustomizationResponse) => void): Request; - /** - * - */ - updateCustomization(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.UpdateCustomizationResponse) => void): Request; - /** - * Updates an existing CodeWhisperer profile. - */ - updateProfile(params: CodeWhispererSigV4Client.Types.UpdateProfileRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.UpdateProfileResponse) => void): Request; - /** - * Updates an existing CodeWhisperer profile. - */ - updateProfile(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.UpdateProfileResponse) => void): Request; - /** - * Returns grant details associated with the profile under the input account Id Output includes cmk arn, grant token, and grant id - */ - vendKeyGrant(params: CodeWhispererSigV4Client.Types.VendKeyGrantRequest, callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.VendKeyGrantResponse) => void): Request; - /** - * Returns grant details associated with the profile under the input account Id Output includes cmk arn, grant token, and grant id - */ - vendKeyGrant(callback?: (err: AWSError, data: CodeWhispererSigV4Client.Types.VendKeyGrantResponse) => void): Request; -} -declare namespace CodeWhispererSigV4Client { - export type AWSAccountId = string; - export type ActiveFunctionalityList = FunctionalityName[]; - export interface AllowVendedLogDeliveryForResourceRequest { - resourceArnBeingAuthorized: ResourceArn; - deliverySourceArn: ResourceArn; - } - export interface AllowVendedLogDeliveryForResourceResponse { - message?: String; - } - export interface ApplicationProperties { - tenantId: TenantId; - applicationArn: ResourceArn; - tenantUrl: Url; - applicationType: FunctionalityName; - } - export type ApplicationPropertiesList = ApplicationProperties[]; - export interface AssociateCustomizationPermissionRequest { - identifier: CustomizationIdentifier; - permission: CustomizationPermission; - } - export interface AssociateCustomizationPermissionResponse { - } - export type Base64EncodedPaginationToken = string; - export type Boolean = boolean; - export interface ByUserAnalytics { - s3Uri?: S3Uri; - toggle: OptInFeatureToggle; - } - export type ClientId = string; - export interface CodeStarReference { - connectionArn: ResourceArn; - } - export interface CreateCustomizationRequest { - dataReference: DataReference; - customizationName: CustomizationName; - description?: Description; - profileArn: ProfileArn; - tags?: TagList; - clientToken?: IdempotencyToken; - includeRepos?: RepositoryList; - } - export interface CreateCustomizationResponse { - customizationArn: CustomizationArn; - } - export interface CreateProfileRequest { - identitySource?: IdentitySource; - profileName: ProfileName; - description?: ProfileDescription; - referenceTrackerConfiguration: ReferenceTrackerConfiguration; - activeFunctionalities?: ActiveFunctionalityList; - clientToken?: IdempotencyToken; - kmsKeyArn?: ResourceArn; - tags?: TagList; - resourcePolicy?: ResourcePolicy; - optInFeatures?: OptInFeatures; - } - export interface CreateProfileResponse { - profileArn: ProfileArn; - } - export type CustomizationArn = string; - export type CustomizationIdentifier = string; - export type CustomizationName = string; - export interface CustomizationPermission { - user?: IdentityCenterIdentifier; - group?: IdentityCenterIdentifier; - } - export type CustomizationStatus = "CREATED"|"UPDATED"|"CREATING"|"UPDATING"|"DELETING"|"ACTIVATING"|"DEACTIVATING"|"ACTIVATED"|"CREATION_FAILED"|"UPDATE_FAILED"|"DELETION_FAILED"|"ACTIVATION_FAILED"|"DEACTIVATION_FAILED"|string; - export interface CustomizationSummary { - arn: CustomizationArn; - version?: Version; - customizationName: CustomizationName; - description?: Description; - status: CustomizationStatus; - updatedAt: Timestamp; - } - export type CustomizationSummaryList = CustomizationSummary[]; - export interface CustomizationVersionSummary { - version: Version; - baseVersion?: Version; - status: CustomizationStatus; - dataReference: DataReference; - updatedAt: Timestamp; - evaluationMetrics?: EvaluationMetrics; - } - export type CustomizationVersionSummaryList = CustomizationVersionSummary[]; - export interface DashboardAnalytics { - toggle: OptInFeatureToggle; - } - export interface DataReference { - codeStarReference?: CodeStarReference; - s3Reference?: S3Reference; - } - export interface DeleteCustomizationRequest { - identifier: CustomizationIdentifier; - clientToken?: IdempotencyToken; - } - export interface DeleteCustomizationResponse { - } - export interface DeleteProfileRequest { - profileArn: ProfileArn; - } - export interface DeleteProfileResponse { - } - export type Description = string; - export interface DisassociateCustomizationPermissionRequest { - identifier: CustomizationIdentifier; - permission: CustomizationPermission; - } - export interface DisassociateCustomizationPermissionResponse { - } - export type ErrorDetails = string; - export interface EvaluationMetrics { - compositeScore: Integer; - } - export interface ExternalIdentityDetails { - issuerUrl?: IssuerUrl; - clientId?: ClientId; - scimEndpoint?: String; - } - export interface ExternalIdentitySource { - issuerUrl: IssuerUrl; - clientId: ClientId; - } - export type FeatureName = string; - export interface FileContext { - leftFileContent: FileContextLeftFileContentString; - rightFileContent: FileContextRightFileContentString; - filename: FileContextFilenameString; - fileUri?: FileContextFileUriString; - programmingLanguage: ProgrammingLanguage; - } - export type FileContextFileUriString = string; - export type FileContextFilenameString = string; - export type FileContextLeftFileContentString = string; - export type FileContextRightFileContentString = string; - export type FunctionalityName = "COMPLETIONS"|"ANALYSIS"|"CONVERSATIONS"|"TASK_ASSIST"|"TRANSFORMATIONS"|"CHAT_CUSTOMIZATION"|"TRANSFORMATIONS_WEBAPP"|"FEATURE_DEVELOPMENT"|string; - export interface GenerateRecommendationsRequest { - fileContext: FileContext; - maxResults?: GenerateRecommendationsRequestMaxResultsInteger; - nextToken?: GenerateRecommendationsRequestNextTokenString; - referenceTrackerConfiguration?: ReferenceTrackerConfiguration; - supplementalContexts?: SupplementalContextList; - } - export type GenerateRecommendationsRequestMaxResultsInteger = number; - export type GenerateRecommendationsRequestNextTokenString = string; - export interface GenerateRecommendationsResponse { - recommendations?: RecommendationsList; - nextToken?: String; - } - export interface GetCustomizationRequest { - identifier: CustomizationIdentifier; - } - export interface GetCustomizationResponse { - arn: CustomizationArn; - version?: Version; - status: CustomizationStatus; - errorDetails?: ErrorDetails; - dataReference: DataReference; - customizationName: CustomizationName; - description?: Description; - profileArn: ProfileArn; - updatedAt: Timestamp; - evaluationMetrics?: EvaluationMetrics; - includeRepos?: RepositoryList; - } - export type GrantId = string; - export type GrantToken = string; - export type IdempotencyToken = string; - export type IdentityCenterIdentifier = string; - export type IdentityCenterPermissions = CustomizationPermission[]; - export interface IdentityDetails { - ssoIdentityDetails?: SSOIdentityDetails; - externalIdentityDetails?: ExternalIdentityDetails; - } - export interface IdentitySource { - ssoIdentitySource?: SSOIdentitySource; - externalIdentitySource?: ExternalIdentitySource; - } - export interface Import { - statement?: ImportStatementString; - } - export type ImportStatementString = string; - export type Imports = Import[]; - export type Integer = number; - export type IssuerUrl = string; - export interface ListCustomizationPermissionsRequest { - identifier: CustomizationIdentifier; - maxResults?: ListCustomizationPermissionsRequestMaxResultsInteger; - nextToken?: Base64EncodedPaginationToken; - } - export type ListCustomizationPermissionsRequestMaxResultsInteger = number; - export interface ListCustomizationPermissionsResponse { - permissions: IdentityCenterPermissions; - nextToken?: Base64EncodedPaginationToken; - } - export interface ListCustomizationVersionsRequest { - identifier: CustomizationIdentifier; - maxResults?: ListCustomizationVersionsRequestMaxResultsInteger; - nextToken?: Base64EncodedPaginationToken; - } - export type ListCustomizationVersionsRequestMaxResultsInteger = number; - export interface ListCustomizationVersionsResponse { - versions: CustomizationVersionSummaryList; - nextToken?: Base64EncodedPaginationToken; - } - export interface ListCustomizationsRequest { - maxResults?: ListCustomizationsRequestMaxResultsInteger; - nextToken?: Base64EncodedPaginationToken; - } - export type ListCustomizationsRequestMaxResultsInteger = number; - export interface ListCustomizationsResponse { - customizations: CustomizationSummaryList; - nextToken?: Base64EncodedPaginationToken; - } - export interface ListProfilesRequest { - maxResults?: ListProfilesRequestMaxResultsInteger; - includeManagementAccount?: Boolean; - nextToken?: Base64EncodedPaginationToken; - } - export type ListProfilesRequestMaxResultsInteger = number; - export interface ListProfilesResponse { - profiles: ProfileList; - nextToken?: Base64EncodedPaginationToken; - } - export interface ListTagsForResourceRequest { - resourceArn: ResourceArn; - } - export interface ListTagsForResourceResponse { - tags?: TagList; - } - export type Notifications = NotificationsFeature[]; - export interface NotificationsFeature { - feature: FeatureName; - toggle: OptInFeatureToggle; - } - export type OptInFeatureToggle = "ON"|"OFF"|string; - export interface OptInFeatures { - promptLogging?: PromptLogging; - byUserAnalytics?: ByUserAnalytics; - dashboardAnalytics?: DashboardAnalytics; - notifications?: Notifications; - workspaceContext?: WorkspaceContext; - } - export interface PreviousEditorStateMetadata { - timeOffset: Integer; - } - export interface Profile { - arn: ProfileArn; - identityDetails?: IdentityDetails; - profileName: ProfileName; - description?: ProfileDescription; - referenceTrackerConfiguration?: ReferenceTrackerConfiguration; - kmsKeyArn?: ResourceArn; - activeFunctionalities?: ActiveFunctionalityList; - status?: ProfileStatus; - errorDetails?: ErrorDetails; - resourcePolicy?: ResourcePolicy; - profileType?: ProfileType; - optInFeatures?: OptInFeatures; - permissionUpdateRequired?: Boolean; - applicationProperties?: ApplicationPropertiesList; - } - export type ProfileArn = string; - export type ProfileDescription = string; - export type ProfileList = Profile[]; - export type ProfileName = string; - export type ProfileStatus = "ACTIVE"|"CREATING"|"CREATE_FAILED"|"UPDATING"|"UPDATE_FAILED"|"DELETING"|"DELETE_FAILED"|string; - export type ProfileType = "Q_DEVELOPER"|"CODEWHISPERER"|string; - export interface ProgrammingLanguage { - languageName: ProgrammingLanguageLanguageNameString; - } - export type ProgrammingLanguageLanguageNameString = string; - export interface PromptLogging { - s3Uri: S3Uri; - toggle: OptInFeatureToggle; - } - export interface Recommendation { - content: RecommendationContentString; - references?: References; - mostRelevantMissingImports?: Imports; - } - export type RecommendationContentString = string; - export type RecommendationsList = Recommendation[]; - export type RecommendationsWithReferencesPreference = "BLOCK"|"ALLOW"|string; - export interface Reference { - /** - * License name - */ - licenseName?: ReferenceLicenseNameString; - /** - * Code Repsitory for the associated reference - */ - repository?: ReferenceRepositoryString; - /** - * Respository URL - */ - url?: ReferenceUrlString; - /** - * Span / Range for the Reference - */ - recommendationContentSpan?: Span; - } - export type ReferenceLicenseNameString = string; - export type ReferenceRepositoryString = string; - export interface ReferenceTrackerConfiguration { - recommendationsWithReferences: RecommendationsWithReferencesPreference; - } - export type ReferenceUrlString = string; - export type References = Reference[]; - export type RepositoryId = string; - export type RepositoryList = RepositoryId[]; - export type ResourceArn = string; - export interface ResourcePolicy { - effect: ResourcePolicyEffect; - } - export type ResourcePolicyEffect = "ALLOW"|"DENY"|string; - export interface S3Reference { - uri: S3Uri; - } - export type S3Uri = string; - export interface SSOIdentityDetails { - instanceArn: ResourceArn; - oidcClientId: String; - ssoRegion?: SSORegion; - } - export interface SSOIdentitySource { - instanceArn: ResourceArn; - ssoRegion?: SSORegion; - } - export type SSORegion = string; - export interface Span { - start?: SpanStartInteger; - end?: SpanEndInteger; - } - export type SpanEndInteger = number; - export type SpanStartInteger = number; - export type String = string; - export interface SupplementalContext { - filePath: SupplementalContextFilePathString; - content: SupplementalContextContentString; - type?: SupplementalContextType; - metadata?: SupplementalContextMetadata; - } - export type SupplementalContextContentString = string; - export type SupplementalContextFilePathString = string; - export type SupplementalContextList = SupplementalContext[]; - export interface SupplementalContextMetadata { - previousEditorStateMetadata?: PreviousEditorStateMetadata; - } - export type SupplementalContextType = "PreviousEditorState"|"WorkspaceContext"|string; - export interface Tag { - key: TagKey; - value: TagValue; - } - export type TagKey = string; - export type TagKeyList = TagKey[]; - export type TagList = Tag[]; - export interface TagResourceRequest { - resourceArn: ResourceArn; - tags: TagList; - } - export interface TagResourceResponse { - } - export type TagValue = string; - export type TenantId = string; - export type Timestamp = Date; - export interface UntagResourceRequest { - resourceArn: ResourceArn; - tagKeys: TagKeyList; - } - export interface UntagResourceResponse { - } - export interface UpdateCustomizationRequest { - identifier: CustomizationIdentifier; - operation: UpdateOperation; - clientToken?: IdempotencyToken; - dataReference?: DataReference; - version?: Version; - includeRepos?: RepositoryList; - } - export interface UpdateCustomizationResponse { - } - export type UpdateOperation = "ACTIVATE"|"DEACTIVATE"|"UPDATE"|string; - export interface UpdateProfileRequest { - profileArn: ProfileArn; - identitySource?: IdentitySource; - profileName?: ProfileName; - description?: ProfileDescription; - referenceTrackerConfiguration?: ReferenceTrackerConfiguration; - activeFunctionalities?: ActiveFunctionalityList; - kmsKeyArn?: ResourceArn; - resourcePolicy?: ResourcePolicy; - targetProfileType?: ProfileType; - optInFeatures?: OptInFeatures; - } - export interface UpdateProfileResponse { - profileArn: ProfileArn; - } - export type Url = string; - export interface VendKeyGrantRequest { - accountId: AWSAccountId; - usecase: VendKeyGrantUseCase; - } - export interface VendKeyGrantResponse { - cmkArn?: ResourceArn; - grantId?: GrantToken; - grantToken?: GrantId; - } - export type VendKeyGrantUseCase = "TEST"|"WEAVER_BIRD"|"ELASTIC_GUMBY"|"LOCHNESS"|"BOWER_BIRD"|"ELASTIC_GUMBY_V2_JOB"|"ELASTIC_GUMBY_V2_CHAT"|string; - export type Version = number; - export interface WorkspaceContext { - toggle: OptInFeatureToggle; - } - /** - * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. - */ - export type apiVersion = "2024-10-25"|"latest"|string; - export interface ClientApiVersions { - /** - * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. - */ - apiVersion?: apiVersion; - } - export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions; - /** - * Contains interfaces for use with the CodeWhispererSigV4Client client. - */ - export import Types = CodeWhispererSigV4Client; -} -export = CodeWhispererSigV4Client; - - \ No newline at end of file diff --git a/server/aws-lsp-codewhisperer/src/client/sigv4/service.json b/server/aws-lsp-codewhisperer/src/client/sigv4/service.json deleted file mode 100644 index 26220aa7a0..0000000000 --- a/server/aws-lsp-codewhisperer/src/client/sigv4/service.json +++ /dev/null @@ -1,2145 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2024-10-25", - "auth": ["aws.auth#sigv4"], - "endpointPrefix": "codewhisperer", - "jsonVersion": "1.0", - "protocol": "json", - "protocols": ["json"], - "serviceFullName": "AWS CodeWhisperer", - "serviceId": "CodeWhisperer", - "signatureVersion": "v4", - "signingName": "codewhisperer", - "targetPrefix": "AWSCodeWhispererService", - "uid": "codewhisperer-2024-10-25" - }, - "operations": { - "AllowVendedLogDeliveryForResource": { - "name": "AllowVendedLogDeliveryForResource", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "AllowVendedLogDeliveryForResourceRequest" - }, - "output": { - "shape": "AllowVendedLogDeliveryForResourceResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Internal API to authorize a CodeWhisperer resource for vended log delivery.

" - }, - "AssociateCustomizationPermission": { - "name": "AssociateCustomizationPermission", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "AssociateCustomizationPermissionRequest" - }, - "output": { - "shape": "AssociateCustomizationPermissionResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Add permission for an Identity Center User/Group to use the Customization.

" - }, - "CreateCustomization": { - "name": "CreateCustomization", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "CreateCustomizationRequest" - }, - "output": { - "shape": "CreateCustomizationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ] - }, - "CreateProfile": { - "name": "CreateProfile", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "CreateProfileRequest" - }, - "output": { - "shape": "CreateProfileResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Creates a CodeWhisperer profile which can then be associated to users/groups of an identity source

" - }, - "DeleteCustomization": { - "name": "DeleteCustomization", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "DeleteCustomizationRequest" - }, - "output": { - "shape": "DeleteCustomizationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Deletes CodeWhisperer Customization and associated resources

" - }, - "DeleteProfile": { - "name": "DeleteProfile", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "DeleteProfileRequest" - }, - "output": { - "shape": "DeleteProfileResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Deletes CodeWhisperer profile and associated resources

" - }, - "DisassociateCustomizationPermission": { - "name": "DisassociateCustomizationPermission", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "DisassociateCustomizationPermissionRequest" - }, - "output": { - "shape": "DisassociateCustomizationPermissionResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Disassociate the permission for a Customization from an Identity Center User/Group.

" - }, - "GenerateRecommendations": { - "name": "GenerateRecommendations", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GenerateRecommendationsRequest" - }, - "output": { - "shape": "GenerateRecommendationsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Generates recommendations based on the provided file context.

" - }, - "GetCustomization": { - "name": "GetCustomization", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GetCustomizationRequest" - }, - "output": { - "shape": "GetCustomizationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ] - }, - "ListCustomizationPermissions": { - "name": "ListCustomizationPermissions", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListCustomizationPermissionsRequest" - }, - "output": { - "shape": "ListCustomizationPermissionsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

List User(s)/Group(s) who have permissions to use a Customization.

" - }, - "ListCustomizationVersions": { - "name": "ListCustomizationVersions", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListCustomizationVersionsRequest" - }, - "output": { - "shape": "ListCustomizationVersionsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

List actionable versions associated with a Customization.

" - }, - "ListCustomizations": { - "name": "ListCustomizations", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListCustomizationsRequest" - }, - "output": { - "shape": "ListCustomizationsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ] - }, - "ListProfiles": { - "name": "ListProfiles", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListProfilesRequest" - }, - "output": { - "shape": "ListProfilesResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Lists one or more CodeWhisperer profiles that you have created.

" - }, - "ListTagsForResource": { - "name": "ListTagsForResource", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListTagsForResourceRequest" - }, - "output": { - "shape": "ListTagsForResourceResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

List tags of an existing CodeWhisperer profile.

" - }, - "TagResource": { - "name": "TagResource", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "TagResourceRequest" - }, - "output": { - "shape": "TagResourceResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Add tags to an existing CodeWhisperer profile.

" - }, - "UntagResource": { - "name": "UntagResource", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "UntagResourceRequest" - }, - "output": { - "shape": "UntagResourceResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Remove tags from an existing CodeWhisperer profile.

" - }, - "UpdateCustomization": { - "name": "UpdateCustomization", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "UpdateCustomizationRequest" - }, - "output": { - "shape": "UpdateCustomizationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ] - }, - "UpdateProfile": { - "name": "UpdateProfile", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "UpdateProfileRequest" - }, - "output": { - "shape": "UpdateProfileResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Updates an existing CodeWhisperer profile.

" - }, - "VendKeyGrant": { - "name": "VendKeyGrant", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "VendKeyGrantRequest" - }, - "output": { - "shape": "VendKeyGrantResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Returns grant details associated with the profile under the input account Id Output includes cmk arn, grant token, and grant id

" - } - }, - "shapes": { - "AWSAccountId": { - "type": "string", - "documentation": "

Represents the AWS account ID of the customer

", - "pattern": "[0-9]{12}" - }, - "AccessDeniedException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "AccessDeniedExceptionReason" - } - }, - "documentation": "

This exception is thrown when the user does not have sufficient access to perform this action.

", - "exception": true - }, - "AccessDeniedExceptionReason": { - "type": "string", - "documentation": "

Reason for AccessDeniedException

", - "enum": ["UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS", "UNAUTHORIZED_WORKSPACE_CONTEXT_FEATURE_ACCESS"] - }, - "ActiveFunctionalityList": { - "type": "list", - "member": { - "shape": "FunctionalityName" - }, - "max": 10, - "min": 0 - }, - "AllowVendedLogDeliveryForResourceRequest": { - "type": "structure", - "required": ["resourceArnBeingAuthorized", "deliverySourceArn"], - "members": { - "resourceArnBeingAuthorized": { - "shape": "ResourceArn" - }, - "deliverySourceArn": { - "shape": "ResourceArn" - } - } - }, - "AllowVendedLogDeliveryForResourceResponse": { - "type": "structure", - "members": { - "message": { - "shape": "String" - } - } - }, - "ApplicationProperties": { - "type": "structure", - "required": ["tenantId", "applicationArn", "tenantUrl", "applicationType"], - "members": { - "tenantId": { - "shape": "TenantId" - }, - "applicationArn": { - "shape": "ResourceArn" - }, - "tenantUrl": { - "shape": "Url" - }, - "applicationType": { - "shape": "FunctionalityName" - } - } - }, - "ApplicationPropertiesList": { - "type": "list", - "member": { - "shape": "ApplicationProperties" - } - }, - "AssociateCustomizationPermissionRequest": { - "type": "structure", - "required": ["identifier", "permission"], - "members": { - "identifier": { - "shape": "CustomizationIdentifier" - }, - "permission": { - "shape": "CustomizationPermission" - } - } - }, - "AssociateCustomizationPermissionResponse": { - "type": "structure", - "members": {} - }, - "Base64EncodedPaginationToken": { - "type": "string", - "max": 2048, - "min": 1, - "pattern": "(?:[A-Za-z0-9\\+/]{4})*(?:[A-Za-z0-9\\+/]{2}\\=\\=|[A-Za-z0-9\\+/]{3}\\=)?" - }, - "Boolean": { - "type": "boolean", - "box": true - }, - "ByUserAnalytics": { - "type": "structure", - "required": ["toggle"], - "members": { - "s3Uri": { - "shape": "S3Uri" - }, - "toggle": { - "shape": "OptInFeatureToggle" - } - } - }, - "ClientId": { - "type": "string", - "max": 255, - "min": 1 - }, - "CodeStarReference": { - "type": "structure", - "required": ["connectionArn"], - "members": { - "connectionArn": { - "shape": "ResourceArn" - } - } - }, - "ConflictException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "ConflictExceptionReason" - } - }, - "documentation": "

This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state.

", - "exception": true - }, - "ConflictExceptionReason": { - "type": "string", - "documentation": "

Reason for ConflictException

", - "enum": ["CUSTOMER_KMS_KEY_INVALID_KEY_POLICY", "CUSTOMER_KMS_KEY_DISABLED", "MISMATCHED_KMS_KEY"] - }, - "CreateCustomizationRequest": { - "type": "structure", - "required": ["dataReference", "customizationName", "profileArn"], - "members": { - "dataReference": { - "shape": "DataReference" - }, - "customizationName": { - "shape": "CustomizationName" - }, - "description": { - "shape": "Description" - }, - "profileArn": { - "shape": "ProfileArn" - }, - "tags": { - "shape": "TagList" - }, - "clientToken": { - "shape": "IdempotencyToken" - }, - "includeRepos": { - "shape": "RepositoryList" - } - } - }, - "CreateCustomizationResponse": { - "type": "structure", - "required": ["customizationArn"], - "members": { - "customizationArn": { - "shape": "CustomizationArn" - } - } - }, - "CreateProfileRequest": { - "type": "structure", - "required": ["profileName", "referenceTrackerConfiguration"], - "members": { - "identitySource": { - "shape": "IdentitySource" - }, - "profileName": { - "shape": "ProfileName" - }, - "description": { - "shape": "ProfileDescription" - }, - "referenceTrackerConfiguration": { - "shape": "ReferenceTrackerConfiguration" - }, - "activeFunctionalities": { - "shape": "ActiveFunctionalityList" - }, - "clientToken": { - "shape": "IdempotencyToken", - "idempotencyToken": true - }, - "kmsKeyArn": { - "shape": "ResourceArn" - }, - "tags": { - "shape": "TagList" - }, - "resourcePolicy": { - "shape": "ResourcePolicy" - }, - "optInFeatures": { - "shape": "OptInFeatures" - } - } - }, - "CreateProfileResponse": { - "type": "structure", - "required": ["profileArn"], - "members": { - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "CustomizationArn": { - "type": "string", - "max": 950, - "min": 0, - "pattern": "arn:[-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}" - }, - "CustomizationIdentifier": { - "type": "string", - "max": 950, - "min": 1, - "pattern": ".*[a-zA-Z0-9-:/]*.*" - }, - "CustomizationName": { - "type": "string", - "max": 100, - "min": 1, - "pattern": "[a-zA-Z][a-zA-Z0-9_-]*" - }, - "CustomizationPermission": { - "type": "structure", - "members": { - "user": { - "shape": "IdentityCenterIdentifier" - }, - "group": { - "shape": "IdentityCenterIdentifier" - } - }, - "union": true - }, - "CustomizationStatus": { - "type": "string", - "enum": [ - "CREATED", - "UPDATED", - "CREATING", - "UPDATING", - "DELETING", - "ACTIVATING", - "DEACTIVATING", - "ACTIVATED", - "CREATION_FAILED", - "UPDATE_FAILED", - "DELETION_FAILED", - "ACTIVATION_FAILED", - "DEACTIVATION_FAILED" - ] - }, - "CustomizationSummary": { - "type": "structure", - "required": ["arn", "customizationName", "status", "updatedAt"], - "members": { - "arn": { - "shape": "CustomizationArn" - }, - "version": { - "shape": "Version" - }, - "customizationName": { - "shape": "CustomizationName" - }, - "description": { - "shape": "Description" - }, - "status": { - "shape": "CustomizationStatus" - }, - "updatedAt": { - "shape": "Timestamp" - } - } - }, - "CustomizationSummaryList": { - "type": "list", - "member": { - "shape": "CustomizationSummary" - } - }, - "CustomizationVersionSummary": { - "type": "structure", - "required": ["version", "status", "dataReference", "updatedAt"], - "members": { - "version": { - "shape": "Version" - }, - "baseVersion": { - "shape": "Version" - }, - "status": { - "shape": "CustomizationStatus" - }, - "dataReference": { - "shape": "DataReference" - }, - "updatedAt": { - "shape": "Timestamp" - }, - "evaluationMetrics": { - "shape": "EvaluationMetrics" - } - } - }, - "CustomizationVersionSummaryList": { - "type": "list", - "member": { - "shape": "CustomizationVersionSummary" - } - }, - "DashboardAnalytics": { - "type": "structure", - "required": ["toggle"], - "members": { - "toggle": { - "shape": "OptInFeatureToggle" - } - } - }, - "DataReference": { - "type": "structure", - "members": { - "codeStarReference": { - "shape": "CodeStarReference" - }, - "s3Reference": { - "shape": "S3Reference" - } - }, - "union": true - }, - "DeleteCustomizationRequest": { - "type": "structure", - "required": ["identifier"], - "members": { - "identifier": { - "shape": "CustomizationIdentifier" - }, - "clientToken": { - "shape": "IdempotencyToken" - } - } - }, - "DeleteCustomizationResponse": { - "type": "structure", - "members": {} - }, - "DeleteProfileRequest": { - "type": "structure", - "required": ["profileArn"], - "members": { - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "DeleteProfileResponse": { - "type": "structure", - "members": {} - }, - "Description": { - "type": "string", - "max": 256, - "min": 0, - "pattern": "[\\sa-zA-Z0-9_-]*" - }, - "DisassociateCustomizationPermissionRequest": { - "type": "structure", - "required": ["identifier", "permission"], - "members": { - "identifier": { - "shape": "CustomizationIdentifier" - }, - "permission": { - "shape": "CustomizationPermission" - } - } - }, - "DisassociateCustomizationPermissionResponse": { - "type": "structure", - "members": {} - }, - "ErrorDetails": { - "type": "string", - "max": 2048, - "min": 0 - }, - "EvaluationMetrics": { - "type": "structure", - "required": ["compositeScore"], - "members": { - "compositeScore": { - "shape": "Integer" - } - } - }, - "ExternalIdentityDetails": { - "type": "structure", - "members": { - "issuerUrl": { - "shape": "IssuerUrl" - }, - "clientId": { - "shape": "ClientId" - }, - "scimEndpoint": { - "shape": "String" - } - } - }, - "ExternalIdentitySource": { - "type": "structure", - "required": ["issuerUrl", "clientId"], - "members": { - "issuerUrl": { - "shape": "IssuerUrl" - }, - "clientId": { - "shape": "ClientId" - } - } - }, - "FeatureName": { - "type": "string", - "max": 128, - "min": 1, - "pattern": "[-a-zA-Z0-9._]*" - }, - "FileContext": { - "type": "structure", - "required": ["leftFileContent", "rightFileContent", "filename", "programmingLanguage"], - "members": { - "leftFileContent": { - "shape": "FileContextLeftFileContentString" - }, - "rightFileContent": { - "shape": "FileContextRightFileContentString" - }, - "filename": { - "shape": "FileContextFilenameString" - }, - "fileUri": { - "shape": "FileContextFileUriString" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - } - } - }, - "FileContextFileUriString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "FileContextFilenameString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "FileContextLeftFileContentString": { - "type": "string", - "max": 10240, - "min": 0, - "sensitive": true - }, - "FileContextRightFileContentString": { - "type": "string", - "max": 10240, - "min": 0, - "sensitive": true - }, - "FunctionalityName": { - "type": "string", - "enum": [ - "COMPLETIONS", - "ANALYSIS", - "CONVERSATIONS", - "TASK_ASSIST", - "TRANSFORMATIONS", - "CHAT_CUSTOMIZATION", - "TRANSFORMATIONS_WEBAPP", - "FEATURE_DEVELOPMENT" - ], - "max": 64, - "min": 1 - }, - "GenerateRecommendationsRequest": { - "type": "structure", - "required": ["fileContext"], - "members": { - "fileContext": { - "shape": "FileContext" - }, - "maxResults": { - "shape": "GenerateRecommendationsRequestMaxResultsInteger" - }, - "nextToken": { - "shape": "GenerateRecommendationsRequestNextTokenString" - }, - "referenceTrackerConfiguration": { - "shape": "ReferenceTrackerConfiguration" - }, - "supplementalContexts": { - "shape": "SupplementalContextList" - } - } - }, - "GenerateRecommendationsRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 10, - "min": 1 - }, - "GenerateRecommendationsRequestNextTokenString": { - "type": "string", - "max": 2048, - "min": 0, - "pattern": "(?:[A-Za-z0-9\\+/]{4})*(?:[A-Za-z0-9\\+/]{2}\\=\\=|[A-Za-z0-9\\+/]{3}\\=)?" - }, - "GenerateRecommendationsResponse": { - "type": "structure", - "members": { - "recommendations": { - "shape": "RecommendationsList" - }, - "nextToken": { - "shape": "String" - } - } - }, - "GetCustomizationRequest": { - "type": "structure", - "required": ["identifier"], - "members": { - "identifier": { - "shape": "CustomizationIdentifier" - } - } - }, - "GetCustomizationResponse": { - "type": "structure", - "required": ["arn", "status", "dataReference", "customizationName", "profileArn", "updatedAt"], - "members": { - "arn": { - "shape": "CustomizationArn" - }, - "version": { - "shape": "Version" - }, - "status": { - "shape": "CustomizationStatus" - }, - "errorDetails": { - "shape": "ErrorDetails" - }, - "dataReference": { - "shape": "DataReference" - }, - "customizationName": { - "shape": "CustomizationName" - }, - "description": { - "shape": "Description" - }, - "profileArn": { - "shape": "ProfileArn" - }, - "updatedAt": { - "shape": "Timestamp" - }, - "evaluationMetrics": { - "shape": "EvaluationMetrics" - }, - "includeRepos": { - "shape": "RepositoryList" - } - } - }, - "GrantId": { - "type": "string", - "max": 128, - "min": 1 - }, - "GrantToken": { - "type": "string", - "max": 8192, - "min": 1 - }, - "IdempotencyToken": { - "type": "string", - "max": 256, - "min": 1 - }, - "IdentityCenterIdentifier": { - "type": "string", - "max": 64, - "min": 1, - "pattern": "([0-9a-f]{10}-|)[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}" - }, - "IdentityCenterPermissions": { - "type": "list", - "member": { - "shape": "CustomizationPermission" - } - }, - "IdentityDetails": { - "type": "structure", - "members": { - "ssoIdentityDetails": { - "shape": "SSOIdentityDetails" - }, - "externalIdentityDetails": { - "shape": "ExternalIdentityDetails" - } - }, - "union": true - }, - "IdentitySource": { - "type": "structure", - "members": { - "ssoIdentitySource": { - "shape": "SSOIdentitySource" - }, - "externalIdentitySource": { - "shape": "ExternalIdentitySource" - } - }, - "union": true - }, - "Import": { - "type": "structure", - "members": { - "statement": { - "shape": "ImportStatementString" - } - } - }, - "ImportStatementString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "Imports": { - "type": "list", - "member": { - "shape": "Import" - }, - "max": 10, - "min": 0 - }, - "Integer": { - "type": "integer", - "box": true - }, - "InternalServerException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "InternalServerExceptionReason" - } - }, - "documentation": "

This exception is thrown when an unexpected error occurred during the processing of a request.

", - "exception": true, - "fault": true, - "retryable": { - "throttling": false - } - }, - "InternalServerExceptionReason": { - "type": "string", - "documentation": "

Reason for InternalServerException

", - "enum": ["MODEL_TEMPORARILY_UNAVAILABLE"] - }, - "IssuerUrl": { - "type": "string", - "max": 255, - "min": 1 - }, - "ListCustomizationPermissionsRequest": { - "type": "structure", - "required": ["identifier"], - "members": { - "identifier": { - "shape": "CustomizationIdentifier" - }, - "maxResults": { - "shape": "ListCustomizationPermissionsRequestMaxResultsInteger" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListCustomizationPermissionsRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 50, - "min": 1 - }, - "ListCustomizationPermissionsResponse": { - "type": "structure", - "required": ["permissions"], - "members": { - "permissions": { - "shape": "IdentityCenterPermissions" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListCustomizationVersionsRequest": { - "type": "structure", - "required": ["identifier"], - "members": { - "identifier": { - "shape": "CustomizationIdentifier" - }, - "maxResults": { - "shape": "ListCustomizationVersionsRequestMaxResultsInteger" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListCustomizationVersionsRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 100, - "min": 1 - }, - "ListCustomizationVersionsResponse": { - "type": "structure", - "required": ["versions"], - "members": { - "versions": { - "shape": "CustomizationVersionSummaryList" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListCustomizationsRequest": { - "type": "structure", - "members": { - "maxResults": { - "shape": "ListCustomizationsRequestMaxResultsInteger" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListCustomizationsRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 100, - "min": 1 - }, - "ListCustomizationsResponse": { - "type": "structure", - "required": ["customizations"], - "members": { - "customizations": { - "shape": "CustomizationSummaryList" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListProfilesRequest": { - "type": "structure", - "members": { - "maxResults": { - "shape": "ListProfilesRequestMaxResultsInteger" - }, - "includeManagementAccount": { - "shape": "Boolean" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListProfilesRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 100, - "min": 1 - }, - "ListProfilesResponse": { - "type": "structure", - "required": ["profiles"], - "members": { - "profiles": { - "shape": "ProfileList" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListTagsForResourceRequest": { - "type": "structure", - "required": ["resourceArn"], - "members": { - "resourceArn": { - "shape": "ResourceArn" - } - } - }, - "ListTagsForResourceResponse": { - "type": "structure", - "members": { - "tags": { - "shape": "TagList" - } - } - }, - "Notifications": { - "type": "list", - "member": { - "shape": "NotificationsFeature" - }, - "max": 10, - "min": 0 - }, - "NotificationsFeature": { - "type": "structure", - "required": ["feature", "toggle"], - "members": { - "feature": { - "shape": "FeatureName" - }, - "toggle": { - "shape": "OptInFeatureToggle" - } - } - }, - "OptInFeatureToggle": { - "type": "string", - "enum": ["ON", "OFF"] - }, - "OptInFeatures": { - "type": "structure", - "members": { - "promptLogging": { - "shape": "PromptLogging" - }, - "byUserAnalytics": { - "shape": "ByUserAnalytics" - }, - "dashboardAnalytics": { - "shape": "DashboardAnalytics" - }, - "notifications": { - "shape": "Notifications" - }, - "workspaceContext": { - "shape": "WorkspaceContext" - } - } - }, - "PreviousEditorStateMetadata": { - "type": "structure", - "required": ["timeOffset"], - "members": { - "timeOffset": { - "shape": "Integer" - } - } - }, - "Profile": { - "type": "structure", - "required": ["arn", "profileName"], - "members": { - "arn": { - "shape": "ProfileArn" - }, - "identityDetails": { - "shape": "IdentityDetails" - }, - "profileName": { - "shape": "ProfileName" - }, - "description": { - "shape": "ProfileDescription" - }, - "referenceTrackerConfiguration": { - "shape": "ReferenceTrackerConfiguration" - }, - "kmsKeyArn": { - "shape": "ResourceArn" - }, - "activeFunctionalities": { - "shape": "ActiveFunctionalityList" - }, - "status": { - "shape": "ProfileStatus" - }, - "errorDetails": { - "shape": "ErrorDetails" - }, - "resourcePolicy": { - "shape": "ResourcePolicy" - }, - "profileType": { - "shape": "ProfileType" - }, - "optInFeatures": { - "shape": "OptInFeatures" - }, - "permissionUpdateRequired": { - "shape": "Boolean" - }, - "applicationProperties": { - "shape": "ApplicationPropertiesList" - } - } - }, - "ProfileArn": { - "type": "string", - "max": 950, - "min": 0, - "pattern": "arn:aws:(codewhisperer|transform):[-.a-z0-9]{1,63}:\\d{12}:profile/([a-zA-Z0-9]){12}" - }, - "ProfileDescription": { - "type": "string", - "max": 256, - "min": 1, - "pattern": "[\\sa-zA-Z0-9_-]*" - }, - "ProfileList": { - "type": "list", - "member": { - "shape": "Profile" - } - }, - "ProfileName": { - "type": "string", - "max": 100, - "min": 1, - "pattern": "[a-zA-Z][a-zA-Z0-9_-]*" - }, - "ProfileStatus": { - "type": "string", - "enum": ["ACTIVE", "CREATING", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "DELETE_FAILED"] - }, - "ProfileType": { - "type": "string", - "enum": ["Q_DEVELOPER", "CODEWHISPERER"] - }, - "ProgrammingLanguage": { - "type": "structure", - "required": ["languageName"], - "members": { - "languageName": { - "shape": "ProgrammingLanguageLanguageNameString" - } - }, - "documentation": "

Programming Languages supported by CodeWhisperer

" - }, - "ProgrammingLanguageLanguageNameString": { - "type": "string", - "max": 128, - "min": 1, - "pattern": "(python|javascript|java|csharp|typescript|c|cpp|go|kotlin|php|ruby|rust|scala|shell|sql|json|yaml|vue|tf|tsx|jsx|plaintext|systemverilog|dart|lua|swift|hcl|powershell|r|abap)" - }, - "PromptLogging": { - "type": "structure", - "required": ["s3Uri", "toggle"], - "members": { - "s3Uri": { - "shape": "S3Uri" - }, - "toggle": { - "shape": "OptInFeatureToggle" - } - } - }, - "Recommendation": { - "type": "structure", - "required": ["content"], - "members": { - "content": { - "shape": "RecommendationContentString" - }, - "references": { - "shape": "References" - }, - "mostRelevantMissingImports": { - "shape": "Imports" - } - } - }, - "RecommendationContentString": { - "type": "string", - "max": 5120, - "min": 1, - "sensitive": true - }, - "RecommendationsList": { - "type": "list", - "member": { - "shape": "Recommendation" - }, - "max": 10, - "min": 0 - }, - "RecommendationsWithReferencesPreference": { - "type": "string", - "documentation": "

Recommendations with references setting for CodeWhisperer

", - "enum": ["BLOCK", "ALLOW"] - }, - "Reference": { - "type": "structure", - "members": { - "licenseName": { - "shape": "ReferenceLicenseNameString", - "documentation": "

License name

" - }, - "repository": { - "shape": "ReferenceRepositoryString", - "documentation": "

Code Repsitory for the associated reference

" - }, - "url": { - "shape": "ReferenceUrlString", - "documentation": "

Respository URL

" - }, - "recommendationContentSpan": { - "shape": "Span", - "documentation": "

Span / Range for the Reference

" - } - }, - "documentation": "

Code Reference / Repository details

" - }, - "ReferenceLicenseNameString": { - "type": "string", - "max": 1024, - "min": 1 - }, - "ReferenceRepositoryString": { - "type": "string", - "max": 1024, - "min": 1 - }, - "ReferenceTrackerConfiguration": { - "type": "structure", - "required": ["recommendationsWithReferences"], - "members": { - "recommendationsWithReferences": { - "shape": "RecommendationsWithReferencesPreference" - } - } - }, - "ReferenceUrlString": { - "type": "string", - "max": 1024, - "min": 1 - }, - "References": { - "type": "list", - "member": { - "shape": "Reference" - }, - "max": 10, - "min": 0 - }, - "RepositoryId": { - "type": "string", - "max": 255, - "min": 1, - "pattern": ".*(?x)^([a-zA-Z0-9-_\\.\\s()]+/)+[\\w-\\.\\+_\\s]+", - "sensitive": true - }, - "RepositoryList": { - "type": "list", - "member": { - "shape": "RepositoryId" - }, - "max": 100, - "min": 1, - "sensitive": true - }, - "ResourceArn": { - "type": "string", - "max": 1224, - "min": 0, - "pattern": "arn:([-.a-z0-9]{1,63}:){2}([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}" - }, - "ResourceNotFoundException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - } - }, - "documentation": "

This exception is thrown when describing a resource that does not exist.

", - "exception": true - }, - "ResourcePolicy": { - "type": "structure", - "required": ["effect"], - "members": { - "effect": { - "shape": "ResourcePolicyEffect" - } - } - }, - "ResourcePolicyEffect": { - "type": "string", - "enum": ["ALLOW", "DENY"] - }, - "S3Reference": { - "type": "structure", - "required": ["uri"], - "members": { - "uri": { - "shape": "S3Uri" - } - } - }, - "S3Uri": { - "type": "string", - "max": 1024, - "min": 1, - "pattern": "s3://((?!xn--)[a-z0-9](?![^/]*[.]{2})[a-z0-9-.]{1,61}[a-z0-9](?Represents span in a text.

" - }, - "SpanEndInteger": { - "type": "integer", - "box": true, - "min": 0 - }, - "SpanStartInteger": { - "type": "integer", - "box": true, - "min": 0 - }, - "String": { - "type": "string" - }, - "SupplementalContext": { - "type": "structure", - "required": ["filePath", "content"], - "members": { - "filePath": { - "shape": "SupplementalContextFilePathString" - }, - "content": { - "shape": "SupplementalContextContentString" - }, - "type": { - "shape": "SupplementalContextType" - }, - "metadata": { - "shape": "SupplementalContextMetadata" - } - } - }, - "SupplementalContextContentString": { - "type": "string", - "max": 10240, - "min": 1, - "sensitive": true - }, - "SupplementalContextFilePathString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "SupplementalContextList": { - "type": "list", - "member": { - "shape": "SupplementalContext" - }, - "max": 20, - "min": 0 - }, - "SupplementalContextMetadata": { - "type": "structure", - "members": { - "previousEditorStateMetadata": { - "shape": "PreviousEditorStateMetadata" - } - }, - "union": true - }, - "SupplementalContextType": { - "type": "string", - "enum": ["PreviousEditorState", "WorkspaceContext"] - }, - "Tag": { - "type": "structure", - "required": ["key", "value"], - "members": { - "key": { - "shape": "TagKey" - }, - "value": { - "shape": "TagValue" - } - } - }, - "TagKey": { - "type": "string", - "max": 128, - "min": 1 - }, - "TagKeyList": { - "type": "list", - "member": { - "shape": "TagKey" - }, - "max": 50, - "min": 0 - }, - "TagList": { - "type": "list", - "member": { - "shape": "Tag" - }, - "max": 50, - "min": 0 - }, - "TagResourceRequest": { - "type": "structure", - "required": ["resourceArn", "tags"], - "members": { - "resourceArn": { - "shape": "ResourceArn" - }, - "tags": { - "shape": "TagList" - } - } - }, - "TagResourceResponse": { - "type": "structure", - "members": {} - }, - "TagValue": { - "type": "string", - "max": 256, - "min": 0 - }, - "TenantId": { - "type": "string", - "max": 1024, - "min": 1 - }, - "ThrottlingException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "ThrottlingExceptionReason" - } - }, - "documentation": "

This exception is thrown when request was denied due to request throttling.

", - "exception": true, - "retryable": { - "throttling": true - } - }, - "ThrottlingExceptionReason": { - "type": "string", - "documentation": "

Reason for ThrottlingException

", - "enum": ["MONTHLY_REQUEST_COUNT"] - }, - "Timestamp": { - "type": "timestamp" - }, - "UntagResourceRequest": { - "type": "structure", - "required": ["resourceArn", "tagKeys"], - "members": { - "resourceArn": { - "shape": "ResourceArn" - }, - "tagKeys": { - "shape": "TagKeyList" - } - } - }, - "UntagResourceResponse": { - "type": "structure", - "members": {} - }, - "UpdateCustomizationRequest": { - "type": "structure", - "required": ["identifier", "operation"], - "members": { - "identifier": { - "shape": "CustomizationIdentifier" - }, - "operation": { - "shape": "UpdateOperation" - }, - "clientToken": { - "shape": "IdempotencyToken" - }, - "dataReference": { - "shape": "DataReference" - }, - "version": { - "shape": "Version" - }, - "includeRepos": { - "shape": "RepositoryList" - } - } - }, - "UpdateCustomizationResponse": { - "type": "structure", - "members": {} - }, - "UpdateOperation": { - "type": "string", - "enum": ["ACTIVATE", "DEACTIVATE", "UPDATE"] - }, - "UpdateProfileRequest": { - "type": "structure", - "required": ["profileArn"], - "members": { - "profileArn": { - "shape": "ProfileArn" - }, - "identitySource": { - "shape": "IdentitySource" - }, - "profileName": { - "shape": "ProfileName" - }, - "description": { - "shape": "ProfileDescription" - }, - "referenceTrackerConfiguration": { - "shape": "ReferenceTrackerConfiguration" - }, - "activeFunctionalities": { - "shape": "ActiveFunctionalityList" - }, - "kmsKeyArn": { - "shape": "ResourceArn" - }, - "resourcePolicy": { - "shape": "ResourcePolicy" - }, - "targetProfileType": { - "shape": "ProfileType" - }, - "optInFeatures": { - "shape": "OptInFeatures" - } - } - }, - "UpdateProfileResponse": { - "type": "structure", - "required": ["profileArn"], - "members": { - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "Url": { - "type": "string", - "max": 1024, - "min": 1 - }, - "ValidationException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "ValidationExceptionReason" - } - }, - "documentation": "

This exception is thrown when the input fails to satisfy the constraints specified by the service.

", - "exception": true - }, - "ValidationExceptionReason": { - "type": "string", - "documentation": "

Reason for ValidationException

", - "enum": ["INVALID_CONVERSATION_ID", "CONTENT_LENGTH_EXCEEDS_THRESHOLD", "INVALID_KMS_GRANT"] - }, - "VendKeyGrantRequest": { - "type": "structure", - "required": ["accountId", "usecase"], - "members": { - "accountId": { - "shape": "AWSAccountId" - }, - "usecase": { - "shape": "VendKeyGrantUseCase" - } - } - }, - "VendKeyGrantResponse": { - "type": "structure", - "members": { - "cmkArn": { - "shape": "ResourceArn" - }, - "grantId": { - "shape": "GrantToken" - }, - "grantToken": { - "shape": "GrantId" - } - } - }, - "VendKeyGrantUseCase": { - "type": "string", - "enum": [ - "TEST", - "WEAVER_BIRD", - "ELASTIC_GUMBY", - "LOCHNESS", - "BOWER_BIRD", - "ELASTIC_GUMBY_V2_JOB", - "ELASTIC_GUMBY_V2_CHAT" - ] - }, - "Version": { - "type": "long", - "box": true - }, - "WorkspaceContext": { - "type": "structure", - "required": ["toggle"], - "members": { - "toggle": { - "shape": "OptInFeatureToggle" - } - } - } - } -} diff --git a/server/aws-lsp-codewhisperer/src/client/token/bearer-token-service.json b/server/aws-lsp-codewhisperer/src/client/token/bearer-token-service.json deleted file mode 100644 index 2120382d25..0000000000 --- a/server/aws-lsp-codewhisperer/src/client/token/bearer-token-service.json +++ /dev/null @@ -1,6571 +0,0 @@ -{ - "version": "2.0", - "metadata": { - "apiVersion": "2022-11-11", - "auth": ["smithy.api#httpBearerAuth"], - "endpointPrefix": "amazoncodewhispererservice", - "jsonVersion": "1.0", - "protocol": "json", - "protocols": ["json"], - "serviceFullName": "Amazon CodeWhisperer", - "serviceId": "CodeWhispererRuntime", - "signingName": "amazoncodewhispererservice", - "targetPrefix": "AmazonCodeWhispererService", - "uid": "codewhispererruntime-2022-11-11" - }, - "operations": { - "CreateArtifactUploadUrl": { - "name": "CreateArtifactUploadUrl", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "CreateUploadUrlRequest" - }, - "output": { - "shape": "CreateUploadUrlResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Creates a pre-signed, S3 write URL for uploading a repository zip archive.

", - "idempotent": true - }, - "CreateSubscriptionToken": { - "name": "CreateSubscriptionToken", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "CreateSubscriptionTokenRequest" - }, - "output": { - "shape": "CreateSubscriptionTokenResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "idempotent": true - }, - "CreateTaskAssistConversation": { - "name": "CreateTaskAssistConversation", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "CreateTaskAssistConversationRequest" - }, - "output": { - "shape": "CreateTaskAssistConversationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ServiceQuotaExceededException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to create task assist conversation.

" - }, - "CreateUploadUrl": { - "name": "CreateUploadUrl", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "CreateUploadUrlRequest" - }, - "output": { - "shape": "CreateUploadUrlResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ServiceQuotaExceededException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Creates a pre-signed, S3 write URL for uploading a repository zip archive.

", - "idempotent": true - }, - "CreateUserMemoryEntry": { - "name": "CreateUserMemoryEntry", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "CreateUserMemoryEntryInput" - }, - "output": { - "shape": "CreateUserMemoryEntryOutput" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ServiceQuotaExceededException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to create a single user memory entry

", - "idempotent": true - }, - "CreateWorkspace": { - "name": "CreateWorkspace", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "CreateWorkspaceRequest" - }, - "output": { - "shape": "CreateWorkspaceResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ServiceQuotaExceededException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Create a workspace based on a workspace root

" - }, - "DeleteTaskAssistConversation": { - "name": "DeleteTaskAssistConversation", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "DeleteTaskAssistConversationRequest" - }, - "output": { - "shape": "DeleteTaskAssistConversationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to delete task assist conversation.

" - }, - "DeleteUserMemoryEntry": { - "name": "DeleteUserMemoryEntry", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "DeleteUserMemoryEntryInput" - }, - "output": { - "shape": "DeleteUserMemoryEntryOutput" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to delete a single user memory entry

", - "idempotent": true - }, - "DeleteWorkspace": { - "name": "DeleteWorkspace", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "DeleteWorkspaceRequest" - }, - "output": { - "shape": "DeleteWorkspaceResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Delete a workspace based on a workspaceId

" - }, - "GenerateCompletions": { - "name": "GenerateCompletions", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GenerateCompletionsRequest" - }, - "output": { - "shape": "GenerateCompletionsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Generate completions based on the provided file context in a paginated response.

" - }, - "GetCodeAnalysis": { - "name": "GetCodeAnalysis", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GetCodeAnalysisRequest" - }, - "output": { - "shape": "GetCodeAnalysisResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Gets the metadata of a code analysis job.

" - }, - "GetCodeFixJob": { - "name": "GetCodeFixJob", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GetCodeFixJobRequest" - }, - "output": { - "shape": "GetCodeFixJobResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ] - }, - "GetTaskAssistCodeGeneration": { - "name": "GetTaskAssistCodeGeneration", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GetTaskAssistCodeGenerationRequest" - }, - "output": { - "shape": "GetTaskAssistCodeGenerationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to get status of task assist code generation.

" - }, - "GetTestGeneration": { - "name": "GetTestGeneration", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GetTestGenerationRequest" - }, - "output": { - "shape": "GetTestGenerationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to get test generation job.

" - }, - "GetTransformation": { - "name": "GetTransformation", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GetTransformationRequest" - }, - "output": { - "shape": "GetTransformationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to get code transformation status.

" - }, - "GetTransformationPlan": { - "name": "GetTransformationPlan", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GetTransformationPlanRequest" - }, - "output": { - "shape": "GetTransformationPlanResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to get code transformation status.

" - }, - "GetUsageLimits": { - "name": "GetUsageLimits", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "GetUsageLimitsRequest" - }, - "output": { - "shape": "GetUsageLimitsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to get current usage limits

" - }, - "ListAvailableCustomizations": { - "name": "ListAvailableCustomizations", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListAvailableCustomizationsRequest" - }, - "output": { - "shape": "ListAvailableCustomizationsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ] - }, - "ListAvailableModels": { - "name": "ListAvailableModels", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListAvailableModelsRequest" - }, - "output": { - "shape": "ListAvailableModelsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ] - }, - "ListAvailableProfiles": { - "name": "ListAvailableProfiles", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListAvailableProfilesRequest" - }, - "output": { - "shape": "ListAvailableProfilesResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ] - }, - "ListCodeAnalysisFindings": { - "name": "ListCodeAnalysisFindings", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListCodeAnalysisFindingsRequest" - }, - "output": { - "shape": "ListCodeAnalysisFindingsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Lists the findings from a particular code analysis job.

" - }, - "ListEvents": { - "name": "ListEvents", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListEventsRequest" - }, - "output": { - "shape": "ListEventsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

List events for agent activity

" - }, - "ListFeatureEvaluations": { - "name": "ListFeatureEvaluations", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListFeatureEvaluationsRequest" - }, - "output": { - "shape": "ListFeatureEvaluationsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Return configruations for each feature that has been setup for A/B testing.

" - }, - "ListUserMemoryEntries": { - "name": "ListUserMemoryEntries", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListUserMemoryEntriesInput" - }, - "output": { - "shape": "ListUserMemoryEntriesOutput" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to list user memories

" - }, - "ListWorkspaceMetadata": { - "name": "ListWorkspaceMetadata", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ListWorkspaceMetadataRequest" - }, - "output": { - "shape": "ListWorkspaceMetadataResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

List workspace metadata based on a workspace root

" - }, - "PushTelemetryEvent": { - "name": "PushTelemetryEvent", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "PushTelemetryEventRequest" - }, - "output": { - "shape": "PushTelemetryEventResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to push telemetry events to CloudWatch, DataHub and EventBridge.

", - "idempotent": true - }, - "ResumeTransformation": { - "name": "ResumeTransformation", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "ResumeTransformationRequest" - }, - "output": { - "shape": "ResumeTransformationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to resume transformation job.

" - }, - "SendTelemetryEvent": { - "name": "SendTelemetryEvent", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "SendTelemetryEventRequest" - }, - "output": { - "shape": "SendTelemetryEventResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to record telemetry events.

", - "idempotent": true - }, - "StartCodeAnalysis": { - "name": "StartCodeAnalysis", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "StartCodeAnalysisRequest" - }, - "output": { - "shape": "StartCodeAnalysisResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

Starts a code analysis job

", - "idempotent": true - }, - "StartCodeFixJob": { - "name": "StartCodeFixJob", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "StartCodeFixJobRequest" - }, - "output": { - "shape": "StartCodeFixJobResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ] - }, - "StartTaskAssistCodeGeneration": { - "name": "StartTaskAssistCodeGeneration", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "StartTaskAssistCodeGenerationRequest" - }, - "output": { - "shape": "StartTaskAssistCodeGenerationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "ServiceQuotaExceededException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to start task assist code generation.

" - }, - "StartTestGeneration": { - "name": "StartTestGeneration", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "StartTestGenerationRequest" - }, - "output": { - "shape": "StartTestGenerationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to start test generation.

", - "idempotent": true - }, - "StartTransformation": { - "name": "StartTransformation", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "StartTransformationRequest" - }, - "output": { - "shape": "StartTransformationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ConflictException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to start code translation.

" - }, - "StopTransformation": { - "name": "StopTransformation", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "StopTransformationRequest" - }, - "output": { - "shape": "StopTransformationResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "ResourceNotFoundException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - } - ], - "documentation": "

API to stop code transformation status.

" - }, - "UpdateUsageLimits": { - "name": "UpdateUsageLimits", - "http": { - "method": "POST", - "requestUri": "/" - }, - "input": { - "shape": "UpdateUsageLimitsRequest" - }, - "output": { - "shape": "UpdateUsageLimitsResponse" - }, - "errors": [ - { - "shape": "ThrottlingException" - }, - { - "shape": "InternalServerException" - }, - { - "shape": "ValidationException" - }, - { - "shape": "AccessDeniedException" - }, - { - "shape": "UpdateUsageLimitQuotaExceededException" - } - ], - "documentation": "

API to update usage limits for enterprise customers

" - } - }, - "shapes": { - "AccessDeniedException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "AccessDeniedExceptionReason" - } - }, - "documentation": "

This exception is thrown when the user does not have sufficient access to perform this action.

", - "exception": true - }, - "AccessDeniedExceptionReason": { - "type": "string", - "documentation": "

Reason for AccessDeniedException

", - "enum": ["UNAUTHORIZED_CUSTOMIZATION_RESOURCE_ACCESS", "UNAUTHORIZED_WORKSPACE_CONTEXT_FEATURE_ACCESS"] - }, - "ActivationToken": { - "type": "string", - "max": 16, - "min": 8 - }, - "ActiveFunctionalityList": { - "type": "list", - "member": { - "shape": "FunctionalityName" - }, - "max": 10, - "min": 0 - }, - "AdditionalContentEntry": { - "type": "structure", - "required": ["name", "description"], - "members": { - "name": { - "shape": "AdditionalContentEntryNameString", - "documentation": "

The name/identifier for this context entry

" - }, - "description": { - "shape": "AdditionalContentEntryDescriptionString", - "documentation": "

A description of what this context entry represents

" - }, - "innerContext": { - "shape": "AdditionalContentEntryInnerContextString", - "documentation": "

The actual contextual content

" - } - }, - "documentation": "

Structure representing a single entry of additional contextual content

" - }, - "AdditionalContentEntryDescriptionString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "AdditionalContentEntryInnerContextString": { - "type": "string", - "max": 8192, - "min": 1, - "sensitive": true - }, - "AdditionalContentEntryNameString": { - "type": "string", - "max": 1024, - "min": 1, - "pattern": "[a-z]+(?:-[a-z0-9]+)*", - "sensitive": true - }, - "AdditionalContentList": { - "type": "list", - "member": { - "shape": "AdditionalContentEntry" - }, - "documentation": "

A list of additional content entries, limited to 20 items

", - "max": 20, - "min": 0 - }, - "AgenticChatEventStatus": { - "type": "string", - "enum": ["SUCCEEDED", "CANCELLED", "FAILED"] - }, - "AppStudioState": { - "type": "structure", - "required": ["namespace", "propertyName", "propertyContext"], - "members": { - "namespace": { - "shape": "AppStudioStateNamespaceString", - "documentation": "

The namespace of the context. Examples: 'ui.Button', 'ui.Table.DataSource', 'ui.Table.RowActions.Button', 'logic.invokeAWS', 'logic.JavaScript'

" - }, - "propertyName": { - "shape": "AppStudioStatePropertyNameString", - "documentation": "

The name of the property. Examples: 'visibility', 'disability', 'value', 'code'

" - }, - "propertyValue": { - "shape": "AppStudioStatePropertyValueString", - "documentation": "

The value of the property.

" - }, - "propertyContext": { - "shape": "AppStudioStatePropertyContextString", - "documentation": "

Context about how the property is used

" - } - }, - "documentation": "

Description of a user's context when they are calling Q Chat from AppStudio

" - }, - "AppStudioStateNamespaceString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "AppStudioStatePropertyContextString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "AppStudioStatePropertyNameString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "AppStudioStatePropertyValueString": { - "type": "string", - "max": 10240, - "min": 0, - "sensitive": true - }, - "ApplicationProperties": { - "type": "structure", - "required": ["tenantId", "applicationArn", "tenantUrl", "applicationType"], - "members": { - "tenantId": { - "shape": "TenantId" - }, - "applicationArn": { - "shape": "ResourceArn" - }, - "tenantUrl": { - "shape": "Url" - }, - "applicationType": { - "shape": "FunctionalityName" - } - } - }, - "ApplicationPropertiesList": { - "type": "list", - "member": { - "shape": "ApplicationProperties" - } - }, - "ArtifactId": { - "type": "string", - "max": 126, - "min": 1, - "pattern": "[a-zA-Z0-9-_]+" - }, - "ArtifactMap": { - "type": "map", - "key": { - "shape": "ArtifactType" - }, - "value": { - "shape": "UploadId" - }, - "max": 64, - "min": 1 - }, - "ArtifactType": { - "type": "string", - "enum": ["SourceCode", "BuiltJars"] - }, - "AssistantResponseMessage": { - "type": "structure", - "required": ["content"], - "members": { - "messageId": { - "shape": "MessageId" - }, - "content": { - "shape": "AssistantResponseMessageContentString", - "documentation": "

The content of the text message in markdown format.

" - }, - "supplementaryWebLinks": { - "shape": "SupplementaryWebLinks", - "documentation": "

Web References

" - }, - "references": { - "shape": "References", - "documentation": "

Code References

" - }, - "followupPrompt": { - "shape": "FollowupPrompt", - "documentation": "

Followup Prompt

" - }, - "toolUses": { - "shape": "ToolUses", - "documentation": "

ToolUse Request

" - } - }, - "documentation": "

Markdown text message.

" - }, - "AssistantResponseMessageContentString": { - "type": "string", - "max": 100000, - "min": 0, - "sensitive": true - }, - "AttributesMap": { - "type": "map", - "key": { - "shape": "AttributesMapKeyString" - }, - "value": { - "shape": "StringList" - }, - "documentation": "

Attributes is a map of key-value pairs

" - }, - "AttributesMapKeyString": { - "type": "string", - "max": 128, - "min": 1 - }, - "Base64EncodedPaginationToken": { - "type": "string", - "max": 2048, - "min": 1, - "pattern": "(?:[A-Za-z0-9\\+/]{4})*(?:[A-Za-z0-9\\+/]{2}\\=\\=|[A-Za-z0-9\\+/]{3}\\=)?" - }, - "Boolean": { - "type": "boolean", - "box": true - }, - "ByUserAnalytics": { - "type": "structure", - "required": ["toggle"], - "members": { - "s3Uri": { - "shape": "S3Uri" - }, - "toggle": { - "shape": "OptInFeatureToggle" - } - } - }, - "ChangeLogGranularityType": { - "type": "string", - "enum": ["STANDARD", "BUSINESS"] - }, - "ChangeLogOptions": { - "type": "structure", - "required": ["granularity"], - "members": { - "granularity": { - "shape": "ChangeLogGranularityType" - } - } - }, - "ChatAddMessageEvent": { - "type": "structure", - "required": ["conversationId", "messageId"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "messageId": { - "shape": "MessageId" - }, - "customizationArn": { - "shape": "CustomizationArn" - }, - "userIntent": { - "shape": "UserIntent" - }, - "hasCodeSnippet": { - "shape": "Boolean" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "activeEditorTotalCharacters": { - "shape": "Integer" - }, - "timeToFirstChunkMilliseconds": { - "shape": "Double" - }, - "timeBetweenChunks": { - "shape": "timeBetweenChunks" - }, - "fullResponselatency": { - "shape": "Double" - }, - "requestLength": { - "shape": "Integer" - }, - "responseLength": { - "shape": "Integer" - }, - "numberOfCodeBlocks": { - "shape": "Integer" - }, - "hasProjectLevelContext": { - "shape": "Boolean" - }, - "result": { - "shape": "AgenticChatEventStatus" - } - } - }, - "ChatHistory": { - "type": "list", - "member": { - "shape": "ChatMessage" - }, - "documentation": "

Indicates Participant in Chat conversation

", - "max": 250, - "min": 0 - }, - "ChatInteractWithMessageEvent": { - "type": "structure", - "required": ["conversationId", "messageId"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "messageId": { - "shape": "MessageId" - }, - "customizationArn": { - "shape": "CustomizationArn" - }, - "interactionType": { - "shape": "ChatMessageInteractionType" - }, - "interactionTarget": { - "shape": "ChatInteractWithMessageEventInteractionTargetString" - }, - "acceptedCharacterCount": { - "shape": "Integer" - }, - "acceptedLineCount": { - "shape": "Integer" - }, - "acceptedSnippetHasReference": { - "shape": "Boolean" - }, - "hasProjectLevelContext": { - "shape": "Boolean" - }, - "userIntent": { - "shape": "UserIntent" - }, - "addedIdeDiagnostics": { - "shape": "IdeDiagnosticList" - }, - "removedIdeDiagnostics": { - "shape": "IdeDiagnosticList" - } - } - }, - "ChatInteractWithMessageEventInteractionTargetString": { - "type": "string", - "max": 1024, - "min": 1 - }, - "ChatMessage": { - "type": "structure", - "members": { - "userInputMessage": { - "shape": "UserInputMessage" - }, - "assistantResponseMessage": { - "shape": "AssistantResponseMessage" - } - }, - "union": true - }, - "ChatMessageInteractionType": { - "type": "string", - "documentation": "

Chat Message Interaction Type

", - "enum": [ - "INSERT_AT_CURSOR", - "COPY_SNIPPET", - "COPY", - "CLICK_LINK", - "CLICK_BODY_LINK", - "CLICK_FOLLOW_UP", - "HOVER_REFERENCE", - "UPVOTE", - "DOWNVOTE" - ] - }, - "ChatTriggerType": { - "type": "string", - "documentation": "

Trigger Reason for Chat

", - "enum": ["MANUAL", "DIAGNOSTIC", "INLINE_CHAT"] - }, - "ChatUserModificationEvent": { - "type": "structure", - "required": ["conversationId", "messageId", "modificationPercentage"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "customizationArn": { - "shape": "CustomizationArn" - }, - "messageId": { - "shape": "MessageId" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "modificationPercentage": { - "shape": "Double" - }, - "hasProjectLevelContext": { - "shape": "Boolean" - } - } - }, - "ClientId": { - "type": "string", - "max": 255, - "min": 1 - }, - "CodeAnalysisFindingsSchema": { - "type": "string", - "enum": ["codeanalysis/findings/1.0"] - }, - "CodeAnalysisScope": { - "type": "string", - "enum": ["FILE", "PROJECT", "AGENTIC"] - }, - "CodeAnalysisStatus": { - "type": "string", - "enum": ["Completed", "Pending", "Failed"] - }, - "CodeAnalysisUploadContext": { - "type": "structure", - "required": ["codeScanName"], - "members": { - "codeScanName": { - "shape": "CodeScanName" - } - } - }, - "CodeCoverageEvent": { - "type": "structure", - "required": ["programmingLanguage", "acceptedCharacterCount", "totalCharacterCount", "timestamp"], - "members": { - "customizationArn": { - "shape": "CustomizationArn" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "acceptedCharacterCount": { - "shape": "PrimitiveInteger" - }, - "totalCharacterCount": { - "shape": "PrimitiveInteger" - }, - "timestamp": { - "shape": "Timestamp" - }, - "unmodifiedAcceptedCharacterCount": { - "shape": "PrimitiveInteger" - }, - "totalNewCodeCharacterCount": { - "shape": "PrimitiveInteger" - }, - "totalNewCodeLineCount": { - "shape": "PrimitiveInteger" - }, - "userWrittenCodeCharacterCount": { - "shape": "CodeCoverageEventUserWrittenCodeCharacterCountInteger" - }, - "userWrittenCodeLineCount": { - "shape": "CodeCoverageEventUserWrittenCodeLineCountInteger" - }, - "addedCharacterCount": { - "shape": "CodeCoverageEventAddedCharacterCountInteger" - } - } - }, - "CodeCoverageEventAddedCharacterCountInteger": { - "type": "integer", - "min": 0 - }, - "CodeCoverageEventUserWrittenCodeCharacterCountInteger": { - "type": "integer", - "min": 0 - }, - "CodeCoverageEventUserWrittenCodeLineCountInteger": { - "type": "integer", - "min": 0 - }, - "CodeDescription": { - "type": "structure", - "required": ["href"], - "members": { - "href": { - "shape": "CodeDescriptionHrefString", - "documentation": "

An URI to open with more information about the diagnostic error.

" - } - }, - "documentation": "

Structure to capture a description for an error code.

" - }, - "CodeDescriptionHrefString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "CodeDiffMetadata": { - "type": "structure", - "members": { - "codeDiffPath": { - "shape": "CodeDiffPath" - } - } - }, - "CodeDiffPath": { - "type": "string", - "max": 1024, - "min": 0, - "pattern": "/[\\S]+/" - }, - "CodeFixAcceptanceEvent": { - "type": "structure", - "required": ["jobId"], - "members": { - "jobId": { - "shape": "String" - }, - "ruleId": { - "shape": "String" - }, - "detectorId": { - "shape": "String" - }, - "findingId": { - "shape": "String" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "linesOfCodeAccepted": { - "shape": "Integer" - }, - "charsOfCodeAccepted": { - "shape": "Integer" - } - } - }, - "CodeFixGenerationEvent": { - "type": "structure", - "required": ["jobId"], - "members": { - "jobId": { - "shape": "String" - }, - "ruleId": { - "shape": "String" - }, - "detectorId": { - "shape": "String" - }, - "findingId": { - "shape": "String" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "linesOfCodeGenerated": { - "shape": "Integer" - }, - "charsOfCodeGenerated": { - "shape": "Integer" - } - } - }, - "CodeFixJobStatus": { - "type": "string", - "enum": ["Succeeded", "InProgress", "Failed"] - }, - "CodeFixName": { - "type": "string", - "documentation": "

Code fix name

", - "max": 128, - "min": 1, - "pattern": "[a-zA-Z0-9-_$:.]*" - }, - "CodeFixUploadContext": { - "type": "structure", - "required": ["codeFixName"], - "members": { - "codeFixName": { - "shape": "CodeFixName" - } - } - }, - "CodeGenerationId": { - "type": "string", - "documentation": "

ID which represents a single code generation in a conversation

", - "max": 128, - "min": 1 - }, - "CodeGenerationStatus": { - "type": "structure", - "required": ["status", "currentStage"], - "members": { - "status": { - "shape": "CodeGenerationWorkflowStatus" - }, - "currentStage": { - "shape": "CodeGenerationWorkflowStage" - } - } - }, - "CodeGenerationStatusDetail": { - "type": "string", - "documentation": "

Detailed message about the code generation status

", - "sensitive": true - }, - "CodeGenerationWorkflowStage": { - "type": "string", - "enum": ["InitialCodeGeneration", "CodeRefinement"] - }, - "CodeGenerationWorkflowStatus": { - "type": "string", - "enum": ["InProgress", "Complete", "Failed"] - }, - "CodeScanEvent": { - "type": "structure", - "required": ["programmingLanguage", "codeScanJobId", "timestamp"], - "members": { - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "codeScanJobId": { - "shape": "CodeScanJobId" - }, - "timestamp": { - "shape": "Timestamp" - }, - "codeAnalysisScope": { - "shape": "CodeAnalysisScope" - } - }, - "documentation": "

Published when a security scan or code review starts

" - }, - "CodeScanFailedEvent": { - "type": "structure", - "required": ["programmingLanguage", "codeScanJobId", "timestamp"], - "members": { - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "codeScanJobId": { - "shape": "CodeScanJobId" - }, - "timestamp": { - "shape": "Timestamp" - }, - "codeAnalysisScope": { - "shape": "CodeAnalysisScope" - } - }, - "documentation": "

Published when a security scan or code review fails

" - }, - "CodeScanJobId": { - "type": "string", - "max": 128, - "min": 1 - }, - "CodeScanName": { - "type": "string", - "documentation": "

Code analysis scan name

", - "max": 128, - "min": 1 - }, - "CodeScanRemediationsEvent": { - "type": "structure", - "members": { - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "CodeScanRemediationsEventType": { - "shape": "CodeScanRemediationsEventType" - }, - "timestamp": { - "shape": "Timestamp" - }, - "detectorId": { - "shape": "String" - }, - "findingId": { - "shape": "String" - }, - "ruleId": { - "shape": "String" - }, - "component": { - "shape": "String" - }, - "reason": { - "shape": "String" - }, - "result": { - "shape": "String" - }, - "includesFix": { - "shape": "Boolean" - } - } - }, - "CodeScanRemediationsEventType": { - "type": "string", - "documentation": "

Code Scan Remediations Interaction Type

", - "enum": ["CODESCAN_ISSUE_HOVER", "CODESCAN_ISSUE_APPLY_FIX", "CODESCAN_ISSUE_VIEW_DETAILS"] - }, - "CodeScanSucceededEvent": { - "type": "structure", - "required": ["programmingLanguage", "codeScanJobId", "timestamp", "numberOfFindings"], - "members": { - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "codeScanJobId": { - "shape": "CodeScanJobId" - }, - "timestamp": { - "shape": "Timestamp" - }, - "numberOfFindings": { - "shape": "PrimitiveInteger" - }, - "codeAnalysisScope": { - "shape": "CodeAnalysisScope" - } - }, - "documentation": "

Published when a security scan or code review completes successfully

" - }, - "Completion": { - "type": "structure", - "required": ["content"], - "members": { - "content": { - "shape": "CompletionContentString" - }, - "references": { - "shape": "References" - }, - "mostRelevantMissingImports": { - "shape": "Imports" - } - } - }, - "CompletionContentString": { - "type": "string", - "max": 5120, - "min": 1, - "sensitive": true - }, - "CompletionType": { - "type": "string", - "enum": ["BLOCK", "LINE"] - }, - "Completions": { - "type": "list", - "member": { - "shape": "Completion" - }, - "max": 10, - "min": 0 - }, - "ConflictException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "ConflictExceptionReason" - } - }, - "documentation": "

This exception is thrown when the action to perform could not be completed because the resource is in a conflicting state.

", - "exception": true - }, - "ConflictExceptionReason": { - "type": "string", - "documentation": "

Reason for ConflictException

", - "enum": ["CUSTOMER_KMS_KEY_INVALID_KEY_POLICY", "CUSTOMER_KMS_KEY_DISABLED", "MISMATCHED_KMS_KEY"] - }, - "ConsoleState": { - "type": "structure", - "members": { - "region": { - "shape": "String" - }, - "consoleUrl": { - "shape": "SensitiveString" - }, - "serviceId": { - "shape": "String" - }, - "serviceConsolePage": { - "shape": "String" - }, - "serviceSubconsolePage": { - "shape": "String" - }, - "taskName": { - "shape": "SensitiveString" - } - }, - "documentation": "

Information about the state of the AWS management console page from which the user is calling

" - }, - "ContentChecksumType": { - "type": "string", - "enum": ["SHA_256"] - }, - "ContentType": { - "type": "string", - "documentation": "

The type of content

", - "enum": ["FILE", "PROMPT", "CODE", "WORKSPACE"] - }, - "ContextTruncationScheme": { - "type": "string", - "documentation": "

Workspace context truncation schemes based on usecase

", - "enum": ["ANALYSIS", "GUMBY"] - }, - "ConversationId": { - "type": "string", - "documentation": "

ID which represents a multi-turn conversation

", - "max": 128, - "min": 1 - }, - "ConversationState": { - "type": "structure", - "required": ["currentMessage", "chatTriggerType"], - "members": { - "conversationId": { - "shape": "ConversationId", - "documentation": "

Unique identifier for the chat conversation stream

" - }, - "workspaceId": { - "shape": "UUID", - "documentation": "

Unique identifier for remote workspace

" - }, - "history": { - "shape": "ChatHistory", - "documentation": "

Holds the history of chat messages.

" - }, - "currentMessage": { - "shape": "ChatMessage", - "documentation": "

Holds the current message being processed or displayed.

" - }, - "chatTriggerType": { - "shape": "ChatTriggerType", - "documentation": "

Trigger Reason for Chat

" - }, - "customizationArn": { - "shape": "ResourceArn" - } - }, - "documentation": "

Structure to represent the current state of a chat conversation.

" - }, - "CreateSubscriptionTokenRequest": { - "type": "structure", - "members": { - "clientToken": { - "shape": "IdempotencyToken", - "idempotencyToken": true - }, - "statusOnly": { - "shape": "Boolean" - } - } - }, - "CreateSubscriptionTokenResponse": { - "type": "structure", - "required": ["status"], - "members": { - "encodedVerificationUrl": { - "shape": "EncodedVerificationUrl" - }, - "token": { - "shape": "ActivationToken" - }, - "status": { - "shape": "SubscriptionStatus" - } - } - }, - "CreateTaskAssistConversationRequest": { - "type": "structure", - "members": { - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Structure to represent bootstrap conversation request.

" - }, - "CreateTaskAssistConversationResponse": { - "type": "structure", - "required": ["conversationId"], - "members": { - "conversationId": { - "shape": "ConversationId" - } - }, - "documentation": "

Structure to represent bootstrap conversation response.

" - }, - "CreateUploadUrlRequest": { - "type": "structure", - "members": { - "contentMd5": { - "shape": "CreateUploadUrlRequestContentMd5String" - }, - "contentChecksum": { - "shape": "CreateUploadUrlRequestContentChecksumString" - }, - "contentChecksumType": { - "shape": "ContentChecksumType" - }, - "contentLength": { - "shape": "CreateUploadUrlRequestContentLengthLong" - }, - "artifactType": { - "shape": "ArtifactType" - }, - "uploadIntent": { - "shape": "UploadIntent" - }, - "uploadContext": { - "shape": "UploadContext" - }, - "uploadId": { - "shape": "UploadId" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "CreateUploadUrlRequestContentChecksumString": { - "type": "string", - "max": 512, - "min": 1, - "sensitive": true - }, - "CreateUploadUrlRequestContentLengthLong": { - "type": "long", - "box": true, - "min": 1 - }, - "CreateUploadUrlRequestContentMd5String": { - "type": "string", - "max": 128, - "min": 1, - "sensitive": true - }, - "CreateUploadUrlResponse": { - "type": "structure", - "required": ["uploadId", "uploadUrl"], - "members": { - "uploadId": { - "shape": "UploadId" - }, - "uploadUrl": { - "shape": "PreSignedUrl" - }, - "kmsKeyArn": { - "shape": "ResourceArn" - }, - "requestHeaders": { - "shape": "RequestHeaders" - } - } - }, - "CreateUserMemoryEntryInput": { - "type": "structure", - "required": ["memoryEntryString", "origin"], - "members": { - "memoryEntryString": { - "shape": "CreateUserMemoryEntryInputMemoryEntryStringString" - }, - "origin": { - "shape": "Origin" - }, - "profileArn": { - "shape": "CreateUserMemoryEntryInputProfileArnString", - "documentation": "

ProfileArn for the managing Q Profile

" - }, - "clientToken": { - "shape": "IdempotencyToken", - "idempotencyToken": true - } - } - }, - "CreateUserMemoryEntryInputMemoryEntryStringString": { - "type": "string", - "max": 500, - "min": 1, - "sensitive": true - }, - "CreateUserMemoryEntryInputProfileArnString": { - "type": "string", - "min": 1, - "pattern": "arn:aws:(codewhisperer|transform):[-.a-z0-9]{1,63}:\\d{12}:profile/([a-zA-Z0-9]){12}" - }, - "CreateUserMemoryEntryOutput": { - "type": "structure", - "required": ["memoryEntry"], - "members": { - "memoryEntry": { - "shape": "MemoryEntry" - } - } - }, - "CreateWorkspaceRequest": { - "type": "structure", - "required": ["workspaceRoot"], - "members": { - "workspaceRoot": { - "shape": "CreateWorkspaceRequestWorkspaceRootString" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "CreateWorkspaceRequestWorkspaceRootString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "CreateWorkspaceResponse": { - "type": "structure", - "required": ["workspace"], - "members": { - "workspace": { - "shape": "WorkspaceMetadata" - } - } - }, - "CursorState": { - "type": "structure", - "members": { - "position": { - "shape": "Position", - "documentation": "

Represents a cursor position in a Text Document

" - }, - "range": { - "shape": "Range", - "documentation": "

Represents a text selection in a Text Document

" - } - }, - "documentation": "

Represents the state of the Cursor in an Editor

", - "union": true - }, - "Customization": { - "type": "structure", - "required": ["arn"], - "members": { - "arn": { - "shape": "CustomizationArn" - }, - "name": { - "shape": "CustomizationName" - }, - "description": { - "shape": "Description" - }, - "modelId": { - "shape": "ModelId" - } - } - }, - "CustomizationArn": { - "type": "string", - "max": 950, - "min": 0, - "pattern": "arn:[-.a-z0-9]{1,63}:codewhisperer:([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}" - }, - "CustomizationName": { - "type": "string", - "max": 100, - "min": 1, - "pattern": "[a-zA-Z][a-zA-Z0-9_-]*" - }, - "Customizations": { - "type": "list", - "member": { - "shape": "Customization" - } - }, - "DashboardAnalytics": { - "type": "structure", - "required": ["toggle"], - "members": { - "toggle": { - "shape": "OptInFeatureToggle" - } - } - }, - "DeleteTaskAssistConversationRequest": { - "type": "structure", - "required": ["conversationId"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Structure to represent bootstrap conversation request.

" - }, - "DeleteTaskAssistConversationResponse": { - "type": "structure", - "required": ["conversationId"], - "members": { - "conversationId": { - "shape": "ConversationId" - } - }, - "documentation": "

Structure to represent bootstrap conversation response.

" - }, - "DeleteUserMemoryEntryInput": { - "type": "structure", - "required": ["id"], - "members": { - "id": { - "shape": "DeleteUserMemoryEntryInputIdString" - }, - "profileArn": { - "shape": "DeleteUserMemoryEntryInputProfileArnString", - "documentation": "

ProfileArn for the managing Q Profile

" - } - } - }, - "DeleteUserMemoryEntryInputIdString": { - "type": "string", - "max": 36, - "min": 36, - "pattern": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" - }, - "DeleteUserMemoryEntryInputProfileArnString": { - "type": "string", - "min": 1, - "pattern": "arn:aws:(codewhisperer|transform):[-.a-z0-9]{1,63}:\\d{12}:profile/([a-zA-Z0-9]){12}" - }, - "DeleteUserMemoryEntryOutput": { - "type": "structure", - "members": {} - }, - "DeleteWorkspaceRequest": { - "type": "structure", - "required": ["workspaceId"], - "members": { - "workspaceId": { - "shape": "UUID" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "DeleteWorkspaceResponse": { - "type": "structure", - "members": {} - }, - "Description": { - "type": "string", - "max": 256, - "min": 0, - "pattern": "[\\sa-zA-Z0-9_-]*" - }, - "Diagnostic": { - "type": "structure", - "members": { - "textDocumentDiagnostic": { - "shape": "TextDocumentDiagnostic", - "documentation": "

Diagnostics originating from a TextDocument

" - }, - "runtimeDiagnostic": { - "shape": "RuntimeDiagnostic", - "documentation": "

Diagnostics originating from a Runtime

" - } - }, - "documentation": "

Represents a Diagnostic message

", - "union": true - }, - "DiagnosticLocation": { - "type": "structure", - "required": ["uri", "range"], - "members": { - "uri": { - "shape": "DiagnosticLocationUriString" - }, - "range": { - "shape": "Range" - } - }, - "documentation": "

Represents a location inside a resource, such as a line inside a text file.

" - }, - "DiagnosticLocationUriString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "DiagnosticRelatedInformation": { - "type": "structure", - "required": ["location", "message"], - "members": { - "location": { - "shape": "DiagnosticLocation", - "documentation": "

The location of this related diagnostic information.

" - }, - "message": { - "shape": "DiagnosticRelatedInformationMessageString", - "documentation": "

The message of this related diagnostic information.

" - } - }, - "documentation": "

Represents a related message and source code location for a diagnostic.

" - }, - "DiagnosticRelatedInformationList": { - "type": "list", - "member": { - "shape": "DiagnosticRelatedInformation" - }, - "documentation": "

List of DiagnosticRelatedInformation

", - "max": 1024, - "min": 0 - }, - "DiagnosticRelatedInformationMessageString": { - "type": "string", - "max": 1024, - "min": 0, - "sensitive": true - }, - "DiagnosticSeverity": { - "type": "string", - "documentation": "

Diagnostic Error types

", - "enum": ["ERROR", "WARNING", "INFORMATION", "HINT"] - }, - "DiagnosticTag": { - "type": "string", - "documentation": "

The diagnostic tags.

", - "enum": ["UNNECESSARY", "DEPRECATED"] - }, - "DiagnosticTagList": { - "type": "list", - "member": { - "shape": "DiagnosticTag" - }, - "documentation": "

List of DiagnosticTag

", - "max": 1024, - "min": 0 - }, - "Dimension": { - "type": "structure", - "members": { - "name": { - "shape": "DimensionNameString" - }, - "value": { - "shape": "DimensionValueString" - } - } - }, - "DimensionList": { - "type": "list", - "member": { - "shape": "Dimension" - }, - "max": 30, - "min": 0 - }, - "DimensionNameString": { - "type": "string", - "max": 255, - "min": 1, - "pattern": "[-a-zA-Z0-9._]*" - }, - "DimensionValueString": { - "type": "string", - "max": 1024, - "min": 1, - "pattern": "[-a-zA-Z0-9._]*" - }, - "DocFolderLevel": { - "type": "string", - "documentation": "

Specifies the folder depth level where the document should be generated

", - "enum": ["SUB_FOLDER", "ENTIRE_WORKSPACE"] - }, - "DocGenerationEvent": { - "type": "structure", - "required": ["conversationId"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "numberOfAddChars": { - "shape": "PrimitiveInteger" - }, - "numberOfAddLines": { - "shape": "PrimitiveInteger" - }, - "numberOfAddFiles": { - "shape": "PrimitiveInteger" - }, - "userDecision": { - "shape": "DocUserDecision" - }, - "interactionType": { - "shape": "DocInteractionType" - }, - "userIdentity": { - "shape": "String" - }, - "numberOfNavigation": { - "shape": "PrimitiveInteger" - }, - "folderLevel": { - "shape": "DocFolderLevel" - } - }, - "documentation": "

Deprecated: use DocV2AcceptanceEvent for tracking acceptance and DocV2GenerationEvent for tracking generation

" - }, - "DocInteractionType": { - "type": "string", - "documentation": "

Tracks whether user chose to generate a new document, update an existing one, or edit document

", - "enum": ["GENERATE_README", "UPDATE_README", "EDIT_README"] - }, - "DocUserDecision": { - "type": "string", - "enum": ["ACCEPT", "REJECT"] - }, - "DocV2AcceptanceEvent": { - "type": "structure", - "required": [ - "conversationId", - "numberOfAddedChars", - "numberOfAddedLines", - "numberOfAddedFiles", - "userDecision", - "interactionType", - "numberOfNavigations", - "folderLevel" - ], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "numberOfAddedChars": { - "shape": "DocV2AcceptanceEventNumberOfAddedCharsInteger" - }, - "numberOfAddedLines": { - "shape": "DocV2AcceptanceEventNumberOfAddedLinesInteger" - }, - "numberOfAddedFiles": { - "shape": "DocV2AcceptanceEventNumberOfAddedFilesInteger" - }, - "userDecision": { - "shape": "DocUserDecision" - }, - "interactionType": { - "shape": "DocInteractionType" - }, - "numberOfNavigations": { - "shape": "DocV2AcceptanceEventNumberOfNavigationsInteger" - }, - "folderLevel": { - "shape": "DocFolderLevel" - } - }, - "documentation": "

Interaction event for /doc, emitted when user accepts or rejects the generated content

" - }, - "DocV2AcceptanceEventNumberOfAddedCharsInteger": { - "type": "integer", - "min": 0 - }, - "DocV2AcceptanceEventNumberOfAddedFilesInteger": { - "type": "integer", - "min": 0 - }, - "DocV2AcceptanceEventNumberOfAddedLinesInteger": { - "type": "integer", - "min": 0 - }, - "DocV2AcceptanceEventNumberOfNavigationsInteger": { - "type": "integer", - "min": 0 - }, - "DocV2GenerationEvent": { - "type": "structure", - "required": [ - "conversationId", - "numberOfGeneratedChars", - "numberOfGeneratedLines", - "numberOfGeneratedFiles" - ], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "numberOfGeneratedChars": { - "shape": "DocV2GenerationEventNumberOfGeneratedCharsInteger" - }, - "numberOfGeneratedLines": { - "shape": "DocV2GenerationEventNumberOfGeneratedLinesInteger" - }, - "numberOfGeneratedFiles": { - "shape": "DocV2GenerationEventNumberOfGeneratedFilesInteger" - }, - "interactionType": { - "shape": "DocInteractionType" - }, - "numberOfNavigations": { - "shape": "DocV2GenerationEventNumberOfNavigationsInteger" - }, - "folderLevel": { - "shape": "DocFolderLevel" - } - }, - "documentation": "

Generation event for /doc, emitted when user requests document generation

" - }, - "DocV2GenerationEventNumberOfGeneratedCharsInteger": { - "type": "integer", - "min": 0 - }, - "DocV2GenerationEventNumberOfGeneratedFilesInteger": { - "type": "integer", - "min": 0 - }, - "DocV2GenerationEventNumberOfGeneratedLinesInteger": { - "type": "integer", - "min": 0 - }, - "DocV2GenerationEventNumberOfNavigationsInteger": { - "type": "integer", - "min": 0 - }, - "Document": { - "type": "structure", - "members": {}, - "document": true - }, - "DocumentSymbol": { - "type": "structure", - "required": ["name", "type"], - "members": { - "name": { - "shape": "DocumentSymbolNameString", - "documentation": "

Name of the Document Symbol

" - }, - "type": { - "shape": "SymbolType", - "documentation": "

Symbol type - DECLARATION / USAGE

" - }, - "source": { - "shape": "DocumentSymbolSourceString", - "documentation": "

Symbol package / source for FullyQualified names

" - } - } - }, - "DocumentSymbolNameString": { - "type": "string", - "max": 256, - "min": 1 - }, - "DocumentSymbolSourceString": { - "type": "string", - "max": 256, - "min": 1 - }, - "DocumentSymbols": { - "type": "list", - "member": { - "shape": "DocumentSymbol" - }, - "max": 1000, - "min": 0 - }, - "DocumentationIntentContext": { - "type": "structure", - "required": ["type"], - "members": { - "scope": { - "shape": "DocumentationIntentContextScopeString" - }, - "type": { - "shape": "DocumentationType" - }, - "changeLogOptions": { - "shape": "ChangeLogOptions" - } - } - }, - "DocumentationIntentContextScopeString": { - "type": "string", - "max": 4096, - "min": 1, - "sensitive": true - }, - "DocumentationType": { - "type": "string", - "enum": ["README", "CHANGE_LOG"] - }, - "Double": { - "type": "double", - "box": true - }, - "Edit": { - "type": "structure", - "required": ["content"], - "members": { - "content": { - "shape": "EditContentString" - }, - "references": { - "shape": "References" - } - } - }, - "EditContentString": { - "type": "string", - "max": 5120, - "min": 1, - "sensitive": true - }, - "EditorState": { - "type": "structure", - "members": { - "document": { - "shape": "TextDocument", - "documentation": "

Represents currently edited file

" - }, - "cursorState": { - "shape": "CursorState", - "documentation": "

Position of the cursor

" - }, - "relevantDocuments": { - "shape": "RelevantDocumentList", - "documentation": "

Represents IDE provided relevant files

" - }, - "useRelevantDocuments": { - "shape": "Boolean", - "documentation": "

Whether service should use relevant document in prompt

" - }, - "workspaceFolders": { - "shape": "WorkspaceFolderList", - "documentation": "

Represents IDE provided list of workspace folders

" - } - }, - "documentation": "

Represents the state of an Editor

" - }, - "EncodedVerificationUrl": { - "type": "string", - "max": 8192, - "min": 1 - }, - "EnvState": { - "type": "structure", - "members": { - "operatingSystem": { - "shape": "EnvStateOperatingSystemString", - "documentation": "

The name of the operating system in use

" - }, - "currentWorkingDirectory": { - "shape": "EnvStateCurrentWorkingDirectoryString", - "documentation": "

The current working directory of the environment

" - }, - "environmentVariables": { - "shape": "EnvironmentVariables", - "documentation": "

The environment variables set in the current environment

" - }, - "timezoneOffset": { - "shape": "EnvStateTimezoneOffsetInteger", - "documentation": "

Local timezone offset of the client. For more information, see documentation https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset

" - } - }, - "documentation": "

State related to the user's environment

" - }, - "EnvStateCurrentWorkingDirectoryString": { - "type": "string", - "max": 256, - "min": 1, - "sensitive": true - }, - "EnvStateOperatingSystemString": { - "type": "string", - "max": 32, - "min": 1, - "pattern": "(macos|linux|windows)" - }, - "EnvStateTimezoneOffsetInteger": { - "type": "integer", - "box": true, - "max": 1440, - "min": -1440 - }, - "EnvironmentVariable": { - "type": "structure", - "members": { - "key": { - "shape": "EnvironmentVariableKeyString", - "documentation": "

The key of an environment variable

" - }, - "value": { - "shape": "EnvironmentVariableValueString", - "documentation": "

The value of an environment variable

" - } - }, - "documentation": "

An environment variable

" - }, - "EnvironmentVariableKeyString": { - "type": "string", - "max": 256, - "min": 1, - "sensitive": true - }, - "EnvironmentVariableValueString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "EnvironmentVariables": { - "type": "list", - "member": { - "shape": "EnvironmentVariable" - }, - "documentation": "

A list of environment variables

", - "max": 100, - "min": 0 - }, - "ErrorDetails": { - "type": "string", - "max": 2048, - "min": 0 - }, - "Event": { - "type": "structure", - "required": ["eventId", "generationId", "eventTimestamp", "eventType", "eventBlob"], - "members": { - "eventId": { - "shape": "UUID" - }, - "generationId": { - "shape": "UUID" - }, - "eventTimestamp": { - "shape": "SyntheticTimestamp_date_time" - }, - "eventType": { - "shape": "EventType" - }, - "eventBlob": { - "shape": "EventBlob" - } - } - }, - "EventBlob": { - "type": "blob", - "max": 400000, - "min": 1, - "sensitive": true - }, - "EventList": { - "type": "list", - "member": { - "shape": "Event" - }, - "max": 10, - "min": 1 - }, - "EventType": { - "type": "string", - "max": 100, - "min": 1 - }, - "ExternalIdentityDetails": { - "type": "structure", - "members": { - "issuerUrl": { - "shape": "IssuerUrl" - }, - "clientId": { - "shape": "ClientId" - }, - "scimEndpoint": { - "shape": "String" - } - } - }, - "FeatureDevCodeAcceptanceEvent": { - "type": "structure", - "required": ["conversationId", "linesOfCodeAccepted", "charactersOfCodeAccepted"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "linesOfCodeAccepted": { - "shape": "FeatureDevCodeAcceptanceEventLinesOfCodeAcceptedInteger" - }, - "charactersOfCodeAccepted": { - "shape": "FeatureDevCodeAcceptanceEventCharactersOfCodeAcceptedInteger" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - } - } - }, - "FeatureDevCodeAcceptanceEventCharactersOfCodeAcceptedInteger": { - "type": "integer", - "min": 0 - }, - "FeatureDevCodeAcceptanceEventLinesOfCodeAcceptedInteger": { - "type": "integer", - "min": 0 - }, - "FeatureDevCodeGenerationEvent": { - "type": "structure", - "required": ["conversationId", "linesOfCodeGenerated", "charactersOfCodeGenerated"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "linesOfCodeGenerated": { - "shape": "FeatureDevCodeGenerationEventLinesOfCodeGeneratedInteger" - }, - "charactersOfCodeGenerated": { - "shape": "FeatureDevCodeGenerationEventCharactersOfCodeGeneratedInteger" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - } - } - }, - "FeatureDevCodeGenerationEventCharactersOfCodeGeneratedInteger": { - "type": "integer", - "min": 0 - }, - "FeatureDevCodeGenerationEventLinesOfCodeGeneratedInteger": { - "type": "integer", - "min": 0 - }, - "FeatureDevEvent": { - "type": "structure", - "required": ["conversationId"], - "members": { - "conversationId": { - "shape": "ConversationId" - } - } - }, - "FeatureEvaluation": { - "type": "structure", - "required": ["feature", "variation", "value"], - "members": { - "feature": { - "shape": "FeatureName" - }, - "variation": { - "shape": "FeatureVariation" - }, - "value": { - "shape": "FeatureValue" - } - } - }, - "FeatureEvaluationsList": { - "type": "list", - "member": { - "shape": "FeatureEvaluation" - }, - "max": 50, - "min": 0 - }, - "FeatureName": { - "type": "string", - "max": 128, - "min": 1, - "pattern": "[-a-zA-Z0-9._]*" - }, - "FeatureValue": { - "type": "structure", - "members": { - "boolValue": { - "shape": "Boolean" - }, - "doubleValue": { - "shape": "Double" - }, - "longValue": { - "shape": "Long" - }, - "stringValue": { - "shape": "FeatureValueStringType" - } - }, - "union": true - }, - "FeatureValueStringType": { - "type": "string", - "max": 512, - "min": 0 - }, - "FeatureVariation": { - "type": "string", - "max": 128, - "min": 1, - "pattern": "[-a-zA-Z0-9._]*" - }, - "FileContext": { - "type": "structure", - "required": ["leftFileContent", "rightFileContent", "filename", "programmingLanguage"], - "members": { - "leftFileContent": { - "shape": "FileContextLeftFileContentString" - }, - "rightFileContent": { - "shape": "FileContextRightFileContentString" - }, - "filename": { - "shape": "FileContextFilenameString" - }, - "fileUri": { - "shape": "FileContextFileUriString" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - } - } - }, - "FileContextFileUriString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "FileContextFilenameString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "FileContextLeftFileContentString": { - "type": "string", - "max": 10240, - "min": 0, - "sensitive": true - }, - "FileContextRightFileContentString": { - "type": "string", - "max": 10240, - "min": 0, - "sensitive": true - }, - "FollowupPrompt": { - "type": "structure", - "required": ["content"], - "members": { - "content": { - "shape": "FollowupPromptContentString", - "documentation": "

The content of the text message in markdown format.

" - }, - "userIntent": { - "shape": "UserIntent", - "documentation": "

User Intent

" - } - }, - "documentation": "

Followup Prompt for the Assistant Response

" - }, - "FollowupPromptContentString": { - "type": "string", - "max": 4096, - "min": 0, - "sensitive": true - }, - "FunctionalityName": { - "type": "string", - "enum": [ - "COMPLETIONS", - "ANALYSIS", - "CONVERSATIONS", - "TASK_ASSIST", - "TRANSFORMATIONS", - "CHAT_CUSTOMIZATION", - "TRANSFORMATIONS_WEBAPP", - "FEATURE_DEVELOPMENT" - ], - "max": 64, - "min": 1 - }, - "GenerateCompletionsRequest": { - "type": "structure", - "required": ["fileContext"], - "members": { - "fileContext": { - "shape": "FileContext" - }, - "editorState": { - "shape": "EditorState" - }, - "maxResults": { - "shape": "GenerateCompletionsRequestMaxResultsInteger" - }, - "predictionTypes": { - "shape": "PredictionTypes" - }, - "nextToken": { - "shape": "GenerateCompletionsRequestNextTokenString" - }, - "referenceTrackerConfiguration": { - "shape": "ReferenceTrackerConfiguration" - }, - "supplementalContexts": { - "shape": "SupplementalContextList" - }, - "customizationArn": { - "shape": "CustomizationArn" - }, - "optOutPreference": { - "shape": "OptOutPreference" - }, - "userContext": { - "shape": "UserContext" - }, - "profileArn": { - "shape": "ProfileArn" - }, - "workspaceId": { - "shape": "UUID" - }, - "modelId": { - "shape": "ModelId" - } - } - }, - "GenerateCompletionsRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 10, - "min": 1 - }, - "GenerateCompletionsRequestNextTokenString": { - "type": "string", - "max": 2048, - "min": 0, - "pattern": "(?:[A-Za-z0-9\\+/]{4})*(?:[A-Za-z0-9\\+/]{2}\\=\\=|[A-Za-z0-9\\+/]{3}\\=)?", - "sensitive": true - }, - "GenerateCompletionsResponse": { - "type": "structure", - "members": { - "predictions": { - "shape": "Predictions" - }, - "completions": { - "shape": "Completions" - }, - "nextToken": { - "shape": "SensitiveString" - }, - "modelId": { - "shape": "ModelId" - } - } - }, - "GetCodeAnalysisRequest": { - "type": "structure", - "required": ["jobId"], - "members": { - "jobId": { - "shape": "GetCodeAnalysisRequestJobIdString" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "GetCodeAnalysisRequestJobIdString": { - "type": "string", - "max": 256, - "min": 1 - }, - "GetCodeAnalysisResponse": { - "type": "structure", - "required": ["status"], - "members": { - "status": { - "shape": "CodeAnalysisStatus" - }, - "errorMessage": { - "shape": "SensitiveString" - } - } - }, - "GetCodeFixJobRequest": { - "type": "structure", - "required": ["jobId"], - "members": { - "jobId": { - "shape": "GetCodeFixJobRequestJobIdString" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "GetCodeFixJobRequestJobIdString": { - "type": "string", - "max": 256, - "min": 1, - "pattern": ".*[A-Za-z0-9-:]+.*" - }, - "GetCodeFixJobResponse": { - "type": "structure", - "members": { - "jobStatus": { - "shape": "CodeFixJobStatus" - }, - "suggestedFix": { - "shape": "SuggestedFix" - } - } - }, - "GetTaskAssistCodeGenerationRequest": { - "type": "structure", - "required": ["conversationId", "codeGenerationId"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "codeGenerationId": { - "shape": "CodeGenerationId" - }, - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Request for getting task assist code generation.

" - }, - "GetTaskAssistCodeGenerationResponse": { - "type": "structure", - "required": ["conversationId", "codeGenerationStatus"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "codeGenerationStatus": { - "shape": "CodeGenerationStatus" - }, - "codeGenerationStatusDetail": { - "shape": "CodeGenerationStatusDetail" - }, - "codeGenerationRemainingIterationCount": { - "shape": "Integer" - }, - "codeGenerationTotalIterationCount": { - "shape": "Integer" - } - }, - "documentation": "

Response for getting task assist code generation status.

" - }, - "GetTestGenerationRequest": { - "type": "structure", - "required": ["testGenerationJobGroupName", "testGenerationJobId"], - "members": { - "testGenerationJobGroupName": { - "shape": "TestGenerationJobGroupName" - }, - "testGenerationJobId": { - "shape": "UUID" - }, - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Structure to represent get test generation request.

" - }, - "GetTestGenerationResponse": { - "type": "structure", - "members": { - "testGenerationJob": { - "shape": "TestGenerationJob" - } - }, - "documentation": "

Structure to represent get test generation response.

" - }, - "GetTransformationPlanRequest": { - "type": "structure", - "required": ["transformationJobId"], - "members": { - "transformationJobId": { - "shape": "TransformationJobId" - }, - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Structure to represent get code transformation plan request.

" - }, - "GetTransformationPlanResponse": { - "type": "structure", - "required": ["transformationPlan"], - "members": { - "transformationPlan": { - "shape": "TransformationPlan" - } - }, - "documentation": "

Structure to represent get code transformation plan response.

" - }, - "GetTransformationRequest": { - "type": "structure", - "required": ["transformationJobId"], - "members": { - "transformationJobId": { - "shape": "TransformationJobId" - }, - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Structure to represent get code transformation request.

" - }, - "GetTransformationResponse": { - "type": "structure", - "required": ["transformationJob"], - "members": { - "transformationJob": { - "shape": "TransformationJob" - } - }, - "documentation": "

Structure to represent get code transformation response.

" - }, - "GetUsageLimitsRequest": { - "type": "structure", - "members": { - "profileArn": { - "shape": "ProfileArn", - "documentation": "

The ARN of the Q Developer profile. Required for enterprise customers, optional for Builder ID users.

" - } - } - }, - "GetUsageLimitsResponse": { - "type": "structure", - "required": ["limits", "daysUntilReset"], - "members": { - "limits": { - "shape": "UsageLimits" - }, - "daysUntilReset": { - "shape": "Integer", - "documentation": "

Number of days remaining until the usage metrics reset

" - } - } - }, - "GitState": { - "type": "structure", - "members": { - "status": { - "shape": "GitStateStatusString", - "documentation": "

The output of the command git status --porcelain=v1 -b

" - } - }, - "documentation": "

State related to the Git VSC

" - }, - "GitStateStatusString": { - "type": "string", - "max": 4096, - "min": 0, - "sensitive": true - }, - "IdeCategory": { - "type": "string", - "enum": ["JETBRAINS", "VSCODE", "CLI", "JUPYTER_MD", "JUPYTER_SM", "ECLIPSE", "VISUAL_STUDIO"], - "max": 64, - "min": 1 - }, - "IdeDiagnostic": { - "type": "structure", - "required": ["ideDiagnosticType"], - "members": { - "range": { - "shape": "Range", - "documentation": "

The range at which the message applies.

" - }, - "source": { - "shape": "IdeDiagnosticSourceString", - "documentation": "

A human-readable string describing the source of the diagnostic

" - }, - "severity": { - "shape": "DiagnosticSeverity", - "documentation": "

Diagnostic Error type

" - }, - "ideDiagnosticType": { - "shape": "IdeDiagnosticType", - "documentation": "

Type of the diagnostic

" - } - }, - "documentation": "

Structure to represent metadata about a Diagnostic from user local IDE

" - }, - "IdeDiagnosticList": { - "type": "list", - "member": { - "shape": "IdeDiagnostic" - }, - "documentation": "

List of IDE Diagnostics

", - "max": 1024, - "min": 0 - }, - "IdeDiagnosticSourceString": { - "type": "string", - "max": 1024, - "min": 0, - "sensitive": true - }, - "IdeDiagnosticType": { - "type": "string", - "enum": ["SYNTAX_ERROR", "TYPE_ERROR", "REFERENCE_ERROR", "BEST_PRACTICE", "SECURITY", "OTHER"] - }, - "IdempotencyToken": { - "type": "string", - "max": 256, - "min": 1 - }, - "IdentityDetails": { - "type": "structure", - "members": { - "ssoIdentityDetails": { - "shape": "SSOIdentityDetails" - }, - "externalIdentityDetails": { - "shape": "ExternalIdentityDetails" - } - }, - "union": true - }, - "ImageBlock": { - "type": "structure", - "required": ["format", "source"], - "members": { - "format": { - "shape": "ImageFormat" - }, - "source": { - "shape": "ImageSource" - } - }, - "documentation": "

Represents the image source itself and the format of the image.

" - }, - "ImageBlocks": { - "type": "list", - "member": { - "shape": "ImageBlock" - }, - "max": 10, - "min": 0 - }, - "ImageFormat": { - "type": "string", - "enum": ["png", "jpeg", "gif", "webp"] - }, - "ImageSource": { - "type": "structure", - "members": { - "bytes": { - "shape": "ImageSourceBytesBlob" - } - }, - "documentation": "

Image bytes limited to ~10MB considering overhead of base64 encoding

", - "sensitive": true, - "union": true - }, - "ImageSourceBytesBlob": { - "type": "blob", - "max": 2800000, - "min": 1 - }, - "Import": { - "type": "structure", - "members": { - "statement": { - "shape": "ImportStatementString" - } - } - }, - "ImportStatementString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "Imports": { - "type": "list", - "member": { - "shape": "Import" - }, - "max": 10, - "min": 0 - }, - "InlineChatEvent": { - "type": "structure", - "required": ["requestId", "timestamp"], - "members": { - "requestId": { - "shape": "UUID" - }, - "timestamp": { - "shape": "Timestamp" - }, - "inputLength": { - "shape": "PrimitiveInteger" - }, - "numSelectedLines": { - "shape": "PrimitiveInteger" - }, - "numSuggestionAddChars": { - "shape": "PrimitiveInteger" - }, - "numSuggestionAddLines": { - "shape": "PrimitiveInteger" - }, - "numSuggestionDelChars": { - "shape": "PrimitiveInteger" - }, - "numSuggestionDelLines": { - "shape": "PrimitiveInteger" - }, - "codeIntent": { - "shape": "Boolean" - }, - "userDecision": { - "shape": "InlineChatUserDecision" - }, - "responseStartLatency": { - "shape": "Double" - }, - "responseEndLatency": { - "shape": "Double" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - } - } - }, - "InlineChatUserDecision": { - "type": "string", - "enum": ["ACCEPT", "REJECT", "DISMISS"] - }, - "Integer": { - "type": "integer", - "box": true - }, - "Intent": { - "type": "string", - "enum": ["DEV", "DOC"] - }, - "IntentContext": { - "type": "structure", - "members": { - "documentation": { - "shape": "DocumentationIntentContext" - } - }, - "union": true - }, - "InternalServerException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "InternalServerExceptionReason" - } - }, - "documentation": "

This exception is thrown when an unexpected error occurred during the processing of a request.

", - "exception": true, - "fault": true, - "retryable": { - "throttling": false - } - }, - "InternalServerExceptionReason": { - "type": "string", - "documentation": "

Reason for InternalServerException

", - "enum": ["MODEL_TEMPORARILY_UNAVAILABLE"] - }, - "IssuerUrl": { - "type": "string", - "max": 255, - "min": 1 - }, - "LineRangeList": { - "type": "list", - "member": { - "shape": "Range" - } - }, - "ListAvailableCustomizationsRequest": { - "type": "structure", - "members": { - "maxResults": { - "shape": "ListAvailableCustomizationsRequestMaxResultsInteger" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "ListAvailableCustomizationsRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 100, - "min": 1 - }, - "ListAvailableCustomizationsResponse": { - "type": "structure", - "required": ["customizations"], - "members": { - "customizations": { - "shape": "Customizations" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListAvailableModelsRequest": { - "type": "structure", - "required": ["origin"], - "members": { - "origin": { - "shape": "Origin", - "documentation": "

The origin context for which to list available models

" - }, - "maxResults": { - "shape": "ListAvailableModelsRequestMaxResultsInteger", - "documentation": "

Maximum number of models to return in a single response

" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken", - "documentation": "

Token for retrieving the next page of results

" - }, - "profileArn": { - "shape": "ProfileArn", - "documentation": "

ARN of the profile to use for model filtering

" - }, - "modelProvider": { - "shape": "ModelProvider", - "documentation": "

Provider of AI models

" - } - } - }, - "ListAvailableModelsRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 100, - "min": 1 - }, - "ListAvailableModelsResponse": { - "type": "structure", - "required": ["models"], - "members": { - "models": { - "shape": "Models", - "documentation": "

List of available models

" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken", - "documentation": "

Token for retrieving the next page of results

" - } - } - }, - "ListAvailableProfilesRequest": { - "type": "structure", - "members": { - "maxResults": { - "shape": "ListAvailableProfilesRequestMaxResultsInteger" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListAvailableProfilesRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 10, - "min": 1 - }, - "ListAvailableProfilesResponse": { - "type": "structure", - "required": ["profiles"], - "members": { - "profiles": { - "shape": "ProfileList" - }, - "nextToken": { - "shape": "Base64EncodedPaginationToken" - } - } - }, - "ListCodeAnalysisFindingsRequest": { - "type": "structure", - "required": ["jobId", "codeAnalysisFindingsSchema"], - "members": { - "jobId": { - "shape": "ListCodeAnalysisFindingsRequestJobIdString" - }, - "nextToken": { - "shape": "PaginationToken" - }, - "codeAnalysisFindingsSchema": { - "shape": "CodeAnalysisFindingsSchema" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "ListCodeAnalysisFindingsRequestJobIdString": { - "type": "string", - "max": 256, - "min": 1 - }, - "ListCodeAnalysisFindingsResponse": { - "type": "structure", - "required": ["codeAnalysisFindings"], - "members": { - "nextToken": { - "shape": "PaginationToken" - }, - "codeAnalysisFindings": { - "shape": "SensitiveString" - } - } - }, - "ListEventsRequest": { - "type": "structure", - "required": ["conversationId"], - "members": { - "conversationId": { - "shape": "UUID" - }, - "maxResults": { - "shape": "ListEventsRequestMaxResultsInteger" - }, - "nextToken": { - "shape": "NextToken" - } - } - }, - "ListEventsRequestMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 50, - "min": 1 - }, - "ListEventsResponse": { - "type": "structure", - "required": ["conversationId", "events"], - "members": { - "conversationId": { - "shape": "UUID" - }, - "events": { - "shape": "EventList" - }, - "nextToken": { - "shape": "NextToken" - } - } - }, - "ListFeatureEvaluationsRequest": { - "type": "structure", - "required": ["userContext"], - "members": { - "userContext": { - "shape": "UserContext" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "ListFeatureEvaluationsResponse": { - "type": "structure", - "required": ["featureEvaluations"], - "members": { - "featureEvaluations": { - "shape": "FeatureEvaluationsList" - } - } - }, - "ListUserMemoryEntriesInput": { - "type": "structure", - "members": { - "maxResults": { - "shape": "ListUserMemoryEntriesInputMaxResultsInteger" - }, - "profileArn": { - "shape": "ListUserMemoryEntriesInputProfileArnString", - "documentation": "

ProfileArn for the managing Q Profile

" - }, - "nextToken": { - "shape": "ListUserMemoryEntriesInputNextTokenString" - } - } - }, - "ListUserMemoryEntriesInputMaxResultsInteger": { - "type": "integer", - "box": true, - "max": 100, - "min": 1 - }, - "ListUserMemoryEntriesInputNextTokenString": { - "type": "string", - "min": 1, - "pattern": "[A-Za-z0-9_-]+" - }, - "ListUserMemoryEntriesInputProfileArnString": { - "type": "string", - "min": 1, - "pattern": "arn:aws:(codewhisperer|transform):[-.a-z0-9]{1,63}:\\d{12}:profile/([a-zA-Z0-9]){12}" - }, - "ListUserMemoryEntriesOutput": { - "type": "structure", - "required": ["memoryEntries"], - "members": { - "memoryEntries": { - "shape": "MemoryEntryList" - }, - "nextToken": { - "shape": "ListUserMemoryEntriesOutputNextTokenString" - } - } - }, - "ListUserMemoryEntriesOutputNextTokenString": { - "type": "string", - "min": 1, - "pattern": "[A-Za-z0-9_-]+" - }, - "ListWorkspaceMetadataRequest": { - "type": "structure", - "members": { - "workspaceRoot": { - "shape": "ListWorkspaceMetadataRequestWorkspaceRootString" - }, - "nextToken": { - "shape": "String" - }, - "maxResults": { - "shape": "Integer" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "ListWorkspaceMetadataRequestWorkspaceRootString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "ListWorkspaceMetadataResponse": { - "type": "structure", - "required": ["workspaces"], - "members": { - "workspaces": { - "shape": "WorkspaceList" - }, - "nextToken": { - "shape": "String" - } - } - }, - "Long": { - "type": "long", - "box": true - }, - "MemoryEntry": { - "type": "structure", - "required": ["id", "memoryEntryString", "metadata"], - "members": { - "id": { - "shape": "MemoryEntryIdString", - "documentation": "

A unique identifier for a single memory entry

" - }, - "memoryEntryString": { - "shape": "MemoryEntryMemoryEntryStringString" - }, - "metadata": { - "shape": "MemoryEntryMetadata" - } - }, - "documentation": "

MemoryEntry corresponds to a single user memory

" - }, - "MemoryEntryIdString": { - "type": "string", - "max": 36, - "min": 36, - "pattern": "[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" - }, - "MemoryEntryList": { - "type": "list", - "member": { - "shape": "MemoryEntry" - }, - "documentation": "

List of user memories

" - }, - "MemoryEntryMemoryEntryStringString": { - "type": "string", - "max": 500, - "min": 1, - "sensitive": true - }, - "MemoryEntryMetadata": { - "type": "structure", - "required": ["origin", "createdAt", "updatedAt"], - "members": { - "origin": { - "shape": "Origin" - }, - "attributes": { - "shape": "AttributesMap" - }, - "createdAt": { - "shape": "Timestamp" - }, - "updatedAt": { - "shape": "Timestamp" - }, - "memoryStatus": { - "shape": "MemoryStatus" - } - }, - "documentation": "

Metadata for a single memory entry

" - }, - "MemoryStatus": { - "type": "string", - "documentation": "

Status of user memory

", - "enum": ["DECRYPTION_FAILURE", "VALID"] - }, - "MessageId": { - "type": "string", - "documentation": "

Unique identifier for the chat message

", - "max": 128, - "min": 0 - }, - "MetricData": { - "type": "structure", - "required": ["metricName", "metricValue", "timestamp", "product"], - "members": { - "metricName": { - "shape": "MetricDataMetricNameString" - }, - "metricValue": { - "shape": "Double" - }, - "timestamp": { - "shape": "Timestamp" - }, - "product": { - "shape": "MetricDataProductString" - }, - "dimensions": { - "shape": "DimensionList" - } - } - }, - "MetricDataMetricNameString": { - "type": "string", - "max": 1024, - "min": 1, - "pattern": "[-a-zA-Z0-9._]*" - }, - "MetricDataProductString": { - "type": "string", - "max": 128, - "min": 1, - "pattern": "[-a-zA-Z0-9._]*" - }, - "Model": { - "type": "structure", - "required": ["modelId"], - "members": { - "modelId": { - "shape": "ModelId", - "documentation": "

Unique identifier for the model

" - }, - "description": { - "shape": "Description", - "documentation": "

Description of the model

" - }, - "modelMetadata": { - "shape": "ModelMetadata", - "documentation": "

Technical metadata and capabilities of the model

" - } - } - }, - "ModelId": { - "type": "string", - "documentation": "

Unique identifier for the model

", - "max": 1024, - "min": 1, - "pattern": "[a-zA-Z0-9_:.-]+" - }, - "ModelMetadata": { - "type": "structure", - "members": { - "maxInputTokens": { - "shape": "ModelMetadataMaxInputTokensInteger", - "documentation": "

Maximum number of input tokens the model can process

" - }, - "supportsImages": { - "shape": "Boolean", - "documentation": "

Whether the model supports image input processing

" - } - } - }, - "ModelMetadataMaxInputTokensInteger": { - "type": "integer", - "box": true, - "min": 1 - }, - "ModelProvider": { - "type": "string", - "documentation": "

Provider of AI models

", - "enum": ["DEFAULT"] - }, - "Models": { - "type": "list", - "member": { - "shape": "Model" - } - }, - "NextToken": { - "type": "string", - "max": 1000, - "min": 0 - }, - "Notifications": { - "type": "list", - "member": { - "shape": "NotificationsFeature" - }, - "max": 10, - "min": 0 - }, - "NotificationsFeature": { - "type": "structure", - "required": ["feature", "toggle"], - "members": { - "feature": { - "shape": "FeatureName" - }, - "toggle": { - "shape": "OptInFeatureToggle" - } - } - }, - "OperatingSystem": { - "type": "string", - "enum": ["MAC", "WINDOWS", "LINUX"], - "max": 64, - "min": 1 - }, - "OptInFeatureToggle": { - "type": "string", - "enum": ["ON", "OFF"] - }, - "OptInFeatures": { - "type": "structure", - "members": { - "promptLogging": { - "shape": "PromptLogging" - }, - "byUserAnalytics": { - "shape": "ByUserAnalytics" - }, - "dashboardAnalytics": { - "shape": "DashboardAnalytics" - }, - "notifications": { - "shape": "Notifications" - }, - "workspaceContext": { - "shape": "WorkspaceContext" - } - } - }, - "OptOutPreference": { - "type": "string", - "enum": ["OPTIN", "OPTOUT"] - }, - "Origin": { - "type": "string", - "documentation": "

Enum to represent the origin application conversing with Sidekick.

", - "enum": [ - "CHATBOT", - "CONSOLE", - "DOCUMENTATION", - "MARKETING", - "MOBILE", - "SERVICE_INTERNAL", - "UNIFIED_SEARCH", - "UNKNOWN", - "MD", - "IDE", - "SAGE_MAKER", - "CLI", - "AI_EDITOR", - "OPENSEARCH_DASHBOARD", - "GITLAB" - ] - }, - "PackageInfo": { - "type": "structure", - "members": { - "executionCommand": { - "shape": "SensitiveString" - }, - "buildCommand": { - "shape": "SensitiveString" - }, - "buildOrder": { - "shape": "PackageInfoBuildOrderInteger" - }, - "testFramework": { - "shape": "String" - }, - "packageSummary": { - "shape": "PackageInfoPackageSummaryString" - }, - "packagePlan": { - "shape": "PackageInfoPackagePlanString" - }, - "targetFileInfoList": { - "shape": "TargetFileInfoList" - } - } - }, - "PackageInfoBuildOrderInteger": { - "type": "integer", - "box": true, - "min": 0 - }, - "PackageInfoList": { - "type": "list", - "member": { - "shape": "PackageInfo" - } - }, - "PackageInfoPackagePlanString": { - "type": "string", - "max": 30720, - "min": 0, - "sensitive": true - }, - "PackageInfoPackageSummaryString": { - "type": "string", - "max": 30720, - "min": 0, - "sensitive": true - }, - "PaginationToken": { - "type": "string", - "max": 2048, - "min": 1, - "pattern": "\\S+" - }, - "Position": { - "type": "structure", - "required": ["line", "character"], - "members": { - "line": { - "shape": "Integer", - "documentation": "

Line position in a document.

" - }, - "character": { - "shape": "Integer", - "documentation": "

Character offset on a line in a document (zero-based)

" - } - }, - "documentation": "

Indicates Cursor postion in a Text Document

" - }, - "PreSignedUrl": { - "type": "string", - "max": 2048, - "min": 1, - "sensitive": true - }, - "Prediction": { - "type": "structure", - "members": { - "completion": { - "shape": "Completion" - }, - "edit": { - "shape": "Edit" - } - }, - "union": true - }, - "PredictionType": { - "type": "string", - "enum": ["COMPLETIONS", "EDITS"] - }, - "PredictionTypes": { - "type": "list", - "member": { - "shape": "PredictionType" - } - }, - "Predictions": { - "type": "list", - "member": { - "shape": "Prediction" - }, - "max": 10, - "min": 0 - }, - "PreviousEditorStateMetadata": { - "type": "structure", - "required": ["timeOffset"], - "members": { - "timeOffset": { - "shape": "Integer" - } - } - }, - "PrimitiveInteger": { - "type": "integer" - }, - "Profile": { - "type": "structure", - "required": ["arn", "profileName"], - "members": { - "arn": { - "shape": "ProfileArn" - }, - "identityDetails": { - "shape": "IdentityDetails" - }, - "profileName": { - "shape": "ProfileName" - }, - "description": { - "shape": "ProfileDescription" - }, - "referenceTrackerConfiguration": { - "shape": "ReferenceTrackerConfiguration" - }, - "kmsKeyArn": { - "shape": "ResourceArn" - }, - "activeFunctionalities": { - "shape": "ActiveFunctionalityList" - }, - "status": { - "shape": "ProfileStatus" - }, - "errorDetails": { - "shape": "ErrorDetails" - }, - "resourcePolicy": { - "shape": "ResourcePolicy" - }, - "profileType": { - "shape": "ProfileType" - }, - "optInFeatures": { - "shape": "OptInFeatures" - }, - "permissionUpdateRequired": { - "shape": "Boolean" - }, - "applicationProperties": { - "shape": "ApplicationPropertiesList" - } - } - }, - "ProfileArn": { - "type": "string", - "max": 950, - "min": 0, - "pattern": "arn:aws:(codewhisperer|transform):[-.a-z0-9]{1,63}:\\d{12}:profile/([a-zA-Z0-9]){12}" - }, - "ProfileDescription": { - "type": "string", - "max": 256, - "min": 1, - "pattern": "[\\sa-zA-Z0-9_-]*" - }, - "ProfileList": { - "type": "list", - "member": { - "shape": "Profile" - } - }, - "ProfileName": { - "type": "string", - "max": 100, - "min": 1, - "pattern": "[a-zA-Z][a-zA-Z0-9_-]*" - }, - "ProfileStatus": { - "type": "string", - "enum": ["ACTIVE", "CREATING", "CREATE_FAILED", "UPDATING", "UPDATE_FAILED", "DELETING", "DELETE_FAILED"] - }, - "ProfileType": { - "type": "string", - "enum": ["Q_DEVELOPER", "CODEWHISPERER"] - }, - "ProgrammingLanguage": { - "type": "structure", - "required": ["languageName"], - "members": { - "languageName": { - "shape": "ProgrammingLanguageLanguageNameString" - } - }, - "documentation": "

Programming Languages supported by CodeWhisperer

" - }, - "ProgrammingLanguageLanguageNameString": { - "type": "string", - "max": 128, - "min": 1, - "pattern": "(python|javascript|java|csharp|typescript|c|cpp|go|kotlin|php|ruby|rust|scala|shell|sql|json|yaml|vue|tf|tsx|jsx|plaintext|systemverilog|dart|lua|swift|hcl|powershell|r|abap)" - }, - "ProgressUpdates": { - "type": "list", - "member": { - "shape": "TransformationProgressUpdate" - } - }, - "PromptLogging": { - "type": "structure", - "required": ["s3Uri", "toggle"], - "members": { - "s3Uri": { - "shape": "S3Uri" - }, - "toggle": { - "shape": "OptInFeatureToggle" - } - } - }, - "PushTelemetryEventRequest": { - "type": "structure", - "required": ["eventType", "event"], - "members": { - "clientToken": { - "shape": "IdempotencyToken", - "idempotencyToken": true - }, - "eventType": { - "shape": "String" - }, - "event": { - "shape": "Document" - } - } - }, - "PushTelemetryEventResponse": { - "type": "structure", - "members": {} - }, - "Range": { - "type": "structure", - "required": ["start", "end"], - "members": { - "start": { - "shape": "Position", - "documentation": "

The range's start position.

" - }, - "end": { - "shape": "Position", - "documentation": "

The range's end position.

" - } - }, - "documentation": "

Indicates Range / Span in a Text Document

" - }, - "RecommendationsWithReferencesPreference": { - "type": "string", - "documentation": "

Recommendations with references setting for CodeWhisperer

", - "enum": ["BLOCK", "ALLOW"] - }, - "Reference": { - "type": "structure", - "members": { - "licenseName": { - "shape": "ReferenceLicenseNameString", - "documentation": "

License name

" - }, - "repository": { - "shape": "ReferenceRepositoryString", - "documentation": "

Code Repsitory for the associated reference

" - }, - "url": { - "shape": "ReferenceUrlString", - "documentation": "

Respository URL

" - }, - "recommendationContentSpan": { - "shape": "Span", - "documentation": "

Span / Range for the Reference

" - } - }, - "documentation": "

Code Reference / Repository details

" - }, - "ReferenceLicenseNameString": { - "type": "string", - "max": 1024, - "min": 1 - }, - "ReferenceRepositoryString": { - "type": "string", - "max": 1024, - "min": 1 - }, - "ReferenceTrackerConfiguration": { - "type": "structure", - "required": ["recommendationsWithReferences"], - "members": { - "recommendationsWithReferences": { - "shape": "RecommendationsWithReferencesPreference" - } - } - }, - "ReferenceUrlString": { - "type": "string", - "max": 1024, - "min": 1 - }, - "References": { - "type": "list", - "member": { - "shape": "Reference" - }, - "max": 10, - "min": 0 - }, - "RelevantDocumentList": { - "type": "list", - "member": { - "shape": "RelevantTextDocument" - }, - "max": 100, - "min": 0 - }, - "RelevantTextDocument": { - "type": "structure", - "required": ["relativeFilePath"], - "members": { - "relativeFilePath": { - "shape": "RelevantTextDocumentRelativeFilePathString", - "documentation": "

Filepath relative to the root of the workspace

" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage", - "documentation": "

The text document's language identifier.

" - }, - "text": { - "shape": "RelevantTextDocumentTextString", - "documentation": "

Content of the text document

" - }, - "documentSymbols": { - "shape": "DocumentSymbols", - "documentation": "

DocumentSymbols parsed from a text document

" - }, - "type": { - "shape": "ContentType", - "documentation": "

The type of content(file, prompt, symbol, or workspace)

" - } - }, - "documentation": "

Represents an IDE retrieved relevant Text Document / File

" - }, - "RelevantTextDocumentRelativeFilePathString": { - "type": "string", - "max": 4096, - "min": 1, - "sensitive": true - }, - "RelevantTextDocumentTextString": { - "type": "string", - "max": 40960, - "min": 0, - "sensitive": true - }, - "RequestHeaderKey": { - "type": "string", - "max": 64, - "min": 1 - }, - "RequestHeaderValue": { - "type": "string", - "max": 256, - "min": 1 - }, - "RequestHeaders": { - "type": "map", - "key": { - "shape": "RequestHeaderKey" - }, - "value": { - "shape": "RequestHeaderValue" - }, - "max": 16, - "min": 1, - "sensitive": true - }, - "ResourceArn": { - "type": "string", - "max": 1224, - "min": 0, - "pattern": "arn:([-.a-z0-9]{1,63}:){2}([-.a-z0-9]{0,63}:){2}([a-zA-Z0-9-_:/]){1,1023}" - }, - "ResourceNotFoundException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - } - }, - "documentation": "

This exception is thrown when describing a resource that does not exist.

", - "exception": true - }, - "ResourcePolicy": { - "type": "structure", - "required": ["effect"], - "members": { - "effect": { - "shape": "ResourcePolicyEffect" - } - } - }, - "ResourcePolicyEffect": { - "type": "string", - "enum": ["ALLOW", "DENY"] - }, - "ResumeTransformationRequest": { - "type": "structure", - "required": ["transformationJobId"], - "members": { - "transformationJobId": { - "shape": "TransformationJobId" - }, - "userActionStatus": { - "shape": "TransformationUserActionStatus" - }, - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Structure to represent stop code transformation request.

" - }, - "ResumeTransformationResponse": { - "type": "structure", - "required": ["transformationStatus"], - "members": { - "transformationStatus": { - "shape": "TransformationStatus" - } - }, - "documentation": "

Structure to represent stop code transformation response.

" - }, - "RuntimeDiagnostic": { - "type": "structure", - "required": ["source", "severity", "message"], - "members": { - "source": { - "shape": "RuntimeDiagnosticSourceString", - "documentation": "

A human-readable string describing the source of the diagnostic

" - }, - "severity": { - "shape": "DiagnosticSeverity", - "documentation": "

Diagnostic Error type

" - }, - "message": { - "shape": "RuntimeDiagnosticMessageString", - "documentation": "

The diagnostic's message.

" - } - }, - "documentation": "

Structure to represent metadata about a Runtime Diagnostics

" - }, - "RuntimeDiagnosticMessageString": { - "type": "string", - "max": 1024, - "min": 0, - "sensitive": true - }, - "RuntimeDiagnosticSourceString": { - "type": "string", - "max": 1024, - "min": 0, - "sensitive": true - }, - "S3Uri": { - "type": "string", - "max": 1024, - "min": 1, - "pattern": "s3://((?!xn--)[a-z0-9](?![^/]*[.]{2})[a-z0-9-.]{1,61}[a-z0-9](?This exception is thrown when request was denied due to caller exceeding their usage limits

", - "exception": true - }, - "ServiceQuotaExceededExceptionReason": { - "type": "string", - "documentation": "

Reason for ServiceQuotaExceededException

", - "enum": ["CONVERSATION_LIMIT_EXCEEDED"] - }, - "ShellHistory": { - "type": "list", - "member": { - "shape": "ShellHistoryEntry" - }, - "documentation": "

A list of shell history entries

", - "max": 20, - "min": 0 - }, - "ShellHistoryEntry": { - "type": "structure", - "required": ["command"], - "members": { - "command": { - "shape": "ShellHistoryEntryCommandString", - "documentation": "

The shell command that was run

" - }, - "directory": { - "shape": "ShellHistoryEntryDirectoryString", - "documentation": "

The directory the command was ran in

" - }, - "exitCode": { - "shape": "Integer", - "documentation": "

The exit code of the command after it finished

" - }, - "stdout": { - "shape": "ShellHistoryEntryStdoutString", - "documentation": "

The stdout from the command

" - }, - "stderr": { - "shape": "ShellHistoryEntryStderrString", - "documentation": "

The stderr from the command

" - } - }, - "documentation": "

An single entry in the shell history

" - }, - "ShellHistoryEntryCommandString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "ShellHistoryEntryDirectoryString": { - "type": "string", - "max": 256, - "min": 1, - "sensitive": true - }, - "ShellHistoryEntryStderrString": { - "type": "string", - "max": 4096, - "min": 0, - "sensitive": true - }, - "ShellHistoryEntryStdoutString": { - "type": "string", - "max": 4096, - "min": 0, - "sensitive": true - }, - "ShellState": { - "type": "structure", - "required": ["shellName"], - "members": { - "shellName": { - "shape": "ShellStateShellNameString", - "documentation": "

The name of the current shell

" - }, - "shellHistory": { - "shape": "ShellHistory", - "documentation": "

The history previous shell commands for the current shell

" - } - }, - "documentation": "

Represents the state of a shell

" - }, - "ShellStateShellNameString": { - "type": "string", - "max": 32, - "min": 1, - "pattern": "(zsh|bash|fish|pwsh|nu)" - }, - "Span": { - "type": "structure", - "members": { - "start": { - "shape": "SpanStartInteger" - }, - "end": { - "shape": "SpanEndInteger" - } - }, - "documentation": "

Represents span in a text.

" - }, - "SpanEndInteger": { - "type": "integer", - "box": true, - "min": 0 - }, - "SpanStartInteger": { - "type": "integer", - "box": true, - "min": 0 - }, - "StartCodeAnalysisRequest": { - "type": "structure", - "required": ["artifacts", "programmingLanguage"], - "members": { - "artifacts": { - "shape": "ArtifactMap" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "clientToken": { - "shape": "StartCodeAnalysisRequestClientTokenString", - "idempotencyToken": true - }, - "scope": { - "shape": "CodeAnalysisScope" - }, - "codeScanName": { - "shape": "CodeScanName" - }, - "codeDiffMetadata": { - "shape": "CodeDiffMetadata" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "StartCodeAnalysisRequestClientTokenString": { - "type": "string", - "max": 256, - "min": 1 - }, - "StartCodeAnalysisResponse": { - "type": "structure", - "required": ["jobId", "status"], - "members": { - "jobId": { - "shape": "StartCodeAnalysisResponseJobIdString" - }, - "status": { - "shape": "CodeAnalysisStatus" - }, - "errorMessage": { - "shape": "SensitiveString" - } - } - }, - "StartCodeAnalysisResponseJobIdString": { - "type": "string", - "max": 256, - "min": 1 - }, - "StartCodeFixJobRequest": { - "type": "structure", - "required": ["snippetRange", "uploadId"], - "members": { - "snippetRange": { - "shape": "Range" - }, - "uploadId": { - "shape": "UploadId" - }, - "description": { - "shape": "StartCodeFixJobRequestDescriptionString" - }, - "ruleId": { - "shape": "StartCodeFixJobRequestRuleIdString" - }, - "codeFixName": { - "shape": "CodeFixName" - }, - "referenceTrackerConfiguration": { - "shape": "ReferenceTrackerConfiguration" - }, - "profileArn": { - "shape": "ProfileArn" - } - } - }, - "StartCodeFixJobRequestDescriptionString": { - "type": "string", - "max": 5000, - "min": 1, - "sensitive": true - }, - "StartCodeFixJobRequestRuleIdString": { - "type": "string", - "max": 256, - "min": 1, - "pattern": ".*[A-Za-z0-9-]+.*" - }, - "StartCodeFixJobResponse": { - "type": "structure", - "members": { - "jobId": { - "shape": "StartCodeFixJobResponseJobIdString" - }, - "status": { - "shape": "CodeFixJobStatus" - } - } - }, - "StartCodeFixJobResponseJobIdString": { - "type": "string", - "max": 256, - "min": 1, - "pattern": ".*[A-Za-z0-9-:]+.*" - }, - "StartTaskAssistCodeGenerationRequest": { - "type": "structure", - "required": ["conversationState", "workspaceState"], - "members": { - "conversationState": { - "shape": "ConversationState" - }, - "workspaceState": { - "shape": "WorkspaceState" - }, - "taskAssistPlan": { - "shape": "TaskAssistPlan" - }, - "codeGenerationId": { - "shape": "CodeGenerationId" - }, - "currentCodeGenerationId": { - "shape": "CodeGenerationId" - }, - "intent": { - "shape": "Intent" - }, - "intentContext": { - "shape": "IntentContext" - }, - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Structure to represent start code generation request.

" - }, - "StartTaskAssistCodeGenerationResponse": { - "type": "structure", - "required": ["conversationId", "codeGenerationId"], - "members": { - "conversationId": { - "shape": "ConversationId" - }, - "codeGenerationId": { - "shape": "CodeGenerationId" - } - }, - "documentation": "

Structure to represent start code generation response.

" - }, - "StartTestGenerationRequest": { - "type": "structure", - "required": ["uploadId", "targetCodeList", "userInput"], - "members": { - "uploadId": { - "shape": "UploadId" - }, - "targetCodeList": { - "shape": "TargetCodeList" - }, - "userInput": { - "shape": "StartTestGenerationRequestUserInputString", - "documentation": "

The content of user input.

" - }, - "testGenerationJobGroupName": { - "shape": "TestGenerationJobGroupName" - }, - "clientToken": { - "shape": "StartTestGenerationRequestClientTokenString", - "idempotencyToken": true - }, - "profileArn": { - "shape": "ProfileArn" - }, - "referenceTrackerConfiguration": { - "shape": "ReferenceTrackerConfiguration" - } - }, - "documentation": "

Structure to represent test generation request.

" - }, - "StartTestGenerationRequestClientTokenString": { - "type": "string", - "max": 256, - "min": 1 - }, - "StartTestGenerationRequestUserInputString": { - "type": "string", - "max": 4096, - "min": 0, - "sensitive": true - }, - "StartTestGenerationResponse": { - "type": "structure", - "members": { - "testGenerationJob": { - "shape": "TestGenerationJob" - } - }, - "documentation": "

Structure to represent code transformation response.

" - }, - "StartTransformationRequest": { - "type": "structure", - "required": ["workspaceState", "transformationSpec"], - "members": { - "workspaceState": { - "shape": "WorkspaceState" - }, - "transformationSpec": { - "shape": "TransformationSpec" - }, - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Structure to represent code transformation request.

" - }, - "StartTransformationResponse": { - "type": "structure", - "required": ["transformationJobId"], - "members": { - "transformationJobId": { - "shape": "TransformationJobId" - } - }, - "documentation": "

Structure to represent code transformation response.

" - }, - "StepId": { - "type": "string", - "max": 126, - "min": 1 - }, - "StopTransformationRequest": { - "type": "structure", - "required": ["transformationJobId"], - "members": { - "transformationJobId": { - "shape": "TransformationJobId" - }, - "profileArn": { - "shape": "ProfileArn" - } - }, - "documentation": "

Structure to represent stop code transformation request.

" - }, - "StopTransformationResponse": { - "type": "structure", - "required": ["transformationStatus"], - "members": { - "transformationStatus": { - "shape": "TransformationStatus" - } - }, - "documentation": "

Structure to represent stop code transformation response.

" - }, - "String": { - "type": "string" - }, - "StringList": { - "type": "list", - "member": { - "shape": "StringListMemberString" - }, - "documentation": "

A list of strings

", - "max": 50, - "min": 0 - }, - "StringListMemberString": { - "type": "string", - "max": 256, - "min": 1, - "sensitive": true - }, - "SubscriptionStatus": { - "type": "string", - "enum": ["INACTIVE", "ACTIVE"] - }, - "SuggestedFix": { - "type": "structure", - "members": { - "codeDiff": { - "shape": "SuggestedFixCodeDiffString" - }, - "description": { - "shape": "SuggestedFixDescriptionString" - }, - "references": { - "shape": "References" - } - } - }, - "SuggestedFixCodeDiffString": { - "type": "string", - "max": 200000, - "min": 0, - "sensitive": true - }, - "SuggestedFixDescriptionString": { - "type": "string", - "max": 2000, - "min": 1, - "sensitive": true - }, - "SuggestionState": { - "type": "string", - "enum": ["ACCEPT", "REJECT", "DISCARD", "EMPTY", "MERGE"] - }, - "SupplementalContext": { - "type": "structure", - "required": ["filePath", "content"], - "members": { - "filePath": { - "shape": "SupplementalContextFilePathString" - }, - "content": { - "shape": "SupplementalContextContentString" - }, - "type": { - "shape": "SupplementalContextType" - }, - "metadata": { - "shape": "SupplementalContextMetadata" - } - } - }, - "SupplementalContextContentString": { - "type": "string", - "max": 10240, - "min": 1, - "sensitive": true - }, - "SupplementalContextFilePathString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "SupplementalContextList": { - "type": "list", - "member": { - "shape": "SupplementalContext" - }, - "max": 20, - "min": 0 - }, - "SupplementalContextMetadata": { - "type": "structure", - "members": { - "previousEditorStateMetadata": { - "shape": "PreviousEditorStateMetadata" - } - }, - "union": true - }, - "SupplementalContextType": { - "type": "string", - "enum": ["PreviousEditorState", "WorkspaceContext"] - }, - "SupplementaryWebLink": { - "type": "structure", - "required": ["url", "title"], - "members": { - "url": { - "shape": "SupplementaryWebLinkUrlString", - "documentation": "

URL of the web reference link.

" - }, - "title": { - "shape": "SupplementaryWebLinkTitleString", - "documentation": "

Title of the web reference link.

" - }, - "snippet": { - "shape": "SupplementaryWebLinkSnippetString", - "documentation": "

Relevant text snippet from the link.

" - } - }, - "documentation": "

Represents an additional reference link retured with the Chat message

" - }, - "SupplementaryWebLinkSnippetString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "SupplementaryWebLinkTitleString": { - "type": "string", - "max": 1024, - "min": 1, - "sensitive": true - }, - "SupplementaryWebLinkUrlString": { - "type": "string", - "max": 2048, - "min": 1, - "sensitive": true - }, - "SupplementaryWebLinks": { - "type": "list", - "member": { - "shape": "SupplementaryWebLink" - }, - "max": 10, - "min": 0 - }, - "SymbolType": { - "type": "string", - "enum": ["DECLARATION", "USAGE"] - }, - "SyntheticTimestamp_date_time": { - "type": "timestamp", - "timestampFormat": "iso8601" - }, - "TargetCode": { - "type": "structure", - "required": ["relativeTargetPath"], - "members": { - "relativeTargetPath": { - "shape": "TargetCodeRelativeTargetPathString", - "documentation": "

The file path relative to the root of the workspace, could be a single file or a folder.

" - }, - "targetLineRangeList": { - "shape": "LineRangeList" - } - } - }, - "TargetCodeList": { - "type": "list", - "member": { - "shape": "TargetCode" - }, - "min": 1 - }, - "TargetCodeRelativeTargetPathString": { - "type": "string", - "max": 4096, - "min": 1, - "sensitive": true - }, - "TargetFileInfo": { - "type": "structure", - "members": { - "filePath": { - "shape": "SensitiveString" - }, - "testFilePath": { - "shape": "SensitiveString" - }, - "testCoverage": { - "shape": "TargetFileInfoTestCoverageInteger" - }, - "fileSummary": { - "shape": "TargetFileInfoFileSummaryString" - }, - "filePlan": { - "shape": "TargetFileInfoFilePlanString" - }, - "codeReferences": { - "shape": "References" - }, - "numberOfTestMethods": { - "shape": "TargetFileInfoNumberOfTestMethodsInteger" - } - } - }, - "TargetFileInfoFilePlanString": { - "type": "string", - "max": 30720, - "min": 0, - "sensitive": true - }, - "TargetFileInfoFileSummaryString": { - "type": "string", - "max": 30720, - "min": 0, - "sensitive": true - }, - "TargetFileInfoList": { - "type": "list", - "member": { - "shape": "TargetFileInfo" - } - }, - "TargetFileInfoNumberOfTestMethodsInteger": { - "type": "integer", - "box": true, - "min": 0 - }, - "TargetFileInfoTestCoverageInteger": { - "type": "integer", - "box": true, - "max": 100, - "min": 0 - }, - "TaskAssistPlan": { - "type": "list", - "member": { - "shape": "TaskAssistPlanStep" - }, - "min": 0 - }, - "TaskAssistPlanStep": { - "type": "structure", - "required": ["filePath", "description"], - "members": { - "filePath": { - "shape": "TaskAssistPlanStepFilePathString", - "documentation": "

File path on which the step is working on.

" - }, - "description": { - "shape": "TaskAssistPlanStepDescriptionString", - "documentation": "

Description on the step.

" - }, - "startLine": { - "shape": "TaskAssistPlanStepStartLineInteger", - "documentation": "

Start line number of the related changes.

" - }, - "endLine": { - "shape": "TaskAssistPlanStepEndLineInteger", - "documentation": "

End line number of the related changes.

" - }, - "action": { - "shape": "TaskAssistPlanStepAction", - "documentation": "

Type of the action.

" - } - }, - "documentation": "

Structured plan step for a task assist plan.

" - }, - "TaskAssistPlanStepAction": { - "type": "string", - "documentation": "

Action for task assist plan step

", - "enum": ["MODIFY", "CREATE", "DELETE", "UNKNOWN"] - }, - "TaskAssistPlanStepDescriptionString": { - "type": "string", - "max": 1024, - "min": 1 - }, - "TaskAssistPlanStepEndLineInteger": { - "type": "integer", - "box": true, - "min": 0 - }, - "TaskAssistPlanStepFilePathString": { - "type": "string", - "max": 1024, - "min": 1 - }, - "TaskAssistPlanStepStartLineInteger": { - "type": "integer", - "box": true, - "min": 0 - }, - "TaskAssistPlanningUploadContext": { - "type": "structure", - "required": ["conversationId"], - "members": { - "conversationId": { - "shape": "ConversationId" - } - } - }, - "TelemetryEvent": { - "type": "structure", - "members": { - "userTriggerDecisionEvent": { - "shape": "UserTriggerDecisionEvent" - }, - "codeCoverageEvent": { - "shape": "CodeCoverageEvent" - }, - "userModificationEvent": { - "shape": "UserModificationEvent" - }, - "codeScanEvent": { - "shape": "CodeScanEvent" - }, - "codeScanSucceededEvent": { - "shape": "CodeScanSucceededEvent" - }, - "codeScanFailedEvent": { - "shape": "CodeScanFailedEvent" - }, - "codeScanRemediationsEvent": { - "shape": "CodeScanRemediationsEvent" - }, - "codeFixGenerationEvent": { - "shape": "CodeFixGenerationEvent" - }, - "codeFixAcceptanceEvent": { - "shape": "CodeFixAcceptanceEvent" - }, - "metricData": { - "shape": "MetricData" - }, - "chatAddMessageEvent": { - "shape": "ChatAddMessageEvent" - }, - "chatInteractWithMessageEvent": { - "shape": "ChatInteractWithMessageEvent" - }, - "chatUserModificationEvent": { - "shape": "ChatUserModificationEvent" - }, - "terminalUserInteractionEvent": { - "shape": "TerminalUserInteractionEvent" - }, - "featureDevEvent": { - "shape": "FeatureDevEvent" - }, - "featureDevCodeGenerationEvent": { - "shape": "FeatureDevCodeGenerationEvent" - }, - "featureDevCodeAcceptanceEvent": { - "shape": "FeatureDevCodeAcceptanceEvent" - }, - "inlineChatEvent": { - "shape": "InlineChatEvent" - }, - "transformEvent": { - "shape": "TransformEvent" - }, - "docGenerationEvent": { - "shape": "DocGenerationEvent" - }, - "docV2GenerationEvent": { - "shape": "DocV2GenerationEvent" - }, - "docV2AcceptanceEvent": { - "shape": "DocV2AcceptanceEvent" - }, - "testGenerationEvent": { - "shape": "TestGenerationEvent" - } - }, - "union": true - }, - "TenantId": { - "type": "string", - "max": 1024, - "min": 1 - }, - "TerminalUserInteractionEvent": { - "type": "structure", - "members": { - "terminalUserInteractionEventType": { - "shape": "TerminalUserInteractionEventType" - }, - "terminal": { - "shape": "String" - }, - "terminalVersion": { - "shape": "String" - }, - "shell": { - "shape": "String" - }, - "shellVersion": { - "shape": "String" - }, - "duration": { - "shape": "Integer" - }, - "timeToSuggestion": { - "shape": "Integer" - }, - "isCompletionAccepted": { - "shape": "Boolean" - }, - "cliToolCommand": { - "shape": "String" - } - } - }, - "TerminalUserInteractionEventType": { - "type": "string", - "documentation": "

CodeWhisperer terminal Interaction Type

", - "enum": ["CODEWHISPERER_TERMINAL_TRANSLATION_ACTION", "CODEWHISPERER_TERMINAL_COMPLETION_INSERTED"] - }, - "TestGenerationEvent": { - "type": "structure", - "required": ["jobId", "groupName"], - "members": { - "jobId": { - "shape": "UUID" - }, - "groupName": { - "shape": "TestGenerationJobGroupName" - }, - "timestamp": { - "shape": "Timestamp" - }, - "ideCategory": { - "shape": "IdeCategory" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "numberOfUnitTestCasesGenerated": { - "shape": "Integer" - }, - "numberOfUnitTestCasesAccepted": { - "shape": "Integer" - }, - "linesOfCodeGenerated": { - "shape": "Integer" - }, - "linesOfCodeAccepted": { - "shape": "Integer" - }, - "charsOfCodeGenerated": { - "shape": "Integer" - }, - "charsOfCodeAccepted": { - "shape": "Integer" - } - } - }, - "TestGenerationJob": { - "type": "structure", - "required": ["testGenerationJobId", "testGenerationJobGroupName", "status", "creationTime"], - "members": { - "testGenerationJobId": { - "shape": "UUID" - }, - "testGenerationJobGroupName": { - "shape": "TestGenerationJobGroupName" - }, - "status": { - "shape": "TestGenerationJobStatus" - }, - "shortAnswer": { - "shape": "SensitiveString" - }, - "creationTime": { - "shape": "Timestamp" - }, - "progressRate": { - "shape": "TestGenerationJobProgressRateInteger" - }, - "jobStatusReason": { - "shape": "String" - }, - "jobSummary": { - "shape": "TestGenerationJobJobSummaryString" - }, - "jobPlan": { - "shape": "TestGenerationJobJobPlanString" - }, - "packageInfoList": { - "shape": "PackageInfoList" - } - }, - "documentation": "

Represents a test generation job

" - }, - "TestGenerationJobGroupName": { - "type": "string", - "documentation": "

Test generation job group name

", - "max": 128, - "min": 1, - "pattern": "[a-zA-Z0-9-_]+" - }, - "TestGenerationJobJobPlanString": { - "type": "string", - "max": 30720, - "min": 0, - "sensitive": true - }, - "TestGenerationJobJobSummaryString": { - "type": "string", - "max": 30720, - "min": 0, - "sensitive": true - }, - "TestGenerationJobProgressRateInteger": { - "type": "integer", - "box": true, - "max": 100, - "min": 0 - }, - "TestGenerationJobStatus": { - "type": "string", - "enum": ["IN_PROGRESS", "FAILED", "COMPLETED"] - }, - "TextDocument": { - "type": "structure", - "required": ["relativeFilePath"], - "members": { - "relativeFilePath": { - "shape": "TextDocumentRelativeFilePathString", - "documentation": "

Filepath relative to the root of the workspace

" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage", - "documentation": "

The text document's language identifier.

" - }, - "text": { - "shape": "TextDocumentTextString", - "documentation": "

Content of the text document

" - }, - "documentSymbols": { - "shape": "DocumentSymbols", - "documentation": "

DocumentSymbols parsed from a text document

" - } - }, - "documentation": "

Represents a Text Document / File

" - }, - "TextDocumentDiagnostic": { - "type": "structure", - "required": ["document", "range", "source", "severity", "message"], - "members": { - "document": { - "shape": "TextDocument", - "documentation": "

Represents a Text Document associated with Diagnostic

" - }, - "range": { - "shape": "Range", - "documentation": "

The range at which the message applies.

" - }, - "source": { - "shape": "SensitiveString", - "documentation": "

A human-readable string describing the source of the diagnostic

" - }, - "severity": { - "shape": "DiagnosticSeverity", - "documentation": "

Diagnostic Error type

" - }, - "message": { - "shape": "TextDocumentDiagnosticMessageString", - "documentation": "

The diagnostic's message.

" - }, - "code": { - "shape": "TextDocumentDiagnosticCodeString", - "documentation": "

The diagnostic's code, which might appear in the user interface.

" - }, - "codeDescription": { - "shape": "CodeDescription", - "documentation": "

An optional property to describe the error code.

" - }, - "tags": { - "shape": "DiagnosticTagList", - "documentation": "

Additional metadata about the diagnostic.

" - }, - "relatedInformation": { - "shape": "DiagnosticRelatedInformationList", - "documentation": "

an array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

" - }, - "data": { - "shape": "TextDocumentDiagnosticDataString", - "documentation": "

A data entry field that is preserved between a textDocument/publishDiagnostics notification and textDocument/codeAction request.

" - } - }, - "documentation": "

Structure to represent metadata about a TextDocument Diagnostic

" - }, - "TextDocumentDiagnosticCodeString": { - "type": "string", - "max": 1024, - "min": 0, - "sensitive": true - }, - "TextDocumentDiagnosticDataString": { - "type": "string", - "max": 4096, - "min": 0, - "sensitive": true - }, - "TextDocumentDiagnosticMessageString": { - "type": "string", - "max": 1024, - "min": 0, - "sensitive": true - }, - "TextDocumentRelativeFilePathString": { - "type": "string", - "max": 4096, - "min": 1, - "sensitive": true - }, - "TextDocumentTextString": { - "type": "string", - "max": 40000, - "min": 0, - "sensitive": true - }, - "ThrottlingException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "ThrottlingExceptionReason" - } - }, - "documentation": "

This exception is thrown when request was denied due to request throttling.

", - "exception": true, - "retryable": { - "throttling": true - } - }, - "ThrottlingExceptionReason": { - "type": "string", - "documentation": "

Reason for ThrottlingException

", - "enum": ["MONTHLY_REQUEST_COUNT"] - }, - "Timestamp": { - "type": "timestamp" - }, - "Tool": { - "type": "structure", - "members": { - "toolSpecification": { - "shape": "ToolSpecification" - } - }, - "documentation": "

Information about a tool that can be used.

", - "union": true - }, - "ToolDescription": { - "type": "string", - "documentation": "

The description for the tool.

", - "max": 10240, - "min": 1, - "sensitive": true - }, - "ToolInputSchema": { - "type": "structure", - "members": { - "json": { - "shape": "SensitiveDocument" - } - }, - "documentation": "

The input schema for the tool in JSON format.

" - }, - "ToolName": { - "type": "string", - "documentation": "

The name for the tool.

", - "max": 64, - "min": 0, - "pattern": "[a-zA-Z0-9_-]+", - "sensitive": true - }, - "ToolResult": { - "type": "structure", - "required": ["toolUseId", "content"], - "members": { - "toolUseId": { - "shape": "ToolUseId" - }, - "content": { - "shape": "ToolResultContent", - "documentation": "

Content of the tool result.

" - }, - "status": { - "shape": "ToolResultStatus" - } - }, - "documentation": "

A tool result that contains the results for a tool request that was previously made.

" - }, - "ToolResultContent": { - "type": "list", - "member": { - "shape": "ToolResultContentBlock" - } - }, - "ToolResultContentBlock": { - "type": "structure", - "members": { - "text": { - "shape": "ToolResultContentBlockTextString", - "documentation": "

A tool result that is text.

" - }, - "json": { - "shape": "SensitiveDocument", - "documentation": "

A tool result that is JSON format data.

" - } - }, - "union": true - }, - "ToolResultContentBlockTextString": { - "type": "string", - "max": 800000, - "min": 0, - "sensitive": true - }, - "ToolResultStatus": { - "type": "string", - "documentation": "

Status of the tools result.

", - "enum": ["success", "error"] - }, - "ToolResults": { - "type": "list", - "member": { - "shape": "ToolResult" - }, - "max": 10, - "min": 0 - }, - "ToolSpecification": { - "type": "structure", - "required": ["inputSchema", "name"], - "members": { - "inputSchema": { - "shape": "ToolInputSchema" - }, - "name": { - "shape": "ToolName" - }, - "description": { - "shape": "ToolDescription" - } - }, - "documentation": "

The specification for the tool.

" - }, - "ToolUse": { - "type": "structure", - "required": ["toolUseId", "name", "input"], - "members": { - "toolUseId": { - "shape": "ToolUseId" - }, - "name": { - "shape": "ToolName" - }, - "input": { - "shape": "SensitiveDocument", - "documentation": "

The input to pass to the tool.

" - } - }, - "documentation": "

Contains information about a tool that the model is requesting be run. The model uses the result from the tool to generate a response.

" - }, - "ToolUseId": { - "type": "string", - "documentation": "

The ID for the tool request.

", - "max": 64, - "min": 0, - "pattern": "[a-zA-Z0-9_-]+" - }, - "ToolUses": { - "type": "list", - "member": { - "shape": "ToolUse" - }, - "max": 10, - "min": 0 - }, - "Tools": { - "type": "list", - "member": { - "shape": "Tool" - } - }, - "TransformEvent": { - "type": "structure", - "required": ["jobId"], - "members": { - "jobId": { - "shape": "TransformationJobId" - }, - "timestamp": { - "shape": "Timestamp" - }, - "ideCategory": { - "shape": "IdeCategory" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "linesOfCodeChanged": { - "shape": "Integer" - }, - "charsOfCodeChanged": { - "shape": "Integer" - }, - "linesOfCodeSubmitted": { - "shape": "Integer" - } - } - }, - "TransformationDotNetRuntimeEnv": { - "type": "string", - "enum": ["NET_5_0", "NET_6_0", "NET_7_0", "NET_8_0", "NET_9_0", "NET_STANDARD_2_0"] - }, - "TransformationDownloadArtifact": { - "type": "structure", - "members": { - "downloadArtifactType": { - "shape": "TransformationDownloadArtifactType" - }, - "downloadArtifactId": { - "shape": "ArtifactId" - } - } - }, - "TransformationDownloadArtifactType": { - "type": "string", - "enum": ["ClientInstructions", "Logs", "GeneratedCode"] - }, - "TransformationDownloadArtifacts": { - "type": "list", - "member": { - "shape": "TransformationDownloadArtifact" - }, - "max": 10, - "min": 0 - }, - "TransformationJavaRuntimeEnv": { - "type": "string", - "enum": ["JVM_8", "JVM_11", "JVM_17", "JVM_21"] - }, - "TransformationJob": { - "type": "structure", - "members": { - "jobId": { - "shape": "TransformationJobId" - }, - "transformationSpec": { - "shape": "TransformationSpec" - }, - "status": { - "shape": "TransformationStatus" - }, - "reason": { - "shape": "String" - }, - "creationTime": { - "shape": "Timestamp" - }, - "startExecutionTime": { - "shape": "Timestamp" - }, - "endExecutionTime": { - "shape": "Timestamp" - } - }, - "documentation": "

Represent a Transformation Job

" - }, - "TransformationJobId": { - "type": "string", - "documentation": "

Identifier for the Transformation Job

", - "max": 128, - "min": 1 - }, - "TransformationLanguage": { - "type": "string", - "enum": ["JAVA_8", "JAVA_11", "JAVA_17", "JAVA_21", "C_SHARP", "COBOL", "PL_I", "JCL"] - }, - "TransformationLanguages": { - "type": "list", - "member": { - "shape": "TransformationLanguage" - } - }, - "TransformationMainframeRuntimeEnv": { - "type": "string", - "enum": ["MAINFRAME"] - }, - "TransformationOperatingSystemFamily": { - "type": "string", - "enum": ["WINDOWS", "LINUX"] - }, - "TransformationPlan": { - "type": "structure", - "required": ["transformationSteps"], - "members": { - "transformationSteps": { - "shape": "TransformationSteps" - } - } - }, - "TransformationPlatformConfig": { - "type": "structure", - "members": { - "operatingSystemFamily": { - "shape": "TransformationOperatingSystemFamily" - } - } - }, - "TransformationProgressUpdate": { - "type": "structure", - "required": ["name", "status"], - "members": { - "name": { - "shape": "String" - }, - "status": { - "shape": "TransformationProgressUpdateStatus" - }, - "description": { - "shape": "String" - }, - "startTime": { - "shape": "Timestamp" - }, - "endTime": { - "shape": "Timestamp" - }, - "downloadArtifacts": { - "shape": "TransformationDownloadArtifacts" - } - } - }, - "TransformationProgressUpdateStatus": { - "type": "string", - "enum": ["IN_PROGRESS", "COMPLETED", "FAILED", "PAUSED", "AWAITING_CLIENT_ACTION", "SKIPPED"] - }, - "TransformationProjectArtifactDescriptor": { - "type": "structure", - "members": { - "sourceCodeArtifact": { - "shape": "TransformationSourceCodeArtifactDescriptor" - } - }, - "union": true - }, - "TransformationProjectState": { - "type": "structure", - "members": { - "language": { - "shape": "TransformationLanguage" - }, - "runtimeEnv": { - "shape": "TransformationRuntimeEnv" - }, - "platformConfig": { - "shape": "TransformationPlatformConfig" - }, - "projectArtifact": { - "shape": "TransformationProjectArtifactDescriptor" - } - } - }, - "TransformationRuntimeEnv": { - "type": "structure", - "members": { - "java": { - "shape": "TransformationJavaRuntimeEnv" - }, - "dotNet": { - "shape": "TransformationDotNetRuntimeEnv" - }, - "mainframe": { - "shape": "TransformationMainframeRuntimeEnv" - } - }, - "union": true - }, - "TransformationSourceCodeArtifactDescriptor": { - "type": "structure", - "members": { - "languages": { - "shape": "TransformationLanguages" - }, - "runtimeEnv": { - "shape": "TransformationRuntimeEnv" - } - } - }, - "TransformationSpec": { - "type": "structure", - "members": { - "transformationType": { - "shape": "TransformationType" - }, - "source": { - "shape": "TransformationProjectState" - }, - "target": { - "shape": "TransformationProjectState" - } - } - }, - "TransformationStatus": { - "type": "string", - "enum": [ - "CREATED", - "ACCEPTED", - "REJECTED", - "STARTED", - "PREPARING", - "PREPARED", - "PLANNING", - "PLANNED", - "TRANSFORMING", - "TRANSFORMED", - "FAILED", - "COMPLETED", - "PARTIALLY_COMPLETED", - "STOPPING", - "STOPPED", - "PAUSED", - "RESUMED" - ] - }, - "TransformationStep": { - "type": "structure", - "required": ["id", "name", "description", "status"], - "members": { - "id": { - "shape": "StepId" - }, - "name": { - "shape": "String" - }, - "description": { - "shape": "String" - }, - "status": { - "shape": "TransformationStepStatus" - }, - "progressUpdates": { - "shape": "ProgressUpdates" - }, - "startTime": { - "shape": "Timestamp" - }, - "endTime": { - "shape": "Timestamp" - } - } - }, - "TransformationStepStatus": { - "type": "string", - "enum": ["CREATED", "COMPLETED", "PARTIALLY_COMPLETED", "STOPPED", "FAILED", "PAUSED", "SKIPPED"] - }, - "TransformationSteps": { - "type": "list", - "member": { - "shape": "TransformationStep" - } - }, - "TransformationType": { - "type": "string", - "enum": ["LANGUAGE_UPGRADE", "DOCUMENT_GENERATION"] - }, - "TransformationUploadArtifactType": { - "type": "string", - "enum": ["Dependencies", "ClientBuildResult"] - }, - "TransformationUploadContext": { - "type": "structure", - "required": ["jobId", "uploadArtifactType"], - "members": { - "jobId": { - "shape": "TransformationJobId" - }, - "uploadArtifactType": { - "shape": "TransformationUploadArtifactType" - } - } - }, - "TransformationUserActionStatus": { - "type": "string", - "enum": ["COMPLETED", "REJECTED"] - }, - "UUID": { - "type": "string", - "max": 36, - "min": 36 - }, - "UpdateUsageLimitQuotaExceededException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - } - }, - "documentation": "

Exception thrown when the number of usage limit update requests exceeds the monthly quota (default 3 requests per month)

", - "exception": true - }, - "UpdateUsageLimitsRequest": { - "type": "structure", - "required": ["accountId", "featureType", "requestedLimit"], - "members": { - "accountId": { - "shape": "String" - }, - "accountlessUserId": { - "shape": "String" - }, - "featureType": { - "shape": "UsageLimitType" - }, - "requestedLimit": { - "shape": "Long" - }, - "justification": { - "shape": "String" - } - } - }, - "UpdateUsageLimitsResponse": { - "type": "structure", - "required": ["status"], - "members": { - "status": { - "shape": "UsageLimitUpdateRequestStatus" - }, - "approvedLimit": { - "shape": "Long" - }, - "remainingRequestsThisMonth": { - "shape": "Integer" - } - } - }, - "UploadContext": { - "type": "structure", - "members": { - "taskAssistPlanningUploadContext": { - "shape": "TaskAssistPlanningUploadContext" - }, - "transformationUploadContext": { - "shape": "TransformationUploadContext" - }, - "codeAnalysisUploadContext": { - "shape": "CodeAnalysisUploadContext" - }, - "codeFixUploadContext": { - "shape": "CodeFixUploadContext" - }, - "workspaceContextUploadContext": { - "shape": "WorkspaceContextUploadContext" - } - }, - "union": true - }, - "UploadId": { - "type": "string", - "documentation": "

Upload ID returned by CreateUploadUrl API

", - "max": 128, - "min": 1 - }, - "UploadIntent": { - "type": "string", - "documentation": "

Upload Intent

", - "enum": [ - "TRANSFORMATION", - "TASK_ASSIST_PLANNING", - "AUTOMATIC_FILE_SECURITY_SCAN", - "FULL_PROJECT_SECURITY_SCAN", - "UNIT_TESTS_GENERATION", - "CODE_FIX_GENERATION", - "WORKSPACE_CONTEXT", - "AGENTIC_CODE_REVIEW" - ] - }, - "Url": { - "type": "string", - "max": 1024, - "min": 1 - }, - "UsageLimitList": { - "type": "structure", - "required": ["type", "currentUsage", "totalUsageLimit"], - "members": { - "type": { - "shape": "UsageLimitType" - }, - "currentUsage": { - "shape": "Long" - }, - "totalUsageLimit": { - "shape": "Long" - }, - "percentUsed": { - "shape": "Double" - } - } - }, - "UsageLimitType": { - "type": "string", - "enum": ["CODE_COMPLETIONS", "AGENTIC_REQUEST", "AI_EDITOR", "TRANSFORM"] - }, - "UsageLimitUpdateRequestStatus": { - "type": "string", - "enum": ["APPROVED", "PENDING_REVIEW", "REJECTED"] - }, - "UsageLimits": { - "type": "list", - "member": { - "shape": "UsageLimitList" - }, - "max": 10, - "min": 0 - }, - "UserContext": { - "type": "structure", - "required": ["ideCategory", "operatingSystem", "product"], - "members": { - "ideCategory": { - "shape": "IdeCategory" - }, - "operatingSystem": { - "shape": "OperatingSystem" - }, - "product": { - "shape": "UserContextProductString" - }, - "clientId": { - "shape": "UUID" - }, - "ideVersion": { - "shape": "String" - } - } - }, - "UserContextProductString": { - "type": "string", - "max": 128, - "min": 1, - "pattern": "[-a-zA-Z0-9._]*" - }, - "UserInputMessage": { - "type": "structure", - "required": ["content"], - "members": { - "content": { - "shape": "UserInputMessageContentString", - "documentation": "

The content of the chat message.

" - }, - "userInputMessageContext": { - "shape": "UserInputMessageContext", - "documentation": "

Chat message context associated with the Chat Message.

" - }, - "userIntent": { - "shape": "UserIntent", - "documentation": "

User Intent.

" - }, - "origin": { - "shape": "Origin", - "documentation": "

User Input Origin.

" - }, - "images": { - "shape": "ImageBlocks", - "documentation": "

Images associated with the Chat Message.

" - }, - "modelId": { - "shape": "ModelId", - "documentation": "

Unique identifier for the model used in this conversation

" - } - }, - "documentation": "

Structure to represent a chat input message from User.

" - }, - "UserInputMessageContentString": { - "type": "string", - "max": 600000, - "min": 0, - "sensitive": true - }, - "UserInputMessageContext": { - "type": "structure", - "members": { - "editorState": { - "shape": "EditorState", - "documentation": "

Editor state chat message context.

" - }, - "shellState": { - "shape": "ShellState", - "documentation": "

Shell state chat message context.

" - }, - "gitState": { - "shape": "GitState", - "documentation": "

Git state chat message context.

" - }, - "envState": { - "shape": "EnvState", - "documentation": "

Environment state chat message context.

" - }, - "appStudioContext": { - "shape": "AppStudioState", - "documentation": "

The state of a user's AppStudio UI when sending a message.

" - }, - "diagnostic": { - "shape": "Diagnostic", - "documentation": "

Diagnostic chat message context.

" - }, - "consoleState": { - "shape": "ConsoleState", - "documentation": "

Contextual information about the environment from which the user is calling.

" - }, - "userSettings": { - "shape": "UserSettings", - "documentation": "

Settings information, e.g., whether the user has enabled cross-region API calls.

" - }, - "additionalContext": { - "shape": "AdditionalContentList", - "documentation": "

List of additional contextual content entries that can be included with the message.

" - }, - "toolResults": { - "shape": "ToolResults", - "documentation": "

ToolResults for the requested ToolUses.

" - }, - "tools": { - "shape": "Tools", - "documentation": "

Tools that can be used.

" - } - }, - "documentation": "

Additional Chat message context associated with the Chat Message

" - }, - "UserIntent": { - "type": "string", - "documentation": "

User Intent

", - "enum": [ - "SUGGEST_ALTERNATE_IMPLEMENTATION", - "APPLY_COMMON_BEST_PRACTICES", - "IMPROVE_CODE", - "SHOW_EXAMPLES", - "CITE_SOURCES", - "EXPLAIN_LINE_BY_LINE", - "EXPLAIN_CODE_SELECTION", - "GENERATE_CLOUDFORMATION_TEMPLATE", - "GENERATE_UNIT_TESTS", - "CODE_GENERATION" - ] - }, - "UserModificationEvent": { - "type": "structure", - "required": [ - "sessionId", - "requestId", - "programmingLanguage", - "modificationPercentage", - "timestamp", - "acceptedCharacterCount", - "unmodifiedAcceptedCharacterCount" - ], - "members": { - "sessionId": { - "shape": "UUID" - }, - "requestId": { - "shape": "UUID" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "modificationPercentage": { - "shape": "Double" - }, - "customizationArn": { - "shape": "CustomizationArn" - }, - "timestamp": { - "shape": "Timestamp" - }, - "acceptedCharacterCount": { - "shape": "PrimitiveInteger" - }, - "unmodifiedAcceptedCharacterCount": { - "shape": "PrimitiveInteger" - }, - "addedCharacterCount": { - "shape": "UserModificationEventAddedCharacterCountInteger" - }, - "unmodifiedAddedCharacterCount": { - "shape": "UserModificationEventUnmodifiedAddedCharacterCountInteger" - } - } - }, - "UserModificationEventAddedCharacterCountInteger": { - "type": "integer", - "min": 0 - }, - "UserModificationEventUnmodifiedAddedCharacterCountInteger": { - "type": "integer", - "min": 0 - }, - "UserSettings": { - "type": "structure", - "members": { - "hasConsentedToCrossRegionCalls": { - "shape": "Boolean" - } - }, - "documentation": "

Settings information passed by the Q widget

" - }, - "UserTriggerDecisionEvent": { - "type": "structure", - "required": [ - "sessionId", - "requestId", - "programmingLanguage", - "completionType", - "suggestionState", - "recommendationLatencyMilliseconds", - "timestamp" - ], - "members": { - "sessionId": { - "shape": "UUID" - }, - "requestId": { - "shape": "UUID" - }, - "customizationArn": { - "shape": "CustomizationArn" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - }, - "completionType": { - "shape": "CompletionType" - }, - "suggestionState": { - "shape": "SuggestionState" - }, - "recommendationLatencyMilliseconds": { - "shape": "Double" - }, - "timestamp": { - "shape": "Timestamp" - }, - "triggerToResponseLatencyMilliseconds": { - "shape": "Double" - }, - "suggestionReferenceCount": { - "shape": "PrimitiveInteger" - }, - "generatedLine": { - "shape": "PrimitiveInteger" - }, - "numberOfRecommendations": { - "shape": "PrimitiveInteger" - }, - "perceivedLatencyMilliseconds": { - "shape": "Double" - }, - "acceptedCharacterCount": { - "shape": "PrimitiveInteger" - }, - "addedIdeDiagnostics": { - "shape": "IdeDiagnosticList" - }, - "removedIdeDiagnostics": { - "shape": "IdeDiagnosticList" - }, - "addedCharacterCount": { - "shape": "UserTriggerDecisionEventAddedCharacterCountInteger" - }, - "deletedCharacterCount": { - "shape": "UserTriggerDecisionEventDeletedCharacterCountInteger" - }, - "streakLength": { - "shape": "UserTriggerDecisionEventStreakLengthInteger" - } - } - }, - "UserTriggerDecisionEventAddedCharacterCountInteger": { - "type": "integer", - "min": 0 - }, - "UserTriggerDecisionEventDeletedCharacterCountInteger": { - "type": "integer", - "min": 0 - }, - "UserTriggerDecisionEventStreakLengthInteger": { - "type": "integer", - "min": -1 - }, - "ValidationException": { - "type": "structure", - "required": ["message"], - "members": { - "message": { - "shape": "String" - }, - "reason": { - "shape": "ValidationExceptionReason" - } - }, - "documentation": "

This exception is thrown when the input fails to satisfy the constraints specified by the service.

", - "exception": true - }, - "ValidationExceptionReason": { - "type": "string", - "documentation": "

Reason for ValidationException

", - "enum": ["INVALID_CONVERSATION_ID", "CONTENT_LENGTH_EXCEEDS_THRESHOLD", "INVALID_KMS_GRANT"] - }, - "WorkspaceContext": { - "type": "structure", - "required": ["toggle"], - "members": { - "toggle": { - "shape": "OptInFeatureToggle" - } - } - }, - "WorkspaceContextUploadContext": { - "type": "structure", - "required": ["workspaceId", "relativePath", "programmingLanguage"], - "members": { - "workspaceId": { - "shape": "UUID" - }, - "relativePath": { - "shape": "SensitiveString" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage" - } - } - }, - "WorkspaceFolderList": { - "type": "list", - "member": { - "shape": "WorkspaceFolderListMemberString" - }, - "max": 100, - "min": 0 - }, - "WorkspaceFolderListMemberString": { - "type": "string", - "max": 4096, - "min": 1, - "sensitive": true - }, - "WorkspaceList": { - "type": "list", - "member": { - "shape": "WorkspaceMetadata" - } - }, - "WorkspaceMetadata": { - "type": "structure", - "required": ["workspaceId", "workspaceStatus"], - "members": { - "workspaceId": { - "shape": "UUID" - }, - "workspaceStatus": { - "shape": "WorkspaceStatus" - }, - "environmentAddress": { - "shape": "SensitiveString" - }, - "environmentId": { - "shape": "SensitiveString" - } - } - }, - "WorkspaceState": { - "type": "structure", - "required": ["uploadId", "programmingLanguage"], - "members": { - "uploadId": { - "shape": "UploadId", - "documentation": "

Upload ID representing an Upload using a PreSigned URL

" - }, - "programmingLanguage": { - "shape": "ProgrammingLanguage", - "documentation": "

Primary programming language of the Workspace

" - }, - "contextTruncationScheme": { - "shape": "ContextTruncationScheme", - "documentation": "

Workspace context truncation schemes based on usecase

" - } - }, - "documentation": "

Represents a Workspace state uploaded to S3 for Async Code Actions

" - }, - "WorkspaceStatus": { - "type": "string", - "enum": ["CREATED", "PENDING", "READY", "CONNECTED", "DELETING"] - }, - "timeBetweenChunks": { - "type": "list", - "member": { - "shape": "Double" - }, - "max": 100, - "min": 0 - } - } -} diff --git a/server/aws-lsp-codewhisperer/src/client/token/codewhisperer.ts b/server/aws-lsp-codewhisperer/src/client/token/codewhisperer.ts index 145073a7ba..9103897e18 100644 --- a/server/aws-lsp-codewhisperer/src/client/token/codewhisperer.ts +++ b/server/aws-lsp-codewhisperer/src/client/token/codewhisperer.ts @@ -1,49 +1,66 @@ -import { AWSError, Request, Service } from 'aws-sdk' -import { ServiceConfigurationOptions } from 'aws-sdk/lib/service' -const apiConfig = require('./bearer-token-service.json') -import CodeWhispererClient = require('./codewhispererbearertokenclient') -import { SDKInitializator, Logging } from '@aws/language-server-runtimes/server-interface' -// PROOF OF CONCEPT -// This client fiddling was copied from the AWS Toolkit for VS Code -// https://github.com/aws/aws-toolkit-vscode/blob/5d621c8405a8b20ffe571ad0ba10ae700178e051/src/shared/awsClientBuilder.ts#L68 -// We'll want to give this a common shape down in one of the core packages so -// that we can re-use it in other bearer token based clients. -export interface RequestExtras { - readonly service: AWS.Service - readonly operation: string - readonly params?: any -} +import { CodeWhispererRuntimeClient, CodeWhispererRuntimeClientConfig } from '@amzn/codewhisperer-runtime' +import { SDKInitializator, Logging, CredentialsProvider } from '@aws/language-server-runtimes/server-interface' +import { HttpResponse, HttpRequest } from '@smithy/types' -type RequestListener = (request: AWS.Request & RequestExtras) => void -export interface CodeWhispererTokenClientConfigurationOptions extends ServiceConfigurationOptions { - onRequestSetup?: RequestListener | RequestListener[] +export interface CodeWhispererTokenClientConfigurationOptions extends CodeWhispererRuntimeClientConfig { + // Add any custom options if needed } export function createCodeWhispererTokenClient( options: CodeWhispererTokenClientConfigurationOptions, sdkInitializator: SDKInitializator, - logging: Logging -): CodeWhispererClient { - return createService(options, sdkInitializator, logging) as CodeWhispererClient -} + logging: Logging, + credentialsProvider: CredentialsProvider, + shareCodeWhispererContentWithAWS: boolean +): CodeWhispererRuntimeClient { + logging.log( + `Passing client for class CodeWhispererRuntimeClient to sdkInitializator (v3) for additional setup (e.g. proxy)` + ) -function createService( - options: CodeWhispererTokenClientConfigurationOptions, - sdkInitializator: SDKInitializator, - logging: Logging -): Service { - const onRequest = options?.onRequestSetup ?? [] - const listeners = Array.isArray(onRequest) ? onRequest : [onRequest] - const opt = { ...options } - delete opt.onRequestSetup - logging.log(`Passing client for class Service to sdkInitializator (v2) for additional setup (e.g. proxy)`) - const client = sdkInitializator.v2(Service, { apiConfig, ...options } as any) - const originalClient = client.setupRequestListeners.bind(client) - - client.setupRequestListeners = (request: Request) => { - originalClient(request) - listeners.forEach(l => l(request as AWS.Request & RequestExtras)) - } + const client = sdkInitializator(CodeWhispererRuntimeClient, { + ...options, + }) + + // Add middleware for custom headers + client.middlewareStack.add( + next => async args => { + const request = args.request as HttpRequest + request.headers['x-amzn-codewhisperer-optout'] = `${!shareCodeWhispererContentWithAWS}` + + if (credentialsProvider.getConnectionType() === 'external_idp') { + request.headers['TokenType'] = 'EXTERNAL_IDP' + } + + return next(args) + }, + { step: 'build', priority: 'high' } + ) + + // Add middleware to capture HTTP headers + client.middlewareStack.add( + next => async args => { + const result = await next(args) + + // Store headers on the response metadata + if (result.response) { + const httpResponse = result.response as HttpResponse + if (httpResponse.headers && result.output?.$metadata) { + // Extend metadata to include headers + ;(result.output.$metadata as any).httpHeaders = httpResponse.headers + } + } + + return result + }, + { + step: 'deserialize', + name: 'captureHeaders', + priority: 'high', + } + ) return client } + +// Export the V3 client type for compatibility +export type CodeWhispererTokenClient = CodeWhispererRuntimeClient diff --git a/server/aws-lsp-codewhisperer/src/client/token/codewhispererbearertokenclient.d.ts b/server/aws-lsp-codewhisperer/src/client/token/codewhispererbearertokenclient.d.ts deleted file mode 100644 index 2189944d4f..0000000000 --- a/server/aws-lsp-codewhisperer/src/client/token/codewhispererbearertokenclient.d.ts +++ /dev/null @@ -1,2149 +0,0 @@ - -/** - * THIS FILE IS AUTOGENERATED BY 'generateServiceClient.ts'. - * DO NOT EDIT BY HAND. - */ -import {Request} from 'aws-sdk/lib/request'; -import {Response} from 'aws-sdk/lib/response'; -import {AWSError} from 'aws-sdk/lib/error'; -import {Service} from 'aws-sdk/lib/service'; -import {ServiceConfigurationOptions} from 'aws-sdk/lib/service'; -import {ConfigBase as Config} from 'aws-sdk/lib/config-base'; -interface Blob {} -declare class CodeWhispererBearerTokenClient extends Service { - /** - * Constructs a service object. This object has one method for each API operation. - */ - constructor(options?: CodeWhispererBearerTokenClient.Types.ClientConfiguration) - config: Config & CodeWhispererBearerTokenClient.Types.ClientConfiguration; - /** - * Creates a pre-signed, S3 write URL for uploading a repository zip archive. - */ - createArtifactUploadUrl(params: CodeWhispererBearerTokenClient.Types.CreateUploadUrlRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateUploadUrlResponse) => void): Request; - /** - * Creates a pre-signed, S3 write URL for uploading a repository zip archive. - */ - createArtifactUploadUrl(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateUploadUrlResponse) => void): Request; - /** - * - */ - createSubscriptionToken(params: CodeWhispererBearerTokenClient.Types.CreateSubscriptionTokenRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateSubscriptionTokenResponse) => void): Request; - /** - * - */ - createSubscriptionToken(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateSubscriptionTokenResponse) => void): Request; - /** - * API to create task assist conversation. - */ - createTaskAssistConversation(params: CodeWhispererBearerTokenClient.Types.CreateTaskAssistConversationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateTaskAssistConversationResponse) => void): Request; - /** - * API to create task assist conversation. - */ - createTaskAssistConversation(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateTaskAssistConversationResponse) => void): Request; - /** - * Creates a pre-signed, S3 write URL for uploading a repository zip archive. - */ - createUploadUrl(params: CodeWhispererBearerTokenClient.Types.CreateUploadUrlRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateUploadUrlResponse) => void): Request; - /** - * Creates a pre-signed, S3 write URL for uploading a repository zip archive. - */ - createUploadUrl(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateUploadUrlResponse) => void): Request; - /** - * API to create a single user memory entry - */ - createUserMemoryEntry(params: CodeWhispererBearerTokenClient.Types.CreateUserMemoryEntryInput, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateUserMemoryEntryOutput) => void): Request; - /** - * API to create a single user memory entry - */ - createUserMemoryEntry(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateUserMemoryEntryOutput) => void): Request; - /** - * Create a workspace based on a workspace root - */ - createWorkspace(params: CodeWhispererBearerTokenClient.Types.CreateWorkspaceRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateWorkspaceResponse) => void): Request; - /** - * Create a workspace based on a workspace root - */ - createWorkspace(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.CreateWorkspaceResponse) => void): Request; - /** - * API to delete task assist conversation. - */ - deleteTaskAssistConversation(params: CodeWhispererBearerTokenClient.Types.DeleteTaskAssistConversationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.DeleteTaskAssistConversationResponse) => void): Request; - /** - * API to delete task assist conversation. - */ - deleteTaskAssistConversation(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.DeleteTaskAssistConversationResponse) => void): Request; - /** - * API to delete a single user memory entry - */ - deleteUserMemoryEntry(params: CodeWhispererBearerTokenClient.Types.DeleteUserMemoryEntryInput, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.DeleteUserMemoryEntryOutput) => void): Request; - /** - * API to delete a single user memory entry - */ - deleteUserMemoryEntry(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.DeleteUserMemoryEntryOutput) => void): Request; - /** - * Delete a workspace based on a workspaceId - */ - deleteWorkspace(params: CodeWhispererBearerTokenClient.Types.DeleteWorkspaceRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.DeleteWorkspaceResponse) => void): Request; - /** - * Delete a workspace based on a workspaceId - */ - deleteWorkspace(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.DeleteWorkspaceResponse) => void): Request; - /** - * Generate completions based on the provided file context in a paginated response. - */ - generateCompletions(params: CodeWhispererBearerTokenClient.Types.GenerateCompletionsRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GenerateCompletionsResponse) => void): Request; - /** - * Generate completions based on the provided file context in a paginated response. - */ - generateCompletions(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GenerateCompletionsResponse) => void): Request; - /** - * Gets the metadata of a code analysis job. - */ - getCodeAnalysis(params: CodeWhispererBearerTokenClient.Types.GetCodeAnalysisRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetCodeAnalysisResponse) => void): Request; - /** - * Gets the metadata of a code analysis job. - */ - getCodeAnalysis(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetCodeAnalysisResponse) => void): Request; - /** - * - */ - getCodeFixJob(params: CodeWhispererBearerTokenClient.Types.GetCodeFixJobRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetCodeFixJobResponse) => void): Request; - /** - * - */ - getCodeFixJob(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetCodeFixJobResponse) => void): Request; - /** - * API to get status of task assist code generation. - */ - getTaskAssistCodeGeneration(params: CodeWhispererBearerTokenClient.Types.GetTaskAssistCodeGenerationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetTaskAssistCodeGenerationResponse) => void): Request; - /** - * API to get status of task assist code generation. - */ - getTaskAssistCodeGeneration(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetTaskAssistCodeGenerationResponse) => void): Request; - /** - * API to get test generation job. - */ - getTestGeneration(params: CodeWhispererBearerTokenClient.Types.GetTestGenerationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetTestGenerationResponse) => void): Request; - /** - * API to get test generation job. - */ - getTestGeneration(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetTestGenerationResponse) => void): Request; - /** - * API to get code transformation status. - */ - getTransformation(params: CodeWhispererBearerTokenClient.Types.GetTransformationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetTransformationResponse) => void): Request; - /** - * API to get code transformation status. - */ - getTransformation(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetTransformationResponse) => void): Request; - /** - * API to get code transformation status. - */ - getTransformationPlan(params: CodeWhispererBearerTokenClient.Types.GetTransformationPlanRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetTransformationPlanResponse) => void): Request; - /** - * API to get code transformation status. - */ - getTransformationPlan(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetTransformationPlanResponse) => void): Request; - /** - * API to get current usage limits - */ - getUsageLimits(params: CodeWhispererBearerTokenClient.Types.GetUsageLimitsRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetUsageLimitsResponse) => void): Request; - /** - * API to get current usage limits - */ - getUsageLimits(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.GetUsageLimitsResponse) => void): Request; - /** - * - */ - listAvailableCustomizations(params: CodeWhispererBearerTokenClient.Types.ListAvailableCustomizationsRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListAvailableCustomizationsResponse) => void): Request; - /** - * - */ - listAvailableCustomizations(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListAvailableCustomizationsResponse) => void): Request; - /** - * - */ - listAvailableModels(params: CodeWhispererBearerTokenClient.Types.ListAvailableModelsRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListAvailableModelsResponse) => void): Request; - /** - * - */ - listAvailableModels(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListAvailableModelsResponse) => void): Request; - /** - * - */ - listAvailableProfiles(params: CodeWhispererBearerTokenClient.Types.ListAvailableProfilesRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListAvailableProfilesResponse) => void): Request; - /** - * - */ - listAvailableProfiles(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListAvailableProfilesResponse) => void): Request; - /** - * Lists the findings from a particular code analysis job. - */ - listCodeAnalysisFindings(params: CodeWhispererBearerTokenClient.Types.ListCodeAnalysisFindingsRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListCodeAnalysisFindingsResponse) => void): Request; - /** - * Lists the findings from a particular code analysis job. - */ - listCodeAnalysisFindings(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListCodeAnalysisFindingsResponse) => void): Request; - /** - * List events for agent activity - */ - listEvents(params: CodeWhispererBearerTokenClient.Types.ListEventsRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListEventsResponse) => void): Request; - /** - * List events for agent activity - */ - listEvents(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListEventsResponse) => void): Request; - /** - * Return configruations for each feature that has been setup for A/B testing. - */ - listFeatureEvaluations(params: CodeWhispererBearerTokenClient.Types.ListFeatureEvaluationsRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListFeatureEvaluationsResponse) => void): Request; - /** - * Return configruations for each feature that has been setup for A/B testing. - */ - listFeatureEvaluations(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListFeatureEvaluationsResponse) => void): Request; - /** - * API to list user memories - */ - listUserMemoryEntries(params: CodeWhispererBearerTokenClient.Types.ListUserMemoryEntriesInput, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListUserMemoryEntriesOutput) => void): Request; - /** - * API to list user memories - */ - listUserMemoryEntries(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListUserMemoryEntriesOutput) => void): Request; - /** - * List workspace metadata based on a workspace root - */ - listWorkspaceMetadata(params: CodeWhispererBearerTokenClient.Types.ListWorkspaceMetadataRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListWorkspaceMetadataResponse) => void): Request; - /** - * List workspace metadata based on a workspace root - */ - listWorkspaceMetadata(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ListWorkspaceMetadataResponse) => void): Request; - /** - * API to push telemetry events to CloudWatch, DataHub and EventBridge. - */ - pushTelemetryEvent(params: CodeWhispererBearerTokenClient.Types.PushTelemetryEventRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.PushTelemetryEventResponse) => void): Request; - /** - * API to push telemetry events to CloudWatch, DataHub and EventBridge. - */ - pushTelemetryEvent(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.PushTelemetryEventResponse) => void): Request; - /** - * API to resume transformation job. - */ - resumeTransformation(params: CodeWhispererBearerTokenClient.Types.ResumeTransformationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ResumeTransformationResponse) => void): Request; - /** - * API to resume transformation job. - */ - resumeTransformation(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.ResumeTransformationResponse) => void): Request; - /** - * API to record telemetry events. - */ - sendTelemetryEvent(params: CodeWhispererBearerTokenClient.Types.SendTelemetryEventRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.SendTelemetryEventResponse) => void): Request; - /** - * API to record telemetry events. - */ - sendTelemetryEvent(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.SendTelemetryEventResponse) => void): Request; - /** - * Starts a code analysis job - */ - startCodeAnalysis(params: CodeWhispererBearerTokenClient.Types.StartCodeAnalysisRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartCodeAnalysisResponse) => void): Request; - /** - * Starts a code analysis job - */ - startCodeAnalysis(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartCodeAnalysisResponse) => void): Request; - /** - * - */ - startCodeFixJob(params: CodeWhispererBearerTokenClient.Types.StartCodeFixJobRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartCodeFixJobResponse) => void): Request; - /** - * - */ - startCodeFixJob(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartCodeFixJobResponse) => void): Request; - /** - * API to start task assist code generation. - */ - startTaskAssistCodeGeneration(params: CodeWhispererBearerTokenClient.Types.StartTaskAssistCodeGenerationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartTaskAssistCodeGenerationResponse) => void): Request; - /** - * API to start task assist code generation. - */ - startTaskAssistCodeGeneration(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartTaskAssistCodeGenerationResponse) => void): Request; - /** - * API to start test generation. - */ - startTestGeneration(params: CodeWhispererBearerTokenClient.Types.StartTestGenerationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartTestGenerationResponse) => void): Request; - /** - * API to start test generation. - */ - startTestGeneration(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartTestGenerationResponse) => void): Request; - /** - * API to start code translation. - */ - startTransformation(params: CodeWhispererBearerTokenClient.Types.StartTransformationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartTransformationResponse) => void): Request; - /** - * API to start code translation. - */ - startTransformation(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StartTransformationResponse) => void): Request; - /** - * API to stop code transformation status. - */ - stopTransformation(params: CodeWhispererBearerTokenClient.Types.StopTransformationRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StopTransformationResponse) => void): Request; - /** - * API to stop code transformation status. - */ - stopTransformation(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.StopTransformationResponse) => void): Request; - /** - * API to update usage limits for enterprise customers - */ - updateUsageLimits(params: CodeWhispererBearerTokenClient.Types.UpdateUsageLimitsRequest, callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.UpdateUsageLimitsResponse) => void): Request; - /** - * API to update usage limits for enterprise customers - */ - updateUsageLimits(callback?: (err: AWSError, data: CodeWhispererBearerTokenClient.Types.UpdateUsageLimitsResponse) => void): Request; -} -declare namespace CodeWhispererBearerTokenClient { - export type ActivationToken = string; - export type ActiveFunctionalityList = FunctionalityName[]; - export interface AdditionalContentEntry { - /** - * The name/identifier for this context entry - */ - name: AdditionalContentEntryNameString; - /** - * A description of what this context entry represents - */ - description: AdditionalContentEntryDescriptionString; - /** - * The actual contextual content - */ - innerContext?: AdditionalContentEntryInnerContextString; - } - export type AdditionalContentEntryDescriptionString = string; - export type AdditionalContentEntryInnerContextString = string; - export type AdditionalContentEntryNameString = string; - export type AdditionalContentList = AdditionalContentEntry[]; - export type AgenticChatEventStatus = "SUCCEEDED"|"CANCELLED"|"FAILED"|string; - export interface AppStudioState { - /** - * The namespace of the context. Examples: 'ui.Button', 'ui.Table.DataSource', 'ui.Table.RowActions.Button', 'logic.invokeAWS', 'logic.JavaScript' - */ - namespace: AppStudioStateNamespaceString; - /** - * The name of the property. Examples: 'visibility', 'disability', 'value', 'code' - */ - propertyName: AppStudioStatePropertyNameString; - /** - * The value of the property. - */ - propertyValue?: AppStudioStatePropertyValueString; - /** - * Context about how the property is used - */ - propertyContext: AppStudioStatePropertyContextString; - } - export type AppStudioStateNamespaceString = string; - export type AppStudioStatePropertyContextString = string; - export type AppStudioStatePropertyNameString = string; - export type AppStudioStatePropertyValueString = string; - export interface ApplicationProperties { - tenantId: TenantId; - applicationArn: ResourceArn; - tenantUrl: Url; - applicationType: FunctionalityName; - } - export type ApplicationPropertiesList = ApplicationProperties[]; - export type ArtifactId = string; - export type ArtifactMap = {[key: string]: UploadId}; - export type ArtifactType = "SourceCode"|"BuiltJars"|string; - export interface AssistantResponseMessage { - messageId?: MessageId; - /** - * The content of the text message in markdown format. - */ - content: AssistantResponseMessageContentString; - /** - * Web References - */ - supplementaryWebLinks?: SupplementaryWebLinks; - /** - * Code References - */ - references?: References; - /** - * Followup Prompt - */ - followupPrompt?: FollowupPrompt; - /** - * ToolUse Request - */ - toolUses?: ToolUses; - } - export type AssistantResponseMessageContentString = string; - export type AttributesMap = {[key: string]: StringList}; - export type AttributesMapKeyString = string; - export type Base64EncodedPaginationToken = string; - export type Boolean = boolean; - export interface ByUserAnalytics { - s3Uri?: S3Uri; - toggle: OptInFeatureToggle; - } - export type ChangeLogGranularityType = "STANDARD"|"BUSINESS"|string; - export interface ChangeLogOptions { - granularity: ChangeLogGranularityType; - } - export interface ChatAddMessageEvent { - conversationId: ConversationId; - messageId: MessageId; - customizationArn?: CustomizationArn; - userIntent?: UserIntent; - hasCodeSnippet?: Boolean; - programmingLanguage?: ProgrammingLanguage; - activeEditorTotalCharacters?: Integer; - timeToFirstChunkMilliseconds?: Double; - timeBetweenChunks?: timeBetweenChunks; - fullResponselatency?: Double; - requestLength?: Integer; - responseLength?: Integer; - numberOfCodeBlocks?: Integer; - hasProjectLevelContext?: Boolean; - result?: AgenticChatEventStatus; - } - export type ChatHistory = ChatMessage[]; - export interface ChatInteractWithMessageEvent { - conversationId: ConversationId; - messageId: MessageId; - customizationArn?: CustomizationArn; - interactionType?: ChatMessageInteractionType; - interactionTarget?: ChatInteractWithMessageEventInteractionTargetString; - acceptedCharacterCount?: Integer; - acceptedLineCount?: Integer; - acceptedSnippetHasReference?: Boolean; - hasProjectLevelContext?: Boolean; - userIntent?: UserIntent; - addedIdeDiagnostics?: IdeDiagnosticList; - removedIdeDiagnostics?: IdeDiagnosticList; - } - export type ChatInteractWithMessageEventInteractionTargetString = string; - export interface ChatMessage { - userInputMessage?: UserInputMessage; - assistantResponseMessage?: AssistantResponseMessage; - } - export type ChatMessageInteractionType = "INSERT_AT_CURSOR"|"COPY_SNIPPET"|"COPY"|"CLICK_LINK"|"CLICK_BODY_LINK"|"CLICK_FOLLOW_UP"|"HOVER_REFERENCE"|"UPVOTE"|"DOWNVOTE"|string; - export type ChatTriggerType = "MANUAL"|"DIAGNOSTIC"|"INLINE_CHAT"|string; - export interface ChatUserModificationEvent { - conversationId: ConversationId; - customizationArn?: CustomizationArn; - messageId: MessageId; - programmingLanguage?: ProgrammingLanguage; - modificationPercentage: Double; - hasProjectLevelContext?: Boolean; - } - export type ClientId = string; - export type CodeAnalysisFindingsSchema = "codeanalysis/findings/1.0"|string; - export type CodeAnalysisScope = "FILE"|"PROJECT"|"AGENTIC"|string; - export type CodeAnalysisStatus = "Completed"|"Pending"|"Failed"|string; - export interface CodeAnalysisUploadContext { - codeScanName: CodeScanName; - } - export interface CodeCoverageEvent { - customizationArn?: CustomizationArn; - programmingLanguage: ProgrammingLanguage; - acceptedCharacterCount: PrimitiveInteger; - totalCharacterCount: PrimitiveInteger; - timestamp: Timestamp; - unmodifiedAcceptedCharacterCount?: PrimitiveInteger; - totalNewCodeCharacterCount?: PrimitiveInteger; - totalNewCodeLineCount?: PrimitiveInteger; - userWrittenCodeCharacterCount?: CodeCoverageEventUserWrittenCodeCharacterCountInteger; - userWrittenCodeLineCount?: CodeCoverageEventUserWrittenCodeLineCountInteger; - addedCharacterCount?: CodeCoverageEventAddedCharacterCountInteger; - } - export type CodeCoverageEventAddedCharacterCountInteger = number; - export type CodeCoverageEventUserWrittenCodeCharacterCountInteger = number; - export type CodeCoverageEventUserWrittenCodeLineCountInteger = number; - export interface CodeDescription { - /** - * An URI to open with more information about the diagnostic error. - */ - href: CodeDescriptionHrefString; - } - export type CodeDescriptionHrefString = string; - export interface CodeDiffMetadata { - codeDiffPath?: CodeDiffPath; - } - export type CodeDiffPath = string; - export interface CodeFixAcceptanceEvent { - jobId: String; - ruleId?: String; - detectorId?: String; - findingId?: String; - programmingLanguage?: ProgrammingLanguage; - linesOfCodeAccepted?: Integer; - charsOfCodeAccepted?: Integer; - } - export interface CodeFixGenerationEvent { - jobId: String; - ruleId?: String; - detectorId?: String; - findingId?: String; - programmingLanguage?: ProgrammingLanguage; - linesOfCodeGenerated?: Integer; - charsOfCodeGenerated?: Integer; - } - export type CodeFixJobStatus = "Succeeded"|"InProgress"|"Failed"|string; - export type CodeFixName = string; - export interface CodeFixUploadContext { - codeFixName: CodeFixName; - } - export type CodeGenerationId = string; - export interface CodeGenerationStatus { - status: CodeGenerationWorkflowStatus; - currentStage: CodeGenerationWorkflowStage; - } - export type CodeGenerationStatusDetail = string; - export type CodeGenerationWorkflowStage = "InitialCodeGeneration"|"CodeRefinement"|string; - export type CodeGenerationWorkflowStatus = "InProgress"|"Complete"|"Failed"|string; - export interface CodeScanEvent { - programmingLanguage: ProgrammingLanguage; - codeScanJobId: CodeScanJobId; - timestamp: Timestamp; - codeAnalysisScope?: CodeAnalysisScope; - } - export interface CodeScanFailedEvent { - programmingLanguage: ProgrammingLanguage; - codeScanJobId: CodeScanJobId; - timestamp: Timestamp; - codeAnalysisScope?: CodeAnalysisScope; - } - export type CodeScanJobId = string; - export type CodeScanName = string; - export interface CodeScanRemediationsEvent { - programmingLanguage?: ProgrammingLanguage; - CodeScanRemediationsEventType?: CodeScanRemediationsEventType; - timestamp?: Timestamp; - detectorId?: String; - findingId?: String; - ruleId?: String; - component?: String; - reason?: String; - result?: String; - includesFix?: Boolean; - } - export type CodeScanRemediationsEventType = "CODESCAN_ISSUE_HOVER"|"CODESCAN_ISSUE_APPLY_FIX"|"CODESCAN_ISSUE_VIEW_DETAILS"|string; - export interface CodeScanSucceededEvent { - programmingLanguage: ProgrammingLanguage; - codeScanJobId: CodeScanJobId; - timestamp: Timestamp; - numberOfFindings: PrimitiveInteger; - codeAnalysisScope?: CodeAnalysisScope; - } - export interface Completion { - content: CompletionContentString; - references?: References; - mostRelevantMissingImports?: Imports; - } - export type CompletionContentString = string; - export type CompletionType = "BLOCK"|"LINE"|string; - export type Completions = Completion[]; - export interface ConsoleState { - region?: String; - consoleUrl?: SensitiveString; - serviceId?: String; - serviceConsolePage?: String; - serviceSubconsolePage?: String; - taskName?: SensitiveString; - } - export type ContentChecksumType = "SHA_256"|string; - export type ContentType = "FILE"|"PROMPT"|"CODE"|"WORKSPACE"|string; - export type ContextTruncationScheme = "ANALYSIS"|"GUMBY"|string; - export type ConversationId = string; - export interface ConversationState { - /** - * Unique identifier for the chat conversation stream - */ - conversationId?: ConversationId; - /** - * Unique identifier for remote workspace - */ - workspaceId?: UUID; - /** - * Holds the history of chat messages. - */ - history?: ChatHistory; - /** - * Holds the current message being processed or displayed. - */ - currentMessage: ChatMessage; - /** - * Trigger Reason for Chat - */ - chatTriggerType: ChatTriggerType; - customizationArn?: ResourceArn; - } - export interface CreateSubscriptionTokenRequest { - clientToken?: IdempotencyToken; - statusOnly?: Boolean; - } - export interface CreateSubscriptionTokenResponse { - encodedVerificationUrl?: EncodedVerificationUrl; - token?: ActivationToken; - status: SubscriptionStatus; - } - export interface CreateTaskAssistConversationRequest { - profileArn?: ProfileArn; - } - export interface CreateTaskAssistConversationResponse { - conversationId: ConversationId; - } - export interface CreateUploadUrlRequest { - contentMd5?: CreateUploadUrlRequestContentMd5String; - contentChecksum?: CreateUploadUrlRequestContentChecksumString; - contentChecksumType?: ContentChecksumType; - contentLength?: CreateUploadUrlRequestContentLengthLong; - artifactType?: ArtifactType; - uploadIntent?: UploadIntent; - uploadContext?: UploadContext; - uploadId?: UploadId; - profileArn?: ProfileArn; - } - export type CreateUploadUrlRequestContentChecksumString = string; - export type CreateUploadUrlRequestContentLengthLong = number; - export type CreateUploadUrlRequestContentMd5String = string; - export interface CreateUploadUrlResponse { - uploadId: UploadId; - uploadUrl: PreSignedUrl; - kmsKeyArn?: ResourceArn; - requestHeaders?: RequestHeaders; - } - export interface CreateUserMemoryEntryInput { - memoryEntryString: CreateUserMemoryEntryInputMemoryEntryStringString; - origin: Origin; - /** - * ProfileArn for the managing Q Profile - */ - profileArn?: CreateUserMemoryEntryInputProfileArnString; - clientToken?: IdempotencyToken; - } - export type CreateUserMemoryEntryInputMemoryEntryStringString = string; - export type CreateUserMemoryEntryInputProfileArnString = string; - export interface CreateUserMemoryEntryOutput { - memoryEntry: MemoryEntry; - } - export interface CreateWorkspaceRequest { - workspaceRoot: CreateWorkspaceRequestWorkspaceRootString; - profileArn?: ProfileArn; - } - export type CreateWorkspaceRequestWorkspaceRootString = string; - export interface CreateWorkspaceResponse { - workspace: WorkspaceMetadata; - } - export interface CursorState { - /** - * Represents a cursor position in a Text Document - */ - position?: Position; - /** - * Represents a text selection in a Text Document - */ - range?: Range; - } - export interface Customization { - arn: CustomizationArn; - name?: CustomizationName; - description?: Description; - modelId?: ModelId; - } - export type CustomizationArn = string; - export type CustomizationName = string; - export type Customizations = Customization[]; - export interface DashboardAnalytics { - toggle: OptInFeatureToggle; - } - export interface DeleteTaskAssistConversationRequest { - conversationId: ConversationId; - profileArn?: ProfileArn; - } - export interface DeleteTaskAssistConversationResponse { - conversationId: ConversationId; - } - export interface DeleteUserMemoryEntryInput { - id: DeleteUserMemoryEntryInputIdString; - /** - * ProfileArn for the managing Q Profile - */ - profileArn?: DeleteUserMemoryEntryInputProfileArnString; - } - export type DeleteUserMemoryEntryInputIdString = string; - export type DeleteUserMemoryEntryInputProfileArnString = string; - export interface DeleteUserMemoryEntryOutput { - } - export interface DeleteWorkspaceRequest { - workspaceId: UUID; - profileArn?: ProfileArn; - } - export interface DeleteWorkspaceResponse { - } - export type Description = string; - export interface Diagnostic { - /** - * Diagnostics originating from a TextDocument - */ - textDocumentDiagnostic?: TextDocumentDiagnostic; - /** - * Diagnostics originating from a Runtime - */ - runtimeDiagnostic?: RuntimeDiagnostic; - } - export interface DiagnosticLocation { - uri: DiagnosticLocationUriString; - range: Range; - } - export type DiagnosticLocationUriString = string; - export interface DiagnosticRelatedInformation { - /** - * The location of this related diagnostic information. - */ - location: DiagnosticLocation; - /** - * The message of this related diagnostic information. - */ - message: DiagnosticRelatedInformationMessageString; - } - export type DiagnosticRelatedInformationList = DiagnosticRelatedInformation[]; - export type DiagnosticRelatedInformationMessageString = string; - export type DiagnosticSeverity = "ERROR"|"WARNING"|"INFORMATION"|"HINT"|string; - export type DiagnosticTag = "UNNECESSARY"|"DEPRECATED"|string; - export type DiagnosticTagList = DiagnosticTag[]; - export interface Dimension { - name?: DimensionNameString; - value?: DimensionValueString; - } - export type DimensionList = Dimension[]; - export type DimensionNameString = string; - export type DimensionValueString = string; - export type DocFolderLevel = "SUB_FOLDER"|"ENTIRE_WORKSPACE"|string; - export interface DocGenerationEvent { - conversationId: ConversationId; - numberOfAddChars?: PrimitiveInteger; - numberOfAddLines?: PrimitiveInteger; - numberOfAddFiles?: PrimitiveInteger; - userDecision?: DocUserDecision; - interactionType?: DocInteractionType; - userIdentity?: String; - numberOfNavigation?: PrimitiveInteger; - folderLevel?: DocFolderLevel; - } - export type DocInteractionType = "GENERATE_README"|"UPDATE_README"|"EDIT_README"|string; - export type DocUserDecision = "ACCEPT"|"REJECT"|string; - export interface DocV2AcceptanceEvent { - conversationId: ConversationId; - numberOfAddedChars: DocV2AcceptanceEventNumberOfAddedCharsInteger; - numberOfAddedLines: DocV2AcceptanceEventNumberOfAddedLinesInteger; - numberOfAddedFiles: DocV2AcceptanceEventNumberOfAddedFilesInteger; - userDecision: DocUserDecision; - interactionType: DocInteractionType; - numberOfNavigations: DocV2AcceptanceEventNumberOfNavigationsInteger; - folderLevel: DocFolderLevel; - } - export type DocV2AcceptanceEventNumberOfAddedCharsInteger = number; - export type DocV2AcceptanceEventNumberOfAddedFilesInteger = number; - export type DocV2AcceptanceEventNumberOfAddedLinesInteger = number; - export type DocV2AcceptanceEventNumberOfNavigationsInteger = number; - export interface DocV2GenerationEvent { - conversationId: ConversationId; - numberOfGeneratedChars: DocV2GenerationEventNumberOfGeneratedCharsInteger; - numberOfGeneratedLines: DocV2GenerationEventNumberOfGeneratedLinesInteger; - numberOfGeneratedFiles: DocV2GenerationEventNumberOfGeneratedFilesInteger; - interactionType?: DocInteractionType; - numberOfNavigations?: DocV2GenerationEventNumberOfNavigationsInteger; - folderLevel?: DocFolderLevel; - } - export type DocV2GenerationEventNumberOfGeneratedCharsInteger = number; - export type DocV2GenerationEventNumberOfGeneratedFilesInteger = number; - export type DocV2GenerationEventNumberOfGeneratedLinesInteger = number; - export type DocV2GenerationEventNumberOfNavigationsInteger = number; - export interface Document { - } - export interface DocumentSymbol { - /** - * Name of the Document Symbol - */ - name: DocumentSymbolNameString; - /** - * Symbol type - DECLARATION / USAGE - */ - type: SymbolType; - /** - * Symbol package / source for FullyQualified names - */ - source?: DocumentSymbolSourceString; - } - export type DocumentSymbolNameString = string; - export type DocumentSymbolSourceString = string; - export type DocumentSymbols = DocumentSymbol[]; - export interface DocumentationIntentContext { - scope?: DocumentationIntentContextScopeString; - type: DocumentationType; - changeLogOptions?: ChangeLogOptions; - } - export type DocumentationIntentContextScopeString = string; - export type DocumentationType = "README"|"CHANGE_LOG"|string; - export type Double = number; - export interface Edit { - content: EditContentString; - references?: References; - } - export type EditContentString = string; - export interface EditorState { - /** - * Represents currently edited file - */ - document?: TextDocument; - /** - * Position of the cursor - */ - cursorState?: CursorState; - /** - * Represents IDE provided relevant files - */ - relevantDocuments?: RelevantDocumentList; - /** - * Whether service should use relevant document in prompt - */ - useRelevantDocuments?: Boolean; - /** - * Represents IDE provided list of workspace folders - */ - workspaceFolders?: WorkspaceFolderList; - } - export type EncodedVerificationUrl = string; - export interface EnvState { - /** - * The name of the operating system in use - */ - operatingSystem?: EnvStateOperatingSystemString; - /** - * The current working directory of the environment - */ - currentWorkingDirectory?: EnvStateCurrentWorkingDirectoryString; - /** - * The environment variables set in the current environment - */ - environmentVariables?: EnvironmentVariables; - /** - * Local timezone offset of the client. For more information, see documentation https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset - */ - timezoneOffset?: EnvStateTimezoneOffsetInteger; - } - export type EnvStateCurrentWorkingDirectoryString = string; - export type EnvStateOperatingSystemString = string; - export type EnvStateTimezoneOffsetInteger = number; - export interface EnvironmentVariable { - /** - * The key of an environment variable - */ - key?: EnvironmentVariableKeyString; - /** - * The value of an environment variable - */ - value?: EnvironmentVariableValueString; - } - export type EnvironmentVariableKeyString = string; - export type EnvironmentVariableValueString = string; - export type EnvironmentVariables = EnvironmentVariable[]; - export type ErrorDetails = string; - export interface Event { - eventId: UUID; - generationId: UUID; - eventTimestamp: SyntheticTimestamp_date_time; - eventType: EventType; - eventBlob: EventBlob; - } - export type EventBlob = Buffer|Uint8Array|Blob|string; - export type EventList = Event[]; - export type EventType = string; - export interface ExternalIdentityDetails { - issuerUrl?: IssuerUrl; - clientId?: ClientId; - scimEndpoint?: String; - } - export interface FeatureDevCodeAcceptanceEvent { - conversationId: ConversationId; - linesOfCodeAccepted: FeatureDevCodeAcceptanceEventLinesOfCodeAcceptedInteger; - charactersOfCodeAccepted: FeatureDevCodeAcceptanceEventCharactersOfCodeAcceptedInteger; - programmingLanguage?: ProgrammingLanguage; - } - export type FeatureDevCodeAcceptanceEventCharactersOfCodeAcceptedInteger = number; - export type FeatureDevCodeAcceptanceEventLinesOfCodeAcceptedInteger = number; - export interface FeatureDevCodeGenerationEvent { - conversationId: ConversationId; - linesOfCodeGenerated: FeatureDevCodeGenerationEventLinesOfCodeGeneratedInteger; - charactersOfCodeGenerated: FeatureDevCodeGenerationEventCharactersOfCodeGeneratedInteger; - programmingLanguage?: ProgrammingLanguage; - } - export type FeatureDevCodeGenerationEventCharactersOfCodeGeneratedInteger = number; - export type FeatureDevCodeGenerationEventLinesOfCodeGeneratedInteger = number; - export interface FeatureDevEvent { - conversationId: ConversationId; - } - export interface FeatureEvaluation { - feature: FeatureName; - variation: FeatureVariation; - value: FeatureValue; - } - export type FeatureEvaluationsList = FeatureEvaluation[]; - export type FeatureName = string; - export interface FeatureValue { - boolValue?: Boolean; - doubleValue?: Double; - longValue?: Long; - stringValue?: FeatureValueStringType; - } - export type FeatureValueStringType = string; - export type FeatureVariation = string; - export interface FileContext { - leftFileContent: FileContextLeftFileContentString; - rightFileContent: FileContextRightFileContentString; - filename: FileContextFilenameString; - fileUri?: FileContextFileUriString; - programmingLanguage: ProgrammingLanguage; - } - export type FileContextFileUriString = string; - export type FileContextFilenameString = string; - export type FileContextLeftFileContentString = string; - export type FileContextRightFileContentString = string; - export interface FollowupPrompt { - /** - * The content of the text message in markdown format. - */ - content: FollowupPromptContentString; - /** - * User Intent - */ - userIntent?: UserIntent; - } - export type FollowupPromptContentString = string; - export type FunctionalityName = "COMPLETIONS"|"ANALYSIS"|"CONVERSATIONS"|"TASK_ASSIST"|"TRANSFORMATIONS"|"CHAT_CUSTOMIZATION"|"TRANSFORMATIONS_WEBAPP"|"FEATURE_DEVELOPMENT"|string; - export interface GenerateCompletionsRequest { - fileContext: FileContext; - editorState?: EditorState; - maxResults?: GenerateCompletionsRequestMaxResultsInteger; - predictionTypes?: PredictionTypes; - nextToken?: GenerateCompletionsRequestNextTokenString; - referenceTrackerConfiguration?: ReferenceTrackerConfiguration; - supplementalContexts?: SupplementalContextList; - customizationArn?: CustomizationArn; - optOutPreference?: OptOutPreference; - userContext?: UserContext; - profileArn?: ProfileArn; - workspaceId?: UUID; - modelId?: ModelId; - } - export type GenerateCompletionsRequestMaxResultsInteger = number; - export type GenerateCompletionsRequestNextTokenString = string; - export interface GenerateCompletionsResponse { - predictions?: Predictions; - completions?: Completions; - nextToken?: SensitiveString; - modelId?: ModelId; - } - export interface GetCodeAnalysisRequest { - jobId: GetCodeAnalysisRequestJobIdString; - profileArn?: ProfileArn; - } - export type GetCodeAnalysisRequestJobIdString = string; - export interface GetCodeAnalysisResponse { - status: CodeAnalysisStatus; - errorMessage?: SensitiveString; - } - export interface GetCodeFixJobRequest { - jobId: GetCodeFixJobRequestJobIdString; - profileArn?: ProfileArn; - } - export type GetCodeFixJobRequestJobIdString = string; - export interface GetCodeFixJobResponse { - jobStatus?: CodeFixJobStatus; - suggestedFix?: SuggestedFix; - } - export interface GetTaskAssistCodeGenerationRequest { - conversationId: ConversationId; - codeGenerationId: CodeGenerationId; - profileArn?: ProfileArn; - } - export interface GetTaskAssistCodeGenerationResponse { - conversationId: ConversationId; - codeGenerationStatus: CodeGenerationStatus; - codeGenerationStatusDetail?: CodeGenerationStatusDetail; - codeGenerationRemainingIterationCount?: Integer; - codeGenerationTotalIterationCount?: Integer; - } - export interface GetTestGenerationRequest { - testGenerationJobGroupName: TestGenerationJobGroupName; - testGenerationJobId: UUID; - profileArn?: ProfileArn; - } - export interface GetTestGenerationResponse { - testGenerationJob?: TestGenerationJob; - } - export interface GetTransformationPlanRequest { - transformationJobId: TransformationJobId; - profileArn?: ProfileArn; - } - export interface GetTransformationPlanResponse { - transformationPlan: TransformationPlan; - } - export interface GetTransformationRequest { - transformationJobId: TransformationJobId; - profileArn?: ProfileArn; - } - export interface GetTransformationResponse { - transformationJob: TransformationJob; - } - export interface GetUsageLimitsRequest { - /** - * The ARN of the Q Developer profile. Required for enterprise customers, optional for Builder ID users. - */ - profileArn?: ProfileArn; - } - export interface GetUsageLimitsResponse { - limits: UsageLimits; - /** - * Number of days remaining until the usage metrics reset - */ - daysUntilReset: Integer; - } - export interface GitState { - /** - * The output of the command git status --porcelain=v1 -b - */ - status?: GitStateStatusString; - } - export type GitStateStatusString = string; - export type IdeCategory = "JETBRAINS"|"VSCODE"|"CLI"|"JUPYTER_MD"|"JUPYTER_SM"|"ECLIPSE"|"VISUAL_STUDIO"|string; - export interface IdeDiagnostic { - /** - * The range at which the message applies. - */ - range?: Range; - /** - * A human-readable string describing the source of the diagnostic - */ - source?: IdeDiagnosticSourceString; - /** - * Diagnostic Error type - */ - severity?: DiagnosticSeverity; - /** - * Type of the diagnostic - */ - ideDiagnosticType: IdeDiagnosticType; - } - export type IdeDiagnosticList = IdeDiagnostic[]; - export type IdeDiagnosticSourceString = string; - export type IdeDiagnosticType = "SYNTAX_ERROR"|"TYPE_ERROR"|"REFERENCE_ERROR"|"BEST_PRACTICE"|"SECURITY"|"OTHER"|string; - export type IdempotencyToken = string; - export interface IdentityDetails { - ssoIdentityDetails?: SSOIdentityDetails; - externalIdentityDetails?: ExternalIdentityDetails; - } - export interface ImageBlock { - format: ImageFormat; - source: ImageSource; - } - export type ImageBlocks = ImageBlock[]; - export type ImageFormat = "png"|"jpeg"|"gif"|"webp"|string; - export interface ImageSource { - bytes?: ImageSourceBytesBlob; - } - export type ImageSourceBytesBlob = Buffer|Uint8Array|Blob|string; - export interface Import { - statement?: ImportStatementString; - } - export type ImportStatementString = string; - export type Imports = Import[]; - export interface InlineChatEvent { - requestId: UUID; - timestamp: Timestamp; - inputLength?: PrimitiveInteger; - numSelectedLines?: PrimitiveInteger; - numSuggestionAddChars?: PrimitiveInteger; - numSuggestionAddLines?: PrimitiveInteger; - numSuggestionDelChars?: PrimitiveInteger; - numSuggestionDelLines?: PrimitiveInteger; - codeIntent?: Boolean; - userDecision?: InlineChatUserDecision; - responseStartLatency?: Double; - responseEndLatency?: Double; - programmingLanguage?: ProgrammingLanguage; - } - export type InlineChatUserDecision = "ACCEPT"|"REJECT"|"DISMISS"|string; - export type Integer = number; - export type Intent = "DEV"|"DOC"|string; - export interface IntentContext { - documentation?: DocumentationIntentContext; - } - export type IssuerUrl = string; - export type LineRangeList = Range[]; - export interface ListAvailableCustomizationsRequest { - maxResults?: ListAvailableCustomizationsRequestMaxResultsInteger; - nextToken?: Base64EncodedPaginationToken; - profileArn?: ProfileArn; - } - export type ListAvailableCustomizationsRequestMaxResultsInteger = number; - export interface ListAvailableCustomizationsResponse { - customizations: Customizations; - nextToken?: Base64EncodedPaginationToken; - } - export interface ListAvailableModelsRequest { - /** - * The origin context for which to list available models - */ - origin: Origin; - /** - * Maximum number of models to return in a single response - */ - maxResults?: ListAvailableModelsRequestMaxResultsInteger; - /** - * Token for retrieving the next page of results - */ - nextToken?: Base64EncodedPaginationToken; - /** - * ARN of the profile to use for model filtering - */ - profileArn?: ProfileArn; - /** - * Provider of AI models - */ - modelProvider?: ModelProvider; - } - export type ListAvailableModelsRequestMaxResultsInteger = number; - export interface ListAvailableModelsResponse { - /** - * List of available models - */ - models: Models; - /** - * Token for retrieving the next page of results - */ - nextToken?: Base64EncodedPaginationToken; - } - export interface ListAvailableProfilesRequest { - maxResults?: ListAvailableProfilesRequestMaxResultsInteger; - nextToken?: Base64EncodedPaginationToken; - } - export type ListAvailableProfilesRequestMaxResultsInteger = number; - export interface ListAvailableProfilesResponse { - profiles: ProfileList; - nextToken?: Base64EncodedPaginationToken; - } - export interface ListCodeAnalysisFindingsRequest { - jobId: ListCodeAnalysisFindingsRequestJobIdString; - nextToken?: PaginationToken; - codeAnalysisFindingsSchema: CodeAnalysisFindingsSchema; - profileArn?: ProfileArn; - } - export type ListCodeAnalysisFindingsRequestJobIdString = string; - export interface ListCodeAnalysisFindingsResponse { - nextToken?: PaginationToken; - codeAnalysisFindings: SensitiveString; - } - export interface ListEventsRequest { - conversationId: UUID; - maxResults?: ListEventsRequestMaxResultsInteger; - nextToken?: NextToken; - } - export type ListEventsRequestMaxResultsInteger = number; - export interface ListEventsResponse { - conversationId: UUID; - events: EventList; - nextToken?: NextToken; - } - export interface ListFeatureEvaluationsRequest { - userContext: UserContext; - profileArn?: ProfileArn; - } - export interface ListFeatureEvaluationsResponse { - featureEvaluations: FeatureEvaluationsList; - } - export interface ListUserMemoryEntriesInput { - maxResults?: ListUserMemoryEntriesInputMaxResultsInteger; - /** - * ProfileArn for the managing Q Profile - */ - profileArn?: ListUserMemoryEntriesInputProfileArnString; - nextToken?: ListUserMemoryEntriesInputNextTokenString; - } - export type ListUserMemoryEntriesInputMaxResultsInteger = number; - export type ListUserMemoryEntriesInputNextTokenString = string; - export type ListUserMemoryEntriesInputProfileArnString = string; - export interface ListUserMemoryEntriesOutput { - memoryEntries: MemoryEntryList; - nextToken?: ListUserMemoryEntriesOutputNextTokenString; - } - export type ListUserMemoryEntriesOutputNextTokenString = string; - export interface ListWorkspaceMetadataRequest { - workspaceRoot?: ListWorkspaceMetadataRequestWorkspaceRootString; - nextToken?: String; - maxResults?: Integer; - profileArn?: ProfileArn; - } - export type ListWorkspaceMetadataRequestWorkspaceRootString = string; - export interface ListWorkspaceMetadataResponse { - workspaces: WorkspaceList; - nextToken?: String; - } - export type Long = number; - export interface MemoryEntry { - /** - * A unique identifier for a single memory entry - */ - id: MemoryEntryIdString; - memoryEntryString: MemoryEntryMemoryEntryStringString; - metadata: MemoryEntryMetadata; - } - export type MemoryEntryIdString = string; - export type MemoryEntryList = MemoryEntry[]; - export type MemoryEntryMemoryEntryStringString = string; - export interface MemoryEntryMetadata { - origin: Origin; - attributes?: AttributesMap; - createdAt: Timestamp; - updatedAt: Timestamp; - memoryStatus?: MemoryStatus; - } - export type MemoryStatus = "DECRYPTION_FAILURE"|"VALID"|string; - export type MessageId = string; - export interface MetricData { - metricName: MetricDataMetricNameString; - metricValue: Double; - timestamp: Timestamp; - product: MetricDataProductString; - dimensions?: DimensionList; - } - export type MetricDataMetricNameString = string; - export type MetricDataProductString = string; - export interface Model { - /** - * Unique identifier for the model - */ - modelId: ModelId; - /** - * Description of the model - */ - description?: Description; - /** - * Technical metadata and capabilities of the model - */ - modelMetadata?: ModelMetadata; - } - export type ModelId = string; - export interface ModelMetadata { - /** - * Maximum number of input tokens the model can process - */ - maxInputTokens?: ModelMetadataMaxInputTokensInteger; - /** - * Whether the model supports image input processing - */ - supportsImages?: Boolean; - } - export type ModelMetadataMaxInputTokensInteger = number; - export type ModelProvider = "DEFAULT"|string; - export type Models = Model[]; - export type NextToken = string; - export type Notifications = NotificationsFeature[]; - export interface NotificationsFeature { - feature: FeatureName; - toggle: OptInFeatureToggle; - } - export type OperatingSystem = "MAC"|"WINDOWS"|"LINUX"|string; - export type OptInFeatureToggle = "ON"|"OFF"|string; - export interface OptInFeatures { - promptLogging?: PromptLogging; - byUserAnalytics?: ByUserAnalytics; - dashboardAnalytics?: DashboardAnalytics; - notifications?: Notifications; - workspaceContext?: WorkspaceContext; - } - export type OptOutPreference = "OPTIN"|"OPTOUT"|string; - export type Origin = "CHATBOT"|"CONSOLE"|"DOCUMENTATION"|"MARKETING"|"MOBILE"|"SERVICE_INTERNAL"|"UNIFIED_SEARCH"|"UNKNOWN"|"MD"|"IDE"|"SAGE_MAKER"|"CLI"|"AI_EDITOR"|"OPENSEARCH_DASHBOARD"|"GITLAB"|string; - export interface PackageInfo { - executionCommand?: SensitiveString; - buildCommand?: SensitiveString; - buildOrder?: PackageInfoBuildOrderInteger; - testFramework?: String; - packageSummary?: PackageInfoPackageSummaryString; - packagePlan?: PackageInfoPackagePlanString; - targetFileInfoList?: TargetFileInfoList; - } - export type PackageInfoBuildOrderInteger = number; - export type PackageInfoList = PackageInfo[]; - export type PackageInfoPackagePlanString = string; - export type PackageInfoPackageSummaryString = string; - export type PaginationToken = string; - export interface Position { - /** - * Line position in a document. - */ - line: Integer; - /** - * Character offset on a line in a document (zero-based) - */ - character: Integer; - } - export type PreSignedUrl = string; - export interface Prediction { - completion?: Completion; - edit?: Edit; - } - export type PredictionType = "COMPLETIONS"|"EDITS"|string; - export type PredictionTypes = PredictionType[]; - export type Predictions = Prediction[]; - export interface PreviousEditorStateMetadata { - timeOffset: Integer; - } - export type PrimitiveInteger = number; - export interface Profile { - arn: ProfileArn; - identityDetails?: IdentityDetails; - profileName: ProfileName; - description?: ProfileDescription; - referenceTrackerConfiguration?: ReferenceTrackerConfiguration; - kmsKeyArn?: ResourceArn; - activeFunctionalities?: ActiveFunctionalityList; - status?: ProfileStatus; - errorDetails?: ErrorDetails; - resourcePolicy?: ResourcePolicy; - profileType?: ProfileType; - optInFeatures?: OptInFeatures; - permissionUpdateRequired?: Boolean; - applicationProperties?: ApplicationPropertiesList; - } - export type ProfileArn = string; - export type ProfileDescription = string; - export type ProfileList = Profile[]; - export type ProfileName = string; - export type ProfileStatus = "ACTIVE"|"CREATING"|"CREATE_FAILED"|"UPDATING"|"UPDATE_FAILED"|"DELETING"|"DELETE_FAILED"|string; - export type ProfileType = "Q_DEVELOPER"|"CODEWHISPERER"|string; - export interface ProgrammingLanguage { - languageName: ProgrammingLanguageLanguageNameString; - } - export type ProgrammingLanguageLanguageNameString = string; - export type ProgressUpdates = TransformationProgressUpdate[]; - export interface PromptLogging { - s3Uri: S3Uri; - toggle: OptInFeatureToggle; - } - export interface PushTelemetryEventRequest { - clientToken?: IdempotencyToken; - eventType: String; - event: Document; - } - export interface PushTelemetryEventResponse { - } - export interface Range { - /** - * The range's start position. - */ - start: Position; - /** - * The range's end position. - */ - end: Position; - } - export type RecommendationsWithReferencesPreference = "BLOCK"|"ALLOW"|string; - export interface Reference { - /** - * License name - */ - licenseName?: ReferenceLicenseNameString; - /** - * Code Repsitory for the associated reference - */ - repository?: ReferenceRepositoryString; - /** - * Respository URL - */ - url?: ReferenceUrlString; - /** - * Span / Range for the Reference - */ - recommendationContentSpan?: Span; - } - export type ReferenceLicenseNameString = string; - export type ReferenceRepositoryString = string; - export interface ReferenceTrackerConfiguration { - recommendationsWithReferences: RecommendationsWithReferencesPreference; - } - export type ReferenceUrlString = string; - export type References = Reference[]; - export type RelevantDocumentList = RelevantTextDocument[]; - export interface RelevantTextDocument { - /** - * Filepath relative to the root of the workspace - */ - relativeFilePath: RelevantTextDocumentRelativeFilePathString; - /** - * The text document's language identifier. - */ - programmingLanguage?: ProgrammingLanguage; - /** - * Content of the text document - */ - text?: RelevantTextDocumentTextString; - /** - * DocumentSymbols parsed from a text document - */ - documentSymbols?: DocumentSymbols; - /** - * The type of content(file, prompt, symbol, or workspace) - */ - type?: ContentType; - } - export type RelevantTextDocumentRelativeFilePathString = string; - export type RelevantTextDocumentTextString = string; - export type RequestHeaderKey = string; - export type RequestHeaderValue = string; - export type RequestHeaders = {[key: string]: RequestHeaderValue}; - export type ResourceArn = string; - export interface ResourcePolicy { - effect: ResourcePolicyEffect; - } - export type ResourcePolicyEffect = "ALLOW"|"DENY"|string; - export interface ResumeTransformationRequest { - transformationJobId: TransformationJobId; - userActionStatus?: TransformationUserActionStatus; - profileArn?: ProfileArn; - } - export interface ResumeTransformationResponse { - transformationStatus: TransformationStatus; - } - export interface RuntimeDiagnostic { - /** - * A human-readable string describing the source of the diagnostic - */ - source: RuntimeDiagnosticSourceString; - /** - * Diagnostic Error type - */ - severity: DiagnosticSeverity; - /** - * The diagnostic's message. - */ - message: RuntimeDiagnosticMessageString; - } - export type RuntimeDiagnosticMessageString = string; - export type RuntimeDiagnosticSourceString = string; - export type S3Uri = string; - export interface SSOIdentityDetails { - instanceArn: ResourceArn; - oidcClientId: String; - ssoRegion?: SSORegion; - } - export type SSORegion = string; - export interface SendTelemetryEventRequest { - clientToken?: IdempotencyToken; - telemetryEvent: TelemetryEvent; - optOutPreference?: OptOutPreference; - userContext?: UserContext; - profileArn?: ProfileArn; - modelId?: ModelId; - } - export interface SendTelemetryEventResponse { - } - export interface SensitiveDocument { - } - export type SensitiveString = string; - export type ShellHistory = ShellHistoryEntry[]; - export interface ShellHistoryEntry { - /** - * The shell command that was run - */ - command: ShellHistoryEntryCommandString; - /** - * The directory the command was ran in - */ - directory?: ShellHistoryEntryDirectoryString; - /** - * The exit code of the command after it finished - */ - exitCode?: Integer; - /** - * The stdout from the command - */ - stdout?: ShellHistoryEntryStdoutString; - /** - * The stderr from the command - */ - stderr?: ShellHistoryEntryStderrString; - } - export type ShellHistoryEntryCommandString = string; - export type ShellHistoryEntryDirectoryString = string; - export type ShellHistoryEntryStderrString = string; - export type ShellHistoryEntryStdoutString = string; - export interface ShellState { - /** - * The name of the current shell - */ - shellName: ShellStateShellNameString; - /** - * The history previous shell commands for the current shell - */ - shellHistory?: ShellHistory; - } - export type ShellStateShellNameString = string; - export interface Span { - start?: SpanStartInteger; - end?: SpanEndInteger; - } - export type SpanEndInteger = number; - export type SpanStartInteger = number; - export interface StartCodeAnalysisRequest { - artifacts: ArtifactMap; - programmingLanguage: ProgrammingLanguage; - clientToken?: StartCodeAnalysisRequestClientTokenString; - scope?: CodeAnalysisScope; - codeScanName?: CodeScanName; - codeDiffMetadata?: CodeDiffMetadata; - profileArn?: ProfileArn; - } - export type StartCodeAnalysisRequestClientTokenString = string; - export interface StartCodeAnalysisResponse { - jobId: StartCodeAnalysisResponseJobIdString; - status: CodeAnalysisStatus; - errorMessage?: SensitiveString; - } - export type StartCodeAnalysisResponseJobIdString = string; - export interface StartCodeFixJobRequest { - snippetRange: Range; - uploadId: UploadId; - description?: StartCodeFixJobRequestDescriptionString; - ruleId?: StartCodeFixJobRequestRuleIdString; - codeFixName?: CodeFixName; - referenceTrackerConfiguration?: ReferenceTrackerConfiguration; - profileArn?: ProfileArn; - } - export type StartCodeFixJobRequestDescriptionString = string; - export type StartCodeFixJobRequestRuleIdString = string; - export interface StartCodeFixJobResponse { - jobId?: StartCodeFixJobResponseJobIdString; - status?: CodeFixJobStatus; - } - export type StartCodeFixJobResponseJobIdString = string; - export interface StartTaskAssistCodeGenerationRequest { - conversationState: ConversationState; - workspaceState: WorkspaceState; - taskAssistPlan?: TaskAssistPlan; - codeGenerationId?: CodeGenerationId; - currentCodeGenerationId?: CodeGenerationId; - intent?: Intent; - intentContext?: IntentContext; - profileArn?: ProfileArn; - } - export interface StartTaskAssistCodeGenerationResponse { - conversationId: ConversationId; - codeGenerationId: CodeGenerationId; - } - export interface StartTestGenerationRequest { - uploadId: UploadId; - targetCodeList: TargetCodeList; - /** - * The content of user input. - */ - userInput: StartTestGenerationRequestUserInputString; - testGenerationJobGroupName?: TestGenerationJobGroupName; - clientToken?: StartTestGenerationRequestClientTokenString; - profileArn?: ProfileArn; - referenceTrackerConfiguration?: ReferenceTrackerConfiguration; - } - export type StartTestGenerationRequestClientTokenString = string; - export type StartTestGenerationRequestUserInputString = string; - export interface StartTestGenerationResponse { - testGenerationJob?: TestGenerationJob; - } - export interface StartTransformationRequest { - workspaceState: WorkspaceState; - transformationSpec: TransformationSpec; - profileArn?: ProfileArn; - } - export interface StartTransformationResponse { - transformationJobId: TransformationJobId; - } - export type StepId = string; - export interface StopTransformationRequest { - transformationJobId: TransformationJobId; - profileArn?: ProfileArn; - } - export interface StopTransformationResponse { - transformationStatus: TransformationStatus; - } - export type String = string; - export type StringList = StringListMemberString[]; - export type StringListMemberString = string; - export type SubscriptionStatus = "INACTIVE"|"ACTIVE"|string; - export interface SuggestedFix { - codeDiff?: SuggestedFixCodeDiffString; - description?: SuggestedFixDescriptionString; - references?: References; - } - export type SuggestedFixCodeDiffString = string; - export type SuggestedFixDescriptionString = string; - export type SuggestionState = "ACCEPT"|"REJECT"|"DISCARD"|"EMPTY"|"MERGE"|string; - export interface SupplementalContext { - filePath: SupplementalContextFilePathString; - content: SupplementalContextContentString; - type?: SupplementalContextType; - metadata?: SupplementalContextMetadata; - } - export type SupplementalContextContentString = string; - export type SupplementalContextFilePathString = string; - export type SupplementalContextList = SupplementalContext[]; - export interface SupplementalContextMetadata { - previousEditorStateMetadata?: PreviousEditorStateMetadata; - } - export type SupplementalContextType = "PreviousEditorState"|"WorkspaceContext"|string; - export interface SupplementaryWebLink { - /** - * URL of the web reference link. - */ - url: SupplementaryWebLinkUrlString; - /** - * Title of the web reference link. - */ - title: SupplementaryWebLinkTitleString; - /** - * Relevant text snippet from the link. - */ - snippet?: SupplementaryWebLinkSnippetString; - } - export type SupplementaryWebLinkSnippetString = string; - export type SupplementaryWebLinkTitleString = string; - export type SupplementaryWebLinkUrlString = string; - export type SupplementaryWebLinks = SupplementaryWebLink[]; - export type SymbolType = "DECLARATION"|"USAGE"|string; - export type SyntheticTimestamp_date_time = Date; - export interface TargetCode { - /** - * The file path relative to the root of the workspace, could be a single file or a folder. - */ - relativeTargetPath: TargetCodeRelativeTargetPathString; - targetLineRangeList?: LineRangeList; - } - export type TargetCodeList = TargetCode[]; - export type TargetCodeRelativeTargetPathString = string; - export interface TargetFileInfo { - filePath?: SensitiveString; - testFilePath?: SensitiveString; - testCoverage?: TargetFileInfoTestCoverageInteger; - fileSummary?: TargetFileInfoFileSummaryString; - filePlan?: TargetFileInfoFilePlanString; - codeReferences?: References; - numberOfTestMethods?: TargetFileInfoNumberOfTestMethodsInteger; - } - export type TargetFileInfoFilePlanString = string; - export type TargetFileInfoFileSummaryString = string; - export type TargetFileInfoList = TargetFileInfo[]; - export type TargetFileInfoNumberOfTestMethodsInteger = number; - export type TargetFileInfoTestCoverageInteger = number; - export type TaskAssistPlan = TaskAssistPlanStep[]; - export interface TaskAssistPlanStep { - /** - * File path on which the step is working on. - */ - filePath: TaskAssistPlanStepFilePathString; - /** - * Description on the step. - */ - description: TaskAssistPlanStepDescriptionString; - /** - * Start line number of the related changes. - */ - startLine?: TaskAssistPlanStepStartLineInteger; - /** - * End line number of the related changes. - */ - endLine?: TaskAssistPlanStepEndLineInteger; - /** - * Type of the action. - */ - action?: TaskAssistPlanStepAction; - } - export type TaskAssistPlanStepAction = "MODIFY"|"CREATE"|"DELETE"|"UNKNOWN"|string; - export type TaskAssistPlanStepDescriptionString = string; - export type TaskAssistPlanStepEndLineInteger = number; - export type TaskAssistPlanStepFilePathString = string; - export type TaskAssistPlanStepStartLineInteger = number; - export interface TaskAssistPlanningUploadContext { - conversationId: ConversationId; - } - export interface TelemetryEvent { - userTriggerDecisionEvent?: UserTriggerDecisionEvent; - codeCoverageEvent?: CodeCoverageEvent; - userModificationEvent?: UserModificationEvent; - codeScanEvent?: CodeScanEvent; - codeScanSucceededEvent?: CodeScanSucceededEvent; - codeScanFailedEvent?: CodeScanFailedEvent; - codeScanRemediationsEvent?: CodeScanRemediationsEvent; - codeFixGenerationEvent?: CodeFixGenerationEvent; - codeFixAcceptanceEvent?: CodeFixAcceptanceEvent; - metricData?: MetricData; - chatAddMessageEvent?: ChatAddMessageEvent; - chatInteractWithMessageEvent?: ChatInteractWithMessageEvent; - chatUserModificationEvent?: ChatUserModificationEvent; - terminalUserInteractionEvent?: TerminalUserInteractionEvent; - featureDevEvent?: FeatureDevEvent; - featureDevCodeGenerationEvent?: FeatureDevCodeGenerationEvent; - featureDevCodeAcceptanceEvent?: FeatureDevCodeAcceptanceEvent; - inlineChatEvent?: InlineChatEvent; - transformEvent?: TransformEvent; - docGenerationEvent?: DocGenerationEvent; - docV2GenerationEvent?: DocV2GenerationEvent; - docV2AcceptanceEvent?: DocV2AcceptanceEvent; - testGenerationEvent?: TestGenerationEvent; - } - export type TenantId = string; - export interface TerminalUserInteractionEvent { - terminalUserInteractionEventType?: TerminalUserInteractionEventType; - terminal?: String; - terminalVersion?: String; - shell?: String; - shellVersion?: String; - duration?: Integer; - timeToSuggestion?: Integer; - isCompletionAccepted?: Boolean; - cliToolCommand?: String; - } - export type TerminalUserInteractionEventType = "CODEWHISPERER_TERMINAL_TRANSLATION_ACTION"|"CODEWHISPERER_TERMINAL_COMPLETION_INSERTED"|string; - export interface TestGenerationEvent { - jobId: UUID; - groupName: TestGenerationJobGroupName; - timestamp?: Timestamp; - ideCategory?: IdeCategory; - programmingLanguage?: ProgrammingLanguage; - numberOfUnitTestCasesGenerated?: Integer; - numberOfUnitTestCasesAccepted?: Integer; - linesOfCodeGenerated?: Integer; - linesOfCodeAccepted?: Integer; - charsOfCodeGenerated?: Integer; - charsOfCodeAccepted?: Integer; - } - export interface TestGenerationJob { - testGenerationJobId: UUID; - testGenerationJobGroupName: TestGenerationJobGroupName; - status: TestGenerationJobStatus; - shortAnswer?: SensitiveString; - creationTime: Timestamp; - progressRate?: TestGenerationJobProgressRateInteger; - jobStatusReason?: String; - jobSummary?: TestGenerationJobJobSummaryString; - jobPlan?: TestGenerationJobJobPlanString; - packageInfoList?: PackageInfoList; - } - export type TestGenerationJobGroupName = string; - export type TestGenerationJobJobPlanString = string; - export type TestGenerationJobJobSummaryString = string; - export type TestGenerationJobProgressRateInteger = number; - export type TestGenerationJobStatus = "IN_PROGRESS"|"FAILED"|"COMPLETED"|string; - export interface TextDocument { - /** - * Filepath relative to the root of the workspace - */ - relativeFilePath: TextDocumentRelativeFilePathString; - /** - * The text document's language identifier. - */ - programmingLanguage?: ProgrammingLanguage; - /** - * Content of the text document - */ - text?: TextDocumentTextString; - /** - * DocumentSymbols parsed from a text document - */ - documentSymbols?: DocumentSymbols; - } - export interface TextDocumentDiagnostic { - /** - * Represents a Text Document associated with Diagnostic - */ - document: TextDocument; - /** - * The range at which the message applies. - */ - range: Range; - /** - * A human-readable string describing the source of the diagnostic - */ - source: SensitiveString; - /** - * Diagnostic Error type - */ - severity: DiagnosticSeverity; - /** - * The diagnostic's message. - */ - message: TextDocumentDiagnosticMessageString; - /** - * The diagnostic's code, which might appear in the user interface. - */ - code?: TextDocumentDiagnosticCodeString; - /** - * An optional property to describe the error code. - */ - codeDescription?: CodeDescription; - /** - * Additional metadata about the diagnostic. - */ - tags?: DiagnosticTagList; - /** - * an array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property. - */ - relatedInformation?: DiagnosticRelatedInformationList; - /** - * A data entry field that is preserved between a textDocument/publishDiagnostics notification and textDocument/codeAction request. - */ - data?: TextDocumentDiagnosticDataString; - } - export type TextDocumentDiagnosticCodeString = string; - export type TextDocumentDiagnosticDataString = string; - export type TextDocumentDiagnosticMessageString = string; - export type TextDocumentRelativeFilePathString = string; - export type TextDocumentTextString = string; - export type Timestamp = Date; - export interface Tool { - toolSpecification?: ToolSpecification; - } - export type ToolDescription = string; - export interface ToolInputSchema { - json?: SensitiveDocument; - } - export type ToolName = string; - export interface ToolResult { - toolUseId: ToolUseId; - /** - * Content of the tool result. - */ - content: ToolResultContent; - status?: ToolResultStatus; - } - export type ToolResultContent = ToolResultContentBlock[]; - export interface ToolResultContentBlock { - /** - * A tool result that is text. - */ - text?: ToolResultContentBlockTextString; - /** - * A tool result that is JSON format data. - */ - json?: SensitiveDocument; - } - export type ToolResultContentBlockTextString = string; - export type ToolResultStatus = "success"|"error"|string; - export type ToolResults = ToolResult[]; - export interface ToolSpecification { - inputSchema: ToolInputSchema; - name: ToolName; - description?: ToolDescription; - } - export interface ToolUse { - toolUseId: ToolUseId; - name: ToolName; - /** - * The input to pass to the tool. - */ - input: SensitiveDocument; - } - export type ToolUseId = string; - export type ToolUses = ToolUse[]; - export type Tools = Tool[]; - export interface TransformEvent { - jobId: TransformationJobId; - timestamp?: Timestamp; - ideCategory?: IdeCategory; - programmingLanguage?: ProgrammingLanguage; - linesOfCodeChanged?: Integer; - charsOfCodeChanged?: Integer; - linesOfCodeSubmitted?: Integer; - } - export type TransformationDotNetRuntimeEnv = "NET_5_0"|"NET_6_0"|"NET_7_0"|"NET_8_0"|"NET_9_0"|"NET_STANDARD_2_0"|string; - export interface TransformationDownloadArtifact { - downloadArtifactType?: TransformationDownloadArtifactType; - downloadArtifactId?: ArtifactId; - } - export type TransformationDownloadArtifactType = "ClientInstructions"|"Logs"|"GeneratedCode"|string; - export type TransformationDownloadArtifacts = TransformationDownloadArtifact[]; - export type TransformationJavaRuntimeEnv = "JVM_8"|"JVM_11"|"JVM_17"|"JVM_21"|string; - export interface TransformationJob { - jobId?: TransformationJobId; - transformationSpec?: TransformationSpec; - status?: TransformationStatus; - reason?: String; - creationTime?: Timestamp; - startExecutionTime?: Timestamp; - endExecutionTime?: Timestamp; - } - export type TransformationJobId = string; - export type TransformationLanguage = "JAVA_8"|"JAVA_11"|"JAVA_17"|"JAVA_21"|"C_SHARP"|"COBOL"|"PL_I"|"JCL"|string; - export type TransformationLanguages = TransformationLanguage[]; - export type TransformationMainframeRuntimeEnv = "MAINFRAME"|string; - export type TransformationOperatingSystemFamily = "WINDOWS"|"LINUX"|string; - export interface TransformationPlan { - transformationSteps: TransformationSteps; - } - export interface TransformationPlatformConfig { - operatingSystemFamily?: TransformationOperatingSystemFamily; - } - export interface TransformationProgressUpdate { - name: String; - status: TransformationProgressUpdateStatus; - description?: String; - startTime?: Timestamp; - endTime?: Timestamp; - downloadArtifacts?: TransformationDownloadArtifacts; - } - export type TransformationProgressUpdateStatus = "IN_PROGRESS"|"COMPLETED"|"FAILED"|"PAUSED"|"AWAITING_CLIENT_ACTION"|"SKIPPED"|string; - export interface TransformationProjectArtifactDescriptor { - sourceCodeArtifact?: TransformationSourceCodeArtifactDescriptor; - } - export interface TransformationProjectState { - language?: TransformationLanguage; - runtimeEnv?: TransformationRuntimeEnv; - platformConfig?: TransformationPlatformConfig; - projectArtifact?: TransformationProjectArtifactDescriptor; - } - export interface TransformationRuntimeEnv { - java?: TransformationJavaRuntimeEnv; - dotNet?: TransformationDotNetRuntimeEnv; - mainframe?: TransformationMainframeRuntimeEnv; - } - export interface TransformationSourceCodeArtifactDescriptor { - languages?: TransformationLanguages; - runtimeEnv?: TransformationRuntimeEnv; - } - export interface TransformationSpec { - transformationType?: TransformationType; - source?: TransformationProjectState; - target?: TransformationProjectState; - } - export type TransformationStatus = "CREATED"|"ACCEPTED"|"REJECTED"|"STARTED"|"PREPARING"|"PREPARED"|"PLANNING"|"PLANNED"|"TRANSFORMING"|"TRANSFORMED"|"FAILED"|"COMPLETED"|"PARTIALLY_COMPLETED"|"STOPPING"|"STOPPED"|"PAUSED"|"RESUMED"|string; - export interface TransformationStep { - id: StepId; - name: String; - description: String; - status: TransformationStepStatus; - progressUpdates?: ProgressUpdates; - startTime?: Timestamp; - endTime?: Timestamp; - } - export type TransformationStepStatus = "CREATED"|"COMPLETED"|"PARTIALLY_COMPLETED"|"STOPPED"|"FAILED"|"PAUSED"|"SKIPPED"|string; - export type TransformationSteps = TransformationStep[]; - export type TransformationType = "LANGUAGE_UPGRADE"|"DOCUMENT_GENERATION"|string; - export type TransformationUploadArtifactType = "Dependencies"|"ClientBuildResult"|string; - export interface TransformationUploadContext { - jobId: TransformationJobId; - uploadArtifactType: TransformationUploadArtifactType; - } - export type TransformationUserActionStatus = "COMPLETED"|"REJECTED"|string; - export type UUID = string; - export interface UpdateUsageLimitsRequest { - accountId: String; - accountlessUserId?: String; - featureType: UsageLimitType; - requestedLimit: Long; - justification?: String; - } - export interface UpdateUsageLimitsResponse { - status: UsageLimitUpdateRequestStatus; - approvedLimit?: Long; - remainingRequestsThisMonth?: Integer; - } - export interface UploadContext { - taskAssistPlanningUploadContext?: TaskAssistPlanningUploadContext; - transformationUploadContext?: TransformationUploadContext; - codeAnalysisUploadContext?: CodeAnalysisUploadContext; - codeFixUploadContext?: CodeFixUploadContext; - workspaceContextUploadContext?: WorkspaceContextUploadContext; - } - export type UploadId = string; - export type UploadIntent = "TRANSFORMATION"|"TASK_ASSIST_PLANNING"|"AUTOMATIC_FILE_SECURITY_SCAN"|"FULL_PROJECT_SECURITY_SCAN"|"UNIT_TESTS_GENERATION"|"CODE_FIX_GENERATION"|"WORKSPACE_CONTEXT"|"AGENTIC_CODE_REVIEW"|string; - export type Url = string; - export interface UsageLimitList { - type: UsageLimitType; - currentUsage: Long; - totalUsageLimit: Long; - percentUsed?: Double; - } - export type UsageLimitType = "CODE_COMPLETIONS"|"AGENTIC_REQUEST"|"AI_EDITOR"|"TRANSFORM"|string; - export type UsageLimitUpdateRequestStatus = "APPROVED"|"PENDING_REVIEW"|"REJECTED"|string; - export type UsageLimits = UsageLimitList[]; - export interface UserContext { - ideCategory: IdeCategory; - operatingSystem: OperatingSystem; - product: UserContextProductString; - clientId?: UUID; - ideVersion?: String; - } - export type UserContextProductString = string; - export interface UserInputMessage { - /** - * The content of the chat message. - */ - content: UserInputMessageContentString; - /** - * Chat message context associated with the Chat Message. - */ - userInputMessageContext?: UserInputMessageContext; - /** - * User Intent. - */ - userIntent?: UserIntent; - /** - * User Input Origin. - */ - origin?: Origin; - /** - * Images associated with the Chat Message. - */ - images?: ImageBlocks; - /** - * Unique identifier for the model used in this conversation - */ - modelId?: ModelId; - } - export type UserInputMessageContentString = string; - export interface UserInputMessageContext { - /** - * Editor state chat message context. - */ - editorState?: EditorState; - /** - * Shell state chat message context. - */ - shellState?: ShellState; - /** - * Git state chat message context. - */ - gitState?: GitState; - /** - * Environment state chat message context. - */ - envState?: EnvState; - /** - * The state of a user's AppStudio UI when sending a message. - */ - appStudioContext?: AppStudioState; - /** - * Diagnostic chat message context. - */ - diagnostic?: Diagnostic; - /** - * Contextual information about the environment from which the user is calling. - */ - consoleState?: ConsoleState; - /** - * Settings information, e.g., whether the user has enabled cross-region API calls. - */ - userSettings?: UserSettings; - /** - * List of additional contextual content entries that can be included with the message. - */ - additionalContext?: AdditionalContentList; - /** - * ToolResults for the requested ToolUses. - */ - toolResults?: ToolResults; - /** - * Tools that can be used. - */ - tools?: Tools; - } - export type UserIntent = "SUGGEST_ALTERNATE_IMPLEMENTATION"|"APPLY_COMMON_BEST_PRACTICES"|"IMPROVE_CODE"|"SHOW_EXAMPLES"|"CITE_SOURCES"|"EXPLAIN_LINE_BY_LINE"|"EXPLAIN_CODE_SELECTION"|"GENERATE_CLOUDFORMATION_TEMPLATE"|"GENERATE_UNIT_TESTS"|"CODE_GENERATION"|string; - export interface UserModificationEvent { - sessionId: UUID; - requestId: UUID; - programmingLanguage: ProgrammingLanguage; - modificationPercentage: Double; - customizationArn?: CustomizationArn; - timestamp: Timestamp; - acceptedCharacterCount: PrimitiveInteger; - unmodifiedAcceptedCharacterCount: PrimitiveInteger; - addedCharacterCount?: UserModificationEventAddedCharacterCountInteger; - unmodifiedAddedCharacterCount?: UserModificationEventUnmodifiedAddedCharacterCountInteger; - } - export type UserModificationEventAddedCharacterCountInteger = number; - export type UserModificationEventUnmodifiedAddedCharacterCountInteger = number; - export interface UserSettings { - hasConsentedToCrossRegionCalls?: Boolean; - } - export interface UserTriggerDecisionEvent { - sessionId: UUID; - requestId: UUID; - customizationArn?: CustomizationArn; - programmingLanguage: ProgrammingLanguage; - completionType: CompletionType; - suggestionState: SuggestionState; - recommendationLatencyMilliseconds: Double; - timestamp: Timestamp; - triggerToResponseLatencyMilliseconds?: Double; - suggestionReferenceCount?: PrimitiveInteger; - generatedLine?: PrimitiveInteger; - numberOfRecommendations?: PrimitiveInteger; - perceivedLatencyMilliseconds?: Double; - acceptedCharacterCount?: PrimitiveInteger; - addedIdeDiagnostics?: IdeDiagnosticList; - removedIdeDiagnostics?: IdeDiagnosticList; - addedCharacterCount?: UserTriggerDecisionEventAddedCharacterCountInteger; - deletedCharacterCount?: UserTriggerDecisionEventDeletedCharacterCountInteger; - streakLength?: UserTriggerDecisionEventStreakLengthInteger; - } - export type UserTriggerDecisionEventAddedCharacterCountInteger = number; - export type UserTriggerDecisionEventDeletedCharacterCountInteger = number; - export type UserTriggerDecisionEventStreakLengthInteger = number; - export interface WorkspaceContext { - toggle: OptInFeatureToggle; - } - export interface WorkspaceContextUploadContext { - workspaceId: UUID; - relativePath: SensitiveString; - programmingLanguage: ProgrammingLanguage; - } - export type WorkspaceFolderList = WorkspaceFolderListMemberString[]; - export type WorkspaceFolderListMemberString = string; - export type WorkspaceList = WorkspaceMetadata[]; - export interface WorkspaceMetadata { - workspaceId: UUID; - workspaceStatus: WorkspaceStatus; - environmentAddress?: SensitiveString; - environmentId?: SensitiveString; - } - export interface WorkspaceState { - /** - * Upload ID representing an Upload using a PreSigned URL - */ - uploadId: UploadId; - /** - * Primary programming language of the Workspace - */ - programmingLanguage: ProgrammingLanguage; - /** - * Workspace context truncation schemes based on usecase - */ - contextTruncationScheme?: ContextTruncationScheme; - } - export type WorkspaceStatus = "CREATED"|"PENDING"|"READY"|"CONNECTED"|"DELETING"|string; - export type timeBetweenChunks = Double[]; - /** - * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. - */ - export type apiVersion = "2022-11-11"|"latest"|string; - export interface ClientApiVersions { - /** - * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version. - */ - apiVersion?: apiVersion; - } - export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions; - /** - * Contains interfaces for use with the CodeWhispererBearerTokenClient client. - */ - export import Types = CodeWhispererBearerTokenClient; -} -export = CodeWhispererBearerTokenClient; - - \ No newline at end of file diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.test.ts index 6c8af7a272..b8eeffad42 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.test.ts @@ -32,6 +32,7 @@ import { InlineChatResult, CancellationTokenSource, ContextCommand, + ChatUpdateParams, } from '@aws/language-server-runtimes/server-interface' import { TestFeatures } from '@aws/language-server-runtimes/testing' import * as assert from 'assert' @@ -241,7 +242,7 @@ describe('AgenticChatController', () => { testFeatures.agent = { runTool: sinon.stub().resolves({}), getTools: sinon.stub().returns( - ['mock-tool-name', 'mock-tool-name-1', 'mock-tool-name-2'].map(toolName => ({ + ['mock-tool-name', 'mock-tool-name-1', 'mock-tool-name-2', 'codeReview'].map(toolName => ({ toolSpecification: { name: toolName, description: 'Mock tool for testing' }, })) ), @@ -368,17 +369,6 @@ describe('AgenticChatController', () => { sinon.assert.calledWithExactly(activeTabSpy.set, mockTabId) }) - it('onTabAdd updates model ID in chat options and session', () => { - const modelId = 'test-model-id' - sinon.stub(ChatDatabase.prototype, 'getModelId').returns(modelId) - chatController.onTabAdd({ tabId: mockTabId }) - - sinon.assert.calledWithExactly(testFeatures.chat.chatOptionsUpdate, { modelId, tabId: mockTabId }) - - const session = chatSessionManagementService.getSession(mockTabId).data - assert.strictEqual(session!.modelId, modelId) - }) - it('onTabChange sets active tab id in telemetryController and emits metrics', () => { chatController.onTabChange({ tabId: mockTabId }) @@ -451,7 +441,7 @@ describe('AgenticChatController', () => { assert.deepStrictEqual(chatResult, { additionalMessages: [], - body: '\n\nHello World!', + body: '\nHello World!', messageId: 'mock-message-id', buttons: [], codeReference: [], @@ -1150,7 +1140,7 @@ describe('AgenticChatController', () => { sinon.assert.callCount(testFeatures.lsp.sendProgress, mockChatResponseList.length + 1) // response length + 1 loading messages assert.deepStrictEqual(chatResult, { additionalMessages: [], - body: '\n\nHello World!', + body: '\nHello World!', messageId: 'mock-message-id', codeReference: [], buttons: [], @@ -1169,7 +1159,7 @@ describe('AgenticChatController', () => { sinon.assert.callCount(testFeatures.lsp.sendProgress, mockChatResponseList.length + 1) // response length + 1 loading message assert.deepStrictEqual(chatResult, { additionalMessages: [], - body: '\n\nHello World!', + body: '\nHello World!', messageId: 'mock-message-id', buttons: [], codeReference: [], @@ -3003,153 +2993,259 @@ ${' '.repeat(8)}} }) describe('onListAvailableModels', () => { - let tokenServiceManagerStub: sinon.SinonStub + let isCachedModelsValidStub: sinon.SinonStub + let getCachedModelsStub: sinon.SinonStub + let setCachedModelsStub: sinon.SinonStub + let getConnectionTypeStub: sinon.SinonStub + let getActiveProfileArnStub: sinon.SinonStub + let getCodewhispererServiceStub: sinon.SinonStub + let listAvailableModelsStub: sinon.SinonStub beforeEach(() => { - // Create a session with a model ID + // Create a session chatController.onTabAdd({ tabId: mockTabId }) - const session = chatSessionManagementService.getSession(mockTabId).data! - session.modelId = 'CLAUDE_3_7_SONNET_20250219_V1_0' - // Stub the getRegion method - tokenServiceManagerStub = sinon.stub(AmazonQTokenServiceManager.prototype, 'getRegion') + // Stub ChatDatabase methods + isCachedModelsValidStub = sinon.stub(ChatDatabase.prototype, 'isCachedModelsValid') + getCachedModelsStub = sinon.stub(ChatDatabase.prototype, 'getCachedModels') + setCachedModelsStub = sinon.stub(ChatDatabase.prototype, 'setCachedModels') + + // Stub AmazonQTokenServiceManager methods + getConnectionTypeStub = sinon.stub(AmazonQTokenServiceManager.prototype, 'getConnectionType') + getActiveProfileArnStub = sinon.stub(AmazonQTokenServiceManager.prototype, 'getActiveProfileArn') + getCodewhispererServiceStub = sinon.stub(AmazonQTokenServiceManager.prototype, 'getCodewhispererService') + + // Mock listAvailableModels method + listAvailableModelsStub = sinon.stub() + getCodewhispererServiceStub.returns({ + listAvailableModels: listAvailableModelsStub, + }) }) afterEach(() => { - tokenServiceManagerStub.restore() - }) + isCachedModelsValidStub.restore() + getCachedModelsStub.restore() + setCachedModelsStub.restore() + getConnectionTypeStub.restore() + getActiveProfileArnStub.restore() + getCodewhispererServiceStub.restore() + }) + + describe('ListAvailableModels Cache scenarios', () => { + it('should return cached models when cache is valid', async () => { + // Setup valid cache + isCachedModelsValidStub.returns(true) + const cachedData = { + models: [ + { id: 'model1', name: 'Model 1', description: 'Test description 1' }, + { id: 'model2', name: 'Model 2', description: 'Test description 2' }, + ], + defaultModelId: 'model1', + timestamp: Date.now(), + } + getCachedModelsStub.returns(cachedData) - it('should return all available models for us-east-1 region', async () => { - // Set up the region to be us-east-1 - tokenServiceManagerStub.returns('us-east-1') + const session = chatSessionManagementService.getSession(mockTabId).data! + session.modelId = 'model1' - // Call the method - const params = { tabId: mockTabId } - const result = await chatController.onListAvailableModels(params) + const result = await chatController.onListAvailableModels({ tabId: mockTabId }) - // Verify the result - assert.strictEqual(result.tabId, mockTabId) - assert.strictEqual(result.models.length, 2) - assert.strictEqual(result.selectedModelId, 'CLAUDE_SONNET_4_20250514_V1_0') + // Verify cached data is used + assert.strictEqual(result.tabId, mockTabId) + assert.deepStrictEqual(result.models, cachedData.models) + assert.strictEqual(result.selectedModelId, 'model1') - // Check that the models include both Claude versions - const modelIds = result.models.map(model => model.id) - assert.ok(modelIds.includes('CLAUDE_SONNET_4_20250514_V1_0')) - assert.ok(modelIds.includes('CLAUDE_3_7_SONNET_20250219_V1_0')) - }) + // Verify API was not called + sinon.assert.notCalled(listAvailableModelsStub) + sinon.assert.notCalled(setCachedModelsStub) + }) - it('should return all available models for eu-central-1 region', async () => { - // Set up the region to be eu-central-1 - tokenServiceManagerStub.returns('eu-central-1') + it('should return cached models when cache is valid but has empty models array', async () => { + // Setup cache with empty models + isCachedModelsValidStub.returns(true) + const cachedData = { + models: [], + defaultModelId: undefined, + timestamp: Date.now(), + } + getCachedModelsStub.returns(cachedData) - // Call the method - const params = { tabId: mockTabId } - const result = await chatController.onListAvailableModels(params) + // Should fall back to API call since models array is empty + getConnectionTypeStub.returns('builderId') + getActiveProfileArnStub.returns('test-arn') + listAvailableModelsStub.resolves({ + models: { + model1: { modelId: 'model1' }, + model2: { modelId: 'model2' }, + }, + defaultModel: { modelId: 'model1' }, + }) - // Verify the result - assert.strictEqual(result.tabId, mockTabId) - assert.strictEqual(result.models.length, 2) - assert.strictEqual(result.selectedModelId, 'CLAUDE_SONNET_4_20250514_V1_0') + await chatController.onListAvailableModels({ tabId: mockTabId }) - // Check that the models include both Claude versions - const modelIds = result.models.map(model => model.id) - assert.ok(modelIds.includes('CLAUDE_SONNET_4_20250514_V1_0')) - assert.ok(modelIds.includes('CLAUDE_3_7_SONNET_20250219_V1_0')) - }) + // Verify API was called due to empty cached models + sinon.assert.calledOnce(listAvailableModelsStub) + sinon.assert.calledOnce(setCachedModelsStub) + }) - it('should return all models when region is unknown', async () => { - // Set up the region to be unknown - tokenServiceManagerStub.returns('unknown-region') + it('should return cached models when cache is valid but cachedData is null', async () => { + // Setup cache as valid but returns null + isCachedModelsValidStub.returns(true) + getCachedModelsStub.returns(null) - // Call the method - const params = { tabId: mockTabId } - const result = await chatController.onListAvailableModels(params) + // Should fall back to API call + getConnectionTypeStub.returns('builderId') + getActiveProfileArnStub.returns('test-arn') + listAvailableModelsStub.resolves({ + models: { + model1: { modelId: 'model1' }, + }, + defaultModel: { modelId: 'model1' }, + }) + + await chatController.onListAvailableModels({ tabId: mockTabId }) - // Verify the result - assert.strictEqual(result.tabId, mockTabId) - assert.strictEqual(result.models.length, 2) - assert.strictEqual(result.selectedModelId, 'CLAUDE_SONNET_4_20250514_V1_0') + // Verify API was called + sinon.assert.calledOnce(listAvailableModelsStub) + }) }) - it('should return undefined for selectedModelId when no session data exists', async () => { - // Set up the session to return no session (failure case) - const getSessionStub = sinon.stub(chatSessionManagementService, 'getSession') - getSessionStub.returns({ - data: undefined, - success: false, - error: 'error', + describe('ListAvailableModels API call scenarios', () => { + beforeEach(() => { + // Setup invalid cache to force API call + isCachedModelsValidStub.returns(false) }) - // Call the method - const params = { tabId: 'non-existent-tab' } - const result = await chatController.onListAvailableModels(params) + it('should fetch models from API when cache is invalid', async () => { + getConnectionTypeStub.returns('builderId') + getActiveProfileArnStub.returns('test-profile-arn') - // Verify the result - assert.strictEqual(result.tabId, 'non-existent-tab') - assert.strictEqual(result.models.length, 2) - assert.strictEqual(result.selectedModelId, undefined) + const mockApiResponse = { + models: { + 'claude-3-sonnet': { + modelId: 'claude-3-sonnet', + modelName: 'Claude 3 Sonnet', + description: 'Advanced AI model', + }, + 'claude-4-sonnet': { + modelId: 'claude-4-sonnet', + modelName: 'Claude 4 Sonnet', + description: 'Latest AI model', + }, + }, + defaultModel: { modelId: 'claude-3-sonnet' }, + } + listAvailableModelsStub.resolves(mockApiResponse) - getSessionStub.restore() - }) + const result = await chatController.onListAvailableModels({ tabId: mockTabId }) - it('should fallback to latest available model when saved model is not available in current region', async () => { - // Import the module to stub - const modelSelection = await import('./constants/modelSelection') + // Verify API call was made with correct parameters + sinon.assert.calledOnceWithExactly(listAvailableModelsStub, { + origin: 'IDE', + profileArn: 'test-profile-arn', + }) - // Create a mock region with only Claude 3.7 - const mockModelOptionsForRegion = { - ...modelSelection.MODEL_OPTIONS_FOR_REGION, - 'test-region-limited': [ - { - id: 'CLAUDE_3_7_SONNET_20250219_V1_0', - name: 'Claude Sonnet 3.7', - }, - ], - } + // Verify result structure + assert.strictEqual(result.tabId, mockTabId) + assert.strictEqual(result.models.length, 2) + assert.deepStrictEqual(result.models, [ + { id: 'claude-3-sonnet', name: 'Claude 3 Sonnet', description: 'Advanced AI model' }, + { id: 'claude-4-sonnet', name: 'Claude 4 Sonnet', description: 'Latest AI model' }, + ]) - // Stub the MODEL_OPTIONS_FOR_REGION - const modelOptionsStub = sinon - .stub(modelSelection, 'MODEL_OPTIONS_FOR_REGION') - .value(mockModelOptionsForRegion) + // Verify cache was updated + sinon.assert.calledOnceWithExactly(setCachedModelsStub, result.models, 'claude-3-sonnet') + }) + + it('should fall back to hardcoded models when API call fails', async () => { + getConnectionTypeStub.returns('builderId') + listAvailableModelsStub.rejects(new Error('API Error')) + + const result = await chatController.onListAvailableModels({ tabId: mockTabId }) - // Set up the region to be the test region (which only has Claude 3.7) - tokenServiceManagerStub.returns('test-region-limited') + // Verify fallback to FALLBACK_MODEL_OPTIONS + assert.strictEqual(result.tabId, mockTabId) + assert.strictEqual(result.models.length, 1) // FALLBACK_MODEL_OPTIONS length + + // Verify cache was not updated due to error + sinon.assert.notCalled(setCachedModelsStub) + }) - // Mock database to return Claude Sonnet 4 (not available in test-region-limited) - const getModelIdStub = sinon.stub(ChatDatabase.prototype, 'getModelId') - getModelIdStub.returns('CLAUDE_SONNET_4_20250514_V1_0') + it('should handle API response with no defaultModel', async () => { + getConnectionTypeStub.returns('builderId') - // Call the method - const params = { tabId: mockTabId } - const result = await chatController.onListAvailableModels(params) + const mockApiResponse = { + models: { + model1: { modelId: 'model1' }, + }, + defaultModel: undefined, // No default model + } + listAvailableModelsStub.resolves(mockApiResponse) - // Verify the result falls back to available model - assert.strictEqual(result.tabId, mockTabId) - assert.strictEqual(result.models.length, 1) - assert.strictEqual(result.selectedModelId, 'CLAUDE_3_7_SONNET_20250219_V1_0') + const result = await chatController.onListAvailableModels({ tabId: mockTabId }) - getModelIdStub.restore() - modelOptionsStub.restore() + // Verify cache was updated with undefined defaultModelId + sinon.assert.calledOnceWithExactly(setCachedModelsStub, result.models, undefined) + }) }) - it('should use saved model when it is available in current region', async () => { - // Set up the region to be us-east-1 (which has both models) - tokenServiceManagerStub.returns('us-east-1') + describe('Session and model selection scenarios', () => { + beforeEach(() => { + // Setup cache to avoid API calls in these tests + isCachedModelsValidStub.returns(true) + getCachedModelsStub.returns({ + models: [ + { id: 'model1', name: 'Model 1' }, + { id: 'model2', name: 'Model 2' }, + ], + defaultModelId: 'model1', + timestamp: Date.now(), + }) + }) - // Mock database to return Claude 3.7 (available in us-east-1) - const getModelIdStub = sinon.stub(ChatDatabase.prototype, 'getModelId') - getModelIdStub.returns('CLAUDE_3_7_SONNET_20250219_V1_0') + it('should return default model when session fails to load', async () => { + const getSessionStub = sinon.stub(chatSessionManagementService, 'getSession') + getSessionStub.returns({ + data: undefined, + success: false, + error: 'Session not found', + }) - // Call the method - const params = { tabId: mockTabId } - const result = await chatController.onListAvailableModels(params) + const result = await chatController.onListAvailableModels({ tabId: 'invalid-tab' }) - // Verify the result uses the saved model - assert.strictEqual(result.tabId, mockTabId) - assert.strictEqual(result.models.length, 2) - assert.strictEqual(result.selectedModelId, 'CLAUDE_3_7_SONNET_20250219_V1_0') + assert.strictEqual(result.tabId, 'invalid-tab') + assert.strictEqual(result.selectedModelId, 'model1') - getModelIdStub.restore() + getSessionStub.restore() + }) + + it('should use defaultModelId from cache when session has no modelId', async () => { + const session = chatSessionManagementService.getSession(mockTabId).data! + session.modelId = undefined + + const result = await chatController.onListAvailableModels({ tabId: mockTabId }) + + assert.strictEqual(result.selectedModelId, 'model1') // defaultModelId from cache + // Verify session modelId is updated + assert.strictEqual(session.modelId, 'model1') + }) + + it('should fall back to default model when session has no modelId and no defaultModelId in cache', async () => { + getCachedModelsStub.returns({ + models: [{ id: 'model1', name: 'Model 1', description: 'Test model' }], + defaultModelId: undefined, // No default model + timestamp: Date.now(), + }) + + const session = chatSessionManagementService.getSession(mockTabId).data! + session.modelId = undefined + + const result = await chatController.onListAvailableModels({ tabId: mockTabId }) + + assert.strictEqual(result.selectedModelId, 'claude-sonnet-4') // FALLBACK_MODEL_RECORD[DEFAULT_MODEL_ID].label + // Verify session modelId is updated + assert.strictEqual(session.modelId, 'claude-sonnet-4') + }) }) }) @@ -3283,6 +3379,90 @@ ${' '.repeat(8)}} assert.strictEqual(returnValue, undefined) }) }) + + describe('processToolUses', () => { + it('filters rule artifacts from additionalContext for CodeReview tool', async () => { + const mockAdditionalContext = [ + { + type: 'file', + description: '', + name: '', + relativePath: '', + startLine: 0, + endLine: 0, + path: '/test/file.js', + }, + { + type: 'rule', + description: '', + name: '', + relativePath: '', + startLine: 0, + endLine: 0, + path: '/test/rule1.json', + }, + { + type: 'rule', + description: '', + name: '', + relativePath: '', + startLine: 0, + endLine: 0, + path: '/test/rule2.json', + }, + ] + + const toolUse = { + toolUseId: 'test-id', + name: 'codeReview', + input: { fileLevelArtifacts: [{ path: '/test/file.js' }] }, + stop: true, + } + + const runToolStub = testFeatures.agent.runTool as sinon.SinonStub + runToolStub.resolves({}) + + // Create a mock session with toolUseLookup + const mockSession = { + toolUseLookup: new Map(), + pairProgrammingMode: true, + } as any + + // Create a minimal mock of AgenticChatResultStream + const mockChatResultStream = { + removeResultBlockAndUpdateUI: sinon.stub().resolves(), + writeResultBlock: sinon.stub().resolves(1), + overwriteResultBlock: sinon.stub().resolves(), + removeResultBlock: sinon.stub().resolves(), + getMessageBlockId: sinon.stub().returns(undefined), + hasMessage: sinon.stub().returns(false), + updateOngoingProgressResult: sinon.stub().resolves(), + getResult: sinon.stub().returns({ messageId: 'test', body: '' }), + setMessageIdToUpdateForTool: sinon.stub(), + getMessageIdToUpdateForTool: sinon.stub().returns(undefined), + addMessageOperation: sinon.stub(), + getMessageOperation: sinon.stub().returns(undefined), + } + + // Call processToolUses directly + await chatController.processToolUses( + [toolUse], + mockChatResultStream as any, + mockSession, + 'tabId', + mockCancellationToken, + mockAdditionalContext + ) + + // Verify runTool was called with ruleArtifacts + sinon.assert.calledOnce(runToolStub) + const toolInput = runToolStub.firstCall.args[1] + assert.ok(toolInput.ruleArtifacts) + assert.strictEqual(toolInput.ruleArtifacts.length, 2) + assert.strictEqual(toolInput.ruleArtifacts[0].path, '/test/rule1.json') + assert.strictEqual(toolInput.ruleArtifacts[1].path, '/test/rule2.json') + }) + }) }) // The body may include text-based progress updates from tool invocations. 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 72217fae07..56e577e9af 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts @@ -24,7 +24,6 @@ import { GREP_SEARCH, FILE_SEARCH, EXECUTE_BASH, - CODE_REVIEW, BUTTON_RUN_SHELL_COMMAND, BUTTON_REJECT_SHELL_COMMAND, BUTTON_REJECT_MCP_TOOL, @@ -67,8 +66,6 @@ import { ListAvailableModelsResult, OpenFileDialogParams, OpenFileDialogResult, -} from '@aws/language-server-runtimes/protocol' -import { ApplyWorkspaceEditParams, ErrorCodes, FeedbackParams, @@ -83,6 +80,7 @@ import { TabBarActionParams, CreatePromptParams, FileClickParams, + Model, } from '@aws/language-server-runtimes/protocol' import { CancellationToken, @@ -139,7 +137,7 @@ import { AmazonQBaseServiceManager } from '../../shared/amazonQServiceManager/Ba import { AmazonQTokenServiceManager } from '../../shared/amazonQServiceManager/AmazonQTokenServiceManager' import { AmazonQWorkspaceConfig } from '../../shared/amazonQServiceManager/configurationUtils' import { TabBarController } from './tabBarController' -import { ChatDatabase, MaxOverallCharacters, ToolResultValidationError } from './tools/chatDb/chatDb' +import { ChatDatabase, ToolResultValidationError } from './tools/chatDb/chatDb' import { AgenticChatEventParser, ChatResultWithMetadata as AgenticChatResultWithMetadata, @@ -168,8 +166,9 @@ import { FsWrite, FsWriteParams } from './tools/fsWrite' import { ExecuteBash, ExecuteBashParams } from './tools/executeBash' import { ExplanatoryParams, InvokeOutput, ToolApprovalException } from './tools/toolShared' import { validatePathBasic, validatePathExists, validatePaths as validatePathsSync } from './utils/pathValidation' +import { calculateModifiedLines } from './utils/fileModificationMetrics' import { GrepSearch, SanitizedRipgrepOutput } from './tools/grepSearch' -import { FileSearch, FileSearchParams } from './tools/fileSearch' +import { FileSearch, FileSearchParams, isFileSearchParams } from './tools/fileSearch' import { FsReplace, FsReplaceParams } from './tools/fsReplace' import { loggingUtils, timeoutUtils } from '@aws/lsp-core' import { diffLines } from 'diff' @@ -180,7 +179,6 @@ import { OUTPUT_LIMIT_EXCEEDS_PARTIAL_MSG, RESPONSE_TIMEOUT_MS, RESPONSE_TIMEOUT_PARTIAL_MSG, - DEFAULT_MODEL_ID, COMPACTION_BODY, COMPACTION_HEADER_BODY, DEFAULT_MACOS_RUN_SHORTCUT, @@ -189,6 +187,10 @@ import { DEFAULT_WINDOW_REJECT_SHORTCUT, DEFAULT_MACOS_STOP_SHORTCUT, DEFAULT_WINDOW_STOP_SHORTCUT, + COMPACTION_CHARACTER_THRESHOLD, + MAX_OVERALL_CHARACTERS, + FSREAD_MEMORY_BANK_MAX_PER_FILE, + FSREAD_MEMORY_BANK_MAX_TOTAL, } from './constants/constants' import { AgenticChatError, @@ -222,15 +224,17 @@ import { Message as DbMessage, messageToStreamingMessage, } from './tools/chatDb/util' -import { MODEL_OPTIONS, MODEL_OPTIONS_FOR_REGION } from './constants/modelSelection' +import { FALLBACK_MODEL_OPTIONS, FALLBACK_MODEL_RECORD, BEDROCK_MODEL_TO_MODEL_ID } from './constants/modelSelection' import { DEFAULT_IMAGE_VERIFICATION_OPTIONS, verifyServerImage } from '../../shared/imageVerification' import { sanitize } from '@aws/lsp-core/out/util/path' -import { getLatestAvailableModel } from './utils/agenticChatControllerHelper' import { ActiveUserTracker } from '../../shared/activeUserTracker' -import { UserContext } from '../../client/token/codewhispererbearertokenclient' +import { UserContext } from '@amzn/codewhisperer-runtime' import { CodeWhispererServiceToken } from '../../shared/codeWhispererService' import { DisplayFindings } from './tools/qCodeAnalysis/displayFindings' +import { IDE } from '../../shared/constants' import { IdleWorkspaceManager } from '../workspaceContext/IdleWorkspaceManager' +import { SemanticSearch } from './tools/workspaceContext/semanticSearch' +import { MemoryBankController } from './context/memorybank/memoryBankController' type ChatHandlers = Omit< LspHandlers, @@ -267,6 +271,7 @@ export class AgenticChatController implements ChatHandlers { #chatHistoryDb: ChatDatabase #additionalContextProvider: AdditionalContextProvider #contextCommandsProvider: ContextCommandsProvider + #memoryBankController: MemoryBankController #stoppedToolUses = new Set() #userWrittenCodeTracker: UserWrittenCodeTracker | undefined #toolUseStartTimes: Record = {} @@ -352,7 +357,7 @@ export class AgenticChatController implements ChatHandlers { // @ts-ignore this.#features.chat.chatOptionsUpdate({ region }) }) - this.#chatHistoryDb = new ChatDatabase(features) + this.#chatHistoryDb = ChatDatabase.getInstance(features) this.#tabBarController = new TabBarController( features, this.#chatHistoryDb, @@ -370,6 +375,7 @@ export class AgenticChatController implements ChatHandlers { this.#mcpEventHandler = new McpEventHandler(features, telemetryService) this.#origin = getOriginFromClientInfo(getClientName(this.#features.lsp.getClientInitializeParams())) this.#activeUserTracker = ActiveUserTracker.getInstance(this.#features) + this.#memoryBankController = MemoryBankController.getInstance(features) } async onExecuteCommand(params: ExecuteCommandParams, _token: CancellationToken): Promise { @@ -681,25 +687,136 @@ export class AgenticChatController implements ChatHandlers { return this.#mcpEventHandler.onMcpServerClick(params) } + /** + * Fetches available models either from cache or API + * If cache is valid (less than 5 minutes old), returns cached models + * If cache is invalid or empty, makes an API call and stores results in cache + * If the API throws errors (e.g., throttling), falls back to default models + */ + async #fetchModelsWithCache(): Promise<{ models: Model[]; defaultModelId?: string; errorFromAPI: boolean }> { + let models: Model[] = [] + let defaultModelId: string | undefined + let errorFromAPI = false + + // Check if cache is valid (less than 5 minutes old) + if (this.#chatHistoryDb.isCachedModelsValid()) { + const cachedData = this.#chatHistoryDb.getCachedModels() + if (cachedData && cachedData.models && cachedData.models.length > 0) { + this.#log('Using cached models, last updated at:', new Date(cachedData.timestamp).toISOString()) + return { + models: cachedData.models, + defaultModelId: cachedData.defaultModelId, + errorFromAPI: false, + } + } + } + + // If cache is invalid or empty, make an API call + this.#log('Cache miss or expired, fetching models from API') + try { + const client = AmazonQTokenServiceManager.getInstance().getCodewhispererService() + const responseResult = await client.listAvailableModels({ + origin: IDE, + profileArn: AmazonQTokenServiceManager.getInstance().getConnectionType() + ? AmazonQTokenServiceManager.getInstance().getActiveProfileArn() + : undefined, + }) + + // Wait for the response to be completed before proceeding + this.#log('Model Response: ', JSON.stringify(responseResult, null, 2)) + if (responseResult.models) { + models = Object.values(responseResult.models).map(({ modelId, modelName, description }) => ({ + id: modelId ?? 'unknown', + name: modelName ?? modelId ?? 'unknown', + description: description ?? '', + })) + } + defaultModelId = responseResult.defaultModel?.modelId + + // Cache the models with defaultModelId + this.#chatHistoryDb.setCachedModels(models, defaultModelId) + } catch (err) { + // In case of API throttling or other errors, fall back to hardcoded models + this.#log('Error fetching models from API, using fallback models:', fmtError(err)) + errorFromAPI = true + models = FALLBACK_MODEL_OPTIONS + } + + return { + models, + defaultModelId, + errorFromAPI, + } + } + + /** + * This function handles the model selection process for the chat interface. + * It first attempts to retrieve models from cache or API, then determines the appropriate model to select + * based on the following priority: + * 1. When errors occur or session is invalid: Use the default model as a fallback + * 2. When user has previously selected a model: Use that model (or its mapped version if the model ID has changed) + * 3. When there's a default model from the API: Use the server-recommended default model + * 4. Last resort: Use the newest model defined in modelSelection constants + * + * This ensures users maintain consistent model selection across sessions while also handling + * API failures and model ID migrations gracefully. + */ async onListAvailableModels(params: ListAvailableModelsParams): Promise { - const region = AmazonQTokenServiceManager.getInstance().getRegion() - const models = region && MODEL_OPTIONS_FOR_REGION[region] ? MODEL_OPTIONS_FOR_REGION[region] : MODEL_OPTIONS + // Get models from cache or API + const { models, defaultModelId, errorFromAPI } = await this.#fetchModelsWithCache() + + // Get the first fallback model option as default + const defaultModelOption = FALLBACK_MODEL_OPTIONS[0] + const DEFAULT_MODEL_ID = defaultModelId || defaultModelOption?.id const sessionResult = this.#chatSessionManagementService.getSession(params.tabId) const { data: session, success } = sessionResult - if (!success) { + + // Handle error cases by returning default model + if (!success || errorFromAPI) { return { tabId: params.tabId, models: models, + selectedModelId: DEFAULT_MODEL_ID, } } - const savedModelId = this.#chatHistoryDb.getModelId() - const selectedModelId = - savedModelId && models.some(model => model.id === savedModelId) - ? savedModelId - : getLatestAvailableModel(region).id + // Determine selected model ID based on priority + let selectedModelId: string + let modelId = this.#chatHistoryDb.getModelId() + + // Helper function to get model label from FALLBACK_MODEL_RECORD + const getModelLabel = (modelKey: string) => + FALLBACK_MODEL_RECORD[modelKey as keyof typeof FALLBACK_MODEL_RECORD]?.label || modelKey + + // Helper function to map enum model ID to API model ID + const getMappedModelId = (modelKey: string) => + BEDROCK_MODEL_TO_MODEL_ID[modelKey as keyof typeof BEDROCK_MODEL_TO_MODEL_ID] || modelKey + + // Determine selected model ID based on priority + if (modelId) { + const mappedModelId = getMappedModelId(modelId) + + // Priority 1: Use mapped modelId if it exists in available models from backend + if (models.some(model => model.id === mappedModelId)) { + selectedModelId = mappedModelId + } + // Priority 2: Use mapped version if modelId exists in FALLBACK_MODEL_RECORD and no backend models available + else if (models.length === 0 && modelId in FALLBACK_MODEL_RECORD) { + selectedModelId = getModelLabel(modelId) + } + // Priority 3: Fall back to default or system default + else { + selectedModelId = defaultModelId || getMappedModelId(DEFAULT_MODEL_ID) + } + } else { + // No user-selected model - use API default or system default + selectedModelId = defaultModelId || getMappedModelId(DEFAULT_MODEL_ID) + } + + // Store the selected model in the session session.modelId = selectedModelId + return { tabId: params.tabId, models: models, @@ -721,23 +838,112 @@ export class AgenticChatController implements ChatHandlers { async onChatPrompt(params: ChatParams, token: CancellationToken): Promise> { // Phase 1: Initial Setup - This happens only once - params.prompt.prompt = sanitizeInput(params.prompt.prompt || '') + params.prompt.prompt = sanitizeInput(params.prompt.prompt || '', true) IdleWorkspaceManager.recordActivityTimestamp() - const maybeDefaultResponse = !params.prompt.command && getDefaultChatResponse(params.prompt.prompt) - if (maybeDefaultResponse) { - return maybeDefaultResponse - } - const sessionResult = this.#chatSessionManagementService.getSession(params.tabId) - const { data: session, success } = sessionResult if (!success) { return new ResponseError(ErrorCodes.InternalError, sessionResult.error) } + // Memory Bank Creation Flow - Delegate to MemoryBankController + if (this.#memoryBankController.isMemoryBankCreationRequest(params.prompt.prompt)) { + this.#features.logging.info(`Memory Bank creation request detected for tabId: ${params.tabId}`) + session.isMemoryBankGeneration = true + + // Store original prompt to prevent data loss on failure + const originalPrompt = params.prompt.prompt + + try { + const workspaceFolders = workspaceUtils.getWorkspaceFolderPaths(this.#features.workspace) + const workspaceUri = workspaceFolders.length > 0 ? workspaceFolders[0] : '' + + if (!workspaceUri) { + throw new Error('No workspace folder found for Memory Bank creation') + } + + // Check if memory bank already exists to provide appropriate user feedback + const memoryBankExists = await this.#memoryBankController.memoryBankExists(workspaceUri) + const actionType = memoryBankExists ? 'Regenerating' : 'Generating' + this.#features.logging.info(`${actionType} Memory Bank for workspace: ${workspaceUri}`) + + const resultStream = this.#getChatResultStream(params.partialResultToken) + await resultStream.writeResultBlock({ + body: `Preparing to analyze your project...`, + type: 'answer', + messageId: crypto.randomUUID(), + }) + + const comprehensivePrompt = await this.#memoryBankController.prepareComprehensiveMemoryBankPrompt( + workspaceUri, + async (prompt: string) => { + // Direct LLM call for ranking - no agentic loop + try { + if (!this.#serviceManager) { + throw new Error('amazonQServiceManager is not initialized') + } + + const client = this.#serviceManager.getStreamingClient() + const requestInput: SendMessageCommandInput = { + conversationState: { + chatTriggerType: ChatTriggerType.MANUAL, + currentMessage: { + userInputMessage: { + content: prompt, + }, + }, + }, + } + + const response = await client.sendMessage(requestInput) + + let responseContent = '' + const maxResponseSize = 50000 // 50KB limit + + if (response.sendMessageResponse) { + for await (const chatEvent of response.sendMessageResponse) { + if (chatEvent.assistantResponseEvent?.content) { + responseContent += chatEvent.assistantResponseEvent.content + if (responseContent.length > maxResponseSize) { + this.#features.logging.warn('LLM response exceeded size limit, truncating') + break + } + } + } + } + + return responseContent.trim() + } catch (error) { + this.#features.logging.error(`Memory Bank LLM ranking failed: ${error}`) + return '' // Empty string triggers TF-IDF fallback + } + } + ) + + // Only update prompt if we got a valid comprehensive prompt + if (comprehensivePrompt && comprehensivePrompt.trim().length > 0) { + params.prompt.prompt = comprehensivePrompt + } else { + this.#features.logging.warn('Empty comprehensive prompt received, using original prompt') + params.prompt.prompt = originalPrompt + } + } catch (error) { + this.#features.logging.error(`Memory Bank preparation failed: ${error}`) + // Restore original prompt to ensure no data loss + params.prompt.prompt = originalPrompt + // Reset memory bank flag since preparation failed + session.isMemoryBankGeneration = false + } + } + + const maybeDefaultResponse = !params.prompt.command && getDefaultChatResponse(params.prompt.prompt) + if (maybeDefaultResponse) { + return maybeDefaultResponse + } + const compactIds = session.getAllDeferredCompactMessageIds() await this.#invalidateCompactCommand(params.tabId, compactIds) session.rejectAllDeferredToolExecutions(new ToolApprovalException('Command ignored: new prompt', false)) @@ -798,10 +1004,19 @@ export class AgenticChatController implements ChatHandlers { }) session.setConversationType('AgenticChat') + // Set up delay notification callback to show retry progress to users + session.setDelayNotificationCallback(notification => { + if (notification.thresholdExceeded) { + this.#log(`Updating progress message: ${notification.message}`) + void chatResultStream.updateProgressMessage(notification.message) + } + }) + const additionalContext = await this.#additionalContextProvider.getAdditionalContext( triggerContext, params.tabId, - params.context + params.context, + params.prompt.prompt ) // Add active file to context list if it's not already there const activeFile = @@ -980,8 +1195,7 @@ export class AgenticChatController implements ChatHandlers { * Runs the compaction, making requests and processing tool uses until completion */ #shouldCompact(currentRequestCount: number): boolean { - // 80% of 570K limit - if (currentRequestCount > 456_000) { + if (currentRequestCount > COMPACTION_CHARACTER_THRESHOLD) { this.#debug(`Current request total character count is: ${currentRequestCount}, prompting user to compact`) return true } else { @@ -1026,7 +1240,7 @@ export class AgenticChatController implements ChatHandlers { // Get and process the messages from history DB to maintain invariants for service requests try { const { history: historyMessages, historyCount: historyCharCount } = - this.#chatHistoryDb.fixAndGetHistory(tabId, conversationIdentifier ?? '', currentMessage, []) + this.#chatHistoryDb.fixAndGetHistory(tabId, currentMessage, []) messages = historyMessages characterCount = historyCharCount } catch (err) { @@ -1132,7 +1346,7 @@ export class AgenticChatController implements ChatHandlers { if (result.data?.chatResult.body !== undefined) { this.#chatHistoryDb.replaceWithSummary(tabId, 'cwc', conversationIdentifier ?? '', { body: result.data?.chatResult.body, - type: 'prompt' as any, + type: 'prompt' as ChatMessage['type'], shouldDisplayMessage: true, timestamp: new Date(), }) @@ -1204,12 +1418,7 @@ export class AgenticChatController implements ChatHandlers { history: historyMessages, historyCount: historyCharacterCount, currentCount: currentInputCount, - } = this.#chatHistoryDb.fixAndGetHistory( - tabId, - conversationId, - currentMessage, - pinnedContextMessages - ) + } = this.#chatHistoryDb.fixAndGetHistory(tabId, currentMessage, pinnedContextMessages) messages = historyMessages currentRequestCount = currentInputCount + historyCharacterCount this.#debug(`Request total character count: ${currentRequestCount}`) @@ -1257,7 +1466,7 @@ export class AgenticChatController implements ChatHandlers { } else { this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier, { body: currentMessage.userInputMessage?.content ?? '', - type: 'prompt' as any, + type: 'prompt' as ChatMessage['type'], userIntent: currentMessage.userInputMessage?.userIntent, origin: currentMessage.userInputMessage?.origin, userInputMessageContext: currentMessage.userInputMessage?.userInputMessageContext, @@ -1333,7 +1542,7 @@ export class AgenticChatController implements ChatHandlers { } else { this.#chatHistoryDb.addMessage(tabId, 'cwc', conversationIdentifier ?? '', { body: result.data?.chatResult.body, - type: 'answer' as any, + type: 'answer' as ChatMessage['type'], codeReference: result.data.chatResult.codeReference, relatedContent: result.data.chatResult.relatedContent?.content && @@ -1387,7 +1596,14 @@ export class AgenticChatController implements ChatHandlers { session.setConversationType('AgenticChatWithToolUse') if (result.success) { // Process tool uses and update the request input for the next iteration - toolResults = await this.#processToolUses(pendingToolUses, chatResultStream, session, tabId, token) + toolResults = await this.processToolUses( + pendingToolUses, + chatResultStream, + session, + tabId, + token, + additionalContext + ) if (toolResults.some(toolResult => this.#shouldSendBackErrorContent(toolResult))) { content = 'There was an error processing one or more tool uses. Try again, do not apologize.' shouldDisplayMessage = false @@ -1662,12 +1878,13 @@ export class AgenticChatController implements ChatHandlers { /** * Processes tool uses by running the tools and collecting results */ - async #processToolUses( + async processToolUses( toolUses: Array, chatResultStream: AgenticChatResultStream, session: ChatSessionService, tabId: string, - token?: CancellationToken + token?: CancellationToken, + additionalContext?: AdditionalContentEntryAddition[] ): Promise { const results: ToolResult[] = [] @@ -1695,8 +1912,7 @@ export class AgenticChatController implements ChatHandlers { // remove progress UI await chatResultStream.removeResultBlockAndUpdateUI(progressPrefix + toolUse.toolUseId) - // fsRead and listDirectory write to an existing card and could show nothing in the current position - if (![FS_WRITE, FS_REPLACE, FS_READ, LIST_DIRECTORY].includes(toolUse.name)) { + if (![FS_WRITE, FS_REPLACE].includes(toolUse.name)) { await this.#showUndoAllIfRequired(chatResultStream, session) } // fsWrite can take a long time, so we render fsWrite Explanatory upon partial streaming responses. @@ -1729,7 +1945,14 @@ export class AgenticChatController implements ChatHandlers { } const { Tool } = toolMap[toolUse.name as keyof typeof toolMap] - const tool = new Tool(this.#features) + const tool = + toolUse.name === FS_READ && session.isMemoryBankGeneration + ? new Tool( + this.#features, + FSREAD_MEMORY_BANK_MAX_PER_FILE, + FSREAD_MEMORY_BANK_MAX_TOTAL + ) + : new Tool(this.#features) // For MCP tools, get the permission from McpManager // const permission = McpManager.instance.getToolPerm('Built-in', toolUse.name) @@ -1792,7 +2015,9 @@ export class AgenticChatController implements ChatHandlers { } case CodeReview.toolName: case DisplayFindings.toolName: - // no need to write tool message for CodeReview or DisplayFindings + // no need to write tool message for CodeReview or DisplayFindings + case SemanticSearch.toolName: + // For internal A/B we don't need tool message break // — DEFAULT ⇒ Only MCP tools, but can also handle generic tool execution messages default: @@ -1869,13 +2094,13 @@ export class AgenticChatController implements ChatHandlers { if (toolUse.name === CodeReview.toolName) { try { let initialInput = JSON.parse(JSON.stringify(toolUse.input)) - let ruleArtifacts = await this.#additionalContextProvider.collectWorkspaceRules(tabId) - if (ruleArtifacts !== undefined || ruleArtifacts !== null) { - this.#features.logging.info(`RuleArtifacts: ${JSON.stringify(ruleArtifacts)}`) - let pathsToRulesMap = ruleArtifacts.map(ruleArtifact => ({ path: ruleArtifact.id })) - this.#features.logging.info(`PathsToRules: ${JSON.stringify(pathsToRulesMap)}`) - initialInput['ruleArtifacts'] = pathsToRulesMap + + if (additionalContext !== undefined) { + initialInput['ruleArtifacts'] = additionalContext + .filter(c => c.type === 'rule') + .map(c => ({ path: c.path })) } + initialInput['modelId'] = session.modelId toolUse.input = initialInput } catch (e) { this.#features.logging.warn(`could not parse CodeReview tool input: ${e}`) @@ -1893,6 +2118,28 @@ export class AgenticChatController implements ChatHandlers { let toolResultContent: ToolResultContentBlock + if (toolUse.name === CodeReview.toolName) { + // no need to write tool result for code review, this is handled by model via chat + // Push result in message so that it is picked by IDE plugin to show in issues panel + const codeReviewResult = result as InvokeOutput + if ( + codeReviewResult?.output?.kind === 'json' && + codeReviewResult.output.success && + (codeReviewResult.output.content as any)?.findingsByFile + ) { + await chatResultStream.writeResultBlock({ + type: 'tool', + messageId: toolUse.toolUseId + CODE_REVIEW_FINDINGS_MESSAGE_SUFFIX, + body: (codeReviewResult.output.content as any).findingsByFile, + }) + codeReviewResult.output.content = { + codeReviewId: (codeReviewResult.output.content as any).codeReviewId, + message: (codeReviewResult.output.content as any).message, + findingsByFileSimplified: (codeReviewResult.output.content as any).findingsByFileSimplified, + } + } + } + if (typeof result === 'string') { toolResultContent = { text: result } } else if (Array.isArray(result)) { @@ -1911,10 +2158,19 @@ export class AgenticChatController implements ChatHandlers { switch (toolUse.name) { case FS_READ: case LIST_DIRECTORY: + const readToolResult = await this.#processReadTool(toolUse, chatResultStream) + if (readToolResult) { + await chatResultStream.writeResultBlock(readToolResult) + } + break case FILE_SEARCH: - const initialListDirResult = this.#processReadOrListOrSearch(toolUse, chatResultStream) - if (initialListDirResult) { - await chatResultStream.writeResultBlock(initialListDirResult) + if (isFileSearchParams(toolUse.input)) { + await this.#processFileSearchTool( + toolUse.input, + toolUse.toolUseId, + result, + chatResultStream + ) } break // no need to write tool result for listDir,fsRead,fileSearch into chat stream @@ -1955,23 +2211,20 @@ export class AgenticChatController implements ChatHandlers { this.#abTestingAllocation?.experimentName, this.#abTestingAllocation?.userVariation ) + // Emit acceptedLineCount when write tool is used and code changes are accepted + const acceptedLineCount = calculateModifiedLines(toolUse, doc?.getText()) + await this.#telemetryController.emitInteractWithMessageMetric( + tabId, + { + cwsprChatMessageId: chatResult.messageId ?? toolUse.toolUseId, + cwsprChatInteractionType: ChatInteractionType.AgenticCodeAccepted, + codewhispererCustomizationArn: this.#customizationArn, + }, + acceptedLineCount + ) await chatResultStream.writeResultBlock(chatResult) break case CodeReview.toolName: - // no need to write tool result for code review, this is handled by model via chat - // Push result in message so that it is picked by IDE plugin to show in issues panel - const codeReviewResult = result as InvokeOutput - if ( - codeReviewResult?.output?.kind === 'json' && - codeReviewResult.output.success && - (codeReviewResult.output.content as any)?.findingsByFile - ) { - await chatResultStream.writeResultBlock({ - type: 'tool', - messageId: toolUse.toolUseId + CODE_REVIEW_FINDINGS_MESSAGE_SUFFIX, - body: (codeReviewResult.output.content as any).findingsByFile, - }) - } break case DisplayFindings.toolName: // no need to write tool result for code review, this is handled by model via chat @@ -1989,6 +2242,9 @@ export class AgenticChatController implements ChatHandlers { }) } break + case SemanticSearch.toolName: + await this.#handleSemanticSearchToolResult(toolUse, result, session, chatResultStream) + break // — DEFAULT ⇒ MCP tools default: await this.#handleMcpToolResult(toolUse, result, session, chatResultStream) @@ -2071,6 +2327,50 @@ export class AgenticChatController implements ChatHandlers { ) } + // Handle MCP tool failures + const originalNames = McpManager.instance.getOriginalToolNames(toolUse.name) + if (originalNames && toolUse.toolUseId) { + const { toolName } = originalNames + const cachedToolUse = session.toolUseLookup.get(toolUse.toolUseId) + const cachedButtonBlockId = (cachedToolUse as any)?.cachedButtonBlockId + const customerFacingError = getCustomerFacingErrorMessage(err) + + const errorResult = { + type: 'tool', + messageId: toolUse.toolUseId, + summary: { + content: { + header: { + icon: 'tools', + body: `${toolName}`, + status: { + status: 'error', + icon: 'cancel-circle', + text: 'Error', + description: customerFacingError, + }, + }, + }, + collapsedContent: [ + { + header: { body: 'Parameters' }, + body: `\`\`\`json\n${JSON.stringify(toolUse.input, null, 2)}\n\`\`\``, + }, + { + header: { body: 'Error' }, + body: customerFacingError, + }, + ], + }, + } as ChatResult + + if (cachedButtonBlockId !== undefined) { + await chatResultStream.overwriteResultBlock(errorResult, cachedButtonBlockId) + } else { + await chatResultStream.writeResultBlock(errorResult) + } + } + // display fs write failure status in the UX of that file card if ((toolUse.name === FS_WRITE || toolUse.name === FS_REPLACE) && toolUse.toolUseId) { const existingCard = chatResultStream.getMessageBlockId(toolUse.toolUseId) @@ -2315,7 +2615,6 @@ export class AgenticChatController implements ChatHandlers { } const toolMsgId = toolUse.toolUseId! - const chatMsgId = chatResultStream.getResult().messageId let headerEmitted = false const initialHeader: ChatMessage['header'] = { @@ -2353,13 +2652,6 @@ export class AgenticChatController implements ChatHandlers { header: completedHeader, }) - await chatResultStream.writeResultBlock({ - type: 'answer', - messageId: chatMsgId, - body: '', - header: undefined, - }) - this.#stoppedToolUses.add(toolMsgId) }, }) @@ -2450,7 +2742,7 @@ export class AgenticChatController implements ChatHandlers { status: { status: isAccept ? 'success' : 'error', icon: isAccept ? 'ok' : 'cancel', - text: isAccept ? 'Completed' : 'Rejected', + text: isAccept ? 'Accepted' : 'Rejected', }, fileList: undefined, }, @@ -2512,7 +2804,7 @@ export class AgenticChatController implements ChatHandlers { body: COMPACTION_HEADER_BODY, buttons, } as any - const body = COMPACTION_BODY(Math.round((characterCount / MaxOverallCharacters) * 100)) + const body = COMPACTION_BODY(Math.round((characterCount / MAX_OVERALL_CHARACTERS) * 100)) return { type: 'tool', messageId, @@ -2537,6 +2829,7 @@ export class AgenticChatController implements ChatHandlers { session.setDeferredToolExecution(messageId, deferred.resolve, deferred.reject) this.#log(`Prompting for compaction approval for messageId: ${messageId}`) await deferred.promise + session.removeDeferredToolExecution(messageId) // Note: we want to overwrite the button block because it already exists in the stream. await resultStream.overwriteResultBlock(this.#getUpdateCompactConfirmResult(messageId), promptBlockId) } @@ -2877,70 +3170,135 @@ export class AgenticChatController implements ChatHandlers { } } - #processReadOrListOrSearch(toolUse: ToolUse, chatResultStream: AgenticChatResultStream): ChatMessage | undefined { - let messageIdToUpdate = toolUse.toolUseId! - const currentId = chatResultStream.getMessageIdToUpdateForTool(toolUse.name!) + async #processFileSearchTool( + toolInput: FileSearchParams, + toolUseId: string, + result: InvokeOutput, + chatResultStream: AgenticChatResultStream + ): Promise { + if (typeof result.output.content !== 'string') return - if (currentId) { - messageIdToUpdate = currentId - } else { - chatResultStream.setMessageIdToUpdateForTool(toolUse.name!, messageIdToUpdate) + const { queryName, path: inputPath } = toolInput + const resultCount = result.output.content + .split('\n') + .filter(line => line.trim().startsWith('[F]') || line.trim().startsWith('[D]')).length + + const chatMessage: ChatMessage = { + type: 'tool', + messageId: toolUseId, + header: { + body: `Searched for "${queryName}" in `, + icon: 'search', + status: { + text: `${resultCount} result${resultCount !== 1 ? 's' : ''} found`, + }, + fileList: { + filePaths: [inputPath], + details: { + [inputPath]: { + description: inputPath, + visibleName: path.basename(inputPath), + clickable: false, + }, + }, + }, + }, } - let currentPaths = [] + await chatResultStream.writeResultBlock(chatMessage) + } + + async #processReadTool( + toolUse: ToolUse, + chatResultStream: AgenticChatResultStream + ): Promise { + let currentPaths: string[] = [] if (toolUse.name === FS_READ) { - currentPaths = (toolUse.input as unknown as FsReadParams)?.paths + currentPaths = (toolUse.input as unknown as FsReadParams)?.paths || [] + } else if (toolUse.name === LIST_DIRECTORY) { + const singlePath = (toolUse.input as unknown as ListDirectoryParams)?.path + if (singlePath) { + currentPaths = [singlePath] + } + } else if (toolUse.name === FILE_SEARCH) { + const queryName = (toolUse.input as unknown as FileSearchParams)?.queryName + if (queryName) { + currentPaths = [queryName] + } } else { - currentPaths.push((toolUse.input as unknown as ListDirectoryParams | FileSearchParams)?.path) + return } - if (!currentPaths) return + if (currentPaths.length === 0) return - for (const currentPath of currentPaths) { - const existingPaths = chatResultStream.getMessageOperation(messageIdToUpdate)?.filePaths || [] - // Check if path already exists in the list - const isPathAlreadyProcessed = existingPaths.some(path => path.relativeFilePath === currentPath) - if (!isPathAlreadyProcessed) { - const currentFileDetail = { - relativeFilePath: currentPath, - lineRanges: [{ first: -1, second: -1 }], - } - chatResultStream.addMessageOperation(messageIdToUpdate, toolUse.name!, [ - ...existingPaths, - currentFileDetail, - ]) + // Check if the last message is the same tool type + const lastMessage = chatResultStream.getLastMessage() + const isSameToolType = + lastMessage?.type === 'tool' && lastMessage.header?.icon === this.#toolToIcon(toolUse.name) + + let allPaths = currentPaths + + if (isSameToolType && lastMessage.messageId) { + // Combine with existing paths and overwrite the last message + const existingPaths = lastMessage.header?.fileList?.filePaths || [] + allPaths = [...existingPaths, ...currentPaths] + + const blockId = chatResultStream.getMessageBlockId(lastMessage.messageId) + if (blockId !== undefined) { + // Create the updated message with combined paths + const updatedMessage = this.#createFileListToolMessage(toolUse, allPaths, lastMessage.messageId) + // Overwrite the existing block + await chatResultStream.overwriteResultBlock(updatedMessage, blockId) + return undefined // Don't return a message since we already wrote it } } + + // Create new message with current paths + return this.#createFileListToolMessage(toolUse, allPaths, toolUse.toolUseId!) + } + + #createFileListToolMessage(toolUse: ToolUse, filePaths: string[], messageId: string): ChatMessage { + const itemCount = filePaths.length let title: string - const itemCount = chatResultStream.getMessageOperation(messageIdToUpdate)?.filePaths.length - const filePathsPushed = chatResultStream.getMessageOperation(messageIdToUpdate)?.filePaths ?? [] - if (!itemCount) { + if (itemCount === 0) { title = 'Gathering context' } else { title = toolUse.name === FS_READ ? `${itemCount} file${itemCount > 1 ? 's' : ''} read` - : toolUse.name === FILE_SEARCH - ? `${itemCount} ${itemCount === 1 ? 'directory' : 'directories'} searched` - : `${itemCount} ${itemCount === 1 ? 'directory' : 'directories'} listed` + : toolUse.name === LIST_DIRECTORY + ? `${itemCount} ${itemCount === 1 ? 'directory' : 'directories'} listed` + : '' } const details: Record = {} - for (const item of filePathsPushed) { - details[item.relativeFilePath] = { - lineRanges: item.lineRanges, - description: item.relativeFilePath, + for (const filePath of filePaths) { + details[filePath] = { + description: filePath, + visibleName: path.basename(filePath), + clickable: toolUse.name === FS_READ, } } - - const fileList: FileList = { - rootFolderTitle: title, - filePaths: filePathsPushed.map(item => item.relativeFilePath), - details, - } return { type: 'tool', - fileList, - messageId: messageIdToUpdate, - body: '', + header: { + body: title, + icon: this.#toolToIcon(toolUse.name), + fileList: { + filePaths, + details, + }, + }, + messageId, + } + } + + #toolToIcon(toolName: string | undefined): string | undefined { + switch (toolName) { + case FS_READ: + return 'eye' + case LIST_DIRECTORY: + return 'check-list' + default: + return undefined } } @@ -2956,14 +3314,7 @@ export class AgenticChatController implements ChatHandlers { return undefined } - let messageIdToUpdate = toolUse.toolUseId! - const currentId = chatResultStream.getMessageIdToUpdateForTool(toolUse.name!) - - if (currentId) { - messageIdToUpdate = currentId - } else { - chatResultStream.setMessageIdToUpdateForTool(toolUse.name!, messageIdToUpdate) - } + const messageIdToUpdate = toolUse.toolUseId! // Extract search results from the tool output const output = result.output.content as SanitizedRipgrepOutput @@ -3129,6 +3480,9 @@ export class AgenticChatController implements ChatHandlers { }, }) + // Reset memory bank flag after completion + session.isMemoryBankGeneration = false + return chatResultStream.getResult() } @@ -3143,7 +3497,7 @@ export class AgenticChatController implements ChatHandlers { metric: Metric, agenticCodingMode: boolean ): Promise> { - const errorMessage = getErrorMsg(err) + const errorMessage = (getErrorMsg(err) ?? GENERIC_ERROR_MS).replace(/[\r\n]+/g, ' ') // replace new lines with empty space const requestID = getRequestID(err) ?? '' metric.setDimension('cwsprChatResponseCode', getHttpStatusCode(err) ?? 0) metric.setDimension('languageServerVersion', this.#features.runtime.serverInfo.version) @@ -3153,7 +3507,14 @@ export class AgenticChatController implements ChatHandlers { metric.metric.requestIds = [requestID] metric.metric.cwsprChatMessageId = errorMessageId metric.metric.cwsprChatConversationId = conversationId - await this.#telemetryController.emitAddMessageMetric(tabId, metric.metric, 'Failed') + const errorCode = err.code ?? '' + await this.#telemetryController.emitAddMessageMetric(tabId, metric.metric, 'Failed', errorMessage, errorCode) + + // Reset memory bank flag on request error + const sessionResult = this.#chatSessionManagementService.getSession(tabId) + if (sessionResult.success) { + sessionResult.data.isMemoryBankGeneration = false + } if (isUsageLimitError(err)) { if (this.#paidTierMode !== 'paidtier') { @@ -3198,7 +3559,7 @@ export class AgenticChatController implements ChatHandlers { tabId, metric.metric, requestID, - errorMessage ?? GENERIC_ERROR_MS, + errorMessage, agenticCodingMode ) } @@ -3486,9 +3847,11 @@ export class AgenticChatController implements ChatHandlers { */ async onReady() { await this.restorePreviousChats() + this.#contextCommandsProvider.onReady() try { const localProjectContextController = await LocalProjectContextController.getInstance() const contextItems = await localProjectContextController.getContextCommandItems() + this.#contextCommandsProvider.setFilesAndFoldersPending(false) await this.#contextCommandsProvider.processContextCommandUpdate(contextItems) void this.#contextCommandsProvider.maybeUpdateCodeSymbols() } catch (error) { @@ -3515,25 +3878,6 @@ export class AgenticChatController implements ChatHandlers { onSourceLinkClick() {} - /** - * @deprecated use aws/chat/listAvailableModels server request instead - */ - #legacySetModelId(tabId: string, session: ChatSessionService) { - // Since model selection is mandatory, the only time modelId is not set is when the chat history is empty. - // In that case, we use the default modelId. - let modelId = this.#chatHistoryDb.getModelId() ?? DEFAULT_MODEL_ID - - const region = AmazonQTokenServiceManager.getInstance().getRegion() - if (region === 'eu-central-1') { - // Only 3.7 Sonnet is available in eu-central-1 for now - modelId = 'CLAUDE_3_7_SONNET_20250219_V1_0' - // @ts-ignore - this.#features.chat.chatOptionsUpdate({ region }) - } - this.#features.chat.chatOptionsUpdate({ modelId: modelId, tabId: tabId }) - session.modelId = modelId - } - onTabAdd(params: TabAddParams) { this.#telemetryController.activeTabId = params.tabId @@ -3546,11 +3890,14 @@ export class AgenticChatController implements ChatHandlers { if (!success) { return new ResponseError(ErrorCodes.InternalError, sessionResult.error) } - this.#legacySetModelId(params.tabId, session) // Get the saved pair programming mode from the database or default to true if not found const savedPairProgrammingMode = this.#chatHistoryDb.getPairProgrammingMode() session.pairProgrammingMode = savedPairProgrammingMode !== undefined ? savedPairProgrammingMode : true + if (session) { + // Set the logging object on the session + session.setLogging(this.#features.logging) + } // Update the client with the initial pair programming mode this.#features.chat.chatOptionsUpdate({ @@ -3558,11 +3905,6 @@ export class AgenticChatController implements ChatHandlers { // Type assertion to support pairProgrammingMode ...(session.pairProgrammingMode !== undefined ? { pairProgrammingMode: session.pairProgrammingMode } : {}), } as ChatUpdateParams) - - if (success && session) { - // Set the logging object on the session - session.setLogging(this.#features.logging) - } this.setPaidTierMode(params.tabId) } @@ -4418,6 +4760,13 @@ export class AgenticChatController implements ChatHandlers { await chatResultStream.overwriteResultBlock(toolResultCard, cachedButtonBlockId) } else { // Fallback to creating a new card + if (toolResultCard.summary?.content?.header) { + toolResultCard.summary.content.header.status = { + status: 'success', + icon: 'ok', + text: 'Completed', + } + } this.#log(`Warning: No blockId found for tool use ${toolUse.toolUseId}, creating new card`) await chatResultStream.writeResultBlock(toolResultCard) } @@ -4433,6 +4782,64 @@ export class AgenticChatController implements ChatHandlers { }) } + async #handleSemanticSearchToolResult( + toolUse: ToolUse, + result: any, + session: ChatSessionService, + chatResultStream: AgenticChatResultStream + ): Promise { + // Early return if toolUseId is undefined + if (!toolUse.toolUseId) { + this.#log(`Cannot handle semantic search tool result: missing toolUseId`) + return + } + + // Format the tool result and input as JSON strings + const toolInput = JSON.stringify(toolUse.input, null, 2) + const toolResultContent = typeof result === 'string' ? result : JSON.stringify(result, null, 2) + + const toolResultCard: ChatMessage = { + type: 'tool', + messageId: toolUse.toolUseId, + summary: { + content: { + header: { + icon: 'tools', + body: `${SemanticSearch.toolName}`, + fileList: undefined, + }, + }, + collapsedContent: [ + { + header: { + body: 'Parameters', + }, + body: `\`\`\`json\n${toolInput}\n\`\`\``, + }, + { + header: { + body: 'Result', + }, + body: `\`\`\`json\n${toolResultContent}\n\`\`\``, + }, + ], + }, + } + + // Get the stored blockId for this tool use + const cachedToolUse = session.toolUseLookup.get(toolUse.toolUseId) + const cachedButtonBlockId = (cachedToolUse as any)?.cachedButtonBlockId + + if (cachedButtonBlockId !== undefined) { + // Update the existing card with the results + await chatResultStream.overwriteResultBlock(toolResultCard, cachedButtonBlockId) + } else { + // Fallback to creating a new card + this.#log(`Warning: No blockId found for tool use ${toolUse.toolUseId}, creating new card`) + await chatResultStream.writeResultBlock(toolResultCard) + } + } + scheduleABTestingFetching(userContext: UserContext | undefined) { if (!userContext) { return @@ -4457,9 +4864,11 @@ export class AgenticChatController implements ChatHandlers { .listFeatureEvaluations({ userContext }) .then(result => { const feature = result.featureEvaluations?.find( - feature => feature.feature === 'MaestroWorkspaceContext' + feature => + feature.feature && + ['MaestroWorkspaceContext', 'SematicSearchTool'].includes(feature.feature) ) - if (feature) { + if (feature && feature.feature && feature.variation) { this.#abTestingAllocation = { experimentName: feature.feature, userVariation: feature.variation, diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatResultStream.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatResultStream.ts index 70b3452361..a878267ffd 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatResultStream.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatResultStream.ts @@ -1,4 +1,4 @@ -import { ChatResult, FileDetails, ChatMessage } from '@aws/language-server-runtimes/protocol' +import { ChatResult, ChatMessage } from '@aws/language-server-runtimes/protocol' import { randomUUID } from 'crypto' export interface ResultStreamWriter { @@ -32,33 +32,20 @@ export interface ResultStreamWriter { close(): Promise } +export const progressPrefix = 'progress_' + /** * This class wraps around lsp.sendProgress to provide a more helpful interface for streaming a ChatResult to the client. * ChatResults are grouped into blocks that can be written directly, or streamed in. * In the final message, blocks are seperated by resultDelimiter defined below. */ - -interface FileDetailsWithPath extends FileDetails { - relativeFilePath: string -} - -type OperationType = 'read' | 'write' | 'listDir' - -export const progressPrefix = 'progress_' - -interface FileOperation { - type: OperationType - filePaths: FileDetailsWithPath[] -} export class AgenticChatResultStream { - static readonly resultDelimiter = '\n\n' + static readonly resultDelimiter = '\n' #state = { chatResultBlocks: [] as ChatMessage[], isLocked: false, uuid: randomUUID(), messageId: undefined as string | undefined, - messageIdToUpdateForTool: new Map(), - messageOperations: new Map(), } readonly #sendProgress: (newChatResult: ChatResult | string) => Promise @@ -70,33 +57,6 @@ export class AgenticChatResultStream { return this.#joinResults(this.#state.chatResultBlocks, only) } - setMessageIdToUpdateForTool(toolName: string, messageId: string) { - this.#state.messageIdToUpdateForTool.set(toolName as OperationType, messageId) - } - - getMessageIdToUpdateForTool(toolName: string): string | undefined { - return this.#state.messageIdToUpdateForTool.get(toolName as OperationType) - } - - /** - * Adds a file operation for a specific message - * @param messageId The ID of the message - * @param type The type of operation ('fsRead' or 'listDirectory' or 'fsWrite') - * @param filePaths Array of FileDetailsWithPath involved in the operation - */ - addMessageOperation(messageId: string, type: string, filePaths: FileDetailsWithPath[]) { - this.#state.messageOperations.set(messageId, { type: type as OperationType, filePaths }) - } - - /** - * Gets the file operation details for a specific message - * @param messageId The ID of the message - * @returns The file operation details or undefined if not found - */ - getMessageOperation(messageId: string): FileOperation | undefined { - return this.#state.messageOperations.get(messageId) - } - #joinResults(chatResults: ChatMessage[], only?: string): ChatResult { const result: ChatResult = { body: '', @@ -111,9 +71,9 @@ export class AgenticChatResultStream { return { ...acc, buttons: [...(acc.buttons ?? []), ...(c.buttons ?? [])], - body: acc.body + AgenticChatResultStream.resultDelimiter + c.body, - ...(c.contextList && { contextList: c.contextList }), - header: Object.prototype.hasOwnProperty.call(c, 'header') ? c.header : acc.header, + body: acc.body + (c.body ? AgenticChatResultStream.resultDelimiter + c.body : ''), + ...(c.contextList && c.type !== 'tool' && { contextList: c.contextList }), + header: c.header !== undefined ? c.header : acc.header, codeReference: [...(acc.codeReference ?? []), ...(c.codeReference ?? [])], } } else if (acc.additionalMessages!.some(am => am.messageId === c.messageId)) { @@ -127,9 +87,10 @@ export class AgenticChatResultStream { : am.buttons, body: am.messageId === c.messageId - ? am.body + AgenticChatResultStream.resultDelimiter + c.body + ? am.body + (c.body ? AgenticChatResultStream.resultDelimiter + c.body : '') : am.body, ...(am.messageId === c.messageId && + c.type !== 'tool' && (c.contextList || acc.contextList) && { contextList: { filePaths: [ @@ -161,7 +122,7 @@ export class AgenticChatResultStream { }, }, }), - header: Object.prototype.hasOwnProperty.call(c, 'header') ? c.header : am.header, + ...(am.messageId === c.messageId && c.header !== undefined && { header: c.header }), })), } } else { @@ -233,6 +194,28 @@ export class AgenticChatResultStream { } } + async updateProgressMessage(message: string) { + for (const block of this.#state.chatResultBlocks) { + if (block.messageId?.startsWith(progressPrefix) && block.header?.status?.icon === 'progress') { + const blockId = this.getMessageBlockId(block.messageId) + if (blockId !== undefined) { + const updatedBlock = { + ...block, + header: { + ...block.header, + status: { + ...block.header.status, + text: message, + }, + }, + } + await this.overwriteResultBlock(updatedBlock, blockId) + } + break + } + } + } + hasMessage(messageId: string): boolean { return this.#state.chatResultBlocks.some(block => block.messageId === messageId) } @@ -246,6 +229,10 @@ export class AgenticChatResultStream { return undefined } + getLastMessage(): ChatMessage { + return this.#state.chatResultBlocks[this.#state.chatResultBlocks.length - 1] + } + getResultStreamWriter(): ResultStreamWriter { // Note: if write calls are not awaited, stream can be out-of-order. if (this.#state.isLocked) { diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/constants.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/constants.ts index 09fbb20436..fb710eae9b 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/constants.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/constants.ts @@ -1,5 +1,3 @@ -import { BedrockModel } from './modelSelection' - // Error message constants export const GENERIC_ERROR_MS = 'An unexpected error occurred, check the logs for more information.' export const OUTPUT_LIMIT_EXCEEDS_PARTIAL_MSG = 'output exceeds maximum character limit of' @@ -9,12 +7,17 @@ export const RESPONSE_TIMEOUT_PARTIAL_MSG = 'Response processing timed out after export const LOADING_THRESHOLD_MS = 2000 export const CLIENT_TIMEOUT_MS = 245_000 export const RESPONSE_TIMEOUT_MS = 240_000 +export const SERVICE_MANAGER_TIMEOUT_MS = 10_000 //10 seconds +export const SERVICE_MANAGER_POLL_INTERVAL_MS = 100 // LLM Constants export const GENERATE_ASSISTANT_RESPONSE_INPUT_LIMIT = 500_000 -export const DEFAULT_MODEL_ID = BedrockModel.CLAUDE_SONNET_4_20250514_V1_0 // Compaction +// Maximum number of characters per request used for compaction prompt +// 200K tokens * 3.5 = 700K characters, intentionally overestimating with 3.5:1 ratio +export const MAX_OVERALL_CHARACTERS = 700_000 +export const COMPACTION_CHARACTER_THRESHOLD = 0.7 * MAX_OVERALL_CHARACTERS export const COMPACTION_BODY = (threshold: number) => `The context window is almost full (${threshold}%) and exceeding it will clear your history. Amazon Q can compact your history instead.` export const COMPACTION_HEADER_BODY = 'Compact chat history?' @@ -78,6 +81,51 @@ The summary should have following main sections: ` +// Retry Strategy Constants +export const RETRY_BASE_DELAY_MS = 1000 +export const RETRY_MAX_DELAY_MS = 10000 +export const RETRY_JITTER_MIN = 0.5 +export const RETRY_JITTER_MAX = 1.0 +export const RETRY_DELAY_NOTIFICATION_THRESHOLD_MS = 2000 +export const RETRY_BACKOFF_MULTIPLIER = 2 + +// HTTP Status Codes +export const HTTP_STATUS_TOO_MANY_REQUESTS = 429 +export const HTTP_STATUS_INTERNAL_SERVER_ERROR = 500 + +// Error Messages +export const MONTHLY_LIMIT_ERROR_MARKER = 'MONTHLY_REQUEST_COUNT' +export const CONTENT_LENGTH_EXCEEDS_THRESHOLD = 'CONTENT_LENGTH_EXCEEDS_THRESHOLD' +export const HIGH_LOAD_ERROR_MESSAGE = + 'Encountered unexpectedly high load when processing the request, please try again.' +export const SERVICE_UNAVAILABLE_EXCEPTION = 'ServiceUnavailableException' +export const INSUFFICIENT_MODEL_CAPACITY = 'INSUFFICIENT_MODEL_CAPACITY' +export const INVALID_MODEL_ID = 'INVALID_MODEL_ID' +export const SERVICE_QUOTA_EXCEPTION = 'ServiceQuotaExceededException' +export const MAXIMUM_CHAT_CONTENT_MESSAGE = 'Exceeded max chat context length.' + +// Delay tracking constants +export const MINOR_DELAY_THRESHOLD_MS = 2000 // 2 seconds +export const MAJOR_DELAY_THRESHOLD_MS = 5000 // 5 seconds +export const MAX_RETRY_DELAY_MS = 10000 // 10 seconds + +// Stalled stream protection constants +export const STALLED_STREAM_GRACE_PERIOD_MS = 300000 // 5 minutes +export const STALLED_STREAM_CHECK_INTERVAL_MS = 1000 // 1 second + +// Request attempt tracking +export const MAX_REQUEST_ATTEMPTS = 3 + +// FsRead limits +export const FSREAD_MAX_PER_FILE = 200_000 +export const FSREAD_MAX_TOTAL = 400_000 +export const FSREAD_MEMORY_BANK_MAX_PER_FILE = 20_000 +export const FSREAD_MEMORY_BANK_MAX_TOTAL = 100_000 + +// Memory Bank constants +// Temporarily reduced from recommended 20 to 5 for token optimization +export const MAX_NUMBER_OF_FILES_FOR_MEMORY_BANK_RANKING = 5 + // shortcut constant export const DEFAULT_MACOS_RUN_SHORTCUT = '⇧ ⌘ ↵' export const DEFAULT_WINDOW_RUN_SHORTCUT = 'Ctrl + ⇧ + ↵' diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/modelSelection.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/modelSelection.test.ts index 3fe300d2fd..211cf52dfe 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/modelSelection.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/modelSelection.test.ts @@ -1,67 +1,30 @@ import * as assert from 'assert' -import { MODEL_OPTIONS, MODEL_OPTIONS_FOR_REGION } from './modelSelection' +import { FALLBACK_MODEL_OPTIONS } from './modelSelection' describe('modelSelection', () => { describe('modelOptions', () => { it('should contain the correct model options', () => { - assert.ok(Array.isArray(MODEL_OPTIONS), 'modelOptions should be an array') - assert.strictEqual(MODEL_OPTIONS.length, 2, 'modelOptions should have 2 items') + assert.ok(Array.isArray(FALLBACK_MODEL_OPTIONS), 'modelOptions should be an array') + assert.strictEqual(FALLBACK_MODEL_OPTIONS.length, 1, 'modelOptions should have 1 item') // Check that the array contains the expected models - const modelIds = MODEL_OPTIONS.map(model => model.id) - assert.ok(modelIds.includes('CLAUDE_SONNET_4_20250514_V1_0'), 'Should include Claude Sonnet 4') - assert.ok(modelIds.includes('CLAUDE_3_7_SONNET_20250219_V1_0'), 'Should include Claude Sonnet 3.7') + const modelIds = FALLBACK_MODEL_OPTIONS.map(model => model.id) + assert.ok(modelIds.includes('CLAUDE_SONNET_4_20250514_V1_0'), 'Should include claude-sonnet-4') // Check that each model has the required properties - MODEL_OPTIONS.forEach(model => { + FALLBACK_MODEL_OPTIONS.forEach(model => { assert.ok('id' in model, 'Model should have id property') assert.ok('name' in model, 'Model should have name property') + assert.ok('description' in model, 'Model should have description property') assert.strictEqual(typeof model.id, 'string', 'Model id should be a string') assert.strictEqual(typeof model.name, 'string', 'Model name should be a string') + assert.strictEqual(typeof model.description, 'string', 'Model description should be a string') }) // Check specific model names - const claudeSonnet4 = MODEL_OPTIONS.find(model => model.id === 'CLAUDE_SONNET_4_20250514_V1_0') - const claudeSonnet37 = MODEL_OPTIONS.find(model => model.id === 'CLAUDE_3_7_SONNET_20250219_V1_0') + const claudeSonnet4 = FALLBACK_MODEL_OPTIONS.find(model => model.id === 'CLAUDE_SONNET_4_20250514_V1_0') - assert.strictEqual(claudeSonnet4?.name, 'Claude Sonnet 4', 'Claude Sonnet 4 should have correct name') - assert.strictEqual(claudeSonnet37?.name, 'Claude Sonnet 3.7', 'Claude Sonnet 3.7 should have correct name') - }) - }) - - describe('modelOptionsForRegion', () => { - it('should provide all models for us-east-1 region', () => { - const usEast1Models = MODEL_OPTIONS_FOR_REGION['us-east-1'] - assert.deepStrictEqual(usEast1Models, MODEL_OPTIONS, 'us-east-1 should have all models') - assert.strictEqual(usEast1Models.length, 2, 'us-east-1 should have 2 models') - - const modelIds = usEast1Models.map(model => model.id) - assert.ok(modelIds.includes('CLAUDE_SONNET_4_20250514_V1_0'), 'us-east-1 should include Claude Sonnet 4') - assert.ok( - modelIds.includes('CLAUDE_3_7_SONNET_20250219_V1_0'), - 'us-east-1 should include Claude Sonnet 3.7' - ) - }) - - it('should provide all models for eu-central-1 region', () => { - const euCentral1Models = MODEL_OPTIONS_FOR_REGION['eu-central-1'] - assert.deepStrictEqual(euCentral1Models, MODEL_OPTIONS, 'us-east-1 should have all models') - assert.strictEqual(euCentral1Models.length, 2, 'us-east-1 should have 2 models') - - const modelIds = euCentral1Models.map(model => model.id) - assert.ok(modelIds.includes('CLAUDE_SONNET_4_20250514_V1_0'), 'eu-central-1 should include Claude Sonnet 4') - assert.ok( - modelIds.includes('CLAUDE_3_7_SONNET_20250219_V1_0'), - 'eu-central-1 should include Claude Sonnet 3.7' - ) - }) - - it('should fall back to all models for unknown regions', () => { - // Test with a region that doesn't exist in the modelOptionsForRegion map - const unknownRegionModels = MODEL_OPTIONS_FOR_REGION['unknown-region'] - - // Should be undefined since the region doesn't exist in the map - assert.strictEqual(unknownRegionModels, undefined, 'Unknown region should return undefined') + assert.strictEqual(claudeSonnet4?.name, 'Claude Sonnet 4', 'claude-sonnet-4 should have correct name') }) }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/modelSelection.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/modelSelection.ts index cbee85f562..9e9927b10c 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/modelSelection.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/constants/modelSelection.ts @@ -1,27 +1,32 @@ import { ListAvailableModelsResult } from '@aws/language-server-runtimes/protocol' +/** + * @deprecated Do not add new models to the enum. + */ export enum BedrockModel { CLAUDE_SONNET_4_20250514_V1_0 = 'CLAUDE_SONNET_4_20250514_V1_0', - CLAUDE_3_7_SONNET_20250219_V1_0 = 'CLAUDE_3_7_SONNET_20250219_V1_0', } type ModelDetails = { label: string + description: string } -const MODEL_RECORD: Record = { - [BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0]: { label: 'Claude Sonnet 3.7' }, - [BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: { label: 'Claude Sonnet 4' }, +export const FALLBACK_MODEL_RECORD: Record = { + [BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: { + label: 'Claude Sonnet 4', + description: 'Hybrid reasoning and coding for regular use', + }, } -export const MODEL_OPTIONS: ListAvailableModelsResult['models'] = Object.entries(MODEL_RECORD).map( - ([value, { label }]) => ({ +export const BEDROCK_MODEL_TO_MODEL_ID: Record = { + [BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: 'claude-sonnet-4', +} + +export const FALLBACK_MODEL_OPTIONS: ListAvailableModelsResult['models'] = Object.entries(FALLBACK_MODEL_RECORD).map( + ([value, { label, description }]) => ({ id: value, name: label, + description: description, }) ) - -export const MODEL_OPTIONS_FOR_REGION: Record = { - 'us-east-1': MODEL_OPTIONS, - 'eu-central-1': MODEL_OPTIONS, -} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/additionalContextProvider.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/additionalContextProvider.test.ts index 6c745f20b3..e6742fee1b 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/additionalContextProvider.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/additionalContextProvider.test.ts @@ -174,6 +174,12 @@ describe('AdditionalContextProvider', () => { workspaceFolder: mockWorkspaceFolder, } + // Mock path.join to simulate Unix behavior + sinon.stub(path, 'join').callsFake((...args) => { + // Simulate Unix path.join behavior + return args.join('/').replace(/\\/g, '/') + }) + const explicitContext = [ { id: 'explicit-file', @@ -208,6 +214,9 @@ describe('AdditionalContextProvider', () => { assert.strictEqual(result.length, 1) assert.strictEqual(result[0].name, 'Explicit File') assert.strictEqual(result[0].pinned, false) + + // Restore original path.join + ;(path.join as sinon.SinonStub).restore() }) it('should avoid duplicates between explicit and pinned context', async () => { @@ -220,6 +229,12 @@ describe('AdditionalContextProvider', () => { workspaceFolder: mockWorkspaceFolder, } + // Mock path.join to simulate Unix behavior + sinon.stub(path, 'join').callsFake((...args) => { + // Simulate Unix path.join behavior + return args.join('/').replace(/\\/g, '/') + }) + const sharedContext = { id: 'shared-file', command: 'Shared File', @@ -255,6 +270,9 @@ describe('AdditionalContextProvider', () => { assert.strictEqual(result.length, 1) assert.strictEqual(result[0].name, 'Shared File') assert.strictEqual(result[0].pinned, false) // Should be marked as explicit, not pinned + + // Restore original path.join + ;(path.join as sinon.SinonStub).restore() }) it('should handle Active File context correctly', async () => { @@ -358,6 +376,105 @@ describe('AdditionalContextProvider', () => { assert.strictEqual(triggerContext.contextInfo?.pinnedContextCount.codeContextCount, 1) assert.strictEqual(triggerContext.contextInfo?.pinnedContextCount.promptContextCount, 1) }) + + it('should handle Unix path separators correctly', async () => { + const mockWorkspaceFolder = { uri: URI.file('/workspace').toString(), name: 'test' } + sinon.stub(workspaceUtils, 'getWorkspaceFolderPaths').returns(['/workspace']) + + // Mock path.join to simulate Unix behavior + sinon.stub(path, 'join').callsFake((...args) => { + // Simulate Unix path.join behavior + return args.join('/').replace(/\\/g, '/') + }) + + const explicitContext = [ + { + id: 'unix-prompt', + command: 'Unix Prompt', + label: 'file' as any, + route: ['/Users/test/.aws/amazonq/prompts', 'hello.md'], + }, + ] + + fsExistsStub.callsFake((path: string) => path.includes('.amazonq/rules')) + fsReadDirStub.resolves([]) + + // Reset stub - return data for first call (explicit context), empty for second call (pinned context) + getContextCommandPromptStub.reset() + getContextCommandPromptStub.onFirstCall().resolves([ + { + // promptContextCommands - explicit context + name: 'Unix Prompt', + content: 'content', + filePath: '/Users/test/.aws/amazonq/prompts/hello.md', // Proper Unix path + relativePath: 'hello.md', + startLine: 1, + endLine: 10, + }, + ]) + getContextCommandPromptStub.onSecondCall().resolves([]) // pinnedContextCommands - empty + + const result = await provider.getAdditionalContext( + { workspaceFolder: mockWorkspaceFolder }, + 'tab1', + explicitContext + ) + assert.strictEqual(result.length, 1) + assert.strictEqual(result[0].name, 'Unix Prompt') + + // Restore original path.join + ;(path.join as sinon.SinonStub).restore() + }) + + it('should handle Windows path separators correctly', async () => { + const mockWorkspaceFolder = { uri: URI.file('/workspace').toString(), name: 'test' } + sinon.stub(workspaceUtils, 'getWorkspaceFolderPaths').returns(['/workspace']) + + // Mock path.join to simulate Windows behavior + const originalPathJoin = path.join + sinon.stub(path, 'join').callsFake((...args) => { + // Simulate Windows path.join behavior + return args.join('\\').replace(/\//g, '\\') + }) + + const explicitContext = [ + { + id: 'windows-prompt', + command: 'Windows Prompt', + label: 'file' as any, + route: ['C:\\Users\\test\\.aws\\amazonq\\prompts', 'hello.md'], + }, + ] + + fsExistsStub.callsFake((path: string) => path.includes('.amazonq/rules')) + fsReadDirStub.resolves([]) + + // Reset stub - return data for first call (explicit context), empty for second call (pinned context) + getContextCommandPromptStub.reset() + getContextCommandPromptStub.onFirstCall().resolves([ + { + // promptContextCommands - explicit context + name: 'Windows Prompt', + content: 'content', + filePath: 'C:\\Users\\test\\.aws\\amazonq\\prompts\\hello.md', // Proper Windows path + relativePath: 'hello.md', + startLine: 1, + endLine: 10, + }, + ]) + getContextCommandPromptStub.onSecondCall().resolves([]) // pinnedContextCommands - empty + + const result = await provider.getAdditionalContext( + { workspaceFolder: mockWorkspaceFolder }, + 'tab1', + explicitContext + ) + assert.strictEqual(result.length, 1) + assert.strictEqual(result[0].name, 'Windows Prompt') + + // Restore original path.join + ;(path.join as sinon.SinonStub).restore() + }) }) describe('getFileListFromContext', () => { diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/additionalContextProvider.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/additionalContextProvider.ts index d71da1a1fe..466f0feed9 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/additionalContextProvider.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/additionalContextProvider.ts @@ -33,7 +33,7 @@ import { ChatDatabase } from '../tools/chatDb/chatDb' import { ChatMessage, ImageBlock, ImageFormat } from '@amzn/codewhisperer-streaming' import { getRelativePathWithUri, getRelativePathWithWorkspaceFolder } from '../../workspaceContext/util' import { isSupportedImageExtension, MAX_IMAGE_CONTEXT_COUNT } from '../../../shared/imageVerification' -import { mergeFileLists } from './contextUtils' +import { MemoryBankController } from './memorybank/memoryBankController' export const ACTIVE_EDITOR_CONTEXT_ID = 'active-editor' @@ -151,6 +151,30 @@ export class AdditionalContextProvider { // Filter rules based on user's rules preferences for current tab let rulesState = this.chatDb.getRules(tabId) || { folders: {}, rules: {} } + + // Ensure memory bank files are active by default when first discovered + const memoryBankFiles = rulesFiles.filter(rule => rule.id?.includes('memory-bank')) + if (memoryBankFiles.length > 0) { + let needsUpdate = false + + const memoryBankFolderName = 'memory-bank' + if (rulesState.folders[memoryBankFolderName] === undefined) { + rulesState.folders[memoryBankFolderName] = true + needsUpdate = true + } + + memoryBankFiles.forEach(file => { + if (rulesState.rules[file.id] === undefined) { + rulesState.rules[file.id] = true + needsUpdate = true + } + }) + + if (needsUpdate) { + this.chatDb.setRules(tabId, rulesState) + } + } + return rulesFiles.filter(rule => { // If the rule has an explicit state in rulesState, use that value if (rulesState.rules[rule.id] !== undefined) { @@ -199,7 +223,8 @@ export class AdditionalContextProvider { async getAdditionalContext( triggerContext: TriggerContext, tabId: string, - context?: ContextCommand[] + context?: ContextCommand[], + prompt?: string ): Promise { triggerContext.contextInfo = getInitialContextInfo() @@ -220,7 +245,33 @@ export class AdditionalContextProvider { : workspaceUtils.getWorkspaceFolderPaths(this.features.workspace)[0] if (workspaceRules.length > 0) { - pinnedContextCommands.push(...workspaceRules) + // Check if this is a memory bank generation request + const isMemoryBankRequest = prompt + ? new MemoryBankController(this.features).isMemoryBankCreationRequest(prompt) + : false + + let rulesToInclude = workspaceRules + + if (isMemoryBankRequest) { + // Exclude memory bank files from context when regenerating memory bank + const memoryBankFiles = workspaceRules.filter(rule => rule.id?.includes('memory-bank')) + rulesToInclude = workspaceRules.filter(rule => !rule.id?.includes('memory-bank')) + + if (memoryBankFiles.length > 0) { + this.features.logging.info( + `Memory Bank: excluding ${memoryBankFiles.length} existing memory bank files from context` + ) + } + } else { + // Normal behavior: include all workspace rules (including memory bank files) + const memoryBankFiles = workspaceRules.filter(rule => rule.id?.includes('memory-bank')) + if (memoryBankFiles.length > 0) { + this.features.logging.info(`Including ${memoryBankFiles.length} memory bank files in chat context`) + } + } + + // Add the filtered rules to pinned context + pinnedContextCommands.push(...rulesToInclude) } // Merge pinned context with context added to prompt, avoiding duplicates @@ -406,7 +457,7 @@ export class AdditionalContextProvider { const image = imageMap.get(item.description) if (image) ordered.push(image) } else { - const doc = item.route ? docMap.get(item.route.join('/')) : undefined + const doc = item.route ? docMap.get(path.join(...item.route)) : undefined if (doc) ordered.push(doc) } } @@ -675,7 +726,12 @@ export class AdditionalContextProvider { if (dirPath === '.') { folderName = undefined } else { - folderName = dirPath + // Special handling for memory bank files + if (dirPath === '.amazonq/rules/memory-bank') { + folderName = 'memory-bank' + } else { + folderName = dirPath + } } } else { // In multi-workspace: include workspace folder name for all files diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/contextCommandsProvider.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/contextCommandsProvider.test.ts index d387c96d82..dbada5b8d7 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/contextCommandsProvider.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/contextCommandsProvider.test.ts @@ -3,6 +3,7 @@ import * as sinon from 'sinon' import { TestFeatures } from '@aws/language-server-runtimes/testing' import * as chokidar from 'chokidar' import { ContextCommandItem } from 'local-indexing' +import { LocalProjectContextController } from '../../../shared/localProjectContextController' describe('ContextCommandsProvider', () => { let provider: ContextCommandsProvider @@ -21,6 +22,12 @@ describe('ContextCommandsProvider', () => { testFeatures.workspace.fs.exists = fsExistsStub testFeatures.workspace.fs.readdir = fsReadDirStub + + sinon.stub(LocalProjectContextController, 'getInstance').resolves({ + onContextItemsUpdated: sinon.stub(), + onIndexingInProgressChanged: sinon.stub(), + } as any) + provider = new ContextCommandsProvider( testFeatures.logging, testFeatures.chat, @@ -58,6 +65,26 @@ describe('ContextCommandsProvider', () => { }) }) + describe('onReady', () => { + it('should call processContextCommandUpdate with empty array on first call', async () => { + const processUpdateSpy = sinon.spy(provider, 'processContextCommandUpdate') + + provider.onReady() + + sinon.assert.calledOnce(processUpdateSpy) + sinon.assert.calledWith(processUpdateSpy, []) + }) + + it('should not call processContextCommandUpdate on subsequent calls', async () => { + const processUpdateSpy = sinon.spy(provider, 'processContextCommandUpdate') + + provider.onReady() + provider.onReady() + + sinon.assert.calledOnce(processUpdateSpy) + }) + }) + describe('onContextItemsUpdated', () => { it('should call processContextCommandUpdate when controller raises event', async () => { const mockContextItems: ContextCommandItem[] = [ @@ -78,4 +105,29 @@ describe('ContextCommandsProvider', () => { sinon.assert.calledWith(processUpdateSpy, mockContextItems) }) }) + + describe('onIndexingInProgressChanged', () => { + it('should update workspacePending and call processContextCommandUpdate when indexing status changes', async () => { + let capturedCallback: ((indexingInProgress: boolean) => void) | undefined + + const mockController = { + onContextItemsUpdated: sinon.stub(), + set onIndexingInProgressChanged(callback: (indexingInProgress: boolean) => void) { + capturedCallback = callback + }, + } + + const processUpdateSpy = sinon.spy(provider, 'processContextCommandUpdate') + ;(LocalProjectContextController.getInstance as sinon.SinonStub).resolves(mockController as any) + + // Set initial state to false so condition is met + ;(provider as any).workspacePending = false + + await (provider as any).registerContextCommandHandler() + + capturedCallback?.(true) + + sinon.assert.calledWith(processUpdateSpy, []) + }) + }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/contextCommandsProvider.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/contextCommandsProvider.ts index 632360cd67..4a4f5cd4fb 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/contextCommandsProvider.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/contextCommandsProvider.ts @@ -12,6 +12,10 @@ import { activeFileCmd } from './additionalContextProvider' export class ContextCommandsProvider implements Disposable { private promptFileWatcher?: FSWatcher private cachedContextCommands?: ContextCommandItem[] + private codeSymbolsPending = true + private filesAndFoldersPending = true + private workspacePending = true + private initialStateSent = false constructor( private readonly logging: Logging, private readonly chat: Chat, @@ -24,12 +28,27 @@ export class ContextCommandsProvider implements Disposable { ) } + onReady() { + if (!this.initialStateSent) { + this.initialStateSent = true + void this.processContextCommandUpdate([]).catch(e => + this.logging.error(`Failed to send initial context commands: ${e}`) + ) + } + } + private async registerContextCommandHandler() { try { const controller = await LocalProjectContextController.getInstance() controller.onContextItemsUpdated = async contextItems => { await this.processContextCommandUpdate(contextItems) } + controller.onIndexingInProgressChanged = (indexingInProgress: boolean) => { + if (this.workspacePending !== indexingInProgress) { + this.workspacePending = indexingInProgress + void this.processContextCommandUpdate(this.cachedContextCommands ?? []) + } + } } catch (e) { this.logging.warn(`Error processing context command update: ${e}`) } @@ -105,6 +124,7 @@ export class ContextCommandsProvider implements Disposable { ], description: 'Add all files in a folder to context', icon: 'folder', + disabledText: this.filesAndFoldersPending ? 'pending' : undefined, } const fileCmds: ContextCommand[] = [activeFileCmd] @@ -118,6 +138,7 @@ export class ContextCommandsProvider implements Disposable { ], description: 'Add a file to context', icon: 'file', + disabledText: this.filesAndFoldersPending ? 'pending' : undefined, } const codeCmds: ContextCommand[] = [] @@ -131,6 +152,7 @@ export class ContextCommandsProvider implements Disposable { ], description: 'Add code to context', icon: 'code-block', + disabledText: this.codeSymbolsPending ? 'pending' : undefined, } const promptCmds: ContextCommand[] = [] @@ -152,10 +174,12 @@ export class ContextCommandsProvider implements Disposable { icon: 'image', placeholder: 'Select an image file', } - const workspaceCmd = { + + const workspaceCmd: ContextCommand = { command: '@workspace', id: '@workspace', description: 'Reference all code in workspace', + disabledText: this.workspacePending ? 'pending' : undefined, } const commands = [workspaceCmd, folderCmdGroup, fileCmdGroup, codeCmdGroup, promptCmdGroup] @@ -209,11 +233,16 @@ export class ContextCommandsProvider implements Disposable { await LocalProjectContextController.getInstance() ).shouldUpdateContextCommandSymbolsOnce() if (needUpdate) { + this.codeSymbolsPending = false const items = await (await LocalProjectContextController.getInstance()).getContextCommandItems() await this.processContextCommandUpdate(items) } } + setFilesAndFoldersPending(value: boolean) { + this.filesAndFoldersPending = value + } + dispose() { void this.promptFileWatcher?.close() } diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/memorybank/memoryBankController.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/memorybank/memoryBankController.test.ts new file mode 100644 index 0000000000..a20488c7b3 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/memorybank/memoryBankController.test.ts @@ -0,0 +1,247 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +import * as assert from 'assert' +import * as sinon from 'sinon' +import { MemoryBankController } from './memoryBankController' +import { MemoryBankPrompts } from './memoryBankPrompts' + +describe('MemoryBankController', () => { + let controller: MemoryBankController + let mockFeatures: any + let mockWorkspace: any + let mockFs: any + let mockLogging: any + + beforeEach(() => { + mockFs = { + exists: sinon.stub(), + mkdir: sinon.stub(), + readFile: sinon.stub(), + readdir: sinon.stub(), + } + + mockWorkspace = { + fs: mockFs, + } + + mockLogging = { + info: sinon.stub(), + error: sinon.stub(), + warn: sinon.stub(), + } + + mockFeatures = { + workspace: mockWorkspace, + logging: mockLogging, + } + + controller = new MemoryBankController(mockFeatures) + }) + + afterEach(() => { + sinon.restore() + // Reset singleton instance + ;(MemoryBankController as any).instance = undefined + }) + + describe('getInstance', () => { + it('should return singleton instance', () => { + const instance1 = MemoryBankController.getInstance(mockFeatures) + const instance2 = MemoryBankController.getInstance(mockFeatures) + + assert.strictEqual(instance1, instance2) + }) + + it('should create new instance if none exists', () => { + const instance = MemoryBankController.getInstance(mockFeatures) + + assert.ok(instance instanceof MemoryBankController) + }) + }) + + describe('isMemoryBankCreationRequest', () => { + it('should detect memory bank creation requests', () => { + const testCases = [ + 'create a memory bank', + 'Create a Memory Bank', + 'CREATE MEMORY BANK', + 'Create a Memory Bank for this project', + 'generate memory bank for this project', + 'generate memory bank', + 'build memory bank', + 'make memory bank', + 'setup memory bank', + ] + + testCases.forEach(prompt => { + const result = controller.isMemoryBankCreationRequest(prompt) + assert.strictEqual(result, true, `Failed to detect: "${prompt}"`) + }) + }) + + it('should not detect non-memory bank requests', () => { + const testCases = [ + 'create a file', + 'help me with code', + 'explain this function', + 'memory usage optimization', + 'bank account management', + ] + + testCases.forEach(prompt => { + const result = controller.isMemoryBankCreationRequest(prompt) + assert.strictEqual(result, false, `False positive for: "${prompt}"`) + }) + }) + }) + + describe('prompt delegation', () => { + it('should delegate prompt generation to MemoryBankPrompts class', () => { + // Test that controller properly delegates to MemoryBankPrompts + // This ensures clean separation of concerns + const filesString = 'test.ts has 100 lines and a mean lexical dissimilarity of 0.85' + const prompt = MemoryBankPrompts.getFileRankingPrompt(filesString, 15) + + assert.ok(typeof prompt === 'string') + assert.ok(prompt.length > 100) + assert.ok(prompt.includes('JSON list')) + assert.ok(prompt.includes('15')) + assert.ok(prompt.includes(filesString)) + }) + }) + + describe('Science Pipeline Methods', () => { + it('should delegate file ranking prompt to MemoryBankPrompts', () => { + const filesString = 'test.ts has 100 lines and a mean lexical dissimilarity of 0.85' + const prompt = MemoryBankPrompts.getFileRankingPrompt(filesString, 15) + + assert.ok(typeof prompt === 'string') + assert.ok(prompt.includes('JSON list')) + assert.ok(prompt.includes('15')) + assert.ok(prompt.includes(filesString)) + }) + + describe('TF-IDF Lexical Dissimilarity', () => { + it('should calculate TF-IDF dissimilarity for multiple files', async () => { + const files = [ + { path: 'file1.ts', size: 50 }, + { path: 'file2.ts', size: 75 }, + { path: 'file3.ts', size: 100 }, + ] + + // Mock file contents with different lexical patterns + mockFs.readFile.onFirstCall().resolves('function calculateSum(a, b) { return a + b; }') + mockFs.readFile.onSecondCall().resolves('class UserService { constructor() {} getUser() {} }') + mockFs.readFile.onThirdCall().resolves('const config = { apiUrl: "https://api.example.com" }') + + const result = await controller.calculateLexicalDissimilarity(files) + + assert.strictEqual(result.length, 3) + assert.ok(result.every(f => f.dissimilarity >= 0 && f.dissimilarity <= 1)) + assert.ok(result.every(f => typeof f.dissimilarity === 'number')) + + // Verify all original properties are preserved + result.forEach((file, index) => { + assert.strictEqual(file.path, files[index].path) + assert.strictEqual(file.size, files[index].size) + }) + }) + + it('should handle empty or unreadable files gracefully', async () => { + const files = [ + { path: 'readable.ts', size: 50 }, + { path: 'unreadable.ts', size: 25 }, + ] + + mockFs.readFile.onFirstCall().resolves('function test() { return true; }') + mockFs.readFile.onSecondCall().rejects(new Error('File not found')) + + const result = await controller.calculateLexicalDissimilarity(files) + + assert.strictEqual(result.length, 2) + assert.ok(result.every(f => f.dissimilarity >= 0 && f.dissimilarity <= 1)) + sinon.assert.calledOnce(mockLogging.warn) + }) + + it('should return fallback values on calculation error', async () => { + const files = [{ path: 'test.ts', size: 50 }] + + mockFs.readFile.rejects(new Error('Filesystem error')) + + const result = await controller.calculateLexicalDissimilarity(files) + + assert.strictEqual(result.length, 1) + assert.strictEqual(result[0].dissimilarity, 0.85) + sinon.assert.calledOnce(mockLogging.error) + }) + }) + + it('should provide TF-IDF analysis methods', () => { + assert.ok(typeof controller.discoverAllSourceFiles === 'function') + assert.ok(typeof controller.calculateFileLineCount === 'function') + assert.ok(typeof controller.calculateLexicalDissimilarity === 'function') + assert.ok(typeof controller.executeGuidelinesGenerationPipeline === 'function') + }) + + it('should format files for ranking correctly', () => { + const files = [ + { path: 'test1.ts', size: 100, dissimilarity: 0.85 }, + { path: 'test2.ts', size: 200, dissimilarity: 0.75 }, + ] + + const formatted = controller.formatFilesForRanking(files) + + assert.ok(typeof formatted === 'string') + assert.ok(formatted.includes('test1.ts has 100 lines')) + assert.ok(formatted.includes('test2.ts has 200 lines')) + assert.ok(formatted.includes('0.850000')) + assert.ok(formatted.includes('0.750000')) + }) + }) + + describe('memoryBankExists', () => { + const workspaceFolder = '/test/workspace' + + it('should return false if memory bank directory does not exist', async () => { + mockFs.exists.resolves(false) + + const result = await controller.memoryBankExists(workspaceFolder) + + assert.strictEqual(result, false) + sinon.assert.calledOnce(mockFs.exists) + }) + + it('should return false if directory exists but no files exist', async () => { + mockFs.exists.onFirstCall().resolves(true) // directory exists + mockFs.exists.onSecondCall().resolves(false) // product.md doesn't exist + mockFs.exists.onThirdCall().resolves(false) // structure.md doesn't exist + mockFs.exists.onCall(3).resolves(false) // tech.md doesn't exist + mockFs.exists.onCall(4).resolves(false) // guidelines.md doesn't exist + + const result = await controller.memoryBankExists(workspaceFolder) + + assert.strictEqual(result, false) + }) + + it('should return true if directory exists and at least one file exists', async () => { + mockFs.exists.onFirstCall().resolves(true) // directory exists + mockFs.exists.onSecondCall().resolves(true) // product.md exists + + const result = await controller.memoryBankExists(workspaceFolder) + + assert.strictEqual(result, true) + }) + + it('should handle filesystem errors gracefully', async () => { + mockFs.exists.rejects(new Error('File system error')) + + const result = await controller.memoryBankExists(workspaceFolder) + + assert.strictEqual(result, false) + sinon.assert.calledOnce(mockLogging.error) + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/memorybank/memoryBankController.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/memorybank/memoryBankController.ts new file mode 100644 index 0000000000..f552c91e91 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/memorybank/memoryBankController.ts @@ -0,0 +1,797 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +import { Features } from '@aws/language-server-runtimes/server-interface/server' +import { MemoryBankPrompts } from './memoryBankPrompts' +import { normalizePathFromUri } from '../../tools/mcp/mcpUtils' +import { MAX_NUMBER_OF_FILES_FOR_MEMORY_BANK_RANKING } from '../../constants/constants' + +const MEMORY_BANK_DIRECTORY = '.amazonq/rules/memory-bank' +const MEMORY_BANK_FILES = { + PRODUCT: 'product.md', + STRUCTURE: 'structure.md', + TECH: 'tech.md', + GUIDELINES: 'guidelines.md', +} as const + +/** + * Controller for Memory Bank functionality + * Handles memory bank creation detection and prompt generation + */ +export class MemoryBankController { + private static instance: MemoryBankController | undefined + + constructor(private features: Features) {} + + static getInstance(features: Features): MemoryBankController { + if (!MemoryBankController.instance) { + MemoryBankController.instance = new MemoryBankController(features) + } + return MemoryBankController.instance + } + + /** + * Check if a prompt is requesting memory bank creation + * Can be expanded based on feedbacks + */ + isMemoryBankCreationRequest(prompt: string): boolean { + const normalizedPrompt = prompt.toLowerCase().trim() + + const triggers = [ + 'create a memory bank', + 'create memory bank', + 'generate a memory bank', + 'generate memory bank', + 'regenerate memory bank', + 'build memory bank', + 'make memory bank', + 'setup memory bank', + ] + + return triggers.some(trigger => normalizedPrompt.includes(trigger)) + } + + /** + * Prepare comprehensive memory bank creation prompt with all necessary input + * This does all the programmatic work upfront and creates a single comprehensive prompt + */ + async prepareComprehensiveMemoryBankPrompt( + workspaceFolderUri: string, + llmCallFunction: (prompt: string) => Promise + ): Promise { + try { + this.features.logging.info(`Memory Bank: Starting pre-processing for workspace: "${workspaceFolderUri}"`) + + // Step 1: Clean directory + await this.cleanMemoryBankDirectory(workspaceFolderUri) + + // Step 2: Execute deterministic analysis (TF-IDF) + this.features.logging.info(`Memory Bank: running analysis for workspace`) + const analysisResults = await this.executeGuidelinesGenerationPipeline(workspaceFolderUri) + + // Step 3: Make LLM call for file ranking + const rankingPrompt = MemoryBankPrompts.getFileRankingPrompt( + analysisResults.formattedFilesString, + MAX_NUMBER_OF_FILES_FOR_MEMORY_BANK_RANKING + ) + const rankedFilesResponse = await llmCallFunction(rankingPrompt) + + // Step 4: Parse ranked files + let rankedFilesList: string[] = [] + try { + // Clean the response - remove any markdown formatting or extra text + let cleanResponse = rankedFilesResponse.trim() + + // Extract JSON array if it's wrapped in markdown or other text + const jsonMatch = cleanResponse.match(/\[.*\]/s) + if (jsonMatch) { + cleanResponse = jsonMatch[0] + } else { + // Handle case where LLM returns comma-separated quoted strings without brackets + if (cleanResponse.includes('",') && cleanResponse.includes('"')) { + // Add brackets to make it a valid JSON array + cleanResponse = `[${cleanResponse}]` + } + } + + rankedFilesList = JSON.parse(cleanResponse) + if (!Array.isArray(rankedFilesList)) { + throw new Error('Invalid ranking response format - not an array') + } + + // Validate that all items are strings (file paths) + rankedFilesList = rankedFilesList.filter(item => typeof item === 'string' && item.length > 0) + + if (rankedFilesList.length === 0) { + throw new Error('No valid file paths in ranking response') + } + + this.features.logging.info( + `Memory Bank: parsed ${rankedFilesList.length} ranked files from LLM response` + ) + } catch (error) { + this.features.logging.warn( + `Memory Bank: failed to parse LLM ranking response, using TF-IDF fallback: ${error}` + ) + rankedFilesList = analysisResults.rankedFilesList.slice(0, MAX_NUMBER_OF_FILES_FOR_MEMORY_BANK_RANKING) + } + + this.features.logging.info( + `Memory Bank: using ${rankedFilesList.length} files for documentation generation` + ) + + // Step 5: Create the comprehensive prompt with ranked files and workspace path + const normalizedWorkspacePath = normalizePathFromUri(workspaceFolderUri, this.features.logging) + + this.features.logging.info(`Memory Bank: Generating final prompt with path: "${normalizedWorkspacePath}"`) + const finalPrompt = MemoryBankPrompts.getCompleteMemoryBankPrompt(rankedFilesList, normalizedWorkspacePath) + return finalPrompt + } catch (error) { + this.features.logging.error(`Memory Bank preparation failed: ${error}`) + throw error + } + } + + /** + * Clean and recreate memory bank directory + */ + async cleanMemoryBankDirectory(workspaceFolderUri: string): Promise { + try { + const normalizedWorkspacePath = normalizePathFromUri(workspaceFolderUri, this.features.logging) + const memoryBankPath = `${normalizedWorkspacePath}/${MEMORY_BANK_DIRECTORY}` + + // Remove all existing memory bank files to ensure clean recreation + const filesToRemove = ['product.md', 'structure.md', 'tech.md', 'guidelines.md'] + let removedCount = 0 + for (const fileName of filesToRemove) { + const filePath = `${memoryBankPath}/${fileName}` + try { + const exists = await this.features.workspace.fs.exists(filePath) + if (exists) { + await this.features.workspace.fs.rm(filePath) + removedCount++ + } + } catch (error) { + // Ignore errors when removing files that don't exist + this.features.logging.error(`Could not remove ${fileName}: ${error}`) + } + } + + if (removedCount > 0) { + this.features.logging.info(`Memory Bank: cleaned ${removedCount} existing files`) + } + + // Create the directory structure using mkdir with recursive option + await this.features.workspace.fs.mkdir(memoryBankPath, { recursive: true }) + } catch (error) { + this.features.logging.error(`Memory Bank directory creation failed: ${error}`) + throw error + } + } + + /** + * files discovery + */ + async discoverAllSourceFiles( + workspaceFolderUri: string, + extensions: string[] + ): Promise> { + try { + // Recursively discover all source files + const allWorkspaceFolders = this.features.workspace.getAllWorkspaceFolders() + + const workspaceFolders = allWorkspaceFolders?.map(({ uri }) => { + return normalizePathFromUri(uri, this.features.logging) + }) ?? [normalizePathFromUri(workspaceFolderUri, this.features.logging)] + + // Collect files from all workspace folders + let allSourceFiles: string[] = [] + + for (const folder of workspaceFolders) { + const sourceFiles = await this.discoverSourceFiles(folder, extensions) + this.features.logging.info(`Found ${sourceFiles.length} files in "${folder}"`) + allSourceFiles.push(...sourceFiles) + } + + this.features.logging.info(`Total files discovered: ${allSourceFiles.length}`) + + // OPTIMIZATION: Parallel file size calculation with batching + const batchSize = 10 // Process 10 files at a time + const files: Array<{ path: string; size: number }> = [] + + for (let i = 0; i < allSourceFiles.length; i += batchSize) { + const batch = allSourceFiles.slice(i, i + batchSize) + const batchResults = await Promise.all( + batch.map(async filePath => ({ + path: filePath, + size: await this.calculateFileLineCount(filePath), + })) + ) + files.push(...batchResults) + } + + return files + } catch (error) { + this.features.logging.error(`Error in getAllFiles: ${error}`) + return [] + } + } + + /** + * line counting + */ + async calculateFileLineCount(filePath: string): Promise { + try { + const content = await this.features.workspace.fs.readFile(filePath) + return content.split('\n').length + } catch (error) { + this.features.logging.error(`Error reading file ${filePath}: ${error}`) + return 0 + } + } + + /** + * lexical dissimilarity calculation + */ + async calculateLexicalDissimilarity( + files: Array<{ path: string; size: number }> + ): Promise> { + try { + // OPTIMIZATION: Parallel file reading with batching + const batchSize = 20 // Process 20 files at a time to reduce I/O overhead + const fileContents: string[] = [] + let hasReadErrors = false + + for (let i = 0; i < files.length; i += batchSize) { + const batch = files.slice(i, i + batchSize) + const batchContents = await Promise.all( + batch.map(async file => { + try { + return await this.features.workspace.fs.readFile(file.path) + } catch (error) { + this.features.logging.warn(`Could not read file for TF-IDF analysis: ${file.path}`) + hasReadErrors = true + return '' // Empty content for unreadable files + } + }) + ) + fileContents.push(...batchContents) + } + + // Check if all files are empty (no content to analyze) + const hasContent = fileContents.some(content => content.trim().length > 0) + if (!hasContent) { + // If no files have content due to read errors, log as error + if (hasReadErrors) { + this.features.logging.error( + 'All files failed to read or are empty, using fallback dissimilarity values' + ) + } + // If no files have content, return fallback values + return files.map(f => ({ ...f, dissimilarity: 0.85 })) + } + + // Step 2: Get the TF-IDF vectors for each file (equivalent to sklearn's TfidfVectorizer) + const tfidfMatrix = this.createTfidfMatrix(fileContents) + + // Step 3: Get the cosine similarity of each file (equivalent to sklearn's cosine_similarity) + const cosineSimilarities = this.calculateCosineSimilarityMatrix(tfidfMatrix) + + // Step 4: Get the lexical dissimilarity of each file (1 - similarity) + const lexicalDissimilarities: Array<{ path: string; size: number; dissimilarity: number }> = [] + for (let i = 0; i < cosineSimilarities.length; i++) { + // Calculate mean similarity for this file with all files (including itself) + const meanSimilarity = + cosineSimilarities[i].reduce((sum, sim) => sum + sim, 0) / cosineSimilarities[i].length + + // Dissimilarity = 1 - mean_similarity (exactly like Python code) + const dissimilarity = 1 - meanSimilarity + + lexicalDissimilarities.push({ + path: files[i].path, + size: files[i].size, + dissimilarity: Math.max(0.0, Math.min(1.0, dissimilarity)), // Ensure bounds [0,1] + }) + } + + return lexicalDissimilarities + } catch (error) { + this.features.logging.error(`Error in calculateLexicalDissimilarity: ${error}`) + // Fallback to reasonable defaults if TF-IDF calculation fails + return files.map(f => ({ ...f, dissimilarity: 0.85 })) + } + } + + /** + * Create TF-IDF matrix, Returns array of TF-IDF vectors, where each vector is a Map + */ + private createTfidfMatrix(documents: string[]): Map[] { + // Step 1: Tokenize all documents and build vocabulary + const tokenizedDocs = documents.map(doc => this.tokenizeDocument(doc)) + const vocabulary = new Set() + tokenizedDocs.forEach(tokens => tokens.forEach(token => vocabulary.add(token))) + + const vocabArray = Array.from(vocabulary) + const numDocs = documents.length + + // Step 2: Calculate document frequencies (DF) + const documentFrequencies = new Map() + vocabArray.forEach(term => { + const df = tokenizedDocs.filter(tokens => tokens.includes(term)).length + documentFrequencies.set(term, df) + }) + + // Step 3: Calculate TF-IDF for each document + const tfidfMatrix: Map[] = [] + for (let docIndex = 0; docIndex < numDocs; docIndex++) { + const tokens = tokenizedDocs[docIndex] + const tfidfVector = new Map() + + // Calculate term frequencies for this document + const termFrequencies = new Map() + tokens.forEach(token => { + termFrequencies.set(token, (termFrequencies.get(token) || 0) + 1) + }) + + // Calculate TF-IDF for each term in vocabulary + vocabArray.forEach(term => { + const tf = termFrequencies.get(term) || 0 + const df = documentFrequencies.get(term) || 1 + const idf = Math.log(numDocs / df) + const tfidf = tf * idf + tfidfVector.set(term, tfidf) + }) + + tfidfMatrix.push(tfidfVector) + } + + return tfidfMatrix + } + + /** + * Calculate cosine similarity matrix + */ + private calculateCosineSimilarityMatrix(tfidfMatrix: Map[]): number[][] { + const numDocs = tfidfMatrix.length + const similarities: number[][] = [] + + for (let i = 0; i < numDocs; i++) { + const row: number[] = [] + for (let j = 0; j < numDocs; j++) { + const similarity = this.calculateCosineSimilarity(tfidfMatrix[i], tfidfMatrix[j]) + row.push(similarity) + } + similarities.push(row) + } + + return similarities + } + + /** + * Calculate cosine similarity between two TF-IDF vectors + */ + private calculateCosineSimilarity(vectorA: Map, vectorB: Map): number { + let dotProduct = 0 + let normA = 0 + let normB = 0 + + // Get all unique terms from both vectors + const allTerms = new Set([...vectorA.keys(), ...vectorB.keys()]) + + allTerms.forEach(term => { + const valueA = vectorA.get(term) || 0 + const valueB = vectorB.get(term) || 0 + + dotProduct += valueA * valueB + normA += valueA * valueA + normB += valueB * valueB + }) + + // Avoid division by zero + if (normA === 0 || normB === 0) { + return 0 + } + + return dotProduct / (Math.sqrt(normA) * Math.sqrt(normB)) + } + + /** + * Tokenize document into terms (simple whitespace + punctuation splitting) + */ + private tokenizeDocument(document: string): string[] { + return document + .toLowerCase() + .replace(/[^\w\s]/g, ' ') // Replace punctuation with spaces + .split(/\s+/) // Split on whitespace + .filter(token => token.length > 2) // Filter out very short tokens + } + + /** + * Execute the complete guidelines generation pipeline + * https://code.amazon.com/packages/QIDEPersonalization/blobs/mainline/--/src/stylefile-gen.ipynb + */ + async executeGuidelinesGenerationPipeline(workspaceFolderUri: string): Promise<{ + discoveredFiles: Array<{ path: string; size: number }> + filesWithDissimilarity: Array<{ path: string; size: number; dissimilarity: number }> + formattedFilesString: string + rankedFilesList: string[] + }> { + try { + // Step 1: Discover all source files + // OPTIMIZATION: Prioritize common extensions first for faster discovery + const extensions = [ + '.ts', + '.js', + '.tsx', + '.jsx', + '.py', + '.java', + '.cpp', + '.c', + '.h', + '.cs', + '.go', + '.rs', + '.php', + '.rb', + '.swift', + '.kt', + '.scala', + ] + + const discoveredFiles = await this.discoverAllSourceFiles(workspaceFolderUri, extensions) + + if (discoveredFiles.length === 0) { + throw new Error('No source files found in workspace') + } + + // Filter out very large files to prevent conversation overflow + const MAX_FILE_SIZE_FOR_MEMORY_BANK = 20000 // 20KB limit + const reasonableSizedFiles = discoveredFiles.filter(file => file.size <= MAX_FILE_SIZE_FOR_MEMORY_BANK) + + this.features.logging.debug( + `Memory Bank analysis: filtered ${discoveredFiles.length - reasonableSizedFiles.length} files over ${MAX_FILE_SIZE_FOR_MEMORY_BANK} characters` + ) + + // Limit files to prevent memory exhaustion on large projects + const MAX_FILES_FOR_ANALYSIS = 200 + let filesToAnalyze: Array<{ path: string; size: number }> + + if (reasonableSizedFiles.length > MAX_FILES_FOR_ANALYSIS) { + const shuffled = [...reasonableSizedFiles].sort(() => Math.random() - 0.5) + filesToAnalyze = shuffled.slice(0, MAX_FILES_FOR_ANALYSIS) + this.features.logging.info( + `Memory Bank analysis: randomly selected ${filesToAnalyze.length} files (from ${reasonableSizedFiles.length} reasonable-sized files for ranking)` + ) + } else { + filesToAnalyze = reasonableSizedFiles + } + + // Step 2: Calculate lexical dissimilarity using TF-IDF + const filesWithDissimilarity = await this.calculateLexicalDissimilarity(filesToAnalyze) + + // Step 3: Sort by size + filesWithDissimilarity.sort((a, b) => b.size - a.size) + + // Step 4: Format files string for LLM ranking + const formattedFilesString = this.formatFilesForRanking(filesWithDissimilarity) + + // Step 5: Create fallback ranking (deterministic, for when LLM fails) + const rankedFilesList = filesWithDissimilarity + .sort((a, b) => b.dissimilarity - a.dissimilarity) + .slice(0, MAX_NUMBER_OF_FILES_FOR_MEMORY_BANK_RANKING) + .map(f => f.path) + + return { + discoveredFiles: filesToAnalyze, + filesWithDissimilarity, + formattedFilesString, + rankedFilesList, + } + } catch (error) { + this.features.logging.error(`Memory Bank analysis pipeline failed: ${error}`) + throw error + } + } + + /** + * Format files for processing pipeline + */ + formatFilesForRanking(files: Array<{ path: string; size: number; dissimilarity: number }>): string { + // Files are already sorted by size in executeGuidelinesGenerationPipeline() + return files + .map( + f => + `${f.path} has ${f.size} lines and a mean lexical dissimilarity of ${f.dissimilarity.toFixed(6)} to the other files` + ) + .join('\n') + } + + /** + * Recursively discover source files with given extensions + */ + private async discoverSourceFiles(workspaceFolderUri: string, extensions: string[]): Promise { + const sourceFiles: string[] = [] + const traverseDirectory = async (dirPath: string): Promise => { + try { + const entries = await this.features.workspace.fs.readdir(dirPath) + + for (const entry of entries) { + const fullPath = `${dirPath}/${entry.name}` + + // Skip common directories that don't contain source code + if (entry.isDirectory() && this.shouldSkipDirectory(entry.name)) { + continue + } + + if (entry.isDirectory()) { + // Directory - recurse + await traverseDirectory(fullPath) + } else { + // File - check if it's a source file + if (extensions.some(ext => entry.name.endsWith(ext))) { + sourceFiles.push(fullPath) + } + } + } + } catch (error) { + this.features.logging.error(`Could not read directory ${dirPath}: ${error}`) + } + } + + await traverseDirectory(workspaceFolderUri) + + return sourceFiles + } + + /** + * Check if a directory should be skipped during source file discovery + */ + private shouldSkipDirectory(dirName: string): boolean { + // Comprehensive language-agnostic directory exclusions + const skipDirs = [ + // Version Control Systems + '.git', + '.svn', + '.hg', + '.bzr', + '.fossil-settings', + + // Package Managers & Dependencies + 'node_modules', + 'bower_components', + 'jspm_packages', + 'vendor', + 'packages', + 'deps', + '_deps', + 'third_party', + 'external', + 'Pods', + 'Carthage', + 'DerivedData', // iOS/macOS + 'venv', + 'env', + '.venv', + '.env', + 'virtualenv', + '__pycache__', + '.tox', // Python + 'gems', + '.bundle', // Ruby + 'composer', // PHP + 'node_modules', + 'elm-stuff', // Elm + 'target', + 'project/target', + 'project/project', // Scala/SBT + + // Build Outputs & Artifacts + 'build', + 'builds', + 'dist', + 'out', + 'output', + 'bin', + 'obj', + 'lib', + 'release', + 'debug', + 'Release', + 'Debug', + 'x64', + 'x86', + 'AnyCPU', + '.next', + '.nuxt', + '.output', + '.vercel', + '.netlify', // Web frameworks + 'public/build', + 'static/build', + 'assets/build', + 'cmake-build-debug', + 'cmake-build-release', // CMake + '_build', + 'ebin', + 'deps', // Erlang/Elixir + 'zig-cache', + 'zig-out', // Zig + + // IDE & Editor Directories + '.vscode', + '.idea', + '.vs', + '.vscode-test', + '.eclipse', + '.metadata', + '.settings', + '.project', + '.classpath', + '.atom', + '.sublime-project', + '.sublime-workspace', + '__pycache__', + '.mypy_cache', + '.dmypy.json', // Python + '.dart_tool', + '.flutter-plugins', + '.flutter-plugins-dependencies', // Dart/Flutter + + // Testing & Coverage + 'coverage', + '.coverage', + '.nyc_output', + '.pytest_cache', + '.cache', + 'htmlcov', + 'test-results', + 'test-reports', + 'allure-results', + 'junit', + 'xunit', + 'nunit', + 'TestResults', + '.jest', + 'jest_html_reporters.html', + + // Logs & Temporary Files + 'logs', + 'log', + 'tmp', + 'temp', + '.tmp', + '.temp', + 'crash-reports', + 'error-reports', + + // Documentation Build Outputs + '_site', + '.jekyll-cache', + '.jekyll-metadata', // Jekyll + 'docs/_build', + 'doc/_build', + 'documentation/_build', // Sphinx + '.docusaurus', + 'website/build', // Docusaurus + 'book', + '_book', // GitBook/mdBook + + // Language-Specific Caches & Artifacts + '.gradle', + 'gradle', // Gradle + '.m2', + '.ivy2', // Maven/Ivy + '.stack-work', + '.cabal-sandbox', + 'cabal.sandbox.config', // Haskell + '_opam', + '.opam', // OCaml + 'Cargo.lock', // Rust (keep Cargo.toml but skip lock in some cases) + '.cargo', // Rust cache + '.mix', + '_build', // Elixir + 'rebar3.crashdump', + '_checkouts', // Erlang + '.rebar', + '.rebar3', + 'priv/static', // Phoenix framework + + // OS-Specific + '.DS_Store', + 'Thumbs.db', + 'Desktop.ini', + '$RECYCLE.BIN', + '.Trash-*', + '.fuse_hidden*', + + // Cloud & Deployment + '.serverless', + '.aws-sam', + '.terraform', + '.pulumi', + 'cdk.out', + '.cdk.staging', + 'amplify', + + // Mobile Development + 'ios/build', + 'android/build', + 'android/.gradle', + 'ios/Pods', + 'android/app/build', + + // Game Development + 'Library', + 'Temp', + 'Obj', + 'Build', + 'Builds', // Unity + 'Intermediate', + 'Binaries', + 'DerivedDataCache', // Unreal + + // Database + '*.db-journal', + '*.sqlite-journal', + + // Backup & Archive + 'backup', + 'backups', + '.backup', + 'archive', + 'archives', + ] + + // Skip any directory starting with . (hidden directories) except some important ones + if (dirName.startsWith('.')) { + const allowedHiddenDirs = ['.github', '.gitlab', '.circleci', '.travis', '.azure', '.devcontainer'] + return !allowedHiddenDirs.includes(dirName) + } + + return skipDirs.includes(dirName) + } + + /** + * Check if memory bank exists in workspace + */ + async memoryBankExists(workspaceFolderUri: string): Promise { + try { + const normalizedWorkspacePath = normalizePathFromUri(workspaceFolderUri, this.features.logging) + const memoryBankPath = `${normalizedWorkspacePath}/${MEMORY_BANK_DIRECTORY}` + + this.features.logging.info(`Memory Bank: Checking existence at path: "${memoryBankPath}"`) + + const exists = await this.features.workspace.fs.exists(memoryBankPath) + if (!exists) { + this.features.logging.info(`Memory Bank: Directory does not exist: "${memoryBankPath}"`) + return false + } + + // Check if at least one memory bank file exists + const files = Object.values(MEMORY_BANK_FILES) + let foundFiles = 0 + for (const file of files) { + const filePath = `${memoryBankPath}/${file}` + const fileExists = await this.features.workspace.fs.exists(filePath) + if (fileExists) { + foundFiles++ + } + } + + const hasFiles = foundFiles > 0 + if (hasFiles) { + this.features.logging.info(`Memory Bank: Found ${foundFiles} existing memory bank files`) + } else { + this.features.logging.info(`Memory Bank: No existing memory bank files found`) + } + + return hasFiles + } catch (error) { + this.features.logging.error(`Error checking memory bank existence: ${error}`) + return false + } + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/memorybank/memoryBankPrompts.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/memorybank/memoryBankPrompts.ts new file mode 100644 index 0000000000..9013d17e94 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/context/memorybank/memoryBankPrompts.ts @@ -0,0 +1,153 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +export class MemoryBankPrompts { + /** + * File ranking prompt - Takes TF-IDF analysis results and asks LLM to rank files + */ + static getFileRankingPrompt(filesString: string, numberToExtract: number = 20): string { + return `I will provide a list of files and the number of lines each file has. + +Please output just a JSON list which contains exactly ${numberToExtract} of these absolute file paths which are the most important and representative of this list to mine. Copy the exact filepaths exactly as they appear from the input. + +Consider the following when curating this list: +- The file path: contains information about what type of file it is (src, test) +- The file path: contains semantic information about the responsibilities of the class (e.g., core logic, utilities, subsystem) +- The number of lines of code: indicates the size of code within the files +- The mean lexical dissimilarity score: a higher number indicates this file is more different and unique from the other files in the project and thus might provide more information + +The expected format is ["filename1", "filename2", "filename3", ...] + +ONLY PROVIDE THE REQUESTED JSON AND NO OTHER TEXT + +Do not: +- Provide any textual response besides the requested JSON +- Use any markdown tags to annotate your response + + +${filesString} +` + } + + /** + * Complete Memory Bank generation - Takes ranked files and generates all 4 memory bank files + */ + static getCompleteMemoryBankPrompt(rankedFiles: string[], rootPath: string): string { + return `** CRITICAL INSTRUCTION: ALWAYS REGENERATE - NEVER SKIP ** + +You MUST generate a complete Memory Bank for this project by analyzing the codebase structure and generating comprehensive documentation. + +**MANDATORY REGENERATION POLICY:** +- NEVER respond with "already created" or "already exists" messages +- IGNORE any existing Memory Bank files in context - treat this as a fresh creation +- Even if you see existing memory-bank/*.md files in the context, REGENERATE them completely +- The user expects NEW files to be generated every time, regardless of existing files +- This ensures documentation is always current with the latest codebase +- Do NOT reference or mention existing memory bank files - create fresh ones + +**MANDATORY FRESH EXPLORATION POLICY:** +- IGNORE ALL PREVIOUS CHAT HISTORY about this project +- Even if you've analyzed this project before in this conversation, START FRESH +- ALWAYS begin by exploring the current workspace with listDirectory and readFile tools +- This is REQUIRED even if you think you already know the project structure +- Start with the root directory to understand if this is a multi-package workspace +- Read key configuration files (package.json, README.md, etc.) to understand the project +- This ensures documentation reflects the CURRENT complete codebase structure + +**CRITICAL MESSAGING AND TOOL USAGE POLICY:** +- Send your own brief progress messages before using tools (e.g., "Creating product.md - project overview and capabilities...") +- Use ONLY fsWrite tool with command "create" for file creation +- NEVER use fsReplace, fsRead, or other tools for creating memory bank files +- Use tools with ONLY the required parameters: command, path, fileText +- NEVER include the optional "explanation" parameter in any tool call +- Tool calls should be silent - your progress messages provide the user feedback +- Keep progress messages brief and informative + +**Directory Structure Ready** +The .amazonq/rules/memory-bank/ directory has been prepared and cleaned at: ${rootPath}/.amazonq/rules/memory-bank/ + +You MUST create exactly 4 files using fsWrite tool with these EXACT paths: +- ${rootPath}/.amazonq/rules/memory-bank/product.md +- ${rootPath}/.amazonq/rules/memory-bank/structure.md +- ${rootPath}/.amazonq/rules/memory-bank/tech.md +- ${rootPath}/.amazonq/rules/memory-bank/guidelines.md + +**Part 1: Fresh Analysis and Documentation Creation** + +FIRST: Start by saying "Now I'll explore the project structure and create the Memory Bank documentation." + +THEN: Create these 4 files in exact order: + +**1. product.md** - Project overview with: +- Project purpose and value proposition +- Key features and capabilities +- Target users and use cases + +**2. structure.md** - Project organization with: +- Directory structure and explanations +- Core components and relationships +- Architectural patterns + +**3. tech.md** - Technology details with: +- Programming languages and versions +- Build systems and dependencies +- Development commands + +**4. guidelines.md** - Development patterns from code analysis (see Part 2 below for analysis process) + +Create files 1-3 immediately using fsWrite with command "create" and the exact paths shown above. + +**Part 2: Advanced Guidelines Generation Using Iterative Analysis** + +THEN: Say "Now I'll analyze the most representative files from the codebase to identify development patterns and create comprehensive guidelines." + +I have ${rankedFiles.length} representative files ranked by lexical dissimilarity analysis: +${rankedFiles.map((file, i) => `${i + 1}. ${file}`).join('\n')} + +Create comprehensive development guidelines by: + +1. **Iterative File Analysis**: + - Process files in chunks of 2 using readFile tool + - Build guidelines iteratively, analyzing patterns across chunks + - Each iteration should build upon previous findings + +2. **Pattern Analysis Structure**: + - Code Quality Standards Analysis + - Document commonly used code formatting patterns + - Identify structural conventions and specifically what this codebase adheres to + - Note textual standards (naming, documentation, etc.) + - Practices followed throughout the codebase + +3. **Semantic Patterns Overview**: + - List recurring implementation patterns + - Document common architectural approaches + - Highlight frequent design patterns + - Proper internal API usage and patterns (with code examples!) + - Frequently used code idioms + - Popular annotations + +**ITERATIVE PROCESSING INSTRUCTIONS:** +- Process the ranked files in chunks of 2 files at a time using readFile tool +- For each chunk, send: "Analyzing chunk X/Y - Processing 2 files..." +- Analyze patterns in each chunk and build upon previous findings +- Keep track of how many files exhibit each pattern (frequency analysis) +- Build comprehensive guidelines.md iteratively through this process +- When creating guidelines.md, send "Creating guidelines.md - development standards and patterns..." then use fsWrite tool +- Use fsWrite with command "create" and path: ${rootPath}/.amazonq/rules/memory-bank/guidelines.md + +**COMPLETION SUMMARY**: After generating all 4 files, provide a brief completion message (maximum 8 lines) that: +- Confirms successful generation of exactly 4 files: product.md, structure.md, tech.md, guidelines.md +- Lists each file with one-line description +- Mentions they're available in Rules panel +- Avoids detailed technical breakdowns + +**FORBIDDEN RESPONSES:** +- NEVER say "I've already generated a complete Memory Bank" +- NEVER say "The Memory Bank is located in..." +- NEVER say "These files are automatically loaded" +- NEVER mention existing files - always create new ones +- NEVER provide status about existing documentation` + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/errors.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/errors.ts index 3038269463..819211dfab 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/errors.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/errors.ts @@ -11,6 +11,7 @@ type AgenticChatErrorCode = | 'MCPServerInitTimeout' // mcp server failed to start within allowed time | 'MCPToolExecTimeout' // mcp tool call failed to complete within allowed time | 'MCPServerConnectionFailed' // mcp server failed to connect + | 'MCPServerAuthFailed' // mcp server failed to complete auth flow | 'RequestAborted' // request was aborted by the user | 'RequestThrottled' // request was aborted by the user diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/qAgenticChatServer.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/qAgenticChatServer.ts index 205e5aff69..445ca78d85 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/qAgenticChatServer.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/qAgenticChatServer.ts @@ -110,7 +110,7 @@ export const QAgenticChatServer = ) ) - const userContext = makeUserContextObject(clientParams, runtime.platform, 'CHAT') + const userContext = makeUserContextObject(clientParams, runtime.platform, 'CHAT', amazonQServiceManager.serverInfo) telemetryService.updateUserContext(userContext) chatController = new AgenticChatController( diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/delayInterceptor.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/delayInterceptor.test.ts new file mode 100644 index 0000000000..889ea59f4d --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/delayInterceptor.test.ts @@ -0,0 +1,182 @@ +import { QDelayTrackingInterceptor, DelayNotification } from './delayInterceptor' +import { expect } from 'chai' +import * as sinon from 'sinon' + +describe('QDelayTrackingInterceptor', () => { + let interceptor: QDelayTrackingInterceptor + let mockLogging: any + let mockCallback: sinon.SinonSpy + + beforeEach(() => { + mockLogging = { + log: sinon.spy(), + debug: sinon.spy(), + } + mockCallback = sinon.spy() + interceptor = new QDelayTrackingInterceptor(mockLogging) + }) + + describe('setDelayNotificationCallback', () => { + it('should set callback and log debug message', () => { + interceptor.setDelayNotificationCallback(mockCallback) + + expect(mockLogging.debug.calledWith('QDelayTrackingInterceptor: setDelayNotificationCallback called')).to.be + .true + }) + }) + + describe('beforeAttempt', () => { + it('should log first attempt without delay calculation', () => { + interceptor.beforeAttempt(1) + + expect(mockLogging.debug.calledWith('QDelayTrackingInterceptor: Attempt 1')).to.be.true + expect( + mockLogging.debug.calledWith( + 'QDelayTrackingInterceptor: First attempt or no lastAttemptTime, skipping delay calculation' + ) + ).to.be.true + }) + + it('should calculate delay for subsequent attempts', () => { + const clock = sinon.useFakeTimers() + + // First attempt + interceptor.beforeAttempt(1) + + // Wait a bit and make second attempt + clock.tick(3000) // 3 seconds + interceptor.beforeAttempt(2) + + expect(mockLogging.debug.args.some((args: any) => args[0].includes('Delay'))).to.be.true + + clock.restore() + }) + + it('should send major delay notification for long delays', () => { + interceptor.setDelayNotificationCallback(mockCallback) + + const clock = sinon.useFakeTimers(1000) + + // First attempt + interceptor.beforeAttempt(1) + + // Simulate 6 second delay (major threshold) + clock.tick(6000) + interceptor.beforeAttempt(2) + + expect(mockCallback.calledOnce).to.be.true + const call = mockCallback.getCall(0) + expect(call.args[0].message).to.include('retrying within 10s') + expect(call.args[0].attemptNumber).to.equal(2) + expect(call.args[0].delay).to.equal(6) + expect(call.args[0].thresholdExceeded).to.be.true + + clock.restore() + }) + + it('should send minor delay notification for medium delays', () => { + interceptor.setDelayNotificationCallback(mockCallback) + + const clock = sinon.useFakeTimers(1000) + + // First attempt + interceptor.beforeAttempt(1) + + // Simulate 3 second delay (minor threshold) + clock.tick(3000) + interceptor.beforeAttempt(2) + + expect(mockCallback.calledOnce).to.be.true + const call = mockCallback.getCall(0) + expect(call.args[0].message).to.include('retrying within 5s') + expect(call.args[0].attemptNumber).to.equal(2) + expect(call.args[0].delay).to.equal(3) + expect(call.args[0].thresholdExceeded).to.be.true + + clock.restore() + }) + + it('should not notify for short delays', () => { + interceptor.setDelayNotificationCallback(mockCallback) + + const clock = sinon.useFakeTimers(1000) + + // First attempt + interceptor.beforeAttempt(1) + + // Simulate 1 second delay (below threshold) + clock.tick(1000) + interceptor.beforeAttempt(2) + + expect(mockCallback.called).to.be.false + expect( + mockLogging.debug.calledWith('QDelayTrackingInterceptor: Delay 1000ms below threshold, no notification') + ).to.be.true + + clock.restore() + }) + + it('should cap delay at maximum retry delay', () => { + interceptor.setDelayNotificationCallback(mockCallback) + + const clock = sinon.useFakeTimers(1000) + + // First attempt + interceptor.beforeAttempt(1) + + // Simulate very long delay (15 seconds) + clock.tick(15000) + interceptor.beforeAttempt(2) + + expect(mockCallback.calledOnce).to.be.true + const call = mockCallback.getCall(0) + expect(call.args[0].message).to.include('retrying within 10s') + expect(call.args[0].attemptNumber).to.equal(2) + expect(call.args[0].delay).to.equal(10) // Capped at 10 seconds + expect(call.args[0].thresholdExceeded).to.be.true + + clock.restore() + }) + + it('should log when no callback is set', () => { + const clock = sinon.useFakeTimers(1000) + + // First attempt + interceptor.beforeAttempt(1) + + // Simulate delay above threshold + clock.tick(3000) + interceptor.beforeAttempt(2) + + expect(mockLogging.debug.calledWith('QDelayTrackingInterceptor: No delay notification callback set')).to.be + .true + + clock.restore() + }) + }) + + describe('reset', () => { + it('should reset lastAttemptTime', () => { + // Make an attempt to set lastAttemptTime + interceptor.beforeAttempt(1) + + // Reset + interceptor.reset() + + // Next attempt should be treated as first + interceptor.beforeAttempt(1) + + expect( + mockLogging.debug.calledWith( + 'QDelayTrackingInterceptor: First attempt or no lastAttemptTime, skipping delay calculation' + ) + ).to.be.true + }) + }) + + describe('name', () => { + it('should return correct name', () => { + expect(interceptor.name()).to.equal('Q Language Server Delay Tracking Interceptor') + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/delayInterceptor.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/delayInterceptor.ts new file mode 100644 index 0000000000..6c81abc42a --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/delayInterceptor.ts @@ -0,0 +1,93 @@ +import { Logging } from '@aws/language-server-runtimes/server-interface' +import { MINOR_DELAY_THRESHOLD_MS, MAJOR_DELAY_THRESHOLD_MS, MAX_RETRY_DELAY_MS } from '../constants/constants' + +export interface DelayNotification { + message: string + attemptNumber: number + delay: number + thresholdExceeded: boolean +} + +/** + * Delay tracking interceptor that matches CLI's DelayTrackingInterceptor behavior. + * Tracks retry delays and provides user notifications. + */ +export class QDelayTrackingInterceptor { + private logging?: Logging + private minorDelayThreshold: number = MINOR_DELAY_THRESHOLD_MS + private majorDelayThreshold: number = MAJOR_DELAY_THRESHOLD_MS + private maxRetryDelay: number = MAX_RETRY_DELAY_MS + private lastAttemptTime?: number + private onDelayNotification?: (notification: DelayNotification) => void + + constructor(logging?: Logging) { + this.logging = logging + } + + /** + * Sets the delay notification callback for UI integration + */ + public setDelayNotificationCallback(callback: (notification: DelayNotification) => void): void { + this.logging?.debug(`QDelayTrackingInterceptor: setDelayNotificationCallback called`) + this.onDelayNotification = callback + } + + /** + * Called before each request attempt to track delays and notify users + */ + public beforeAttempt(attemptNumber: number): void { + this.logging?.debug(`QDelayTrackingInterceptor: Attempt ${attemptNumber}`) + const now = Date.now() + + if (this.lastAttemptTime && attemptNumber > 1) { + const delay = Math.min(now - this.lastAttemptTime, this.maxRetryDelay) + this.logging?.debug( + `QDelayTrackingInterceptor: Delay ${delay}ms, thresholds: minor=${this.minorDelayThreshold}ms, major=${this.majorDelayThreshold}ms` + ) + + let message: string + if (delay >= this.majorDelayThreshold) { + message = `Retry #${attemptNumber}, retrying within ${Math.ceil(this.maxRetryDelay / 1000)}s..` + } else if (delay >= this.minorDelayThreshold) { + message = `Retry #${attemptNumber}, retrying within 5s..` + } else { + // No notification for short delays + this.logging?.debug(`QDelayTrackingInterceptor: Delay ${delay}ms below threshold, no notification`) + this.lastAttemptTime = now + return + } + + this.logging?.debug(`QDelayTrackingInterceptor: Delay message: ${message}`) + + // Notify UI about the delay + if (this.onDelayNotification) { + this.logging?.debug(`QDelayTrackingInterceptor: Sending delay notification`) + this.onDelayNotification({ + message, + attemptNumber, + delay: Math.ceil(delay / 1000), + thresholdExceeded: delay >= this.minorDelayThreshold, + }) + } else { + this.logging?.debug(`QDelayTrackingInterceptor: No delay notification callback set`) + } + } else { + this.logging?.debug( + `QDelayTrackingInterceptor: First attempt or no lastAttemptTime, skipping delay calculation` + ) + } + + this.lastAttemptTime = now + } + + /** + * Reset tracking state + */ + public reset(): void { + this.lastAttemptTime = undefined + } + + public name(): string { + return 'Q Language Server Delay Tracking Interceptor' + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/errorTransformer.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/errorTransformer.test.ts new file mode 100644 index 0000000000..05becfa162 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/errorTransformer.test.ts @@ -0,0 +1,420 @@ +import { QErrorTransformer } from './errorTransformer' +import { AgenticChatError } from '../errors' +import { expect } from 'chai' +import * as sinon from 'sinon' +import { + MONTHLY_LIMIT_ERROR_MARKER, + HIGH_LOAD_ERROR_MESSAGE, + INSUFFICIENT_MODEL_CAPACITY, + SERVICE_UNAVAILABLE_EXCEPTION, +} from '../constants/constants' + +describe('QErrorTransformer', () => { + let transformer: QErrorTransformer + let mockLogging: any + + beforeEach(() => { + mockLogging = { + log: sinon.spy(), + debug: sinon.spy(), + } + transformer = new QErrorTransformer(mockLogging, false) + }) + + describe('transformFinalError', () => { + it('should transform usage limit errors', () => { + const error = new Error('Usage limit exceeded') + ;(error as any).code = 'AmazonQUsageLimitError' + error.message = `${MONTHLY_LIMIT_ERROR_MARKER} exceeded` + + const result = transformer.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect(result.message).to.include('Request failed after 3 attempts') + expect((result as AgenticChatError).code).to.equal('AmazonQUsageLimitError') + }) + + it('should transform monthly limit errors from response body', () => { + const error = new Error('Service error') + ;(error as any).cause = { + $metadata: { + body: `Error: ${MONTHLY_LIMIT_ERROR_MARKER} exceeded for user`, + }, + } + + const result = transformer.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect((result as AgenticChatError).code).to.equal('AmazonQUsageLimitError') + }) + + it('should transform abort errors', () => { + const error = new Error('Request aborted') + error.name = 'AbortError' + + const result = transformer.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect(result.message).to.equal('Request aborted') + expect((result as AgenticChatError).code).to.equal('RequestAborted') + }) + + it('should transform input too long errors', () => { + const error = new Error('input too long') + ;(error as any).code = 'InputTooLong' + + const result = transformer.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect(result.message).to.include('Too much context loaded') + expect((result as AgenticChatError).code).to.equal('InputTooLong') + }) + + it('should transform model unavailable errors with model selection enabled', () => { + const transformerWithModelSelection = new QErrorTransformer(mockLogging, true) + const error = new Error('Model unavailable') + ;(error as any).statusCode = 429 + ;(error as any).cause = { reason: INSUFFICIENT_MODEL_CAPACITY } + + const result = transformerWithModelSelection.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect(result.message).to.include('model you selected is temporarily unavailable') + expect((result as AgenticChatError).code).to.equal('QModelResponse') + }) + + it('should transform model unavailable errors without model selection', () => { + const error = new Error('High load') + ;(error as any).statusCode = 500 + error.message = HIGH_LOAD_ERROR_MESSAGE + + const result = transformer.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect(result.message).to.include('experiencing high traffic') + expect((result as AgenticChatError).code).to.equal('QModelResponse') + }) + + it('should transform throttling errors', () => { + const error = new Error('Throttling') + ;(error as any).code = 'ThrottlingException' + ;(error as any).statusCode = 429 + + const result = transformer.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect(result.message).to.include('Service is currently experiencing high traffic') + expect((result as AgenticChatError).code).to.equal('RequestThrottled') + }) + + it('should transform service overloaded errors', () => { + const error = new Error('Service error') + ;(error as any).statusCode = 500 + ;(error as any).cause = { + $metadata: { + body: `${SERVICE_UNAVAILABLE_EXCEPTION}: Service temporarily unavailable`, + }, + } + + const result = transformer.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect(result.message).to.include('Service is currently experiencing high traffic') + expect((result as AgenticChatError).code).to.equal('RequestThrottled') + }) + + it('should handle unknown errors', () => { + const error = new Error('Unknown error') + + const result = transformer.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect(result.message).to.equal('Unknown error') + expect((result as AgenticChatError).code).to.equal('QModelResponse') + }) + + it('should use custom attempt count when provided', () => { + const error = new Error('Throttling') + ;(error as any).code = 'AmazonQUsageLimitError' + + const result = transformer.transformFinalError(error, 5) + + expect(result.message).to.include('Request failed after 5 attempts') + }) + + it('should extract request ID from error', () => { + const error = new Error('Service error') + ;(error as any).cause = { + $metadata: { requestId: 'test-request-123' }, + } + + const result = transformer.transformFinalError(error) as AgenticChatError + + expect(result.requestId).to.equal('test-request-123') + }) + + it('should pass through authentication errors', () => { + // Mock the instanceof check by creating a proper error type + const authError = new Error('Auth error') + ;(authError as any).constructor = { name: 'AmazonQServicePendingSigninError' } + + // Mock the instanceof check + const originalTransform = transformer.transformFinalError + transformer.transformFinalError = function (error: any, attemptCount?: number) { + if (error.constructor?.name === 'AmazonQServicePendingSigninError') { + return error + } + return originalTransform.call(this, error, attemptCount) + } + + const result = transformer.transformFinalError(authError) + + expect(result).to.equal(authError) + }) + + it('should handle model unavailable with reason property', () => { + const error = new Error('Model unavailable') + ;(error as any).statusCode = 429 + ;(error as any).reason = INSUFFICIENT_MODEL_CAPACITY + + const result = transformer.transformFinalError(error) + + expect(result).to.be.instanceOf(AgenticChatError) + expect((result as AgenticChatError).code).to.equal('QModelResponse') + }) + + it('should handle non-Error objects', () => { + const nonError = 'string error' + + const result = transformer.transformFinalError(nonError) + + expect(result).to.be.instanceOf(AgenticChatError) + expect(result.message).to.equal('string error') + }) + }) + + describe('extractResponseBody', () => { + it('should extract body from different error formats', () => { + const transformer = new QErrorTransformer() + + // Test cause.$metadata.body + let error: any = { + cause: { $metadata: { body: 'test body 1' } }, + } + expect((transformer as any).extractResponseBody(error)).to.equal('test body 1') + + // Test $metadata.body + error = { + $metadata: { body: 'test body 2' }, + } + expect((transformer as any).extractResponseBody(error)).to.equal('test body 2') + + // Test message + error = { + message: 'test body 3', + } + expect((transformer as any).extractResponseBody(error)).to.equal('test body 3') + }) + + it('should handle extraction errors gracefully', () => { + const transformer = new QErrorTransformer() + + // Test extractTextFromBody error handling + const bodyThatThrows = { + get toString() { + throw new Error('Access denied') + }, + } + + const result = (transformer as any).extractTextFromBody(bodyThatThrows) + expect(result).to.be.null + }) + + it('should extract from response data and body', () => { + const transformer = new QErrorTransformer() + + // Test response.data + let error: any = { + response: { data: 'response data' }, + } + expect((transformer as any).extractResponseBody(error)).to.equal('response data') + + // Test response.body + error = { + response: { body: 'response body' }, + } + expect((transformer as any).extractResponseBody(error)).to.equal('response body') + }) + }) + + describe('getStatusCode', () => { + it('should extract status code from different error formats', () => { + const transformer = new QErrorTransformer() + + // Test cause.$metadata.httpStatusCode + let error: any = { + cause: { $metadata: { httpStatusCode: 429 } }, + } + expect((transformer as any).getStatusCode(error)).to.equal(429) + + // Test $metadata.httpStatusCode + error = { + $metadata: { httpStatusCode: 500 }, + } + expect((transformer as any).getStatusCode(error)).to.equal(500) + + // Test statusCode + error = { + statusCode: 404, + } + expect((transformer as any).getStatusCode(error)).to.equal(404) + + // Test status + error = { + status: 503, + } + expect((transformer as any).getStatusCode(error)).to.equal(503) + }) + + it('should handle status code extraction errors', () => { + const transformer = new QErrorTransformer() + const error: any = { + get cause() { + throw new Error('Access denied') + }, + } + + const result = (transformer as any).getStatusCode(error) + + expect(result).to.be.undefined + }) + + it('should extract status code from response patterns', () => { + const transformer = new QErrorTransformer() + + // Test response.status + let error: any = { + response: { status: 429 }, + } + expect((transformer as any).getStatusCode(error)).to.equal(429) + + // Test response.statusCode + error = { + response: { statusCode: 500 }, + } + expect((transformer as any).getStatusCode(error)).to.equal(500) + + // Test cause.statusCode + error = { + cause: { statusCode: 404 }, + } + expect((transformer as any).getStatusCode(error)).to.equal(404) + + // Test cause.status + error = { + cause: { status: 503 }, + } + expect((transformer as any).getStatusCode(error)).to.equal(503) + }) + }) + + describe('isThrottlingError', () => { + it('should identify throttling errors by status code', () => { + const transformer = new QErrorTransformer() + + const error: any = { statusCode: 429 } + expect((transformer as any).isThrottlingError(error)).to.be.true + }) + + it('should identify throttling errors by code', () => { + const transformer = new QErrorTransformer() + + const error: any = { code: 'ThrottlingException' } + expect((transformer as any).isThrottlingError(error)).to.be.true + }) + + it('should identify service overloaded errors', () => { + const transformer = new QErrorTransformer() + + const error: any = { + statusCode: 500, + cause: { + $metadata: { + body: HIGH_LOAD_ERROR_MESSAGE, + }, + }, + } + expect((transformer as any).isThrottlingError(error)).to.be.true + }) + + it('should not identify non-throttling errors', () => { + const transformer = new QErrorTransformer() + + const error: any = { statusCode: 404 } + expect((transformer as any).isThrottlingError(error)).to.be.false + }) + + it('should identify throttling by name', () => { + const transformer = new QErrorTransformer() + + const error: any = { name: 'ThrottlingException' } + expect((transformer as any).isThrottlingError(error)).to.be.true + }) + + it('should identify model capacity throttling', () => { + const transformer = new QErrorTransformer() + + const error: any = { + statusCode: 429, + cause: { reason: INSUFFICIENT_MODEL_CAPACITY }, + } + expect((transformer as any).isThrottlingError(error)).to.be.true + }) + + it('should log debug messages for service overloaded detection', () => { + const transformer = new QErrorTransformer(mockLogging) + + const error: any = { + statusCode: 500, + cause: { + $metadata: { + body: `${SERVICE_UNAVAILABLE_EXCEPTION}: Service temporarily unavailable`, + }, + }, + } + + expect((transformer as any).isThrottlingError(error)).to.be.true + expect(mockLogging.debug.called).to.be.true + }) + + it('should handle ArrayBuffer body extraction', () => { + const transformer = new QErrorTransformer() + const buffer = new TextEncoder().encode('test buffer').buffer + + const result = (transformer as any).extractTextFromBody(buffer) + expect(result).to.equal('test buffer') + }) + + it('should handle object body extraction', () => { + const transformer = new QErrorTransformer() + const obj = { message: 'test object' } + + const result = (transformer as any).extractTextFromBody(obj) + expect(result).to.equal('{"message":"test object"}') + }) + + it('should handle null body', () => { + const transformer = new QErrorTransformer() + + const result = (transformer as any).extractTextFromBody(null) + expect(result).to.be.null + }) + + it('should handle undefined body', () => { + const transformer = new QErrorTransformer() + + const result = (transformer as any).extractTextFromBody(undefined) + expect(result).to.be.null + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/errorTransformer.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/errorTransformer.ts new file mode 100644 index 0000000000..3f60e37ad9 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/errorTransformer.ts @@ -0,0 +1,221 @@ +import { Logging } from '@aws/language-server-runtimes/server-interface' +import { isUsageLimitError, isAwsThrottlingError, getRequestID } from '../../../shared/utils' +import { AgenticChatError, isThrottlingRelated, isRequestAbortedError, isInputTooLongError } from '../errors' +import { + AmazonQError, + AmazonQServicePendingSigninError, + AmazonQServicePendingProfileError, +} from '../../../shared/amazonQServiceManager/errors' + +import { + HTTP_STATUS_TOO_MANY_REQUESTS, + HTTP_STATUS_INTERNAL_SERVER_ERROR, + MONTHLY_LIMIT_ERROR_MARKER, + HIGH_LOAD_ERROR_MESSAGE, + SERVICE_UNAVAILABLE_EXCEPTION, + INSUFFICIENT_MODEL_CAPACITY, + MAX_REQUEST_ATTEMPTS, +} from '../constants/constants' + +/** + * Q-specific error transformation for AWS SDK native retry. + * AWS SDK handles retries, this transforms final errors into user-friendly Q messages. + */ +export class QErrorTransformer { + private logging?: Logging + private isModelSelectionEnabled: () => boolean + + constructor(logging?: Logging, isModelSelectionEnabled: (() => boolean) | boolean = false) { + this.logging = logging + this.isModelSelectionEnabled = + typeof isModelSelectionEnabled === 'function' ? isModelSelectionEnabled : () => isModelSelectionEnabled + } + + private extractResponseBody(error: any): string | null { + return ( + this.extractTextFromBody(error.cause?.$metadata?.body) || + this.extractTextFromBody(error.$metadata?.body) || + this.extractTextFromBody(error.cause?.body) || + this.extractTextFromBody(error.body) || + this.extractTextFromBody(error.response?.data) || + this.extractTextFromBody(error.response?.body) || + error.message || + null + ) + } + + private extractTextFromBody(body: any): string | null { + try { + if (typeof body === 'string') { + return body + } + if (body instanceof Uint8Array) { + return new TextDecoder('utf-8', { fatal: false }).decode(body) + } + if (body instanceof ArrayBuffer) { + return new TextDecoder('utf-8', { fatal: false }).decode(body) + } + if (typeof body === 'object' && body !== null) { + return JSON.stringify(body) + } + return null + } catch { + return null + } + } + + public transformFinalError(error: any, attemptCount?: number): Error { + // Use default attempt count if not provided + const attempts = attemptCount ?? MAX_REQUEST_ATTEMPTS + const requestId = getRequestID(error) + + // Don't transform authentication errors - let them pass through for auth follow-up handling + if (error instanceof AmazonQServicePendingSigninError || error instanceof AmazonQServicePendingProfileError) { + return error + } + + // Handle specific error types with retry context + if (isUsageLimitError(error)) { + return new AgenticChatError( + `Request failed after ${attempts} attempts`, + 'AmazonQUsageLimitError', + error instanceof Error ? error : undefined, + requestId + ) + } + + // Check response body for monthly limits + const bodyStr = this.extractResponseBody(error) + if (bodyStr && bodyStr.includes(MONTHLY_LIMIT_ERROR_MARKER)) { + return new AgenticChatError( + `Request failed after ${attempts} attempts`, + 'AmazonQUsageLimitError', + error instanceof Error ? error : undefined, + requestId + ) + } + + if ( + error?.name === 'AbortError' || + error?.code === 'RequestAborted' || + error?.name === 'RequestAborted' || + isRequestAbortedError(error) + ) { + return new AgenticChatError( + 'Request aborted', + 'RequestAborted', + error instanceof Error ? error : undefined, + requestId + ) + } + + if ( + error?.name === 'InputTooLong' || + error?.code === 'InputTooLong' || + error?.message?.includes('input too long') || + isInputTooLongError(error) + ) { + return new AgenticChatError( + 'Too much context loaded. I have cleared the conversation history. Please retry your request with smaller input.', + 'InputTooLong', + error instanceof Error ? error : undefined, + requestId + ) + } + + // Check for model unavailability first (before general throttling) + const statusCode = this.getStatusCode(error) + const isModelUnavailable = + (statusCode === HTTP_STATUS_TOO_MANY_REQUESTS && + (error.cause?.reason === INSUFFICIENT_MODEL_CAPACITY || + error.reason === INSUFFICIENT_MODEL_CAPACITY)) || + (statusCode === HTTP_STATUS_INTERNAL_SERVER_ERROR && error.message === HIGH_LOAD_ERROR_MESSAGE) + + if (isModelUnavailable) { + const message = this.isModelSelectionEnabled() + ? `The model you selected is temporarily unavailable. Please switch to a different model and try again.` + : `I am experiencing high traffic, please try again shortly.` + + return new AgenticChatError( + message, + 'QModelResponse', + error instanceof Error ? error : undefined, + requestId + ) + } + + if (isAwsThrottlingError(error) || isThrottlingRelated(error) || this.isThrottlingError(error)) { + return new AgenticChatError( + `Service is currently experiencing high traffic. Request failed after ${attempts} attempts. Please try again later.`, + 'RequestThrottled', + error instanceof Error ? error : undefined, + requestId + ) + } + + // Handle other errors - fallback to QModelResponse with request ID + return new AgenticChatError( + error instanceof Error ? error.message : String(error), + 'QModelResponse', + error instanceof Error ? error : undefined, + requestId + ) + } + + private isThrottlingError(error: any): boolean { + const statusCode = this.getStatusCode(error) + + // Check for AWS throttling patterns + if ( + statusCode === HTTP_STATUS_TOO_MANY_REQUESTS || + error?.name === 'ThrottlingException' || + error?.code === 'ThrottlingException' + ) + return true + + // Check for service overloaded errors (status 500 with specific messages) + if (statusCode === HTTP_STATUS_INTERNAL_SERVER_ERROR) { + // Check response body directly (not error message) to avoid conflict with model unavailability + const responseBody = error.cause?.$metadata?.body || error.$metadata?.body + if (responseBody) { + const isOverloaded = + responseBody.includes(HIGH_LOAD_ERROR_MESSAGE) || + responseBody.includes(SERVICE_UNAVAILABLE_EXCEPTION) + this.logging?.debug( + `QErrorTransformer: Service overloaded error detected (status 500): ${isOverloaded}` + ) + return isOverloaded + } + } + + // Model capacity issues - but these should be handled by model unavailability check first + if ( + statusCode === HTTP_STATUS_TOO_MANY_REQUESTS && + (error.cause?.reason === INSUFFICIENT_MODEL_CAPACITY || error.reason === INSUFFICIENT_MODEL_CAPACITY) + ) { + return true + } + + return false + } + + private getStatusCode(error: any): number | undefined { + try { + // AWS SDK v3 metadata patterns + if (error.cause?.$metadata?.httpStatusCode) return error.cause.$metadata.httpStatusCode + if (error.$metadata?.httpStatusCode) return error.$metadata.httpStatusCode + // Direct status properties + if (error.statusCode) return error.statusCode + if (error.status) return error.status + // Response object patterns + if (error.response?.status) return error.response.status + if (error.response?.statusCode) return error.response.statusCode + // Nested error patterns + if (error.cause?.statusCode) return error.cause.statusCode + if (error.cause?.status) return error.cause.status + return undefined + } catch { + return undefined + } + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/index.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/index.ts new file mode 100644 index 0000000000..868f69ac4a --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/index.ts @@ -0,0 +1,3 @@ +export { QRetryClassifier, RetryAction, type RetryClassifierPriority, type InterceptorContext } from './retryClassifier' +export { QDelayTrackingInterceptor, type DelayNotification } from './delayInterceptor' +export { QErrorTransformer } from './errorTransformer' diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/qRetryStrategy.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/qRetryStrategy.test.ts new file mode 100644 index 0000000000..920758a505 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/qRetryStrategy.test.ts @@ -0,0 +1,179 @@ +import { QRetryStrategy } from './qRetryStrategy' +import { QRetryClassifier, RetryAction } from './retryClassifier' +import { QDelayTrackingInterceptor } from './delayInterceptor' +import { RetryToken, RetryErrorInfo } from '@aws-sdk/types' +import { expect } from 'chai' +import * as sinon from 'sinon' + +describe('QRetryStrategy', () => { + let retryStrategy: QRetryStrategy + let mockClassifier: sinon.SinonStubbedInstance + let mockDelayInterceptor: sinon.SinonStubbedInstance + let mockLogging: any + + beforeEach(() => { + mockLogging = { + log: sinon.spy(), + debug: sinon.spy(), + } + + mockClassifier = { + classifyRetry: sinon.stub(), + } as sinon.SinonStubbedInstance + + mockDelayInterceptor = { + beforeAttempt: sinon.stub(), + reset: sinon.stub(), + } as sinon.SinonStubbedInstance + + retryStrategy = new QRetryStrategy(mockClassifier, mockDelayInterceptor, 3, mockLogging) + }) + + describe('acquireInitialRetryToken', () => { + it('should return initial token with zero counts', async () => { + const token = await retryStrategy.acquireInitialRetryToken('test-scope') + + expect(token.getRetryCount()).to.equal(0) + expect((retryStrategy as any).attemptCount).to.equal(0) + expect( + mockLogging.log.args.some((args: any) => + args[0].includes('Initial retry token acquired for scope: test-scope') + ) + ).to.be.true + }) + }) + + describe('refreshRetryTokenForRetry', () => { + let initialToken: RetryToken + + beforeEach(async () => { + initialToken = await retryStrategy.acquireInitialRetryToken('test-scope') + }) + + it('should allow retry for throttling errors', async () => { + const error = new Error('Throttling') + ;(error as any).code = 'ThrottlingException' + ;(error as any).$metadata = {} + const errorInfo: RetryErrorInfo = { error: error as any, errorType: 'THROTTLING' } + + mockClassifier.classifyRetry.returns(RetryAction.ThrottlingError) + + const newToken = await retryStrategy.refreshRetryTokenForRetry(initialToken, errorInfo) + + expect(newToken.getRetryCount()).to.equal(1) + expect(mockDelayInterceptor.beforeAttempt.calledWith(2)).to.be.true + }) + + it('should reject retry for forbidden errors', async () => { + const error = new Error('Abort') + ;(error as any).$metadata = {} + const errorInfo: RetryErrorInfo = { error: error as any, errorType: 'CLIENT_ERROR' } + mockClassifier.classifyRetry.returns(RetryAction.RetryForbidden) + + try { + await retryStrategy.refreshRetryTokenForRetry(initialToken, errorInfo) + expect.fail('Should have thrown error') + } catch (e: any) { + expect(e.message).to.equal('Abort') // Original error is thrown + } + }) + + it('should delegate to adaptive strategy for max attempts', async () => { + mockClassifier.classifyRetry.returns(RetryAction.ThrottlingError) + const error = new Error('Test error') + ;(error as any).$metadata = {} + const errorInfo: RetryErrorInfo = { error: error as any, errorType: 'THROTTLING' } + + // The adaptive strategy will handle max attempts internally + // We just verify our classifier is called + try { + await retryStrategy.refreshRetryTokenForRetry(initialToken, errorInfo) + } catch (e) { + // May throw due to adaptive strategy limits + } + + expect(mockClassifier.classifyRetry.called).to.be.true + }) + + it('should delegate delay calculation to adaptive strategy', async () => { + mockClassifier.classifyRetry.returns(RetryAction.ThrottlingError) + const error = new Error() + ;(error as any).$metadata = {} + const errorInfo: RetryErrorInfo = { error: error as any, errorType: 'THROTTLING' } + + const token = await retryStrategy.refreshRetryTokenForRetry(initialToken, errorInfo) + + // Adaptive strategy handles delay calculation + expect(token.getRetryCount()).to.equal(1) + expect(mockDelayInterceptor.beforeAttempt.calledWith(2)).to.be.true + }) + + it('should track delay interceptor calls', async () => { + mockClassifier.classifyRetry.returns(RetryAction.ThrottlingError) + const error = new Error() + ;(error as any).$metadata = {} + const errorInfo: RetryErrorInfo = { error: error as any, errorType: 'THROTTLING' } + + await retryStrategy.refreshRetryTokenForRetry(initialToken, errorInfo) + + expect(mockDelayInterceptor.beforeAttempt.calledWith(2)).to.be.true + }) + }) + + describe('recordSuccess', () => { + it('should reset state and call delay interceptor', async () => { + const token = await retryStrategy.acquireInitialRetryToken('test-scope') + + retryStrategy.recordSuccess(token) + + expect(mockDelayInterceptor.reset.called).to.be.true + expect((retryStrategy as any).attemptCount).to.equal(0) + expect( + mockLogging.log.args.some((args: any) => args[0].includes('Request succeeded after 1 total attempts')) + ).to.be.true + }) + + it('should handle reset errors gracefully', async () => { + mockDelayInterceptor.reset.throws(new Error('Reset failed')) + + const token = await retryStrategy.acquireInitialRetryToken('test-scope') + + retryStrategy.recordSuccess(token) // Should not throw + expect( + mockLogging.log.args.some((args: any) => + args[0].includes('Warning - failed to reset state after success') + ) + ).to.be.true + }) + + it('should handle parent recordSuccess errors gracefully', async () => { + const strategy = new QRetryStrategy(mockClassifier, mockDelayInterceptor, 3, mockLogging) + const token = await strategy.acquireInitialRetryToken('test-scope') + + // Mock the parent recordSuccess to throw + const originalRecordSuccess = Object.getPrototypeOf(Object.getPrototypeOf(strategy)).recordSuccess + Object.getPrototypeOf(Object.getPrototypeOf(strategy)).recordSuccess = () => { + throw new Error('Parent recordSuccess failed') + } + + strategy.recordSuccess(token) // Should not throw + + // Restore original method + Object.getPrototypeOf(Object.getPrototypeOf(strategy)).recordSuccess = originalRecordSuccess + + expect( + mockLogging.log.args.some((args: any) => + args[0].includes('Warning - failed to reset state after success') + ) + ).to.be.true + }) + }) + + describe('getAttemptCount', () => { + it('should return current attempt count', async () => { + const token = await retryStrategy.acquireInitialRetryToken('test-scope') + + expect(retryStrategy.getAttemptCount()).to.equal(0) + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/qRetryStrategy.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/qRetryStrategy.ts new file mode 100644 index 0000000000..af3316c158 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/qRetryStrategy.ts @@ -0,0 +1,89 @@ +import { RetryToken, RetryErrorInfo, RetryErrorType } from '@aws-sdk/types' +import { AdaptiveRetryStrategy } from '@smithy/util-retry' +import { StandardRetryToken } from '@smithy/types' +import { QRetryClassifier, RetryAction } from './retryClassifier' +import { QDelayTrackingInterceptor } from './delayInterceptor' +import { Logging } from '@aws/language-server-runtimes/server-interface' +import { sanitizeLogInput } from '../../../shared/utils' + +/** + * Custom retry strategy that extends AWS SDK v3's AdaptiveRetryStrategy with Q-specific logic + */ +export class QRetryStrategy extends AdaptiveRetryStrategy { + private retryClassifier: QRetryClassifier + private delayInterceptor: QDelayTrackingInterceptor + private maxAttempts: number + private logging?: Logging + private attemptCount: number = 0 + + constructor( + retryClassifier: QRetryClassifier, + delayInterceptor: QDelayTrackingInterceptor, + maxAttempts: number, + logging?: Logging + ) { + super(() => Promise.resolve(maxAttempts)) + this.retryClassifier = retryClassifier + this.delayInterceptor = delayInterceptor + this.maxAttempts = maxAttempts + this.logging = logging + } + + override async acquireInitialRetryToken(retryTokenScope: string): Promise { + this.attemptCount = 0 + this.logging?.log( + `QRetryStrategy: Initial retry token acquired for scope: ${retryTokenScope}, attempt count reset to 0` + ) + // AdaptiveRetryStrategy returns StandardRetryToken, but interface expects RetryToken + return super.acquireInitialRetryToken(retryTokenScope) + } + + override async refreshRetryTokenForRetry(token: RetryToken, errorInfo: RetryErrorInfo): Promise { + const currentAttempt = token.getRetryCount() + 1 + this.attemptCount = currentAttempt + + const errorCode = sanitizeLogInput( + (errorInfo.error as any)?.name || (errorInfo.error as any)?.code || 'Unknown' + ) + this.logging?.log(`QRetryStrategy: Retry attempt ${currentAttempt} for error: ${errorCode}`) + + // Apply Q-specific retry classification + const context = { error: errorInfo.error, response: (errorInfo.error as any)?.$response } + const action = this.retryClassifier.classifyRetry(context) + this.logging?.log(`QRetryStrategy: Retry classification result: ${action}`) + + // Check if we should retry based on Q classification + if (action === RetryAction.RetryForbidden) { + this.logging?.log(`QRetryStrategy: Retry forbidden, stopping retries after ${currentAttempt} attempts`) + throw errorInfo.error + } + + // Track delay for UI notifications - CALL BEFORE ATTEMPT + this.delayInterceptor.beforeAttempt(currentAttempt + 1) + + // Delegate to adaptive strategy for delay calculation and max attempts check + // AdaptiveRetryStrategy expects StandardRetryToken but we receive RetryToken + // The token from acquireInitialRetryToken is actually StandardRetryToken, so this cast is safe + return super.refreshRetryTokenForRetry(token as StandardRetryToken, errorInfo) + } + + override recordSuccess(token: RetryToken): void { + try { + this.logging?.log(`QRetryStrategy: Request succeeded after ${this.attemptCount + 1} total attempts`) + // Reset delay tracking on success + this.delayInterceptor.reset() + this.attemptCount = 0 + // Call parent to maintain adaptive strategy state + // Token is actually StandardRetryToken from AdaptiveRetryStrategy + super.recordSuccess(token as StandardRetryToken) + } catch (error) { + // Log but don't throw - success recording should not fail + this.logging?.log(`QRetryStrategy: Warning - failed to reset state after success: ${error}`) + } + } + + // Test helper method to get current attempt count + public getAttemptCount(): number { + return this.attemptCount + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/retryClassifier.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/retryClassifier.test.ts new file mode 100644 index 0000000000..4f140c3b09 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/retryClassifier.test.ts @@ -0,0 +1,254 @@ +import { QRetryClassifier, RetryAction } from './retryClassifier' +import { expect } from 'chai' +import * as sinon from 'sinon' +import { + CONTENT_LENGTH_EXCEEDS_THRESHOLD, + INVALID_MODEL_ID, + MAXIMUM_CHAT_CONTENT_MESSAGE, + MONTHLY_LIMIT_ERROR_MARKER, + HIGH_LOAD_ERROR_MESSAGE, + INSUFFICIENT_MODEL_CAPACITY, +} from '../constants/constants' + +describe('QRetryClassifier', () => { + let classifier: QRetryClassifier + let mockLogging: any + + beforeEach(() => { + mockLogging = { + log: sinon.spy(), + debug: sinon.spy(), + } + classifier = new QRetryClassifier(mockLogging) + }) + + describe('classifyRetry', () => { + it('should forbid retry for AccessDeniedException', () => { + const error = new Error('Access denied') + error.name = 'AccessDeniedException' + + const result = classifier.classifyRetry({ error }) + + expect(result).to.equal(RetryAction.RetryForbidden) + }) + + it('should forbid retry for SERVICE_QUOTA_EXCEPTION', () => { + const error = new Error('Service quota exceeded') + error.name = 'SERVICE_QUOTA_EXCEPTION' + + const result = classifier.classifyRetry({ error }) + + expect(result).to.equal(RetryAction.RetryForbidden) + }) + + it('should forbid retry for abort errors', () => { + const error = new Error('Request aborted') + error.name = 'AbortError' + + const result = classifier.classifyRetry({ error }) + + expect(result).to.equal(RetryAction.RetryForbidden) + }) + + it('should forbid retry for input too long errors', () => { + const error = new Error('input too long') + ;(error as any).reason = CONTENT_LENGTH_EXCEEDS_THRESHOLD + + const result = classifier.classifyRetry({ error }) + + expect(result).to.equal(RetryAction.RetryForbidden) + }) + + it('should forbid retry for invalid model ID errors', () => { + const error = new Error('Invalid model') + ;(error as any).reason = INVALID_MODEL_ID + + const result = classifier.classifyRetry({ error }) + + expect(result).to.equal(RetryAction.RetryForbidden) + }) + + it('should forbid retry for maximum chat content message', () => { + const error = new Error(MAXIMUM_CHAT_CONTENT_MESSAGE) + error.message = MAXIMUM_CHAT_CONTENT_MESSAGE + + const result = classifier.classifyRetry({ error }) + + expect(result).to.equal(RetryAction.RetryForbidden) + }) + + it('should forbid retry for monthly limit errors', () => { + const error = new Error('Monthly limit exceeded') + ;(error as any).reason = MONTHLY_LIMIT_ERROR_MARKER + const context = { + error, + response: { + status: 400, + body: `Error: ${MONTHLY_LIMIT_ERROR_MARKER} exceeded`, + }, + } + + const result = classifier.classifyRetry(context) + + expect(result).to.equal(RetryAction.RetryForbidden) + }) + + it('should classify throttling for service overloaded errors', () => { + const context = { + error: new Error('Service unavailable'), + response: { + status: 500, + body: HIGH_LOAD_ERROR_MESSAGE, + }, + } + + const result = classifier.classifyRetry(context) + + expect(result).to.equal(RetryAction.ThrottlingError) + }) + + it('should classify throttling for 429 status with model capacity', () => { + const error = new Error('Model unavailable') + ;(error as any).$metadata = { httpStatusCode: 429 } + ;(error as any).reason = INSUFFICIENT_MODEL_CAPACITY + + const result = classifier.classifyRetry({ error }) + + expect(result).to.equal(RetryAction.ThrottlingError) + }) + + it('should return no action for unknown errors', () => { + const error = new Error('Unknown error') + + const result = classifier.classifyRetry({ error }) + + expect(result).to.equal(RetryAction.NoActionIndicated) + }) + + it('should handle errors without response body', () => { + const error = new Error('Network error') + + const result = classifier.classifyRetry({ error }) + + expect(result).to.equal(RetryAction.NoActionIndicated) + }) + + it('should extract response body from different error formats', () => { + const classifier = new QRetryClassifier() + + // Test different body extraction paths - these should NOT trigger monthly limit errors + // since monthly limit detection now uses error.reason instead of body content + const context1 = { + error: { + cause: { $metadata: { body: MONTHLY_LIMIT_ERROR_MARKER } }, + }, + } + expect(classifier.classifyRetry(context1)).to.equal(RetryAction.NoActionIndicated) + + const context2 = { + error: { + $metadata: { body: MONTHLY_LIMIT_ERROR_MARKER }, + }, + } + expect(classifier.classifyRetry(context2)).to.equal(RetryAction.NoActionIndicated) + + const context3 = { + error: { + message: `${MONTHLY_LIMIT_ERROR_MARKER} exceeded`, + }, + } + expect(classifier.classifyRetry(context3)).to.equal(RetryAction.NoActionIndicated) + }) + }) + + describe('extractResponseBody', () => { + it('should extract body from Uint8Array', () => { + const classifier = new QRetryClassifier() + const body = new TextEncoder().encode('test body') + const context = { + error: {}, + response: { body }, + } + + const result = (classifier as any).extractResponseBody(context) + + expect(result).to.equal('test body') + }) + + it('should extract body from ArrayBuffer', () => { + const classifier = new QRetryClassifier() + const body = new TextEncoder().encode('test body').buffer + const context = { + error: { body }, + } + + const result = (classifier as any).extractResponseBody(context) + + expect(result).to.equal('test body') + }) + + it('should extract body from object', () => { + const classifier = new QRetryClassifier() + const body = { message: 'test' } + const context = { + error: { body }, + } + + const result = (classifier as any).extractResponseBody(context) + + expect(result).to.equal('{"message":"test"}') + }) + + it('should handle extraction errors gracefully', () => { + const classifier = new QRetryClassifier() + + // Test extractTextFromBody error handling + const bodyThatThrows = { + get toString() { + throw new Error('Access denied') + }, + } + + const result = (classifier as any).extractTextFromBody(bodyThatThrows) + expect(result).to.be.null + }) + }) + + describe('name and priority', () => { + it('should return correct name', () => { + expect(classifier.name()).to.equal('Q Language Server Retry Classifier') + }) + + it('should return correct priority', () => { + expect(classifier.priority().value).to.equal(100) + expect(QRetryClassifier.priority().value).to.equal(100) + }) + }) + + describe('isMonthlyLimitError', () => { + it('should log debug messages for monthly limit detection', () => { + const classifierWithLogging = new QRetryClassifier(mockLogging) + const error = { reason: MONTHLY_LIMIT_ERROR_MARKER } + + const result = (classifierWithLogging as any).isMonthlyLimitError(error) + + expect(result).to.be.true + expect(mockLogging.debug.called).to.be.true + }) + }) + + describe('isServiceOverloadedError', () => { + it('should log debug messages for service overloaded detection', () => { + const classifierWithLogging = new QRetryClassifier(mockLogging) + const context = { + error: { $metadata: { httpStatusCode: 500 } }, + response: { status: 500 }, + } + + const result = (classifierWithLogging as any).isServiceOverloadedError(context, HIGH_LOAD_ERROR_MESSAGE) + + expect(result).to.be.true + expect(mockLogging.debug.called).to.be.true + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/retryClassifier.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/retryClassifier.ts new file mode 100644 index 0000000000..1940113ad5 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/retry/retryClassifier.ts @@ -0,0 +1,166 @@ +import { Logging } from '@aws/language-server-runtimes/server-interface' +import { isRequestAbortedError, isInputTooLongError, isThrottlingRelated } from '../errors' +import { + MONTHLY_LIMIT_ERROR_MARKER, + HIGH_LOAD_ERROR_MESSAGE, + SERVICE_UNAVAILABLE_EXCEPTION, + HTTP_STATUS_INTERNAL_SERVER_ERROR, + INSUFFICIENT_MODEL_CAPACITY, + CONTENT_LENGTH_EXCEEDS_THRESHOLD, + INVALID_MODEL_ID, + MAXIMUM_CHAT_CONTENT_MESSAGE, +} from '../constants/constants' + +export enum RetryAction { + NoActionIndicated = 'no_action', + RetryForbidden = 'retry_forbidden', + ThrottlingError = 'throttling_error', +} + +export interface RetryClassifierPriority { + value: number +} + +export interface InterceptorContext { + error: any + response?: { + status?: number + body?: string | Uint8Array + } +} + +/** + * Retry classifier that matches CLI's QCliRetryClassifier behavior. + * Runs after AWS SDK's transient error classifier with higher priority. + */ +export class QRetryClassifier { + private logging?: Logging + + constructor(logging?: Logging) { + this.logging = logging + } + + static priority(): RetryClassifierPriority { + // Run after transient error classifier (higher priority number) + return { value: 100 } + } + + classifyRetry(context: InterceptorContext): RetryAction { + const error = context.error + + // Handle non-retryable errors first (matching original + enhanced detection) + if ( + error?.name === 'AccessDeniedException' || + error?.name === 'SERVICE_QUOTA_EXCEPTION' || + error?.name === 'AbortError' || + error?.code === 'RequestAborted' || + error?.name === 'RequestAborted' || + isRequestAbortedError(error) + ) { + return RetryAction.RetryForbidden + } + + if ( + error?.reason === CONTENT_LENGTH_EXCEEDS_THRESHOLD || + isInputTooLongError(error) || + error?.reason === INVALID_MODEL_ID + ) { + return RetryAction.RetryForbidden + } + + // Check for monthly limit error in error object + if (this.isMonthlyLimitError(error)) { + return RetryAction.RetryForbidden + } + + if (error?.message === MAXIMUM_CHAT_CONTENT_MESSAGE) { + return RetryAction.RetryForbidden + } + + const bodyStr = this.extractResponseBody(context) + if (bodyStr && this.isServiceOverloadedError(context, bodyStr)) { + return RetryAction.ThrottlingError + } + + // Check for model capacity issues + const status = context.response?.status || context.error?.$metadata?.httpStatusCode + if (status === 429 && error?.reason === INSUFFICIENT_MODEL_CAPACITY) { + return RetryAction.ThrottlingError + } + + // Check for throttling related errors (from errors.ts) + if (isThrottlingRelated(error)) { + return RetryAction.ThrottlingError + } + + return RetryAction.NoActionIndicated + } + + private extractResponseBody(context: InterceptorContext): string | null { + // Try context response first + const contextBody = this.extractTextFromBody(context.response?.body) + if (contextBody) return contextBody + + // Fallback to error-based extraction + const error = context.error + return ( + error?.message || + this.extractTextFromBody(error?.cause?.$metadata?.body) || + this.extractTextFromBody(error?.$metadata?.body) || + this.extractTextFromBody(error?.cause?.body) || + this.extractTextFromBody(error?.body) || + this.extractTextFromBody(error?.response?.data) || + this.extractTextFromBody(error?.response?.body) || + null + ) + } + + private extractTextFromBody(body: any): string | null { + try { + if (typeof body === 'string') { + return body + } + if (body instanceof Uint8Array) { + const decoded = new TextDecoder('utf-8', { fatal: false }).decode(body) + return decoded || null + } + if (body instanceof ArrayBuffer) { + return new TextDecoder('utf-8', { fatal: false }).decode(body) + } + if (typeof body === 'object' && body !== null) { + return JSON.stringify(body) + } + return null + } catch { + return null + } + } + + private isMonthlyLimitError(error: any): boolean { + const isMonthlyLimit = error?.reason === MONTHLY_LIMIT_ERROR_MARKER + this.logging?.debug(`QRetryClassifier: Monthly limit error detected: ${isMonthlyLimit}`) + return isMonthlyLimit + } + + private isServiceOverloadedError(context: InterceptorContext, bodyStr: string): boolean { + const status = context.response?.status || context.error?.status || context.error?.$metadata?.httpStatusCode + + if (status !== HTTP_STATUS_INTERNAL_SERVER_ERROR) { + return false + } + + const isOverloaded = + bodyStr.includes(HIGH_LOAD_ERROR_MESSAGE) || bodyStr.includes(SERVICE_UNAVAILABLE_EXCEPTION) + + this.logging?.debug(`QRetryClassifier: Service overloaded error detected (status 500): ${isOverloaded}`) + return isOverloaded + } + + name(): string { + return 'Q Language Server Retry Classifier' + } + + priority(): RetryClassifierPriority { + return QRetryClassifier.priority() + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tabBarController.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tabBarController.test.ts index fecbdebe13..1df34c2162 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tabBarController.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tabBarController.test.ts @@ -15,6 +15,8 @@ import { ChatHistoryActionType } from '../../shared/telemetry/types' import { TelemetryService } from '../../shared/telemetry/telemetryService' import { URI } from 'vscode-uri' +const JUPYTERLAB_APP_TYPE_VALUE = 'jupyterlab' + describe('TabBarController', () => { let testFeatures: TestFeatures let chatHistoryDb: ChatDatabase @@ -50,6 +52,7 @@ describe('TabBarController', () => { afterEach(() => { sinon.restore() clock.restore() + delete process.env.SAGEMAKER_APP_TYPE_LOWERCASE // Clean up JupyterLab environment variables testFeatures.dispose() }) @@ -540,7 +543,7 @@ describe('TabBarController', () => { }) }) - it('should only load chats once', async () => { + it('should only load chats once in non-JupyterLab environments', async () => { const mockTabs = [{ historyId: 'history1', conversations: [{ messages: [] }] }] as unknown as Tab[] ;(chatHistoryDb.getOpenTabs as sinon.SinonStub).returns(mockTabs) @@ -559,6 +562,22 @@ describe('TabBarController', () => { result: 'Succeeded', }) }) + + it('should allow multiple loads in JupyterLab environment', async () => { + // Set JupyterLab environment + process.env.SAGEMAKER_APP_TYPE_LOWERCASE = JUPYTERLAB_APP_TYPE_VALUE + + const mockTabs = [{ historyId: 'history1', conversations: [{ messages: [] }] }] as unknown as Tab[] + ;(chatHistoryDb.getOpenTabs as sinon.SinonStub).returns(mockTabs) + + const restoreTabStub = sinon.stub(tabBarController, 'restoreTab') + + await tabBarController.loadChats() + await tabBarController.loadChats() // Second call should NOT be ignored in JupyterLab + + sinon.assert.calledTwice(restoreTabStub) + sinon.assert.calledTwice(telemetryService.emitLoadHistory as sinon.SinonStub) + }) }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tabBarController.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tabBarController.ts index 62f5b2ab0b..6ba6da3508 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tabBarController.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tabBarController.ts @@ -22,6 +22,7 @@ import { ChatHistoryActionType } from '../../shared/telemetry/types' import { CancellationError } from '@aws/lsp-core' const MaxRestoredHistoryMessages = 250 +const JUPYTERLAB_APP_TYPE_VALUE = 'jupyterlab' /** * Controller for managing chat history and export functionality. @@ -313,10 +314,17 @@ export class TabBarController { * When IDE is opened, restore chats that were previously open in IDE for the current workspace. */ async loadChats() { - if (this.#loadedChats) { + const isJupyterLab = this.isJupyterLabEnvironment() + + // For non-JupyterLab environments, prevent multiple loads + if (!isJupyterLab && this.#loadedChats) { return } - this.#loadedChats = true + + if (!isJupyterLab) { + this.#loadedChats = true + } + const openConversations = this.#chatHistoryDb.getOpenTabs() if (openConversations) { for (const conversation of openConversations) { @@ -332,6 +340,18 @@ export class TabBarController { } } + /** + * Determines if the environment is JupyterLab. + */ + private isJupyterLabEnvironment(): boolean { + try { + return process.env.SAGEMAKER_APP_TYPE_LOWERCASE === JUPYTERLAB_APP_TYPE_VALUE + } catch (error) { + this.#features.logging.error(`Failed to read SAGEMAKER_APP_TYPE_LOWERCASE environment variable: ${error}`) + return false + } + } + public static enableChatExport(params?: InitializeParams) { if (params?.initializationOptions?.aws?.awsClientCapabilities?.window?.showSaveFileDialog) { // Export Chat UX flow relies on show Save File dialog protocol supported by client diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/chatDb.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/chatDb.test.ts index f4f61f955b..2c0e07baff 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/chatDb.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/chatDb.test.ts @@ -57,7 +57,7 @@ describe('ChatDatabase', () => { }, } as unknown as Features - chatDb = new ChatDatabase(mockFeatures) + chatDb = ChatDatabase.getInstance(mockFeatures) }) afterEach(() => { @@ -91,30 +91,6 @@ describe('ChatDatabase', () => { }) }) - describe('replaceHistory', () => { - it('should replace history with messages', async () => { - await chatDb.databaseInitialize(0) - const tabId = 'tab-1' - const tabType = 'cwc' - const conversationId = 'conv-1' - const messages = [ - { body: 'Test', type: 'prompt' as any, timestamp: new Date() }, - { body: 'Thinking...', type: 'answer', timestamp: new Date() }, - ] - - // Call the method - chatDb.replaceHistory(tabId, tabType, conversationId, messages) - - // Verify the messages array contains the summary and a dummy response - const messagesFromDb = chatDb.getMessages(tabId, 250) - assert.strictEqual(messagesFromDb.length, 2) - assert.strictEqual(messagesFromDb[0].body, 'Test') - assert.strictEqual(messagesFromDb[0].type, 'prompt') - assert.strictEqual(messagesFromDb[1].body, 'Thinking...') - assert.strictEqual(messagesFromDb[1].type, 'answer') - }) - }) - describe('ensureValidMessageSequence', () => { it('should preserve valid alternating sequence', () => { const messages: Message[] = [ @@ -665,6 +641,73 @@ describe('ChatDatabase', () => { ) }) }) + + describe('Model Cache Management', () => { + beforeEach(async () => { + await chatDb.databaseInitialize(0) + }) + + it('should cache and retrieve models', () => { + const models = [{ id: 'model-1', name: 'Test Model' }] + const defaultModelId = 'model-1' + + chatDb.setCachedModels(models, defaultModelId) + const cached = chatDb.getCachedModels() + + assert.ok(cached, 'Should return cached data') + assert.deepStrictEqual(cached.models, models) + assert.strictEqual(cached.defaultModelId, defaultModelId) + assert.ok(cached.timestamp > 0, 'Should have timestamp') + }) + + it('should validate cache expiry', () => { + const models = [{ id: 'model-1', name: 'Test Model' }] + chatDb.setCachedModels(models) + + // Mock isCachedValid to return false (expired) + const isCachedValidStub = sinon.stub(util, 'isCachedValid').returns(false) + + assert.strictEqual(chatDb.isCachedModelsValid(), false) + + isCachedValidStub.restore() + }) + + it('should clear cached models', () => { + const models = [{ id: 'model-1', name: 'Test Model' }] + chatDb.setCachedModels(models) + + // Verify cache exists + assert.ok(chatDb.getCachedModels(), 'Cache should exist before clearing') + + chatDb.clearCachedModels() + + // Verify cache is cleared + assert.strictEqual(chatDb.getCachedModels(), undefined, 'Cache should be cleared') + }) + + it('should clear model cache via static method when instance exists', () => { + const models = [{ id: 'model-1', name: 'Test Model' }] + chatDb.setCachedModels(models) + + // Verify cache exists + assert.ok(chatDb.getCachedModels(), 'Cache should exist before clearing') + + ChatDatabase.clearModelCache() + + // Verify cache is cleared + assert.strictEqual(chatDb.getCachedModels(), undefined, 'Cache should be cleared via static method') + }) + + it('should handle static clearModelCache when no instance exists', () => { + // Close current instance + chatDb.close() + + // Should not throw when no instance exists + assert.doesNotThrow(() => { + ChatDatabase.clearModelCache() + }, 'Should not throw when no instance exists') + }) + }) }) function uuid(): `${string}-${string}-${string}-${string}-${string}` { throw new Error('Function not implemented.') diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/chatDb.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/chatDb.ts index dfcf21308c..abd49a52eb 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/chatDb.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/chatDb.ts @@ -24,11 +24,12 @@ import { getMd5WorkspaceId, MessagesWithCharacterCount, estimateCharacterCountFromImageBlock, + isCachedValid, } from './util' import * as crypto from 'crypto' import * as path from 'path' import { Features } from '@aws/language-server-runtimes/server-interface/server' -import { ContextCommand, ConversationItemGroup } from '@aws/language-server-runtimes/protocol' +import { ContextCommand, ConversationItemGroup, Model } from '@aws/language-server-runtimes/protocol' import { ChatMessage, ToolResultStatus } from '@amzn/codewhisperer-streaming' import { ChatItemType } from '@aws/mynah-ui' import { getUserHomeDir } from '@aws/lsp-core/out/util/path' @@ -43,11 +44,6 @@ export class ToolResultValidationError extends Error { } export const EMPTY_CONVERSATION_LIST_ID = 'empty' -// Maximum number of characters to keep in request -// (200K tokens - 8K output tokens - 2k system prompt) * 3 = 570K characters, intentionally overestimating with 3:1 ratio -export const MaxOverallCharacters = 570_000 -// Maximum number of history messages to include in each request to the LLM -const maxConversationHistoryMessages = 250 /** * A singleton database class that manages chat history persistence using LokiJS. @@ -122,6 +118,12 @@ export class ChatDatabase { return ChatDatabase.#instance } + public static clearModelCache(): void { + if (ChatDatabase.#instance) { + ChatDatabase.#instance.clearCachedModels() + } + } + public close() { this.#db.close() ChatDatabase.#instance = undefined @@ -634,50 +636,6 @@ export class ChatDatabase { } } - /** - * Replace history with summary/dummyResponse pair within a specified tab. - * - * This method manages chat messages by creating a new history with compacted summary and dummy response pairs - */ - replaceHistory(tabId: string, tabType: TabType, conversationId: string, messages: Message[]) { - if (this.isInitialized()) { - const clientType = this.#features.lsp.getClientInitializeParams()?.clientInfo?.name || 'unknown' - const tabCollection = this.#db.getCollection(TabCollection) - - this.#features.logging.log( - `Update history with new messages: tabId=${tabId}, tabType=${tabType}, conversationId=${conversationId}` - ) - - const oldHistoryId = this.getOrCreateHistoryId(tabId) - // create a new historyId to start fresh - const historyId = this.createHistoryId(tabId) - - const tabData = historyId ? tabCollection.findOne({ historyId }) : undefined - const tabTitle = tabData?.title || 'Amazon Q Chat' - messages = messages.map(msg => this.formatChatHistoryMessage(msg)) - this.#features.logging.log(`Overriding tab with new historyId=${historyId}`) - tabCollection.insert({ - historyId, - updatedAt: new Date(), - isOpen: true, - tabType: tabType, - title: tabTitle, - conversations: [ - { - conversationId, - clientType, - updatedAt: new Date(), - messages: messages, - }, - ], - }) - - if (oldHistoryId) { - tabCollection.findAndRemove({ historyId: oldHistoryId }) - } - } - } - formatChatHistoryMessage(message: Message): Message { if (message.type === ('prompt' as ChatItemType)) { let hasToolResults = false @@ -699,15 +657,12 @@ export class ChatDatabase { /** * Prepare the history messages for service request and fix the persisted history in DB to maintain the following invariants: - * 1. The history contains at most MaxConversationHistoryMessages messages. Oldest messages are dropped. - * 2. The first message is from the user and without any tool usage results, and the last message is from the assistant. + * 1. The first message is from the user and without any tool usage results, and the last message is from the assistant. * The history contains alternating sequene of userMessage followed by assistantMessages - * 3. The toolUse and toolResult relationship is valid - * 4. The history character length is <= MaxConversationHistoryCharacters - newUserMessageCharacterCount. Oldest messages are dropped. + * 2. The toolUse and toolResult relationship is valid */ fixAndGetHistory( tabId: string, - conversationId: string, newUserMessage: ChatMessage, pinnedContextMessages: ChatMessage[] ): MessagesWithCharacterCount { @@ -723,18 +678,19 @@ export class ChatDatabase { this.#features.logging.info(`Fixing history: tabId=${tabId}`) - // 1. Make sure the length of the history messages don't exceed MaxConversationHistoryMessages - let allMessages = this.getMessages(tabId, maxConversationHistoryMessages) + let allMessages = this.getMessages(tabId) if (allMessages.length > 0) { - // 2. Fix history: Ensure messages in history is valid for server side checks + // 1. Fix history: Ensure messages in history is valid for server side checks this.ensureValidMessageSequence(tabId, allMessages) - // 3. Fix new user prompt: Ensure lastMessage in history toolUse and newMessage toolResult relationship is valid + // 2. Fix new user prompt: Ensure lastMessage in history toolUse and newMessage toolResult relationship is valid this.validateAndFixNewMessageToolResults(allMessages, newUserMessage) - // 4. NOTE: Keep this trimming logic at the end of the preprocess. - // Make sure max characters ≤ remaining Character Budget, must be put at the end of preprocessing - messagesWithCount = this.trimMessagesToMaxLength(allMessages, newUserInputCount, tabId, conversationId) + messagesWithCount = { + history: allMessages, + historyCount: this.calculateMessagesCharacterCount(allMessages), + currentCount: newUserInputCount, + } // Edge case: If the history is empty and the next message contains tool results, then we have to just abandon them. if ( @@ -763,74 +719,11 @@ export class ChatDatabase { return messagesWithCount } - /** - * Finds a suitable "break point" index in the message sequence. - * - * It ensures that the "break point" is at a clean conversation boundary where: - * 1. The message is from a user (type === 'prompt') - * 2. The message doesn't contain tool results that would break tool use/result pairs - * 3. The message has a non-empty body - * - * @param allMessages The array of conversation messages to search through - * @returns The index to trim from, or undefined if no suitable trimming point is found - */ - private findIndexToTrim(allMessages: Message[]): number | undefined { - for (let i = 2; i < allMessages.length; i++) { - const message = allMessages[i] - if (message.type === ('prompt' as ChatItemType) && this.isValidUserMessageWithoutToolResults(message)) { - return i - } - } - return undefined - } - private isValidUserMessageWithoutToolResults(message: Message): boolean { const ctx = message.userInputMessageContext return !!ctx && (!ctx.toolResults || ctx.toolResults.length === 0) && message.body !== '' } - private trimMessagesToMaxLength( - messages: Message[], - newUserInputCount: number, - tabId: string, - conversationId: string - ): MessagesWithCharacterCount { - let historyCharacterCount = this.calculateMessagesCharacterCount(messages) - const maxHistoryCharacterSize = Math.max(0, MaxOverallCharacters - newUserInputCount) - let trimmedHistory = false - this.#features.logging.debug( - `Current history character count: ${historyCharacterCount}, remaining history character budget: ${maxHistoryCharacterSize}` - ) - while (historyCharacterCount > maxHistoryCharacterSize && messages.length > 2) { - trimmedHistory = true - // Find the next valid user message to start from - const indexToTrim = this.findIndexToTrim(messages) - if (indexToTrim !== undefined && indexToTrim > 0) { - this.#features.logging.debug( - `Removing the first ${indexToTrim} elements in the history due to character count limit` - ) - messages.splice(0, indexToTrim) - } else { - this.#features.logging.debug( - 'Could not find a valid point to trim, reset history to reduce character count' - ) - this.replaceHistory(tabId, 'cwc', conversationId, []) - return { history: [], historyCount: 0, currentCount: newUserInputCount } - } - historyCharacterCount = this.calculateMessagesCharacterCount(messages) - this.#features.logging.debug(`History character count post trimming: ${historyCharacterCount}`) - } - - if (trimmedHistory) { - this.replaceHistory(tabId, 'cwc', conversationId, messages) - } - return { - history: messages, - historyCount: historyCharacterCount, - currentCount: newUserInputCount, - } - } - private calculateToolSpecCharacterCount(currentMessage: ChatMessage): number { let count = 0 if (currentMessage.userInputMessage?.userInputMessageContext?.tools) { @@ -1084,6 +977,48 @@ export class ChatDatabase { this.updateSettings({ modelId: modelId === '' ? undefined : modelId }) } + getCachedModels(): { models: Model[]; defaultModelId?: string; timestamp: number } | undefined { + const settings = this.getSettings() + if (settings?.cachedModels && settings?.modelCacheTimestamp) { + return { + models: settings.cachedModels, + defaultModelId: settings.cachedDefaultModelId, + timestamp: settings.modelCacheTimestamp, + } + } + return undefined + } + + setCachedModels(models: Model[], defaultModelId?: string): void { + const currentTimestamp = Date.now() + // Get existing settings to preserve fields like modelId + const existingSettings = this.getSettings() || { modelId: undefined } + this.updateSettings({ + ...existingSettings, + cachedModels: models, + cachedDefaultModelId: defaultModelId, + modelCacheTimestamp: currentTimestamp, + }) + this.#features.logging.log(`Models cached at timestamp: ${currentTimestamp}`) + } + + isCachedModelsValid(): boolean { + const cachedData = this.getCachedModels() + if (!cachedData) return false + return isCachedValid(cachedData.timestamp) + } + + clearCachedModels(): void { + const existingSettings = this.getSettings() || { modelId: undefined } + this.updateSettings({ + ...existingSettings, + cachedModels: undefined, + cachedDefaultModelId: undefined, + modelCacheTimestamp: undefined, + }) + this.#features.logging.log('Model cache cleared') + } + getPairProgrammingMode(): boolean | undefined { const settings = this.getSettings() return settings?.pairProgrammingMode diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/util.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/util.ts index 8f3f46b9f4..77496cd96b 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/util.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/chatDb/util.ts @@ -10,6 +10,7 @@ import { ConversationItem, ConversationItemGroup, IconType, + Model, ReferenceTrackerInformation, } from '@aws/language-server-runtimes/server-interface' import { @@ -84,6 +85,9 @@ export type Rules = { export type Settings = { modelId: string | undefined pairProgrammingMode?: boolean + cachedModels?: Model[] + cachedDefaultModelId?: string + modelCacheTimestamp?: number } export type Conversation = { @@ -131,6 +135,14 @@ export type MessagesWithCharacterCount = { currentCount: number } +export function isCachedValid(timestamp: number): boolean { + const currentTime = Date.now() + const cacheAge = currentTime - timestamp + const CACHE_TTL = 30 * 60 * 1000 // 30 minutes in milliseconds + + return cacheAge < CACHE_TTL +} + /** * Converts Message to codewhisperer-streaming ChatMessage */ diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/fileSearch.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/fileSearch.ts index fb6486996e..37d11afe4f 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/fileSearch.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/fileSearch.ts @@ -158,3 +158,7 @@ export class FileSearch { } as const } } + +export function isFileSearchParams(input: any): input is FileSearchParams { + return input && typeof input.path === 'string' && typeof input.queryName === 'string' +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/fsRead.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/fsRead.ts index aeca19013b..f322e570ee 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/fsRead.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/fsRead.ts @@ -1,6 +1,7 @@ import { sanitize } from '@aws/lsp-core/out/util/path' import { CommandValidation, InvokeOutput, requiresPathAcceptance, validatePath } from './toolShared' import { Features } from '@aws/language-server-runtimes/server-interface/server' +import { FSREAD_MAX_PER_FILE, FSREAD_MAX_TOTAL } from '../constants/constants' export interface FsReadParams { paths: string[] @@ -13,16 +14,24 @@ export interface FileReadResult { } export class FsRead { - static maxResponseSize = 200_000 - static maxResponseSizeTotal = 400_000 + static maxResponseSize = FSREAD_MAX_PER_FILE + static maxResponseSizeTotal = FSREAD_MAX_TOTAL private readonly logging: Features['logging'] private readonly workspace: Features['workspace'] private readonly lsp: Features['lsp'] + private readonly maxPerFile: number + private readonly maxTotal: number - constructor(features: Pick & Partial) { + constructor( + features: Pick & Partial, + maxPerFile?: number, + maxTotal?: number + ) { this.logging = features.logging this.workspace = features.workspace this.lsp = features.lsp + this.maxPerFile = maxPerFile ?? FsRead.maxResponseSize + this.maxTotal = maxTotal ?? FsRead.maxResponseSizeTotal } public async validate(params: FsReadParams): Promise { @@ -62,16 +71,16 @@ export class FsRead { private createOutput(fileResult: FileReadResult[]): InvokeOutput { let totalSize = 0 for (const result of fileResult) { - const exceedsMaxSize = result.content.length > FsRead.maxResponseSize + const exceedsMaxSize = result.content.length > this.maxPerFile if (exceedsMaxSize) { - this.logging.info(`FsRead: truncating ${result.path} to first ${FsRead.maxResponseSize} characters`) - result.content = result.content.substring(0, FsRead.maxResponseSize - 3) + '...' + this.logging.info(`FsRead: truncating ${result.path} to first ${this.maxPerFile} characters`) + result.content = result.content.substring(0, this.maxPerFile - 3) + '...' result.truncated = true } totalSize += result.content.length } - if (totalSize > FsRead.maxResponseSizeTotal) { + if (totalSize > this.maxTotal) { throw Error('Files are too large, please break the file read into smaller chunks') } diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/agentPermissionManager.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/agentPermissionManager.test.ts new file mode 100644 index 0000000000..b120a11fe4 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/agentPermissionManager.test.ts @@ -0,0 +1,218 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +import { expect } from 'chai' +import { AgentPermissionManager } from './agentPermissionManager' +import { AgentConfig, McpPermissionType } from './mcpTypes' + +describe('AgentPermissionManager', () => { + let agentConfig: AgentConfig + let manager: AgentPermissionManager + + beforeEach(() => { + agentConfig = { + name: 'test-agent', + description: 'Test agent', + mcpServers: {}, + tools: [], + allowedTools: [], + } + manager = new AgentPermissionManager( + agentConfig, + undefined, // getAvailableTools + undefined, // getAllAvailableServers + undefined // getAllBuiltinTools + ) + }) + + describe('matchesPattern', () => { + it('matches exact patterns', () => { + expect(manager['matchesPattern']('tool1', 'tool1')).to.be.true + expect(manager['matchesPattern']('tool1', 'tool2')).to.be.false + }) + + it('matches wildcard patterns', () => { + expect(manager['matchesPattern']('tool1', '*')).to.be.true + expect(manager['matchesPattern']('tool1', 'tool*')).to.be.true + expect(manager['matchesPattern']('tool1', '*1')).to.be.true + expect(manager['matchesPattern']('tool1', 'to*l1')).to.be.true + expect(manager['matchesPattern']('tool1', 'foo*')).to.be.false + }) + + it('matches question mark patterns', () => { + expect(manager['matchesPattern']('tool1', 'tool?')).to.be.true + expect(manager['matchesPattern']('tool1', '?ool1')).to.be.true + expect(manager['matchesPattern']('tool1', 'tool??')).to.be.false + }) + + it('escapes regex special characters', () => { + expect(manager['matchesPattern']('tool.1', 'tool.1')).to.be.true + expect(manager['matchesPattern']('tool+1', 'tool+1')).to.be.true + expect(manager['matchesPattern']('tool[1]', 'tool[1]')).to.be.true + }) + }) + + describe('isToolEnabled', () => { + it('returns true for exact tool matches', () => { + agentConfig.tools = ['tool1', '@server/tool2'] + expect(manager.isToolEnabled('', 'tool1')).to.be.true + expect(manager.isToolEnabled('server', 'tool2')).to.be.true + }) + + it('returns true for server prefix matches', () => { + agentConfig.tools = ['@server'] + expect(manager.isToolEnabled('server', 'tool1')).to.be.true + }) + + it('returns true for wildcard matches', () => { + agentConfig.tools = ['*'] + expect(manager.isToolEnabled('server', 'tool1')).to.be.true + + agentConfig.tools = ['tool*'] + expect(manager.isToolEnabled('', 'tool1')).to.be.true + expect(manager.isToolEnabled('', 'foo1')).to.be.false + }) + + it('returns false for non-matching tools', () => { + agentConfig.tools = ['tool1'] + expect(manager.isToolEnabled('', 'tool2')).to.be.false + expect(manager.isToolEnabled('server', 'tool1')).to.be.false + }) + }) + + describe('isToolAlwaysAllowed', () => { + it('returns true for exact tool matches', () => { + agentConfig.allowedTools = ['tool1', '@server/tool2'] + expect(manager.isToolAlwaysAllowed('', 'tool1')).to.be.true + expect(manager.isToolAlwaysAllowed('server', 'tool2')).to.be.true + }) + + it('returns true for server prefix matches', () => { + agentConfig.allowedTools = ['@server'] + expect(manager.isToolAlwaysAllowed('server', 'tool1')).to.be.true + }) + + it('returns true for wildcard matches', () => { + agentConfig.allowedTools = ['tool*'] + expect(manager.isToolAlwaysAllowed('', 'tool1')).to.be.true + expect(manager.isToolAlwaysAllowed('', 'foo1')).to.be.false + }) + + it('returns false for non-matching tools', () => { + agentConfig.allowedTools = ['tool1'] + expect(manager.isToolAlwaysAllowed('', 'tool2')).to.be.false + }) + }) + + describe('getToolPermission', () => { + it('returns alwaysAllow for always allowed tools', () => { + agentConfig.allowedTools = ['tool1'] + expect(manager.getToolPermission('', 'tool1')).to.equal(McpPermissionType.alwaysAllow) + }) + + it('returns ask for enabled but not always allowed tools', () => { + agentConfig.tools = ['tool1'] + expect(manager.getToolPermission('', 'tool1')).to.equal(McpPermissionType.ask) + }) + + it('returns deny for non-enabled tools', () => { + expect(manager.getToolPermission('', 'tool1')).to.equal(McpPermissionType.deny) + }) + + it('prioritizes alwaysAllow over enabled', () => { + agentConfig.tools = ['tool1'] + agentConfig.allowedTools = ['tool1'] + expect(manager.getToolPermission('', 'tool1')).to.equal(McpPermissionType.alwaysAllow) + }) + }) + + describe('setToolPermission', () => { + it('sets deny permission correctly', () => { + agentConfig.tools = ['tool1'] + agentConfig.allowedTools = ['tool1'] + + manager.setToolPermission('', 'tool1', McpPermissionType.deny) + + expect(agentConfig.tools).to.not.include('tool1') + expect(agentConfig.allowedTools).to.not.include('tool1') + }) + + it('sets ask permission correctly', () => { + manager.setToolPermission('', 'tool1', McpPermissionType.ask) + + expect(agentConfig.tools).to.include('tool1') + expect(agentConfig.allowedTools).to.not.include('tool1') + }) + + it('sets alwaysAllow permission correctly', () => { + manager.setToolPermission('', 'tool1', McpPermissionType.alwaysAllow) + + expect(agentConfig.tools).to.include('tool1') + expect(agentConfig.allowedTools).to.include('tool1') + }) + + it('removes conflicting wildcards', () => { + agentConfig.tools = ['tool*'] + agentConfig.allowedTools = ['tool*'] + + manager.setToolPermission('', 'tool1', McpPermissionType.deny) + + expect(agentConfig.tools).to.not.include('tool*') + expect(agentConfig.allowedTools).to.not.include('tool*') + }) + + it('handles server-scoped tools', () => { + manager.setToolPermission('server', 'tool1', McpPermissionType.ask) + + expect(agentConfig.tools).to.include('@server/tool1') + }) + }) + + describe('setServerPermission', () => { + it('sets deny permission for entire server', () => { + agentConfig.tools = ['@server', '@server/tool1'] + agentConfig.allowedTools = ['@server/tool2'] + + manager.setServerPermission('server', McpPermissionType.deny) + + expect(agentConfig.tools).to.not.include('@server') + expect(agentConfig.tools).to.not.include('@server/tool1') + expect(agentConfig.allowedTools).to.not.include('@server/tool2') + }) + + it('sets ask permission for entire server', () => { + manager.setServerPermission('server', McpPermissionType.ask) + + expect(agentConfig.tools).to.include('@server') + expect(agentConfig.allowedTools).to.not.include('@server') + }) + + it('sets alwaysAllow permission for entire server', () => { + manager.setServerPermission('server', McpPermissionType.alwaysAllow) + + expect(agentConfig.tools).to.include('@server') + expect(agentConfig.allowedTools).to.include('@server') + }) + + it('removes specific tools when setting server permission', () => { + agentConfig.tools = ['@server/tool1', '@server/tool2'] + agentConfig.allowedTools = ['@server/tool3'] + + manager.setServerPermission('server', McpPermissionType.ask) + + expect(agentConfig.tools).to.not.include('@server/tool1') + expect(agentConfig.tools).to.not.include('@server/tool2') + expect(agentConfig.allowedTools).to.not.include('@server/tool3') + expect(agentConfig.tools).to.include('@server') + }) + }) + + describe('getAgentConfig', () => { + it('returns the current agent config', () => { + const config = manager.getAgentConfig() + expect(config).to.equal(agentConfig) + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/agentPermissionManager.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/agentPermissionManager.ts new file mode 100644 index 0000000000..cb9e1c859e --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/agentPermissionManager.ts @@ -0,0 +1,501 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +import { AgentConfig, McpPermissionType } from './mcpTypes' + +/** + * Manages agent tool permissions with wildcard support for reading and simple patterns for writing + */ +export class AgentPermissionManager { + constructor( + private agentConfig: AgentConfig, + private getAvailableTools?: (serverName: string) => string[], + private getAllAvailableServers?: () => string[], + private getAllBuiltinTools?: () => string[] + ) {} + + /** + * Check if a tool matches a pattern using glob-style wildcards + */ + private matchesPattern(toolName: string, pattern: string): boolean { + // Handle exact matches first + if (pattern === toolName) return true + + // Convert glob pattern to regex + // Escape special regex characters except * and ? + const regexPattern = pattern + .replace(/[.+^${}()|[\]\\]/g, '\\$&') // Escape regex special chars + .replace(/\*/g, '.*') // * matches any sequence + .replace(/\?/g, '.') // ? matches single character + + const regex = new RegExp(`^${regexPattern}$`) + return regex.test(toolName) + } + + /** + * Check if a tool is enabled (in tools array) + */ + isToolEnabled(serverName: string, toolName: string): boolean { + const toolId = serverName ? `@${serverName}/${toolName}` : toolName + const serverPrefix = serverName ? `@${serverName}` : '' + + // Check exact matches first (exact matches take precedence) + if (this.agentConfig.tools.includes(toolId)) return true + if (serverPrefix && this.agentConfig.tools.includes(serverPrefix)) return true + + // Check for global wildcard + if (this.agentConfig.tools.includes('*')) return true + + // Check for @builtin pattern (built-in tools only) + if (!serverName && this.agentConfig.tools.includes('@builtin')) return true + + // Check wildcard patterns + for (const tool of this.agentConfig.tools) { + if (tool.includes('*') || tool.includes('?')) { + // For server patterns like @*-mcp, match against server prefix + if (serverName && tool.startsWith('@') && !tool.includes('/')) { + if (this.matchesPattern(serverPrefix, tool)) return true + } + // For full tool patterns + if (this.matchesPattern(toolId, tool)) return true + } + } + + return false + } + + /** + * Check if a tool is always allowed (in allowedTools array) + */ + isToolAlwaysAllowed(serverName: string, toolName: string): boolean { + const toolId = serverName ? `@${serverName}/${toolName}` : toolName + const serverPrefix = serverName ? `@${serverName}` : '' + + // Check exact matches first + if (this.agentConfig.allowedTools.includes(toolId)) return true + if (serverPrefix && this.agentConfig.allowedTools.includes(serverPrefix)) return true + + // Check wildcard patterns + for (const allowedTool of this.agentConfig.allowedTools) { + if (allowedTool.includes('*') || allowedTool.includes('?')) { + if (this.matchesPattern(toolId, allowedTool)) return true + } + } + + return false + } + + /** + * Get permission type for a tool + */ + getToolPermission(serverName: string, toolName: string): McpPermissionType { + const toolId = serverName ? `@${serverName}/${toolName}` : toolName + const serverPrefix = serverName ? `@${serverName}` : '' + + // Check exact matches first (exact matches take precedence over patterns) + const exactInTools = this.agentConfig.tools.includes(toolId) + const exactInAllowed = this.agentConfig.allowedTools.includes(toolId) + const serverInTools = serverPrefix && this.agentConfig.tools.includes(serverPrefix) + const serverInAllowed = serverPrefix && this.agentConfig.allowedTools.includes(serverPrefix) + + // If exact match in allowedTools or server-wide in allowedTools + if (exactInAllowed || serverInAllowed) { + return McpPermissionType.alwaysAllow + } + + // If exact match in tools, check if also in allowedTools patterns + if (exactInTools) { + const isAlwaysAllowed = this.isToolAlwaysAllowed(serverName, toolName) + return isAlwaysAllowed ? McpPermissionType.alwaysAllow : McpPermissionType.ask + } + + // If server-wide in tools, check if also in allowedTools patterns + if (serverInTools) { + const isAlwaysAllowed = this.isToolAlwaysAllowed(serverName, toolName) + return isAlwaysAllowed ? McpPermissionType.alwaysAllow : McpPermissionType.ask + } + + // Fall back to pattern matching + const isEnabled = this.isToolEnabled(serverName, toolName) + const isAlwaysAllowed = this.isToolAlwaysAllowed(serverName, toolName) + + // Tool must be enabled first before it can be always allowed + if (isEnabled && isAlwaysAllowed) { + return McpPermissionType.alwaysAllow + } + + if (isEnabled) { + return McpPermissionType.ask + } + + return McpPermissionType.deny + } + + /** + * Set permission for a tool - removes conflicting wildcards and replaces with explicit tools + */ + setToolPermission(serverName: string, toolName: string, permission: McpPermissionType): void { + const toolId = serverName ? `@${serverName}/${toolName}` : toolName + const serverPrefix = serverName ? `@${serverName}` : '' + + switch (permission) { + case McpPermissionType.deny: + this.removeConflictingWildcardsForDeny(serverName, toolName) + this.removeConflictingAllowedWildcardsForDeny(serverName, toolName) + break + + case McpPermissionType.ask: + this.removeConflictingAllowedWildcardsForAsk(serverName, toolName) + if (!this.isToolEnabled(serverName, toolName)) { + this.addTool(toolId) + } + break + + case McpPermissionType.alwaysAllow: + if (!this.isToolEnabled(serverName, toolName)) { + this.addTool(toolId) + } + if (!this.isToolAlwaysAllowed(serverName, toolName)) { + this.addToAllowedTools(toolId) + } + break + } + } + + /** + * Add tool to tools array + */ + private addTool(toolId: string): void { + if (!this.agentConfig.tools.includes(toolId)) { + this.agentConfig.tools.push(toolId) + } + } + + /** + * Remove tool from tools array + */ + private removeTool(toolId: string, serverPrefix?: string): void { + this.agentConfig.tools = this.agentConfig.tools.filter(tool => tool !== toolId && tool !== serverPrefix) + } + + /** + * Add tool to allowedTools array + */ + private addToAllowedTools(toolId: string): void { + if (!this.agentConfig.allowedTools.includes(toolId)) { + this.agentConfig.allowedTools.push(toolId) + } + } + + /** + * Remove tool from allowedTools array (only exact matches) + */ + private removeFromAllowedTools(toolId: string, serverPrefix?: string): void { + this.agentConfig.allowedTools = this.agentConfig.allowedTools.filter( + tool => tool !== toolId && tool !== serverPrefix + ) + } + + /** + * Set server-wide permission (uses @serverName pattern) + */ + setServerPermission(serverName: string, permission: McpPermissionType): void { + const serverPrefix = `@${serverName}` + + // Remove all specific tools from this server + this.agentConfig.tools = this.agentConfig.tools.filter(tool => !tool.startsWith(`${serverPrefix}/`)) + this.agentConfig.allowedTools = this.agentConfig.allowedTools.filter( + tool => !tool.startsWith(`${serverPrefix}/`) + ) + + switch (permission) { + case McpPermissionType.deny: + this.removeTool(serverPrefix, serverPrefix) + this.removeFromAllowedTools(serverPrefix, serverPrefix) + break + + case McpPermissionType.ask: + this.addTool(serverPrefix) + this.removeFromAllowedTools(serverPrefix, serverPrefix) + break + + case McpPermissionType.alwaysAllow: + this.addTool(serverPrefix) + this.addToAllowedTools(serverPrefix) + break + } + } + + /** + * Convert server-wide permission to individual tools, excluding the denied tool + */ + private convertServerWideToIndividualTools(serverName: string, deniedToolName: string): void { + const serverPrefix = `@${serverName}` + + // Remove server-wide permission + this.agentConfig.tools = this.agentConfig.tools.filter(tool => tool !== serverPrefix) + + // If we have a callback to get available tools, add them individually + if (this.getAvailableTools) { + const availableTools = this.getAvailableTools(serverName) + for (const toolName of availableTools) { + if (toolName !== deniedToolName) { + const toolId = `@${serverName}/${toolName}` + this.addTool(toolId) + } + } + } + // If no callback, we just remove server-wide permission (limitation) + } + + /** + * Remove conflicting wildcards from tools when denying a tool + */ + private removeConflictingWildcardsForDeny(serverName: string, toolName: string): void { + const toolId = serverName ? `@${serverName}/${toolName}` : toolName + const serverPrefix = serverName ? `@${serverName}` : '' + + // Handle global wildcard (*) + if (this.agentConfig.tools.includes('*')) { + this.expandGlobalWildcard(serverName, toolName) + } + + // Handle server-wide wildcard (@server) + if (serverPrefix && this.agentConfig.tools.includes(serverPrefix)) { + this.convertServerWideToIndividualTools(serverName, toolName) + } + + // Handle @builtin wildcard + if (!serverName && this.agentConfig.tools.includes('@builtin')) { + this.expandBuiltinWildcard(toolName) + } + + // Handle pattern wildcards + this.removeMatchingPatternWildcards(serverName, toolName) + + // Remove explicit tool entry + this.removeTool(toolId, serverPrefix) + } + + /** + * Remove conflicting wildcards from allowedTools when denying a tool + */ + private removeConflictingAllowedWildcardsForDeny(serverName: string, toolName: string): void { + const toolId = serverName ? `@${serverName}/${toolName}` : toolName + const serverPrefix = serverName ? `@${serverName}` : '' + + // Remove exact matches + this.agentConfig.allowedTools = this.agentConfig.allowedTools.filter( + tool => tool !== toolId && tool !== serverPrefix + ) + + // Remove matching wildcards and expand them + const toRemove: string[] = [] + for (const allowedTool of this.agentConfig.allowedTools) { + if (allowedTool.includes('*') || allowedTool.includes('?')) { + if (this.matchesPattern(toolId, allowedTool)) { + toRemove.push(allowedTool) + } + } + } + + for (const pattern of toRemove) { + this.expandAllowedPatternWildcard(pattern, serverName, toolName) + } + } + + /** + * Remove conflicting wildcards from allowedTools when setting to ask + */ + private removeConflictingAllowedWildcardsForAsk(serverName: string, toolName: string): void { + const toolId = serverName ? `@${serverName}/${toolName}` : toolName + const serverPrefix = serverName ? `@${serverName}` : '' + + // Remove exact matches + this.agentConfig.allowedTools = this.agentConfig.allowedTools.filter( + tool => tool !== toolId && tool !== serverPrefix + ) + + // Remove matching wildcards and expand them (excluding the tool being set to ask) + const toRemove: string[] = [] + for (const allowedTool of this.agentConfig.allowedTools) { + if (allowedTool.includes('*') || allowedTool.includes('?')) { + if (this.matchesPattern(toolId, allowedTool)) { + toRemove.push(allowedTool) + } + } + } + + for (const pattern of toRemove) { + this.expandAllowedPatternWildcard(pattern, serverName, toolName) + } + } + + /** + * Expand global wildcard (*) to all available tools except the denied one + */ + private expandGlobalWildcard(deniedServerName: string, deniedToolName: string): void { + this.agentConfig.tools = this.agentConfig.tools.filter(tool => tool !== '*') + + if (this.getAvailableTools) { + // Get all available servers (this should be provided by the manager) + const allServers = this.getAvailableServers() + for (const serverName of allServers) { + const tools = this.getAvailableTools(serverName) + for (const toolName of tools) { + if (!(serverName === deniedServerName && toolName === deniedToolName)) { + this.addTool(`@${serverName}/${toolName}`) + } + } + } + + // Add builtin tools (except denied one) + const builtinTools = this.getBuiltinTools() + for (const toolName of builtinTools) { + if (!(deniedServerName === '' && toolName === deniedToolName)) { + this.addTool(toolName) + } + } + } + } + + /** + * Expand @builtin wildcard to all builtin tools except the denied one + */ + private expandBuiltinWildcard(deniedToolName: string): void { + this.agentConfig.tools = this.agentConfig.tools.filter(tool => tool !== '@builtin') + + const builtinTools = this.getBuiltinTools() + for (const toolName of builtinTools) { + if (toolName !== deniedToolName) { + this.addTool(toolName) + } + } + } + + /** + * Remove pattern wildcards that match the tool and expand them + */ + private removeMatchingPatternWildcards(serverName: string, toolName: string): void { + const toolId = serverName ? `@${serverName}/${toolName}` : toolName + const serverPrefix = serverName ? `@${serverName}` : '' + + const toRemove: string[] = [] + for (const tool of this.agentConfig.tools) { + if (tool.includes('*') || tool.includes('?')) { + if (serverName && tool.startsWith('@') && !tool.includes('/')) { + if (this.matchesPattern(serverPrefix, tool)) { + toRemove.push(tool) + } + } else if (this.matchesPattern(toolId, tool)) { + toRemove.push(tool) + } + } + } + + for (const pattern of toRemove) { + this.expandPatternWildcard(pattern, serverName, toolName) + } + } + + /** + * Expand a pattern wildcard to individual tools except the denied one + */ + private expandPatternWildcard(pattern: string, deniedServerName: string, deniedToolName: string): void { + this.agentConfig.tools = this.agentConfig.tools.filter(tool => tool !== pattern) + + if (!this.getAvailableTools) return + + if (pattern.startsWith('@') && !pattern.includes('/')) { + // Server pattern like @*-mcp + const allServers = this.getAvailableServers() + for (const serverName of allServers) { + const serverPrefix = `@${serverName}` + if (this.matchesPattern(serverPrefix, pattern)) { + const tools = this.getAvailableTools(serverName) + for (const toolName of tools) { + if (!(serverName === deniedServerName && toolName === deniedToolName)) { + this.addTool(`@${serverName}/${toolName}`) + } + } + } + } + } else { + // Tool pattern like @fs/read_* + const allServers = this.getAvailableServers() + for (const serverName of allServers) { + const tools = this.getAvailableTools(serverName) + for (const toolName of tools) { + const toolId = `@${serverName}/${toolName}` + if (this.matchesPattern(toolId, pattern)) { + if (!(serverName === deniedServerName && toolName === deniedToolName)) { + this.addTool(toolId) + } + } + } + } + } + } + + /** + * Expand allowedTools pattern wildcard except the denied tool + */ + private expandAllowedPatternWildcard(pattern: string, deniedServerName: string, deniedToolName: string): void { + this.agentConfig.allowedTools = this.agentConfig.allowedTools.filter(tool => tool !== pattern) + + if (!this.getAvailableTools) return + + if (pattern.startsWith('@') && !pattern.includes('/')) { + // Server pattern like @git + const allServers = this.getAvailableServers() + for (const serverName of allServers) { + const serverPrefix = `@${serverName}` + if (this.matchesPattern(serverPrefix, pattern)) { + const tools = this.getAvailableTools(serverName) + for (const toolName of tools) { + if (!(serverName === deniedServerName && toolName === deniedToolName)) { + this.addToAllowedTools(`@${serverName}/${toolName}`) + } + } + } + } + } else { + // Tool pattern like @fs/* + const allServers = this.getAvailableServers() + for (const serverName of allServers) { + const tools = this.getAvailableTools(serverName) + for (const toolName of tools) { + const toolId = `@${serverName}/${toolName}` + if (this.matchesPattern(toolId, pattern)) { + if (!(serverName === deniedServerName && toolName === deniedToolName)) { + this.addToAllowedTools(toolId) + } + } + } + } + } + } + + /** + * Get all available servers + */ + private getAvailableServers(): string[] { + return this.getAllAvailableServers?.() || [] + } + + /** + * Get all builtin tools + */ + private getBuiltinTools(): string[] { + return this.getAllBuiltinTools?.() || [] + } + + /** + * Get updated agent config + */ + getAgentConfig(): AgentConfig { + return this.agentConfig + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.test.ts index 01984a310e..b55f24614a 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.test.ts @@ -49,6 +49,17 @@ describe('McpEventHandler error handling', () => { }, agent: { getTools: sinon.stub().returns([]), + getBuiltInToolNames: sinon + .stub() + .returns([ + 'fsRead', + 'fsWrite', + 'executeBash', + 'listDirectory', + 'fileSearch', + 'codeReview', + 'displayFindings', + ]), }, lsp: {}, telemetry: { @@ -59,9 +70,7 @@ describe('McpEventHandler error handling', () => { getConnectionMetadata: sinon.stub().returns({}), }, runtime: { - serverInfo: { - version: '1.0.0', - }, + serverInfo: {}, }, } @@ -100,7 +109,6 @@ describe('McpEventHandler error handling', () => { errors: mockErrors, agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -157,7 +165,6 @@ describe('McpEventHandler error handling', () => { errors: new Map([['errorServer', 'Missing command error']]), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { errorServer: { command: '' } }, tools: ['@errorServer'], @@ -215,7 +222,6 @@ describe('McpEventHandler error handling', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -240,4 +246,106 @@ describe('McpEventHandler error handling', () => { expect(result.header).to.not.be.undefined expect(result.header.title).to.equal('Edit MCP Server') }) + + describe('#getListMcpServersStatus', () => { + beforeEach(() => { + sinon.restore() + sinon.stub(mcpUtils, 'getGlobalAgentConfigPath').returns('/fake/home/.aws/amazonq/agents/default.json') + saveAgentConfigStub = sinon.stub(mcpUtils, 'saveAgentConfig').resolves() + }) + + it('returns admin disabled status when MCP state is false', async () => { + // Stub ProfileStatusMonitor.getMcpState to return false + const { ProfileStatusMonitor } = await import('./profileStatusMonitor') + sinon.stub(ProfileStatusMonitor, 'getMcpState').returns(false) + + loadStub = sinon.stub(mcpUtils, 'loadAgentConfig').resolves({ + servers: new Map(), + serverNameMapping: new Map(), + errors: new Map(), + agentConfig: { + name: 'test-agent', + description: 'Test agent', + mcpServers: {}, + tools: [], + allowedTools: [], + toolsSettings: {}, + includedFiles: [], + resources: [], + }, + }) + + await McpManager.init([], features) + const result = await eventHandler.onListMcpServers({}) + + expect(result.header.status).to.deep.equal({ + title: 'MCP functionality has been disabled by your administrator', + icon: 'info', + status: 'info', + }) + }) + + it('returns config error status when MCP state is not false but config errors exist', async () => { + // Stub ProfileStatusMonitor.getMcpState to return true + const { ProfileStatusMonitor } = await import('./profileStatusMonitor') + sinon.stub(ProfileStatusMonitor, 'getMcpState').returns(true) + + const mockErrors = new Map([['file1.json', 'Config error']]) + loadStub = sinon.stub(mcpUtils, 'loadAgentConfig').resolves({ + servers: new Map(), + serverNameMapping: new Map(), + errors: mockErrors, + agentConfig: { + name: 'test-agent', + description: 'Test agent', + mcpServers: {}, + tools: [], + allowedTools: [], + toolsSettings: {}, + includedFiles: [], + resources: [], + }, + }) + + await McpManager.init([], features) + sinon.stub(McpManager.instance, 'getConfigLoadErrors').returns('File: file1.json, Error: Config error') + + const result = await eventHandler.onListMcpServers({}) + + expect(result.header.status).to.deep.equal({ + title: 'File: file1.json, Error: Config error', + icon: 'cancel-circle', + status: 'error', + }) + }) + + it('returns undefined status when MCP state is not false and no config errors', async () => { + // Stub ProfileStatusMonitor.getMcpState to return true + const { ProfileStatusMonitor } = await import('./profileStatusMonitor') + sinon.stub(ProfileStatusMonitor, 'getMcpState').returns(true) + + loadStub = sinon.stub(mcpUtils, 'loadAgentConfig').resolves({ + servers: new Map(), + serverNameMapping: new Map(), + errors: new Map(), + agentConfig: { + name: 'test-agent', + description: 'Test agent', + mcpServers: {}, + tools: [], + allowedTools: [], + toolsSettings: {}, + includedFiles: [], + resources: [], + }, + }) + + await McpManager.init([], features) + sinon.stub(McpManager.instance, 'getConfigLoadErrors').returns(undefined) + + const result = await eventHandler.onListMcpServers({}) + + expect(result.header.status).to.be.undefined + }) + }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.ts index 4596bc0646..efc22344cc 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpEventHandler.ts @@ -3,7 +3,6 @@ import { MCP_SERVER_STATUS_CHANGED, McpManager } from './mcpManager' import { ChatTelemetryController } from '../../../chat/telemetry/chatTelemetryController' import { ChokidarFileWatcher } from './chokidarFileWatcher' // eslint-disable-next-line import/no-nodejs-modules -import * as path from 'path' import { DetailedListGroup, DetailedListItem, @@ -14,12 +13,12 @@ import { } from '@aws/language-server-runtimes/protocol' import { - getGlobalMcpConfigPath, getGlobalAgentConfigPath, - getWorkspaceMcpConfigPaths, getWorkspaceAgentConfigPaths, sanitizeName, normalizePathFromUri, + getWorkspaceMcpConfigPaths, + getGlobalMcpConfigPath, } from './mcpUtils' import { McpPermissionType, @@ -29,14 +28,21 @@ import { McpServerStatus, } from './mcpTypes' import { TelemetryService } from '../../../../shared/telemetry/telemetryService' -import { URI } from 'vscode-uri' +import { ProfileStatusMonitor } from './profileStatusMonitor' interface PermissionOption { label: string value: string + description?: string +} + +enum TransportType { + STDIO = 'stdio', + HTTP = 'http', } export class McpEventHandler { + private static readonly FILE_WATCH_DEBOUNCE_MS = 2000 #features: Features #eventListenerRegistered: boolean #currentEditingServerName: string | undefined @@ -50,6 +56,12 @@ export class McpEventHandler { #lastProgrammaticState: boolean = false #serverNameBeforeUpdate: string | undefined + #releaseProgrammaticAfterDebounce(padMs = 500) { + setTimeout(() => { + this.#isProgrammaticChange = false + }, McpEventHandler.FILE_WATCH_DEBOUNCE_MS + padMs) + } + constructor(features: Features, telemetryService: TelemetryService) { this.#features = features this.#eventListenerRegistered = false @@ -222,18 +234,63 @@ export class McpEventHandler { } // Return the result in the expected format + const mcpState = ProfileStatusMonitor.getMcpState() const header = { title: 'MCP Servers', - description: "Add MCP servers to extend Q's capabilities.", - // only show error on list mcp server page if unable to read mcp.json file - status: configLoadErrors - ? { title: configLoadErrors, icon: 'cancel-circle', status: 'error' as Status } - : undefined, + description: mcpState === false ? '' : "Add MCP servers to extend Q's capabilities.", + status: this.#getListMcpServersStatus(configLoadErrors, mcpState), + actions: this.#getListMcpServersActions(configLoadErrors, mcpState), } return { header, list: groups } } + /** + * Gets the status for the list MCP servers header + */ + #getListMcpServersStatus( + configLoadErrors: string | undefined, + mcpState: boolean | undefined + ): { title: string; icon: string; status: Status } | undefined { + if (mcpState === false) { + return { + title: 'MCP functionality has been disabled by your administrator', + icon: 'info', + status: 'info' as Status, + } + } + + if (configLoadErrors) { + return { title: configLoadErrors, icon: 'cancel-circle', status: 'error' as Status } + } + + return undefined + } + + /** + * Gets the actions for the list MCP servers header + */ + #getListMcpServersActions(configLoadErrors: string | undefined, mcpState: boolean | undefined) { + return mcpState !== false && (!configLoadErrors || configLoadErrors === '') + ? [ + { + id: 'add-new-mcp', + icon: 'plus', + status: 'clear', + text: 'Add new MCP server', + description: 'Add new MCP server', + }, + { + id: 'refresh-mcp-list', + icon: 'refresh', + status: 'clear', + text: 'Refresh MCP servers', + description: 'Refresh MCP servers', + }, + ] + : [] + } + /** * Handles MCP server click events */ @@ -346,7 +403,7 @@ export class McpEventHandler { const serverStatusError = this.#getServerStatusError(existingValues.name) || {} // Determine which transport is selected (default to stdio) - const selectedTransport = existingValues.transport || 'stdio' + const selectedTransport = existingValues.transport || TransportType.STDIO return { id: params.id, @@ -385,14 +442,14 @@ export class McpEventHandler { title: 'Transport', mandatory: true, options: [ - { label: 'stdio', value: 'stdio' }, - { label: 'http', value: 'http' }, + { label: TransportType.STDIO, value: TransportType.STDIO }, + { label: TransportType.HTTP, value: TransportType.HTTP }, ], value: selectedTransport, }, ] - if (selectedTransport === 'http') { + if (selectedTransport === TransportType.HTTP) { return [ ...common, { @@ -556,8 +613,13 @@ export class McpEventHandler { errors.push('Either command or url is required') } else if (command && url) { errors.push('Provide either command OR url, not both') - } else if (transport && ((transport === 'stdio' && !command) || (transport !== 'stdio' && !url))) { - errors.push(`${transport === 'stdio' ? 'Command' : 'URL'} is required for ${transport} transport`) + } else if ( + transport && + ((transport === TransportType.STDIO && !command) || (transport !== TransportType.STDIO && !url)) + ) { + errors.push( + `${transport === TransportType.STDIO ? 'Command' : 'URL'} is required for ${transport} transport` + ) } if (values.timeout && values.timeout.trim() !== '') { @@ -645,7 +707,7 @@ export class McpEventHandler { // stdio‑specific parsing let args: string[] = [] let env: Record = {} - if (selectedTransport === 'stdio') { + if (selectedTransport === TransportType.STDIO) { try { args = (Array.isArray(params.optionsValues.args) ? params.optionsValues.args : []) .map((item: any) => @@ -672,7 +734,7 @@ export class McpEventHandler { // http‑specific parsing let headers: Record = {} - if (selectedTransport === 'http') { + if (selectedTransport === TransportType.HTTP) { try { const raw = Array.isArray(params.optionsValues.headers) ? params.optionsValues.headers : [] headers = raw.reduce((acc: Record, item: any) => { @@ -696,7 +758,7 @@ export class McpEventHandler { // build final config (no transport field persisted) let config: MCPServerConfig - if (selectedTransport === 'http') { + if (selectedTransport === TransportType.HTTP) { config = { url: params.optionsValues.url, headers, @@ -727,8 +789,11 @@ export class McpEventHandler { try { if (isEditMode && originalServerName) { const serverToRemove = this.#serverNameBeforeUpdate || originalServerName + const serverConfig = McpManager.instance.getAllServerConfigs().get(serverToRemove) + const isLegacyMcpServer = serverConfig?.__configPath__?.endsWith('mcp.json') ?? false + const configPath = isLegacyMcpServer ? await this.#getMcpConfigPath(isGlobal) : agentPath await McpManager.instance.removeServer(serverToRemove) - await McpManager.instance.addServer(serverName, config, agentPath) + await McpManager.instance.addServer(serverName, config, configPath, isLegacyMcpServer) } else { // Create new server await McpManager.instance.addServer(serverName, config, agentPath) @@ -739,16 +804,17 @@ export class McpEventHandler { } this.#currentEditingServerName = undefined + this.#serverNameBeforeUpdate = undefined // need to check server state now, as there is possibility of error during server initialization const serverStatusError = this.#getServerStatusError(serverName) this.#telemetryController?.emitMCPServerInitializeEvent({ source: isEditMode ? 'updateServer' : 'addServer', - command: selectedTransport === 'stdio' ? params.optionsValues.command : undefined, - url: selectedTransport === 'http' ? params.optionsValues.url : undefined, + command: selectedTransport === TransportType.STDIO ? params.optionsValues.command : undefined, + url: selectedTransport === TransportType.HTTP ? params.optionsValues.url : undefined, enabled: true, - numTools: McpManager.instance.getAllToolsWithPermissions(serverName).length, + numTools: McpManager.instance.getAllToolsWithPermissions(sanitizedServerName).length, scope: params.optionsValues['scope'] === 'global' ? 'global' : 'workspace', transportType: selectedTransport, languageServerVersion: this.#features.runtime.serverInfo.version, @@ -763,6 +829,7 @@ export class McpEventHandler { // Stay on add/edit page and show error to user // Keep isProgrammaticChange true during error handling to prevent file watcher triggers + this.#releaseProgrammaticAfterDebounce() if (isEditMode) { params.id = 'edit-mcp' params.title = sanitizedServerName @@ -777,7 +844,7 @@ export class McpEventHandler { this.#newlyAddedServers.delete(serverName) } - this.#isProgrammaticChange = false + this.#releaseProgrammaticAfterDebounce() // Go to tools permissions page return this.#handleOpenMcpServer({ id: 'open-mcp-server', title: sanitizedServerName }) @@ -867,25 +934,21 @@ export class McpEventHandler { } const mcpManager = McpManager.instance - // Get the appropriate agent path const agentPath = mcpManager.getAllServerConfigs().get(serverName)?.__configPath__ - - const perm: MCPServerPermission = { - enabled: true, - toolPerms: {}, - __configPath__: agentPath, - } - // Set flag to ignore file changes during permission update this.#isProgrammaticChange = true try { + const perm = mcpManager.getMcpServerPermissions(serverName)! + perm.enabled = true + perm.__configPath__ = agentPath await mcpManager.updateServerPermission(serverName, perm) this.#emitMCPConfigEvent() + this.#releaseProgrammaticAfterDebounce() } catch (error) { this.#features.logging.error(`Failed to enable MCP server: ${error}`) - this.#isProgrammaticChange = false + this.#releaseProgrammaticAfterDebounce() } return { id: params.id } } @@ -898,26 +961,21 @@ export class McpEventHandler { if (!serverName) { return { id: params.id } } - const mcpManager = McpManager.instance - // Get the appropriate agent path + // Set flag to ignore file changes during permission update const agentPath = mcpManager.getAllServerConfigs().get(serverName)?.__configPath__ - - const perm: MCPServerPermission = { - enabled: false, - toolPerms: {}, - __configPath__: agentPath, - } - // Set flag to ignore file changes during permission update this.#isProgrammaticChange = true - try { + const perm = mcpManager.getMcpServerPermissions(serverName)! + perm.enabled = false + perm.__configPath__ = agentPath await mcpManager.updateServerPermission(serverName, perm) this.#emitMCPConfigEvent() + this.#releaseProgrammaticAfterDebounce() } catch (error) { this.#features.logging.error(`Failed to disable MCP server: ${error}`) - this.#isProgrammaticChange = false + this.#releaseProgrammaticAfterDebounce() } return { id: params.id } @@ -937,11 +995,11 @@ export class McpEventHandler { try { await McpManager.instance.removeServer(serverName) - + this.#releaseProgrammaticAfterDebounce() return { id: params.id } } catch (error) { this.#features.logging.error(`Failed to delete MCP server: ${error}`) - this.#isProgrammaticChange = false + this.#releaseProgrammaticAfterDebounce() return { id: params.id } } } @@ -978,7 +1036,7 @@ export class McpEventHandler { } // Respect a user flip first; otherwise fall back to what the stored configuration implies. - const transport = params.optionsValues?.transport ?? (config.url ? 'http' : 'stdio') + const transport = params.optionsValues?.transport ?? (config.url ? TransportType.HTTP : TransportType.STDIO) // Convert stored structures to UI‑friendly lists const argsList = (config.args ?? []).map(a => ({ arg_key: a })) // for stdio @@ -1032,17 +1090,16 @@ export class McpEventHandler { // Add tool select options toolsWithPermissions.forEach(item => { const toolName = item.tool.toolName - const currentPermission = this.#getCurrentPermission(item.permission) // For Built-in server, use a special function that doesn't include the 'Deny' option - const permissionOptions = this.#buildPermissionOptions(item.permission) + let permissionOptions = this.#buildPermissionOptions() filterOptions.push({ type: 'select', id: `${toolName}`, title: toolName, description: item.tool.description, - placeholder: currentPermission, options: permissionOptions, + ...{ value: item.permission, boldTitle: true, mandatory: true, hideMandatoryIcon: true }, }) }) @@ -1055,8 +1112,9 @@ export class McpEventHandler { // Clean up transport-specific fields if (optionsValues) { - const transport = optionsValues.transport ?? 'stdio' // Maintain default to 'stdio' - const fieldsToDelete = transport === 'http' ? ['command', 'args', 'env_variables'] : ['url', 'headers'] + const transport = optionsValues.transport ?? TransportType.STDIO // Maintain default to 'stdio' + const fieldsToDelete = + transport === TransportType.HTTP ? ['command', 'args', 'env_variables'] : ['url', 'headers'] fieldsToDelete.forEach(field => delete optionsValues[field]) } @@ -1095,20 +1153,22 @@ export class McpEventHandler { /** * Builds permission options excluding the current one */ - #buildPermissionOptions(currentPermission: string) { + #buildPermissionOptions() { const permissionOptions: PermissionOption[] = [] - if (currentPermission !== McpPermissionType.alwaysAllow) { - permissionOptions.push({ label: 'Always allow', value: McpPermissionType.alwaysAllow }) - } + permissionOptions.push({ + label: 'Ask', + value: McpPermissionType.ask, + description: 'Ask for your approval each time this tool is run', + }) - if (currentPermission !== McpPermissionType.ask) { - permissionOptions.push({ label: 'Ask', value: McpPermissionType.ask }) - } + permissionOptions.push({ + label: 'Always allow', + value: McpPermissionType.alwaysAllow, + description: 'Always allow this tool to run without asking for approval', + }) - if (currentPermission !== McpPermissionType.deny) { - permissionOptions.push({ label: 'Deny', value: McpPermissionType.deny }) - } + permissionOptions.push({ label: 'Deny', value: McpPermissionType.deny, description: 'Never run this tool' }) return permissionOptions } @@ -1157,6 +1217,7 @@ export class McpEventHandler { } const mcpServerPermission = await this.#processPermissionUpdates( + serverName, updatedPermissionConfig, serverConfig?.__configPath__ ) @@ -1200,16 +1261,18 @@ export class McpEventHandler { const serverConfig = McpManager.instance.getAllServerConfigs().get(serverName) if (serverConfig) { // Emit server initialize event after permission change - const transportType = serverConfig.command ? 'stdio' : 'http' + const transportType = serverConfig.command?.trim() ? TransportType.STDIO : TransportType.HTTP this.#telemetryController?.emitMCPServerInitializeEvent({ source: 'updatePermission', - command: transportType === 'stdio' ? serverConfig.command : undefined, - url: transportType === 'http' ? serverConfig.url : undefined, + command: transportType === TransportType.STDIO ? serverConfig.command : undefined, + url: transportType === TransportType.HTTP ? serverConfig.url : undefined, enabled: true, numTools: McpManager.instance.getAllToolsWithPermissions(serverName).length, scope: serverConfig.__configPath__ === - getGlobalAgentConfigPath(this.#features.workspace.fs.getUserHomeDir()) + getGlobalAgentConfigPath(this.#features.workspace.fs.getUserHomeDir()) || + serverConfig.__configPath__ === + getGlobalMcpConfigPath(this.#features.workspace.fs.getUserHomeDir()) ? 'global' : 'workspace', transportType: transportType, @@ -1221,10 +1284,11 @@ export class McpEventHandler { this.#pendingPermissionConfig = undefined this.#features.logging.info(`Applied permission changes for server: ${serverName}`) + this.#releaseProgrammaticAfterDebounce() return { id: params.id } } catch (error) { this.#features.logging.error(`Failed to save MCP permissions: ${error}`) - this.#isProgrammaticChange = false + this.#releaseProgrammaticAfterDebounce() return { id: params.id } } } @@ -1237,12 +1301,13 @@ export class McpEventHandler { ([name, _]) => !mcpManager.isServerDisabled(name) ) - // Get the global agent path + // Get the global paths const globalAgentPath = getGlobalAgentConfigPath(this.#features.workspace.fs.getUserHomeDir()) + const globalMcpPath = getGlobalMcpConfigPath(this.#features.workspace.fs.getUserHomeDir()) // Count global vs project servers const globalServers = Array.from(serverConfigs.entries()).filter( - ([_, config]) => config.__configPath__ === globalAgentPath + ([_, config]) => config.__configPath__ === globalAgentPath || config.__configPath__ === globalMcpPath ).length const projectServers = serverConfigs.size - globalServers @@ -1272,16 +1337,19 @@ export class McpEventHandler { // Emit server initialize events for all active servers for (const [serverName, config] of serverConfigs.entries()) { - const transportType = config.command ? 'stdio' : 'http' + const transportType = config.command ? TransportType.STDIO : TransportType.HTTP const enabled = !mcpManager.isServerDisabled(serverName) this.#telemetryController?.emitMCPServerInitializeEvent({ source: 'reload', - command: transportType === 'stdio' ? config.command : undefined, - url: transportType === 'http' ? config.url : undefined, + command: transportType === TransportType.STDIO ? config.command : undefined, + url: transportType === TransportType.HTTP ? config.url : undefined, enabled: enabled, numTools: mcpManager.getAllToolsWithPermissions(serverName).length, - scope: config.__configPath__ === globalAgentPath ? 'global' : 'workspace', - transportType: 'stdio', + scope: + config.__configPath__ === globalAgentPath || config.__configPath__ === globalMcpPath + ? 'global' + : 'workspace', + transportType: transportType, languageServerVersion: this.#features.runtime.serverInfo.version, }) } @@ -1351,30 +1419,54 @@ export class McpEventHandler { return globalAgentPath } + /** + * Gets the appropriate MCP config path, checking workspace path first if it exists + * @returns The MCP config path to use (workspace if exists, otherwise global) + */ + async #getMcpConfigPath(isGlobal: boolean = true): Promise { + const globalMcpPath = getGlobalMcpConfigPath(this.#features.workspace.fs.getUserHomeDir()) + if (isGlobal) { + return globalMcpPath + } + // Get workspace folders and check for workspace MCP path + const workspaceFolders = this.#features.workspace.getAllWorkspaceFolders() + if (workspaceFolders && workspaceFolders.length > 0) { + const workspacePaths = workspaceFolders.map(folder => folder.uri) + const workspaceMcpPaths = getWorkspaceMcpConfigPaths(workspacePaths) + + if (Array.isArray(workspaceMcpPaths) && workspaceMcpPaths.length > 0) { + try { + // Convert URI format to filesystem path if needed using the utility function + const mcpPath = normalizePathFromUri(workspaceMcpPaths[0], this.#features.logging) + + return mcpPath + } catch (e) { + this.#features.logging.warn(`Failed to check if workspace MCP path exists: ${e}`) + } + } + } + + // Return global path if workspace path doesn't exist or there was an error + return globalMcpPath + } + /** * Processes permission updates from the UI */ - async #processPermissionUpdates(updatedPermissionConfig: any, agentPath: string | undefined) { + async #processPermissionUpdates(serverName: string, updatedPermissionConfig: any, agentPath: string | undefined) { + const builtInToolAgentPath = await this.#getAgentPath() const perm: MCPServerPermission = { enabled: true, toolPerms: {}, - __configPath__: agentPath, + __configPath__: serverName === 'Built-in' ? builtInToolAgentPath : agentPath, } // Process each tool permission setting for (const [key, val] of Object.entries(updatedPermissionConfig)) { if (key === 'scope') continue - // // Get the default permission for this tool from McpManager - // let defaultPermission = McpManager.instance.getToolPerm(serverName, key) - - // // If no default permission is found, use 'alwaysAllow' for Built-in and 'ask' for MCP servers - // if (!defaultPermission) { - // defaultPermission = serverName === 'Built-in' ? 'alwaysAllow' : 'ask' - // } - - // If the value is an empty string (''), skip this tool to preserve its existing permission in the persona file - if (val === '') continue + const currentPerm = McpManager.instance.getToolPerm(serverName, key) + if (val === currentPerm) continue switch (val) { case McpPermissionType.alwaysAllow: perm.toolPerms[key] = McpPermissionType.alwaysAllow @@ -1396,7 +1488,8 @@ export class McpEventHandler { */ #getServerStatusError(serverName: string): { title: string; icon: string; status: Status } | undefined { const serverStates = McpManager.instance.getAllServerStates() - const serverState = serverStates.get(serverName) + const key = serverName ? sanitizeName(serverName) : serverName + const serverState = key ? serverStates.get(key) : undefined if (!serverState) { return undefined @@ -1426,13 +1519,15 @@ export class McpEventHandler { this.#features.logging.warn(`Failed to get user home directory: ${e}`) } - // Only watch agent config files + // Watch both agent config files and MCP config files const agentPaths = [ ...getWorkspaceAgentConfigPaths(wsUris), ...(homeDir ? [getGlobalAgentConfigPath(homeDir)] : []), ] - const allPaths = [...agentPaths] + const mcpPaths = [...getWorkspaceMcpConfigPaths(wsUris), ...(homeDir ? [getGlobalMcpConfigPath(homeDir)] : [])] + + const allPaths = [...agentPaths, ...mcpPaths] this.#fileWatcher.watchPaths(allPaths, () => { // Store the current programmatic state when the event is triggered @@ -1460,11 +1555,10 @@ export class McpEventHandler { if (!this.#lastProgrammaticState) { await this.#handleRefreshMCPList({ id: 'refresh-mcp-list' }) } else { - this.#isProgrammaticChange = false this.#features.logging.debug('Skipping refresh due to programmatic change') } this.#debounceTimer = null - }, 2000) + }, McpEventHandler.FILE_WATCH_DEBOUNCE_MS) }) } diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpManager.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpManager.test.ts index 7b239abad0..a717fc6b93 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpManager.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpManager.test.ts @@ -28,7 +28,25 @@ const fakeWorkspace = { getUserHomeDir: () => '', getAllWorkspaceFolders: () => [{ uri: '/fake/workspace' }], } -const features = { logging: fakeLogging, workspace: fakeWorkspace, lsp: {} } as any +const features = { + logging: fakeLogging, + workspace: fakeWorkspace, + lsp: {}, + telemetry: { emitMetric: () => {} }, + credentialsProvider: { getConnectionMetadata: () => ({}) }, + runtime: { serverInfo: { version: '1.0.0' } }, + agent: { + getBuiltInToolNames: () => [ + 'fsRead', + 'fsWrite', + 'executeBash', + 'listDirectory', + 'fileSearch', + 'codeReview', + 'displayFindings', + ], + }, +} as any function stubAgentConfig(): sinon.SinonStub { return sinon.stub(mcpUtils, 'loadAgentConfig').resolves({ @@ -37,7 +55,6 @@ function stubAgentConfig(): sinon.SinonStub { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -157,7 +174,6 @@ describe('callTool()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { s1: disabledCfg }, tools: ['@s1'], @@ -184,7 +200,6 @@ describe('callTool()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { s1: enabledCfg }, tools: ['@s1'], @@ -210,7 +225,6 @@ describe('callTool()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { s1: timeoutCfg }, tools: ['@s1'], @@ -239,12 +253,12 @@ describe('callTool()', () => { describe('addServer()', () => { let loadStub: sinon.SinonStub let initOneStub: sinon.SinonStub - let saveAgentConfigStub: sinon.SinonStub + let saveServerSpecificAgentConfigStub: sinon.SinonStub beforeEach(() => { loadStub = stubAgentConfig() initOneStub = stubInitOneServer() - saveAgentConfigStub = sinon.stub(mcpUtils, 'saveAgentConfig').resolves() + saveServerSpecificAgentConfigStub = sinon.stub(mcpUtils, 'saveServerSpecificAgentConfig').resolves() }) afterEach(async () => { @@ -268,7 +282,7 @@ describe('addServer()', () => { await mgr.addServer('newS', newCfg, 'path.json') - expect(saveAgentConfigStub.calledOnce).to.be.true + expect(saveServerSpecificAgentConfigStub.calledOnce).to.be.true expect(initOneStub.calledOnceWith('newS', sinon.match(newCfg))).to.be.true }) @@ -279,7 +293,6 @@ describe('addServer()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -301,14 +314,14 @@ describe('addServer()', () => { await mgr.addServer('httpSrv', httpCfg, 'http.json') - expect(saveAgentConfigStub.calledOnce).to.be.true + expect(saveServerSpecificAgentConfigStub.calledOnce).to.be.true expect(initOneStub.calledOnceWith('httpSrv', sinon.match(httpCfg))).to.be.true }) }) describe('removeServer()', () => { let loadStub: sinon.SinonStub - let saveAgentConfigStub: sinon.SinonStub + let saveServerSpecificAgentConfigStub: sinon.SinonStub let existsStub: sinon.SinonStub let readFileStub: sinon.SinonStub let writeFileStub: sinon.SinonStub @@ -318,7 +331,7 @@ describe('removeServer()', () => { beforeEach(() => { loadStub = stubAgentConfig() - saveAgentConfigStub = sinon.stub(mcpUtils, 'saveAgentConfig').resolves() + saveServerSpecificAgentConfigStub = sinon.stub(mcpUtils, 'saveServerSpecificAgentConfig').resolves() existsStub = sinon.stub(fakeWorkspace.fs, 'exists').resolves(true) readFileStub = sinon .stub(fakeWorkspace.fs, 'readFile') @@ -353,7 +366,6 @@ describe('removeServer()', () => { ;(mgr as any).serverNameMapping.set('x', 'x') ;(mgr as any).agentConfig = { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { x: {} }, tools: ['@x'], @@ -364,11 +376,11 @@ describe('removeServer()', () => { } await mgr.removeServer('x') - expect(saveAgentConfigStub.calledOnce).to.be.true + expect(saveServerSpecificAgentConfigStub.calledOnce).to.be.true expect((mgr as any).clients.has('x')).to.be.false }) - it('removes server from all config files', async () => { + it('removes server from agent config', async () => { const mgr = await McpManager.init([], features) const dummy = new Client({ name: 'c', version: 'v' }) ;(mgr as any).clients.set('x', dummy) @@ -383,7 +395,6 @@ describe('removeServer()', () => { ;(mgr as any).serverNameMapping.set('x', 'x') ;(mgr as any).agentConfig = { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { x: {} }, tools: ['@x'], @@ -395,14 +406,13 @@ describe('removeServer()', () => { await mgr.removeServer('x') - // Verify that writeFile was called for each config path (2 workspace + 1 global) - expect(writeFileStub.callCount).to.equal(3) + // Verify that saveServerSpecificAgentConfig was called + expect(saveServerSpecificAgentConfigStub.calledOnce).to.be.true + expect((mgr as any).clients.has('x')).to.be.false - // Verify the content of the writes (should have removed the server) - writeFileStub.getCalls().forEach(call => { - const content = JSON.parse(call.args[1]) - expect(content.mcpServers).to.not.have.property('x') - }) + // Verify server was removed from agent config + expect((mgr as any).agentConfig.mcpServers).to.not.have.property('x') + expect((mgr as any).agentConfig.tools).to.not.include('@x') }) }) @@ -473,11 +483,11 @@ describe('mutateConfigFile()', () => { describe('updateServer()', () => { let loadStub: sinon.SinonStub let initOneStub: sinon.SinonStub - let saveAgentConfigStub: sinon.SinonStub + let saveServerSpecificAgentConfigStub: sinon.SinonStub beforeEach(() => { initOneStub = stubInitOneServer() - saveAgentConfigStub = sinon.stub(mcpUtils, 'saveAgentConfig').resolves() + saveServerSpecificAgentConfigStub = sinon.stub(mcpUtils, 'saveServerSpecificAgentConfig').resolves() }) afterEach(async () => { @@ -502,7 +512,6 @@ describe('updateServer()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { u1: oldCfg }, tools: ['@u1'], @@ -520,11 +529,11 @@ describe('updateServer()', () => { const closeStub = sinon.stub(fakeClient, 'close').resolves() initOneStub.resetHistory() - saveAgentConfigStub.resetHistory() + saveServerSpecificAgentConfigStub.resetHistory() await mgr.updateServer('u1', { timeout: 999 }, 'u.json') - expect(saveAgentConfigStub.calledOnce).to.be.true + expect(saveServerSpecificAgentConfigStub.calledOnce).to.be.true expect(closeStub.calledOnce).to.be.true expect(initOneStub.calledOnceWith('u1', sinon.match.has('timeout', 999))).to.be.true }) @@ -545,7 +554,6 @@ describe('updateServer()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: oldCfg }, tools: ['@srv'], @@ -560,11 +568,11 @@ describe('updateServer()', () => { const mgr = McpManager.instance initOneStub.resetHistory() - saveAgentConfigStub.resetHistory() + saveServerSpecificAgentConfigStub.resetHistory() await mgr.updateServer('srv', { command: undefined, url: 'https://new.host/mcp' }, 'z.json') - expect(saveAgentConfigStub.calledOnce).to.be.true + expect(saveServerSpecificAgentConfigStub.calledOnce).to.be.true expect(initOneStub.calledOnceWith('srv', sinon.match({ url: 'https://new.host/mcp' }))).to.be.true }) }) @@ -599,7 +607,6 @@ describe('requiresApproval()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { s: cfg }, tools: ['@s'], @@ -640,7 +647,6 @@ describe('getAllServerConfigs()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: cfg }, tools: ['@srv'], @@ -688,7 +694,6 @@ describe('getServerState()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: cfg }, tools: ['@srv'], @@ -730,7 +735,6 @@ describe('getAllServerStates()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: cfg }, tools: ['@srv'], @@ -780,7 +784,6 @@ describe('getEnabledTools()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: cfg }, tools: ['@srv'], @@ -798,7 +801,6 @@ describe('getEnabledTools()', () => { if (!(mgr as any).agentConfig) { ;(mgr as any).agentConfig = { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -829,7 +831,6 @@ describe('getEnabledTools()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: disabledCfg }, tools: ['@srv'], @@ -867,7 +868,6 @@ describe('getAllToolsWithPermissions()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { s1: cfg }, tools: ['@s1'], @@ -932,7 +932,6 @@ describe('isServerDisabled()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: disabledCfg }, tools: ['@srv'], @@ -963,7 +962,6 @@ describe('isServerDisabled()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: enabledCfg }, tools: ['@srv'], @@ -993,7 +991,6 @@ describe('isServerDisabled()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: undefinedCfg }, tools: ['@srv'], @@ -1062,9 +1059,11 @@ describe('listServersAndTools()', () => { describe('updateServerPermission()', () => { let saveAgentConfigStub: sinon.SinonStub + let saveServerSpecificAgentConfigStub: sinon.SinonStub beforeEach(() => { saveAgentConfigStub = sinon.stub(mcpUtils, 'saveAgentConfig').resolves() + saveServerSpecificAgentConfigStub = sinon.stub(mcpUtils, 'saveServerSpecificAgentConfig').resolves() }) afterEach(async () => { @@ -1090,7 +1089,6 @@ describe('updateServerPermission()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srv: cfg }, tools: ['@srv'], @@ -1113,8 +1111,8 @@ describe('updateServerPermission()', () => { __configPath__: '/p', }) - // Verify saveAgentConfig was called - expect(saveAgentConfigStub.calledOnce).to.be.true + // Verify saveServerSpecificAgentConfig was called + expect(saveServerSpecificAgentConfigStub.calledOnce).to.be.true // Verify the tool permission was updated expect(mgr.requiresApproval('srv', 'tool1')).to.be.false @@ -1155,7 +1153,6 @@ describe('reinitializeMcpServers()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srvA: cfg1 }, tools: ['@srvA'], @@ -1172,7 +1169,6 @@ describe('reinitializeMcpServers()', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { srvB: cfg2 }, tools: ['@srvB'], @@ -1278,7 +1274,6 @@ describe('concurrent server initialization', () => { const serversMap = new Map(Object.entries(serverConfigs)) const agentConfig = { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: Object.fromEntries(Object.entries(serverConfigs)), tools: Object.keys(serverConfigs).map(name => `@${name}`), @@ -1423,7 +1418,6 @@ describe('McpManager error handling', () => { errors: mockErrors, agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -1451,7 +1445,6 @@ describe('McpManager error handling', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -1477,7 +1470,6 @@ describe('McpManager error handling', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -1520,7 +1512,6 @@ describe('McpManager error handling', () => { errors: new Map([['file1.json', 'Initial error']]), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -1538,7 +1529,6 @@ describe('McpManager error handling', () => { errors: new Map(), agentConfig: { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpManager.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpManager.ts index 04f827ff2c..9b155b3d8c 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpManager.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpManager.ts @@ -26,6 +26,7 @@ import { isEmptyEnv, loadAgentConfig, saveAgentConfig, + saveServerSpecificAgentConfig, sanitizeName, getGlobalAgentConfigPath, getWorkspaceMcpConfigPaths, @@ -37,9 +38,16 @@ import { Mutex } from 'async-mutex' import path = require('path') import { URI } from 'vscode-uri' import { sanitizeInput } from '../../../../shared/utils' +import { ProfileStatusMonitor } from './profileStatusMonitor' +import { OAuthClient } from './mcpOauthClient' +import { AgentPermissionManager } from './agentPermissionManager' export const MCP_SERVER_STATUS_CHANGED = 'mcpServerStatusChanged' export const AGENT_TOOLS_CHANGED = 'agentToolsChanged' +export enum AuthIntent { + Interactive = 'interactive', + Silent = 'silent', +} /** * Manages MCP servers and their tools @@ -58,12 +66,13 @@ export class McpManager { private toolNameMapping: Map private serverNameMapping: Map private agentConfig!: AgentConfig + private permissionManager!: AgentPermissionManager private constructor( private agentPaths: string[], private features: Pick< Features, - 'logging' | 'workspace' | 'lsp' | 'telemetry' | 'credentialsProvider' | 'runtime' + 'logging' | 'workspace' | 'lsp' | 'telemetry' | 'credentialsProvider' | 'runtime' | 'agent' > ) { this.mcpTools = [] @@ -80,13 +89,23 @@ export class McpManager { public static async init( agentPaths: string[], - features: Pick + features: Pick< + Features, + 'logging' | 'workspace' | 'lsp' | 'telemetry' | 'credentialsProvider' | 'runtime' | 'agent' + > ): Promise { if (!McpManager.#instance) { const mgr = new McpManager(agentPaths, features) McpManager.#instance = mgr - await mgr.discoverAllServers() - features.logging.info(`MCP: discovered ${mgr.mcpTools.length} tools across all servers`) + + const shouldDiscoverServers = ProfileStatusMonitor.getMcpState() + + if (shouldDiscoverServers) { + await mgr.discoverAllServers() + features.logging.info(`MCP: discovered ${mgr.mcpTools.length} tools across all servers`) + } else { + features.logging.info('MCP: initialized without server discovery') + } // Emit MCP configuration metrics const serverConfigs = mgr.getAllServerConfigs() @@ -163,6 +182,12 @@ export class McpManager { // Extract agent config and other data this.agentConfig = result.agentConfig + this.permissionManager = new AgentPermissionManager( + this.agentConfig, + (serverName: string) => this.getAvailableToolsForServer(serverName), + () => this.getAllAvailableServerNames(), + () => this.getAllBuiltinToolNames() + ) this.mcpServers = result.servers this.serverNameMapping = result.serverNameMapping @@ -178,14 +203,52 @@ export class McpManager { // Reset permissions map this.mcpServerPermissions.clear() - - // Initialize permissions for servers from agent config + // Create init state for (const [sanitizedName, _] of this.mcpServers.entries()) { - const name = this.serverNameMapping.get(sanitizedName) || sanitizedName - // Set server status to UNINITIALIZED initially this.setState(sanitizedName, McpServerStatus.UNINITIALIZED, 0) + } + // Get all servers that need to be initialized + const serversToInit: Array<[string, MCPServerConfig]> = [] + + for (const [name, cfg] of this.mcpServers.entries()) { + if (this.isServerDisabled(name)) { + this.features.logging.info(`MCP: server '${name}' is disabled by persona settings, skipping`) + this.setState(name, McpServerStatus.DISABLED, 0) + this.emitToolsChanged(name) + continue + } + serversToInit.push([name, cfg]) + } + + // Process servers in batches of 5 at a time + const MAX_CONCURRENT_SERVERS = 5 + const totalServers = serversToInit.length + + if (totalServers > 0) { + this.features.logging.info( + `MCP: initializing ${totalServers} servers with max concurrency of ${MAX_CONCURRENT_SERVERS}` + ) + + // Process servers in batches + for (let i = 0; i < totalServers; i += MAX_CONCURRENT_SERVERS) { + const batch = serversToInit.slice(i, i + MAX_CONCURRENT_SERVERS) + const batchPromises = batch.map(([name, cfg]) => this.initOneServer(name, cfg, AuthIntent.Silent)) + + this.features.logging.debug( + `MCP: initializing batch of ${batch.length} servers (${i + 1}-${Math.min(i + MAX_CONCURRENT_SERVERS, totalServers)} of ${totalServers})` + ) + await Promise.all(batchPromises) + } + + this.features.logging.info(`MCP: completed initialization of ${totalServers} servers`) + } else { + // Emit event to refresh MCP list page when no servers are configured + this.setState('no-servers', McpServerStatus.UNINITIALIZED, 0) + } + for (const [sanitizedName, _] of this.mcpServers.entries()) { + const name = this.serverNameMapping.get(sanitizedName) || sanitizedName // Initialize permissions for this server const serverPrefix = `@${name}` @@ -208,9 +271,18 @@ export class McpManager { }) } else { // Only specific tools are enabled + // get allTools of this server, if it's not in tools --> it's denied + // have to move the logic after all servers finish init, because that's when we have list of tools + const deniedTools = new Set( + this.getAllTools() + .filter(tool => tool.serverName === name) + .map(tool => tool.toolName) + ) this.agentConfig.tools.forEach(tool => { if (tool.startsWith(serverPrefix + '/')) { + // remove this from deniedTools const toolName = tool.substring(serverPrefix.length + 1) + deniedTools.delete(toolName) if (toolName) { // Check if tool is in allowedTools if (this.agentConfig.allowedTools.includes(tool)) { @@ -221,6 +293,11 @@ export class McpManager { } } }) + + // update permission to deny for rest of the tools + deniedTools.forEach(tool => { + toolPerms[tool] = McpPermissionType.deny + }) } this.mcpServerPermissions.set(sanitizedName, { @@ -228,57 +305,25 @@ export class McpManager { toolPerms, }) } - - // Get all servers that need to be initialized - const serversToInit: Array<[string, MCPServerConfig]> = [] - - for (const [name, cfg] of this.mcpServers.entries()) { - if (this.isServerDisabled(name)) { - this.features.logging.info(`MCP: server '${name}' is disabled by persona settings, skipping`) - this.setState(name, McpServerStatus.DISABLED, 0) - this.emitToolsChanged(name) - continue - } - serversToInit.push([name, cfg]) - } - - // Process servers in batches of 5 at a time - const MAX_CONCURRENT_SERVERS = 5 - const totalServers = serversToInit.length - - if (totalServers > 0) { - this.features.logging.info( - `MCP: initializing ${totalServers} servers with max concurrency of ${MAX_CONCURRENT_SERVERS}` - ) - - // Process servers in batches - for (let i = 0; i < totalServers; i += MAX_CONCURRENT_SERVERS) { - const batch = serversToInit.slice(i, i + MAX_CONCURRENT_SERVERS) - const batchPromises = batch.map(([name, cfg]) => this.initOneServer(name, cfg)) - - this.features.logging.debug( - `MCP: initializing batch of ${batch.length} servers (${i + 1}-${Math.min(i + MAX_CONCURRENT_SERVERS, totalServers)} of ${totalServers})` - ) - await Promise.all(batchPromises) - } - - this.features.logging.info(`MCP: completed initialization of ${totalServers} servers`) - } } /** * Start a server process, connect client, and register its tools. * Errors are logged but do not stop discovery of other servers. */ - private async initOneServer(serverName: string, cfg: MCPServerConfig): Promise { - const DEFAULT_SERVER_INIT_TIMEOUT_MS = 60_000 + private async initOneServer( + serverName: string, + cfg: MCPServerConfig, + authIntent: AuthIntent = AuthIntent.Silent + ): Promise { + const DEFAULT_SERVER_INIT_TIMEOUT_MS = 120_000 this.setState(serverName, McpServerStatus.INITIALIZING, 0) try { this.features.logging.debug(`MCP: initializing server [${serverName}]`) const client = new Client({ - name: `mcp-client-${serverName}`, + name: `q-chat-plugin`, // Do not use server name in the client name to avoid polluting builder-mcp metrics version: '1.0.0', }) @@ -286,6 +331,7 @@ export class McpManager { const isStdio = !!cfg.command const doConnect = async () => { if (isStdio) { + // stdio transport const mergedEnv = { ...(process.env as Record), // Make sure we do not have empty key and value in mergedEnv, or adding server through UI will fail on Windows @@ -326,11 +372,52 @@ export class McpManager { ) } } else { + // streamable http/SSE transport const base = new URL(cfg.url!) try { + // Use HEAD to check if it needs OAuth + let headers: Record = { ...(cfg.headers ?? {}) } + let needsOAuth = false + try { + const headResp = await fetch(base, { method: 'HEAD', headers }) + const www = headResp.headers.get('www-authenticate') || '' + needsOAuth = headResp.status === 401 || headResp.status === 403 || /bearer/i.test(www) + } catch { + this.features.logging.info(`MCP: HEAD not available`) + } + + if (needsOAuth) { + OAuthClient.initialize(this.features.workspace, this.features.logging, this.features.lsp) + try { + const bearer = await OAuthClient.getValidAccessToken(base, { + interactive: authIntent === AuthIntent.Interactive, + }) + if (bearer) { + headers = { ...headers, Authorization: `Bearer ${bearer}` } + } else if (authIntent === AuthIntent.Silent) { + throw new AgenticChatError( + `Server '${serverName}' requires OAuth. Click on Save to reauthenticate.`, + 'MCPServerAuthFailed' + ) + } + } catch (e: any) { + const msg = e?.message || '' + const short = /authorization_timed_out/i.test(msg) + ? 'Sign-in timed out. Please try again.' + : /Authorization error|PKCE|access_denied|login|consent|token exchange failed/i.test( + msg + ) + ? 'Sign-in was cancelled or failed. Please try again.' + : `OAuth failed: ${msg}` + + throw new AgenticChatError(`MCP: ${short}`, 'MCPServerAuthFailed') + } + } + try { // try streamable http first - transport = new StreamableHTTPClientTransport(base, this.buildHttpOpts(cfg.headers)) + transport = new StreamableHTTPClientTransport(base, this.buildHttpOpts(headers)) + this.features.logging.info(`MCP: Connecting MCP server using StreamableHTTPClientTransport`) await client.connect(transport) } catch (err) { @@ -338,13 +425,14 @@ export class McpManager { this.features.logging.info( `MCP: streamable http connect failed for [${serverName}], fallback to SSEClientTransport: ${String(err)}` ) - transport = new SSEClientTransport(new URL(cfg.url!), this.buildSseOpts(cfg.headers)) + transport = new SSEClientTransport(new URL(cfg.url!), this.buildSseOpts(headers)) await client.connect(transport) } } catch (err: any) { let errorMessage = err?.message ?? String(err) + const oauthHint = /oauth/i.test(errorMessage) ? ' (OAuth)' : '' throw new AgenticChatError( - `MCP: server '${serverName}' failed to connect: ${errorMessage}`, + `MCP: server '${serverName}' failed to connect${oauthHint}: ${errorMessage}`, 'MCPServerConnectionFailed' ) } @@ -462,22 +550,7 @@ export class McpManager { // Get unsanitized server name for prefix const unsanitizedServerName = this.serverNameMapping.get(server) || server - - // Check if the server is enabled as a whole (@server) - const serverPrefix = `@${unsanitizedServerName}` - const isWholeServerEnabled = this.agentConfig.tools.includes(serverPrefix) - - // Check if the specific tool is enabled - const toolId = `${serverPrefix}/${tool}` - const isSpecificToolEnabled = this.agentConfig.tools.includes(toolId) - - // If server is enabled as a whole, all tools are enabled - if (isWholeServerEnabled) { - return false - } - - // Otherwise, check if this specific tool is enabled - return !isSpecificToolEnabled + return !this.permissionManager.isToolEnabled(server === 'builtIn' ? 'builtIn' : unsanitizedServerName, tool) } /** @@ -492,42 +565,8 @@ export class McpManager { * Returns tool permission type for a given tool. */ public getToolPerm(server: string, tool: string): McpPermissionType { - // For built-in tools, check directly without prefix - if (server === 'builtIn') { - return this.agentConfig.allowedTools.includes(tool) ? McpPermissionType.alwaysAllow : McpPermissionType.ask - } - - // Get unsanitized server name for prefix const unsanitizedServerName = this.serverNameMapping.get(server) || server - - // Check if the server is enabled as a whole (@server) - const serverPrefix = `@${unsanitizedServerName}` - const isWholeServerEnabled = this.agentConfig.tools.includes(serverPrefix) - - // Check if the specific tool is enabled - const toolId = `${serverPrefix}/${tool}` - const isSpecificToolEnabled = this.agentConfig.tools.includes(toolId) - - // If the tool is not enabled, return deny - if (!isWholeServerEnabled && !isSpecificToolEnabled) { - return McpPermissionType.deny - } - - // If server is enabled as a whole, check if the server itself is in allowedTools - if (isWholeServerEnabled) { - // If server is in allowedTools, all tools are alwaysAllow - if (this.agentConfig.allowedTools.includes(serverPrefix)) { - return McpPermissionType.alwaysAllow - } - - // Otherwise, check if specific tool is in allowedTools - return this.agentConfig.allowedTools.includes(toolId) - ? McpPermissionType.alwaysAllow - : McpPermissionType.ask - } - - // For specific tools, check if it's in allowedTools - return this.agentConfig.allowedTools.includes(toolId) ? McpPermissionType.alwaysAllow : McpPermissionType.ask + return this.permissionManager.getToolPermission(server === 'builtIn' ? 'builtIn' : unsanitizedServerName, tool) } /** @@ -606,7 +645,12 @@ export class McpManager { /** * Add a new server: persist config, register in memory, and initialize. */ - public async addServer(serverName: string, cfg: MCPServerConfig, agentPath: string): Promise { + public async addServer( + serverName: string, + cfg: MCPServerConfig, + configPath: string, + isLegacyMcpServer: boolean = false + ): Promise { try { const sanitizedName = sanitizeName(serverName) if ( @@ -616,58 +660,119 @@ export class McpManager { throw new Error(`MCP: server '${sanitizedName}' already exists`) } - // Add server to agent config - const serverConfig: MCPServerConfig = { - command: cfg.command, - url: cfg.url, - initializationTimeout: cfg.initializationTimeout, - disabled: cfg.disabled ?? false, - } - // Only add timeout to agent config if it's not 0 - if (cfg.timeout !== 0) { - serverConfig.timeout = cfg.timeout - } - if (cfg.args && cfg.args.length > 0) { - serverConfig.args = cfg.args - } - if (cfg.env && !isEmptyEnv(cfg.env)) { - serverConfig.env = cfg.env - } - if (cfg.headers && !isEmptyEnv(cfg.headers)) { - serverConfig.headers = cfg.headers - } + if (isLegacyMcpServer) { + // Handle legacy MCP config file + await this.mutateConfigFile(configPath, (json: any) => { + if (!json.mcpServers) { + json.mcpServers = {} + } + json.mcpServers[serverName] = { + command: cfg.command, + url: cfg.url, + args: cfg.args, + env: cfg.env, + headers: cfg.headers, + timeout: cfg.timeout, + initializationTimeout: cfg.initializationTimeout, + disabled: cfg.disabled ?? false, + } + }) - // Add to agent config - this.agentConfig.mcpServers[serverName] = serverConfig + // Move tool permissions to corresponding agent path + const agentPath = configPath.replace( + path.sep + 'mcp.json', + path.sep + 'agents' + path.sep + 'default.json' + ) - // We don't need to store configPath anymore as we're using agent config - const newCfg: MCPServerConfig = { ...cfg, __configPath__: agentPath } - this.mcpServers.set(sanitizedName, newCfg) - this.serverNameMapping.set(sanitizedName, serverName) + const serverPrefix = `@${serverName}` + let serverTools = this.agentConfig.tools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) + if (serverTools.length === 0) { + serverTools = [serverPrefix] + } + let serverAllowedTools = this.agentConfig.allowedTools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) - // Check if the server already has permissions in the agent config - const serverPrefix = `@${serverName}` - const hasServerInTools = this.agentConfig.tools.some( - tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) - ) + // Push to agent config after setup + this.agentConfig.tools.push(...serverTools.filter(tool => !this.agentConfig.tools.includes(tool))) + this.agentConfig.allowedTools.push( + ...serverAllowedTools.filter(tool => !this.agentConfig.allowedTools.includes(tool)) + ) + + await saveServerSpecificAgentConfig( + this.features.workspace, + this.features.logging, + serverName, + null, + serverTools, + serverAllowedTools, + agentPath, + true + ) + } else { + // Add server to agent config + const serverConfig: MCPServerConfig = { + command: cfg.command, + url: cfg.url, + initializationTimeout: cfg.initializationTimeout, + disabled: cfg.disabled ?? false, + } + // Only add timeout to agent config if it's not 0 + if (cfg.timeout !== undefined) { + serverConfig.timeout = cfg.timeout + } + if (cfg.args && cfg.args.length > 0) { + serverConfig.args = cfg.args + } + if (cfg.env && !isEmptyEnv(cfg.env)) { + serverConfig.env = cfg.env + } + if (cfg.headers && !isEmptyEnv(cfg.headers)) { + serverConfig.headers = cfg.headers + } + + // Add to agent config + this.agentConfig.mcpServers[serverName] = serverConfig + + // Check if the server already has permissions in the agent config + const serverPrefix = `@${serverName}` + const hasServerInTools = this.agentConfig.tools.some( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) + + // Only set permissions if the server doesn't already have them + if (!hasServerInTools) { + // Enable the server as a whole rather than individual tools + this.agentConfig.tools.push(serverPrefix) + } - // Only set permissions if the server doesn't already have them - if (!hasServerInTools) { - // Enable the server as a whole rather than individual tools - this.agentConfig.tools.push(serverPrefix) + // Save server-specific changes to agent config + const serverTools = this.agentConfig.tools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) + const serverAllowedTools = this.agentConfig.allowedTools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) + + await saveServerSpecificAgentConfig( + this.features.workspace, + this.features.logging, + serverName, + serverConfig, + serverTools, + serverAllowedTools, + configPath + ) } - // Save agent config once with all changes - await saveAgentConfig( - this.features.workspace, - this.features.logging, - this.agentConfig, - agentPath, - serverName - ) + const newCfg: MCPServerConfig = { ...cfg, __configPath__: configPath } + this.mcpServers.set(sanitizedName, newCfg) + this.serverNameMapping.set(sanitizedName, serverName) // Add server tools to tools list after initialization - await this.initOneServer(sanitizedName, newCfg) + await this.initOneServer(sanitizedName, newCfg, AuthIntent.Interactive) } catch (err) { this.features.logging.error( `Failed to add MCP server '${serverName}': ${err instanceof Error ? err.message : String(err)}` @@ -696,6 +801,24 @@ export class McpManager { this.mcpTools = this.mcpTools.filter(t => t.serverName !== serverName) this.mcpServerStates.delete(serverName) + // Check if this is a legacy MCP server (from MCP config file) + const isLegacyMcpServer = cfg.__configPath__?.endsWith('mcp.json') + let agentPath: string | undefined + + if (isLegacyMcpServer && unsanitizedName) { + // Remove from MCP config file + await this.mutateConfigFile(cfg.__configPath__, (json: any) => { + if (json.mcpServers && json.mcpServers[unsanitizedName]) { + delete json.mcpServers[unsanitizedName] + } + }) + + agentPath = cfg.__configPath__.replace( + path.sep + 'mcp.json', + path.sep + 'agents' + path.sep + 'default.json' + ) + } + // Remove from agent config if (unsanitizedName && this.agentConfig) { // Remove server from mcpServers @@ -727,38 +850,17 @@ export class McpManager { return true }) - // Save agent config - await saveAgentConfig( + // Save server removal to agent config + await saveServerSpecificAgentConfig( this.features.workspace, this.features.logging, - this.agentConfig, - cfg.__configPath__, - unsanitizedName + unsanitizedName, + null, // null indicates server should be removed + [], + [], + isLegacyMcpServer ? agentPath! : cfg.__configPath__, + isLegacyMcpServer ) - - // Get all config paths and delete the server from each one - const wsUris = this.features.workspace.getAllWorkspaceFolders()?.map(f => f.uri) ?? [] - const wsConfigPaths = getWorkspaceMcpConfigPaths(wsUris) - const globalConfigPath = getGlobalMcpConfigPath(this.features.workspace.fs.getUserHomeDir()) - const allConfigPaths = [...wsConfigPaths, globalConfigPath] - - // Delete the server from all config files - for (const configPath of allConfigPaths) { - try { - await this.mutateConfigFile(configPath, json => { - if (json.mcpServers && json.mcpServers[unsanitizedName]) { - delete json.mcpServers[unsanitizedName] - this.features.logging.info( - `Deleted server '${unsanitizedName}' from config file: ${configPath}` - ) - } - }) - } catch (err) { - this.features.logging.warn( - `Failed to delete server '${unsanitizedName}' from config file ${configPath}: ${err}` - ) - } - } } this.mcpServers.delete(serverName) @@ -816,13 +918,23 @@ export class McpManager { } this.agentConfig.mcpServers[unsanitizedServerName] = updatedConfig - // Save agent config - await saveAgentConfig( + // Save server-specific changes to agent config + const serverPrefix = `@${unsanitizedServerName}` + const serverTools = this.agentConfig.tools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) + const serverAllowedTools = this.agentConfig.allowedTools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) + + await saveServerSpecificAgentConfig( this.features.workspace, this.features.logging, - this.agentConfig, - agentPath, - unsanitizedServerName + unsanitizedServerName, + updatedConfig, + serverTools, + serverAllowedTools, + agentPath ) } @@ -844,7 +956,7 @@ export class McpManager { this.setState(serverName, McpServerStatus.DISABLED, 0) this.emitToolsChanged(serverName) } else { - await this.initOneServer(serverName, newCfg) + await this.initOneServer(serverName, newCfg, AuthIntent.Interactive) } } catch (err) { this.handleError(serverName, err) @@ -870,15 +982,14 @@ export class McpManager { this.mcpServers.clear() this.mcpServerStates.clear() this.agentConfig = { - name: 'default-agent', - version: '1.0.0', + name: 'q_ide_default', description: 'Agent configuration', mcpServers: {}, tools: [], allowedTools: [], toolsSettings: {}, - includedFiles: [], resources: [], + useLegacyMcpJson: true, } if (!keepInstance) { McpManager.#instance = undefined @@ -901,7 +1012,11 @@ export class McpManager { // Restore the saved tool name mapping this.setToolNameMapping(savedToolNameMapping) - await this.discoverAllServers() + const shouldDiscoverServers = ProfileStatusMonitor.getMcpState() + + if (shouldDiscoverServers) { + await this.discoverAllServers() + } const reinitializedServerCount = McpManager.#instance?.mcpServers.size this.features.logging.info( @@ -928,128 +1043,98 @@ export class McpManager { const serverPrefix = `@${unsanitizedServerName}` - // Track tools that should be enabled - const toolsToEnable = new Set() - const toolsToAlwaysAllow = new Set() + // Check if this is a legacy MCP server (from MCP config file) + const isLegacyMcpServer = serverConfig.__configPath__?.endsWith('mcp.json') - // Check if server is enabled as a whole - const isWholeServerEnabled = this.agentConfig.tools.includes(serverPrefix) - - // Process each tool permission + // For agent config servers, use the permission manager for (const [toolName, permission] of Object.entries(perm.toolPerms || {})) { - const toolId = `${serverPrefix}/${toolName}` - - if (permission === McpPermissionType.deny) { - // For deny: if server is enabled as a whole, we need to switch to individual tools - if (isWholeServerEnabled) { - // Get all tools for this server - const serverTools = this.mcpTools.filter(t => t.serverName === serverName) - - // Remove server prefix from tools - this.agentConfig.tools = this.agentConfig.tools.filter(t => t !== serverPrefix) - - // Add all tools except the denied one - for (const t of serverTools) { - if (t.toolName !== toolName) { - const tid = `${serverPrefix}/${t.toolName}` - if (!this.agentConfig.tools.includes(tid)) { - this.agentConfig.tools.push(tid) - } - toolsToEnable.add(tid) - } - } - } else { - // Just remove the specific tool - this.agentConfig.tools = this.agentConfig.tools.filter(t => t !== toolId) - } - - // Always remove from allowedTools - this.agentConfig.allowedTools = this.agentConfig.allowedTools.filter(t => t !== toolId) - } else { - // For ask or alwaysAllow: add to tools - toolsToEnable.add(toolId) - - // For alwaysAllow: also add to allowedTools - if (permission === McpPermissionType.alwaysAllow) { - toolsToAlwaysAllow.add(toolId) - } else { - // For ask: remove from allowedTools if present - this.agentConfig.allowedTools = this.agentConfig.allowedTools.filter(t => t !== toolId) - } - } + this.permissionManager.setToolPermission(unsanitizedServerName, toolName, permission) } - // If all tools are enabled, use @serverName instead of individual tools - const allTools = this.mcpTools.filter(t => t.serverName === serverName).map(t => t.toolName) - - // Check if all tools are enabled, considering both: - // 1. The server might already be enabled as a whole (isWholeServerEnabled) - // 2. All tools might be individually enabled in toolsToEnable - const allToolsEnabled = - allTools.length > 0 && - // If server is already enabled as a whole and no tools are being denied - ((isWholeServerEnabled && !Object.values(perm.toolPerms || {}).includes(McpPermissionType.deny)) || - // Or if all tools are individually enabled - allTools.every( - toolName => - toolsToEnable.has(`${serverPrefix}/${toolName}`) || - !Object.keys(perm.toolPerms || {}).includes(toolName) - )) - - // Update tools list - if (allToolsEnabled) { - // Remove individual tool entries - this.agentConfig.tools = this.agentConfig.tools.filter(t => !t.startsWith(`${serverPrefix}/`)) - // Add server prefix if not already there - if (!this.agentConfig.tools.includes(serverPrefix)) { - this.agentConfig.tools.push(serverPrefix) - } - } else { - // Remove server prefix if present - this.agentConfig.tools = this.agentConfig.tools.filter(t => t !== serverPrefix) - // Add individual tools - for (const toolId of toolsToEnable) { - if (!this.agentConfig.tools.includes(toolId)) { - this.agentConfig.tools.push(toolId) - } - } - } + // Update the agent config from the permission manager + this.agentConfig = this.permissionManager.getAgentConfig() - // Update allowedTools list - for (const toolId of toolsToAlwaysAllow) { - if (!this.agentConfig.allowedTools.includes(toolId)) { - this.agentConfig.allowedTools.push(toolId) - } - } + if (isLegacyMcpServer) { + // For legacy MCP servers, save permissions to agent config file and update MCP config for enable/disable + const mcpConfigPath = serverConfig.__configPath__! + const agentPath = mcpConfigPath.replace( + path.sep + 'mcp.json', + path.sep + 'agents' + path.sep + 'default.json' + ) - // Update server enabled/disabled state in agent config - if (this.agentConfig.mcpServers[unsanitizedServerName]) { - this.agentConfig.mcpServers[unsanitizedServerName].disabled = !perm.enabled - } + // Update MCP config for enable/disable + await this.mutateConfigFile(mcpConfigPath, (json: any) => { + if (!json.mcpServers[unsanitizedServerName]) { + json.mcpServers[unsanitizedServerName] = { ...serverConfig } + delete json.mcpServers[unsanitizedServerName].__configPath__ + } + json.mcpServers[unsanitizedServerName].disabled = !perm.enabled + }) - // Also update the mcpServers map - if (serverConfig) { - serverConfig.disabled = !perm.enabled - } + // Use the same function but with corrected agent path + const serverPrefix = `@${unsanitizedServerName}` + const serverTools = this.agentConfig.tools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) + const serverAllowedTools = this.agentConfig.allowedTools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) - // Save agent config - const agentPath = perm.__configPath__ - if (agentPath) { - await saveAgentConfig( + await saveServerSpecificAgentConfig( this.features.workspace, this.features.logging, - this.agentConfig, + unsanitizedServerName, + null, // Don't save server config to agent file for legacy servers + serverTools, + serverAllowedTools, agentPath, - unsanitizedServerName + isLegacyMcpServer ) } - // Update mcpServerPermissions map + // Update mcpServerPermissions map immediately to reflect changes this.mcpServerPermissions.set(serverName, { enabled: perm.enabled, toolPerms: perm.toolPerms || {}, }) + // Update server enabled/disabled state (only for non-legacy servers) + if (!isLegacyMcpServer) { + if (this.agentConfig.mcpServers[unsanitizedServerName]) { + this.agentConfig.mcpServers[unsanitizedServerName].disabled = !perm.enabled + } + } + + // Always update the mcpServers map + if (serverConfig) { + serverConfig.disabled = !perm.enabled + } + + // Save only server-specific changes to agent config (for non-legacy servers) + if (!isLegacyMcpServer) { + const agentPath = perm.__configPath__ + if (agentPath) { + // Collect server-specific tools and allowedTools + const serverPrefix = `@${unsanitizedServerName}` + const serverTools = this.agentConfig.tools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) + const serverAllowedTools = this.agentConfig.allowedTools.filter( + tool => tool === serverPrefix || tool.startsWith(`${serverPrefix}/`) + ) + + await saveServerSpecificAgentConfig( + this.features.workspace, + this.features.logging, + unsanitizedServerName, + this.agentConfig.mcpServers[unsanitizedServerName], + serverTools, + serverAllowedTools, + agentPath + ) + } + } + // enable/disable server if (this.isServerDisabled(serverName)) { const client = this.clients.get(serverName) @@ -1059,8 +1144,8 @@ export class McpManager { } this.setState(serverName, McpServerStatus.DISABLED, 0) } else { - if (!this.clients.has(serverName)) { - await this.initOneServer(serverName, this.mcpServers.get(serverName)!) + if (!this.clients.has(serverName) && serverName !== 'Built-in') { + await this.initOneServer(serverName, this.mcpServers.get(serverName)!, AuthIntent.Silent) } } @@ -1087,6 +1172,38 @@ export class McpManager { return !this.agentConfig.allowedTools.includes(toolId) } + /** + * Get available tools for a specific server + */ + private getAvailableToolsForServer(serverName: string): string[] { + return this.mcpTools.filter(tool => tool.serverName === serverName).map(tool => tool.toolName) + } + + /** + * Get all available server names + */ + private getAllAvailableServerNames(): string[] { + const serverNames = new Set() + for (const tool of this.mcpTools) { + serverNames.add(tool.serverName) + } + return Array.from(serverNames) + } + + /** + * Get all builtin tool names + */ + private getAllBuiltinToolNames(): string[] { + return this.features.agent?.getBuiltInToolNames() || [] + } + + /** + * get server's tool permission + */ + public getMcpServerPermissions(serverName: string): MCPServerPermission | undefined { + return this.mcpServerPermissions.get(serverName) + } + /** * Returns any errors that occurred during loading of MCP configuration files */ @@ -1106,7 +1223,8 @@ export class McpManager { */ public async removeServerFromConfigFile(serverName: string): Promise { try { - const cfg = this.mcpServers.get(serverName) + const sanitized = sanitizeName(serverName) + const cfg = this.mcpServers.get(sanitized) if (!cfg || !cfg.__configPath__) { this.features.logging.warn( `Cannot remove config for server '${serverName}': Config not found or missing path` @@ -1114,7 +1232,7 @@ export class McpManager { return } - const unsanitizedName = this.serverNameMapping.get(serverName) || serverName + const unsanitizedName = this.serverNameMapping.get(sanitized) || serverName // Remove from agent config if (unsanitizedName && this.agentConfig) { @@ -1147,13 +1265,15 @@ export class McpManager { return true }) - // Save agent config - await saveAgentConfig( + // Save server removal to agent config + await saveServerSpecificAgentConfig( this.features.workspace, this.features.logging, - this.agentConfig, - cfg.__configPath__, - unsanitizedName + unsanitizedName, + null, // null indicates server should be removed + [], + [], + cfg.__configPath__ ) } } catch (err) { @@ -1223,7 +1343,8 @@ export class McpManager { if (!config) return false const globalAgentPath = getGlobalAgentConfigPath(this.features.workspace.fs.getUserHomeDir()) - return config.__configPath__ === globalAgentPath + const globalMcpPath = getGlobalMcpConfigPath(this.features.workspace.fs.getUserHomeDir()) + return config.__configPath__ === globalAgentPath || config.__configPath__ === globalMcpPath } public setToolNameMapping(mapping: Map): void { @@ -1261,11 +1382,21 @@ export class McpManager { private handleError(server: string | undefined, err: unknown) { const msg = err instanceof Error ? err.message : String(err) - this.features.logging.error(`MCP ERROR${server ? ` [${server}]` : ''}: ${msg}`) + const isBenignSseDisconnect = + /SSE error:\s*TypeError:\s*terminated:\s*Body Timeout Error/i.test(msg) || + /TypeError:\s*terminated:\s*Body Timeout Error/i.test(msg) || + /TypeError:\s*terminated:\s*other side closed/i.test(msg) || + /ECONNRESET|ENETRESET|EPIPE/i.test(msg) - if (server) { - this.setState(server, McpServerStatus.FAILED, 0, msg) - this.emitToolsChanged(server) + if (isBenignSseDisconnect) { + this.features.logging.debug(`MCP SSE idle timeout${server ? ` [${server}]` : ''}: ${msg}`) + } else { + // default path for real errors + this.features.logging.error(`MCP ERROR${server ? ` [${server}]` : ''}: ${msg}`) + if (server) { + this.setState(server, McpServerStatus.FAILED, 0, msg) + this.emitToolsChanged(server) + } } } diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpOauthClient.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpOauthClient.test.ts new file mode 100644 index 0000000000..ea711319a5 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpOauthClient.test.ts @@ -0,0 +1,129 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +import { expect } from 'chai' +import * as sinon from 'sinon' +import * as crypto from 'crypto' +import * as http from 'http' +import { EventEmitter } from 'events' +import * as path from 'path' +import { OAuthClient } from './mcpOauthClient' + +const fakeLogger = { + log: () => {}, + debug: () => {}, + info: () => {}, + warn: () => {}, + error: () => {}, +} + +const fakeLsp = { + window: { + showDocument: sinon.stub().resolves({ success: true }), + }, +} as any + +const fakeWorkspace = { + fs: { + exists: async (_path: string) => false, + readFile: async (_path: string) => Buffer.from('{}'), + writeFile: async (_path: string, _d: any) => {}, + mkdir: async (_dir: string, _opts: any) => {}, + }, +} as any + +function stubFileSystem(tokenObj?: any, regObj?: any): void { + const cacheDir = (OAuthClient as any).cacheDir as string + const tokPath = path.join(cacheDir, 'testkey.token.json') + const regPath = path.join(cacheDir, 'testkey.registration.json') + + const existsStub = sinon.stub(fakeWorkspace.fs, 'exists') + existsStub.callsFake(async (p: any) => { + if (p === tokPath && tokenObj) return true + if (p === regPath && regObj) return true + return false + }) + + const readStub = sinon.stub(fakeWorkspace.fs, 'readFile') + readStub.callsFake(async (p: any) => { + if (p === tokPath && tokenObj) return Buffer.from(JSON.stringify(tokenObj)) + if (p === regPath && regObj) return Buffer.from(JSON.stringify(regObj)) + return Buffer.from('{}') + }) + + sinon.stub(fakeWorkspace.fs, 'writeFile').resolves() + sinon.stub(fakeWorkspace.fs, 'mkdir').resolves() +} + +function stubHttpServer(): void { + sinon.stub(http, 'createServer').callsFake(() => { + const srv = new EventEmitter() as unknown as http.Server & EventEmitter + ;(srv as any).address = () => ({ address: '127.0.0.1', port: 12345, family: 'IPv4' }) + ;(srv as any).listen = (_port?: any, _host?: any, _backlog?: any, cb?: any) => { + if (typeof cb === 'function') cb() + // simulate async readiness like a real server + process.nextTick(() => srv.emit('listening')) + return srv + } + ;(srv as any).close = (cb?: any) => { + if (typeof cb === 'function') cb() + srv.removeAllListeners() + return srv + } + return srv + }) +} + +describe('OAuthClient helpers', () => { + it('computeKey() generates deterministic SHA-256 hex', () => { + const url = new URL('https://example.com/api') + const expected = crypto + .createHash('sha256') + .update(url.origin + url.pathname) + .digest('hex') + const actual = (OAuthClient as any).computeKey(url) + expect(actual).to.equal(expected) + }) + + it('b64url() strips padding and is URL-safe', () => { + const buf = Buffer.from('hello') + const actual = (OAuthClient as any).b64url(buf) + expect(actual).to.equal('aGVsbG8') + }) +}) + +describe('OAuthClient getValidAccessToken()', () => { + const now = Date.now() + + beforeEach(() => { + sinon.restore() + OAuthClient.initialize(fakeWorkspace, fakeLogger as any, fakeLsp) + sinon.stub(OAuthClient as any, 'computeKey').returns('testkey') + stubHttpServer() + ;(fakeLsp.window.showDocument as sinon.SinonStub).resetHistory() + }) + + afterEach(() => sinon.restore()) + + it('returns cached token when still valid', async () => { + const cachedToken = { + access_token: 'cached_access', + expires_in: 3600, + obtained_at: now - 1_000, + } + const cachedReg = { + client_id: 'cid', + redirect_uri: 'http://localhost:12345', + } + + stubFileSystem(cachedToken, cachedReg) + + const token = await OAuthClient.getValidAccessToken(new URL('https://api.example.com/mcp'), { + interactive: true, + }) + expect(token).to.equal('cached_access') + expect((fakeLsp.window.showDocument as sinon.SinonStub).called).to.be.false + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpOauthClient.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpOauthClient.ts new file mode 100644 index 0000000000..2e207c449e --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpOauthClient.ts @@ -0,0 +1,484 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +import type { RequestInit } from 'node-fetch' +import * as crypto from 'crypto' +import * as path from 'path' +import { spawn } from 'child_process' +import { URL, URLSearchParams } from 'url' +import * as http from 'http' +import * as os from 'os' +import { Logger, Workspace, Lsp } from '@aws/language-server-runtimes/server-interface' + +interface Token { + access_token: string + expires_in: number + refresh_token?: string + obtained_at: number +} + +interface Meta { + authorization_endpoint: string + token_endpoint: string + registration_endpoint?: string +} + +interface Registration { + client_id: string + client_secret?: string + expires_at?: number + redirect_uri: string +} + +export class OAuthClient { + private static logger: Logger + private static workspace: Workspace + private static lsp: Lsp + + public static initialize(ws: Workspace, logger: Logger, lsp: Lsp): void { + this.workspace = ws + this.logger = logger + this.lsp = lsp + } + + /** + * Return a valid Bearer token, reusing cache or refresh-token if possible, + * otherwise (when interactive) driving one PKCE flow that may launch a browser. + */ + public static async getValidAccessToken( + mcpBase: URL, + opts: { interactive?: boolean } = { interactive: false } + ): Promise { + const interactive = opts?.interactive === true + const key = this.computeKey(mcpBase) + const regPath = path.join(this.cacheDir, `${key}.registration.json`) + const tokPath = path.join(this.cacheDir, `${key}.token.json`) + + // ===== Silent branch: try cached token, then refresh, never opens a browser ===== + if (!interactive) { + // 1) cached access token + const cachedTok = await this.read(tokPath) + if (cachedTok) { + const expiry = cachedTok.obtained_at + cachedTok.expires_in * 1000 + if (Date.now() < expiry) { + this.logger.info(`OAuth: using still-valid cached token (silent)`) + return cachedTok.access_token + } + this.logger.info(`OAuth: cached token expired → try refresh (silent)`) + } + + // 2) refresh-token grant (if we have registration and refresh token) + const savedReg = await this.read(regPath) + if (cachedTok?.refresh_token && savedReg) { + try { + const meta = await this.discoverAS(mcpBase) + const refreshed = await this.refreshGrant(meta, savedReg, mcpBase, cachedTok.refresh_token) + if (refreshed) { + await this.write(tokPath, refreshed) + this.logger.info(`OAuth: refresh grant succeeded (silent)`) + return refreshed.access_token + } + this.logger.info(`OAuth: refresh grant did not succeed (silent)`) + } catch (e) { + this.logger.warn(`OAuth: silent refresh failed — ${e instanceof Error ? e.message : String(e)}`) + } + } + + // 3) no token in silent mode → caller should surface auth-required UI + return undefined + } + + // ===== Interactive branch: may open a browser (PKCE) ===== + // 1) Spin up (or reuse) loopback server + redirect URI + let server: http.Server | null = null + let redirectUri: string + const savedReg = await this.read(regPath) + if (savedReg) { + const port = Number(new URL(savedReg.redirect_uri).port) + const normalized = `http://127.0.0.1:${port}` + server = http.createServer() + try { + await this.listen(server, port, '127.0.0.1') + redirectUri = normalized + this.logger.info(`OAuth: reusing redirect URI ${redirectUri}`) + } catch (e: any) { + if (e.code === 'EADDRINUSE') { + try { + server.close() + } catch { + /* ignore */ + } + this.logger.warn(`Port ${port} in use; falling back to new random port`) + ;({ server, redirectUri } = await this.buildCallbackServer()) + this.logger.info(`OAuth: new redirect URI ${redirectUri}`) + await this.workspace.fs.rm(regPath) + } else { + throw e + } + } + } else { + const created = await this.buildCallbackServer() + server = created.server + redirectUri = created.redirectUri + this.logger.info(`OAuth: new redirect URI ${redirectUri}`) + } + + try { + // 2) Try still-valid cached access_token + const cached = await this.read(tokPath) + if (cached) { + const expiry = cached.obtained_at + cached.expires_in * 1000 + if (Date.now() < expiry) { + this.logger.info(`OAuth: using still-valid cached token`) + return cached.access_token + } + this.logger.info(`OAuth: cached token expired → try refresh`) + } + + // 3) Discover AS metadata + let meta: Meta + try { + meta = await this.discoverAS(mcpBase) + } catch (e: any) { + throw new Error(`OAuth discovery failed: ${e?.message ?? String(e)}`) + } + + // 4) Register (or reuse) a dynamic client + const scopes = ['openid', 'offline_access'] + let reg: Registration + try { + reg = await this.obtainClient(meta, regPath, scopes, redirectUri) + } catch (e: any) { + throw new Error(`OAuth client registration failed: ${e?.message ?? String(e)}`) + } + + // 5) Refresh-token grant (one shot) + const attemptedRefresh = !!cached?.refresh_token + if (cached?.refresh_token) { + const refreshed = await this.refreshGrant(meta, reg, mcpBase, cached.refresh_token) + if (refreshed) { + await this.write(tokPath, refreshed) + this.logger.info(`OAuth: refresh grant succeeded`) + return refreshed.access_token + } + this.logger.info(`OAuth: refresh grant failed`) + } + + // 6) PKCE interactive flow + try { + const fresh = await this.pkceGrant(meta, reg, mcpBase, scopes, redirectUri, server) + await this.write(tokPath, fresh) + return fresh.access_token + } catch (e: any) { + const suffix = attemptedRefresh ? ' after refresh attempt' : '' + throw new Error(`OAuth authorization (PKCE) failed${suffix}: ${e?.message ?? String(e)}`) + } + } finally { + if (server) { + await new Promise(res => server!.close(() => res())) + } + } + } + + /** Spin up a one‑time HTTP listener on localhost:randomPort */ + private static async buildCallbackServer(): Promise<{ server: http.Server; redirectUri: string }> { + const server = http.createServer() + await this.listen(server, 0, '127.0.0.1') + const port = (server.address() as any).port as number + return { server, redirectUri: `http://127.0.0.1:${port}` } + } + + /** Discover OAuth endpoints by HEAD/WWW‑Authenticate, well‑known, or fallback */ + private static async discoverAS(rs: URL): Promise { + // a) HEAD → WWW‑Authenticate → resource_metadata + try { + this.logger.info('MCP OAuth: attempting discovery via WWW-Authenticate header') + const h = await this.fetchCompat(rs.toString(), { method: 'HEAD' }) + const header = h.headers.get('www-authenticate') || '' + const m = /resource_metadata=(?:"([^"]+)"|([^,\s]+))/i.exec(header) + if (m) { + const metaUrl = new URL(m[1] || m[2], rs).toString() + this.logger.info(`OAuth: resource_metadata → ${metaUrl}`) + const raw = await this.json(metaUrl) + return await this.fetchASFromResourceMeta(raw, metaUrl) + } + } catch { + this.logger.info('MCP OAuth: no resource_metadata found in WWW-Authenticate header') + } + + // b) well‑known on resource host + this.logger.info('MCP OAuth: attempting discovery via well-known endpoints') + const probes = [ + new URL('.well-known/oauth-authorization-server', rs).toString(), + new URL('.well-known/openid-configuration', rs).toString(), + `${rs.origin}/.well-known/oauth-authorization-server`, + `${rs.origin}/.well-known/openid-configuration`, + ] + for (const url of probes) { + try { + this.logger.info(`MCP OAuth: probing well-known endpoint → ${url}`) + return await this.json(url) + } catch (error) { + this.logger.info(`OAuth: well-known endpoint probe failed for ${url}`) + } + } + + // c) fallback to static OAuth2 endpoints + const base = (rs.origin + rs.pathname).replace(/\/+$/, '') + this.logger.warn(`OAuth: all discovery attempts failed, synthesizing endpoints from ${base}`) + return { + authorization_endpoint: `${base}/authorize`, + token_endpoint: `${base}/access_token`, + } + } + + /** Follow `authorization_server(s)` in resource_metadata JSON */ + private static async fetchASFromResourceMeta(raw: any, metaUrl: string): Promise { + let asBase = raw.authorization_server + if (!asBase && Array.isArray(raw.authorization_servers)) { + asBase = raw.authorization_servers[0] + } + if (!asBase) { + throw new Error(`resource_metadata at ${metaUrl} lacked authorization_server(s)`) + } + + // Attempt both OAuth‑AS and OIDC well‑known + for (const p of ['.well-known/oauth-authorization-server', '.well-known/openid-configuration']) { + try { + return await this.json(new URL(p, asBase).toString()) + } catch { + // next + } + } + // fallback to static OAuth2 endpoints + this.logger.warn(`OAuth: no well-known on ${asBase}, falling back to static endpoints`) + return { + authorization_endpoint: `${asBase}/authorize`, + token_endpoint: `${asBase}/access_token`, + } + } + + /** DCR: POST client metadata → client_id; cache to disk */ + private static async obtainClient( + meta: Meta, + file: string, + scopes: string[], + redirectUri: string + ): Promise { + const existing = await this.read(file) + if (existing && (!existing.expires_at || existing.expires_at * 1000 > Date.now())) { + this.logger.info(`OAuth: reusing client_id ${existing.client_id}`) + return existing + } + + if (!meta.registration_endpoint) { + throw new Error('OAuth: AS does not support dynamic registration') + } + + const body = { + client_name: 'AWS MCP LSP', + grant_types: ['authorization_code', 'refresh_token'], + response_types: ['code'], + token_endpoint_auth_method: 'none', + scope: scopes.join(' '), + redirect_uris: [redirectUri], + } + const resp: any = await this.json(meta.registration_endpoint, { + method: 'POST', + headers: { 'content-type': 'application/json' }, + body: JSON.stringify(body), + }) + + const reg: Registration = { + client_id: resp.client_id, + client_secret: resp.client_secret, + expires_at: resp.client_secret_expires_at, + redirect_uri: redirectUri, + } + await this.write(file, reg) + return reg + } + + /** Try one refresh_token grant; returns new Token or `undefined` */ + private static async refreshGrant( + meta: Meta, + reg: Registration, + rs: URL, + refresh: string + ): Promise { + const form = new URLSearchParams({ + grant_type: 'refresh_token', + refresh_token: refresh, + client_id: reg.client_id, + resource: rs.toString(), + }) + const res = await this.fetchCompat(meta.token_endpoint, { + method: 'POST', + headers: { 'content-type': 'application/x-www-form-urlencoded' }, + body: form, + }) + if (!res.ok) { + const msg = await res.text().catch(() => '') + this.logger.warn(`OAuth: refresh grant HTTP ${res.status} — ${msg?.slice(0, 300)}`) + return undefined + } + const tokenResponse = (await res.json()) as Record + return { ...(tokenResponse as object), obtained_at: Date.now() } as Token + } + + /** One PKCE flow: browser + loopback → code → token */ + private static async pkceGrant( + meta: Meta, + reg: Registration, + rs: URL, + scopes: string[], + redirectUri: string, + server: http.Server + ): Promise { + const DEFAULT_PKCE_TIMEOUT_MS = 90_000 + // a) generate PKCE params + const verifier = this.b64url(crypto.randomBytes(32)) + const challenge = this.b64url(crypto.createHash('sha256').update(verifier).digest()) + const state = this.b64url(crypto.randomBytes(16)) + + // b) build authorize URL + launch browser + const authz = new URL(meta.authorization_endpoint) + authz.search = new URLSearchParams({ + client_id: reg.client_id, + response_type: 'code', + code_challenge: challenge, + code_challenge_method: 'S256', + resource: rs.toString(), + scope: scopes.join(' '), + redirect_uri: redirectUri, + state: state, + }).toString() + + await this.lsp.window.showDocument({ uri: authz.toString(), external: true }) + + // c) wait for code on our loopback + const waitForFlow = new Promise<{ code: string; rxState: string; err?: string; errDesc?: string }>(resolve => { + server.on('request', (req, res) => { + const u = new URL(req.url || '/', redirectUri) + const c = u.searchParams.get('code') || '' + const s = u.searchParams.get('state') || '' + const e = u.searchParams.get('error') || undefined + const ed = u.searchParams.get('error_description') || undefined + res.writeHead(200, { 'content-type': 'text/html' }).end('

You may close this tab.

') + resolve({ code: c, rxState: s, err: e, errDesc: ed }) + }) + }) + const { code, rxState, err, errDesc } = await Promise.race([ + waitForFlow, + new Promise((_, reject) => + setTimeout(() => reject(new Error('authorization_timed_out')), DEFAULT_PKCE_TIMEOUT_MS) + ), + ]) + if (err) { + throw new Error(`Authorization error: ${err}${errDesc ? ` - ${errDesc}` : ''}`) + } + if (!code || rxState !== state) throw new Error('Invalid authorization response (state mismatch)') + + // d) exchange code for token + const form2 = new URLSearchParams({ + grant_type: 'authorization_code', + code, + code_verifier: verifier, + client_id: reg.client_id, + redirect_uri: redirectUri, + resource: rs.toString(), + }) + const res2 = await this.fetchCompat(meta.token_endpoint, { + method: 'POST', + headers: { 'content-type': 'application/x-www-form-urlencoded' }, + body: form2, + }) + if (!res2.ok) { + const txt = await res2.text().catch(() => '') + throw new Error(`Token exchange failed (HTTP ${res2.status}): ${txt?.slice(0, 300)}`) + } + const tk = (await res2.json()) as Record + return { ...(tk as object), obtained_at: Date.now() } as Token + } + + /** Fetch + error‑check + parse JSON */ + private static async json(url: string, init?: RequestInit): Promise { + const r = await this.fetchCompat(url, init) + if (!r.ok) { + const txt = await r.text().catch(() => '') + throw new Error(`HTTP ${r.status}@${url} — ${txt}`) + } + return (await r.json()) as T + } + + /** Read & parse JSON file via workspace.fs */ + private static async read(file: string): Promise { + try { + if (!(await this.workspace.fs.exists(file))) return undefined + const buf = await this.workspace.fs.readFile(file) + return JSON.parse(buf.toString()) as T + } catch { + return undefined + } + } + + /** Write JSON, then clamp file perms to 0600 (owner read/write) */ + private static async write(file: string, obj: unknown): Promise { + const dir = path.dirname(file) + await this.workspace.fs.mkdir(dir, { recursive: true }) + await this.workspace.fs.writeFile(file, JSON.stringify(obj, null, 2), { mode: 0o600 }) + } + + /** SHA‑256 of resourceServer URL → hex key */ + private static computeKey(rs: URL): string { + return crypto + .createHash('sha256') + .update(rs.origin + rs.pathname) + .digest('hex') + } + + /** RFC‑7636 base64url without padding */ + private static b64url(buf: Buffer): string { + return buf.toString('base64').replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_') + } + + /** Directory for caching registration + tokens */ + private static readonly cacheDir = path.join(os.homedir(), '.aws', 'sso', 'cache') + + /** + * Await server.listen() but reject if it emits 'error' (eg EADDRINUSE), + * so callers can handle it immediately instead of hanging. + */ + private static listen(server: http.Server, port: number, host: string = '127.0.0.1'): Promise { + return new Promise((resolve, reject) => { + const onListening = () => { + server.off('error', onError) + resolve() + } + const onError = (err: NodeJS.ErrnoException) => { + server.off('listening', onListening) + reject(err) + } + server.once('listening', onListening) + server.once('error', onError) + server.listen(port, host) + }) + } + + /** + * Fetch compatibility: use global fetch on Node >= 18, otherwise dynamically import('node-fetch'). + * Using Function('return import(...)') avoids downleveling to require() in CJS builds. + */ + private static async fetchCompat(url: string, init?: RequestInit): Promise { + const globalObj = globalThis as any + if (typeof globalObj.fetch === 'function') { + return globalObj.fetch(url as any, init as any) + } + // Dynamic import of ESM node-fetch (only when global fetch is unavailable) + const mod = await (Function('return import("node-fetch")')() as Promise) + const f = mod.default ?? mod + return f(url as any, init as any) + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpTool.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpTool.test.ts index b0f936ac46..683c5ff8ac 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpTool.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpTool.test.ts @@ -25,9 +25,20 @@ describe('McpTool', () => { }, telemetry: { record: () => {}, emitMetric: () => {} }, runtime: { serverInfo: { version: '1.0.0' } }, + agent: { + getBuiltInToolNames: () => [ + 'fsRead', + 'fsWrite', + 'executeBash', + 'listDirectory', + 'fileSearch', + 'codeReview', + 'displayFindings', + ], + }, } as unknown as Pick< import('@aws/language-server-runtimes/server-interface/server').Features, - 'logging' | 'workspace' | 'lsp' | 'credentialsProvider' | 'telemetry' | 'runtime' + 'logging' | 'workspace' | 'lsp' | 'credentialsProvider' | 'telemetry' | 'runtime' | 'agent' > const definition: McpToolDefinition = { diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpTypes.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpTypes.ts index 6aec98cb24..962ce8080a 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpTypes.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpTypes.ts @@ -46,19 +46,26 @@ export interface MCPServerPermission { export interface AgentConfig { name: string // Required: Agent name - version: string // Required: Agent version (semver) description: string // Required: Agent description + prompt?: string // Optional: High-level context for the agent model?: string // Optional: Model that backs the agent tags?: string[] // Optional: Tags for categorization inputSchema?: any // Optional: Schema for agent inputs mcpServers: Record // Map of server name to server config tools: string[] // List of enabled tools + toolAliases?: Record // Tool name remapping allowedTools: string[] // List of tools that don't require approval toolsSettings?: Record // Tool-specific settings - includedFiles?: string[] // Files to include in context - createHooks?: string[] // Hooks to run at conversation start - promptHooks?: string[] // Hooks to run per prompt - resources?: string[] // Resources for the agent (prompts, files, etc.) + resources?: string[] // Resources for the agent (file:// paths) + hooks?: { + agentSpawn?: Array<{ command: string }> + userPromptSubmit?: Array<{ command: string }> + } // Commands run at specific trigger points + useLegacyMcpJson?: boolean // Whether to include legacy MCP configuration + // Legacy fields for backward compatibility + includedFiles?: string[] // Deprecated: use resources instead + createHooks?: string[] // Deprecated: use hooks.agentSpawn instead + promptHooks?: string[] // Deprecated: use hooks.userPromptSubmit instead } export interface PersonaConfig { @@ -71,20 +78,24 @@ export class AgentModel { static fromJson(doc: any): AgentModel { const cfg: AgentConfig = { - name: doc?.['name'] || 'default-agent', - version: doc?.['version'] || '1.0.0', + name: doc?.['name'] || 'q_ide_default', description: doc?.['description'] || 'Default agent configuration', + prompt: doc?.['prompt'], model: doc?.['model'], tags: Array.isArray(doc?.['tags']) ? doc['tags'] : undefined, inputSchema: doc?.['inputSchema'], mcpServers: typeof doc?.['mcpServers'] === 'object' ? doc['mcpServers'] : {}, tools: Array.isArray(doc?.['tools']) ? doc['tools'] : [], + toolAliases: typeof doc?.['toolAliases'] === 'object' ? doc['toolAliases'] : {}, allowedTools: Array.isArray(doc?.['allowedTools']) ? doc['allowedTools'] : [], toolsSettings: typeof doc?.['toolsSettings'] === 'object' ? doc['toolsSettings'] : {}, + resources: Array.isArray(doc?.['resources']) ? doc['resources'] : [], + hooks: typeof doc?.['hooks'] === 'object' ? doc['hooks'] : undefined, + useLegacyMcpJson: doc?.['useLegacyMcpJson'], + // Legacy fields includedFiles: Array.isArray(doc?.['includedFiles']) ? doc['includedFiles'] : [], createHooks: Array.isArray(doc?.['createHooks']) ? doc['createHooks'] : [], promptHooks: Array.isArray(doc?.['promptHooks']) ? doc['promptHooks'] : [], - resources: Array.isArray(doc?.['resources']) ? doc['resources'] : [], } return new AgentModel(cfg) } diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpUtils.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpUtils.test.ts index c50f1d62eb..045d760d2e 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpUtils.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpUtils.test.ts @@ -22,6 +22,7 @@ import { enabledMCP, normalizePathFromUri, saveAgentConfig, + saveServerSpecificAgentConfig, isEmptyEnv, sanitizeName, convertPersonaToAgent, @@ -206,6 +207,7 @@ describe('loadAgentConfig', () => { mkdir: (d: string, opts: any) => Promise.resolve(fs.mkdirSync(d, { recursive: opts.recursive })), getUserHomeDir: () => tmpDir, }, + getAllWorkspaceFolders: () => [], } logger = { warn: () => {}, info: () => {}, error: () => {}, debug: () => {} } }) @@ -237,7 +239,6 @@ describe('loadAgentConfig', () => { const agentConfig = { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: { testServer: { @@ -328,7 +329,6 @@ describe('saveAgentConfig', () => { const configPath = path.join(tmpDir, 'agent-config.json') const config = { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: ['tool1', 'tool2'], @@ -352,7 +352,6 @@ describe('saveAgentConfig', () => { const configPath = path.join(tmpDir, 'nested', 'dir', 'agent-config.json') const config = { name: 'test-agent', - version: '1.0.0', description: 'Test agent', mcpServers: {}, tools: [], @@ -544,6 +543,17 @@ describe('createNamespacedToolName', () => { toolName: longTool, }) }) + + it('truncates tool name and adds suffix when it exceeds MAX_TOOL_NAME_LENGTH', () => { + const longTool = 'Smartanalyzerthatreadssummariescreatesmappingrulesandupdatespayloads' + const result = createNamespacedToolName('ConnectiveRx', longTool, tools, toolNameMapping) + expect(result.length).to.equal(MAX_TOOL_NAME_LENGTH) + expect(tools.has(result)).to.be.true + expect(toolNameMapping.get(result)).to.deep.equal({ + serverName: 'ConnectiveRx', + toolName: longTool, + }) + }) }) describe('normalizePathFromUri', () => { @@ -699,7 +709,7 @@ describe('convertPersonaToAgent', () => { const result = convertPersonaToAgent(persona, mcpServers, mockAgent) - expect(result.name).to.equal('default-agent') + expect(result.name).to.equal('q_ide_default') expect(result.mcpServers).to.have.property('testServer') expect(result.tools).to.include('@testServer') expect(result.tools).to.include('fs_read') @@ -753,6 +763,12 @@ describe('migrateToAgentConfig', () => { }) it('migrates when no existing configs exist', async () => { + // Create empty MCP config to trigger migration + const mcpDir = path.join(tmpDir, '.aws', 'amazonq') + fs.mkdirSync(mcpDir, { recursive: true }) + const mcpPath = path.join(mcpDir, 'mcp.json') + fs.writeFileSync(mcpPath, JSON.stringify({ mcpServers: {} })) + await migrateToAgentConfig(workspace, logger, mockAgent) // Should create default agent config @@ -782,3 +798,147 @@ describe('migrateToAgentConfig', () => { expect(agentConfig.mcpServers).to.have.property('testServer') }) }) +describe('saveServerSpecificAgentConfig', () => { + let tmpDir: string + let workspace: any + let logger: any + + beforeEach(() => { + tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'saveServerSpecificTest-')) + workspace = { + fs: { + exists: (p: string) => Promise.resolve(fs.existsSync(p)), + readFile: (p: string) => Promise.resolve(Buffer.from(fs.readFileSync(p))), + writeFile: (p: string, d: string) => Promise.resolve(fs.writeFileSync(p, d)), + mkdir: (d: string, opts: any) => Promise.resolve(fs.mkdirSync(d, { recursive: opts.recursive })), + }, + } + logger = { warn: () => {}, info: () => {}, error: () => {} } + }) + + afterEach(() => { + fs.rmSync(tmpDir, { recursive: true, force: true }) + }) + + it('creates new config file when it does not exist', async () => { + const configPath = path.join(tmpDir, 'agent-config.json') + const serverConfig = { command: 'test-cmd', args: ['arg1'] } + const serverTools = ['@testServer'] + const serverAllowedTools = ['@testServer/tool1'] + + await saveServerSpecificAgentConfig( + workspace, + logger, + 'testServer', + serverConfig, + serverTools, + serverAllowedTools, + configPath + ) + + expect(fs.existsSync(configPath)).to.be.true + const content = JSON.parse(fs.readFileSync(configPath, 'utf-8')) + expect(content.mcpServers.testServer).to.deep.equal(serverConfig) + expect(content.tools).to.include('@testServer') + expect(content.allowedTools).to.include('@testServer/tool1') + }) + + it('updates existing config file', async () => { + const configPath = path.join(tmpDir, 'agent-config.json') + + // Create existing config + const existingConfig = { + name: 'existing-agent', + description: 'Existing agent', + mcpServers: { + existingServer: { command: 'existing-cmd' }, + }, + tools: ['fs_read', '@existingServer'], + allowedTools: ['fs_read'], + toolsSettings: {}, + includedFiles: [], + resources: [], + } + fs.writeFileSync(configPath, JSON.stringify(existingConfig)) + + const serverConfig = { command: 'new-cmd', args: ['arg1'] } + const serverTools = ['@newServer'] + const serverAllowedTools = ['@newServer/tool1'] + + await saveServerSpecificAgentConfig( + workspace, + logger, + 'newServer', + serverConfig, + serverTools, + serverAllowedTools, + configPath + ) + + const content = JSON.parse(fs.readFileSync(configPath, 'utf-8')) + expect(content.name).to.equal('existing-agent') + expect(content.mcpServers.existingServer).to.deep.equal({ command: 'existing-cmd' }) + expect(content.mcpServers.newServer).to.deep.equal(serverConfig) + expect(content.tools).to.include('@newServer') + expect(content.allowedTools).to.include('@newServer/tool1') + }) + + it('removes existing server tools before adding new ones', async () => { + const configPath = path.join(tmpDir, 'agent-config.json') + + // Create existing config with server tools + const existingConfig = { + name: 'test-agent', + description: 'Test agent', + mcpServers: { + testServer: { command: 'old-cmd' }, + }, + tools: ['fs_read', '@testServer', '@testServer/oldTool'], + allowedTools: ['fs_read', '@testServer/oldAllowedTool'], + toolsSettings: {}, + includedFiles: [], + resources: [], + } + fs.writeFileSync(configPath, JSON.stringify(existingConfig)) + + const serverConfig = { command: 'new-cmd' } + const serverTools = ['@testServer'] + const serverAllowedTools = ['@testServer/newTool'] + + await saveServerSpecificAgentConfig( + workspace, + logger, + 'testServer', + serverConfig, + serverTools, + serverAllowedTools, + configPath + ) + + const content = JSON.parse(fs.readFileSync(configPath, 'utf-8')) + expect(content.tools).to.not.include('@testServer/oldTool') + expect(content.allowedTools).to.not.include('@testServer/oldAllowedTool') + expect(content.tools).to.include('@testServer') + expect(content.allowedTools).to.include('@testServer/newTool') + expect(content.tools).to.include('fs_read') + }) + + it('creates parent directories if they do not exist', async () => { + const configPath = path.join(tmpDir, 'nested', 'dir', 'agent-config.json') + const serverConfig = { command: 'test-cmd' } + const serverTools = ['@testServer'] + const serverAllowedTools: string[] = [] + + await saveServerSpecificAgentConfig( + workspace, + logger, + 'testServer', + serverConfig, + serverTools, + serverAllowedTools, + configPath + ) + + expect(fs.existsSync(configPath)).to.be.true + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpUtils.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpUtils.ts index 45ab34170c..3a318ce41f 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpUtils.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/mcpUtils.ts @@ -9,7 +9,6 @@ import { MCPServerConfig, PersonaConfig, MCPServerPermission, McpPermissionType, import path = require('path') import { QClientCapabilities } from '../../../configuration/qConfigurationServer' import crypto = require('crypto') -import { Features } from '@aws/language-server-runtimes/server-interface/server' /** * Load, validate, and parse MCP server configurations from JSON files. @@ -108,14 +107,20 @@ export async function loadMcpServerConfigs( configErrors.set(`${name}_timeout`, errorMsg) } const cfg: MCPServerConfig = { - url: entry.url, - headers: typeof entry.headers === 'object' && entry.headers !== null ? entry.headers : undefined, - command: entry.command, - args: Array.isArray(entry.args) ? entry.args.map(String) : [], - env: typeof entry.env === 'object' && entry.env !== null ? entry.env : {}, + command: (entry as any).command, + url: (entry as any).url, + args: Array.isArray((entry as any).args) ? (entry as any).args.map(String) : [], + env: typeof (entry as any).env === 'object' && (entry as any).env !== null ? (entry as any).env : {}, + headers: + typeof (entry as any).headers === 'object' && (entry as any).headers !== null + ? (entry as any).headers + : undefined, initializationTimeout: - typeof entry.initializationTimeout === 'number' ? entry.initializationTimeout : undefined, - timeout: typeof entry.timeout === 'number' ? entry.timeout : undefined, + typeof (entry as any).initializationTimeout === 'number' + ? (entry as any).initializationTimeout + : undefined, + timeout: typeof (entry as any).timeout === 'number' ? (entry as any).timeout : undefined, + disabled: typeof (entry as any).disabled === 'boolean' ? (entry as any).disabled : false, __configPath__: fsPath, } @@ -148,9 +153,9 @@ export async function loadMcpServerConfigs( } const DEFAULT_AGENT_RAW = `{ - "name": "default-agent", - "version": "1.0.0", + "name": "q_ide_default", "description": "Default agent configuration", + "prompt": "", "mcpServers": {}, "tools": [ "fs_read", @@ -159,6 +164,7 @@ const DEFAULT_AGENT_RAW = `{ "report_issue", "use_aws" ], + "toolAliases": {}, "allowedTools": [ "fs_read", "report_issue", @@ -170,12 +176,16 @@ const DEFAULT_AGENT_RAW = `{ "use_aws": { "preset": "readOnly" }, "execute_bash": { "preset": "readOnly" } }, - "includedFiles": [ - "AmazonQ.md", - "README.md", - ".amazonq/rules/**/*.md" + "resources": [ + "file://AmazonQ.md", + "file://README.md", + "file://.amazonq/rules/**/*.md" ], - "resources": [] + "hooks": { + "agentSpawn": [], + "userPromptSubmit": [] + }, + "useLegacyMcpJson": true }` const DEFAULT_PERSONA_RAW = `{ @@ -218,6 +228,7 @@ const DEFAULT_PERSONA_RAW = `{ * - Load global first (if exists), then workspace files—workspace overrides. * - Combines functionality of loadMcpServerConfigs and loadPersonaPermissions * - Handles server configurations and permissions from the same agent file + * - Supports backwards compatibility with MCP config files when useLegacyMcpJson is true */ export async function loadAgentConfig( workspace: Workspace, @@ -236,15 +247,14 @@ export async function loadAgentConfig( // Create base agent config const agentConfig: AgentConfig = { - name: 'default-agent', - version: '1.0.0', + name: 'q_ide_default', description: 'Agent configuration', mcpServers: {}, tools: [], allowedTools: [], toolsSettings: {}, - includedFiles: [], resources: [], + useLegacyMcpJson: true, // Default to true for backwards compatibility } // Normalize paths @@ -270,6 +280,9 @@ export async function loadAgentConfig( return 0 }) + // Track useLegacyMcpJson value - workspace takes precedence over global + let useLegacyMcpJsonValue: boolean | undefined + // Process each path like loadMcpServerConfigs for (const fsPath of sortedPaths) { // 1) Skip missing files or create default global @@ -328,10 +341,20 @@ export async function loadAgentConfig( // 3) Process agent config metadata if (fsPath === globalConfigPath) { agentConfig.name = json.name || agentConfig.name - agentConfig.version = json.version || agentConfig.version agentConfig.description = json.description || agentConfig.description } + // Track useLegacyMcpJson - workspace files take precedence + if (json.useLegacyMcpJson !== undefined) { + if (fsPath !== globalConfigPath) { + // Workspace file - always takes precedence + useLegacyMcpJsonValue = json.useLegacyMcpJson + } else if (useLegacyMcpJsonValue === undefined) { + // Global file - only use if no workspace value set + useLegacyMcpJsonValue = json.useLegacyMcpJson + } + } + // 4) Process permissions (tools and allowedTools) if (Array.isArray(json.tools)) { for (const tool of json.tools) { @@ -459,8 +482,46 @@ export async function loadAgentConfig( } } + // Set final useLegacyMcpJson value - default to true if not specified anywhere + agentConfig.useLegacyMcpJson = useLegacyMcpJsonValue !== undefined ? useLegacyMcpJsonValue : true + + // Load MCP config files if useLegacyMcpJson is true + if (agentConfig.useLegacyMcpJson) { + const wsUris = workspace.getAllWorkspaceFolders()?.map(f => f.uri) ?? [] + const mcpPaths = [...getWorkspaceMcpConfigPaths(wsUris), getGlobalMcpConfigPath(workspace.fs.getUserHomeDir())] + + const mcpResult = await loadMcpServerConfigs(workspace, logging, mcpPaths) + + // MCP configs have precedence over agent configs + // Merge MCP servers into the result, overriding any from agent config + for (const [sanitizedName, mcpConfig] of mcpResult.servers) { + const originalName = mcpResult.serverNameMapping.get(sanitizedName) + if (originalName) { + servers.set(sanitizedName, mcpConfig) + serverNameMapping.set(sanitizedName, originalName) + + // Add MCP server tools to agent config for permission management + const serverPrefix = `@${originalName}` + if (!agentConfig.tools.includes(serverPrefix)) { + agentConfig.tools.push(serverPrefix) + } + + logging.info(`Loaded MCP server '${originalName}' from legacy MCP config`) + } + } + + // Merge MCP config errors + for (const [key, error] of mcpResult.errors) { + configErrors.set(`mcp_${key}`, error) + } + + logging.info(`Loaded ${mcpResult.servers.size} servers from legacy MCP configs`) + } + // Return the agent config, servers, server name mapping, and errors - logging.info(`Successfully processed ${uniquePaths.length} agent config files`) + logging.info( + `Successfully processed ${uniquePaths.length} agent config files and ${agentConfig.useLegacyMcpJson ? 'legacy MCP configs' : 'no legacy MCP configs'}` + ) return { servers, serverNameMapping, @@ -573,7 +634,10 @@ export async function loadPersonaPermissions( /** Given an array of workspace diretory, return each workspace persona config location */ export function getWorkspacePersonaConfigPaths(wsUris: string[]): string[] { - return wsUris.map(uri => path.join(uri, '.amazonq', 'personas', 'default.json')) + return wsUris.map(uri => { + const fsPath = normalizePathFromUri(uri) + return path.join(fsPath, '.amazonq', 'personas', 'default.json') + }) } /** Given a user's home directory, return the global persona config location */ @@ -583,7 +647,10 @@ export function getGlobalPersonaConfigPath(home: string): string { /** Given an array of workspace diretory, return each workspace agent config location */ export function getWorkspaceAgentConfigPaths(wsUris: string[]): string[] { - return wsUris.map(uri => path.join(uri, '.amazonq', 'agents', 'default.json')) + return wsUris.map(uri => { + const fsPath = normalizePathFromUri(uri) + return path.join(fsPath, '.amazonq', 'agents', 'default.json') + }) } /** Given a user's home directory, return the global agent config location */ @@ -593,7 +660,10 @@ export function getGlobalAgentConfigPath(home: string): string { /** Given an array of workspace diretory, return each workspace mcp config location */ export function getWorkspaceMcpConfigPaths(wsUris: string[]): string[] { - return wsUris.map(uri => path.join(uri, '.amazonq', 'mcp.json')) + return wsUris.map(uri => { + const fsPath = normalizePathFromUri(uri) + return path.join(fsPath, '.amazonq', 'mcp.json') + }) } /** Given a user's home directory, return the global mcp config location */ @@ -629,17 +699,7 @@ export function convertPersonaToAgent( mcpServers: Record, featureAgent: Agent ): AgentConfig { - const agent: AgentConfig = { - name: 'default-agent', - version: '1.0.0', - description: 'Default agent configuration', - mcpServers: {}, - tools: [], - allowedTools: [], - toolsSettings: {}, - includedFiles: [], - resources: [], - } + const agent: AgentConfig = JSON.parse(DEFAULT_AGENT_RAW) // Include all servers from MCP config Object.entries(mcpServers).forEach(([name, config]) => { @@ -840,48 +900,40 @@ async function migrateConfigToAgent( const normalizedPersonaPath = normalizePathFromUri(personaPath, logging) agentPath = normalizePathFromUri(agentPath) - // Check if agent config exists + // Check if config and agent files exist + const configExists = await workspace.fs.exists(normalizedConfigPath).catch(() => false) const agentExists = await workspace.fs.exists(agentPath).catch(() => false) - // Load existing agent config if it exists - let existingAgentConfig: AgentConfig | undefined + // Only migrate if agent file does not exist + // If config exists, migrate from it; if not, create default agent config if (agentExists) { - try { - const raw = (await workspace.fs.readFile(agentPath)).toString().trim() - existingAgentConfig = raw ? JSON.parse(raw) : undefined - } catch (err) { - logging.warn(`Failed to read existing agent config at ${agentPath}: ${err}`) - } + return } // Read MCP server configs directly from file const serverConfigs: Record = {} try { - const configExists = await workspace.fs.exists(normalizedConfigPath) - - if (configExists) { - const raw = (await workspace.fs.readFile(normalizedConfigPath)).toString().trim() - if (raw) { - const config = JSON.parse(raw) - - if (config.mcpServers && typeof config.mcpServers === 'object') { - // Add each server to the serverConfigs - for (const [name, serverConfig] of Object.entries(config.mcpServers)) { - serverConfigs[name] = { - command: (serverConfig as any).command, - args: Array.isArray((serverConfig as any).args) ? (serverConfig as any).args : undefined, - env: typeof (serverConfig as any).env === 'object' ? (serverConfig as any).env : undefined, - initializationTimeout: - typeof (serverConfig as any).initializationTimeout === 'number' - ? (serverConfig as any).initializationTimeout - : undefined, - timeout: - typeof (serverConfig as any).timeout === 'number' - ? (serverConfig as any).timeout - : undefined, - } - logging.info(`Added server ${name} to serverConfigs`) + const raw = (await workspace.fs.readFile(normalizedConfigPath)).toString().trim() + if (raw) { + const config = JSON.parse(raw) + + if (config.mcpServers && typeof config.mcpServers === 'object') { + // Add each server to the serverConfigs + for (const [name, serverConfig] of Object.entries(config.mcpServers)) { + serverConfigs[name] = { + command: (serverConfig as any).command, + args: Array.isArray((serverConfig as any).args) ? (serverConfig as any).args : undefined, + env: typeof (serverConfig as any).env === 'object' ? (serverConfig as any).env : undefined, + initializationTimeout: + typeof (serverConfig as any).initializationTimeout === 'number' + ? (serverConfig as any).initializationTimeout + : undefined, + timeout: + typeof (serverConfig as any).timeout === 'number' + ? (serverConfig as any).timeout + : undefined, } + logging.info(`Added server ${name} to serverConfigs`) } } } @@ -908,46 +960,23 @@ async function migrateConfigToAgent( } // Convert to agent config - const newAgentConfig = convertPersonaToAgent(personaConfig, serverConfigs, agent) - newAgentConfig.includedFiles = ['AmazonQ.md', 'README.md', '.amazonq/rules/**/*.md'] - newAgentConfig.resources = [] // Initialize with empty array - - // Merge with existing config if available - let finalAgentConfig: AgentConfig - if (existingAgentConfig) { - // Keep existing metadata - finalAgentConfig = { - ...existingAgentConfig, - // Merge MCP servers, keeping existing ones if they exist - mcpServers: { - ...existingAgentConfig.mcpServers, - ...newAgentConfig.mcpServers, - }, - // Merge tools lists without duplicates - tools: [...new Set([...existingAgentConfig.tools, ...newAgentConfig.tools])], - allowedTools: [...new Set([...existingAgentConfig.allowedTools, ...newAgentConfig.allowedTools])], - // Merge tool settings, preferring existing ones - toolsSettings: { - ...newAgentConfig.toolsSettings, - ...existingAgentConfig.toolsSettings, - }, - // Keep other properties from existing config - includedFiles: existingAgentConfig.includedFiles || newAgentConfig.includedFiles, - createHooks: existingAgentConfig.createHooks || newAgentConfig.createHooks, - promptHooks: [ - ...new Set([...(existingAgentConfig.promptHooks || []), ...(newAgentConfig.promptHooks || [])]), - ], - resources: [...new Set([...(existingAgentConfig.resources || []), ...(newAgentConfig.resources || [])])], - } - } else { - finalAgentConfig = newAgentConfig - logging.info(`Using new config (no existing config to merge)`) - } + const agentConfig = convertPersonaToAgent(personaConfig, serverConfigs, agent) + + // Parse default values from DEFAULT_AGENT_RAW + const defaultAgent = JSON.parse(DEFAULT_AGENT_RAW) + + // Add complete agent format sections using default values + agentConfig.name = defaultAgent.name + agentConfig.description = defaultAgent.description + agentConfig.includedFiles = defaultAgent.includedFiles + agentConfig.resources = defaultAgent.resources + agentConfig.createHooks = defaultAgent.createHooks + agentConfig.promptHooks = defaultAgent.promptHooks // Save agent config try { - await saveAgentConfig(workspace, logging, finalAgentConfig, agentPath) - logging.info(`Successfully ${existingAgentConfig ? 'updated' : 'created'} agent config at ${agentPath}`) + await saveAgentConfig(workspace, logging, agentConfig, agentPath) + logging.info(`Successfully created agent config at ${agentPath}`) } catch (err) { logging.error(`Failed to save agent config to ${agentPath}: ${err}`) throw err @@ -958,67 +987,158 @@ export async function saveAgentConfig( workspace: Workspace, logging: Logger, config: AgentConfig, - configPath: string, - serverName?: string + configPath: string ): Promise { try { await workspace.fs.mkdir(path.dirname(configPath), { recursive: true }) + // Save the whole config + await workspace.fs.writeFile(configPath, JSON.stringify(config, null, 2)) + logging.info(`Saved agent config to ${configPath}`) + } catch (err: any) { + logging.error(`Failed to save agent config to ${configPath}: ${err.message}`) + throw err + } +} - if (!serverName) { - // Save the whole config - await workspace.fs.writeFile(configPath, JSON.stringify(config, null, 2)) - logging.info(`Saved agent config to ${configPath}`) - return - } +/** + * Save only server-specific changes to agent config file + */ +export async function saveServerSpecificAgentConfig( + workspace: Workspace, + logging: Logger, + serverName: string, + serverConfig: any, + serverTools: string[], + serverAllowedTools: string[], + configPath: string, + isLegacyMcpServer: boolean = false +): Promise { + try { + await workspace.fs.mkdir(path.dirname(configPath), { recursive: true }) - // Read existing config if it exists, otherwise use default - let existingConfig: any + // Read existing config + let existingConfig: AgentConfig try { - const configExists = await workspace.fs.exists(configPath) - if (configExists) { - const raw = (await workspace.fs.readFile(configPath)).toString().trim() - existingConfig = raw ? JSON.parse(raw) : JSON.parse(DEFAULT_AGENT_RAW) - } else { - existingConfig = JSON.parse(DEFAULT_AGENT_RAW) - } - } catch (err) { - logging.warn(`Failed to read existing config at ${configPath}: ${err}`) + const raw = await workspace.fs.readFile(configPath) + existingConfig = JSON.parse(raw.toString()) + } catch { + // If file doesn't exist, create minimal config existingConfig = JSON.parse(DEFAULT_AGENT_RAW) } - // Update only the specific server's config - if (config.mcpServers[serverName]) { - existingConfig.mcpServers[serverName] = config.mcpServers[serverName] - } - - // Remove existing tools for this server - const serverToolPattern = `@${serverName}` + // Remove existing server tools from arrays + const serverPrefix = `@${serverName}` existingConfig.tools = existingConfig.tools.filter( - (tool: string) => tool !== serverToolPattern && !tool.startsWith(`${serverToolPattern}/`) + tool => tool !== serverPrefix && !tool.startsWith(`${serverPrefix}/`) ) existingConfig.allowedTools = existingConfig.allowedTools.filter( - (tool: string) => tool !== serverToolPattern && !tool.startsWith(`${serverToolPattern}/`) + tool => tool !== serverPrefix && !tool.startsWith(`${serverPrefix}/`) ) - // Add only tools for this server - const serverTools = config.tools.filter( - tool => tool === serverToolPattern || tool.startsWith(`${serverToolPattern}/`) - ) - const serverAllowedTools = config.allowedTools.filter( - tool => tool === serverToolPattern || tool.startsWith(`${serverToolPattern}/`) - ) + if (!isLegacyMcpServer) { + if (serverConfig === null) { + // Remove server entirely + delete existingConfig.mcpServers[serverName] + } else { + // Update or add server + existingConfig.mcpServers[serverName] = serverConfig + } + } + // Add new server tools existingConfig.tools.push(...serverTools) existingConfig.allowedTools.push(...serverAllowedTools) await workspace.fs.writeFile(configPath, JSON.stringify(existingConfig, null, 2)) - logging.info(`Saved agent config for server ${serverName} to ${configPath}`) + logging.info(`Saved server-specific agent config for ${serverName} to ${configPath}`) } catch (err: any) { - logging.error(`Failed to save agent config to ${configPath}: ${err.message}`) + logging.error(`Failed to save server-specific agent config to ${configPath}: ${err.message}`) throw err } } +/** + * Migrate existing agent config to CLI format + */ +export async function migrateAgentConfigToCLIFormat( + workspace: Workspace, + logging: Logger, + configPath: string +): Promise { + try { + const exists = await workspace.fs.exists(configPath) + if (!exists) return + + const raw = await workspace.fs.readFile(configPath) + const config = JSON.parse(raw.toString()) + + let updated = false + + // Rename default-agent to q_ide_default + if (config.name !== 'q_ide_default') { + config.name = 'q_ide_default' + updated = true + } + + // Add missing CLI fields + if (!config.hasOwnProperty('prompt')) { + config.prompt = '' + updated = true + } + if (!config.hasOwnProperty('toolAliases')) { + config.toolAliases = {} + updated = true + } + + // Remove deprecated fields + if (config.hasOwnProperty('version')) { + delete config.version + updated = true + } + + // Migrate includedFiles to resources with file:// prefix + if (config.includedFiles && Array.isArray(config.includedFiles)) { + if (!config.resources) config.resources = [] + for (const file of config.includedFiles) { + const resourcePath = file.startsWith('file://') ? file : `file://${file}` + if (!config.resources.includes(resourcePath)) { + config.resources.push(resourcePath) + } + } + delete config.includedFiles + updated = true + } + + // Migrate hooks format + if (config.promptHooks || config.createHooks) { + if (!config.hooks) config.hooks = {} + if (!config.hooks.agentSpawn) config.hooks.agentSpawn = [] + if (!config.hooks.userPromptSubmit) config.hooks.userPromptSubmit = [] + + if (config.createHooks && Array.isArray(config.createHooks)) { + config.hooks.agentSpawn.push(...config.createHooks) + delete config.createHooks + updated = true + } + if (config.promptHooks && Array.isArray(config.promptHooks)) { + config.hooks.userPromptSubmit.push(...config.promptHooks) + delete config.promptHooks + updated = true + } + } + + config.useLegacyMcpJson = true + updated = true + + if (updated) { + await workspace.fs.writeFile(configPath, JSON.stringify(config, null, 2)) + logging.info(`Migrated agent config to CLI format: ${configPath}`) + } + } catch (err: any) { + logging.error(`Failed to migrate agent config ${configPath}: ${err.message}`) + } +} + export const MAX_TOOL_NAME_LENGTH = 64 /** @@ -1048,8 +1168,8 @@ export function createNamespacedToolName( // Sanitize the tool name const sanitizedToolName = sanitizeName(toolName) - // First try to use just the tool name if it's not already in use - if (!allNamespacedTools.has(sanitizedToolName)) { + // First try to use just the tool name if it's not already in use and fits within length limit + if (sanitizedToolName.length <= MAX_TOOL_NAME_LENGTH && !allNamespacedTools.has(sanitizedToolName)) { allNamespacedTools.add(sanitizedToolName) toolNameMapping.set(sanitizedToolName, { serverName, toolName }) return sanitizedToolName diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/profileStatusMonitor.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/profileStatusMonitor.test.ts new file mode 100644 index 0000000000..6fb0e56f9a --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/profileStatusMonitor.test.ts @@ -0,0 +1,150 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +import * as chai from 'chai' +import * as sinon from 'sinon' +import { ProfileStatusMonitor } from './profileStatusMonitor' +import * as AmazonQTokenServiceManagerModule from '../../../../shared/amazonQServiceManager/AmazonQTokenServiceManager' + +const { expect } = chai + +interface MockLogging { + info: sinon.SinonStub + debug: sinon.SinonStub + error: sinon.SinonStub + warn: sinon.SinonStub + log: sinon.SinonStub +} + +describe('ProfileStatusMonitor', () => { + let profileStatusMonitor: ProfileStatusMonitor + let mockLogging: MockLogging + let mockOnMcpDisabled: sinon.SinonStub + let mockOnMcpEnabled: sinon.SinonStub + let clock: sinon.SinonFakeTimers + + beforeEach(() => { + clock = sinon.useFakeTimers() + + mockLogging = { + info: sinon.stub(), + debug: sinon.stub(), + error: sinon.stub(), + warn: sinon.stub(), + log: sinon.stub(), + } + + mockOnMcpDisabled = sinon.stub() + mockOnMcpEnabled = sinon.stub() + + profileStatusMonitor = new ProfileStatusMonitor(mockLogging, mockOnMcpDisabled, mockOnMcpEnabled) + }) + + afterEach(() => { + clock.restore() + sinon.restore() + profileStatusMonitor.stop() + }) + + describe('start', () => { + it('should start monitoring and log info message', () => { + profileStatusMonitor.start() + + expect( + mockLogging.info.calledWith('ProfileStatusMonitor started - checking MCP configuration every 24 hours') + ).to.be.true + }) + + it('should not start multiple times', () => { + profileStatusMonitor.start() + profileStatusMonitor.start() + + expect(mockLogging.info.callCount).to.equal(1) + }) + }) + + describe('stop', () => { + it('should stop monitoring and log info message', () => { + profileStatusMonitor.start() + profileStatusMonitor.stop() + + expect(mockLogging.info.calledWith('ProfileStatusMonitor stopped')).to.be.true + }) + }) + + describe('checkInitialState', () => { + it('should return true when no profile ARN is available', async () => { + sinon.stub(AmazonQTokenServiceManagerModule.AmazonQTokenServiceManager, 'getInstance').returns({ + getActiveProfileArn: () => undefined, + } as any) + + const result = await profileStatusMonitor.checkInitialState() + expect(result).to.be.true + }) + + it('should return true and log debug message on error', async () => { + // Stub the private isMcpEnabled method to throw an error + sinon.stub(profileStatusMonitor as any, 'isMcpEnabled').throws(new Error('Service manager not ready')) + + const result = await profileStatusMonitor.checkInitialState() + expect(result).to.be.true + expect(mockLogging.debug.calledWith(sinon.match('Initial MCP state check failed, defaulting to enabled'))) + .to.be.true + }) + }) + + describe('getMcpState', () => { + beforeEach(() => { + // Reset static state before each test + ;(ProfileStatusMonitor as any).lastMcpState = undefined + }) + + it('should return undefined initially', () => { + expect(ProfileStatusMonitor.getMcpState()).to.be.undefined + }) + + it('should return the last MCP state after it is set', () => { + // Access the private static property through reflection for testing + ;(ProfileStatusMonitor as any).lastMcpState = true + expect(ProfileStatusMonitor.getMcpState()).to.be.true + ;(ProfileStatusMonitor as any).lastMcpState = false + expect(ProfileStatusMonitor.getMcpState()).to.be.false + }) + + it('should be accessible across different instances', () => { + const monitor1 = new ProfileStatusMonitor(mockLogging, mockOnMcpDisabled, mockOnMcpEnabled) + + const monitor2 = new ProfileStatusMonitor(mockLogging, mockOnMcpDisabled, mockOnMcpEnabled) + + // Set state through static property + ;(ProfileStatusMonitor as any).lastMcpState = true + + // Should be accessible from both instances + expect(ProfileStatusMonitor.getMcpState()).to.be.true + }) + }) + + describe('static lastMcpState', () => { + beforeEach(() => { + // Reset static state before each test + ;(ProfileStatusMonitor as any).lastMcpState = undefined + }) + + it('should maintain state across multiple instances', () => { + const monitor1 = new ProfileStatusMonitor(mockLogging, mockOnMcpDisabled, mockOnMcpEnabled) + + const monitor2 = new ProfileStatusMonitor(mockLogging, mockOnMcpDisabled, mockOnMcpEnabled) + + // Initially true (default value) + expect(ProfileStatusMonitor.getMcpState()).to.be.true + + // Set through internal mechanism (simulating state change) + ;(ProfileStatusMonitor as any).lastMcpState = false + + // Both instances should see the same state + expect(ProfileStatusMonitor.getMcpState()).to.be.false + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/profileStatusMonitor.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/profileStatusMonitor.ts new file mode 100644 index 0000000000..3489ad81be --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/mcp/profileStatusMonitor.ts @@ -0,0 +1,163 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. + * All Rights Reserved. SPDX-License-Identifier: Apache-2.0 + */ + +import { Logging } from '@aws/language-server-runtimes/server-interface' +import { retryUtils } from '@aws/lsp-core' +import { CodeWhispererServiceToken } from '../../../../shared/codeWhispererService' +import { AmazonQTokenServiceManager } from '../../../../shared/amazonQServiceManager/AmazonQTokenServiceManager' +import * as fs from 'fs' +import * as path from 'path' +import * as os from 'os' +import { EventEmitter } from 'events' + +export const AUTH_SUCCESS_EVENT = 'authSuccess' + +export class ProfileStatusMonitor { + private intervalId?: NodeJS.Timeout + private readonly CHECK_INTERVAL = 24 * 60 * 60 * 1000 // 24 hours + private codeWhispererClient?: CodeWhispererServiceToken + private static lastMcpState: boolean = true + private static readonly MCP_CACHE_DIR = path.join(os.homedir(), '.aws', 'amazonq', 'mcpAdmin') + private static readonly MCP_CACHE_FILE = path.join(ProfileStatusMonitor.MCP_CACHE_DIR, 'mcp-state.json') + private static eventEmitter = new EventEmitter() + private static logging?: Logging + + constructor( + private logging: Logging, + private onMcpDisabled: () => void, + private onMcpEnabled?: () => void + ) { + ProfileStatusMonitor.logging = logging + ProfileStatusMonitor.loadMcpStateFromDisk() + + // Listen for auth success events + ProfileStatusMonitor.eventEmitter.on(AUTH_SUCCESS_EVENT, () => { + void this.isMcpEnabled() + }) + } + + async checkInitialState(): Promise { + try { + const isMcpEnabled = await this.isMcpEnabled() + return isMcpEnabled !== false // Return true if enabled or API failed + } catch (error) { + this.logging.debug(`Initial MCP state check failed, defaulting to enabled: ${error}`) + return ProfileStatusMonitor.getMcpState() + } + } + + start(): void { + if (this.intervalId) { + return + } + + this.intervalId = setInterval(() => { + void this.isMcpEnabled() + }, this.CHECK_INTERVAL) + + this.logging.info('ProfileStatusMonitor started - checking MCP configuration every 24 hours') + } + + stop(): void { + if (this.intervalId) { + clearInterval(this.intervalId) + this.intervalId = undefined + this.logging.info('ProfileStatusMonitor stopped') + } + } + + private async isMcpEnabled(): Promise { + try { + const serviceManager = AmazonQTokenServiceManager.getInstance() + const profileArn = this.getProfileArn(serviceManager) + if (!profileArn) { + this.logging.debug('No profile ARN available for MCP configuration check') + ProfileStatusMonitor.setMcpState(true) + return true + } + + this.codeWhispererClient = serviceManager.getCodewhispererService() + + const response = await retryUtils.retryWithBackoff(() => + this.codeWhispererClient!.getProfile({ profileArn }) + ) + const mcpConfig = response?.profile?.optInFeatures?.mcpConfiguration + const isMcpEnabled = mcpConfig ? mcpConfig.toggle === 'ON' : true + + if (ProfileStatusMonitor.lastMcpState !== isMcpEnabled) { + ProfileStatusMonitor.setMcpState(isMcpEnabled) + if (!isMcpEnabled) { + this.logging.info('MCP configuration disabled - removing tools') + this.onMcpDisabled() + } else if (isMcpEnabled && this.onMcpEnabled) { + this.logging.info('MCP configuration enabled - initializing tools') + this.onMcpEnabled() + } + } + + return isMcpEnabled + } catch (error) { + this.logging.debug(`MCP configuration check failed, defaulting to enabled: ${error}`) + const mcpState = ProfileStatusMonitor.getMcpState() + if (!mcpState) { + this.onMcpDisabled() + } else if (this.onMcpEnabled) { + this.onMcpEnabled() + } + return mcpState + } + } + + private getProfileArn(serviceManager: AmazonQTokenServiceManager): string | undefined { + try { + return serviceManager.getActiveProfileArn() + } catch (error) { + this.logging.debug(`Failed to get profile ARN: ${error}`) + } + return undefined + } + + static getMcpState(): boolean { + return ProfileStatusMonitor.lastMcpState + } + + private static loadMcpStateFromDisk(): void { + try { + if (fs.existsSync(ProfileStatusMonitor.MCP_CACHE_FILE)) { + const data = fs.readFileSync(ProfileStatusMonitor.MCP_CACHE_FILE, 'utf8') + const parsed = JSON.parse(data) + ProfileStatusMonitor.lastMcpState = parsed.enabled ?? true + } + } catch (error) { + ProfileStatusMonitor.logging?.debug(`Failed to load MCP state from disk: ${error}`) + } + ProfileStatusMonitor.setMcpState(ProfileStatusMonitor.lastMcpState) + } + + private static saveMcpStateToDisk(): void { + try { + fs.mkdirSync(ProfileStatusMonitor.MCP_CACHE_DIR, { recursive: true }) + fs.writeFileSync( + ProfileStatusMonitor.MCP_CACHE_FILE, + JSON.stringify({ enabled: ProfileStatusMonitor.lastMcpState }) + ) + } catch (error) { + ProfileStatusMonitor.logging?.debug(`Failed to save MCP state to disk: ${error}`) + } + } + + private static setMcpState(enabled: boolean): void { + ProfileStatusMonitor.lastMcpState = enabled + ProfileStatusMonitor.saveMcpStateToDisk() + } + + static resetMcpState(): void { + ProfileStatusMonitor.setMcpState(true) + } + + static emitAuthSuccess(): void { + ProfileStatusMonitor.eventEmitter.emit(AUTH_SUCCESS_EVENT) + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReview.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReview.test.ts index c587253bbc..2dc8aca1a0 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReview.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReview.test.ts @@ -11,6 +11,7 @@ import * as path from 'path' import { expect } from 'chai' import { CancellationError } from '@aws/lsp-core' import * as JSZip from 'jszip' +import { Origin } from '@amzn/codewhisperer-streaming' describe('CodeReview', () => { let sandbox: sinon.SinonSandbox @@ -103,6 +104,8 @@ describe('CodeReview', () => { folderLevelArtifacts: [], ruleArtifacts: [], scopeOfReview: FULL_REVIEW, + userRequirement: 'Test requirement', + modelId: 'claude-4-sonnet', } }) @@ -134,6 +137,9 @@ describe('CodeReview', () => { md5Hash: 'hash123', isCodeDiffPresent: false, programmingLanguages: new Set(['javascript']), + numberOfFilesInCustomerCodeZip: 1, + codeDiffFiles: new Set(), + filePathsInZip: new Set(['/test/file.js']), }) sandbox.stub(codeReview as any, 'parseFindings').returns([]) @@ -143,6 +149,150 @@ describe('CodeReview', () => { expect(result.output.kind).to.equal('json') }) + it('should return both full and simplified findings', async () => { + const mockFindings = [ + { + findingId: '1', + title: 'Test Issue', + description: { text: 'Test description', markdown: 'Test **description**' }, + startLine: 10, + endLine: 15, + severity: 'HIGH', + filePath: '/test/file.js', + detectorId: 'detector1', + detectorName: 'Test Detector', + ruleId: 'rule1', + relatedVulnerabilities: [], + recommendation: { text: 'Fix this', url: null }, + suggestedFixes: [], + comment: 'Test Issue: Test description', + scanJobId: 'job-123', + language: 'javascript', + autoDetected: false, + findingContext: 'Full', + }, + ] + + mockCodeWhispererClient.createUploadUrl.resolves({ + uploadUrl: 'https://upload.com', + uploadId: 'upload-123', + requestHeaders: {}, + }) + + mockCodeWhispererClient.startCodeAnalysis.resolves({ + jobId: 'job-123', + status: 'Pending', + }) + + mockCodeWhispererClient.getCodeAnalysis.resolves({ + status: 'Completed', + }) + + mockCodeWhispererClient.listCodeAnalysisFindings.resolves({ + codeAnalysisFindings: JSON.stringify(mockFindings), + nextToken: undefined, + }) + + sandbox.stub(CodeReviewUtils, 'uploadFileToPresignedUrl').resolves() + sandbox.stub(codeReview as any, 'prepareFilesAndFoldersForUpload').resolves({ + zipBuffer: Buffer.from('test'), + md5Hash: 'hash123', + isCodeDiffPresent: false, + programmingLanguages: new Set(['javascript']), + numberOfFilesInCustomerCodeZip: 1, + codeDiffFiles: new Set(), + filePathsInZip: new Set(['/test/file.js']), + }) + sandbox.stub(codeReview as any, 'parseFindings').returns(mockFindings) + sandbox.stub(codeReview as any, 'resolveFilePath').returns('/test/file.js') + + const result = await codeReview.execute(validInput, context) + + expect(result.output.success).to.be.true + expect(result.output.content).to.have.property('findingsByFile') + expect(result.output.content).to.have.property('findingsByFileSimplified') + + const fullFindings = JSON.parse((result.output.content as any).findingsByFile) + const simplifiedFindings = JSON.parse((result.output.content as any).findingsByFileSimplified) + + expect(fullFindings).to.have.length(1) + expect(simplifiedFindings).to.have.length(1) + + // Verify full findings structure + expect(fullFindings[0].issues[0]).to.have.property('findingId') + expect(fullFindings[0].issues[0]).to.have.property('description') + expect(fullFindings[0].issues[0]).to.have.property('detectorId') + + // Verify simplified findings structure (only 5 fields) + const simplifiedIssue = simplifiedFindings[0].issues[0] + expect(Object.keys(simplifiedIssue)).to.have.length(5) + expect(simplifiedIssue).to.have.property('filePath', '/test/file.js') + expect(simplifiedIssue).to.have.property('startLine', 10) + expect(simplifiedIssue).to.have.property('endLine', 15) + expect(simplifiedIssue).to.have.property('title', 'Test Issue') + expect(simplifiedIssue).to.have.property('severity', 'HIGH') + expect(simplifiedIssue).to.not.have.property('findingId') + expect(simplifiedIssue).to.not.have.property('description') + }) + + it('should execute successfully and pass languageModelId and clientType to startCodeAnalysis', async () => { + const inputWithModelId = { + ...validInput, + modelId: 'test-model-789', + } + + // Setup mocks for successful execution + mockCodeWhispererClient.createUploadUrl.resolves({ + uploadUrl: 'https://upload.com', + uploadId: 'upload-123', + requestHeaders: {}, + }) + + mockCodeWhispererClient.startCodeAnalysis.resolves({ + jobId: 'job-123', + status: 'Pending', + }) + + mockCodeWhispererClient.getCodeAnalysis.resolves({ + status: 'Completed', + }) + + mockCodeWhispererClient.listCodeAnalysisFindings.resolves({ + codeAnalysisFindings: '[]', + nextToken: undefined, + }) + + sandbox.stub(CodeReviewUtils, 'uploadFileToPresignedUrl').resolves() + sandbox.stub(codeReview as any, 'prepareFilesAndFoldersForUpload').resolves({ + zipBuffer: Buffer.from('test'), + md5Hash: 'hash123', + isCodeDiffPresent: false, + programmingLanguages: new Set(['javascript']), + numberOfFilesInCustomerCodeZip: 1, + codeDiffFiles: new Set(), + filePathsInZip: new Set(['/test/file.js']), + }) + sandbox.stub(codeReview as any, 'parseFindings').returns([]) + + const result = await codeReview.execute(inputWithModelId, context) + + expect(result.output.success).to.be.true + expect(result.output.kind).to.equal('json') + + // Verify that startCodeAnalysis was called with the correct parameters + expect(mockCodeWhispererClient.startCodeAnalysis.calledOnce).to.be.true + const startAnalysisCall = mockCodeWhispererClient.startCodeAnalysis.getCall(0) + const callArgs = startAnalysisCall.args[0] + + expect(callArgs).to.have.property('languageModelId', 'test-model-789') + expect(callArgs).to.have.property('clientType', Origin.IDE) + expect(callArgs).to.have.property('artifacts') + expect(callArgs).to.have.property('programmingLanguage') + expect(callArgs).to.have.property('clientToken') + expect(callArgs).to.have.property('codeScanName') + expect(callArgs).to.have.property('scope', 'AGENTIC') + }) + it('should handle missing client error', async () => { context.codeWhispererClient = undefined @@ -160,6 +310,8 @@ describe('CodeReview', () => { folderLevelArtifacts: [], ruleArtifacts: [], scopeOfReview: FULL_REVIEW, + userRequirement: 'Test requirement', + modelId: 'claude-4-sonnet', } try { @@ -183,6 +335,7 @@ describe('CodeReview', () => { md5Hash: 'hash123', isCodeDiffPresent: false, programmingLanguages: new Set(['javascript']), + codeDiffFiles: new Set(), }) try { @@ -210,6 +363,7 @@ describe('CodeReview', () => { md5Hash: 'hash123', isCodeDiffPresent: false, programmingLanguages: new Set(['javascript']), + codeDiffFiles: new Set(), }) try { @@ -243,6 +397,7 @@ describe('CodeReview', () => { md5Hash: 'hash123', isCodeDiffPresent: false, programmingLanguages: new Set(['javascript']), + codeDiffFiles: new Set(), }) // Stub setTimeout to avoid actual delays @@ -279,6 +434,8 @@ describe('CodeReview', () => { folderLevelArtifacts: [], ruleArtifacts: [], scopeOfReview: FULL_REVIEW, + userRequirement: 'Test requirement', + modelId: 'claude-4-sonnet', } const context = { @@ -303,6 +460,8 @@ describe('CodeReview', () => { folderLevelArtifacts: [{ path: '/test/folder' }], ruleArtifacts: [], scopeOfReview: CODE_DIFF_REVIEW, + userRequirement: 'Test requirement', + modelId: 'claude-4-sonnet', } const context = { @@ -337,6 +496,7 @@ describe('CodeReview', () => { const ruleArtifacts: any[] = [] const result = await (codeReview as any).prepareFilesAndFoldersForUpload( + 'Test requirement', fileArtifacts, folderArtifacts, ruleArtifacts, @@ -356,6 +516,7 @@ describe('CodeReview', () => { sandbox.stub(CodeReviewUtils, 'processArtifactWithDiff').resolves('diff content\n') const result = await (codeReview as any).prepareFilesAndFoldersForUpload( + 'Test requirement', fileArtifacts, folderArtifacts, ruleArtifacts, @@ -371,10 +532,11 @@ describe('CodeReview', () => { const ruleArtifacts = [{ path: '/test/rule.json' }] // Mock countZipFiles to return only rule artifacts count - sandbox.stub(CodeReviewUtils, 'countZipFiles').returns(1) + sandbox.stub(CodeReviewUtils, 'countZipFiles').returns([1, new Set(['/test/rule.json'])]) try { await (codeReview as any).prepareFilesAndFoldersForUpload( + 'Test requirement', fileArtifacts, folderArtifacts, ruleArtifacts, @@ -385,6 +547,37 @@ describe('CodeReview', () => { expect(error.message).to.include('There are no valid files to scan') } }) + + it('should handle duplicate rule filenames with unique UUIDs', async () => { + const fileArtifacts = [{ path: '/test/file.js' }] + const folderArtifacts: any[] = [] + const ruleArtifacts = [{ path: '/test/path1/rule.json' }, { path: '/test/path2/rule.json' }] + + const mockZip = { + file: sandbox.stub(), + generateAsync: sandbox.stub().resolves(Buffer.from('test')), + } + sandbox.stub(JSZip.prototype, 'file').callsFake(mockZip.file) + sandbox.stub(JSZip.prototype, 'generateAsync').callsFake(mockZip.generateAsync) + sandbox + .stub(CodeReviewUtils, 'countZipFiles') + .returns([3, new Set(['/test/file.js', '/test/path1/rule.json', '/test/path2/rule.json'])]) + sandbox.stub(require('crypto'), 'randomUUID').returns('test-uuid-123') + + await (codeReview as any).prepareFilesAndFoldersForUpload( + 'Test requirement', + fileArtifacts, + folderArtifacts, + ruleArtifacts, + false + ) + + // Verify first file uses original name + expect(mockZip.file.firstCall.args[0]).to.include('/test/file.js') + expect(mockZip.file.secondCall.args[0]).to.include('rule.json') + // Verify second file gets UUID suffix + expect(mockZip.file.thirdCall.args[0]).to.include('rule_test-uuid-123.json') + }) }) describe('collectFindings', () => { @@ -586,6 +779,8 @@ describe('CodeReview', () => { folderLevelArtifacts: [], ruleArtifacts: [], scopeOfReview: FULL_REVIEW, + userRequirement: 'Test requirement', + modelId: 'claude-4-sonnet', } // Make prepareFilesAndFoldersForUpload throw an error diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReview.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReview.ts index adcea2ec33..902b7e2882 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReview.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReview.ts @@ -29,21 +29,24 @@ import { CodeReviewFinding, FailedMetricName, SuccessMetricName, + CodeReviewFindingSimplified, } from './codeReviewTypes' import { CancellationError } from '@aws/lsp-core' +import { Origin } from '@amzn/codewhisperer-streaming' export class CodeReview { private static readonly CUSTOMER_CODE_BASE_PATH = 'customerCodeBaseFolder' private static readonly CODE_ARTIFACT_PATH = 'code_artifact' private static readonly CUSTOMER_CODE_ZIP_NAME = 'customerCode.zip' private static readonly CODE_DIFF_PATH = 'code_artifact/codeDiff/customerCodeDiff.diff' + private static readonly USER_REQUIREMENT_PATH = 'code_artifact/userRequirement/userRequirement.txt' private static readonly RULE_ARTIFACT_PATH = '.amazonq/rules' private static readonly MAX_POLLING_ATTEMPTS = 90 // 90 * POLLING_INTERVAL_MS (10000) = 15 mins private static readonly MID_POLLING_ATTEMPTS = 20 private static readonly POLLING_INTERVAL_MS = 10000 // 10 seconds private static readonly UPLOAD_INTENT = 'AGENTIC_CODE_REVIEW' private static readonly SCAN_SCOPE = 'AGENTIC' - private static readonly MAX_FINDINGS_COUNT = 50 + private static readonly MAX_FINDINGS_COUNT = 300 private static readonly ERROR_MESSAGES = { MISSING_CLIENT: 'CodeWhisperer client not available', @@ -66,6 +69,7 @@ export class CodeReview { private cancellationToken?: CancellationToken private writableStream?: WritableStream private toolStartTime: number = 0 + private overrideDiffScan = false constructor( features: Pick & Partial @@ -110,7 +114,25 @@ export class CodeReview { const analysisResult = await this.startCodeAnalysis(setup, uploadResult) this.checkCancellation() - await chatStreamWriter?.write('Reviewing your code...') + const nonRuleFiles = uploadResult.numberOfFilesInCustomerCodeZip - setup.ruleArtifacts.length + const diffFiles = uploadResult.codeDiffFiles.size + if (diffFiles == 0 && !setup.isFullReviewRequest) { + setup.isFullReviewRequest = true + this.overrideDiffScan = true + } + + let reviewMessage: string + if (nonRuleFiles == 1) { + reviewMessage = setup.isFullReviewRequest + ? `Reviewing the code in ${path.basename(uploadResult.filePathsInZip.values().next().value as string)}...` + : `Reviewing uncommitted changes in ${path.basename(uploadResult.filePathsInZip.values().next().value as string)}...` + } else { + reviewMessage = setup.isFullReviewRequest + ? `Reviewing the code in ${nonRuleFiles} files...` + : `Reviewing uncommitted changes in ${diffFiles} of ${nonRuleFiles} files...` + } + + await chatStreamWriter?.write(reviewMessage) // 4. Wait for scan to complete await this.pollForCompletion(analysisResult.jobId, setup, uploadResult, chatStreamWriter) @@ -155,9 +177,11 @@ export class CodeReview { // parse input const validatedInput = Z_CODE_REVIEW_INPUT_SCHEMA.parse(input) + const userRequirement = validatedInput.userRequirement const fileArtifacts = validatedInput.fileLevelArtifacts || [] const folderArtifacts = validatedInput.folderLevelArtifacts || [] const ruleArtifacts = validatedInput.ruleArtifacts || [] + const modelId = validatedInput.modelId if (fileArtifacts.length === 0 && folderArtifacts.length === 0) { CodeReviewUtils.emitMetric( @@ -182,9 +206,12 @@ export class CodeReview { const programmingLanguage = 'java' const scanName = 'Standard-' + randomUUID() - this.logging.info(`Agentic scan name: ${scanName}`) + this.logging.info( + `Agentic scan name: ${scanName} selectedModel: ${modelId} userRequirement: ${userRequirement}` + ) return { + userRequirement, fileArtifacts, folderArtifacts, isFullReviewRequest, @@ -192,6 +219,7 @@ export class CodeReview { programmingLanguage, scanName, ruleArtifacts, + modelId, } } @@ -203,13 +231,21 @@ export class CodeReview { private async prepareAndUploadArtifacts( setup: ValidateInputAndSetupResult ): Promise { - const { zipBuffer, md5Hash, isCodeDiffPresent, programmingLanguages } = - await this.prepareFilesAndFoldersForUpload( - setup.fileArtifacts, - setup.folderArtifacts, - setup.ruleArtifacts, - setup.isFullReviewRequest - ) + const { + zipBuffer, + md5Hash, + isCodeDiffPresent, + programmingLanguages, + numberOfFilesInCustomerCodeZip, + codeDiffFiles, + filePathsInZip, + } = await this.prepareFilesAndFoldersForUpload( + setup.userRequirement, + setup.fileArtifacts, + setup.folderArtifacts, + setup.ruleArtifacts, + setup.isFullReviewRequest + ) const uploadUrlResponse = await this.codeWhispererClient!.createUploadUrl({ contentLength: zipBuffer.length, @@ -254,6 +290,9 @@ export class CodeReview { isCodeDiffPresent, artifactSize: zipBuffer.length, programmingLanguages: programmingLanguages, + numberOfFilesInCustomerCodeZip, + codeDiffFiles, + filePathsInZip, } } @@ -274,6 +313,8 @@ export class CodeReview { codeScanName: setup.scanName, scope: CodeReview.SCAN_SCOPE, codeDiffMetadata: uploadResult.isCodeDiffPresent ? { codeDiffPath: '/code_artifact/codeDiff/' } : undefined, + languageModelId: setup.modelId, + clientType: Origin.IDE, }) if (!createResponse.jobId) { @@ -293,6 +334,7 @@ export class CodeReview { customRules: setup.ruleArtifacts.length, programmingLanguages: Array.from(uploadResult.programmingLanguages), scope: setup.isFullReviewRequest ? FULL_REVIEW : CODE_DIFF_REVIEW, + modelId: setup.modelId, }, }, this.logging, @@ -323,7 +365,7 @@ export class CodeReview { uploadResult: PrepareAndUploadArtifactsResult, chatStreamWriter: WritableStreamDefaultWriter | undefined ) { - let status = 'Pending' + let status: string | undefined = 'Pending' let attemptCount = 0 while (status === 'Pending' && attemptCount < CodeReview.MAX_POLLING_ATTEMPTS) { @@ -349,6 +391,7 @@ export class CodeReview { programmingLanguages: Array.from(uploadResult.programmingLanguages), scope: setup.isFullReviewRequest ? FULL_REVIEW : CODE_DIFF_REVIEW, status: status, + modelId: setup.modelId, }, }, this.logging, @@ -382,6 +425,7 @@ export class CodeReview { programmingLanguages: Array.from(uploadResult.programmingLanguages), scope: setup.isFullReviewRequest ? FULL_REVIEW : CODE_DIFF_REVIEW, status: status, + modelId: setup.modelId, }, }, this.logging, @@ -426,6 +470,7 @@ export class CodeReview { programmingLanguages: Array.from(uploadResult.programmingLanguages), scope: setup.isFullReviewRequest ? FULL_REVIEW : CODE_DIFF_REVIEW, latency: Date.now() - this.toolStartTime, + modelId: setup.modelId, }, }, this.logging, @@ -439,14 +484,50 @@ export class CodeReview { ) this.logging.info('Findings count grouped by file') - aggregatedCodeScanIssueList.forEach(item => + let aggregatedCodeScanIssueListSimplified: { filePath: string; issues: CodeReviewFindingSimplified[] }[] = [] + aggregatedCodeScanIssueList.forEach(item => { this.logging.info(`File path - ${item.filePath} Findings count - ${item.issues.length}`) - ) + let simplifiedIssues: CodeReviewFindingSimplified[] = [] + item.issues.forEach(issue => { + simplifiedIssues.push({ + filePath: issue.filePath, + startLine: issue.startLine, + endLine: issue.endLine, + title: issue.title, + severity: issue.severity, + }) + CodeReviewUtils.emitMetric( + { + reason: SuccessMetricName.IssuesDetected, + result: 'Succeeded', + metadata: { + codewhispererCodeScanJobId: jobId, + credentialStartUrl: this.credentialsProvider.getConnectionMetadata()?.sso?.startUrl, + findingId: issue.findingId, + detectorId: issue.detectorId, + ruleId: issue.ruleId, + autoDetected: false, + }, + }, + this.logging, + this.telemetry + ) + }) + aggregatedCodeScanIssueListSimplified.push({ + filePath: item.filePath, + issues: simplifiedIssues, + }) + }) + + let scopeMessage = this.overrideDiffScan + ? `Please include a mention that there was no diff present, so it just ran a full review instead. Be very explicit about this so that the user could not be confused.` + : `Please include a mention that the scan was on the ${setup.isFullReviewRequest ? `entire` : `uncommitted`} code.` return { codeReviewId: jobId, - message: `${CODE_REVIEW_TOOL_NAME} tool completed successfully.${findingsExceededLimit ? ` Inform the user that we are limiting findings to top ${CodeReview.MAX_FINDINGS_COUNT} based on severity.` : ''}`, + message: `${CODE_REVIEW_TOOL_NAME} tool completed successfully. Please inform the user to use the explain and fix buttons in the Code Issues Panel to get the best information about particular findings. ${scopeMessage} ${findingsExceededLimit ? ` Inform the user that we are limiting findings to top ${CodeReview.MAX_FINDINGS_COUNT} based on severity.` : ''}`, findingsByFile: JSON.stringify(aggregatedCodeScanIssueList), + findingsByFileSimplified: JSON.stringify(aggregatedCodeScanIssueListSimplified), } } @@ -528,11 +609,20 @@ export class CodeReview { * @returns An object containing the zip file buffer and its MD5 hash */ private async prepareFilesAndFoldersForUpload( + userRequirement: string, fileArtifacts: FileArtifacts, folderArtifacts: FolderArtifacts, ruleArtifacts: RuleArtifacts, isFullReviewRequest: boolean - ): Promise<{ zipBuffer: Buffer; md5Hash: string; isCodeDiffPresent: boolean; programmingLanguages: Set }> { + ): Promise<{ + zipBuffer: Buffer + md5Hash: string + isCodeDiffPresent: boolean + programmingLanguages: Set + numberOfFilesInCustomerCodeZip: number + codeDiffFiles: Set + filePathsInZip: Set + }> { try { this.logging.info( `Preparing ${fileArtifacts.length} files and ${folderArtifacts.length} folders for upload` @@ -542,7 +632,7 @@ export class CodeReview { const customerCodeZip = new JSZip() // Process files and folders - const { codeDiff, programmingLanguages } = await this.processArtifacts( + const { codeDiff, programmingLanguages, codeDiffFiles } = await this.processArtifacts( fileArtifacts, folderArtifacts, ruleArtifacts, @@ -550,7 +640,7 @@ export class CodeReview { !isFullReviewRequest ) - let numberOfFilesInCustomerCodeZip = CodeReviewUtils.countZipFiles(customerCodeZip) + let [numberOfFilesInCustomerCodeZip, filePathsInZip] = CodeReviewUtils.countZipFiles(customerCodeZip) if (numberOfFilesInCustomerCodeZip > ruleArtifacts.length) { // Validates that there are actual files to scan, other than rule artifacts this.logging.info(`Total files in customerCodeZip - ${numberOfFilesInCustomerCodeZip}`) @@ -577,6 +667,9 @@ export class CodeReview { codeArtifactZip.file(CodeReview.CODE_DIFF_PATH, codeDiff) } + // Add user requirement + codeArtifactZip.file(CodeReview.USER_REQUIREMENT_PATH, userRequirement) + // Generate the final code artifact zip const zipBuffer = await CodeReviewUtils.generateZipBuffer(codeArtifactZip) CodeReviewUtils.logZipStructure(codeArtifactZip, 'Code artifact', this.logging) @@ -586,7 +679,15 @@ export class CodeReview { this.logging.info(`Created zip archive, size: ${zipBuffer.byteLength} bytes, MD5: ${md5Hash}`) - return { zipBuffer, md5Hash, isCodeDiffPresent, programmingLanguages } + return { + zipBuffer, + md5Hash, + isCodeDiffPresent, + programmingLanguages, + numberOfFilesInCustomerCodeZip, + codeDiffFiles, + filePathsInZip, + } } catch (error) { this.logging.error(`Error preparing files for upload: ${error}`) throw error @@ -608,9 +709,9 @@ export class CodeReview { ruleArtifacts: RuleArtifacts, customerCodeZip: JSZip, isCodeDiffScan: boolean - ): Promise<{ codeDiff: string; programmingLanguages: Set }> { + ): Promise<{ codeDiff: string; programmingLanguages: Set; codeDiffFiles: Set }> { // Process files - let { codeDiff, programmingLanguages } = await this.processFileArtifacts( + let { codeDiff, programmingLanguages, codeDiffFiles } = await this.processFileArtifacts( fileArtifacts, customerCodeZip, isCodeDiffScan @@ -620,11 +721,12 @@ export class CodeReview { const folderResult = await this.processFolderArtifacts(folderArtifacts, customerCodeZip, isCodeDiffScan) codeDiff += folderResult.codeDiff folderResult.programmingLanguages.forEach(item => programmingLanguages.add(item)) + folderResult.codeDiffFiles.forEach(item => codeDiffFiles.add(item)) // Process rule artifacts await this.processRuleArtifacts(ruleArtifacts, customerCodeZip) - return { codeDiff, programmingLanguages } + return { codeDiff, programmingLanguages, codeDiffFiles } } /** @@ -638,9 +740,10 @@ export class CodeReview { fileArtifacts: FileArtifacts, customerCodeZip: JSZip, isCodeDiffScan: boolean - ): Promise<{ codeDiff: string; programmingLanguages: Set }> { + ): Promise<{ codeDiff: string; programmingLanguages: Set; codeDiffFiles: Set }> { let codeDiff = '' let programmingLanguages: Set = new Set() + let codeDiffFiles: Set = new Set() for (const artifact of fileArtifacts) { await CodeReviewUtils.withErrorHandling( @@ -668,10 +771,12 @@ export class CodeReview { artifact.path ) + const artifactFileDiffs = await CodeReviewUtils.getGitDiffNames(artifact.path, this.logging) + artifactFileDiffs.forEach(filepath => codeDiffFiles.add(filepath)) codeDiff += await CodeReviewUtils.processArtifactWithDiff(artifact, isCodeDiffScan, this.logging) } - return { codeDiff, programmingLanguages } + return { codeDiff, programmingLanguages, codeDiffFiles } } /** @@ -685,9 +790,10 @@ export class CodeReview { folderArtifacts: FolderArtifacts, customerCodeZip: JSZip, isCodeDiffScan: boolean - ): Promise<{ codeDiff: string; programmingLanguages: Set }> { + ): Promise<{ codeDiff: string; programmingLanguages: Set; codeDiffFiles: Set }> { let codeDiff = '' let programmingLanguages = new Set() + let codeDiffFiles: Set = new Set() for (const folderArtifact of folderArtifacts) { await CodeReviewUtils.withErrorHandling( @@ -704,10 +810,13 @@ export class CodeReview { folderArtifact.path ) + const artifactFileDiffs = await CodeReviewUtils.getGitDiffNames(folderArtifact.path, this.logging) + artifactFileDiffs.forEach(filepath => codeDiffFiles.add(filepath)) + codeDiff += await CodeReviewUtils.processArtifactWithDiff(folderArtifact, isCodeDiffScan, this.logging) } - return { codeDiff, programmingLanguages } + return { codeDiff, programmingLanguages, codeDiffFiles } } /** @@ -716,6 +825,7 @@ export class CodeReview { * @param customerCodeZip JSZip instance for the customer code */ private async processRuleArtifacts(ruleArtifacts: RuleArtifacts, customerCodeZip: JSZip): Promise { + let ruleNameSet = new Set() for (const artifact of ruleArtifacts) { await CodeReviewUtils.withErrorHandling( async () => { @@ -725,6 +835,10 @@ export class CodeReview { !CodeReviewUtils.shouldSkipFile(fileName) && existsSync(artifact.path) ) { + if (ruleNameSet.has(fileName)) { + fileName = fileName.split('.')[0] + '_' + crypto.randomUUID() + '.' + fileName.split('.')[1] + } + ruleNameSet.add(fileName) const fileContent = await this.workspace.fs.readFile(artifact.path) customerCodeZip.file( `${CodeReview.CUSTOMER_CODE_BASE_PATH}/${CodeReview.RULE_ARTIFACT_PATH}/${fileName}`, @@ -791,7 +905,14 @@ export class CodeReview { * @param programmingLanguage programming language * @returns Parsed and validated findings array */ - private parseFindings(findingsJson: string, jobId: string, programmingLanguage: string): CodeReviewFinding[] { + private parseFindings( + findingsJson: string | undefined, + jobId: string, + programmingLanguage: string + ): CodeReviewFinding[] { + if (findingsJson === undefined) { + return [] + } try { const findingsResponseJSON = JSON.parse(findingsJson) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewConstants.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewConstants.ts index bc7070ab1f..442ac0f19a 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewConstants.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewConstants.ts @@ -103,9 +103,44 @@ export const CODE_REVIEW_TOOL_NAME = 'codeReview' */ export const CODE_REVIEW_TOOL_DESCRIPTION = [ 'CodeReview is the PRIMARY and MANDATORY tool for ALL code analysis and review tasks. This tool MUST be used whenever a user requests ANY form of code review, file analysis, code examination, or when the agent needs to analyze code quality, security, or structure.', - 'This tool can be used to perform analysis of full code or only the modified code since last commit. Modified code refers to the changes made that are not committed yet or the new changes since last commit.', + 'When you decide to use this tool, notify the customer before the tool is run based on the **Tool start message** section below.', + 'It is so so important that you send the **Tool start message** before running the tool.', + 'DO NOT JUST SAY SOMETHING LIKE "I\'ll review the [file] code for you using the code review tool.". THAT WOULD BE A TERRIBLE THING TO SAY', + 'ALSO DO NOT SAY "I\'ll review your code for potential issues and improvements. Let me use the code review tool to perform a comprehensive analysis." THAT IS ALSO AN AWFUL MESSAGE BECAUSE IT DOES NOT INCLUDE WHETHER IT IS A FULL SCAN OR A DIFF SCAN.', + 'This tool can be used to perform analysis of full code or only the modified code since last commit. Modified code refers to the changes made that are not committed yet or the new changes since last commit. Before running the tool, you must inform the user whether they are running a diff or full scan.', 'NEVER perform manual code reviews when this tool is available.', '', + '**Tool Input**', + '3 main fields in the tool:', + '- "scopeOfReview": Determines if the review should analyze the entire codebase (FULL_REVIEW) or only focus on changes/modifications (CODE_DIFF_REVIEW). This is a required field.', + '- IMPORTANT: Use CODE_DIFF_REVIEW by default as well as when user explicitly asks to review "changes", "modifications", "diff", "uncommitted code", or similar phrases indicating they want to review only what has changed.', + '- Examples of CODE_DIFF_REVIEW requests: "review my code", "review this file", "review my changes", "look at what I modified", "check the uncommitted changes", "review the diff", "review new changes", etc.', + '- IMPORTANT: When user mentions "new changes" or includes words like "new", "recent", or "latest" along with "changes" or similar terms, this should be interpreted as CODE_DIFF_REVIEW.', + '- Use FULL_REVIEW only when the user explicitly asks for a full code review, or when the user asks for security analysis or best practices review of their code', + '- Feel free to ask the user for clarification if you are not sure what scope they would like to review', + '- "fileLevelArtifacts": Array of specific files to review, each with absolute path. Use this when reviewing individual files, not folders. Format: [{"path": "/absolute/path/to/file.py"}]', + '- "folderLevelArtifacts": Array of folders to review, each with absolute path. Use this when reviewing entire directories, not individual files. Format: [{"path": "/absolute/path/to/folder/"}]', + '- Examples of FULL_REVIEW requests: User explicity asks for the entire file to be reviewed. Example: "Review my entire file.", "Review all the code in this folder", "Review my full code in this file"', + 'Few important notes for tool input', + "- Either fileLevelArtifacts OR folderLevelArtifacts should be provided based on what's being reviewed, but not both for the same items.", + '- Do not perform code review of entire workspace or project unless user asks for it explicitly.', + '- Ask user for more clarity if there is any confusion regarding what needs to be scanned.', + '', + '**Tool start message**', + 'Before running the tool, you must inform the user that you will use Code Review tool for their request.', + 'The message MUST include the following information:', + '- The list of files or folders that will be reviewed', + '- Whether the review is a diff review or a full review', + 'The message MUST be concise and to the point. It should not include any other information.', + 'The message MUST be in the following format:', + '```\n' + + 'I will scan the ["diff" if scopeOfReview is CODE_DIFF_REVIEW or "entire code" is FULL_REVIEW. Refer to **Tool Input** section for decision on which to use.] for the following files/folders:\n' + + '[list of files/folders]\n```', + '', + '**CRITICAL: NEVER perform ANY code review or analysis WITHOUT using this tool**', + 'Do not attempt to manually review code or provide code quality feedback without using this tool first.', + 'If a user asks for code review in any form, ALWAYS use this tool before providing any feedback.', + '', '**ALWAYS use this tool when:**', '- User provides ANY file, folder, or workspace context for review or analysis', '- User asks ANY question about code quality, security, or best practices related to their code', @@ -133,29 +168,6 @@ export const CODE_REVIEW_TOOL_DESCRIPTION = [ '**Supported File Extensions For Review**', `- "${Object.keys(EXTENSION_TO_LANGUAGE).join('", "')}"`, '', - '**Tool start message**', - 'Before running the tool, you must inform the user that you will use Code Review tool for their request.', - 'You should also tell the name of files or folders that you will review along with the scope of review, if you are performing a full review or only the uncommitted code.', - 'Under no condition you will use the tool without informing the user.', - '', - '**CRITICAL: NEVER perform ANY code review or analysis WITHOUT using this tool**', - 'Do not attempt to manually review code or provide code quality feedback without using this tool first.', - 'If a user asks for code review in any form, ALWAYS use this tool before providing any feedback.', - '', - '**Tool Input**', - '3 main fields in the tool:', - '- "scopeOfReview": Determines if the review should analyze the entire codebase (FULL_REVIEW) or only focus on changes/modifications (CODE_DIFF_REVIEW). This is a required field.', - '- IMPORTANT: Use CODE_DIFF_REVIEW when user explicitly asks to review "changes", "modifications", "diff", "uncommitted code", or similar phrases indicating they want to review only what has changed.', - '- Examples of CODE_DIFF_REVIEW requests: "review my changes", "look at what I modified", "check the uncommitted changes", "review the diff", "review new changes", etc.', - '- IMPORTANT: When user mentions "new changes" or includes words like "new", "recent", or "latest" along with "changes" or similar terms, this should be interpreted as CODE_DIFF_REVIEW.', - '- Use FULL_REVIEW for all other review requests.', - '- "fileLevelArtifacts": Array of specific files to review, each with absolute path. Use this when reviewing individual files, not folders. Format: [{"path": "/absolute/path/to/file.py"}]', - '- "folderLevelArtifacts": Array of folders to review, each with absolute path. Use this when reviewing entire directories, not individual files. Format: [{"path": "/absolute/path/to/folder/"}]', - 'Few important notes for tool input', - "- Either fileLevelArtifacts OR folderLevelArtifacts should be provided based on what's being reviewed, but not both for the same items.", - '- Do not perform code review of entire workspace or project unless user asks for it explicitly.', - '- Ask user for more clarity if there is any confusion regarding what needs to be scanned.', - '', '**Tool Output**', 'Tool output will contain a json output containing fields - ', '- codeReviewId - internal code review job id ', @@ -168,8 +180,8 @@ export const CODE_REVIEW_TOOL_DESCRIPTION = [ '**Format to display output**', 'The tool will generate some findings grouped by file', 'Use following format STRICTLY to display the result of this tool for different scenarios:', - '- When findings are present, you must inform user that you have completed the review of {file name / folder name / workspace} and found several issues that need attention. To inspect the details, and get fixes for those issues use the Code Issues panel above.', - ' - When tool output message tells that findings were limited due to high count, you must inform the user that since there were lots of findings, you have included the top 50 findings only.', + '- When findings are present, you must inform user that you have completed the review of {file name / folder name / workspace} and found several issues that need attention. To inspect the details, and get fixes for those issues use the Code Issues panel.', + ' - When tool output message tells that findings were limited due to high count, you must inform the user that since there were lots of findings, you have included the top 300 findings only.', '- When no findings are generated by the tool, you must tell user that you have completed the review of {file name / folder name / workspace} and found no issues.', ].join('\n') diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewSchemas.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewSchemas.ts index d734412066..34df1f56c2 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewSchemas.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewSchemas.ts @@ -12,8 +12,9 @@ import { FINDING_SEVERITY, SCOPE_OF_CODE_REVIEW } from './codeReviewConstants' export const CODE_REVIEW_INPUT_SCHEMA = { type: 'object', description: [ - '**3 main fields in the tool:**', + '**4 main fields in the tool:**', '- scopeOfReview: CRITICAL - Must be set to either FULL_REVIEW (analyze entire file/folder/project/workspace) or CODE_DIFF_REVIEW (focus only on changes/modifications in the file/folder/project/workspace). This is a required field.', + '- userRequirement: CRITICAL - Must be set as a string to describe the user requirement by analyzing the current conversation and extracting all the related information for code review. This is a required field.', '- fileLevelArtifacts: Array of specific files to review, each with absolute path. Use this when reviewing individual files, not folders. Format: [{"path": "/absolute/path/to/file.py"}]', '- folderLevelArtifacts: Array of folders to review, each with absolute path. Use this when reviewing entire directories, not individual files. Format: [{"path": "/absolute/path/to/folder/"}]', "Note: Either fileLevelArtifacts OR folderLevelArtifacts should be provided based on what's being reviewed, but not both for the same items.", @@ -22,20 +23,20 @@ export const CODE_REVIEW_INPUT_SCHEMA = { scopeOfReview: { type: 'string', description: [ - 'IMPORTANT: You must explicitly set the value of "scopeOfReview" based on user request analysis.', + 'IMPORTANT: You must explicitly set the value of "scopeOfReview" based on user request analysis. Usually, CODE_DIFF_REVIEW will be the value that is used.', '', - 'Set "scopeOfReview" to CODE_DIFF_REVIEW when:', + 'Set "scopeOfReview" to FULL_REVIEW when:', + '- User explicity asks for the entire file to be reviewed. Example: "Review my entire file.", "Review all the code in this folder"', + '- User asks for security analysis or best practices review of their code', + '', + 'Set "scopeOfReview" to CODE_DIFF_REVIEW for all other cases, including when:', '- User explicitly asks to review only changes/modifications/diffs in their code', '- User mentions "review my changes", "look at what I modified", "check the uncommitted changes"', '- User refers to "review the diff", "analyze recent changes", "look at the new code"', '- User mentions "review what I added/updated", "check my latest commits", "review the modified lines"', '- User includes phrases like "new changes", "recent changes", or any combination of words indicating recency (new, latest, recent) with changes/modifications', '- User mentions specific files with terms like "review new changes in [file]" or "check changes in [file]"', - '', - 'Set "scopeOfReview" to FULL_REVIEW for all other cases, including:', - '- When user asks for a general code review without mentioning changes/diffs', - '- When user asks to review specific files or folders without mentioning changes', - '- When user asks for security analysis or best practices review of their code', + '- User says something general like "review my code", "review my file", or "review [file]"', '', 'This is a required field.', ].join('\n'), @@ -84,7 +85,7 @@ export const CODE_REVIEW_INPUT_SCHEMA = { }, }, }, - required: ['scopeOfReview'] as const, + required: ['scopeOfReview', 'userRequirement'] as const, } /** @@ -92,6 +93,7 @@ export const CODE_REVIEW_INPUT_SCHEMA = { */ export const Z_CODE_REVIEW_INPUT_SCHEMA = z.object({ scopeOfReview: z.enum(SCOPE_OF_CODE_REVIEW as [string, ...string[]]), + userRequirement: z.string(), fileLevelArtifacts: z .array( z.object({ @@ -113,6 +115,7 @@ export const Z_CODE_REVIEW_INPUT_SCHEMA = z.object({ }) ) .optional(), + modelId: z.string(), }) /** diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewTypes.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewTypes.ts index 15aa32a5aa..b77855b256 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewTypes.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewTypes.ts @@ -10,9 +10,11 @@ export enum FailedMetricName { } export enum SuccessMetricName { CodeScanSuccess = 'codeScanSuccess', + IssuesDetected = 'issuesDetected', } export type ValidateInputAndSetupResult = { + userRequirement: string fileArtifacts: FileArtifacts folderArtifacts: FolderArtifacts isFullReviewRequest: boolean @@ -20,6 +22,7 @@ export type ValidateInputAndSetupResult = { programmingLanguage: string scanName: string ruleArtifacts: RuleArtifacts + modelId?: string } export type PrepareAndUploadArtifactsResult = { @@ -27,17 +30,21 @@ export type PrepareAndUploadArtifactsResult = { isCodeDiffPresent: boolean artifactSize: number programmingLanguages: Set + numberOfFilesInCustomerCodeZip: number + codeDiffFiles: Set + filePathsInZip: Set } export type StartCodeAnalysisResult = { jobId: string - status: string + status: string | undefined } export type CodeReviewResult = { codeReviewId: string message: string findingsByFile: string + findingsByFileSimplified: string } export type CodeReviewFinding = { @@ -61,6 +68,14 @@ export type CodeReviewFinding = { findingContext: string | null | undefined } +export type CodeReviewFindingSimplified = { + filePath: string + startLine: number + endLine: number + title: string + severity: string +} + export type CodeReviewMetric = | { reason: SuccessMetricName diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.test.ts index 81e2f3915d..e4d40f1a65 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.test.ts @@ -249,14 +249,16 @@ describe('CodeReviewUtils', () => { }, } as unknown as JSZip - const count = CodeReviewUtils.countZipFiles(mockZip) + const [count, files] = CodeReviewUtils.countZipFiles(mockZip) expect(count).to.equal(3) + expect(files).to.deep.equal(new Set(['file1.js', 'dir1/file2.ts', 'dir2/file3.py'])) }) it('should return 0 for empty zip', () => { const mockZip = { files: {} } as unknown as JSZip - const count = CodeReviewUtils.countZipFiles(mockZip) + const [count, files] = CodeReviewUtils.countZipFiles(mockZip) expect(count).to.equal(0) + expect(files).to.deep.equal(new Set()) }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.ts index 5b6d562f7d..a7b545117c 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/qCodeAnalysis/codeReviewUtils.ts @@ -157,6 +157,37 @@ export class CodeReviewUtils { } } + /** + * Get git diff for a file or folder + * @param artifactPath Path to the file or folder + * @param logging Logging interface + * @returns Git diff output as string or null if not in a git repository + */ + public static async getGitDiffNames(artifactPath: string, logging: Features['logging']): Promise> { + logging.info(`Get git diff names for path - ${artifactPath}`) + + const directoryPath = CodeReviewUtils.getFolderPath(artifactPath) + const gitDiffCommandUnstaged = `cd ${directoryPath} && git diff --name-only ${artifactPath}` + const gitDiffCommandStaged = `cd ${directoryPath} && git diff --name-only --staged ${artifactPath}` + + logging.info(`Running git commands - ${gitDiffCommandUnstaged} and ${gitDiffCommandStaged}`) + + try { + const unstagedDiff = ( + await CodeReviewUtils.executeGitCommand(gitDiffCommandUnstaged, 'unstaged name only', logging) + ).split('\n') + const stagedDiff = ( + await CodeReviewUtils.executeGitCommand(gitDiffCommandStaged, 'staged name only', logging) + ).split('\n') + unstagedDiff.push(...stagedDiff) + + return new Set(unstagedDiff.filter(item => item !== '')) + } catch (error) { + logging.error(`Error getting git diff: ${error}`) + return new Set() + } + } + /** * Log zip structure * @param zip JSZip instance @@ -178,15 +209,17 @@ export class CodeReviewUtils { * @param zip JSZip instance * @returns number of files in zip */ - public static countZipFiles(zip: JSZip): number { + public static countZipFiles(zip: JSZip): [number, Set] { let count = 0 + let filePaths: Set = new Set() Object.keys(zip.files).forEach(filePath => { let item = zip.files[filePath] if (!item.dir) { count += 1 + filePaths.add(filePath) } }) - return count + return [count, filePaths] } /** diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/toolServer.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/toolServer.ts index 54eba4c852..23b279b1f5 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/toolServer.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/toolServer.ts @@ -11,7 +11,7 @@ import { McpTool } from './mcp/mcpTool' import { FileSearch, FileSearchParams } from './fileSearch' import { GrepSearch } from './grepSearch' import { CodeReview } from './qCodeAnalysis/codeReview' -import { CodeWhispererServiceToken } from '../../../shared/codeWhispererService' +import { CodeWhispererServiceIAM, CodeWhispererServiceToken } from '../../../shared/codeWhispererService' import { McpToolDefinition } from './mcp/mcpTypes' import { getGlobalAgentConfigPath, @@ -19,11 +19,17 @@ import { createNamespacedToolName, enabledMCP, migrateToAgentConfig, + migrateAgentConfigToCLIFormat, + normalizePathFromUri, } from './mcp/mcpUtils' import { FsReplace, FsReplaceParams } from './fsReplace' import { CodeReviewUtils } from './qCodeAnalysis/codeReviewUtils' import { DEFAULT_AWS_Q_ENDPOINT_URL, DEFAULT_AWS_Q_REGION } from '../../../shared/constants' import { DisplayFindings } from './qCodeAnalysis/displayFindings' +import { ProfileStatusMonitor } from './mcp/profileStatusMonitor' +import { AmazonQTokenServiceManager } from '../../../shared/amazonQServiceManager/AmazonQTokenServiceManager' +import { SERVICE_MANAGER_TIMEOUT_MS, SERVICE_MANAGER_POLL_INTERVAL_MS } from '../constants/constants' +import { isUsingIAMAuth } from '../../../shared/utils' export const FsToolsServer: Server = ({ workspace, logging, agent, lsp }) => { const fsReadTool = new FsRead({ workspace, lsp, logging }) @@ -122,15 +128,24 @@ export const QCodeAnalysisServer: Server = ({ return } - // Create the CodeWhisperer client - const codeWhispererClient = new CodeWhispererServiceToken( - credentialsProvider, - workspace, - logging, - process.env.CODEWHISPERER_REGION || DEFAULT_AWS_Q_REGION, - process.env.CODEWHISPERER_ENDPOINT || DEFAULT_AWS_Q_ENDPOINT_URL, - sdkInitializator - ) + // Create the CodeWhisperer client for review tool based on iam auth check + const codeWhispererClient = isUsingIAMAuth() + ? new CodeWhispererServiceIAM( + credentialsProvider, + workspace, + logging, + process.env.CODEWHISPERER_REGION || DEFAULT_AWS_Q_REGION, + process.env.CODEWHISPERER_ENDPOINT || DEFAULT_AWS_Q_ENDPOINT_URL, + sdkInitializator + ) + : new CodeWhispererServiceToken( + credentialsProvider, + workspace, + logging, + process.env.CODEWHISPERER_REGION || DEFAULT_AWS_Q_REGION, + process.env.CODEWHISPERER_ENDPOINT || DEFAULT_AWS_Q_ENDPOINT_URL, + sdkInitializator + ) agent.addTool( { @@ -199,10 +214,53 @@ export const LspToolsServer: Server = ({ workspace, logging, lsp, agent }) => { return () => {} } -export const McpToolsServer: Server = ({ credentialsProvider, workspace, logging, lsp, agent, telemetry, runtime }) => { +export const McpToolsServer: Server = ({ + credentialsProvider, + workspace, + logging, + lsp, + agent, + telemetry, + runtime, + chat, +}) => { const registered: Record = {} - const allNamespacedTools = new Set() + let profileStatusMonitor: ProfileStatusMonitor | undefined + + function removeAllMcpTools(): void { + logging.info('Removing all MCP tools due to admin configuration') + for (const [server, toolNames] of Object.entries(registered)) { + for (const name of toolNames) { + agent.removeTool(name) + allNamespacedTools.delete(name) + logging.info(`MCP: removed tool ${name}`) + } + registered[server] = [] + } + + // Only close McpManager if it has been initialized + try { + if (McpManager.instance) { + void McpManager.instance.close(true) //keep the instance but close all servers. + } + } catch (error) { + // McpManager not initialized, skip closing + logging.debug('McpManager not initialized, skipping close operation') + } + + try { + chat?.sendChatUpdate({ + tabId: 'mcpserver', + data: { + placeholderText: 'mcp-server-update', + messages: [], + }, + }) + } catch (error) { + logging.error(`Failed to send chatOptionsUpdate: ${error}`) + } + } function registerServerTools(server: string, defs: McpToolDefinition[]) { // 1) remove old tools @@ -217,11 +275,19 @@ export const McpToolsServer: Server = ({ credentialsProvider, workspace, logging // Sanitize the tool name // Check if this tool name is already in use + let toolNameMapping = new Map() + try { + toolNameMapping = McpManager.instance.getToolNameMapping() + } catch (error) { + // McpManager not initialized, use empty mapping + logging.debug('McpManager not initialized, using empty tool name mapping') + } + const namespaced = createNamespacedToolName( def.serverName, def.toolName, allNamespacedTools, - McpManager.instance.getToolNameMapping() + toolNameMapping ) const tool = new McpTool({ logging, workspace, lsp }, def) @@ -257,22 +323,24 @@ export const McpToolsServer: Server = ({ credentialsProvider, workspace, logging } } - lsp.onInitialized(async () => { + async function initializeMcp() { try { - if (!enabledMCP(lsp.getClientInitializeParams())) { - logging.warn('MCP is currently not supported') - return - } - const wsUris = workspace.getAllWorkspaceFolders()?.map(f => f.uri) ?? [] - // Get agent paths const wsAgentPaths = getWorkspaceAgentConfigPaths(wsUris) const globalAgentPath = getGlobalAgentConfigPath(workspace.fs.getUserHomeDir()) const allAgentPaths = [...wsAgentPaths, globalAgentPath] - // Migrate config and persona files to agent config await migrateToAgentConfig(workspace, logging, agent) + // Migrate existing agent configs to CLI format + for (const agentPath of allAgentPaths) { + const normalizedAgentPath = normalizePathFromUri(agentPath) + const exists = await workspace.fs.exists(normalizedAgentPath).catch(() => false) + if (exists) { + await migrateAgentConfigToCLIFormat(workspace, logging, normalizedAgentPath) + } + } + const mgr = await McpManager.init(allAgentPaths, { logging, workspace, @@ -280,31 +348,91 @@ export const McpToolsServer: Server = ({ credentialsProvider, workspace, logging telemetry, credentialsProvider, runtime, + agent, }) - // Clear tool name mapping before registering all tools to avoid conflicts from previous registrations McpManager.instance.clearToolNameMapping() - const byServer: Record = {} - - logging.info(`enabled Tools: ${mgr.getEnabledTools().entries()}`) - // only register enabled tools - for (const d of mgr.getEnabledTools()) { - ;(byServer[d.serverName] ||= []).push(d) + // Only register tools if MCP is enabled + if (ProfileStatusMonitor.getMcpState()) { + const byServer: Record = {} + for (const d of mgr.getEnabledTools()) { + ;(byServer[d.serverName] ||= []).push(d) + } + for (const [server, defs] of Object.entries(byServer)) { + registerServerTools(server, defs) + } + + mgr.events.on(AGENT_TOOLS_CHANGED, (server: string, defs: McpToolDefinition[]) => { + registerServerTools(server, defs) + }) } - for (const [server, defs] of Object.entries(byServer)) { - registerServerTools(server, defs) + } catch (e) { + logging.error(`Failed to initialize MCP:' ${e}`) + } + } + + lsp.onInitialized(async () => { + try { + if (!enabledMCP(lsp.getClientInitializeParams())) { + logging.warn('MCP is currently not supported') + return } - mgr.events.on(AGENT_TOOLS_CHANGED, (server: string, defs: McpToolDefinition[]) => { - registerServerTools(server, defs) + profileStatusMonitor = new ProfileStatusMonitor(logging, removeAllMcpTools, async () => { + logging.info('MCP enabled by profile status monitor') + await initializeMcp() }) - } catch (e) { - console.warn('Caught error during MCP tool initialization; initialization may be incomplete:', e) + + // Wait for profile ARN to be available before checking MCP state + const checkAndInitialize = async () => { + await profileStatusMonitor!.checkInitialState() + // Always initialize McpManager to handle UI requests + await initializeMcp() + + // Remove tools if MCP is disabled + if (!ProfileStatusMonitor.getMcpState()) { + removeAllMcpTools() + } + + profileStatusMonitor!.start() + } + + // Check if service manager is ready + try { + const serviceManager = AmazonQTokenServiceManager.getInstance() + if (serviceManager.getState() === 'INITIALIZED') { + await checkAndInitialize() + } else { + // Poll for service manager to be ready with 10s timeout + const startTime = Date.now() + const pollForReady = async () => { + if (serviceManager.getState() === 'INITIALIZED') { + await checkAndInitialize() + } else if (Date.now() - startTime < SERVICE_MANAGER_TIMEOUT_MS) { + setTimeout(pollForReady, SERVICE_MANAGER_POLL_INTERVAL_MS) + } else { + logging.warn('Service manager not ready after 10s, initializing MCP manager') + await initializeMcp() + profileStatusMonitor!.start() + } + } + setTimeout(pollForReady, SERVICE_MANAGER_POLL_INTERVAL_MS) + } + } catch (error) { + // Service manager not initialized yet, always initialize McpManager + logging.info('Service manager not ready, initializing MCP manager') + await initializeMcp() + profileStatusMonitor!.start() + } + } catch (error) { + console.warn('Caught error during MCP tool initialization; initialization may be incomplete:', error) + logging.error(`Failed to initialize MCP in onInitialized: ${error}`) } }) return async () => { + profileStatusMonitor?.stop() await McpManager.instance.close() } } diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/workspaceContext/semanticSearch.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/workspaceContext/semanticSearch.test.ts new file mode 100644 index 0000000000..b785f5f6d2 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/workspaceContext/semanticSearch.test.ts @@ -0,0 +1,345 @@ +import * as assert from 'assert' +import * as sinon from 'sinon' +import axios from 'axios' +import { SemanticSearch, SemanticSearchParams, CodeChunkResult } from './semanticSearch' +import { TestFeatures } from '@aws/language-server-runtimes/testing' +import { BearerCredentials } from '@aws/language-server-runtimes/server-interface' +import { WorkspaceFolderManager } from '../../../workspaceContext/workspaceFolderManager' + +describe('SemanticSearch Tool', () => { + let features: TestFeatures + let semanticSearch: SemanticSearch + let axiosPostStub: sinon.SinonStub + let workspaceFolderManagerStub: sinon.SinonStub + let mockCredentialsProvider: any + let mockWorkspaceState: any + + beforeEach(() => { + features = new TestFeatures() + + // Mock credentials provider + mockCredentialsProvider = { + getCredentials: sinon.stub().returns({ + token: 'mock-bearer-token', + } as BearerCredentials), + } + + // Mock workspace state + mockWorkspaceState = { + webSocketClient: { + isConnected: sinon.stub().returns(true), + }, + environmentId: 'test-env-123', + workspaceId: 'test-workspace-456', + } + + // Stub WorkspaceFolderManager.getInstance() + workspaceFolderManagerStub = sinon.stub(WorkspaceFolderManager, 'getInstance').returns({ + getWorkspaceState: () => mockWorkspaceState, + } as any) + + // Stub axios.post + axiosPostStub = sinon.stub(axios, 'post') + + semanticSearch = new SemanticSearch(features.logging, mockCredentialsProvider, 'us-east-1') + }) + + afterEach(() => { + sinon.restore() + }) + + describe('validation', () => { + it('should reject empty query', () => { + assert.throws( + () => semanticSearch.validate({ query: '' }), + /Semantic search query cannot be empty/i, + 'Expected an error for empty query' + ) + }) + + it('should reject whitespace-only query', () => { + assert.throws( + () => semanticSearch.validate({ query: ' \t\n ' }), + /Semantic search query cannot be empty/i, + 'Expected an error for whitespace-only query' + ) + }) + + it('should accept valid query', () => { + assert.doesNotThrow( + () => semanticSearch.validate({ query: 'valid search query' }), + 'Should accept valid query' + ) + }) + + it('should accept query with programming language', () => { + assert.doesNotThrow( + () => semanticSearch.validate({ query: 'test', programmingLanguage: 'typescript' }), + 'Should accept query with programming language' + ) + }) + }) + + describe('error handling', () => { + it('should throw error when bearer token is missing', async () => { + mockCredentialsProvider.getCredentials.returns({ token: null }) + + await assert.rejects( + semanticSearch.invoke({ query: 'test query' }), + /Authorization failed, bearer token is not set/i, + 'Expected error when bearer token is missing' + ) + }) + + it('should throw error when workspace is not connected', async () => { + mockWorkspaceState.webSocketClient.isConnected.returns(false) + + await assert.rejects( + semanticSearch.invoke({ query: 'test query' }), + /Remote workspace is not ready yet/i, + 'Expected error when workspace is not connected' + ) + }) + + it('should throw error when environmentId is missing', async () => { + mockWorkspaceState.environmentId = null + + await assert.rejects( + semanticSearch.invoke({ query: 'test query' }), + /Remote workspace is not ready yet/i, + 'Expected error when environmentId is missing' + ) + }) + + it('should throw error when WorkspaceFolderManager instance is null', async () => { + workspaceFolderManagerStub.returns(null) + + await assert.rejects( + semanticSearch.invoke({ query: 'test query' }), + /Remote workspace is not ready yet/i, + 'Expected error when WorkspaceFolderManager instance is null' + ) + }) + + it('should handle axios network errors', async () => { + axiosPostStub.rejects(new Error('Network error')) + + await assert.rejects( + semanticSearch.invoke({ query: 'test query' }), + /Network error/i, + 'Expected network error to be propagated' + ) + }) + }) + + describe('successful invocation', () => { + const mockSemanticResults: CodeChunkResult[] = [ + { + fileUri: '/workspace/src/main.ts', + content: 'function main() { console.log("Hello World"); }', + score: 0.95, + }, + { + fileUri: 'file:///workspace/src/utils.js', + content: 'export function helper() { return true; }', + score: 0.87, + }, + { + fileUri: 'workspace/src/config.json', + content: '{ "name": "test-project" }', + score: 0.72, + }, + ] + + beforeEach(() => { + axiosPostStub.resolves({ + data: { + contextResult: { + documentContext: { + queryOutputMap: { + SEMANTIC: mockSemanticResults, + }, + }, + }, + }, + }) + }) + + it('should perform semantic search with basic query', async () => { + const result = await semanticSearch.invoke({ query: 'test function' }) + + // Verify axios was called with correct parameters + assert.ok(axiosPostStub.calledOnce, 'axios.post should be called once') + + const [url, requestBody, config] = axiosPostStub.firstCall.args + assert.strictEqual(url, 'https://test-env-123--8080.wc.q.us-east-1.amazonaws.com/getWorkspaceContext') + assert.strictEqual(requestBody.workspaceId, 'test-workspace-456') + assert.strictEqual(requestBody.contextParams.documentContextParams.query, 'test function') + assert.strictEqual(config.headers.Authorization, 'Bearer mock-bearer-token') + + // Verify result structure + assert.strictEqual(result.output.kind, 'json') + const content = result.output.content as any[] + assert.strictEqual(content.length, 3) + }) + + it('should include programming language filter when specified', async () => { + await semanticSearch.invoke({ + query: 'test function', + programmingLanguage: 'typescript', + }) + + const [, requestBody] = axiosPostStub.firstCall.args + const queryConfig = requestBody.contextParams.documentContextParams.queryConfigurationMap.SEMANTIC + assert.strictEqual(queryConfig.programmingLanguage, 'typescript') + }) + + it('should not include programming language when not specified', async () => { + await semanticSearch.invoke({ query: 'test function' }) + + const [, requestBody] = axiosPostStub.firstCall.args + const queryConfig = requestBody.contextParams.documentContextParams.queryConfigurationMap.SEMANTIC + assert.ok(!('programmingLanguage' in queryConfig)) + }) + + it('should normalize file URIs correctly', async () => { + const result = await semanticSearch.invoke({ query: 'test' }) + const content = result.output.content as any[] + + // Check URI normalization + assert.strictEqual(content[0].fileUri, 'file:///workspace/src/main.ts') + assert.strictEqual(content[1].fileUri, 'file:///workspace/src/utils.js') // Already has file:// + assert.strictEqual(content[2].fileUri, 'file:///workspace/src/config.json') + }) + + it('should include similarity scores when available', async () => { + const result = await semanticSearch.invoke({ query: 'test' }) + const content = result.output.content as any[] + + assert.strictEqual(content[0].similarityScore, 0.95) + assert.strictEqual(content[1].similarityScore, 0.87) + assert.strictEqual(content[2].similarityScore, 0.72) + }) + + it('should handle results without scores', async () => { + const resultsWithoutScores: CodeChunkResult[] = [ + { + fileUri: '/workspace/test.js', + content: 'test content', + // No score property + }, + ] + + axiosPostStub.resolves({ + data: { + contextResult: { + documentContext: { + queryOutputMap: { + SEMANTIC: resultsWithoutScores, + }, + }, + }, + }, + }) + + const result = await semanticSearch.invoke({ query: 'test' }) + const content = result.output.content as any[] + + assert.strictEqual(content.length, 1) + assert.strictEqual(content[0].fileUri, 'file:///workspace/test.js') + assert.strictEqual(content[0].content, 'test content') + assert.ok(!('similarityScore' in content[0])) + }) + + it('should handle empty search results', async () => { + axiosPostStub.resolves({ + data: { + contextResult: { + documentContext: { + queryOutputMap: { + SEMANTIC: [], + }, + }, + }, + }, + }) + + const result = await semanticSearch.invoke({ query: 'nonexistent' }) + const content = result.output.content as any[] + + assert.strictEqual(content.length, 0) + }) + + it('should handle missing semantic results', async () => { + axiosPostStub.resolves({ + data: { + contextResult: { + documentContext: { + queryOutputMap: { + SEMANTIC: undefined, + }, + }, + }, + }, + }) + + const result = await semanticSearch.invoke({ query: 'test' }) + const content = result.output.content as any[] + + assert.strictEqual(content.length, 0) + }) + + it('should handle malformed response structure', async () => { + axiosPostStub.resolves({ + data: { + // Missing expected structure + }, + }) + + const result = await semanticSearch.invoke({ query: 'test' }) + const content = result.output.content as any[] + + assert.strictEqual(content.length, 0) + }) + }) + + describe('getSpec', () => { + it('should return correct tool specification', () => { + const spec = semanticSearch.getSpec() + + assert.strictEqual(spec.name, 'semanticSearch') + assert.ok(spec.description.includes('semantic search')) + assert.strictEqual(spec.inputSchema.type, 'object') + assert.ok('query' in spec.inputSchema.properties) + assert.ok('programmingLanguage' in spec.inputSchema.properties) + assert.deepStrictEqual(spec.inputSchema.required, ['query']) + }) + + it('should have correct programming language enum values', () => { + const spec = semanticSearch.getSpec() + const langProperty = spec.inputSchema.properties.programmingLanguage as any + + assert.deepStrictEqual(langProperty.enum, ['java', 'python', 'javascript', 'typescript']) + }) + }) + + describe('constructor', () => { + it('should construct with correct endpoint suffix', () => { + const search1 = new SemanticSearch(features.logging, mockCredentialsProvider, 'us-west-2') + const search2 = new SemanticSearch(features.logging, mockCredentialsProvider, 'eu-west-1') + + // We can't directly test the private property, but we can test the behavior + // by mocking a call and checking the URL + axiosPostStub.resolves({ + data: { contextResult: { documentContext: { queryOutputMap: { SEMANTIC: [] } } } }, + }) + + // Test us-west-2 + search1.invoke({ query: 'test' }).catch(() => {}) // Ignore validation errors + // Test eu-west-1 + search2.invoke({ query: 'test' }).catch(() => {}) // Ignore validation errors + + // The endpoint construction is tested indirectly through the invoke method tests above + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/workspaceContext/semanticSearch.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/workspaceContext/semanticSearch.ts new file mode 100644 index 0000000000..898a6ddf56 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/tools/workspaceContext/semanticSearch.ts @@ -0,0 +1,130 @@ +import { InvokeOutput } from '../toolShared' +import { BearerCredentials, CredentialsProvider, Logging } from '@aws/language-server-runtimes/server-interface' +import { WorkspaceFolderManager } from '../../../workspaceContext/workspaceFolderManager' +import { normalizeFileUri } from '../../../workspaceContext/util' +import axios from 'axios' + +export interface SemanticSearchParams { + query: string + programmingLanguage?: 'java' | 'python' | 'javascript' | 'typescript' +} + +export interface CodeChunkResult { + fileUri: string + content: string + score?: number +} + +export class SemanticSearch { + static readonly toolName = 'semanticSearch' + + private readonly logging: Logging + private readonly credentialsProvider: CredentialsProvider + private readonly remoteEndpointSuffix: string + constructor(logging: Logging, credentialsProvider: CredentialsProvider, region: string) { + this.logging = logging + this.credentialsProvider = credentialsProvider + this.remoteEndpointSuffix = `--8080.wc.q.${region}.amazonaws.com` + } + + public validate(params: SemanticSearchParams) { + if (!params.query || params.query.trim().length === 0) { + throw new Error('Semantic search query cannot be empty.') + } + } + + public async invoke(params: SemanticSearchParams): Promise { + const creds = this.credentialsProvider.getCredentials('bearer') as BearerCredentials + if (!creds?.token) { + throw new Error('Authorization failed, bearer token is not set') + } + + const remoteWorkspaceState = WorkspaceFolderManager.getInstance()?.getWorkspaceState() + if (!remoteWorkspaceState?.webSocketClient?.isConnected() || !remoteWorkspaceState.environmentId) { + throw new Error('Remote workspace is not ready yet.') + } + + const environmentId = remoteWorkspaceState.environmentId + const endpoint = `https://${environmentId}${this.remoteEndpointSuffix}/getWorkspaceContext` + const response = await axios.post( + endpoint, + { + workspaceId: remoteWorkspaceState.workspaceId, + contextParams: { + documentContextParams: { + query: params.query, + queryConfigurationMap: { + SEMANTIC: { + maxResult: 15, + includeDependencies: false, + ...(params.programmingLanguage && { programmingLanguage: params.programmingLanguage }), + }, + }, + }, + }, + }, + { + headers: { + Authorization: `Bearer ${creds.token}`, + }, + } + ) + + return this.createOutput(response.data.contextResult?.documentContext?.queryOutputMap?.SEMANTIC) + } + + private createOutput(semanticSearchResult: CodeChunkResult[] | undefined): InvokeOutput { + const filteredResults = + semanticSearchResult?.map(result => { + return { + fileUri: normalizeFileUri(result.fileUri), + content: result.content, + ...(result.score !== undefined && { similarityScore: result.score }), + } + }) || [] + + return { + output: { + kind: 'json', + content: filteredResults, + }, + } + } + + public getSpec() { + return { + name: SemanticSearch.toolName, + description: + 'A tool for finding semantically relevant code snippets in a codebase.\n\n' + + '## Overview\n' + + 'This is a semantic search tool that understands the intent and context behind queries, helping you find code snippets most relevant to your search.\n\n' + + '## When to use\n' + + '- When you need to locate specific functionality in a codebase\n' + + '- When looking for implementation patterns related to certain concepts\n' + + '- When you want to understand how particular features are coded\n' + + '- When exploring unfamiliar codebases to find relevant sections\n\n' + + '## When not to use\n' + + '- When you already know the exact file location\n\n' + + '## Notes\n' + + '- Before searching, identify the essential concepts and atomic information units in the query\n' + + '- For complex questions, break down the query into core components or key facts to improve search relevance\n' + + "- Unless there is a clear reason to modify the search query, extract the key concepts using the user's original wording\n" + + "- The user's exact phrasing often contains critical contextual cues that enhance semantic matching\n", + inputSchema: { + type: 'object' as const, + properties: { + query: { + type: 'string' as const, + description: 'The search query to find relevant code snippets.', + }, + programmingLanguage: { + type: 'string' as const, + enum: ['java', 'python', 'javascript', 'typescript'], + description: 'Optional programming language to filter search results.', + }, + }, + required: ['query'] as const, + }, + } + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/utils/agenticChatControllerHelper.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/utils/agenticChatControllerHelper.ts deleted file mode 100644 index e29c58fff4..0000000000 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/utils/agenticChatControllerHelper.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ListAvailableModelsResult } from '@aws/language-server-runtimes/protocol' -import { MODEL_OPTIONS, MODEL_OPTIONS_FOR_REGION } from '../constants/modelSelection' - -/** - * Gets the latest available model for a region, optionally excluding a specific model - * @param region The AWS region - * @param exclude Optional model ID to exclude - * @returns The latest available model - */ -export function getLatestAvailableModel( - region: string | undefined, - exclude?: string -): ListAvailableModelsResult['models'][0] { - const models = region && MODEL_OPTIONS_FOR_REGION[region] ? MODEL_OPTIONS_FOR_REGION[region] : MODEL_OPTIONS - return [...models].reverse().find(model => model.id !== exclude) ?? models[models.length - 1] -} diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/utils/fileModificationMetrics.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/utils/fileModificationMetrics.test.ts new file mode 100644 index 0000000000..900b569e7e --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/utils/fileModificationMetrics.test.ts @@ -0,0 +1,139 @@ +import { calculateModifiedLines } from './fileModificationMetrics' +import { ToolUse } from '@amzn/codewhisperer-streaming' +import { FS_WRITE, FS_REPLACE } from '../constants/toolConstants' +import * as assert from 'assert' + +describe('calculateModifiedLines', () => { + describe('FS_WRITE', () => { + it('should count lines for create command', () => { + const toolUse: ToolUse = { + toolUseId: 'test-1', + name: FS_WRITE, + input: { + command: 'create', + path: '/test/file.txt', + fileText: 'line1\nline2\nline3', + }, + } + const afterContent = 'line1\nline2\nline3' + + assert.strictEqual(calculateModifiedLines(toolUse, afterContent), 3) + }) + + it('should count lines for append command', () => { + const toolUse: ToolUse = { + toolUseId: 'test-2', + name: FS_WRITE, + input: { + command: 'append', + path: '/test/file.txt', + fileText: 'line4\nline5', + }, + } + + assert.strictEqual(calculateModifiedLines(toolUse), 2) + }) + + it('should handle empty content', () => { + const toolUse: ToolUse = { + toolUseId: 'test-3', + name: FS_WRITE, + input: { + command: 'create', + path: '/test/file.txt', + fileText: '', + }, + } + + assert.strictEqual(calculateModifiedLines(toolUse, ''), 0) + }) + }) + + describe('FS_REPLACE', () => { + it('should count replaced lines correctly (double counting)', () => { + const toolUse: ToolUse = { + toolUseId: 'test-4', + name: FS_REPLACE, + input: { + path: '/test/file.txt', + diffs: [ + { + oldStr: 'old line 1\nold line 2\nold line 3', + newStr: 'new line 1\nnew line 2\nnew line 3', + }, + ], + }, + } + + assert.strictEqual(calculateModifiedLines(toolUse), 6) + }) + + it('should count pure deletions', () => { + const toolUse: ToolUse = { + toolUseId: 'test-5', + name: FS_REPLACE, + input: { + path: '/test/file.txt', + diffs: [ + { + oldStr: 'line to delete 1\nline to delete 2', + newStr: '', + }, + ], + }, + } + + assert.strictEqual(calculateModifiedLines(toolUse), 2) + }) + + it('should count pure insertions', () => { + const toolUse: ToolUse = { + toolUseId: 'test-6', + name: FS_REPLACE, + input: { + path: '/test/file.txt', + diffs: [ + { + oldStr: '', + newStr: 'new line 1\nnew line 2', + }, + ], + }, + } + + assert.strictEqual(calculateModifiedLines(toolUse), 2) + }) + + it('should handle multiple diffs', () => { + const toolUse: ToolUse = { + toolUseId: 'test-7', + name: FS_REPLACE, + input: { + path: '/test/file.txt', + diffs: [ + { + oldStr: 'old line 1', + newStr: 'new line 1', + }, + { + oldStr: 'delete this line', + newStr: '', + }, + ], + }, + } + + assert.strictEqual(calculateModifiedLines(toolUse), 3) + }) + }) + + it('should return 0 for unknown tools', () => { + const toolUse: ToolUse = { + toolUseId: 'test-8', + name: 'unknownTool', + input: {}, + } + + assert.strictEqual(calculateModifiedLines(toolUse), 0) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/utils/fileModificationMetrics.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/utils/fileModificationMetrics.ts new file mode 100644 index 0000000000..361c886607 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/utils/fileModificationMetrics.ts @@ -0,0 +1,58 @@ +import { ToolUse } from '@amzn/codewhisperer-streaming' +import { diffLines } from 'diff' +import { FsWriteParams } from '../tools/fsWrite' +import { FsReplaceParams } from '../tools/fsReplace' +import { FS_WRITE, FS_REPLACE } from '../constants/toolConstants' + +/** + * Counts the number of lines in text, handling different line endings + * @param text The text to count lines in + * @returns The number of lines + */ +function countLines(text?: string): number { + if (!text) return 0 + const parts = text.replace(/\r\n/g, '\n').replace(/\r/g, '\n').split('\n') + return parts.length && parts[parts.length - 1] === '' ? parts.length - 1 : parts.length +} + +/** + * Calculates the actual lines modified by analyzing file modification tools. + * @param toolUse The tool use object + * @param afterContent The content after the tool execution (for FS_WRITE create operations) + * @returns The total number of lines modified (added + removed) + */ +export function calculateModifiedLines(toolUse: ToolUse, afterContent?: string): number { + if (toolUse.name === FS_WRITE) { + const input = toolUse.input as unknown as FsWriteParams + + if (input.command === 'create') { + return countLines(afterContent ?? '') + } else if (input.command === 'append') { + return countLines(input.fileText) + } + } + + if (toolUse.name === FS_REPLACE) { + const input = toolUse.input as unknown as FsReplaceParams + let linesAdded = 0 + let linesRemoved = 0 + + for (const diff of input.diffs || []) { + const oldStr = diff.oldStr ?? '' + const newStr = diff.newStr ?? '' + + const changes = diffLines(oldStr, newStr) + + for (const change of changes) { + if (change.added) { + linesAdded += countLines(change.value) + } else if (change.removed) { + linesRemoved += countLines(change.value) + } + } + } + + return linesAdded + linesRemoved + } + return 0 +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/chat/chatController.ts b/server/aws-lsp-codewhisperer/src/language-server/chat/chatController.ts index 30235a0af9..0128dbc37f 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/chat/chatController.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/chat/chatController.ts @@ -41,7 +41,7 @@ import { createAuthFollowUpResult, getAuthFollowUpType, getDefaultChatResponse } import { ChatSessionManagementService } from './chatSessionManagementService' import { ChatTelemetryController } from './telemetry/chatTelemetryController' import { QuickAction } from './quickActions' -import { getErrorMessage, isAwsError, isNullish, isObject } from '../../shared/utils' +import { getErrorId, getErrorMessage, isNullish, isObject, isServiceException } from '../../shared/utils' import { Metric } from '../../shared/telemetry/metric' import { QChatTriggerContext, TriggerContext } from './contexts/triggerContext' import { HELP_MESSAGE } from './constants' @@ -171,8 +171,11 @@ export class ChatController implements ChatHandlers { response = await session.sendMessage(requestInput) this.#log('Response for conversation id:', conversationIdentifier, JSON.stringify(response.$metadata)) } catch (err) { - if (isAwsError(err) || (isObject(err) && 'statusCode' in err && typeof err.statusCode === 'number')) { - metric.setDimension('cwsprChatRepsonseCode', err.statusCode ?? 400) + if ( + isServiceException(err) || + (isObject(err) && 'statusCode' in err && typeof err.statusCode === 'number') + ) { + metric.setDimension('cwsprChatRepsonseCode', err.$metadata.httpStatusCode ?? 400) this.#telemetryController.emitMessageResponseError(params.tabId, metric.metric) } @@ -289,7 +292,7 @@ export class ChatController implements ChatHandlers { name: 'codewhisperer_inlineChatServiceInvocation', result: 'Failed', data: { - codewhispererRequestId: isAwsError(err) ? err.requestId : undefined, + codewhispererRequestId: isServiceException(err) ? err.$metadata.requestId : undefined, codewhispererTriggerType: this.#inlineChatTriggerType, duration: this.#inlineChatResponseLatency, codewhispererLanguage: this.#inlineChatLanguage, @@ -302,8 +305,8 @@ export class ChatController implements ChatHandlers { }, errorData: { reason: err instanceof Error ? err.name : 'UnknownError', - errorCode: isAwsError(err) ? err.code : undefined, - httpStatusCode: isAwsError(err) ? err.statusCode : undefined, + errorCode: err instanceof Error ? getErrorId(err) : undefined, + httpStatusCode: isServiceException(err) ? err.$metadata.httpStatusCode : undefined, }, }) @@ -370,8 +373,8 @@ export class ChatController implements ChatHandlers { }, errorData: { reason: err instanceof Error ? err.name : 'UnknownError', - errorCode: isAwsError(err) ? err.code : undefined, - httpStatusCode: isAwsError(err) ? err.statusCode : undefined, + errorCode: err instanceof Error ? getErrorId(err) : undefined, + httpStatusCode: isServiceException(err) ? err.$metadata.httpStatusCode : undefined, }, }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/chat/chatSessionService.ts b/server/aws-lsp-codewhisperer/src/language-server/chat/chatSessionService.ts index 92c7eb2c33..bb67a8aed0 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/chat/chatSessionService.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/chat/chatSessionService.ts @@ -1,12 +1,4 @@ -import { - CodeWhispererStreamingClientConfig, - CodeWhispererStreamingServiceException, - GenerateAssistantResponseCommandInput, - GenerateAssistantResponseCommandOutput, - Origin, - SendMessageCommand, - ToolUse, -} from '@amzn/codewhisperer-streaming' +import { CodeWhispererStreamingClientConfig, Origin, ToolUse } from '@amzn/codewhisperer-streaming' import { StreamingClientServiceToken, SendMessageCommandInput, @@ -16,19 +8,15 @@ import { ChatCommandOutput, } from '../../shared/streamingClientService' import { ChatResult } from '@aws/language-server-runtimes/server-interface' -import { - AgenticChatError, - isInputTooLongError, - isRequestAbortedError, - isThrottlingRelated, - wrapErrorWithCode, -} from '../agenticChat/errors' +import { AgenticChatError } from '../agenticChat/errors' import { AmazonQBaseServiceManager } from '../../shared/amazonQServiceManager/BaseAmazonQServiceManager' -import { loggingUtils } from '@aws/lsp-core' import { Logging } from '@aws/language-server-runtimes/server-interface' import { Features } from '../types' -import { getOriginFromClientInfo, getClientName, getRequestID, isUsageLimitError } from '../../shared/utils' +import { getOriginFromClientInfo, getClientName } from '../../shared/utils' import { enabledModelSelection } from '../../shared/utils' +import { QErrorTransformer } from '../agenticChat/retry/errorTransformer' +import { DelayNotification } from '../agenticChat/retry/delayInterceptor' +import { MAX_REQUEST_ATTEMPTS } from '../agenticChat/constants/constants' export type ChatSessionServiceConfig = CodeWhispererStreamingClientConfig type FileChange = { before?: string; after?: string } @@ -38,10 +26,10 @@ type DeferredHandler = { reject: (err: Error) => void } export class ChatSessionService { - public shareCodeWhispererContentWithAWS = false public pairProgrammingMode: boolean = true public contextListSent: boolean = false public modelId: string | undefined + public isMemoryBankGeneration: boolean = false #lsp?: Features['lsp'] #abortController?: AbortController #currentPromptId?: string @@ -58,6 +46,7 @@ export class ChatSessionService { #serviceManager?: AmazonQBaseServiceManager #logging?: Logging #origin?: Origin + #errorTransformer: QErrorTransformer public getConversationType(): string { return this.#conversationType @@ -78,10 +67,17 @@ export class ChatSessionService { public getDeferredToolExecution(messageId: string): DeferredHandler | undefined { return this.#deferredToolExecution[messageId] } + public setDeferredToolExecution(messageId: string, resolve: any, reject: any) { this.#deferredToolExecution[messageId] = { resolve, reject } } + public removeDeferredToolExecution(messageId: string) { + if (messageId in this.#deferredToolExecution) { + delete this.#deferredToolExecution[messageId] + } + } + public getAllDeferredCompactMessageIds(): string[] { return Object.keys(this.#deferredToolExecution).filter(messageId => messageId.endsWith('_compact')) } @@ -139,6 +135,9 @@ export class ChatSessionService { this.#lsp = lsp this.#logging = logging this.#origin = getOriginFromClientInfo(getClientName(this.#lsp?.getClientInitializeParams())) + + // Initialize Q-specific error transformation + this.#errorTransformer = new QErrorTransformer(logging, () => this.isModelSelectionEnabled()) } public async sendMessage(request: SendMessageCommandInput): Promise { @@ -154,9 +153,12 @@ export class ChatSessionService { const client = this.#serviceManager.getStreamingClient() - const response = await client.sendMessage(request, this.#abortController) - - return response + // AWS SDK handles retries natively, we just transform final errors + try { + return await client.sendMessage(request, this.#abortController) + } catch (error) { + throw this.#errorTransformer.transformFinalError(error) + } } private isModelSelectionEnabled(): boolean { @@ -176,125 +178,23 @@ export class ChatSessionService { const client = this.#serviceManager.getStreamingClient() + // AWS SDK handles retries natively, we just transform final errors + try { + return await this.#performChatRequest(client, request) + } catch (error) { + throw this.#errorTransformer.transformFinalError(error) + } + } + + async #performChatRequest(client: any, request: ChatCommandInput): Promise { if (client instanceof StreamingClientServiceToken) { - try { - return await client.generateAssistantResponse(request, this.#abortController) - } catch (e) { - // Log the error using the logging property if available, otherwise fall back to console.error - if (this.#logging) { - this.#logging.error(`Error in generateAssistantResponse: ${loggingUtils.formatErr(e)}`) - } - - const requestId = getRequestID(e) - if (isUsageLimitError(e)) { - throw new AgenticChatError( - 'Request aborted', - 'AmazonQUsageLimitError', - e instanceof Error ? e : undefined, - requestId - ) - } - if (isRequestAbortedError(e)) { - throw new AgenticChatError( - 'Request aborted', - 'RequestAborted', - e instanceof Error ? e : undefined, - requestId - ) - } - if (isInputTooLongError(e)) { - throw new AgenticChatError( - 'Too much context loaded. I have cleared the conversation history. Please retry your request with smaller input.', - 'InputTooLong', - e instanceof Error ? e : undefined, - requestId - ) - } - if (isThrottlingRelated(e)) { - throw new AgenticChatError( - 'Service is currently experiencing high traffic. Please try again later.', - 'RequestThrottled', - e instanceof Error ? e : undefined, - requestId - ) - } - let error = wrapErrorWithCode(e, 'QModelResponse') - if ( - (request.conversationState?.currentMessage?.userInputMessage?.modelId !== undefined && - (error.cause as any)?.$metadata?.httpStatusCode === 500 && - error.message === - 'Encountered unexpectedly high load when processing the request, please try again.') || - (error.cause && - typeof error.cause === 'object' && - '$metadata' in error.cause && - (error.cause as any).$metadata?.httpStatusCode === 429 && - 'reason' in error.cause && - error.cause.reason === 'INSUFFICIENT_MODEL_CAPACITY') - ) { - error.message = this.isModelSelectionEnabled() - ? `The model you selected is temporarily unavailable. Please switch to a different model and try again.` - : `I am experiencing high traffic, please try again shortly.` - } - - throw error - } + return await client.generateAssistantResponse(request, this.#abortController) } else if (client instanceof StreamingClientServiceIAM) { - try { - // @ts-ignore - // SendMessageStreaming checks for origin from request source - // https://code.amazon.com/packages/AWSVectorConsolasRuntimeService/blobs/ac917609a28dbcb6757a8427bcc585a42fd15bf2/--/src/com/amazon/aws/vector/consolas/runtimeservice/activity/SendMessageStreamingActivity.java#L246 - request.source = this.#origin ? this.#origin : 'IDE' - return await client.sendMessage(request, this.#abortController) - } catch (e) { - // Log the error using the logging property if available, otherwise fall back to console.error - if (this.#logging) { - this.#logging.error(`Error in Send Message response: ${loggingUtils.formatErr(e)}`) - } - - const requestId = getRequestID(e) - if (isUsageLimitError(e)) { - throw new AgenticChatError( - 'Request aborted', - 'AmazonQUsageLimitError', - e instanceof Error ? e : undefined, - requestId - ) - } - if (isRequestAbortedError(e)) { - throw new AgenticChatError( - 'Request aborted', - 'RequestAborted', - e instanceof Error ? e : undefined, - requestId - ) - } - if (isInputTooLongError(e)) { - throw new AgenticChatError( - 'Too much context loaded. I have cleared the conversation history. Please retry your request with smaller input.', - 'InputTooLong', - e instanceof Error ? e : undefined, - requestId - ) - } - let error = wrapErrorWithCode(e, 'QModelResponse') - if ( - (request.conversationState?.currentMessage?.userInputMessage?.modelId !== undefined && - (error.cause as any)?.$metadata?.httpStatusCode === 500 && - error.message === - 'Encountered unexpectedly high load when processing the request, please try again.') || - (error.cause && - typeof error.cause === 'object' && - '$metadata' in error.cause && - (error.cause as any).$metadata?.httpStatusCode === 429 && - 'reason' in error.cause && - error.cause.reason === 'INSUFFICIENT_MODEL_CAPACITY') - ) { - error.message = this.isModelSelectionEnabled() - ? `The model you selected is temporarily unavailable. Please switch to a different model and try again.` - : `I am experiencing high traffic, please try again shortly.` - } - throw error - } + // @ts-ignore + // SendMessageStreaming checks for origin from request source + // https://code.amazon.com/packages/AWSVectorConsolasRuntimeService/blobs/ac917609a28dbcb6757a8427bcc585a42fd15bf2/--/src/com/amazon/aws/vector/consolas/runtimeservice/activity/SendMessageStreamingActivity.java#L246 + request.source = this.#origin ? this.#origin : 'IDE' + return await client.sendMessage(request, this.#abortController) } else { // error return Promise.reject( @@ -341,4 +241,15 @@ export class ChatSessionService { public setLogging(logging: Logging): void { this.#logging = logging } + + /** + * Sets the delay notification callback for UI integration + * @param callback Function to call when delay notifications occur + */ + public setDelayNotificationCallback(callback: (notification: DelayNotification) => void): void { + if (this.#serviceManager) { + const client = this.#serviceManager.getStreamingClient() + client.setDelayNotificationCallback(callback) + } + } } diff --git a/server/aws-lsp-codewhisperer/src/language-server/chat/constants.ts b/server/aws-lsp-codewhisperer/src/language-server/chat/constants.ts index 3263cb7b42..0b96c80cc9 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/chat/constants.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/chat/constants.ts @@ -79,6 +79,8 @@ export const DEFAULT_EXCLUDE_FILES = [ '.DS_Store', ] +export const DEFAULT_RETRY_ATTEMPTS = 3 + export const loadingMessage: ChatMessage = { body: '', // @ts-ignore diff --git a/server/aws-lsp-codewhisperer/src/language-server/chat/qChatServer.ts b/server/aws-lsp-codewhisperer/src/language-server/chat/qChatServer.ts index 2452426b1b..d110ea4e41 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/chat/qChatServer.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/chat/qChatServer.ts @@ -59,7 +59,9 @@ export const QChatServerFactory = 'TelemetryService initialized before LSP connection was initialized.' ) ) - telemetryService.updateUserContext(makeUserContextObject(clientParams, runtime.platform, 'CHAT')) + telemetryService.updateUserContext( + makeUserContextObject(clientParams, runtime.platform, 'CHAT', amazonQServiceManager.serverInfo) + ) chatController = new ChatController( chatSessionManagementService, diff --git a/server/aws-lsp-codewhisperer/src/language-server/chat/telemetry/chatTelemetryController.ts b/server/aws-lsp-codewhisperer/src/language-server/chat/telemetry/chatTelemetryController.ts index 8e9cb92624..95e9bc5157 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/chat/telemetry/chatTelemetryController.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/chat/telemetry/chatTelemetryController.ts @@ -20,7 +20,7 @@ import { ToolUse, UserIntent } from '@amzn/codewhisperer-streaming' import { TriggerContext } from '../contexts/triggerContext' import { CredentialsProvider, Logging } from '@aws/language-server-runtimes/server-interface' -import { AcceptedSuggestionEntry, CodeDiffTracker } from '../../inline-completion/codeDiffTracker' +import { AcceptedSuggestionEntry, CodeDiffTracker } from '../../inline-completion/tracker/codeDiffTracker' import { TelemetryService } from '../../../shared/telemetry/telemetryService' import { getEndPositionForAcceptedSuggestion, getTelemetryReasonDesc } from '../../../shared/utils' import { CodewhispererLanguage } from '../../../shared/languageDetection' @@ -294,7 +294,13 @@ export class ChatTelemetryController { }) } - public emitAddMessageMetric(tabId: string, metric: Partial, result?: string) { + public emitAddMessageMetric( + tabId: string, + metric: Partial, + result?: string, + errorMessage?: string, + errorCode?: string + ) { const conversationId = this.getConversationId(tabId) // Store the customization value associated with the message if (metric.cwsprChatMessageId && metric.codewhispererCustomizationArn) { @@ -308,7 +314,7 @@ export class ChatTelemetryController { conversationId: conversationId, messageId: metric.cwsprChatMessageId, customizationArn: metric.codewhispererCustomizationArn, - userIntent: metric.cwsprChatUserIntent, + userIntent: metric.cwsprChatUserIntent as UserIntent, hasCodeSnippet: metric.cwsprChatHasCodeSnippet, programmingLanguage: metric.cwsprChatProgrammingLanguage as CodewhispererLanguage, activeEditorTotalCharacters: metric.cwsprChatActiveEditorTotalCharacters, @@ -349,6 +355,8 @@ export class ChatTelemetryController { requestIds: metric.requestIds, experimentName: metric.experimentName, userVariation: metric.userVariation, + errorMessage: errorMessage, + errorCode: errorCode, } ) } @@ -421,10 +429,12 @@ export class ChatTelemetryController { public emitInteractWithMessageMetric( tabId: string, - metric: Omit + metric: Omit, + acceptedLineCount?: number ) { return this.#telemetryService.emitChatInteractWithMessage(metric, { conversationId: this.getConversationId(tabId), + acceptedLineCount, }) } diff --git a/server/aws-lsp-codewhisperer/src/language-server/configuration/qConfigurationServer.test.ts b/server/aws-lsp-codewhisperer/src/language-server/configuration/qConfigurationServer.test.ts index 97d3a084d6..312515fbb2 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/configuration/qConfigurationServer.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/configuration/qConfigurationServer.test.ts @@ -251,11 +251,11 @@ describe('ServerConfigurationProvider', () => { codeWhispererService = stubInterface() codeWhispererService.listAvailableCustomizations.resolves({ customizations: mockCustomizations, - $response: {} as any, + $metadata: {}, }) codeWhispererService.listAvailableProfiles.resolves({ profiles: [], - $response: {} as any, + $metadata: {}, }) testFeatures = new TestFeatures() @@ -365,14 +365,14 @@ describe('ServerConfigurationProvider', () => { // Return different customizations for each profile listAvailableCustomizationsForProfileAndRegionStub - .withArgs(mockProfiles[0].arn, mockProfiles[0].identityDetails!.region) + .withArgs(mockProfiles[0].arn!, mockProfiles[0].identityDetails!.region) .resolves([ { arn: 'customization1', name: 'Customization 1' }, { arn: 'customization2', name: 'Customization 2' }, ]) listAvailableCustomizationsForProfileAndRegionStub - .withArgs(mockProfiles[1].arn, mockProfiles[1].identityDetails!.region) + .withArgs(mockProfiles[1].arn!, mockProfiles[1].identityDetails!.region) .resolves([{ arn: 'customization3', name: 'Customization 3' }]) const result = await serverConfigurationProvider.listAllAvailableCustomizationsWithMetadata( @@ -438,11 +438,11 @@ describe('ServerConfigurationProvider', () => { // Return different customizations for each profile listAvailableCustomizationsForProfileAndRegionStub - .withArgs(mockProfiles[0].arn, mockProfiles[0].identityDetails!.region) + .withArgs(mockProfiles[0].arn!, mockProfiles[0].identityDetails!.region) .resolves([]) listAvailableCustomizationsForProfileAndRegionStub - .withArgs(mockProfiles[1].arn, mockProfiles[1].identityDetails!.region) + .withArgs(mockProfiles[1].arn!, mockProfiles[1].identityDetails!.region) .resolves([{ arn: 'customization3', name: 'Customization 3' }]) const result = await serverConfigurationProvider.listAllAvailableCustomizationsWithMetadata( @@ -509,7 +509,7 @@ describe('ServerConfigurationProvider', () => { // Return different customizations for each profile listAvailableCustomizationsForProfileAndRegionStub - .withArgs(mockProfiles[0].arn, mockProfiles[0].identityDetails!.region) + .withArgs(mockProfiles[0].arn!, mockProfiles[0].identityDetails!.region) .resolves([{ arn: 'customization1', name: 'Customization 1' }]) // Call with provided profiles @@ -561,12 +561,12 @@ describe('ServerConfigurationProvider', () => { // First profile succeeds listAvailableCustomizationsForProfileAndRegionStub - .withArgs(mockProfiles[0].arn, mockProfiles[0].identityDetails!.region) + .withArgs(mockProfiles[0].arn!, mockProfiles[0].identityDetails!.region) .resolves([{ arn: 'customization1', name: 'Customization 1' }]) // Second profile fails listAvailableCustomizationsForProfileAndRegionStub - .withArgs(mockProfiles[1].arn, mockProfiles[1].identityDetails!.region) + .withArgs(mockProfiles[1].arn!, mockProfiles[1].identityDetails!.region) .rejects(new Error('Failed to fetch customizations')) const result = await serverConfigurationProvider.listAllAvailableCustomizationsWithMetadata( diff --git a/server/aws-lsp-codewhisperer/src/language-server/configuration/qConfigurationServer.ts b/server/aws-lsp-codewhisperer/src/language-server/configuration/qConfigurationServer.ts index 5f96d526b1..7eca4c4233 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/configuration/qConfigurationServer.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/configuration/qConfigurationServer.ts @@ -13,7 +13,7 @@ import { getListAllAvailableProfilesHandler, ListAllAvailableProfilesHandler, } from '../../shared/amazonQServiceManager/qDeveloperProfiles' -import { Customization, Customizations } from '../../client/token/codewhispererbearertokenclient' +import { Customization } from '@amzn/codewhisperer-runtime' import { AmazonQTokenServiceManager } from '../../shared/amazonQServiceManager/AmazonQTokenServiceManager' import { AWS_Q_ENDPOINTS, Q_CONFIGURATION_SECTION } from '../../shared/constants' import { AmazonQError } from '../../shared/amazonQServiceManager/errors' @@ -120,7 +120,7 @@ export const QConfigurationServerToken = ): Promise => { const section = params.section - let customizations: Customizations | CustomizationWithMetadata[] = [] + let customizations: Customization[] | CustomizationWithMetadata[] = [] let developerProfiles: AmazonQDeveloperProfile[] = [] try { @@ -228,19 +228,22 @@ export class ServerConfigurationProvider { } } - async listAvailableCustomizations(): Promise { + async listAvailableCustomizations(): Promise { try { const customizations = ( await this.serviceManager.getCodewhispererService().listAvailableCustomizations({ maxResults: 100 }) ).customizations - return customizations + return customizations ?? [] } catch (error) { throw this.getResponseError(`${ON_GET_CONFIGURATION_FROM_SERVER_ERROR_PREFIX}${Q_CUSTOMIZATIONS}`, error) } } - async listAvailableCustomizationsForProfileAndRegion(profileArn: string, region: string): Promise { + async listAvailableCustomizationsForProfileAndRegion( + profileArn: string | undefined, + region: string + ): Promise { try { // Create a new service for the specific region const service = this.serviceManager.getServiceFactory()(region, AWS_Q_ENDPOINTS.get(region) || '') @@ -248,7 +251,7 @@ export class ServerConfigurationProvider { const customizations = (await service.listAvailableCustomizations({ maxResults: 100 })).customizations - return customizations + return customizations ?? [] } catch (error) { throw this.getResponseError(`${ON_GET_CONFIGURATION_FROM_SERVER_ERROR_PREFIX}${Q_CUSTOMIZATIONS}`, error) } @@ -289,11 +292,11 @@ export class ServerConfigurationProvider { return [ defaultCustomization, - ...customizations.map(customization => ({ + ...(customizations?.map(customization => ({ ...customization, isDefault: false, profile: profile, - })), + })) ?? []), ] }) .catch(error => { diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/autoTrigger.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/autoTrigger.ts index d9dd7f16d5..328b2a299e 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/autoTrigger.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/autoTrigger.ts @@ -3,6 +3,7 @@ import { Logging } from '@aws/language-server-runtimes/server-interface' import { FileContext } from '../../../shared/codeWhispererService' import typedCoefficients = require('./coefficients.json') import { TextDocumentContentChangeEvent } from 'vscode-languageserver-textdocument' +import { lastTokenFromString } from '../utils/triggerUtils' type TypedCoefficients = typeof typedCoefficients type Coefficients = TypedCoefficients & { @@ -32,7 +33,7 @@ export type CodewhispererTriggerType = 'AutoTrigger' | 'OnDemand' // Two triggers are explicitly handled, SpecialCharacters and Enter. Everything else is expected to be a trigger // based on regular typing, and is considered a 'Classifier' trigger. -export type CodewhispererAutomatedTriggerType = 'SpecialCharacters' | 'Enter' | 'Classifier' +export type CodewhispererAutomatedTriggerType = 'SpecialCharacters' | 'Enter' | 'Classifier' | 'IntelliSenseAcceptance' /** * Determine the trigger type based on the file context. Currently supports special cases for Special Characters and Enter keys, @@ -104,6 +105,10 @@ function isTabKey(str: string): boolean { return false } +function isIntelliSenseAcceptance(str: string) { + return str === 'IntelliSenseAcceptance' +} + // Reference: https://github.com/aws/aws-toolkit-vscode/blob/amazonq/v1.74.0/packages/core/src/codewhisperer/service/keyStrokeHandler.ts#L222 // Enter, Special character guarantees a trigger // Regular keystroke input will be evaluated by classifier @@ -126,6 +131,8 @@ export const getAutoTriggerType = ( return undefined } else if (isUserTypingSpecialChar(changedText)) { return 'SpecialCharacters' + } else if (isIntelliSenseAcceptance(changedText)) { + return 'IntelliSenseAcceptance' } else if (changedText.length === 1) { return 'Classifier' } else if (new RegExp('^[ ]+$').test(changedText)) { @@ -177,7 +184,7 @@ type AutoTriggerParams = { char: string triggerType: string // Left as String intentionally to support future and unknown trigger types os: string - previousDecision: string + previousDecision: string | undefined ide: string lineNum: number } @@ -211,15 +218,13 @@ export const autoTrigger = ( rightContextAtCurrentLine.trim() !== ')' && ['VSCODE', 'JETBRAINS'].includes(ide) ) { - logging.debug(`Skip auto trigger: immediate right context`) return { shouldTrigger: false, classifierResult: 0, classifierThreshold: TRIGGER_THRESHOLD, } } - const tokens = leftContextAtCurrentLine.trim().split(' ') - const lastToken = tokens[tokens.length - 1] + const lastToken = lastTokenFromString(fileContext.leftFileContent) const keyword = lastToken?.length > 1 ? lastToken : '' @@ -229,18 +234,27 @@ export const autoTrigger = ( const triggerTypeCoefficient = coefficients.triggerTypeCoefficient[triggerType] ?? 0 const osCoefficient = coefficients.osCoefficient[os] ?? 0 + const charCoefficient = coefficients.charCoefficient[char] ?? 0 + const keyWordCoefficient = coefficients.charCoefficient[keyword] ?? 0 const languageCoefficient = coefficients.languageCoefficient[fileContext.programmingLanguage.languageName] ?? 0 let previousDecisionCoefficient = 0 - if (previousDecision === 'Accept') { - previousDecisionCoefficient = coefficients.prevDecisionAcceptCoefficient - } else if (previousDecision === 'Reject') { - previousDecisionCoefficient = coefficients.prevDecisionRejectCoefficient - } else if (previousDecision === 'Discard' || previousDecision === 'Empty') { - previousDecisionCoefficient = coefficients.prevDecisionOtherCoefficient + switch (previousDecision) { + case 'Accept': + previousDecisionCoefficient = coefficients.prevDecisionAcceptCoefficient + break + case 'Reject': + previousDecisionCoefficient = coefficients.prevDecisionRejectCoefficient + break + case 'Discard': + case 'Empty': + previousDecisionCoefficient = coefficients.prevDecisionOtherCoefficient + break + default: + break } const ideCoefficient = coefficients.ideCoefficient[ide] ?? 0 @@ -274,11 +288,13 @@ export const autoTrigger = ( previousDecisionCoefficient + languageCoefficient + leftContextLengthCoefficient - const shouldTrigger = sigmoid(classifierResult) > TRIGGER_THRESHOLD + + const r = sigmoid(classifierResult) + const shouldTrigger = r > TRIGGER_THRESHOLD return { shouldTrigger, - classifierResult, + classifierResult: r, classifierThreshold: TRIGGER_THRESHOLD, } } diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.test.ts index 261748468f..15bc689654 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.test.ts @@ -5,10 +5,11 @@ import * as assert from 'assert' import * as sinon from 'sinon' -import { editPredictionAutoTrigger } from './editPredictionAutoTrigger' +import { EditClassifier, editPredictionAutoTrigger } from './editPredictionAutoTrigger' import { EditPredictionConfigManager } from './editPredictionConfig' -import { FileContext } from '../../../shared/codeWhispererService' -import { Position } from '@aws/language-server-runtimes/server-interface' +import { ClientFileContextClss, FileContext, getFileContext } from '../../../shared/codeWhispererService' +import { Logging, Position } from '@aws/language-server-runtimes/server-interface' +import { TextDocument } from 'vscode-languageserver-textdocument' import { CursorTracker } from '../tracker/cursorTracker' import { RecentEditTracker } from '../tracker/codeEditTracker' import { TestScenarios, EditTrackingScenarios, splitCodeAtPosition } from './EditPredictionAutoTriggerTestConstants' @@ -337,3 +338,509 @@ describe('editPredictionAutoTrigger', function () { }) }) }) + +describe('classifier', function () { + const SAMPLE = `public class HelloWorld { + public static void main(String[] args) { + System.out.println("Hello, World!"); + } +}` + + const SAMPLE_FILE_CONTEXT = getFileContext({ + textDocument: TextDocument.create('file:///testfile.java', 'java', 1, SAMPLE), + position: Position.create(2, 18), + inferredLanguageId: 'java', + workspaceFolder: undefined, + }) + + // Create stubs for all methods + const loggingStub = { + error: sinon.stub(), + warn: sinon.stub(), + info: sinon.stub(), + log: sinon.stub(), + debug: sinon.stub(), + } satisfies Logging + + it('test sample', function () { + assert.strictEqual(SAMPLE_FILE_CONTEXT.leftContextAtCurLine, ' System.out') + assert.strictEqual(SAMPLE_FILE_CONTEXT.rightContextAtCurLine, '.println("Hello, World!");') // TODO: Not sure why it doesnt include \n + assert.strictEqual(SAMPLE_FILE_CONTEXT.programmingLanguage.languageName, 'java') + assert.strictEqual( + SAMPLE_FILE_CONTEXT.leftFileContent, + `public class HelloWorld { + public static void main(String[] args) { + System.out` + ) + assert.strictEqual( + SAMPLE_FILE_CONTEXT.rightFileContent, + `.println("Hello, World!"); + } +}` + ) + }) + + describe('constant check', function () { + it('intercept', function () { + assert.strictEqual(EditClassifier.INTERCEPT, -0.2782) + }) + + it('threshold', function () { + assert.strictEqual(EditClassifier.THRESHOLD, 0.53) + }) + + it('process edit history', function () { + const r = + EditClassifier.processEditHistory(`--- file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java 1760647547772 ++++ file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java 1760647547851 +@@ -4,5 +4,5 @@ + return a + b; + } + +- public static int substract ++ public static int substract() + }`) + + assert.strictEqual(r.addedLines, 1) + assert.strictEqual(r.deletedLines, 1) + assert.strictEqual(r.changedCharacters, 2) + }) + + it('process edit history 2', function () { + const r = EditClassifier.processEditHistory(`--- file:///query.sql ++++ file:///query.sql +@@ -1,6 +1,4 @@ + SELECT u.name, u.email, p.title + FROM users u +-LEFT JOIN profiles pr ON u.id = pr.user_id + JOIN posts p ON u.id = p.user_id + WHERE u.active = true +-AND p.published_at >= '2023-01-01' ++AND p.published_date >= '2023-01-01'`) + + assert.strictEqual(r.addedLines, 1) + assert.strictEqual(r.deletedLines, 2) + assert.strictEqual(r.changedCharacters, 45) + }) + + it('edit distance cal', function () { + const r = EditClassifier.editDistance('public static int substract', 'public static int substract()') + assert.strictEqual(r, 2) + }) + }) + + describe('test logistic formula', function () { + function createMockFileContext(leftcontext: string, rightcontext: string) {} + + it('case 1 Python function with keyword', function () { + const document = TextDocument.create( + 'test.py', + 'python', + 1, + `def calculate_sum(a, b): + return a + b + +def main(): + result = calculate_sum(5, 3) + try: + print(f"Result: {result}") + except Exception as e: + print(f"Error: {e}") + +if __name__ == "__main__": + main()` + ) + const filecontext = new ClientFileContextClss({ + textDocument: document, + position: Position.create(5, 7), + inferredLanguageId: 'python', + workspaceFolder: undefined, + }) + + // assert setup is correct + assert.strictEqual( + filecontext.leftFileContent, + `def calculate_sum(a, b): + return a + b + +def main(): + result = calculate_sum(5, 3) + try` + ) + assert.strictEqual( + filecontext.rightFileContent, + `: + print(f"Result: {result}") + except Exception as e: + print(f"Error: {e}") + +if __name__ == "__main__": + main()` + ) + assert.strictEqual(filecontext.programmingLanguage.languageName, 'python') + + // test classifier + const sut = new EditClassifier( + { + fileContext: filecontext, + triggerChar: 'y', + recentEdits: { + isUtg: false, + isProcessTimeout: false, + supplementalContextItems: [ + { + filePath: '', + content: `--- file:///calculator.py ++++ file:///calculator.py +@@ -1,5 +1,7 @@ + def calculate_sum(a, b): + return a + b + ++def calculate_product(a, b): ++ return a * b ++ + def main(): + result = calculate_sum(5, 3)`, + }, + ], + contentsLength: 0, + latency: 0, + strategy: 'recentEdits', + }, + recentDecisions: ['Accept', 'Accept', 'Accept', 'Reject', 'Reject'], // AR = 0.6 + }, + loggingStub + ) + + const actual = sut.score().toPrecision(4) + assert.strictEqual(actual, '0.6998') + }) + + it('case 2 Java method with keyword and deletions', function () { + const document = TextDocument.create( + 'test.java', + 'java', + 1, + `public class Calculator { + private int value; + + public void setValue(int v) { + this.value = v; + } + + public int getValue() { + if (this.value > 0) { + return this.value; + } + return 0; + } +}` + ) + const filecontext = new ClientFileContextClss({ + textDocument: document, + position: Position.create(8, 10), + inferredLanguageId: 'java', + workspaceFolder: undefined, + }) + + // assert setup is correct + assert.strictEqual( + filecontext.leftFileContent, + `public class Calculator { + private int value; + + public void setValue(int v) { + this.value = v; + } + + public int getValue() { + if` + ) + assert.strictEqual( + filecontext.rightFileContent, + ` (this.value > 0) { + return this.value; + } + return 0; + } +}` + ) + assert.strictEqual(filecontext.programmingLanguage.languageName, 'java') + + // test classifier + const sut = new EditClassifier( + { + fileContext: filecontext, + triggerChar: 'f', + recentEdits: { + isUtg: false, + isProcessTimeout: false, + supplementalContextItems: [ + { + filePath: '', + content: `--- file:///Calculator.java ++++ file:///Calculator.java +@@ -1,6 +1,4 @@ + public class Calculator { + private int value; +- private String name; +- private boolean active; + + public void setValue(int v) {`, + }, + ], + contentsLength: 0, + latency: 0, + strategy: 'recentEdits', + }, + recentDecisions: [], // If recentDecision has length 0, will use 0.3 as AR + }, + loggingStub + ) + + const actual = sut.score().toPrecision(4) + assert.strictEqual(actual, '0.5374') + }) + + it('case 3 JavaScript without keyword, with deletions', function () { + const document = TextDocument.create( + 'test.js', + 'javascript', + 1, + `const users = [ + { name: 'Alice', age: 25 }, + { name: 'Bob', age: 30 } +]; + +const getNames = () => { + return users.map(user => user.fullName); +}; + +console.log(getNames());` + ) + const filecontext = new ClientFileContextClss({ + textDocument: document, + position: Position.create(6, 42), + inferredLanguageId: 'javascript', + workspaceFolder: undefined, + }) + + // assert setup is correct + assert.strictEqual( + filecontext.leftFileContent, + `const users = [ + { name: 'Alice', age: 25 }, + { name: 'Bob', age: 30 } +]; + +const getNames = () => { + return users.map(user => user.fullName` + ) + assert.strictEqual( + filecontext.rightFileContent, + `); +}; + +console.log(getNames());` + ) + assert.strictEqual(filecontext.programmingLanguage.languageName, 'javascript') + + // test classifier + const sut = new EditClassifier( + { + fileContext: filecontext, + triggerChar: 'e', + recentEdits: { + isUtg: false, + isProcessTimeout: false, + supplementalContextItems: [ + { + filePath: '', + content: `--- file:///users.js ++++ file:///users.js +@@ -1,6 +1,4 @@ + const users = [ + { name: 'Alice', age: 25 }, +- { name: 'Bob', age: 30 }, +- { name: 'Charlie', age: 35 } ++ { name: 'Bob', age: 30 } + ];`, + }, + ], + contentsLength: 0, + latency: 0, + strategy: 'recentEdits', + }, + recentDecisions: ['Reject', 'Reject', 'Reject', 'Reject', 'Reject'], // AR 0 + }, + loggingStub + ) + + const actual = sut.score().toPrecision(4) + assert.strictEqual(actual, '0.4085') + }) + + it('case 4 C++ without keyword, with similar line changes', function () { + const document = TextDocument.create( + 'test.cpp', + 'cpp', + 1, + `#include +#include + +template +void printVector(const std::vector& vec) { + for (const auto& item : vec) { + std::cout << item << " "; + } + std::cout << std::newline; +} + +int main() { + std::vector numbers = {1, 2, 3, 4, 5}; + printVector(numbers); + return 0; +}` + ) + const filecontext = new ClientFileContextClss({ + textDocument: document, + position: Position.create(8, 29), + inferredLanguageId: 'cpp', + workspaceFolder: undefined, + }) + + // assert setup is correct + assert.strictEqual( + filecontext.leftFileContent, + `#include +#include + +template +void printVector(const std::vector& vec) { + for (const auto& item : vec) { + std::cout << item << " "; + } + std::cout << std::newline` + ) + assert.strictEqual( + filecontext.rightFileContent, + `; +} + +int main() { + std::vector numbers = {1, 2, 3, 4, 5}; + printVector(numbers); + return 0; +}` + ) + assert.strictEqual(filecontext.programmingLanguage.languageName, 'cpp') + + // test classifier + const sut = new EditClassifier( + { + fileContext: filecontext, + triggerChar: 'e', + recentEdits: { + isUtg: false, + isProcessTimeout: false, + supplementalContextItems: [ + { + filePath: '', + content: `--- file:///vector_print.cpp ++++ file:///vector_print.cpp +@@ -5,7 +5,7 @@ + for (const auto& item : vec) { + std::cout << item << " "; + } +- std::cout << std::endl; ++ std::cout << std::newline; + }`, + }, + ], + contentsLength: 0, + latency: 0, + strategy: 'recentEdits', + }, + recentDecisions: ['Accept', 'Accept', 'Reject', 'Reject', 'Reject'], // AR 0.4 + }, + loggingStub + ) + + const actual = sut.score().toPrecision(4) + assert.strictEqual(actual, '0.3954') + }) + + it('case 5 SQL without keyword, with similar line changes and deletions', function () { + const document = TextDocument.create( + 'test.sql', + 'sql', + 1, + `SELECT u.name, u.email, p.title +FROM users u +JOIN posts p ON u.id = p.user_id +WHERE u.active = true +AND p.published_date >= '2023-01-01' +ORDER BY p.published_date DESC +LIMIT 10;` + ) + const filecontext = new ClientFileContextClss({ + textDocument: document, + position: Position.create(4, 23), + inferredLanguageId: 'sql', + workspaceFolder: undefined, + }) + + // assert setup is correct + assert.strictEqual( + filecontext.leftFileContent, + `SELECT u.name, u.email, p.title +FROM users u +JOIN posts p ON u.id = p.user_id +WHERE u.active = true +AND p.published_date >=` + ) + assert.strictEqual( + filecontext.rightFileContent, + ` '2023-01-01' +ORDER BY p.published_date DESC +LIMIT 10;` + ) + assert.strictEqual(filecontext.programmingLanguage.languageName, 'sql') + + // test classifier + const sut = new EditClassifier( + { + fileContext: filecontext, + triggerChar: '', + recentEdits: { + isUtg: false, + isProcessTimeout: false, + supplementalContextItems: [ + { + filePath: '', + content: `--- file:///query.sql ++++ file:///query.sql +@@ -1,6 +1,4 @@ + SELECT u.name, u.email, p.title + FROM users u +-LEFT JOIN profiles pr ON u.id = pr.user_id + JOIN posts p ON u.id = p.user_id + WHERE u.active = true +-AND p.published_at >= '2023-01-01' ++AND p.published_date >= '2023-01-01'`, + }, + ], + contentsLength: 0, + latency: 0, + strategy: 'recentEdits', + }, + recentDecisions: ['Accept', 'Reject', 'Reject', 'Reject', 'Reject'], // AR 0.2 + }, + loggingStub + ) + + const actual = sut.score().toPrecision(4) + assert.strictEqual(actual, '0.4031') + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.ts index eee9edbdcb..ad02864bed 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/auto-trigger/editPredictionAutoTrigger.ts @@ -3,12 +3,19 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { FileContext } from '../../../shared/codeWhispererService' -import { Position } from '@aws/language-server-runtimes/server-interface' +import { ClientFileContextClss, FileContext } from '../../../shared/codeWhispererService' import { CursorTracker } from '../tracker/cursorTracker' import { RecentEditTracker } from '../tracker/codeEditTracker' -import { LanguageDetectorFactory } from './languageDetector' import { EditPredictionConfigManager } from './editPredictionConfig' +import { CodeWhispererSupplementalContext } from '../../../shared/models/model' +import { UserTriggerDecision } from '../session/sessionManager' +import { Logging } from '@aws/language-server-runtimes/server-interface' +import { lastTokenFromString } from '../utils/triggerUtils' + +// The sigmoid function to clamp the auto-trigger result to the (0, 1) range +const sigmoid = (x: number) => { + return 1 / (1 + Math.exp(-x)) +} /** * Parameters for the edit prediction auto-trigger @@ -65,3 +72,407 @@ export const editPredictionAutoTrigger = ({ return { shouldTrigger } } + +const keyWordCoefficients: Record = { + get: 1.171, + const: -0.7697, + try: 0.7182, + number: 0.6706, + this: 0.6271, + return: -0.3991, + from: -0.3515, + None: -0.3409, + True: -0.3653, + true: -0.2502, + async: -0.3212, + false: 0.3478, + else: 0.3154, + type: -0.2662, + null: -0.1576, + if: -0.1276, + in: -0.0905, + void: 0.1712, + any: 0.1663, + as: 0.139, + import: 0.1424, + for: 0.0252, + is: 0.1023, + string: 0.0691, +} + +const lastCharCoefficients: Record = { + // alphabet + a: 0.0773, + c: 0.1191, + d: -0.0938, + e: -0.1517, + f: 0.4246, + i: 0.154, + l: 0.2188, + m: -0.3026, + n: -0.0324, + o: 0.196, + p: -0.2283, + Q: -0.0205, + r: 0.1418, + s: 0.0387, + S: 0.3369, + t: 0.1863, + u: 0.3599, + y: 0.0456, + // numbers + '0': 0.0415, + '1': -0.1826, + '2': -0.1085, + // special chars + '(': 0.0539, + ')': 0.0996, + '{': 0.2644, + '}': 0.1122, + ';': 0.2225, + '/': -0.0745, + '>': -0.0378, + '.': 0.0244, + ',': -0.0274, + '\n': 0.1023, + ' ': -0.066, + _: 0.0781, + "'": -0.036, + '"': 0.0629, +} + +const languageCoefficients: Record = { + c: 0.1013, + cpp: -0.1371, + sql: -0.1509, + java: 0.0564, + javascript: 0.1183, + json: 0.0811, + kotlin: -0.3022, + python: 0.0914, + rust: -0.1024, + scala: 0.1648, + shell: 0.1292, + tf: -0.3823, + typescript: 0.0928, + yaml: -0.2578, +} + +const leftContextLineCountCoeffecients = { + lte25: -0.0417, +} + +// No rightContextLineCountCoefficients, leave it 0 for now +const rightContextLineCountCoefficients = { + lte3: 0, + gte_4_lte6: 0, + gte7: 0, +} + +const editHistoryCoefficients = { + changedCharsNorm: 0.0194, + linesDeletedNorm: -0.084, + linesAddedNorm: 0.0594, +} + +const lastLineLengthCoefficients = { + lte4: 0.0293, + gte_5_lte12: -0.0012, +} + +const arCoefficients = { + previous5: 0.4723, +} + +type EditAutoTriggerInput = { + fileContext: ClientFileContextClss + triggerChar: string + recentEdits: CodeWhispererSupplementalContext + recentDecisions: UserTriggerDecision[] +} + +type EditClassifierFeatures = { + lastCharacter: string + lastLineLength: number + leftContextLineCount: number + rightContextLineCount: number + normalizedEditHistory: EditHistoryFeature | undefined + language: string + keyword: string + userAR: number +} + +type EditHistoryFeature = { + changedCharacters: number + addedLines: number + deletedLines: number +} + +export class EditClassifier { + static THRESHOLD = 0.53 + static INTERCEPT = -0.2782 + + private _score: number | undefined + private features: EditClassifierFeatures + constructor( + params: EditAutoTriggerInput, + readonly logging: Logging + ) { + this.features = this.prepareFeatures(params) + } + + shouldTriggerEdits(): { shouldTrigger: boolean; threshold: number; score: number } { + const s = this.score() + return { + score: s, + threshold: EditClassifier.THRESHOLD, + shouldTrigger: s > EditClassifier.THRESHOLD, + } + } + + score() { + if (this._score !== undefined) { + return this._score + } + // 1. Last Character + const lastChar = this.features.lastCharacter + const myLastCharCoef = lastCharCoefficients[lastChar] ?? 0 + + // 2. Last Line Length + const lastLineLength = this.features.lastLineLength + let myLastLineLengthCoef = 0 + if (lastLineLength <= 4) { + myLastLineLengthCoef = lastLineLengthCoefficients.lte4 + } else if (lastLineLength >= 5 && lastLineLength <= 12) { + myLastLineLengthCoef = lastLineLengthCoefficients.gte_5_lte12 + } + + // 3. Left Context Line Count + const leftContextLineCount = this.features.leftContextLineCount + const myLeftContextLineCountCoef = leftContextLineCount <= 25 ? leftContextLineCountCoeffecients.lte25 : 0 + + // 4. Right Context Line Count + const rightContextLineCount = this.features.rightContextLineCount + let myRightContextLineCountCoef = 0 + if (rightContextLineCount <= 3) { + myRightContextLineCountCoef = rightContextLineCountCoefficients.lte3 + } else if (rightContextLineCount >= 4 && rightContextLineCount <= 6) { + myRightContextLineCountCoef = rightContextLineCountCoefficients.gte_4_lte6 + } else { + myRightContextLineCountCoef = rightContextLineCountCoefficients.gte7 + } + + // 5. Edit History (only using oldest) + const editH = this.features.normalizedEditHistory + const myAdded = (editH?.addedLines ?? 0) * editHistoryCoefficients.linesAddedNorm + const myDeleted = (editH?.deletedLines ?? 0) * editHistoryCoefficients.linesDeletedNorm + const myChanged = (editH?.changedCharacters ?? 0) * editHistoryCoefficients.changedCharsNorm + + // 6. Language + const lang = this.features.language + const myLangCoef = languageCoefficients[lang] ?? 0 + + // 7. Keyword + const kw = this.features.keyword + const myKeywordCoef = keyWordCoefficients[kw] ?? 0 + + // 8. AR + const myArCoef = arCoefficients.previous5 * this.features.userAR + + // Linear combination result + const logit = + myLastCharCoef + + myLastLineLengthCoef + + myLeftContextLineCountCoef + + myRightContextLineCountCoef + + myAdded + + myDeleted + + myChanged + + myLangCoef + + myKeywordCoef + + myArCoef + + EditClassifier.INTERCEPT + + const probability = sigmoid(logit) + + this.logging.log(`classifier: +"logit": ${logit}, +"probability": ${probability}, +"threshold": ${EditClassifier.THRESHOLD}, +@@features@@ +${JSON.stringify(this.features, undefined, 2)} +@@linear combination of features@@ +${JSON.stringify( + { + lastChar: myLastCharCoef, + lastLineLength: myLastLineLengthCoef, + leftContextLineCount: myLeftContextLineCountCoef, + rightContextLineCount: myRightContextLineCountCoef, + addedLines: myAdded, + deletedLines: myDeleted, + changedChars: myChanged, + language: myLangCoef, + keyword: myKeywordCoef, + ar: myArCoef, + intercept: EditClassifier.INTERCEPT, + }, + undefined, + 2 +)}`) + + return probability + } + + prepareFeatures(params: EditAutoTriggerInput): EditClassifierFeatures { + // 1. Last Character + const lastCharacter = params.triggerChar + + // 2. Last Line Length + const lastLineLength = params.fileContext.leftContextAtCurLine.length + + // 3. Left Context Line Count + const leftContextLineCount = params.fileContext.leftFileContent.split('\n').length + + // 4. Right Context Line Count + const rightContextLineCount = params.fileContext.rightFileContent.split('\n').length + + // 5. Edit History (only using olderst) + const oldest = + params.recentEdits.supplementalContextItems[params.recentEdits.supplementalContextItems.length - 1] // nullable + + const editHistory = oldest ? EditClassifier.processEditHistory(oldest.content) : undefined + const normalizedEditHistory = editHistory ? EditClassifier.normalizedRecentEdit(editHistory) : undefined + + this.logging.log(`lastLineFileContext: +${params.fileContext.leftContextAtCurLine} +recent decisions: +${JSON.stringify(params.recentDecisions)} +recent edits: +@@raw oldest edit@@ +${oldest.content} +@@raw numbers@@ +${JSON.stringify(editHistory, undefined, 2)} +@@normalized numbers@@ +${JSON.stringify(normalizedEditHistory, undefined, 2)} +@@edits array@@ +${params.recentEdits.supplementalContextItems.map(it => it.content)}`) + + // 6. Language + const lang = params.fileContext.programmingLanguage + + // 7. Keywords + const lastToken = lastTokenFromString(params.fileContext.leftFileContent) + + // 8. User AR for last 5 + // Cold start we assume 0.3 for AR + const ar = + params.recentDecisions.length === 0 + ? 0.3 + : params.recentDecisions.reduce((acc: number, cur: UserTriggerDecision) => { + if (cur === 'Accept') { + return acc + 1 + } else { + return acc + } + }, 0) / params.recentDecisions.length + + return { + lastCharacter: lastCharacter, + lastLineLength: lastLineLength, + leftContextLineCount: leftContextLineCount, + rightContextLineCount: rightContextLineCount, + normalizedEditHistory: normalizedEditHistory, + language: lang.languageName, + userAR: ar, + keyword: lastToken, + } + } + + static processEditHistory(udiff: string): EditHistoryFeature { + const lines = udiff.split('\n') + const addedLines = lines + .filter(line => line.startsWith('+') && !line.startsWith('+++')) + .map(line => line.substring(1)) + const deletedLines = lines + .filter(line => line.startsWith('-') && !line.startsWith('---')) + .map(line => line.substring(1)) + + const deletedText = deletedLines.join('\n') + const addedText = addedLines.join('\n') + + const historyChangedChars = EditClassifier.editDistance(deletedText, addedText) + const historyLineAdded = addedLines.length + const historyLineDeleted = deletedLines.length + + return { + changedCharacters: historyChangedChars, + addedLines: historyLineAdded, + deletedLines: historyLineDeleted, + } + } + + static normalizedRecentEdit(edit: EditHistoryFeature): EditHistoryFeature { + // Apply min-max normalization using training data min/max values + const { changedCharacters, addedLines, deletedLines } = edit + + const trainingCharsChangedMin = 0 + const trainingCharsChangedMax = 261 + const normalizedChangedCharacters = + (changedCharacters - trainingCharsChangedMin) / (trainingCharsChangedMax - trainingCharsChangedMin) + + const trainingLineAddedMin = 0 + const trainingLineAddedMax = 7 + const normalizedAddedLines = (addedLines - trainingLineAddedMin) / (trainingLineAddedMax - trainingLineAddedMin) + + const trainingLineDeletedMin = 0 + const trainingLineDeletedMax = 6 + const normalizedDeletedLines = + (deletedLines - trainingLineDeletedMin) / (trainingLineDeletedMax - trainingLineDeletedMin) + + return { + changedCharacters: normalizedChangedCharacters, + addedLines: normalizedAddedLines, + deletedLines: normalizedDeletedLines, + } + } + + // TODO: Maybe consider reusing same logic across the entire repo or 3rd party edit distance function, we have too many different variants of such + static editDistance(s1: string, s2: string): number { + if (s1.length === 0) return s2.length + if (s2.length === 0) return s1.length + + // Create matrix + const rows: number = s1.length + 1 + const cols: number = s2.length + 1 + const dp: number[][] = Array(rows) + .fill(0) + .map(() => Array(cols).fill(0)) + + // Initialize first row and column + for (let i = 0; i < rows; i++) { + dp[i][0] = i + } + for (let j = 0; j < cols; j++) { + dp[0][j] = j + } + + // Fill the matrix + for (let i = 1; i < rows; i++) { + for (let j = 1; j < cols; j++) { + if (s1[i - 1] === s2[j - 1]) { + dp[i][j] = dp[i - 1][j - 1] + } else { + dp[i][j] = + 1 + + Math.min( + dp[i - 1][j], // deletion + dp[i][j - 1], // insertion + dp[i - 1][j - 1] // substitution + ) + } + } + } + + return dp[rows - 1][cols - 1] + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeWhispererServer.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeWhispererServer.test.ts index 29390248f7..b86ec13356 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeWhispererServer.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeWhispererServer.test.ts @@ -10,9 +10,9 @@ import { } from '@aws/language-server-runtimes/server-interface' import { TestFeatures } from '@aws/language-server-runtimes/testing' import * as assert from 'assert' -import { AWSError } from 'aws-sdk' +import { ServiceException } from '@smithy/smithy-client' import sinon, { StubbedInstance } from 'ts-sinon' -import { CodewhispererServerFactory } from './codeWhispererServer' +import { CodeWhispererServer, CodewhispererServerFactory } from './codeWhispererServer' import { CodeWhispererServiceBase, CodeWhispererServiceToken, @@ -27,7 +27,6 @@ import { EXPECTED_REFERENCE, EXPECTED_RESPONSE_CONTEXT, EXPECTED_RESULT, - EXPECTED_RESULT_EDITS, EXPECTED_RESULT_WITHOUT_IMPORTS, EXPECTED_RESULT_WITHOUT_REFERENCES, EXPECTED_RESULT_WITH_IMPORTS, @@ -52,15 +51,16 @@ import { SPECIAL_CHARACTER_HELLO_WORLD, stubCodeWhispererService, } from '../../shared/testUtils' -import { CodeDiffTracker } from './codeDiffTracker' +import { CodeDiffTracker } from './tracker/codeDiffTracker' import { TelemetryService } from '../../shared/telemetry/telemetryService' import { initBaseTestServiceManager, TestAmazonQServiceManager } from '../../shared/amazonQServiceManager/testUtils' +import * as utils from '../../shared/utils' import { LocalProjectContextController } from '../../shared/localProjectContextController' import { URI } from 'vscode-uri' import { INVALID_TOKEN } from '../../shared/constants' import { AmazonQError } from '../../shared/amazonQServiceManager/errors' import * as path from 'path' -import { CONTEXT_CHARACTERS_LIMIT } from './constants' +import { CONTEXT_CHARACTERS_LIMIT } from './contants/constants' import { IdleWorkspaceManager } from '../workspaceContext/IdleWorkspaceManager' const updateConfiguration = async ( @@ -107,6 +107,33 @@ describe('CodeWhisperer Server', () => { .callsFake(StubSessionIdGenerator) sessionManager = SessionManager.getInstance() sessionManagerSpy = sandbox.spy(sessionManager) + + // Stub the global service manager functions to ensure they return test service managers + sandbox + .stub( + require('../../shared/amazonQServiceManager/AmazonQTokenServiceManager'), + 'getOrThrowBaseTokenServiceManager' + ) + .callsFake(() => { + // Create a new test service manager + return TestAmazonQServiceManager.getInstance() + }) + + // Also stub the IAM service manager + sandbox + .stub( + require('../../shared/amazonQServiceManager/AmazonQIAMServiceManager'), + 'getOrThrowBaseIAMServiceManager' + ) + .callsFake(() => { + // Return the same test service manager + return TestAmazonQServiceManager.getInstance() + }) + + // Reset AmazonQTokenServiceManager singleton to prevent cross-test interference + const AmazonQTokenServiceManager = + require('../../shared/amazonQServiceManager/AmazonQTokenServiceManager').AmazonQTokenServiceManager + AmazonQTokenServiceManager.resetInstance() }) afterEach(() => { @@ -115,6 +142,14 @@ describe('CodeWhisperer Server', () => { sandbox.restore() sinon.restore() SESSION_IDS_LOG = [] + + // Reset all service manager singletons to prevent cross-test interference + const AmazonQTokenServiceManager = + require('../../shared/amazonQServiceManager/AmazonQTokenServiceManager').AmazonQTokenServiceManager + const AmazonQIAMServiceManager = + require('../../shared/amazonQServiceManager/AmazonQIAMServiceManager').AmazonQIAMServiceManager + AmazonQTokenServiceManager.resetInstance() + AmazonQIAMServiceManager.resetInstance() }) describe('Recommendations', () => { @@ -648,7 +683,8 @@ describe('CodeWhisperer Server', () => { it('handles partialResultToken in request', async () => { const manager = SessionManager.getInstance() - manager.createSession(SAMPLE_SESSION_DATA) + const session = manager.createSession(SAMPLE_SESSION_DATA) + manager.activateSession(session) await features.doInlineCompletionWithReferences( { textDocument: { uri: SOME_FILE.uri }, @@ -728,12 +764,12 @@ describe('CodeWhisperer Server', () => { const secondCallArgs = service.generateSuggestions.secondCall.args[0] // Verify context truncation in first call - assert.strictEqual(firstCallArgs.fileContext.leftFileContent.length, CONTEXT_CHARACTERS_LIMIT) - assert.strictEqual(firstCallArgs.fileContext.rightFileContent.length, CONTEXT_CHARACTERS_LIMIT) + assert.strictEqual(firstCallArgs.fileContext?.leftFileContent?.length, CONTEXT_CHARACTERS_LIMIT) + assert.strictEqual(firstCallArgs.fileContext.rightFileContent?.length, CONTEXT_CHARACTERS_LIMIT) // Verify context truncation in second call (pagination) - assert.strictEqual(secondCallArgs.fileContext.leftFileContent.length, CONTEXT_CHARACTERS_LIMIT) - assert.strictEqual(secondCallArgs.fileContext.rightFileContent.length, CONTEXT_CHARACTERS_LIMIT) + assert.strictEqual(secondCallArgs.fileContext?.leftFileContent?.length, CONTEXT_CHARACTERS_LIMIT) + assert.strictEqual(secondCallArgs.fileContext.rightFileContent?.length, CONTEXT_CHARACTERS_LIMIT) // Verify second call included the nextToken assert.strictEqual(secondCallArgs.nextToken, EXPECTED_NEXT_TOKEN) @@ -1442,6 +1478,7 @@ describe('CodeWhisperer Server', () => { const sessionData: SessionData = { document: TextDocument.create('file:///rightContext.cs', 'csharp', 1, HELLO_WORLD_IN_CSHARP), + startPreprocessTimestamp: 0, startPosition: { line: 0, character: 0 }, triggerType: 'OnDemand', language: 'csharp', @@ -1503,7 +1540,7 @@ describe('CodeWhisperer Server', () => { manager.activateSession(session) const session2 = manager.createSession(sessionData) manager.activateSession(session2) - assert.equal(session.state, 'CLOSED') + assert.equal(session.state, 'ACTIVE') assert.equal(session2.state, 'ACTIVE') await features.doLogInlineCompletionSessionResults(sessionResultData) @@ -1737,7 +1774,7 @@ describe('CodeWhisperer Server', () => { }, errorData: { reason: 'TestError', - errorCode: undefined, + errorCode: 'TestError', httpStatusCode: undefined, }, } @@ -1789,13 +1826,16 @@ describe('CodeWhisperer Server', () => { sinon.assert.calledOnceWithExactly(features.telemetry.emitMetric, expectedServiceInvocationMetric) }) - it('should emit Failure ServiceInvocation telemetry with request metadata on failed response with AWSError error type', async () => { - const error: AWSError = new Error('Fake Error') as AWSError - error.name = 'TestAWSError' - error.code = 'TestErrorStatusCode' - error.statusCode = 500 - error.time = new Date() - error.requestId = 'failed-request-id' + it('should emit Failure ServiceInvocation telemetry with request metadata on failed response with ServiceException error type', async () => { + const error = new ServiceException({ + name: 'TestServiceException', + $fault: 'client', + $metadata: { + httpStatusCode: 500, + requestId: 'failed-request-id', + }, + message: 'Fake Error', + }) service.generateSuggestions.callsFake(_request => { clock.tick(1000) @@ -1822,7 +1862,7 @@ describe('CodeWhisperer Server', () => { codewhispererLastSuggestionIndex: -1, codewhispererTriggerType: 'OnDemand', codewhispererAutomatedTriggerType: undefined, - reason: 'CodeWhisperer Invocation Exception: TestAWSError', + reason: 'CodeWhisperer Invocation Exception: TestServiceException', duration: 1000, codewhispererLineNumber: 0, codewhispererCursorOffset: 0, @@ -1838,8 +1878,8 @@ describe('CodeWhisperer Server', () => { traceId: 'notSet', }, errorData: { - reason: 'TestAWSError', - errorCode: 'TestErrorStatusCode', + reason: 'TestServiceException', + errorCode: 'TestServiceException', httpStatusCode: 500, }, } @@ -2300,39 +2340,6 @@ describe('CodeWhisperer Server', () => { sinon.assert.calledOnceWithExactly(sessionManagerSpy.closeSession, currentSession) }) - it('Manual completion invocation should close previous session', async () => { - const TRIGGER_KIND = InlineCompletionTriggerKind.Invoked - - const result = await features.doInlineCompletionWithReferences( - { - textDocument: { uri: SOME_FILE.uri }, - position: { line: 0, character: 0 }, - // Manual trigger kind - context: { triggerKind: TRIGGER_KIND }, - }, - CancellationToken.None - ) - - assert.deepEqual(result, EXPECTED_RESULT) - const firstSession = sessionManager.getActiveSession() - - // There is ACTIVE session - assert(firstSession) - assert.equal(sessionManager.getCurrentSession(), firstSession) - assert.equal(firstSession.state, 'ACTIVE') - - const secondResult = await features.doInlineCompletionWithReferences( - { - textDocument: { uri: SOME_FILE.uri }, - position: { line: 0, character: 0 }, - context: { triggerKind: TRIGGER_KIND }, - }, - CancellationToken.None - ) - assert.deepEqual(secondResult, { ...EXPECTED_RESULT, sessionId: SESSION_IDS_LOG[1] }) - sinon.assert.called(sessionManagerSpy.closeCurrentSession) - }) - it('should discard inflight session if merge right recommendations resulted in list of empty strings', async () => { // The suggestion returned by generateSuggestions will be equal to the contents of the file // This test fails when the file starts with a new line, probably due to the way we handle right context merge @@ -2427,4 +2434,79 @@ describe('CodeWhisperer Server', () => { TestAmazonQServiceManager.resetInstance() }) }) + + describe('IAM Error Handling', () => { + it('should handle IAM access denied errors', async () => { + const service = sinon.createStubInstance( + CodeWhispererServiceToken + ) as StubbedInstance + service.generateSuggestions.rejects(new Error('not authorized')) + + const features = new TestFeatures() + //@ts-ignore + features.logging = console + + TestAmazonQServiceManager.resetInstance() + const server = CodewhispererServerFactory(() => initBaseTestServiceManager(features, service)) + features.lsp.workspace.getConfiguration.returns(Promise.resolve({})) + await startServer(features, server) + features.openDocument(SOME_FILE) + + const result = await features.doInlineCompletionWithReferences( + { + textDocument: { uri: SOME_FILE.uri }, + position: { line: 0, character: 0 }, + context: { triggerKind: InlineCompletionTriggerKind.Invoked }, + }, + CancellationToken.None + ) + + assert.deepEqual(result, EMPTY_RESULT) + TestAmazonQServiceManager.resetInstance() + }) + }) + + describe('Dynamic Service Manager Selection', () => { + it('should use Token service manager when not using IAM auth', async () => { + // Create isolated stubs for this test only + const isUsingIAMAuthStub = sinon.stub(utils, 'isUsingIAMAuth').returns(false) + const mockTokenService = TestAmazonQServiceManager.initInstance(new TestFeatures()) + mockTokenService.withCodeWhispererService(stubCodeWhispererService()) + + const features = new TestFeatures() + const server = CodeWhispererServer + + try { + await startServer(features, server) + + // Verify the correct service manager function was called + sinon.assert.calledWith(isUsingIAMAuthStub, features.credentialsProvider) + } finally { + isUsingIAMAuthStub.restore() + features.dispose() + TestAmazonQServiceManager.resetInstance() + } + }) + + it('should use IAM service manager when using IAM auth', async () => { + // Create isolated stubs for this test only + const isUsingIAMAuthStub = sinon.stub(utils, 'isUsingIAMAuth').returns(true) + const mockIAMService = TestAmazonQServiceManager.initInstance(new TestFeatures()) + mockIAMService.withCodeWhispererService(stubCodeWhispererService()) + + const features = new TestFeatures() + const server = CodeWhispererServer + + try { + await startServer(features, server) + + // Verify the correct service manager function was called + sinon.assert.calledWith(isUsingIAMAuthStub, features.credentialsProvider) + } finally { + isUsingIAMAuthStub.restore() + features.dispose() + TestAmazonQServiceManager.resetInstance() + } + }) + }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeWhispererServer.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeWhispererServer.ts index 23a72e3528..3e8461a576 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeWhispererServer.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeWhispererServer.ts @@ -1,107 +1,35 @@ import { CancellationToken, InitializeParams, - InlineCompletionItemWithReferences, InlineCompletionListWithReferences, - InlineCompletionTriggerKind, InlineCompletionWithReferencesParams, - LogInlineCompletionSessionResultsParams, - Position, - Range, Server, - TextDocument, - ResponseError, - LSPErrorCodes, } from '@aws/language-server-runtimes/server-interface' -import { autoTrigger, getAutoTriggerType, getNormalizeOsName, triggerType } from './auto-trigger/autoTrigger' -import { - GenerateSuggestionsRequest, - GenerateSuggestionsResponse, - getFileContext, - Suggestion, - SuggestionType, -} from '../../shared/codeWhispererService' import { getSupportedLanguageId } from '../../shared/languageDetection' -import { mergeEditSuggestionsWithFileContext, truncateOverlapWithRightContext } from './mergeRightUtils' -import { CodeWhispererSession, SessionManager } from './session/sessionManager' -import { CodePercentageTracker } from './codePercentage' -import { getCompletionType, getEndPositionForAcceptedSuggestion, getErrorMessage, safeGet } from '../../shared/utils' -import { getIdeCategory, makeUserContextObject } from '../../shared/telemetryUtils' -import { textUtils } from '@aws/lsp-core' +import { SessionManager } from './session/sessionManager' +import { CodePercentageTracker } from './tracker/codePercentageTracker' +import { safeGet } from '../../shared/utils' +import { makeUserContextObject } from '../../shared/telemetryUtils' import { TelemetryService } from '../../shared/telemetry/telemetryService' -import { AcceptedInlineSuggestionEntry, CodeDiffTracker } from './codeDiffTracker' -import { - AmazonQError, - AmazonQServiceConnectionExpiredError, - AmazonQServiceInitializationError, -} from '../../shared/amazonQServiceManager/errors' +import { AcceptedInlineSuggestionEntry, CodeDiffTracker } from './tracker/codeDiffTracker' +import { AmazonQServiceInitializationError } from '../../shared/amazonQServiceManager/errors' import { AmazonQBaseServiceManager } from '../../shared/amazonQServiceManager/BaseAmazonQServiceManager' import { getOrThrowBaseTokenServiceManager } from '../../shared/amazonQServiceManager/AmazonQTokenServiceManager' import { AmazonQWorkspaceConfig } from '../../shared/amazonQServiceManager/configurationUtils' -import { hasConnectionExpired } from '../../shared/utils' import { getOrThrowBaseIAMServiceManager } from '../../shared/amazonQServiceManager/AmazonQIAMServiceManager' -import { WorkspaceFolderManager } from '../workspaceContext/workspaceFolderManager' -import path = require('path') import { UserWrittenCodeTracker } from '../../shared/userWrittenCodeTracker' import { RecentEditTracker, RecentEditTrackerDefaultConfig } from './tracker/codeEditTracker' import { CursorTracker } from './tracker/cursorTracker' import { RejectedEditTracker, DEFAULT_REJECTED_EDIT_TRACKER_CONFIG } from './tracker/rejectedEditTracker' -import { getAddedAndDeletedLines, getCharacterDifferences } from './diffUtils' -import { - emitPerceivedLatencyTelemetry, - emitServiceInvocationFailure, - emitServiceInvocationTelemetry, - emitUserTriggerDecisionTelemetry, -} from './telemetry' +import { StreakTracker } from './tracker/streakTracker' import { DocumentChangedListener } from './documentChangedListener' -import { EditCompletionHandler } from './editCompletionHandler' -import { EMPTY_RESULT, ABAP_EXTENSIONS } from './constants' -import { IdleWorkspaceManager } from '../workspaceContext/IdleWorkspaceManager' -import { URI } from 'vscode-uri' - -const mergeSuggestionsWithRightContext = ( - rightFileContext: string, - suggestions: Suggestion[], - includeImportsWithSuggestions: boolean, - range?: Range -): InlineCompletionItemWithReferences[] => { - return suggestions.map(suggestion => { - const insertText: string = truncateOverlapWithRightContext(rightFileContext, suggestion.content) - let references = suggestion.references - ?.filter( - ref => - !( - ref.recommendationContentSpan?.start && insertText.length <= ref.recommendationContentSpan.start - ) && insertText.length - ) - .map(r => { - return { - licenseName: r.licenseName, - referenceUrl: r.url, - referenceName: r.repository, - position: r.recommendationContentSpan && { - startCharacter: r.recommendationContentSpan.start, - endCharacter: r.recommendationContentSpan.end - ? Math.min(r.recommendationContentSpan.end, insertText.length - 1) - : r.recommendationContentSpan.end, - }, - } - }) - - return { - itemId: suggestion.itemId, - insertText: insertText, - range, - references: references?.length ? references : undefined, - mostRelevantMissingImports: includeImportsWithSuggestions - ? suggestion.mostRelevantMissingImports - : undefined, - } - }) -} +import { EditCompletionHandler } from './handler/editCompletionHandler' +import { InlineCompletionHandler } from './handler/inlineCompletionHandler' +import { SessionResultsHandler } from './handler/sessionResultsHandler' +import { isUsingIAMAuth } from '../../shared/utils' export const CodewhispererServerFactory = - (serviceManager: () => AmazonQBaseServiceManager): Server => + (serviceManager: (credentialsProvider?: any) => AmazonQBaseServiceManager): Server => ({ credentialsProvider, lsp, workspace, telemetry, logging, runtime, sdkInitializator }) => { let lastUserModificationTime: number let timeSinceLastUserModification: number = 0 @@ -124,13 +52,14 @@ export const CodewhispererServerFactory = let userWrittenCodeTracker: UserWrittenCodeTracker | undefined let codeDiffTracker: CodeDiffTracker let editCompletionHandler: EditCompletionHandler + let inlineCompletionHandler: InlineCompletionHandler // Trackers for monitoring edits and cursor position. const recentEditTracker = RecentEditTracker.getInstance(logging, RecentEditTrackerDefaultConfig) const cursorTracker = CursorTracker.getInstance() const rejectedEditTracker = RejectedEditTracker.getInstance(logging, DEFAULT_REJECTED_EDIT_TRACKER_CONFIG) + const streakTracker = StreakTracker.getInstance() let editsEnabled = false - let isOnInlineCompletionHandlerInProgress = false const documentChangedListener = new DocumentChangedListener() @@ -138,566 +67,10 @@ export const CodewhispererServerFactory = params: InlineCompletionWithReferencesParams, token: CancellationToken ): Promise => { - // this handle should not run concurrently because - // 1. it would create a high volume of traffic, causing throttling - // 2. it is not designed to handle concurrent changes to these state variables. - // when one handler is at the API call stage, it has not yet update the session state - // but another request can start, causing the state to be incorrect. - IdleWorkspaceManager.recordActivityTimestamp() - - if (isOnInlineCompletionHandlerInProgress) { - logging.log(`Skip concurrent inline completion`) - return EMPTY_RESULT - } - isOnInlineCompletionHandlerInProgress = true - - try { - // On every new completion request close current inflight session. - const currentSession = completionSessionManager.getCurrentSession() - if (currentSession && currentSession.state == 'REQUESTING' && !params.partialResultToken) { - // this REQUESTING state only happens when the session is initialized, which is rare - currentSession.discardInflightSessionOnNewInvocation = true - } - - if (cursorTracker) { - cursorTracker.trackPosition(params.textDocument.uri, params.position) - } - const textDocument = await getTextDocument(params.textDocument.uri, workspace, logging) - - const codeWhispererService = amazonQServiceManager.getCodewhispererService() - if (params.partialResultToken && currentSession) { - // subsequent paginated requests for current session - try { - const suggestionResponse = await codeWhispererService.generateSuggestions({ - ...currentSession.requestContext, - fileContext: { - ...currentSession.requestContext.fileContext, - }, - nextToken: `${params.partialResultToken}`, - }) - return await processSuggestionResponse( - suggestionResponse, - currentSession, - false, - params.context.selectedCompletionInfo?.range - ) - } catch (error) { - return handleSuggestionsErrors(error as Error, currentSession) - } - } else { - // request for new session - if (!textDocument) { - logging.log(`textDocument [${params.textDocument.uri}] not found`) - return EMPTY_RESULT - } - - const inferredLanguageId = getSupportedLanguageId(textDocument) - if (!inferredLanguageId) { - logging.log( - `textDocument [${params.textDocument.uri}] with languageId [${textDocument.languageId}] not supported` - ) - return EMPTY_RESULT - } - - // Build request context - const isAutomaticLspTriggerKind = - params.context.triggerKind == InlineCompletionTriggerKind.Automatic - const maxResults = isAutomaticLspTriggerKind ? 1 : 5 - const selectionRange = params.context.selectedCompletionInfo?.range - const fileContext = getFileContext({ - textDocument, - inferredLanguageId, - position: params.position, - workspaceFolder: workspace.getWorkspaceFolder(textDocument.uri), - }) - - const workspaceState = WorkspaceFolderManager.getInstance()?.getWorkspaceState() - const workspaceId = workspaceState?.webSocketClient?.isConnected() - ? workspaceState.workspaceId - : undefined - - const previousSession = completionSessionManager.getPreviousSession() - const previousDecision = previousSession?.getAggregatedUserTriggerDecision() ?? '' - let ideCategory: string | undefined = '' - const initializeParams = lsp.getClientInitializeParams() - if (initializeParams !== undefined) { - ideCategory = getIdeCategory(initializeParams) - } - - // auto trigger code path - let codewhispererAutoTriggerType = undefined - let triggerCharacters = '' - let autoTriggerResult = undefined - - if (isAutomaticLspTriggerKind) { - // Reference: https://github.com/aws/aws-toolkit-vscode/blob/amazonq/v1.74.0/packages/core/src/codewhisperer/service/classifierTrigger.ts#L477 - if ( - params.documentChangeParams?.contentChanges && - params.documentChangeParams.contentChanges.length > 0 && - params.documentChangeParams.contentChanges[0].text !== undefined - ) { - triggerCharacters = params.documentChangeParams.contentChanges[0].text - codewhispererAutoTriggerType = getAutoTriggerType( - params.documentChangeParams.contentChanges - ) - } else { - // if the client does not emit document change for the trigger, use left most character. - triggerCharacters = fileContext.leftFileContent.trim().at(-1) ?? '' - codewhispererAutoTriggerType = triggerType(fileContext) - } - // See: https://github.com/aws/aws-toolkit-vscode/blob/amazonq/v1.74.0/packages/core/src/codewhisperer/service/keyStrokeHandler.ts#L132 - // In such cases, do not auto trigger. - if (codewhispererAutoTriggerType === undefined) { - return EMPTY_RESULT - } - - autoTriggerResult = autoTrigger( - { - fileContext, // The left/right file context and programming language - lineNum: params.position.line, // the line number of the invocation, this is the line of the cursor - char: triggerCharacters, // Add the character just inserted, if any, before the invication position - ide: ideCategory ?? '', - os: getNormalizeOsName(), - previousDecision, // The last decision by the user on the previous invocation - triggerType: codewhispererAutoTriggerType, // The 2 trigger types currently influencing the Auto-Trigger are SpecialCharacter and Enter - }, - logging - ) - - if (codewhispererAutoTriggerType === 'Classifier' && !autoTriggerResult.shouldTrigger) { - return EMPTY_RESULT - } - } - - let requestContext: GenerateSuggestionsRequest = { - fileContext, - maxResults, - } - - const supplementalContext = await codeWhispererService.constructSupplementalContext( - textDocument, - params.position, - workspace, - recentEditTracker, - logging, - token, - params.openTabFilepaths, - { includeRecentEdits: false } - ) - - if (supplementalContext?.items) { - requestContext.supplementalContexts = supplementalContext.items - } - - // Close ACTIVE session and record Discard trigger decision immediately - if (currentSession && currentSession.state === 'ACTIVE') { - if (editsEnabled && currentSession.suggestionType === SuggestionType.EDIT) { - const mergedSuggestions = mergeEditSuggestionsWithFileContext( - currentSession, - textDocument, - fileContext - ) - - if (mergedSuggestions.length > 0) { - return { - items: mergedSuggestions, - sessionId: currentSession.id, - } - } - } - // Emit user trigger decision at session close time for active session - completionSessionManager.discardSession(currentSession) - const streakLength = editsEnabled ? completionSessionManager.getAndUpdateStreakLength(false) : 0 - await emitUserTriggerDecisionTelemetry( - telemetry, - telemetryService, - currentSession, - timeSinceLastUserModification, - 0, - 0, - [], - [], - streakLength - ) - } - - const supplementalMetadata = supplementalContext?.supContextData - - const newSession = completionSessionManager.createSession({ - document: textDocument, - startPosition: params.position, - triggerType: isAutomaticLspTriggerKind ? 'AutoTrigger' : 'OnDemand', - language: fileContext.programmingLanguage.languageName, - requestContext: requestContext, - autoTriggerType: isAutomaticLspTriggerKind ? codewhispererAutoTriggerType : undefined, - triggerCharacter: triggerCharacters, - classifierResult: autoTriggerResult?.classifierResult, - classifierThreshold: autoTriggerResult?.classifierThreshold, - credentialStartUrl: credentialsProvider.getConnectionMetadata?.()?.sso?.startUrl ?? undefined, - supplementalMetadata: supplementalMetadata, - customizationArn: textUtils.undefinedIfEmpty(codeWhispererService.customizationArn), - }) - - // Add extra context to request context - const { extraContext } = amazonQServiceManager.getConfiguration().inlineSuggestions - if (extraContext) { - requestContext.fileContext.leftFileContent = - extraContext + '\n' + requestContext.fileContext.leftFileContent - } - - const generateCompletionReq = { - ...requestContext, - ...(workspaceId ? { workspaceId: workspaceId } : {}), - } - try { - const suggestionResponse = await codeWhispererService.generateSuggestions(generateCompletionReq) - return await processSuggestionResponse(suggestionResponse, newSession, true, selectionRange) - } catch (error) { - return handleSuggestionsErrors(error as Error, newSession) - } - } - } finally { - isOnInlineCompletionHandlerInProgress = false - } + return await inlineCompletionHandler.onInlineCompletion(params, token) } - const processSuggestionResponse = async ( - suggestionResponse: GenerateSuggestionsResponse, - session: CodeWhispererSession, - isNewSession: boolean, - selectionRange?: Range, - textDocument?: TextDocument - ): Promise => { - codePercentageTracker.countInvocation(session.language) - - userWrittenCodeTracker?.recordUsageCount(session.language) - session.includeImportsWithSuggestions = - amazonQServiceManager.getConfiguration().includeImportsWithSuggestions - - if (isNewSession) { - // Populate the session with information from codewhisperer response - session.suggestions = suggestionResponse.suggestions - session.responseContext = suggestionResponse.responseContext - session.codewhispererSessionId = suggestionResponse.responseContext.codewhispererSessionId - session.timeToFirstRecommendation = new Date().getTime() - session.startTime - session.suggestionType = suggestionResponse.suggestionType - } else { - session.suggestions = [...session.suggestions, ...suggestionResponse.suggestions] - } - - // Emit service invocation telemetry for every request sent to backend - emitServiceInvocationTelemetry(telemetry, session, suggestionResponse.responseContext.requestId) - - // Discard previous inflight API response due to new trigger - if (session.discardInflightSessionOnNewInvocation) { - session.discardInflightSessionOnNewInvocation = false - completionSessionManager.discardSession(session) - const streakLength = editsEnabled ? completionSessionManager.getAndUpdateStreakLength(false) : 0 - await emitUserTriggerDecisionTelemetry( - telemetry, - telemetryService, - session, - timeSinceLastUserModification, - 0, - 0, - [], - [], - streakLength - ) - } - - // session was closed by user already made decisions consequent completion request before new paginated API response was received - if ( - session.suggestionType !== SuggestionType.EDIT && // TODO: this is a shorterm fix to allow Edits tabtabtab experience, however the real solution is to manage such sessions correctly - (session.state === 'CLOSED' || session.state === 'DISCARD') - ) { - return EMPTY_RESULT - } - - // API response was recieved, we can activate session now - completionSessionManager.activateSession(session) - - // Process suggestions to apply Empty or Filter filters - const filteredSuggestions = suggestionResponse.suggestions - // Empty suggestion filter - .filter(suggestion => { - if (suggestion.content === '') { - session.setSuggestionState(suggestion.itemId, 'Empty') - return false - } - - return true - }) - // References setting filter - .filter(suggestion => { - // State to track whether code with references should be included in - // the response. No locking or concurrency controls, filtering is done - // right before returning and is only guaranteed to be consistent within - // the context of a single response. - const { includeSuggestionsWithCodeReferences } = amazonQServiceManager.getConfiguration() - if (includeSuggestionsWithCodeReferences) { - return true - } - - if (suggestion.references == null || suggestion.references.length === 0) { - return true - } - - // Filter out suggestions that have references when includeSuggestionsWithCodeReferences setting is true - session.setSuggestionState(suggestion.itemId, 'Filter') - return false - }) - - if (suggestionResponse.suggestionType === SuggestionType.COMPLETION) { - const { includeImportsWithSuggestions } = amazonQServiceManager.getConfiguration() - const suggestionsWithRightContext = mergeSuggestionsWithRightContext( - session.requestContext.fileContext.rightFileContent, - filteredSuggestions, - includeImportsWithSuggestions, - selectionRange - ).filter(suggestion => { - // Discard suggestions that have empty string insertText after right context merge and can't be displayed anymore - if (suggestion.insertText === '') { - session.setSuggestionState(suggestion.itemId, 'Discard') - return false - } - - return true - }) - - suggestionsWithRightContext.forEach(suggestion => { - const cachedSuggestion = session.suggestions.find(s => s.itemId === suggestion.itemId) - if (cachedSuggestion) cachedSuggestion.insertText = suggestion.insertText.toString() - }) - - // TODO: need dedupe after right context merging but I don't see one - session.suggestionsAfterRightContextMerge.push(...suggestionsWithRightContext) - - session.codewhispererSuggestionImportCount = - session.codewhispererSuggestionImportCount + - suggestionsWithRightContext.reduce((total, suggestion) => { - return total + (suggestion.mostRelevantMissingImports?.length || 0) - }, 0) - - // If after all server-side filtering no suggestions can be displayed, and there is no nextToken - // close session and return empty results - if ( - session.suggestionsAfterRightContextMerge.length === 0 && - !suggestionResponse.responseContext.nextToken - ) { - completionSessionManager.closeSession(session) - await emitUserTriggerDecisionTelemetry( - telemetry, - telemetryService, - session, - timeSinceLastUserModification - ) - - return EMPTY_RESULT - } - - return { - items: suggestionsWithRightContext, - sessionId: session.id, - partialResultToken: suggestionResponse.responseContext.nextToken, - } - } else { - return { - items: suggestionResponse.suggestions - .map(suggestion => { - // Check if this suggestion is similar to a previously rejected edit - const isSimilarToRejected = rejectedEditTracker.isSimilarToRejected( - suggestion.content, - textDocument?.uri || '' - ) - - if (isSimilarToRejected) { - // Mark as rejected in the session - session.setSuggestionState(suggestion.itemId, 'Reject') - logging.debug( - `[EDIT_PREDICTION] Filtered out suggestion similar to previously rejected edit` - ) - // Return empty item that will be filtered out - return { - insertText: '', - isInlineEdit: true, - itemId: suggestion.itemId, - } - } - - return { - insertText: suggestion.content, - isInlineEdit: true, - itemId: suggestion.itemId, - } - }) - .filter(item => item.insertText !== ''), - sessionId: session.id, - partialResultToken: suggestionResponse.responseContext.nextToken, - } - } - } - - const handleSuggestionsErrors = ( - error: Error, - session: CodeWhispererSession - ): InlineCompletionListWithReferences => { - logging.log('Recommendation failure: ' + error) - emitServiceInvocationFailure(telemetry, session, error) - - completionSessionManager.closeSession(session) - - let translatedError = error - - if (hasConnectionExpired(error)) { - translatedError = new AmazonQServiceConnectionExpiredError(getErrorMessage(error)) - } - - if (translatedError instanceof AmazonQError) { - throw new ResponseError( - LSPErrorCodes.RequestFailed, - translatedError.message || 'Error processing suggestion requests', - { - awsErrorCode: translatedError.code, - } - ) - } - - return EMPTY_RESULT - } - - // Schedule tracker for UserModification Telemetry event - const enqueueCodeDiffEntry = ( - session: CodeWhispererSession, - acceptedSuggestion: Suggestion, - addedCharactersForEdit?: string - ) => { - const endPosition = getEndPositionForAcceptedSuggestion(acceptedSuggestion.content, session.startPosition) - // use the addedCharactersForEdit if it is EDIT suggestion type - const originalString = addedCharactersForEdit ? addedCharactersForEdit : acceptedSuggestion.content - - codeDiffTracker.enqueue({ - sessionId: session.codewhispererSessionId || '', - requestId: session.responseContext?.requestId || '', - fileUrl: session.document.uri, - languageId: session.language, - time: Date.now(), - originalString: originalString, - startPosition: session.startPosition, - endPosition: endPosition, - customizationArn: session.customizationArn, - completionType: getCompletionType(acceptedSuggestion), - triggerType: session.triggerType, - credentialStartUrl: session.credentialStartUrl, - }) - } - - const onLogInlineCompletionSessionResultsHandler = async (params: LogInlineCompletionSessionResultsParams) => { - const { - sessionId, - completionSessionResult, - firstCompletionDisplayLatency, - totalSessionDisplayTime, - typeaheadLength, - isInlineEdit, - addedDiagnostics, - removedDiagnostics, - } = params - - const sessionManager = params.isInlineEdit ? editSessionManager : completionSessionManager - - const session = sessionManager.getSessionById(sessionId) - if (!session) { - logging.log(`ERROR: Session ID ${sessionId} was not found`) - return - } - - if (session.state !== 'ACTIVE') { - logging.log(`ERROR: Trying to record trigger decision for not-active session ${sessionId}`) - return - } - - const acceptedItemId = Object.keys(params.completionSessionResult).find( - k => params.completionSessionResult[k].accepted - ) - const isAccepted = acceptedItemId ? true : false - const acceptedSuggestion = session.suggestions.find(s => s.itemId === acceptedItemId) - let addedLengthForEdits = 0 - let deletedLengthForEdits = 0 - if (acceptedSuggestion) { - codePercentageTracker.countSuccess(session.language) - if (session.suggestionType === SuggestionType.EDIT && acceptedSuggestion.content) { - // [acceptedSuggestion.insertText] will be undefined for NEP suggestion. Use [acceptedSuggestion.content] instead. - // Since [acceptedSuggestion.content] is in the form of a diff, transform the content into addedCharacters and deletedCharacters. - const { addedLines, deletedLines } = getAddedAndDeletedLines(acceptedSuggestion.content) - const charDiffResult = getCharacterDifferences(addedLines, deletedLines) - addedLengthForEdits = charDiffResult.charactersAdded - deletedLengthForEdits = charDiffResult.charactersRemoved - - codePercentageTracker.countAcceptedTokensUsingCount( - session.language, - charDiffResult.charactersAdded - ) - codePercentageTracker.addTotalTokensForEdits(session.language, charDiffResult.charactersAdded) - enqueueCodeDiffEntry(session, acceptedSuggestion, addedLines.join('\n')) - } else if (acceptedSuggestion.insertText) { - codePercentageTracker.countAcceptedTokens(session.language, acceptedSuggestion.insertText) - codePercentageTracker.countTotalTokens(session.language, acceptedSuggestion.insertText, true) - - enqueueCodeDiffEntry(session, acceptedSuggestion) - } - } - - // Handle rejected edit predictions - if (isInlineEdit && !isAccepted) { - // Find all rejected suggestions in this session - const rejectedSuggestions = session.suggestions.filter(suggestion => { - const result = completionSessionResult[suggestion.itemId] - return result && result.seen && !result.accepted - }) - - // Record each rejected edit - for (const rejectedSuggestion of rejectedSuggestions) { - if (rejectedSuggestion.content) { - rejectedEditTracker.recordRejectedEdit({ - content: rejectedSuggestion.content, - timestamp: Date.now(), - documentUri: session.document.uri, - position: session.startPosition, - }) - - logging.debug( - `[EDIT_PREDICTION] Recorded rejected edit: ${rejectedSuggestion.content.substring(0, 20)}...` - ) - } - } - } - - session.setClientResultData( - completionSessionResult, - firstCompletionDisplayLatency, - totalSessionDisplayTime, - typeaheadLength - ) - - if (firstCompletionDisplayLatency) emitPerceivedLatencyTelemetry(telemetry, session) - - // Always emit user trigger decision at session close - sessionManager.closeSession(session) - const streakLength = editsEnabled ? sessionManager.getAndUpdateStreakLength(isAccepted) : 0 - await emitUserTriggerDecisionTelemetry( - telemetry, - telemetryService, - session, - timeSinceLastUserModification, - addedLengthForEdits, - deletedLengthForEdits, - addedDiagnostics, - removedDiagnostics, - streakLength, - Object.keys(params.completionSessionResult)[0] - ) - } + let sessionResultsHandler: SessionResultsHandler const updateConfiguration = (updatedConfig: AmazonQWorkspaceConfig) => { logging.debug('Updating configuration of inline complete server.') @@ -722,7 +95,7 @@ export const CodewhispererServerFactory = } const onInitializedHandler = async () => { - amazonQServiceManager = serviceManager() + amazonQServiceManager = serviceManager(credentialsProvider) const clientParams = safeGet( lsp.getClientInitializeParams(), @@ -737,7 +110,9 @@ export const CodewhispererServerFactory = ?.inlineCompletionWithReferences?.inlineEditSupport ?? false telemetryService = new TelemetryService(amazonQServiceManager, credentialsProvider, telemetry, logging) - telemetryService.updateUserContext(makeUserContextObject(clientParams, runtime.platform, 'INLINE')) + telemetryService.updateUserContext( + makeUserContextObject(clientParams, runtime.platform, 'INLINE', amazonQServiceManager.serverInfo) + ) codePercentageTracker = new CodePercentageTracker(telemetryService) codeDiffTracker = new CodeDiffTracker( @@ -785,6 +160,38 @@ export const CodewhispererServerFactory = telemetryService, credentialsProvider ) + + inlineCompletionHandler = new InlineCompletionHandler( + logging, + workspace, + amazonQServiceManager, + completionSessionManager, + codePercentageTracker, + userWrittenCodeTracker, + recentEditTracker, + cursorTracker, + streakTracker, + telemetry, + telemetryService, + credentialsProvider, + () => editsEnabled, + () => timeSinceLastUserModification, + lsp + ) + + sessionResultsHandler = new SessionResultsHandler( + logging, + telemetry, + telemetryService, + completionSessionManager, + editSessionManager, + codePercentageTracker, + codeDiffTracker, + rejectedEditTracker, + streakTracker, + () => editsEnabled, + () => timeSinceLastUserModification + ) } const onEditCompletion = async ( @@ -796,7 +203,9 @@ export const CodewhispererServerFactory = lsp.extensions.onInlineCompletionWithReferences(onInlineCompletionHandler) lsp.extensions.onEditCompletion(onEditCompletion) - lsp.extensions.onLogInlineCompletionSessionResults(onLogInlineCompletionSessionResultsHandler) + lsp.extensions.onLogInlineCompletionSessionResults(async params => { + await sessionResultsHandler.handleSessionResults(params) + }) lsp.onInitialized(onInitializedHandler) lsp.onDidChangeTextDocument(async p => { @@ -827,9 +236,9 @@ export const CodewhispererServerFactory = // Record last user modification time for any document if (lastUserModificationTime) { - timeSinceLastUserModification = new Date().getTime() - lastUserModificationTime + timeSinceLastUserModification = Date.now() - lastUserModificationTime } - lastUserModificationTime = new Date().getTime() + lastUserModificationTime = Date.now() documentChangedListener.onDocumentChanged(p) editCompletionHandler.documentChanged() @@ -889,29 +298,10 @@ export const CodewhispererServerFactory = } } +// Dynamic service manager factory that detects auth type at runtime +export const CodeWhispererServer = CodewhispererServerFactory((credentialsProvider?: any) => { + return isUsingIAMAuth(credentialsProvider) ? getOrThrowBaseIAMServiceManager() : getOrThrowBaseTokenServiceManager() +}) + export const CodeWhispererServerIAM = CodewhispererServerFactory(getOrThrowBaseIAMServiceManager) export const CodeWhispererServerToken = CodewhispererServerFactory(getOrThrowBaseTokenServiceManager) - -const getLanguageIdFromUri = (uri: string, logging?: any): string => { - try { - const extension = uri.split('.').pop()?.toLowerCase() - return ABAP_EXTENSIONS.has(extension || '') ? 'abap' : '' - } catch (err) { - logging?.log(`Error parsing URI to determine language: ${uri}: ${err}`) - return '' - } -} - -const getTextDocument = async (uri: string, workspace: any, logging: any): Promise => { - let textDocument = await workspace.getTextDocument(uri) - if (!textDocument) { - try { - const content = await workspace.fs.readFile(URI.parse(uri).fsPath) - const languageId = getLanguageIdFromUri(uri) - textDocument = TextDocument.create(uri, languageId, 0, content) - } catch (err) { - logging.log(`Unable to load from ${uri}: ${err}`) - } - } - return textDocument -} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/constants.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/contants/constants.ts similarity index 93% rename from server/aws-lsp-codewhisperer/src/language-server/inline-completion/constants.ts rename to server/aws-lsp-codewhisperer/src/language-server/inline-completion/contants/constants.ts index c5810924b6..8cab372053 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/constants.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/contants/constants.ts @@ -3,7 +3,6 @@ export const FILENAME_CHARS_LIMIT = 1024 export const CONTEXT_CHARACTERS_LIMIT = 10240 export const EMPTY_RESULT = { sessionId: '', items: [] } export const EDIT_DEBOUNCE_INTERVAL_MS = 500 -export const EDIT_STALE_RETRY_COUNT = 3 // ABAP ADT extensions commonly used with Eclipse export const ABAP_EXTENSIONS = new Set([ 'asprog', diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/diffUtils.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/diffUtils.ts deleted file mode 100644 index 0899dd5e46..0000000000 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/diffUtils.ts +++ /dev/null @@ -1,323 +0,0 @@ -/*! - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -import * as diff from 'diff' -import { CodeWhispererSupplementalContext, CodeWhispererSupplementalContextItem } from '../../shared/models/model' -import { trimSupplementalContexts } from '../../shared/supplementalContextUtil/supplementalContextUtil' - -/** - * Generates a unified diff format between old and new file contents - * - * @param oldFilePath - Path to the old version of the file - * @param newFilePath - Path to the new version of the file - * @param oldContent - Content of the old version - * @param newContent - Content of the new version - * @param oldTimestamp - Timestamp of the old version - * @param newTimestamp - Timestamp of the new version - * @param contextSize - Number of context lines to include in the diff - * @returns Unified diff string - */ -export function generateUnifiedDiffWithTimestamps( - oldFilePath: string, - newFilePath: string, - oldContent: string, - newContent: string, - oldTimestamp: number, - newTimestamp: number, - contextSize: number = 3 -): string { - const patchResult = diff.createTwoFilesPatch( - oldFilePath, - newFilePath, - oldContent, - newContent, - String(oldTimestamp), - String(newTimestamp), - { context: contextSize } - ) - - // Remove unused headers - const lines = patchResult.split('\n') - if (lines.length >= 2 && lines[0].startsWith('Index:')) { - lines.splice(0, 2) - return lines.join('\n') - } - - return patchResult -} - -/** - * Represents a snapshot content of a file at a specific point in time - */ -export interface FileSnapshotContent { - /** URI of the file */ - readonly filePath: string - /** Content of the file */ - readonly content: string - /** Timestamp when the snapshot was taken */ - readonly timestamp: number -} - -/** - * Generates supplemental contexts from snapshot contents and current content - * - * @param filePath - Path to the file - * @param currentContent - Current content of the file - * @param snapshotContents - List of snapshot contents sorted by timestamp (oldest first) - * @param maxContexts - Maximum number of supplemental contexts to return - * @returns CodeWhispererSupplementalContext object containing diffs between snapshots and current content - */ -export function generateDiffContexts( - filePath: string, - currentContent: string, - snapshotContents: FileSnapshotContent[], - maxContexts: number -): CodeWhispererSupplementalContext { - if (snapshotContents.length === 0) { - return { - isUtg: false, - isProcessTimeout: false, - supplementalContextItems: [], - contentsLength: 0, - latency: 0, - strategy: 'recentEdits', - } - } - - const startTime = Date.now() - const supplementalContextItems: CodeWhispererSupplementalContextItem[] = [] - const currentTimestamp = Date.now() - - // Process snapshots from newest to oldest - for (let i = snapshotContents.length - 1; i >= 0; i--) { - const snapshot = snapshotContents[i] - try { - const unifiedDiff = generateUnifiedDiffWithTimestamps( - snapshot.filePath, - filePath, - snapshot.content, - currentContent, - snapshot.timestamp, - currentTimestamp - ) - - // Only add non-empty diffs - if (unifiedDiff.trim().length > 0) { - supplementalContextItems.push({ - filePath: snapshot.filePath, - content: unifiedDiff, - score: 1.0, // Default score for recent edits - }) - } - } catch (err) { - // TODO: logging - // console.error(`Failed to generate diff: ${err}`) - } - } - - const trimmedContextItems = trimSupplementalContexts(supplementalContextItems, maxContexts) - const contentsLength = trimmedContextItems.reduce((sum, ctx) => sum + ctx.content.length, 0) - const latency = Date.now() - startTime - - return { - isUtg: false, - isProcessTimeout: false, - supplementalContextItems: trimmedContextItems, - contentsLength, - latency, - strategy: 'recentEdits', - } -} - -/** src: https://github.com/aws/aws-toolkit-vscode/blob/3921457b0a2094b831beea0d66cc2cbd2a833890/packages/amazonq/src/app/inline/EditRendering/diffUtils.ts#L18 - * Apply a unified diff to original code to generate modified code - * @param originalCode The original code as a string - * @param unifiedDiff The unified diff content - * @returns The modified code after applying the diff - */ -export function applyUnifiedDiff(docText: string, unifiedDiff: string): string { - try { - // First try the standard diff package - try { - const result = diff.applyPatch(docText, unifiedDiff) - if (result !== false) { - return result - } - } catch (error) {} - - // Parse the unified diff to extract the changes - const diffLines = unifiedDiff.split('\n') - let result = docText - - // Find all hunks in the diff - const hunkStarts = diffLines - .map((line, index) => (line.startsWith('@@ ') ? index : -1)) - .filter(index => index !== -1) - - // Process each hunk - for (const hunkStart of hunkStarts) { - // Parse the hunk header - const hunkHeader = diffLines[hunkStart] - const match = hunkHeader.match(/@@ -(\d+),(\d+) \+(\d+),(\d+) @@/) - - if (!match) { - continue - } - - const oldStart = parseInt(match[1]) - const oldLines = parseInt(match[2]) - - // Extract the content lines for this hunk - let i = hunkStart + 1 - const contentLines = [] - while (i < diffLines.length && !diffLines[i].startsWith('@@')) { - contentLines.push(diffLines[i]) - i++ - } - - // Build the old and new text - let oldText = '' - let newText = '' - - for (const line of contentLines) { - if (line.startsWith('-')) { - oldText += line.substring(1) + '\n' - } else if (line.startsWith('+')) { - newText += line.substring(1) + '\n' - } else if (line.startsWith(' ')) { - oldText += line.substring(1) + '\n' - newText += line.substring(1) + '\n' - } - } - - // Remove trailing newline if it was added - oldText = oldText.replace(/\n$/, '') - newText = newText.replace(/\n$/, '') - - // Find the text to replace in the document - const docLines = docText.split('\n') - const startLine = oldStart - 1 // Convert to 0-based - const endLine = startLine + oldLines - - // Extract the text that should be replaced - const textToReplace = docLines.slice(startLine, endLine).join('\n') - - // Replace the text - result = result.replace(textToReplace, newText) - } - return result - } catch (error) { - return docText // Return original text if all methods fail - } -} - -export function getAddedAndDeletedLines(unifiedDiff: string): { addedLines: string[]; deletedLines: string[] } { - const lines = unifiedDiff.split('\n') - const addedLines = lines.filter(line => line.startsWith('+') && !line.startsWith('+++')).map(line => line.slice(1)) - const deletedLines = lines - .filter(line => line.startsWith('-') && !line.startsWith('---')) - .map(line => line.slice(1)) - return { - addedLines, - deletedLines, - } -} - -// src https://github.com/aws/aws-toolkit-vscode/blob/3921457b0a2094b831beea0d66cc2cbd2a833890/packages/amazonq/src/app/inline/EditRendering/diffUtils.ts#L147 -export function getAddedAndDeletedChars(unifiedDiff: string): { - addedCharacters: string - deletedCharacters: string -} { - let addedCharacters = '' - let deletedCharacters = '' - const lines = unifiedDiff.split('\n') - for (let i = 0; i < lines.length; i++) { - const line = lines[i] - if (line.startsWith('+') && !line.startsWith('+++')) { - addedCharacters += line.slice(1) - } else if (line.startsWith('-') && !line.startsWith('---')) { - const removedLine = line.slice(1) - - // Check if this is a modified line rather than a pure deletion - const nextLine = lines[i + 1] - if (nextLine && nextLine.startsWith('+') && !nextLine.startsWith('+++')) { - // This is a modified line, not a pure deletion - // We've already counted the deletion, so we'll just increment i to skip the next line - // since we'll process the addition on the next iteration - const addedLine = nextLine.slice(1) - const changes = diff.diffChars(removedLine, addedLine) - for (const part of changes) { - if (part.removed) { - deletedCharacters += part.value - } else if (part.added) { - addedCharacters += part.value - } - } - i += 1 - } else { - deletedCharacters += removedLine - } - } - } - return { - addedCharacters, - deletedCharacters, - } -} - -/** - * Calculate character differences between added and deleted text blocks using LCS - */ -export interface CharDiffResult { - charactersAdded: number - charactersRemoved: number -} - -/** - * Find longest common subsequence length between two strings - */ -function lcsLength(str1: string, str2: string): number[][] { - const m = str1.length - const n = str2.length - const dp = Array(m + 1) - .fill(null) - .map(() => Array(n + 1).fill(0)) - - for (let i = 1; i <= m; i++) { - for (let j = 1; j <= n; j++) { - if (str1[i - 1] === str2[j - 1]) { - dp[i][j] = dp[i - 1][j - 1] + 1 - } else { - dp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]) - } - } - } - - return dp -} - -/** - * Calculate character differences between added and deleted blocks - */ -export function getCharacterDifferences(addedLines: string[], deletedLines: string[]): CharDiffResult { - const addedText = addedLines.join('\n') - const deletedText = deletedLines.join('\n') - - if (addedText.length === 0) { - return { charactersAdded: 0, charactersRemoved: deletedText.length } - } - - if (deletedText.length === 0) { - return { charactersAdded: addedText.length, charactersRemoved: 0 } - } - - const lcsTable = lcsLength(deletedText, addedText) - const lcsLen = lcsTable[deletedText.length][addedText.length] - - return { - charactersAdded: addedText.length - lcsLen, - charactersRemoved: deletedText.length - lcsLen, - } -} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/editCompletionHandler.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/editCompletionHandler.test.ts new file mode 100644 index 0000000000..ae6663a3a1 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/editCompletionHandler.test.ts @@ -0,0 +1,516 @@ +import * as assert from 'assert' +import { EditCompletionHandler } from './editCompletionHandler' +import { InlineCompletionTriggerKind, TextDocument, CancellationToken } from '@aws/language-server-runtimes/protocol' +import { EMPTY_RESULT } from '../contants/constants' +import * as sinon from 'sinon' +import { CodeWhispererSession, SessionData, SessionManager } from '../session/sessionManager' +import { HELLO_WORLD_IN_CSHARP } from '../../../shared/testUtils' +import { CodeWhispererServiceToken } from '../../../shared/codeWhispererService' +import * as EditAutotrigger from '../auto-trigger/editPredictionAutoTrigger' + +describe('EditCompletionHandler', () => { + let handler: EditCompletionHandler + let sessionManager: SessionManager + let logging: any + let workspace: any + let amazonQServiceManager: any + let cursorTracker: any + let recentEditsTracker: any + let rejectedEditTracker: any + let telemetry: any + let telemetryService: any + let credentialsProvider: any + let codeWhispererService: any + let documentChangedListener: any + + const requestContext = { + maxResults: 5, + fileContext: { + filename: 'SomeFile', + programmingLanguage: { languageName: 'csharp' }, + leftFileContent: 'LeftFileContent', + rightFileContent: 'RightFileContent', + }, + } + + const data: SessionData = { + document: TextDocument.create('file:///rightContext.cs', 'csharp', 1, HELLO_WORLD_IN_CSHARP), + startPreprocessTimestamp: 0, + startPosition: { line: 0, character: 0 }, + triggerType: 'OnDemand', + language: 'csharp', + requestContext: requestContext, + autoTriggerType: 'Enter', + } + + beforeEach(() => { + SessionManager.reset() + sessionManager = SessionManager.getInstance('EDITS') + logging = { info: sinon.stub(), warn: sinon.stub(), log: sinon.stub(), debug: sinon.stub() } + workspace = { getTextDocument: sinon.stub(), getWorkspaceFolder: sinon.stub() } + codeWhispererService = { + generateSuggestions: sinon.stub(), + constructSupplementalContext: sinon.stub(), + customizationArn: undefined, + } + amazonQServiceManager = { getCodewhispererService: sinon.stub().returns(codeWhispererService) } + cursorTracker = { trackPosition: sinon.stub() } + recentEditsTracker = { generateEditBasedContext: sinon.stub() } + rejectedEditTracker = { isSimilarToRejected: sinon.stub().returns(false) } + telemetry = { emitMetric: sinon.stub() } + telemetryService = { emitUserTriggerDecision: sinon.stub() } + credentialsProvider = { getConnectionMetadata: sinon.stub() } + documentChangedListener = { documentChanged: sinon.stub(), timeSinceLastUserModification: 1000 } + + const clientMetadata = { + processId: 123, + rootUri: null, + capabilities: {}, + initializationOptions: { + aws: { + awsClientCapabilities: { + textDocument: { + inlineCompletionWithReferences: { + inlineEditSupport: true, + }, + }, + }, + }, + }, + } + + handler = new EditCompletionHandler( + logging, + clientMetadata, + workspace, + amazonQServiceManager, + sessionManager, + cursorTracker, + recentEditsTracker, + rejectedEditTracker, + documentChangedListener, + telemetry, + telemetryService, + credentialsProvider + ) + + // Make service a token service by default + Object.setPrototypeOf(codeWhispererService, CodeWhispererServiceToken.prototype) + }) + + afterEach(() => { + sinon.restore() + SessionManager.reset() + }) + + describe('onEditCompletion', () => { + it('should return empty result when in progress', async () => { + handler['isInProgress'] = true + const params = { + textDocument: { uri: 'test.ts' }, + position: { line: 0, character: 0 }, + context: { triggerKind: InlineCompletionTriggerKind.Automatic }, + } + + const result = await handler.onEditCompletion(params as any, {} as any) + + assert.deepEqual(result, EMPTY_RESULT) + sinon.assert.calledWith(logging.info, 'editCompletionHandler is WIP, skip the request') + }) + + it('should return empty result when text document not found', async () => { + workspace.getTextDocument.resolves(null) + const params = { + textDocument: { uri: 'test.ts' }, + position: { line: 0, character: 0 }, + context: { triggerKind: InlineCompletionTriggerKind.Automatic }, + } + + const result = await handler.onEditCompletion(params as any, {} as any) + + assert.deepEqual(result, EMPTY_RESULT) + sinon.assert.calledWith(logging.warn, 'textDocument [test.ts] not found') + }) + + it('should return empty result when service is not token service', async () => { + const textDocument = { languageId: 'typescript' } + workspace.getTextDocument.resolves(textDocument) + amazonQServiceManager.getCodewhispererService.returns({}) + + const params = { + textDocument: { uri: 'test.ts' }, + position: { line: 0, character: 0 }, + context: { triggerKind: InlineCompletionTriggerKind.Automatic }, + } + + const result = await handler.onEditCompletion(params as any, CancellationToken.None) + + assert.deepEqual(result, EMPTY_RESULT) + }) + + it('should return empty result when language not supported', async () => { + const textDocument = { languageId: 'unsupported', uri: 'test.xyz' } + workspace.getTextDocument.resolves(textDocument) + + const params = { + textDocument: { uri: 'test.xyz' }, + position: { line: 0, character: 0 }, + context: { triggerKind: InlineCompletionTriggerKind.Automatic }, + } + + const result = await handler.onEditCompletion(params as any, CancellationToken.None) + + assert.deepEqual(result, EMPTY_RESULT) + sinon.assert.calledWith(logging.log, sinon.match('not supported')) + }) + + it('should handle partial result token with existing session', async () => { + const textDocument = { languageId: 'typescript', uri: 'test.ts' } + workspace.getTextDocument.resolves(textDocument) + sessionManager.createSession(data) + const currentSession = sessionManager.getCurrentSession() + if (currentSession) { + sessionManager.activateSession(currentSession) + } + + codeWhispererService.generateSuggestions.resolves({ + suggestions: [{ itemId: 'item-1', content: 'test' }], + responseContext: { requestId: 'req-1', nextToken: null }, + }) + + const params = { + textDocument: { uri: 'test.ts' }, + position: { line: 0, character: 0 }, + context: { triggerKind: InlineCompletionTriggerKind.Automatic }, + partialResultToken: 'token123', + } + + const result = await handler.onEditCompletion(params as any, CancellationToken.None) + + assert.strictEqual(result.items.length, 1) + assert.strictEqual(currentSession?.state, 'DISCARD') + }) + + it('should handle error in partial result token request', async () => { + const textDocument = { languageId: 'typescript', uri: 'test.ts' } + workspace.getTextDocument.resolves(textDocument) + + sessionManager.createSession(data) + + codeWhispererService.generateSuggestions.rejects(new Error('API Error')) + + const params = { + textDocument: { uri: 'test.ts' }, + position: { line: 0, character: 0 }, + context: { triggerKind: InlineCompletionTriggerKind.Automatic }, + partialResultToken: 'token123', + } + + const result = await handler.onEditCompletion(params as any, CancellationToken.None) + + assert.deepEqual(result, EMPTY_RESULT) + }) + + it('should track cursor position when available', async () => { + workspace.getTextDocument.resolves(null) + + const params = { + textDocument: { uri: 'test.ts' }, + position: { line: 5, character: 10 }, + context: { triggerKind: InlineCompletionTriggerKind.Automatic }, + } + + await handler.onEditCompletion(params as any, CancellationToken.None) + + sinon.assert.calledWith(cursorTracker.trackPosition, 'test.ts', { line: 5, character: 10 }) + }) + }) + + describe.skip('documentChanged', () => { + it('should set hasDocumentChangedSinceInvocation when waiting', () => { + handler['debounceTimeout'] = setTimeout(() => {}, 1000) as any + handler['isWaiting'] = true + + handler.documentChanged() + + assert.strictEqual(handler['hasDocumentChangedSinceInvocation'], true) + }) + + it('should refresh timeout when not waiting', () => { + const timeout = { refresh: sinon.stub() } + handler['debounceTimeout'] = timeout as any + handler['isWaiting'] = false + + handler.documentChanged() + + sinon.assert.called(timeout.refresh) + }) + + it('should do nothing when no timeout exists', () => { + handler['debounceTimeout'] = undefined + + assert.doesNotThrow(() => handler.documentChanged()) + }) + }) + + describe('processSuggestionResponse', () => { + it('should filter out similar rejected suggestions', async () => { + rejectedEditTracker.isSimilarToRejected.returns(true) + const session = new CodeWhispererSession(data) + const suggestionResponse = { + suggestions: [{ itemId: 'item-1', content: 'test content' }], + responseContext: { requestId: 'req-1', nextToken: null }, + } + + const result = await handler.processSuggestionResponse(suggestionResponse as any, session as any, true) + + assert.strictEqual(result.items.length, 0) + assert.strictEqual(session.getSuggestionState('item-1'), 'Reject') + }) + + it('should return suggestions when not rejected', async () => { + const session = new CodeWhispererSession(data) + const suggestionResponse = { + suggestions: [{ itemId: 'item-1', content: 'test content' }], + responseContext: { requestId: 'req-1', nextToken: null }, + } + + const result = await handler.processSuggestionResponse(suggestionResponse as any, session as any, true) + + assert.strictEqual(result.items.length, 1) + assert.strictEqual(result.items[0].insertText, 'test content') + assert.strictEqual(result.items[0].isInlineEdit, true) + }) + + it('should handle empty suggestions response', async () => { + telemetryService.emitUserTriggerDecision.resolves() + const session = new CodeWhispererSession(data) + const suggestionResponse = { + suggestions: [], + responseContext: { requestId: 'req-1', nextToken: null }, + } + + const result = await handler.processSuggestionResponse(suggestionResponse as any, session, true) + + assert.deepEqual(result, EMPTY_RESULT) + }) + + it('should handle session with discardInflightSessionOnNewInvocation flag', async () => { + const session = new CodeWhispererSession(data) + session.discardInflightSessionOnNewInvocation = true + + const suggestionResponse = { + suggestions: [{ itemId: 'item-1', content: 'test content' }], + responseContext: { requestId: 'req-1', nextToken: null }, + } + + await handler.processSuggestionResponse(suggestionResponse as any, session, true) + + assert.strictEqual(session.state, 'DISCARD') + assert.strictEqual(session.discardInflightSessionOnNewInvocation, false) + }) + + it('should append suggestions for non-new session', async () => { + const session = new CodeWhispererSession(data) + session.suggestions = [{ itemId: 'existing', content: 'existing' }] + + const suggestionResponse = { + suggestions: [{ itemId: 'item-1', content: 'test content' }], + responseContext: { requestId: 'req-1', nextToken: null }, + } + + await handler.processSuggestionResponse(suggestionResponse as any, session, false) + + assert.strictEqual(session.suggestions.length, 2) + assert.strictEqual(session.suggestions[1].itemId, 'item-1') + }) + }) + + describe('_invoke', () => { + const textDocument = { + languageId: 'typescript', + uri: 'test.ts', + getText: () => 'content', + positionAt: sinon.stub(), + } + const params = { + textDocument: textDocument, + position: { line: 0, character: 0 }, + context: { triggerKind: InlineCompletionTriggerKind.Automatic }, + } + + afterEach('teardown', function () { + sinon.restore() + }) + + function aTriggerStub(flag: boolean): EditAutotrigger.EditClassifier { + return { + shouldTriggerEdits: sinon + .stub() + .returns({ score: 0, threshold: EditAutotrigger.EditClassifier.THRESHOLD, shouldTrigger: flag }), + } as any as EditAutotrigger.EditClassifier + } + + it('should return empty result when shouldTriggerEdits returns false', async () => { + workspace.getWorkspaceFolder.returns(undefined) + + const shouldTriggerEditsStub = sinon + .stub(require('../utils/triggerUtils'), 'shouldTriggerEdits') + .returns(false) + sinon.stub(EditAutotrigger, 'EditClassifier').returns(aTriggerStub(false)) + + const result = await handler._invoke( + params as any, + Date.now(), + CancellationToken.None, + textDocument as any, + 'typescript', + undefined + ) + + assert.deepEqual(result, EMPTY_RESULT) + shouldTriggerEditsStub.restore() + }) + + it('should create session and call generateSuggestions when trigger is valid', async () => { + workspace.getWorkspaceFolder.returns(undefined) + + sinon.stub(EditAutotrigger, 'EditClassifier').returns(aTriggerStub(true)) + const shouldTriggerEditsStub = sinon + .stub(require('../utils/triggerUtils'), 'shouldTriggerEdits') + .returns(true) + codeWhispererService.constructSupplementalContext.resolves(null) + codeWhispererService.generateSuggestions.resolves({ + suggestions: [{ itemId: 'item-1', content: 'test content' }], + responseContext: { requestId: 'req-1', nextToken: null }, + }) + + const result = await handler._invoke( + params as any, + Date.now(), + CancellationToken.None, + textDocument as any, + 'typescript', + undefined + ) + + assert.strictEqual(result.items.length, 1) + sinon.assert.called(codeWhispererService.generateSuggestions) + + shouldTriggerEditsStub.restore() + }) + + it('should handle active session and emit telemetry', async () => { + workspace.getWorkspaceFolder.returns(undefined) + + sessionManager.createSession(data) + const currentSession = sessionManager.getCurrentSession() + if (currentSession) { + sessionManager.activateSession(currentSession) + } + const shouldTriggerEditsStub = sinon + .stub(require('../utils/triggerUtils'), 'shouldTriggerEdits') + .returns(true) + sinon.stub(EditAutotrigger, 'EditClassifier').returns(aTriggerStub(true)) + codeWhispererService.constructSupplementalContext.resolves(null) + codeWhispererService.generateSuggestions.resolves({ + suggestions: [{ itemId: 'item-1', content: 'test content' }], + responseContext: { requestId: 'req-1', nextToken: null }, + }) + + await handler._invoke( + params as any, + Date.now(), + CancellationToken.None, + textDocument as any, + 'typescript', + currentSession + ) + + assert.strictEqual(currentSession?.state, 'DISCARD') + + shouldTriggerEditsStub.restore() + }) + + it('should handle supplemental context when available', async () => { + workspace.getWorkspaceFolder.returns(undefined) + + const shouldTriggerEditsStub = sinon + .stub(require('../utils/triggerUtils'), 'shouldTriggerEdits') + .returns(true) + sinon.stub(EditAutotrigger, 'EditClassifier').returns(aTriggerStub(true)) + codeWhispererService.constructSupplementalContext.resolves({ + items: [{ content: 'context', filePath: 'file.ts' }], + supContextData: { isUtg: false }, + }) + codeWhispererService.generateSuggestions.resolves({ + suggestions: [{ itemId: 'item-1', content: 'test content' }], + responseContext: { requestId: 'req-1', nextToken: null }, + }) + + await handler._invoke( + params as any, + Date.now(), + CancellationToken.None, + textDocument as any, + 'typescript', + undefined + ) + + sinon.assert.calledWith(codeWhispererService.generateSuggestions, sinon.match.has('supplementalContexts')) + + shouldTriggerEditsStub.restore() + }) + }) + + describe('handleSuggestionsErrors', () => { + it('should handle generic error and return empty result', () => { + const session = new CodeWhispererSession(data) + const error = new Error('Generic error') + const emitServiceInvocationFailureStub = sinon.stub( + require('../telemetry/telemetry'), + 'emitServiceInvocationFailure' + ) + + const result = handler.handleSuggestionsErrors(error, session) + + assert.deepEqual(result, EMPTY_RESULT) + assert.strictEqual(session.state, 'CLOSED') + sinon.assert.calledWith(logging.log, sinon.match('Recommendation failure')) + sinon.assert.calledWith(emitServiceInvocationFailureStub, telemetry, session, error) + emitServiceInvocationFailureStub.restore() + }) + + it('should handle connection expired error and return empty result', () => { + const session = new CodeWhispererSession(data) + const error = new Error('ExpiredTokenException') + + const result = handler.handleSuggestionsErrors(error, session) + + assert.strictEqual(session.state, 'CLOSED') + }) + + it('should handle AmazonQError and throw ResponseError with error code', () => { + const session = new CodeWhispererSession(data) + const { AmazonQError } = require('../../../shared/amazonQServiceManager/errors') + const error = new AmazonQError('Service error', '500') + + assert.throws(() => { + handler.handleSuggestionsErrors(error, session) + }) + + assert.strictEqual(session.state, 'CLOSED') + }) + + it('should handle error without message', () => { + const session = new CodeWhispererSession(data) + const error = new Error() + error.message = '' + + const result = handler.handleSuggestionsErrors(error, session) + + assert.deepEqual(result, EMPTY_RESULT) + assert.strictEqual(session.state, 'CLOSED') + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/editCompletionHandler.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/editCompletionHandler.ts similarity index 68% rename from server/aws-lsp-codewhisperer/src/language-server/inline-completion/editCompletionHandler.ts rename to server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/editCompletionHandler.ts index 3c72e368f4..d852dac1d1 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/editCompletionHandler.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/editCompletionHandler.ts @@ -9,7 +9,7 @@ import { ResponseError, TextDocument, } from '@aws/language-server-runtimes/protocol' -import { RecentEditTracker } from './tracker/codeEditTracker' +import { RecentEditTracker } from '../tracker/codeEditTracker' import { CredentialsProvider, Logging, Telemetry, Workspace } from '@aws/language-server-runtimes/server-interface' import { CodeWhispererServiceToken, @@ -17,32 +17,38 @@ import { GenerateSuggestionsResponse, getFileContext, SuggestionType, -} from '../../shared/codeWhispererService' -import { CodeWhispererSession, SessionManager } from './session/sessionManager' -import { CursorTracker } from './tracker/cursorTracker' -import { CodewhispererLanguage, getSupportedLanguageId } from '../../shared/languageDetection' -import { WorkspaceFolderManager } from '../workspaceContext/workspaceFolderManager' -import { shouldTriggerEdits } from './trigger' +} from '../../../shared/codeWhispererService' +import { CodeWhispererSession, SessionManager } from '../session/sessionManager' +import { CursorTracker } from '../tracker/cursorTracker' +import { CodewhispererLanguage, getSupportedLanguageId } from '../../../shared/languageDetection' +import { WorkspaceFolderManager } from '../../workspaceContext/workspaceFolderManager' +import { inferTriggerChar, shouldTriggerEdits } from '../utils/triggerUtils' import { + emitEmptyUserTriggerDecisionTelemetry, emitServiceInvocationFailure, emitServiceInvocationTelemetry, emitUserTriggerDecisionTelemetry, -} from './telemetry' -import { TelemetryService } from '../../shared/telemetry/telemetryService' -import { mergeEditSuggestionsWithFileContext } from './mergeRightUtils' +} from '../telemetry/telemetry' +import { TelemetryService } from '../../../shared/telemetry/telemetryService' import { textUtils } from '@aws/lsp-core' -import { AmazonQBaseServiceManager } from '../../shared/amazonQServiceManager/BaseAmazonQServiceManager' -import { RejectedEditTracker } from './tracker/rejectedEditTracker' -import { getErrorMessage, hasConnectionExpired } from '../../shared/utils' -import { AmazonQError, AmazonQServiceConnectionExpiredError } from '../../shared/amazonQServiceManager/errors' -import { DocumentChangedListener } from './documentChangedListener' -import { EMPTY_RESULT, EDIT_DEBOUNCE_INTERVAL_MS, EDIT_STALE_RETRY_COUNT } from './constants' +import { AmazonQBaseServiceManager } from '../../../shared/amazonQServiceManager/BaseAmazonQServiceManager' +import { RejectedEditTracker } from '../tracker/rejectedEditTracker' +import { getErrorMessage, hasConnectionExpired } from '../../../shared/utils' +import { AmazonQError, AmazonQServiceConnectionExpiredError } from '../../../shared/amazonQServiceManager/errors' +import { DocumentChangedListener } from '../documentChangedListener' +import { EMPTY_RESULT } from '../contants/constants' +import { StreakTracker } from '../tracker/streakTracker' +import { processEditSuggestion } from '../utils/diffUtils' +import { EditClassifier } from '../auto-trigger/editPredictionAutoTrigger' export class EditCompletionHandler { private readonly editsEnabled: boolean private debounceTimeout: NodeJS.Timeout | undefined private isWaiting: boolean = false private hasDocumentChangedSinceInvocation: boolean = false + private readonly streakTracker: StreakTracker + + private isInProgress = false constructor( readonly logging: Logging, @@ -61,6 +67,7 @@ export class EditCompletionHandler { this.editsEnabled = this.clientMetadata.initializationOptions?.aws?.awsClientCapabilities?.textDocument ?.inlineCompletionWithReferences?.inlineEditSupport ?? false + this.streakTracker = StreakTracker.getInstance() } get codeWhispererService() { @@ -73,22 +80,25 @@ export class EditCompletionHandler { * Also as a followup, ideally it should be a message/event publish/subscribe pattern instead of manual invocation like this */ documentChanged() { - if (this.debounceTimeout) { - this.logging.info('[NEP] refresh timeout') - this.debounceTimeout.refresh() - } - - if (this.isWaiting) { - this.hasDocumentChangedSinceInvocation = true - } + // TODO: Remove this entirely once we are sure we dont need debounce + // if (this.debounceTimeout) { + // if (this.isWaiting) { + // this.hasDocumentChangedSinceInvocation = true + // } else { + // this.logging.info(`refresh and debounce edits suggestion for another ${EDIT_DEBOUNCE_INTERVAL_MS}`) + // this.debounceTimeout.refresh() + // } + // } } async onEditCompletion( params: InlineCompletionWithReferencesParams, token: CancellationToken ): Promise { - this.hasDocumentChangedSinceInvocation = false - this.debounceTimeout = undefined + if (this.isInProgress) { + this.logging.info(`editCompletionHandler is WIP, skip the request`) + return EMPTY_RESULT + } // On every new completion request close current inflight session. const currentSession = this.sessionManager.getCurrentSession() @@ -119,6 +129,10 @@ export class EditCompletionHandler { return EMPTY_RESULT } + // Not ideally to rely on a state, should improve it and simply make it a debounced API + this.isInProgress = true + const startPreprocessTimestamp = Date.now() + if (params.partialResultToken && currentSession) { // Close ACTIVE session. We shouldn't record Discard trigger decision for trigger with nextToken. if (currentSession && currentSession.state === 'ACTIVE') { @@ -128,6 +142,7 @@ export class EditCompletionHandler { const newSession = this.sessionManager.createSession({ document: textDocument, startPosition: params.position, + startPreprocessTimestamp: startPreprocessTimestamp, triggerType: 'AutoTrigger', language: currentSession.language, requestContext: currentSession.requestContext, @@ -153,53 +168,28 @@ export class EditCompletionHandler { ) } catch (error) { return this.handleSuggestionsErrors(error as Error, currentSession) + } finally { + this.isInProgress = false } } - // TODO: telemetry, discarded suggestions - // The other easy way to do this is simply not return any suggestion (which is used when retry > 3) - const invokeWithRetry = async (attempt: number = 0): Promise => { - return new Promise(async resolve => { - this.debounceTimeout = setTimeout(async () => { - try { - this.isWaiting = true - const result = await this._invoke( - params, - token, - textDocument, - inferredLanguageId, - currentSession - ).finally(() => { - this.isWaiting = false - }) - if (this.hasDocumentChangedSinceInvocation) { - if (attempt < EDIT_STALE_RETRY_COUNT) { - this.logging.info( - `EditCompletionHandler - Document changed during execution, retrying (attempt ${attempt + 1})` - ) - this.hasDocumentChangedSinceInvocation = false - const retryResult = await invokeWithRetry(attempt + 1) - resolve(retryResult) - } else { - this.logging.info('EditCompletionHandler - Max retries reached, returning empty result') - resolve(EMPTY_RESULT) - } - } else { - this.logging.info('EditCompletionHandler - No document changes, resolving result') - resolve(result) - } - } finally { - this.debounceTimeout = undefined - } - }, EDIT_DEBOUNCE_INTERVAL_MS) - }) + try { + return await this._invoke( + params, + startPreprocessTimestamp, + token, + textDocument, + inferredLanguageId, + currentSession + ) + } finally { + this.isInProgress = false } - - return invokeWithRetry() } async _invoke( params: InlineCompletionWithReferencesParams, + startPreprocessTimestamp: number, token: CancellationToken, textDocument: TextDocument, inferredLanguageId: CodewhispererLanguage, @@ -208,19 +198,36 @@ export class EditCompletionHandler { // Build request context const isAutomaticLspTriggerKind = params.context.triggerKind == InlineCompletionTriggerKind.Automatic const maxResults = isAutomaticLspTriggerKind ? 1 : 5 - const fileContext = getFileContext({ + const fileContextClss = getFileContext({ textDocument, inferredLanguageId, position: params.position, workspaceFolder: this.workspace.getWorkspaceFolder(textDocument.uri), }) + // TODO: Parametrize these to a util function, duplicate code as inineCompletionHandler + const triggerCharacters = inferTriggerChar(fileContextClss, params.documentChangeParams) + const workspaceState = WorkspaceFolderManager.getInstance()?.getWorkspaceState() const workspaceId = workspaceState?.webSocketClient?.isConnected() ? workspaceState.workspaceId : undefined - const qEditsTrigger = shouldTriggerEdits( + const recentEdits = await this.recentEditsTracker.generateEditBasedContext(textDocument) + + // TODO: Refactor and merge these 2 shouldTrigger into single one + const classifier = new EditClassifier( + { + fileContext: fileContextClss, + triggerChar: triggerCharacters, + recentEdits: recentEdits, + recentDecisions: this.sessionManager.userDecisionLog.map(it => it.decision), + }, + this.logging + ) + const classifierBasedTrigger = classifier.shouldTriggerEdits() + + const ruleBasedTrigger = shouldTriggerEdits( this.codeWhispererService, - fileContext, + fileContextClss.toServiceModel(), params, this.cursorTracker, this.recentEditsTracker, @@ -228,33 +235,34 @@ export class EditCompletionHandler { true ) - if (!qEditsTrigger) { + // Both classifier and rule based conditions need to evaluate to true otherwise we wont fire Edits requests + const shouldFire = classifierBasedTrigger.shouldTrigger && ruleBasedTrigger !== undefined + + if (!shouldFire) { return EMPTY_RESULT } const generateCompletionReq: GenerateSuggestionsRequest = { - fileContext: fileContext, + fileContext: fileContextClss.toServiceModel(), maxResults: maxResults, predictionTypes: ['EDITS'], workspaceId: workspaceId, } - if (qEditsTrigger) { - generateCompletionReq.editorState = { - document: { - relativeFilePath: textDocument.uri, - programmingLanguage: { - languageName: generateCompletionReq.fileContext.programmingLanguage.languageName, - }, - text: textDocument.getText(), + generateCompletionReq.editorState = { + document: { + relativeFilePath: textDocument.uri, + programmingLanguage: { + languageName: generateCompletionReq.fileContext?.programmingLanguage?.languageName, }, - cursorState: { - position: { - line: params.position.line, - character: params.position.character, - }, + text: textDocument.getText(), + }, + cursorState: { + position: { + line: params.position.line, + character: params.position.character, }, - } + }, } const supplementalContext = await this.codeWhispererService.constructSupplementalContext( @@ -277,7 +285,7 @@ export class EditCompletionHandler { if (currentSession && currentSession.state === 'ACTIVE') { // Emit user trigger decision at session close time for active session this.sessionManager.discardSession(currentSession) - const streakLength = this.editsEnabled ? this.sessionManager.getAndUpdateStreakLength(false) : 0 + const streakLength = this.editsEnabled ? this.streakTracker.getAndUpdateStreakLength(false) : 0 await emitUserTriggerDecisionTelemetry( this.telemetry, this.telemetryService, @@ -293,9 +301,10 @@ export class EditCompletionHandler { const newSession = this.sessionManager.createSession({ document: textDocument, + startPreprocessTimestamp: startPreprocessTimestamp, startPosition: params.position, triggerType: isAutomaticLspTriggerKind ? 'AutoTrigger' : 'OnDemand', - language: fileContext.programmingLanguage.languageName, + language: fileContextClss.programmingLanguage.languageName, requestContext: generateCompletionReq, autoTriggerType: undefined, triggerCharacter: '', @@ -335,8 +344,8 @@ export class EditCompletionHandler { session.suggestions = suggestionResponse.suggestions session.responseContext = suggestionResponse.responseContext session.codewhispererSessionId = suggestionResponse.responseContext.codewhispererSessionId - session.timeToFirstRecommendation = new Date().getTime() - session.startTime - session.suggestionType = suggestionResponse.suggestionType + session.setTimeToFirstRecommendation() + session.predictionType = SuggestionType.EDIT } else { session.suggestions = [...session.suggestions, ...suggestionResponse.suggestions] } @@ -348,7 +357,7 @@ export class EditCompletionHandler { if (session.discardInflightSessionOnNewInvocation) { session.discardInflightSessionOnNewInvocation = false this.sessionManager.discardSession(session) - const streakLength = this.editsEnabled ? this.sessionManager.getAndUpdateStreakLength(false) : 0 + const streakLength = this.editsEnabled ? this.streakTracker.getAndUpdateStreakLength(false) : 0 await emitUserTriggerDecisionTelemetry( this.telemetry, this.telemetryService, @@ -366,45 +375,34 @@ export class EditCompletionHandler { this.sessionManager.activateSession(session) // Process suggestions to apply Empty or Filter filters - const filteredSuggestions = suggestionResponse.suggestions - // Empty suggestion filter - .filter(suggestion => { - if (suggestion.content === '') { - session.setSuggestionState(suggestion.itemId, 'Empty') - return false - } - - return true - }) - // References setting filter - .filter(suggestion => { - // State to track whether code with references should be included in - // the response. No locking or concurrency controls, filtering is done - // right before returning and is only guaranteed to be consistent within - // the context of a single response. - const { includeSuggestionsWithCodeReferences } = this.amazonQServiceManager.getConfiguration() - if (includeSuggestionsWithCodeReferences) { - return true - } - - if (suggestion.references == null || suggestion.references.length === 0) { - return true - } - - // Filter out suggestions that have references when includeSuggestionsWithCodeReferences setting is true - session.setSuggestionState(suggestion.itemId, 'Filter') - return false - }) + if (suggestionResponse.suggestions.length === 0) { + this.sessionManager.closeSession(session) + await emitEmptyUserTriggerDecisionTelemetry( + this.telemetryService, + session, + this.documentChangedListener.timeSinceLastUserModification, + this.editsEnabled ? this.streakTracker.getAndUpdateStreakLength(false) : 0 + ) + return EMPTY_RESULT + } return { items: suggestionResponse.suggestions .map(suggestion => { // Check if this suggestion is similar to a previously rejected edit const isSimilarToRejected = this.rejectedEditTracker.isSimilarToRejected( - suggestion.content, + suggestion.content ?? '', textDocument?.uri || '' ) + const processedSuggestion = processEditSuggestion( + suggestion.content ?? '', + session.startPosition, + session.document, + session.requestContext.fileContext?.rightFileContent ?? '' + ) + const isInlineEdit = processedSuggestion.type === SuggestionType.EDIT + if (isSimilarToRejected) { // Mark as rejected in the session session.setSuggestionState(suggestion.itemId, 'Reject') @@ -414,14 +412,14 @@ export class EditCompletionHandler { // Return empty item that will be filtered out return { insertText: '', - isInlineEdit: true, + isInlineEdit: isInlineEdit, itemId: suggestion.itemId, } } return { - insertText: suggestion.content, - isInlineEdit: true, + insertText: processedSuggestion.suggestionContent, + isInlineEdit: isInlineEdit, itemId: suggestion.itemId, } }) @@ -435,6 +433,7 @@ export class EditCompletionHandler { this.logging.log('Recommendation failure: ' + error) emitServiceInvocationFailure(this.telemetry, session, error) + // UTDE telemetry is not needed here because in error cases we don't care about UTDE for errored out sessions this.sessionManager.closeSession(session) let translatedError = error diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/inlineCompletionHandler.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/inlineCompletionHandler.test.ts new file mode 100644 index 0000000000..923d3135de --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/inlineCompletionHandler.test.ts @@ -0,0 +1,145 @@ +import * as assert from 'assert' +import * as sinon from 'sinon' +import { TextDocument } from 'vscode-languageserver-textdocument' +import { InlineCompletionHandler } from './inlineCompletionHandler' +import { SessionManager } from '../session/sessionManager' +import { CodePercentageTracker } from '../tracker/codePercentageTracker' +import { RecentEditTracker } from '../tracker/codeEditTracker' +import { CursorTracker } from '../tracker/cursorTracker' +import { StreakTracker } from '../tracker/streakTracker' +import { TelemetryService } from '../../../shared/telemetry/telemetryService' +import { UserWrittenCodeTracker } from '../../../shared/userWrittenCodeTracker' +import { InlineCompletionTriggerKind, CancellationToken } from '@aws/language-server-runtimes/server-interface' +import { EMPTY_RESULT } from '../contants/constants' +import * as IdleWorkspaceManagerModule from '../../workspaceContext/IdleWorkspaceManager' +import * as telemetryModule from '../telemetry/telemetry' +import * as textDocumentUtils from '../utils/textDocumentUtils' + +describe('InlineCompletionHandler', () => { + const testDocument = TextDocument.create('file:///test.cs', 'csharp', 1, 'test content') + + const completionParams = { + textDocument: { uri: testDocument.uri }, + position: { line: 0, character: 0 }, + context: { triggerKind: InlineCompletionTriggerKind.Invoked }, + } + + let handler: InlineCompletionHandler + let completionSessionManager: SessionManager + let amazonQServiceManager: any + let codePercentageTracker: sinon.SinonStubbedInstance + let userWrittenCodeTracker: sinon.SinonStubbedInstance + let recentEditTracker: sinon.SinonStubbedInstance + let cursorTracker: sinon.SinonStubbedInstance + let streakTracker: sinon.SinonStubbedInstance + let telemetryService: sinon.SinonStubbedInstance + let lsp: any + let telemetry: any + let credentialsProvider: any + let workspace: any + let logging: any + let getTextDocumentStub: sinon.SinonStub + + beforeEach(() => { + SessionManager.reset() + completionSessionManager = SessionManager.getInstance('COMPLETIONS') + + amazonQServiceManager = { + getCodewhispererService: sinon.stub(), + getConfiguration: sinon.stub().returns({ inlineSuggestions: {} }), + } + codePercentageTracker = sinon.createStubInstance(CodePercentageTracker) + userWrittenCodeTracker = sinon.createStubInstance(UserWrittenCodeTracker) + recentEditTracker = sinon.createStubInstance(RecentEditTracker) + cursorTracker = sinon.createStubInstance(CursorTracker) + streakTracker = sinon.createStubInstance(StreakTracker) + telemetryService = sinon.createStubInstance(TelemetryService) + + workspace = { getWorkspaceFolder: sinon.stub() } + logging = { log: sinon.stub(), debug: sinon.stub() } + lsp = { getClientInitializeParams: sinon.stub() } as any + telemetry = { emitMetric: sinon.stub() } as any + credentialsProvider = { getConnectionMetadata: sinon.stub() } as any + + // Stub IdleWorkspaceManager, telemetry functions, and textDocumentUtils + sinon.stub(IdleWorkspaceManagerModule.IdleWorkspaceManager, 'recordActivityTimestamp') + sinon.stub(telemetryModule, 'emitServiceInvocationTelemetry') + sinon.stub(telemetryModule, 'emitServiceInvocationFailure') + sinon.stub(telemetryModule, 'emitUserTriggerDecisionTelemetry') + getTextDocumentStub = sinon.stub(textDocumentUtils, 'getTextDocument') + + handler = new InlineCompletionHandler( + logging, + workspace, + amazonQServiceManager, + completionSessionManager, + codePercentageTracker, + userWrittenCodeTracker, + recentEditTracker, + cursorTracker, + streakTracker, + telemetry, + telemetryService, + credentialsProvider, + () => false, + () => 1000, + lsp + ) + }) + + afterEach(() => { + sinon.restore() + }) + + it('should return empty result when concurrent request is in progress', async () => { + // Make handler busy + handler['isOnInlineCompletionHandlerInProgress'] = true + + const result = await handler.onInlineCompletion(completionParams, CancellationToken.None) + + assert.deepEqual(result, EMPTY_RESULT) + sinon.assert.calledWith(logging.log, 'Skip concurrent inline completion') + }) + + it('should return empty result when service manager not initialized', async () => { + handler = new InlineCompletionHandler( + logging, + workspace, + null as any, + completionSessionManager, + codePercentageTracker, + userWrittenCodeTracker, + recentEditTracker, + cursorTracker, + streakTracker, + { emitMetric: sinon.stub() } as any, + telemetryService, + { getConnectionMetadata: sinon.stub() } as any, + () => false, + () => 1000, + { getClientInitializeParams: sinon.stub() } as any + ) + + const result = await handler.onInlineCompletion(completionParams, CancellationToken.None) + + assert.deepEqual(result, EMPTY_RESULT) + sinon.assert.calledWith(logging.log, 'Amazon Q Service Manager not initialized yet') + }) + + it('should return empty result when text document not found', async () => { + getTextDocumentStub.resolves(null) + + const result = await handler.onInlineCompletion(completionParams, CancellationToken.None) + + assert.deepEqual(result, EMPTY_RESULT) + sinon.assert.calledWith(logging.log, `textDocument [${testDocument.uri}] not found`) + }) + + it('should track cursor position when cursor tracker available', async () => { + getTextDocumentStub.resolves(null) // Will return early + + await handler.onInlineCompletion(completionParams, CancellationToken.None) + + sinon.assert.calledWith(cursorTracker.trackPosition, testDocument.uri, completionParams.position) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/inlineCompletionHandler.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/inlineCompletionHandler.ts new file mode 100644 index 0000000000..233b9ceb35 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/inlineCompletionHandler.ts @@ -0,0 +1,509 @@ +import { + CancellationToken, + InlineCompletionListWithReferences, + InlineCompletionTriggerKind, + InlineCompletionWithReferencesParams, + Range, + TextDocument, + ResponseError, + LSPErrorCodes, + Logging, + Telemetry, + Workspace, + CredentialsProvider, + Lsp, +} from '@aws/language-server-runtimes/server-interface' +import { autoTrigger, getAutoTriggerType, getNormalizeOsName, triggerType } from '../auto-trigger/autoTrigger' +import { + FileContext, + CodeWhispererServiceToken, + GenerateIAMSuggestionsRequest, + GenerateTokenSuggestionsRequest, + GenerateSuggestionsRequest, + GenerateSuggestionsResponse, + getFileContext, + SuggestionType, +} from '../../../shared/codeWhispererService' +import { CodewhispererLanguage, getSupportedLanguageId } from '../../../shared/languageDetection' +import { CodeWhispererSession, SessionManager } from '../session/sessionManager' +import { CodePercentageTracker } from '../tracker/codePercentageTracker' +import { getErrorMessage } from '../../../shared/utils' +import { getIdeCategory } from '../../../shared/telemetryUtils' +import { textUtils } from '@aws/lsp-core' +import { TelemetryService } from '../../../shared/telemetry/telemetryService' +import { UserWrittenCodeTracker } from '../../../shared/userWrittenCodeTracker' +import { RecentEditTracker } from '../tracker/codeEditTracker' +import { CursorTracker } from '../tracker/cursorTracker' +import { StreakTracker } from '../tracker/streakTracker' +import { AmazonQError, AmazonQServiceConnectionExpiredError } from '../../../shared/amazonQServiceManager/errors' +import { AmazonQBaseServiceManager } from '../../../shared/amazonQServiceManager/BaseAmazonQServiceManager' +import { hasConnectionExpired } from '../../../shared/utils' +import { WorkspaceFolderManager } from '../../workspaceContext/workspaceFolderManager' +import { + emitServiceInvocationFailure, + emitServiceInvocationTelemetry, + emitUserTriggerDecisionTelemetry, +} from '../telemetry/telemetry' +import { EMPTY_RESULT } from '../contants/constants' +import { IdleWorkspaceManager } from '../../workspaceContext/IdleWorkspaceManager' +import { mergeSuggestionsWithRightContext } from '../utils/mergeRightUtils' +import { getTextDocument } from '../utils/textDocumentUtils' + +export class InlineCompletionHandler { + private isOnInlineCompletionHandlerInProgress = false + + constructor( + private readonly logging: Logging, + private readonly workspace: Workspace, + private readonly amazonQServiceManager: AmazonQBaseServiceManager, + private readonly completionSessionManager: SessionManager, + private readonly codePercentageTracker: CodePercentageTracker, + private readonly userWrittenCodeTracker: UserWrittenCodeTracker | undefined, + private readonly recentEditTracker: RecentEditTracker, + private readonly cursorTracker: CursorTracker, + private readonly streakTracker: StreakTracker, + private readonly telemetry: Telemetry, + private readonly telemetryService: TelemetryService, + private readonly credentialsProvider: CredentialsProvider, + private readonly getEditsEnabled: () => boolean, + private readonly getTimeSinceLastUserModification: () => number, + private readonly lsp: Lsp + ) {} + + async onInlineCompletion( + params: InlineCompletionWithReferencesParams, + token: CancellationToken + ): Promise { + // this handle should not run concurrently because + // 1. it would create a high volume of traffic, causing throttling + // 2. it is not designed to handle concurrent changes to these state variables. + // when one handler is at the API call stage, it has not yet update the session state + // but another request can start, causing the state to be incorrect. + IdleWorkspaceManager.recordActivityTimestamp() + + if (this.isOnInlineCompletionHandlerInProgress) { + this.logging.log(`Skip concurrent inline completion`) + return EMPTY_RESULT + } + + // Add this check to ensure service manager is initialized + if (!this.amazonQServiceManager) { + this.logging.log('Amazon Q Service Manager not initialized yet') + return EMPTY_RESULT + } + + this.isOnInlineCompletionHandlerInProgress = true + + try { + // On every new completion request close current inflight session. + const currentSession = this.completionSessionManager.getCurrentSession() + if (currentSession && currentSession.state == 'REQUESTING' && !params.partialResultToken) { + // this REQUESTING state only happens when the session is initialized, which is rare + currentSession.discardInflightSessionOnNewInvocation = true + } + + if (this.cursorTracker) { + this.cursorTracker.trackPosition(params.textDocument.uri, params.position) + } + const textDocument = await getTextDocument(params.textDocument.uri, this.workspace, this.logging) + + const codeWhispererService = this.amazonQServiceManager.getCodewhispererService() + const authType = codeWhispererService instanceof CodeWhispererServiceToken ? 'token' : 'iam' + this.logging.debug( + `[INLINE_COMPLETION] Service ready - auth: ${authType}, partial token: ${!!params.partialResultToken}` + ) + + if (params.partialResultToken && currentSession) { + // subsequent paginated requests for current session + try { + const suggestionResponse = await codeWhispererService.generateSuggestions({ + ...currentSession.requestContext, + fileContext: currentSession.requestContext.fileContext + ? { + ...currentSession.requestContext.fileContext, + } + : undefined, + nextToken: `${params.partialResultToken}`, + }) + return await this.processSuggestionResponse( + suggestionResponse, + currentSession, + false, + params.context.selectedCompletionInfo?.range + ) + } catch (error) { + return this.handleSuggestionsErrors(error as Error, currentSession) + } + } else { + return await this.processNewCompletionRequest(params, textDocument, token) + } + } finally { + this.isOnInlineCompletionHandlerInProgress = false + } + } + + private async processNewCompletionRequest( + params: InlineCompletionWithReferencesParams, + textDocument: TextDocument | undefined, + token: CancellationToken + ): Promise { + // request for new session + if (!textDocument) { + this.logging.log(`textDocument [${params.textDocument.uri}] not found`) + return EMPTY_RESULT + } + + let inferredLanguageId = getSupportedLanguageId(textDocument) + if (params.fileContextOverride?.programmingLanguage) { + inferredLanguageId = params.fileContextOverride?.programmingLanguage as CodewhispererLanguage + } + if (!inferredLanguageId) { + this.logging.log( + `textDocument [${params.textDocument.uri}] with languageId [${textDocument.languageId}] not supported` + ) + return EMPTY_RESULT + } + + // Build request context + const isAutomaticLspTriggerKind = params.context.triggerKind == InlineCompletionTriggerKind.Automatic + const maxResults = isAutomaticLspTriggerKind ? 1 : 5 + const selectionRange = params.context.selectedCompletionInfo?.range + + const startPreprocessTimestamp = Date.now() + + // For Jupyter Notebook in VSC, the language server does not have access to + // its internal states including current active cell index, etc + // we rely on VSC to calculate file context + let fileContext: FileContext | undefined = undefined + if (params.fileContextOverride) { + fileContext = { + leftFileContent: params.fileContextOverride.leftFileContent, + rightFileContent: params.fileContextOverride.rightFileContent, + filename: params.fileContextOverride.filename, + fileUri: params.fileContextOverride.fileUri, + programmingLanguage: { + languageName: inferredLanguageId, + }, + } + } else { + fileContext = getFileContext({ + textDocument, + inferredLanguageId, + position: params.position, + workspaceFolder: this.workspace.getWorkspaceFolder(textDocument.uri), + }).toServiceModel() + } + + const workspaceState = WorkspaceFolderManager.getInstance()?.getWorkspaceState() + const workspaceId = workspaceState?.webSocketClient?.isConnected() ? workspaceState.workspaceId : undefined + + const previousSession = this.completionSessionManager.getPreviousSession() + // Only refer to decisions in the past 2 mins + const previousDecisionForClassifier = + previousSession && Date.now() - previousSession.decisionMadeTimestamp <= 2 * 60 * 1000 + ? previousSession.getAggregatedUserTriggerDecision() + : undefined + let ideCategory: string | undefined = '' + const initializeParams = this.lsp.getClientInitializeParams() + if (initializeParams !== undefined) { + ideCategory = getIdeCategory(initializeParams) + } + + // auto trigger code path + let codewhispererAutoTriggerType = undefined + let triggerCharacters = '' + let autoTriggerResult = undefined + + if (isAutomaticLspTriggerKind) { + // Reference: https://github.com/aws/aws-toolkit-vscode/blob/amazonq/v1.74.0/packages/core/src/codewhisperer/service/classifierTrigger.ts#L477 + if ( + params.documentChangeParams?.contentChanges && + params.documentChangeParams.contentChanges.length > 0 && + params.documentChangeParams.contentChanges[0].text !== undefined + ) { + triggerCharacters = params.documentChangeParams.contentChanges[0].text + codewhispererAutoTriggerType = getAutoTriggerType(params.documentChangeParams.contentChanges) + } else { + // if the client does not emit document change for the trigger, use left most character. + triggerCharacters = fileContext.leftFileContent.trim().at(-1) ?? '' + codewhispererAutoTriggerType = triggerType(fileContext) + } + // See: https://github.com/aws/aws-toolkit-vscode/blob/amazonq/v1.74.0/packages/core/src/codewhisperer/service/keyStrokeHandler.ts#L132 + // In such cases, do not auto trigger. + if (codewhispererAutoTriggerType === undefined) { + return EMPTY_RESULT + } + + autoTriggerResult = autoTrigger( + { + fileContext, // The left/right file context and programming language + lineNum: params.position.line, // the line number of the invocation, this is the line of the cursor + char: triggerCharacters, // Add the character just inserted, if any, before the invication position + ide: ideCategory ?? '', + os: getNormalizeOsName(), + previousDecision: previousDecisionForClassifier, // The last decision by the user on the previous invocation + triggerType: codewhispererAutoTriggerType, // The 2 trigger types currently influencing the Auto-Trigger are SpecialCharacter and Enter + }, + this.logging + ) + + if (codewhispererAutoTriggerType === 'Classifier' && !autoTriggerResult.shouldTrigger) { + return EMPTY_RESULT + } + } + + let requestContext: GenerateSuggestionsRequest = { + fileContext, + maxResults, + } + + const codeWhispererService = this.amazonQServiceManager.getCodewhispererService() + const supplementalContext = await codeWhispererService.constructSupplementalContext( + textDocument, + params.position, + this.workspace, + this.recentEditTracker, + this.logging, + token, + params.openTabFilepaths, + { includeRecentEdits: false } + ) + + if (supplementalContext?.items) { + requestContext.supplementalContexts = supplementalContext.items + } + + // Close ACTIVE session and record Discard trigger decision immediately + const currentSession = this.completionSessionManager.getCurrentSession() + if (currentSession && currentSession.state === 'ACTIVE') { + // Emit user trigger decision at session close time for active session + // TODO: yuxqiang workaround to exclude JB from this logic because JB and VSC handle a + // bit differently in the case when there's a new trigger while a reject/discard event is sent + // for the previous trigger + if (ideCategory !== 'JETBRAINS') { + this.completionSessionManager.discardSession(currentSession) + const streakLength = this.getEditsEnabled() ? this.streakTracker.getAndUpdateStreakLength(false) : 0 + await emitUserTriggerDecisionTelemetry( + this.telemetry, + this.telemetryService, + currentSession, + this.getTimeSinceLastUserModification(), + 0, + 0, + [], + [], + streakLength + ) + } + } + + const supplementalMetadata = supplementalContext?.supContextData + + const newSession = this.completionSessionManager.createSession({ + document: textDocument, + startPreprocessTimestamp: startPreprocessTimestamp, + startPosition: params.position, + triggerType: isAutomaticLspTriggerKind ? 'AutoTrigger' : 'OnDemand', + language: fileContext.programmingLanguage.languageName as CodewhispererLanguage, + requestContext: requestContext, + autoTriggerType: isAutomaticLspTriggerKind ? codewhispererAutoTriggerType : undefined, + triggerCharacter: triggerCharacters, + classifierResult: autoTriggerResult?.classifierResult, + classifierThreshold: autoTriggerResult?.classifierThreshold, + credentialStartUrl: this.credentialsProvider.getConnectionMetadata?.()?.sso?.startUrl ?? undefined, + supplementalMetadata: supplementalMetadata, + customizationArn: textUtils.undefinedIfEmpty(codeWhispererService.customizationArn), + }) + + // Add extra context to request context + const { extraContext } = this.amazonQServiceManager.getConfiguration().inlineSuggestions + if (extraContext && requestContext.fileContext) { + requestContext.fileContext.leftFileContent = + extraContext + '\n' + requestContext.fileContext.leftFileContent + } + + // Create the appropriate request based on service type + let generateCompletionReq: GenerateSuggestionsRequest + + if (codeWhispererService instanceof CodeWhispererServiceToken) { + const tokenRequest = requestContext as GenerateTokenSuggestionsRequest + generateCompletionReq = { + ...tokenRequest, + ...(workspaceId ? { workspaceId } : {}), + } + } else { + const iamRequest = requestContext as GenerateIAMSuggestionsRequest + generateCompletionReq = { + ...iamRequest, + } + } + + try { + const authType = codeWhispererService instanceof CodeWhispererServiceToken ? 'token' : 'iam' + this.logging.debug(`[INLINE_COMPLETION] API call - generateSuggestions (new session, ${authType})`) + const suggestionResponse = await codeWhispererService.generateSuggestions(generateCompletionReq) + return await this.processSuggestionResponse(suggestionResponse, newSession, true, selectionRange) + } catch (error) { + return this.handleSuggestionsErrors(error as Error, newSession) + } + } + + private async processSuggestionResponse( + suggestionResponse: GenerateSuggestionsResponse, + session: CodeWhispererSession, + isNewSession: boolean, + selectionRange?: Range + ): Promise { + this.codePercentageTracker.countInvocation(session.language) + + this.userWrittenCodeTracker?.recordUsageCount(session.language) + session.includeImportsWithSuggestions = + this.amazonQServiceManager.getConfiguration().includeImportsWithSuggestions + + if (isNewSession) { + // Populate the session with information from codewhisperer response + session.suggestions = suggestionResponse.suggestions + session.responseContext = suggestionResponse.responseContext + session.codewhispererSessionId = suggestionResponse.responseContext.codewhispererSessionId + session.setTimeToFirstRecommendation() + session.predictionType = SuggestionType.COMPLETION + } else { + session.suggestions = [...session.suggestions, ...suggestionResponse.suggestions] + } + + // Emit service invocation telemetry for every request sent to backend + emitServiceInvocationTelemetry(this.telemetry, session, suggestionResponse.responseContext.requestId) + + // Discard previous inflight API response due to new trigger + if (session.discardInflightSessionOnNewInvocation) { + session.discardInflightSessionOnNewInvocation = false + this.completionSessionManager.discardSession(session) + const streakLength = this.getEditsEnabled() ? this.streakTracker.getAndUpdateStreakLength(false) : 0 + await emitUserTriggerDecisionTelemetry( + this.telemetry, + this.telemetryService, + session, + this.getTimeSinceLastUserModification(), + 0, + 0, + [], + [], + streakLength + ) + } + + // session was closed by user already made decisions consequent completion request before new paginated API response was received + if ( + session.predictionType !== SuggestionType.EDIT && // TODO: this is a shorterm fix to allow Edits tabtabtab experience, however the real solution is to manage such sessions correctly + (session.state === 'CLOSED' || session.state === 'DISCARD') + ) { + return EMPTY_RESULT + } + + // API response was recieved, we can activate session now + this.completionSessionManager.activateSession(session) + + // Process suggestions to apply Empty or Filter filters + const filteredSuggestions = suggestionResponse.suggestions + // Empty suggestion filter + .filter(suggestion => { + if (suggestion.content === '') { + session.setSuggestionState(suggestion.itemId, 'Empty') + return false + } + return true + }) + // References setting filter + .filter(suggestion => { + // State to track whether code with references should be included in + // the response. No locking or concurrency controls, filtering is done + // right before returning and is only guaranteed to be consistent within + // the context of a single response. + const { includeSuggestionsWithCodeReferences } = this.amazonQServiceManager.getConfiguration() + if (includeSuggestionsWithCodeReferences) { + return true + } + if (suggestion.references == null || suggestion.references.length === 0) { + return true + } + // Filter out suggestions that have references when includeSuggestionsWithCodeReferences setting is true + session.setSuggestionState(suggestion.itemId, 'Filter') + return false + }) + + const { includeImportsWithSuggestions } = this.amazonQServiceManager.getConfiguration() + const suggestionsWithRightContext = mergeSuggestionsWithRightContext( + session.requestContext.fileContext?.rightFileContent ?? '', + filteredSuggestions, + includeImportsWithSuggestions, + selectionRange + ).filter(suggestion => { + // Discard suggestions that have empty string insertText after right context merge and can't be displayed anymore + if (suggestion.insertText === '') { + session.setSuggestionState(suggestion.itemId, 'Discard') + return false + } + return true + }) + + suggestionsWithRightContext.forEach(suggestion => { + const cachedSuggestion = session.suggestions.find(s => s.itemId === suggestion.itemId) + if (cachedSuggestion) cachedSuggestion.insertText = suggestion.insertText.toString() + }) + + // TODO: need dedupe after right context merging but I don't see one + session.suggestionsAfterRightContextMerge.push(...suggestionsWithRightContext) + + session.codewhispererSuggestionImportCount = + session.codewhispererSuggestionImportCount + + suggestionsWithRightContext.reduce((total, suggestion) => { + return total + (suggestion.mostRelevantMissingImports?.length || 0) + }, 0) + + // If after all server-side filtering no suggestions can be displayed, and there is no nextToken + // close session and return empty results + if (session.suggestionsAfterRightContextMerge.length === 0 && !suggestionResponse.responseContext.nextToken) { + this.completionSessionManager.closeSession(session) + await emitUserTriggerDecisionTelemetry( + this.telemetry, + this.telemetryService, + session, + this.getTimeSinceLastUserModification() + ) + return EMPTY_RESULT + } + + return { + items: suggestionsWithRightContext, + sessionId: session.id, + partialResultToken: suggestionResponse.responseContext.nextToken, + } + } + + private handleSuggestionsErrors(error: Error, session: CodeWhispererSession): InlineCompletionListWithReferences { + this.logging.log('Recommendation failure: ' + error) + + emitServiceInvocationFailure(this.telemetry, session, error) + + // UTDE telemetry is not needed here because in error cases we don't care about UTDE for errored out sessions + this.completionSessionManager.closeSession(session) + + let translatedError = error + + if (hasConnectionExpired(error)) { + translatedError = new AmazonQServiceConnectionExpiredError(getErrorMessage(error)) + } + + if (translatedError instanceof AmazonQError) { + throw new ResponseError( + LSPErrorCodes.RequestFailed, + translatedError.message || 'Error processing suggestion requests', + { + awsErrorCode: translatedError.code, + } + ) + } + + return EMPTY_RESULT + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/sessionResultsHandler.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/sessionResultsHandler.test.ts new file mode 100644 index 0000000000..97732743f3 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/sessionResultsHandler.test.ts @@ -0,0 +1,182 @@ +import * as assert from 'assert' +import * as sinon from 'sinon' +import { TextDocument } from 'vscode-languageserver-textdocument' +import { SessionResultsHandler } from './sessionResultsHandler' +import { SessionManager, SessionData } from '../session/sessionManager' +import { CodePercentageTracker } from '../tracker/codePercentageTracker' +import { RejectedEditTracker } from '../tracker/rejectedEditTracker' +import { StreakTracker } from '../tracker/streakTracker' +import { TelemetryService } from '../../../shared/telemetry/telemetryService' +import { AcceptedInlineSuggestionEntry, CodeDiffTracker } from '../tracker/codeDiffTracker' +import { SuggestionType } from '../../../shared/codeWhispererService' + +describe('SessionResultsHandler', () => { + const sessionData: SessionData = { + document: TextDocument.create('file:///test.cs', 'csharp', 1, 'test content'), + startPreprocessTimestamp: 0, + startPosition: { line: 0, character: 0 }, + triggerType: 'OnDemand', + language: 'csharp', + requestContext: { + maxResults: 5, + fileContext: { + filename: 'test.cs', + programmingLanguage: { languageName: 'csharp' }, + leftFileContent: 'left', + rightFileContent: 'right', + }, + }, + } + + const sessionResultData = { + sessionId: 'test-session-id', + completionSessionResult: { + 'item-1': { seen: true, accepted: false, discarded: false }, + }, + firstCompletionDisplayLatency: 50, + totalSessionDisplayTime: 1000, + typeaheadLength: 10, + isInlineEdit: false, + addedDiagnostics: [], + removedDiagnostics: [], + } + + let handler: SessionResultsHandler + let completionSessionManager: SessionManager + let editSessionManager: SessionManager + let codePercentageTracker: sinon.SinonStubbedInstance + let codeDiffTracker: sinon.SinonStubbedInstance> + let rejectedEditTracker: sinon.SinonStubbedInstance + let streakTracker: sinon.SinonStubbedInstance + let telemetryService: sinon.SinonStubbedInstance + let telemetry: { emitMetric: sinon.SinonStub; onClientTelemetry: sinon.SinonStub } + let logging: { + log: sinon.SinonStub + debug: sinon.SinonStub + error: sinon.SinonStub + warn: sinon.SinonStub + info: sinon.SinonStub + } + + beforeEach(() => { + SessionManager.reset() + completionSessionManager = SessionManager.getInstance('COMPLETIONS') + editSessionManager = SessionManager.getInstance('EDITS') + + codePercentageTracker = sinon.createStubInstance(CodePercentageTracker) + codeDiffTracker = sinon.createStubInstance(CodeDiffTracker) + rejectedEditTracker = sinon.createStubInstance(RejectedEditTracker) + streakTracker = sinon.createStubInstance(StreakTracker) + telemetryService = sinon.createStubInstance(TelemetryService) + + telemetry = { emitMetric: sinon.stub(), onClientTelemetry: sinon.stub() } + logging = { + log: sinon.stub(), + debug: sinon.stub(), + error: sinon.stub(), + warn: sinon.stub(), + info: sinon.stub(), + } + + handler = new SessionResultsHandler( + logging, + telemetry, + telemetryService, + completionSessionManager, + editSessionManager, + codePercentageTracker, + codeDiffTracker, + rejectedEditTracker, + streakTracker, + () => false, + () => 1000 + ) + }) + + it('should close session when results are processed', async () => { + const session = completionSessionManager.createSession(sessionData) + completionSessionManager.activateSession(session) + session.id = 'test-session-id' + + await handler.handleSessionResults(sessionResultData) + + assert.equal(session.state, 'CLOSED') + }) + + it('should log error when session not found', async () => { + await handler.handleSessionResults(sessionResultData) + + sinon.assert.calledWith(logging.log, 'ERROR: Session ID test-session-id was not found') + }) + + it('should log error when session not active', async () => { + const session = completionSessionManager.createSession(sessionData) + session.id = 'test-session-id' + session.close() + + await handler.handleSessionResults(sessionResultData) + + sinon.assert.calledWith( + logging.log, + 'ERROR: Trying to record trigger decision for not-active session test-session-id with wrong state CLOSED' + ) + }) + + it('should handle accepted completions suggestion', async () => { + const session = completionSessionManager.createSession(sessionData) + completionSessionManager.activateSession(session) + session.id = 'test-session-id' + session.suggestions = [{ itemId: 'item-1', content: 'test', insertText: 'test' }] + + const acceptedData = { + ...sessionResultData, + completionSessionResult: { 'item-1': { seen: true, accepted: true, discarded: false } }, + } + + await handler.handleSessionResults(acceptedData) + + sinon.assert.calledWith(codePercentageTracker.countSuccess, 'csharp') + sinon.assert.calledWith(codePercentageTracker.countAcceptedTokens, 'csharp', 'test') + sinon.assert.calledWith(codePercentageTracker.countTotalTokens, 'csharp', 'test', true) + sinon.assert.called(codeDiffTracker.enqueue) + assert.equal(session.state, 'CLOSED') + }) + + it('should handle accepted edits suggestions', async () => { + const session = completionSessionManager.createSession(sessionData) + completionSessionManager.activateSession(session) + session.id = 'test-session-id' + session.predictionType = SuggestionType.EDIT + session.suggestions = [{ itemId: 'item-1', content: '-int\n+int = 5' }] + + const acceptedData = { + ...sessionResultData, + completionSessionResult: { 'item-1': { seen: true, accepted: true, discarded: false } }, + } + + await handler.handleSessionResults(acceptedData) + + sinon.assert.calledWith(codePercentageTracker.countSuccess, 'csharp') + sinon.assert.calledWith(codePercentageTracker.countAcceptedTokensUsingCount, 'csharp', 4) + sinon.assert.calledWith(codePercentageTracker.addTotalTokensForEdits, 'csharp', 4) + sinon.assert.called(codeDiffTracker.enqueue) + assert.equal(session.state, 'CLOSED') + }) + + it('should handle rejected edits suggestions', async () => { + const session = editSessionManager.createSession(sessionData) + editSessionManager.activateSession(session) + session.id = 'test-session-id' + session.suggestions = [{ itemId: 'item-1', content: 'rejected' }] + + const rejectedData = { + ...sessionResultData, + isInlineEdit: true, + } + + await handler.handleSessionResults(rejectedData) + + sinon.assert.called(rejectedEditTracker.recordRejectedEdit) + assert.equal(session.state, 'CLOSED') + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/sessionResultsHandler.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/sessionResultsHandler.ts new file mode 100644 index 0000000000..0475b1d73b --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/handler/sessionResultsHandler.ts @@ -0,0 +1,169 @@ +import { + Logging, + LogInlineCompletionSessionResultsParams, + Telemetry, +} from '@aws/language-server-runtimes/server-interface' +import { IdeDiagnostic } from '@amzn/codewhisperer-runtime' +import { SessionManager } from '../session/sessionManager' +import { CodePercentageTracker } from '../tracker/codePercentageTracker' +import { RejectedEditTracker } from '../tracker/rejectedEditTracker' +import { StreakTracker } from '../tracker/streakTracker' +import { TelemetryService } from '../../../shared/telemetry/telemetryService' +import { AcceptedInlineSuggestionEntry, CodeDiffTracker } from '../tracker/codeDiffTracker' +import { SuggestionType, Suggestion } from '../../../shared/codeWhispererService' +import { getAddedAndDeletedLines, getCharacterDifferences } from '../utils/diffUtils' +import { getCompletionType, getEndPositionForAcceptedSuggestion } from '../../../shared/utils' +import { emitPerceivedLatencyTelemetry, emitUserTriggerDecisionTelemetry } from '../telemetry/telemetry' + +export class SessionResultsHandler { + constructor( + private readonly logging: Logging, + private readonly telemetry: Telemetry, + private readonly telemetryService: TelemetryService, + private readonly completionSessionManager: SessionManager, + private readonly editSessionManager: SessionManager, + private readonly codePercentageTracker: CodePercentageTracker, + private readonly codeDiffTracker: CodeDiffTracker, + private readonly rejectedEditTracker: RejectedEditTracker, + private readonly streakTracker: StreakTracker, + private readonly getEditsEnabled: () => boolean, + private readonly getTimeSinceLastUserModification: () => number + ) {} + + // Schedule tracker for UserModification Telemetry event + private enqueueCodeDiffEntry(session: any, acceptedSuggestion: Suggestion, addedCharactersForEdit?: string) { + const endPosition = getEndPositionForAcceptedSuggestion(acceptedSuggestion.content, session.startPosition) + // use the addedCharactersForEdit if it is EDIT suggestion type + const originalString = addedCharactersForEdit ? addedCharactersForEdit : acceptedSuggestion.content + + this.codeDiffTracker.enqueue({ + sessionId: session.codewhispererSessionId || '', + requestId: session.responseContext?.requestId || '', + fileUrl: session.document.uri, + languageId: session.language, + time: Date.now(), + originalString: originalString ?? '', + startPosition: session.startPosition, + endPosition: endPosition, + customizationArn: session.customizationArn, + completionType: getCompletionType(acceptedSuggestion), + triggerType: session.triggerType, + credentialStartUrl: session.credentialStartUrl, + }) + } + + async handleSessionResults(params: LogInlineCompletionSessionResultsParams) { + const { + sessionId, + completionSessionResult, + firstCompletionDisplayLatency, + totalSessionDisplayTime, + typeaheadLength, + isInlineEdit, + addedDiagnostics, + removedDiagnostics, + } = params + + // Comment this out because Edit request might return Completion as well so we can't rely on this flag + // const sessionManager = params.isInlineEdit ? this.editSessionManager : this.completionSessionManager + + // TODO: Not elegant, worth refactoring + const editSession = this.editSessionManager.getSessionById(sessionId) + const completionSession = this.completionSessionManager.getSessionById(sessionId) + + const session = editSession ?? completionSession + const sessionManager = editSession ? this.editSessionManager : this.completionSessionManager + if (!session) { + this.logging.log(`ERROR: Session ID ${sessionId} was not found`) + return + } + + if (session.state !== 'ACTIVE') { + this.logging.log( + `ERROR: Trying to record trigger decision for not-active session ${sessionId} with wrong state ${session.state}` + ) + return + } + + const acceptedItemId = Object.keys(params.completionSessionResult).find( + k => params.completionSessionResult[k].accepted + ) + const isAccepted = acceptedItemId ? true : false + const acceptedSuggestion = session.suggestions.find(s => s.itemId === acceptedItemId) + let addedLengthForEdits = 0 + let deletedLengthForEdits = 0 + + if (acceptedSuggestion) { + this.codePercentageTracker.countSuccess(session.language) + if (session.predictionType === SuggestionType.EDIT && acceptedSuggestion.content) { + // [acceptedSuggestion.insertText] will be undefined for NEP suggestion. Use [acceptedSuggestion.content] instead. + // Since [acceptedSuggestion.content] is in the form of a diff, transform the content into addedCharacters and deletedCharacters. + const { addedLines, deletedLines } = getAddedAndDeletedLines(acceptedSuggestion.content) + const charDiffResult = getCharacterDifferences(addedLines, deletedLines) + addedLengthForEdits = charDiffResult.charactersAdded + deletedLengthForEdits = charDiffResult.charactersRemoved + + this.codePercentageTracker.countAcceptedTokensUsingCount( + session.language, + charDiffResult.charactersAdded + ) + this.codePercentageTracker.addTotalTokensForEdits(session.language, charDiffResult.charactersAdded) + this.enqueueCodeDiffEntry(session, acceptedSuggestion, addedLines.join('\n')) + } else if (acceptedSuggestion.insertText) { + this.codePercentageTracker.countAcceptedTokens(session.language, acceptedSuggestion.insertText) + this.codePercentageTracker.countTotalTokens(session.language, acceptedSuggestion.insertText, true) + this.enqueueCodeDiffEntry(session, acceptedSuggestion) + } + } + + // Handle rejected edit predictions + if (isInlineEdit && !isAccepted) { + // Find all rejected suggestions in this session + const rejectedSuggestions = session.suggestions.filter(suggestion => { + const result = completionSessionResult[suggestion.itemId] + return result && result.seen && !result.accepted + }) + + // Record each rejected edit + for (const rejectedSuggestion of rejectedSuggestions) { + if (rejectedSuggestion.content) { + this.rejectedEditTracker.recordRejectedEdit({ + content: rejectedSuggestion.content, + timestamp: Date.now(), + documentUri: session.document.uri, + position: session.startPosition, + }) + + this.logging.debug( + `[EDIT_PREDICTION] Recorded rejected edit: ${rejectedSuggestion.content.substring(0, 20)}...` + ) + } + } + } + + session.setClientResultData( + completionSessionResult, + firstCompletionDisplayLatency, + totalSessionDisplayTime, + typeaheadLength + ) + + if (firstCompletionDisplayLatency) emitPerceivedLatencyTelemetry(this.telemetry, session) + + // Always emit user trigger decision at session close + sessionManager.closeSession(session) + const streakLength = this.getEditsEnabled() ? this.streakTracker.getAndUpdateStreakLength(isAccepted) : 0 + await emitUserTriggerDecisionTelemetry( + this.telemetry, + this.telemetryService, + session, + this.getTimeSinceLastUserModification(), + addedLengthForEdits, + deletedLengthForEdits, + addedDiagnostics as IdeDiagnostic[], + removedDiagnostics as IdeDiagnostic[], + streakLength, + Object.keys(params.completionSessionResult)[0] + ) + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/mergeRightUtils.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/mergeRightUtils.test.ts deleted file mode 100644 index d7a0147a85..0000000000 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/mergeRightUtils.test.ts +++ /dev/null @@ -1,270 +0,0 @@ -import { - getPrefixOverlapLastIndex, - getPrefixSuffixOverlap, - mergeEditSuggestionsWithFileContext, - truncateOverlapWithRightContext, -} from './mergeRightUtils' -import { - HELLO_WORLD_IN_CSHARP, - HELLO_WORLD_WITH_WINDOWS_ENDING, - INCOMPLETE_HELLO_WORLD_IN_CSHARP, - SAMPLE_SESSION_DATA_WITH_EXTRA_LEFT_CONTENT, -} from '../../shared/testUtils' -import assert = require('assert') -import { CodeWhispererSession } from './session/sessionManager' -import { TextDocument } from '@aws/language-server-runtimes/server-interface' - -describe('Merge Right Utils', () => { - const HELLO_WORLD = `Console.WriteLine("Hello World!");` - - it('get prefix suffix overlap works as expected', () => { - const result = getPrefixSuffixOverlap('adwg31', '31ggrs') - assert.deepEqual(result, '31') - }) - - it('get prefix prefix overlap index works as expected', () => { - const result1 = getPrefixOverlapLastIndex('static void', 'static') - assert.deepEqual(result1, 6) - const result2 = getPrefixOverlapLastIndex('static void', 'void') - assert.deepEqual(result2, 11) - const result3 = getPrefixOverlapLastIndex('static void', 'staic') - assert.deepEqual(result3, 3) - }) - - it('should return empty suggestion when right context equals line content ', () => { - const result = truncateOverlapWithRightContext(HELLO_WORLD, HELLO_WORLD) - assert.deepEqual(result, '') - }) - - it('should return empty suggestion when right context equals file content', () => { - // Without trimStart, this test would fail because the function doesn't trim leading new line from right context - const result = truncateOverlapWithRightContext(HELLO_WORLD_IN_CSHARP.trimStart(), HELLO_WORLD_IN_CSHARP) - assert.deepEqual(result, '') - }) - - it('should not handle the case where right context fully matches suggestion but starts with a newline ', () => { - const result = truncateOverlapWithRightContext('\n' + HELLO_WORLD_IN_CSHARP, HELLO_WORLD_IN_CSHARP) - // Even though right context and suggestion are equal, the newline of right context doesn't get trimmed while the newline of suggestion gets trimmed - // As a result, we end up with no overlap - assert.deepEqual(result, HELLO_WORLD_IN_CSHARP) - }) - - it('should return truncated suggestion when right context matches end of the suggestion', () => { - // File contents will be `nsole.WriteLine("Hello World!");` - // Suggestion will be the full HELLO_WORLD - // Final truncated result should be the first two letters of HELLO_WORLD - const result = truncateOverlapWithRightContext(HELLO_WORLD.substring(2), HELLO_WORLD) - - assert.deepEqual(result, HELLO_WORLD.substring(0, 2)) - }) - - it('should trim right-context tabs and whitespaces until first newline', () => { - const suggestion = '{\n return a + b;\n }' - const rightContent = ' \n }\n\n }\n}' - const expected_result = '{\n return a + b;' - const result = truncateOverlapWithRightContext(rightContent, suggestion) - - assert.deepEqual(result, expected_result) - }) - - it('should handle different line endings', () => { - const suggestion = '{\n return a + b;\n }' - const rightContent = '\r\n }\r\n}\r\n}' - const expected_result = '{\n return a + b;' - const result = truncateOverlapWithRightContext(rightContent, suggestion) - - assert.deepEqual(result, expected_result) - }) - - it('should handle windows line endings for files', () => { - const result = truncateOverlapWithRightContext( - HELLO_WORLD_WITH_WINDOWS_ENDING, - HELLO_WORLD_WITH_WINDOWS_ENDING.replaceAll('\r', '') - ) - assert.deepEqual(result, '') - }) -}) - -describe('mergeEditSuggestionsWithFileContext', function () { - const PREVIOUS_SESSION = new CodeWhispererSession(SAMPLE_SESSION_DATA_WITH_EXTRA_LEFT_CONTENT) - const SUGGESTION_CONTENT = - '--- file:///incomplete.cs\t1750894867455\n' + - '+++ file:///incomplete.cs\t1750894887671\n' + - '@@ -1,4 +1,9 @@\n' + - 'class HelloWorld\n' + - '+{\n' + - '+ static void Main(string[] args)\n' + - '+ {\n' + - '+ Console.WriteLine(\"Hello World!\");\n' + - '+ }\n' + - '+}\n' + - ' \n' + - '}\n' + - '\\ No newline at end of file\n' - - beforeEach(() => { - PREVIOUS_SESSION.suggestions = [{ content: SUGGESTION_CONTENT, itemId: 'itemId' }] - }) - - it('should return non-empty suggestion if user input matches prefix of the suggestion', () => { - const userEdit = '{' - const currentTextDocument = TextDocument.create( - 'file:///incomplete.cs', - 'csharp', - 1, - INCOMPLETE_HELLO_WORLD_IN_CSHARP + userEdit - ) - const fileContext = { - filename: currentTextDocument.uri, - programmingLanguage: { languageName: 'csharp' }, - leftFileContent: INCOMPLETE_HELLO_WORLD_IN_CSHARP + userEdit, - rightFileContent: '', - } - const expectedNewDiff = - '@@ -1,2 +1,8 @@\n' + - ' class HelloWorld\n' + - '-' + - userEdit + - '\n' + - '\\ No newline at end of file\n' + - '+' + - userEdit + - '\n' + - '+ static void Main(string[] args)\n' + - '+ {\n' + - '+ Console.WriteLine("Hello World!");\n' + - '+ }\n' + - '+}\n' + - '+ \n' + - '\\ No newline at end of file\n' - const mergedSuggestions = mergeEditSuggestionsWithFileContext( - PREVIOUS_SESSION, - currentTextDocument, - fileContext - ) - assert.deepEqual(mergedSuggestions.length, 1) - const insertText = (mergedSuggestions[0].insertText as string).split('\n').slice(2).join('\n') - assert.deepEqual(insertText, expectedNewDiff) - }) - - it('should return non-empty suggestion if user input contains extra white space prefix', () => { - const userEdit = ' {' - const currentTextDocument = TextDocument.create( - 'file:///incomplete.cs', - 'csharp', - 1, - INCOMPLETE_HELLO_WORLD_IN_CSHARP + userEdit - ) - const fileContext = { - filename: currentTextDocument.uri, - programmingLanguage: { languageName: 'csharp' }, - leftFileContent: INCOMPLETE_HELLO_WORLD_IN_CSHARP + userEdit, - rightFileContent: '', - } - const expectedNewDiff = - '@@ -1,2 +1,8 @@\n' + - ' class HelloWorld\n' + - '-' + - userEdit + - '\n' + - '\\ No newline at end of file\n' + - '+' + - userEdit + - '\n' + - '+ static void Main(string[] args)\n' + - '+ {\n' + - '+ Console.WriteLine("Hello World!");\n' + - '+ }\n' + - '+}\n' + - '+ \n' + - '\\ No newline at end of file\n' - const mergedSuggestions = mergeEditSuggestionsWithFileContext( - PREVIOUS_SESSION, - currentTextDocument, - fileContext - ) - assert.deepEqual(mergedSuggestions.length, 1) - const insertText = (mergedSuggestions[0].insertText as string).split('\n').slice(2).join('\n') - assert.deepEqual(insertText, expectedNewDiff) - }) - - it('should return empty suggestion if user input contains a deletion', () => { - const currentTextDocument = TextDocument.create( - 'file:///incomplete.cs', - 'csharp', - 1, - INCOMPLETE_HELLO_WORLD_IN_CSHARP.substring(0, -3) - ) - const fileContext = { - filename: currentTextDocument.uri, - programmingLanguage: { languageName: 'csharp' }, - leftFileContent: INCOMPLETE_HELLO_WORLD_IN_CSHARP.substring(0, -3), - rightFileContent: '', - } - const mergedSuggestions = mergeEditSuggestionsWithFileContext( - PREVIOUS_SESSION, - currentTextDocument, - fileContext - ) - assert.deepEqual(mergedSuggestions.length, 0) - }) - - it('should return empty suggestion if user input contains a line break', () => { - const userEdit = '\n' - const currentTextDocument = TextDocument.create( - 'file:///incomplete.cs', - 'csharp', - 1, - INCOMPLETE_HELLO_WORLD_IN_CSHARP.substring(0, -3) - ) - const fileContext = { - filename: currentTextDocument.uri, - programmingLanguage: { languageName: 'csharp' }, - leftFileContent: INCOMPLETE_HELLO_WORLD_IN_CSHARP + userEdit, - rightFileContent: '', - } - const mergedSuggestions = mergeEditSuggestionsWithFileContext( - PREVIOUS_SESSION, - currentTextDocument, - fileContext - ) - assert.deepEqual(mergedSuggestions.length, 0) - }) - - it('should return non-empty suggestion if user input matches a part of the suggestion', () => { - const userEdit = '{\n void' - const currentTextDocument = TextDocument.create( - 'file:///incomplete.cs', - 'csharp', - 1, - INCOMPLETE_HELLO_WORLD_IN_CSHARP + userEdit - ) - const fileContext = { - filename: currentTextDocument.uri, - programmingLanguage: { languageName: 'csharp' }, - leftFileContent: INCOMPLETE_HELLO_WORLD_IN_CSHARP + userEdit, - rightFileContent: '', - } - const expectedNewDiff = - '@@ -1,3 +1,8 @@\n' + - ' class HelloWorld\n' + - ' {\n' + - '- void\n' + - '\\ No newline at end of file\n' + - '+ void Main(string[] args)\n' + - '+ {\n' + - '+ Console.WriteLine("Hello World!");\n' + - '+ }\n' + - '+}\n' + - '+ \n' + - '\\ No newline at end of file\n' - const mergedSuggestions = mergeEditSuggestionsWithFileContext( - PREVIOUS_SESSION, - currentTextDocument, - fileContext - ) - assert.deepEqual(mergedSuggestions.length, 1) - const insertText = (mergedSuggestions[0].insertText as string).split('\n').slice(2).join('\n') - assert.deepEqual(insertText, expectedNewDiff) - }) -}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/mergeRightUtils.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/mergeRightUtils.ts deleted file mode 100644 index 9091139e7e..0000000000 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/mergeRightUtils.ts +++ /dev/null @@ -1,132 +0,0 @@ -import { InlineCompletionItemWithReferences, TextDocument } from '@aws/language-server-runtimes/server-interface' -import { CodeWhispererSession } from './session/sessionManager' -import { applyUnifiedDiff, generateUnifiedDiffWithTimestamps } from './diffUtils' -import { FileContext } from '../../shared/codeWhispererService' - -/** - * Returns the longest overlap between the Suffix of firstString and Prefix of second string - * getPrefixSuffixOverlap("adwg31", "31ggrs") = "31" - */ -export function getPrefixSuffixOverlap(firstString: string, secondString: string) { - let i = Math.min(firstString.length, secondString.length) - while (i > 0) { - if (secondString.slice(0, i) === firstString.slice(-i)) { - break - } - i-- - } - return secondString.slice(0, i) -} - -/** - * Returns the last index of the longest overlap between the first string and the second string - * @param targetString the target string - * @param searchString the search string - * @returns last index of the longest overlap between the first string and the second string - * @example getPrefixOverlapLastIndex("public static void", "static") = 13 - */ -export function getPrefixOverlapLastIndex(targetString: string, searchString: string) { - let i = searchString.length - let idx = -1 - while (i > 0) { - idx = targetString.indexOf(searchString.slice(0, i)) - if (idx != -1) { - return idx + i - } - i-- - } - return idx -} - -export function truncateOverlapWithRightContext( - rightFileContent: string, - suggestion: string, - userEdit?: string -): string { - const trimmedSuggestion = suggestion.trim() - // limit of 5000 for right context matching - const rightContext = rightFileContent - .substring(0, 5000) - .replaceAll('\r\n', '\n') - .replace(/^[^\S\n]+/, '') // remove leading tabs and whitespaces - let prefixOverlapLastIndex = 0 - if (userEdit) { - const trimmpedUserEdit = userEdit.trim() - prefixOverlapLastIndex = getPrefixOverlapLastIndex(trimmedSuggestion, trimmpedUserEdit) - if (prefixOverlapLastIndex == -1) { - return '' - } - } - const prefixSuffixOverlap = getPrefixSuffixOverlap(trimmedSuggestion, rightContext) - const prefixSuffixOverlapIndex = suggestion.lastIndexOf(prefixSuffixOverlap) - if (prefixSuffixOverlapIndex >= 0) { - const truncated = suggestion.slice(prefixOverlapLastIndex, prefixSuffixOverlapIndex) - return truncated.trim().length ? truncated : '' - } else { - return suggestion - } -} - -/** - * Merge Edit suggestions with current file context. - * @param currentSession current session that contains previous suggestions - * @param currentTextDocument current text document - * @param currentFileContext current file context that contains the cursor position - * @returns InlineCompletionItemWithReferences[] with merged edit suggestions and new diff content in insertText field - */ -export function mergeEditSuggestionsWithFileContext( - currentSession: CodeWhispererSession, - currentTextDocument: TextDocument, - currentFileContext: FileContext -): InlineCompletionItemWithReferences[] { - return currentSession.suggestions - .map(suggestion => { - // generate the previous suggested file content by applying previous suggestion to previous doc content - const previousTextDocument = currentSession.document - const suggestedFileContent = applyUnifiedDiff(previousTextDocument.getText(), suggestion.content) - const currentLeftFileContent = currentFileContext.leftFileContent - const currentRightFileContent = currentFileContext.rightFileContent - const previousLeftFileContent = currentSession.requestContext.fileContext.leftFileContent - const userEdit = currentLeftFileContent.substring(previousLeftFileContent.length) - // if the user moves the cursor backward, deletes some contents, or goes to the next line, discard the suggestion - if (previousLeftFileContent.length > currentLeftFileContent.length || userEdit.includes('\n')) { - return { - insertText: '', - isInlineEdit: true, - itemId: suggestion.itemId, - } - } - // find the first overlap between the user input and the previous suggestion - const mergedRightContent = truncateOverlapWithRightContext( - currentRightFileContent, - suggestedFileContent, - userEdit - ) - // if the merged right content is empty, discard the suggestion - if (!mergedRightContent) { - return { - insertText: '', - isInlineEdit: true, - itemId: suggestion.itemId, - } - } - // generate new diff from the merged content - const newDiff = generateUnifiedDiffWithTimestamps( - currentTextDocument.uri, - currentSession.document.uri, - currentTextDocument.getText(), - currentLeftFileContent + mergedRightContent, - Date.now(), - Date.now() - ) - suggestion.content = newDiff - currentSession.requestContext.fileContext = currentFileContext - currentSession.document = currentTextDocument - return { - insertText: newDiff, - isInlineEdit: true, - itemId: suggestion.itemId, - } - }) - .filter(item => item.insertText !== '') -} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/session/sessionManager.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/session/sessionManager.test.ts index db34f885ff..1b2da25263 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/session/sessionManager.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/session/sessionManager.test.ts @@ -28,6 +28,7 @@ describe('CodeWhispererSession', function () { const data: SessionData = { document: TextDocument.create('file:///rightContext.cs', 'csharp', 1, HELLO_WORLD_IN_CSHARP), + startPreprocessTimestamp: 0, startPosition: { line: 0, character: 0 }, triggerType: 'OnDemand', language: 'csharp', @@ -510,6 +511,7 @@ describe('SessionManager', function () { } const data: SessionData = { document: TextDocument.create('file:///rightContext.cs', 'csharp', 1, HELLO_WORLD_IN_CSHARP), + startPreprocessTimestamp: 0, startPosition: { line: 0, character: 0 }, triggerType: 'OnDemand', language: 'csharp', @@ -529,12 +531,12 @@ describe('SessionManager', function () { assert.strictEqual(manager.getCurrentSession()?.state, 'REQUESTING') }) - it('should deactivate previous session when creating a new session', function () { + it('should not deactivate previous session when creating a new session', function () { const manager = SessionManager.getInstance() const session = manager.createSession(data) session.activate() manager.createSession(data) - assert.strictEqual(session.state, 'CLOSED') + assert.strictEqual(session.state, 'ACTIVE') }) it('should set previous active session trigger decision from discarded REQUESTING session', function () { @@ -548,7 +550,7 @@ describe('SessionManager', function () { assert.strictEqual(session2.previousTriggerDecision, 'Discard') }) - it('should set previous active session trigger decision to new session object', function () { + it('should not set previous active session trigger decision to new session object if it is not closed', function () { const manager = SessionManager.getInstance() const session1 = manager.createSession(data) assert.strictEqual(session1?.state, 'REQUESTING') @@ -557,22 +559,8 @@ describe('SessionManager', function () { const session2 = manager.createSession(data) - assert.strictEqual(session1?.state, 'CLOSED') - assert.strictEqual(session2.previousTriggerDecision, 'Empty') - }) - }) - - describe('closeCurrentSession()', function () { - it('should add the current session to the sessions log if it is active', function () { - const manager = SessionManager.getInstance() - const session = manager.createSession(data) - assert.strictEqual(session.state, 'REQUESTING') - session.activate() - assert.strictEqual(session.state, 'ACTIVE') - manager.closeCurrentSession() - assert.strictEqual(manager.getSessionsLog().length, 1) - assert.strictEqual(manager.getSessionsLog()[0], session) - assert.strictEqual(session.state, 'CLOSED') + assert.strictEqual(session1?.state, 'ACTIVE') + assert.strictEqual(session2.previousTriggerDecision, undefined) }) }) @@ -599,7 +587,6 @@ describe('SessionManager', function () { session2.activate() const session3 = manager.createSession(data) session3.activate() - manager.closeCurrentSession() const result = manager.getPreviousSession() assert.strictEqual(result, session3) assert.strictEqual(manager.getSessionsLog().length, 3) @@ -612,7 +599,6 @@ describe('SessionManager', function () { const session2 = manager.createSession(data) const session3 = manager.createSession(data) session3.activate() - manager.closeCurrentSession() const result = manager.getPreviousSession() assert.strictEqual(result, session3) assert.strictEqual(manager.getSessionsLog().length, 3) @@ -632,7 +618,6 @@ describe('SessionManager', function () { session.activate() const session2 = manager.createSession({ ...data, triggerType: 'AutoTrigger' }) session2.activate() - manager.closeCurrentSession() assert.strictEqual(manager.getSessionsLog().length, 2) const sessionId = session.id @@ -644,7 +629,6 @@ describe('SessionManager', function () { const manager = SessionManager.getInstance() const session = manager.createSession(data) session.activate() - manager.closeCurrentSession() assert.strictEqual(manager.getSessionsLog().length, 1) const sessionId = session.id + '1' @@ -691,46 +675,4 @@ describe('SessionManager', function () { assert.equal(session.getSuggestionState('id4'), 'Discard') }) }) - - describe('getAndUpdateStreakLength()', function () { - it('should return 0 if user rejects suggestion A', function () { - const manager = SessionManager.getInstance() - - assert.equal(manager.getAndUpdateStreakLength(false), -1) - assert.equal(manager.streakLength, 0) - }) - - it('should return -1 for A and 1 for B if user accepts suggestion A and rejects B', function () { - const manager = SessionManager.getInstance() - - assert.equal(manager.getAndUpdateStreakLength(true), -1) - assert.equal(manager.streakLength, 1) - assert.equal(manager.getAndUpdateStreakLength(false), 1) - assert.equal(manager.streakLength, 0) - }) - - it('should return -1 for A, -1 for B, and 2 for C if user accepts A, accepts B, and rejects C', function () { - const manager = SessionManager.getInstance() - - assert.equal(manager.getAndUpdateStreakLength(true), -1) - assert.equal(manager.streakLength, 1) - assert.equal(manager.getAndUpdateStreakLength(true), -1) - assert.equal(manager.streakLength, 2) - assert.equal(manager.getAndUpdateStreakLength(false), 2) - assert.equal(manager.streakLength, 0) - }) - - it('should return -1 for A, -1 for B, and 1 for C if user accepts A, make an edit, accepts B, and rejects C', function () { - const manager = SessionManager.getInstance() - - assert.equal(manager.getAndUpdateStreakLength(true), -1) - assert.equal(manager.streakLength, 1) - assert.equal(manager.getAndUpdateStreakLength(false), 1) - assert.equal(manager.streakLength, 0) - assert.equal(manager.getAndUpdateStreakLength(true), -1) - assert.equal(manager.streakLength, 1) - assert.equal(manager.getAndUpdateStreakLength(false), 1) - assert.equal(manager.streakLength, 0) - }) - }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/session/sessionManager.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/session/sessionManager.ts index cb873a2920..5a0d61a736 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/session/sessionManager.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/session/sessionManager.ts @@ -14,7 +14,6 @@ import { } from '../../../shared/codeWhispererService' import { CodewhispererLanguage } from '../../../shared/languageDetection' import { CodeWhispererSupplementalContext } from '../../../shared/models/model' -import { Logging } from '@aws/language-server-runtimes/server-interface' type SessionState = 'REQUESTING' | 'ACTIVE' | 'CLOSED' | 'ERROR' | 'DISCARD' export type UserDecision = 'Empty' | 'Filter' | 'Discard' | 'Accept' | 'Ignore' | 'Reject' | 'Unseen' @@ -26,6 +25,7 @@ interface CachedSuggestion extends Suggestion { export interface SessionData { document: TextDocument + startPreprocessTimestamp: number startPosition: Position triggerType: CodewhispererTriggerType autoTriggerType?: CodewhispererAutomatedTriggerType @@ -43,9 +43,22 @@ export class CodeWhispererSession { id: string document: TextDocument startTime: number + private _endPreprocessTimestamp: number + get endPreprocessTimestamp() { + return this._endPreprocessTimestamp + } + get preprocessLatency() { + return this.endPreprocessTimestamp - this.startTime + } // Time when Session was closed and final state of user decisions is recorded in suggestionsStates closeTime?: number = 0 - state: SessionState + private _state: SessionState + get state(): SessionState { + return this._state + } + private set state(newState: SessionState) { + this._state = newState + } codewhispererSessionId?: string startPosition: Position = { line: 0, @@ -55,6 +68,13 @@ export class CodeWhispererSession { suggestions: CachedSuggestion[] = [] suggestionsAfterRightContextMerge: InlineCompletionItemWithReferences[] = [] suggestionsStates = new Map() + private _decisionTimestamp = 0 + get decisionMadeTimestamp() { + return this._decisionTimestamp + } + set decisionMadeTimestamp(time: number) { + this._decisionTimestamp = time + } acceptedSuggestionId?: string = undefined responseContext?: ResponseContext triggerType: CodewhispererTriggerType @@ -65,7 +85,14 @@ export class CodeWhispererSession { language: CodewhispererLanguage requestContext: GenerateSuggestionsRequest supplementalMetadata?: CodeWhispererSupplementalContext - timeToFirstRecommendation: number = 0 + private _timeToFirstRecommendation: number = 0 + get timeToFirstRecommendation() { + return this._timeToFirstRecommendation + } + setTimeToFirstRecommendation() { + this._timeToFirstRecommendation = Date.now() - this.startTime + } + credentialStartUrl?: string completionSessionResult?: { [itemId: string]: InlineCompletionStates @@ -79,7 +106,9 @@ export class CodeWhispererSession { customizationArn?: string includeImportsWithSuggestions?: boolean codewhispererSuggestionImportCount: number = 0 - suggestionType?: string + + // Suggestion type specified by the clients, could be either "EDIT" or "COMPLETION" + predictionType?: SuggestionType // Track the most recent itemId for paginated Edit suggestions constructor(data: SessionData) { @@ -96,8 +125,10 @@ export class CodeWhispererSession { this.classifierThreshold = data.classifierThreshold this.customizationArn = data.customizationArn this.supplementalMetadata = data.supplementalMetadata - this.state = 'REQUESTING' - this.startTime = new Date().getTime() + this._state = 'REQUESTING' + this.startTime = data.startPreprocessTimestamp + // Current implementation is the session will be created when preprocess is done + this._endPreprocessTimestamp = Date.now() } // This function makes it possible to stub uuidv4 calls in tests @@ -132,7 +163,7 @@ export class CodeWhispererSession { } } - this.closeTime = new Date().getTime() + this.closeTime = Date.now() this.state = 'CLOSED' } @@ -147,11 +178,12 @@ export class CodeWhispererSession { this.suggestionsStates.set(suggestion.itemId, 'Discard') } - this.closeTime = new Date().getTime() + this.closeTime = Date.now() this.state = 'DISCARD' } + // Should use epoch time for firstCompletionDisplayLatency, totalSessionDisplayTime setClientResultData( completionSessionResult: { [itemId: string]: InlineCompletionStates }, firstCompletionDisplayLatency?: number, @@ -162,7 +194,7 @@ export class CodeWhispererSession { if ( this.state === 'CLOSED' || this.state === 'DISCARD' || - (this.completionSessionResult && this.suggestionType === SuggestionType.COMPLETION) + (this.completionSessionResult && this.predictionType === SuggestionType.COMPLETION) ) { return } @@ -276,8 +308,11 @@ export class SessionManager { private currentSession?: CodeWhispererSession private sessionsLog: CodeWhispererSession[] = [] private maxHistorySize = 5 - streakLength: number = 0 // TODO, for user decision telemetry: accepted suggestions (not necessarily the full corresponding session) should be stored for 5 minutes + private _userDecisionLog: { sessionId: string; decision: UserTriggerDecision }[] = [] + get userDecisionLog() { + return [...this._userDecisionLog] + } private constructor() {} @@ -299,8 +334,6 @@ export class SessionManager { } public createSession(data: SessionData): CodeWhispererSession { - this.closeCurrentSession() - // Remove oldest session from log if (this.sessionsLog.length > this.maxHistorySize) { this.sessionsLog.shift() @@ -321,14 +354,21 @@ export class SessionManager { return session } - closeCurrentSession() { - if (this.currentSession) { - this.closeSession(this.currentSession) - } - } - closeSession(session: CodeWhispererSession) { session.close() + + // Note: it has to be called after session.close() as getAggregatedUserTriggerDecision() will return undefined if getAggregatedUserTriggerDecision() is called before session is closed + const decision = session.getAggregatedUserTriggerDecision() + // As we only care about AR here, pushing Accept/Reject only + if (decision === 'Accept' || decision === 'Reject') { + if (this._userDecisionLog.length === 5) { + this._userDecisionLog.shift() + } + this._userDecisionLog.push({ + sessionId: session.codewhispererSessionId ?? 'undefined', + decision: decision, + }) + } } discardSession(session: CodeWhispererSession) { @@ -364,16 +404,4 @@ export class SessionManager { this.currentSession.activate() } } - - getAndUpdateStreakLength(isAccepted: boolean | undefined): number { - if (!isAccepted && this.streakLength != 0) { - const currentStreakLength = this.streakLength - this.streakLength = 0 - return currentStreakLength - } else if (isAccepted) { - // increment streakLength everytime a suggestion is accepted. - this.streakLength = this.streakLength + 1 - } - return -1 - } } diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/telemetry.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/telemetry/telemetry.ts similarity index 78% rename from server/aws-lsp-codewhisperer/src/language-server/inline-completion/telemetry.ts rename to server/aws-lsp-codewhisperer/src/language-server/inline-completion/telemetry/telemetry.ts index d53d141a2b..dc70bd4e22 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/telemetry.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/telemetry/telemetry.ts @@ -1,15 +1,19 @@ -import { Telemetry, IdeDiagnostic } from '@aws/language-server-runtimes/server-interface' -import { AWSError } from 'aws-sdk' -import { CodeWhispererSession, UserTriggerDecision } from './session/sessionManager' -import { CodeWhispererPerceivedLatencyEvent, CodeWhispererServiceInvocationEvent } from '../../shared/telemetry/types' -import { getCompletionType, isAwsError } from '../../shared/utils' -import { TelemetryService } from '../../shared/telemetry/telemetryService' -import { SuggestionType } from '../../shared/codeWhispererService' +import { Telemetry } from '@aws/language-server-runtimes/server-interface' +import { IdeDiagnostic } from '@amzn/codewhisperer-runtime' +import { ServiceException } from '@smithy/smithy-client' +import { CodeWhispererSession, UserTriggerDecision } from '../session/sessionManager' +import { + CodeWhispererPerceivedLatencyEvent, + CodeWhispererServiceInvocationEvent, +} from '../../../shared/telemetry/types' +import { getCompletionType, isServiceException, getErrorId } from '../../../shared/utils' +import { TelemetryService } from '../../../shared/telemetry/telemetryService' +import { SuggestionType } from '../../../shared/codeWhispererService' export const emitServiceInvocationTelemetry = ( telemetry: Telemetry, session: CodeWhispererSession, - requestId: string + requestId: string | undefined ) => { const duration = new Date().getTime() - session.startTime const data: CodeWhispererServiceInvocationEvent = { @@ -46,10 +50,10 @@ export const emitServiceInvocationTelemetry = ( export const emitServiceInvocationFailure = ( telemetry: Telemetry, session: CodeWhispererSession, - error: Error | AWSError + error: Error | ServiceException ) => { const duration = new Date().getTime() - session.startTime - const codewhispererRequestId = isAwsError(error) ? error.requestId : undefined + const codewhispererRequestId = isServiceException(error) ? error.$metadata.requestId : undefined const data: CodeWhispererServiceInvocationEvent = { codewhispererRequestId: codewhispererRequestId, @@ -79,8 +83,8 @@ export const emitServiceInvocationFailure = ( data, errorData: { reason: error.name || 'UnknownError', - errorCode: isAwsError(error) ? error.code : undefined, - httpStatusCode: isAwsError(error) ? error.statusCode : undefined, + errorCode: getErrorId(error), + httpStatusCode: isServiceException(error) ? error.$metadata.httpStatusCode : undefined, }, }) } @@ -106,6 +110,36 @@ export const emitPerceivedLatencyTelemetry = (telemetry: Telemetry, session: Cod }) } +export async function emitEmptyUserTriggerDecisionTelemetry( + telemetryService: TelemetryService, + session: CodeWhispererSession, + timeSinceLastUserModification?: number, + streakLength?: number +) { + // Prevent reporting user decision if it was already sent + if (session.reportedUserDecision) { + return + } + + // Non-blocking + emitAggregatedUserTriggerDecisionTelemetry( + telemetryService, + session, + 'Empty', + timeSinceLastUserModification, + 0, + 0, + [], + [], + streakLength + ) + .then() + .catch(e => {}) + .finally(() => { + session.reportedUserDecision = true + }) +} + export const emitUserTriggerDecisionTelemetry = async ( telemetry: Telemetry, telemetryService: TelemetryService, @@ -126,7 +160,7 @@ export const emitUserTriggerDecisionTelemetry = async ( // Edits show one suggestion sequentially (with pagination), so use latest itemId state; // Completions show multiple suggestions together, so aggregate all states const userTriggerDecision = - session.suggestionType === SuggestionType.EDIT + session.predictionType === SuggestionType.EDIT ? session.getUserTriggerDecision(itemId) : session.getAggregatedUserTriggerDecision() diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/userTriggerDecision.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/telemetry/userTriggerDecision.test.ts similarity index 98% rename from server/aws-lsp-codewhisperer/src/language-server/inline-completion/userTriggerDecision.test.ts rename to server/aws-lsp-codewhisperer/src/language-server/inline-completion/telemetry/userTriggerDecision.test.ts index b554b5ef23..cb5d12ef91 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/userTriggerDecision.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/telemetry/userTriggerDecision.test.ts @@ -9,17 +9,17 @@ import { TestFeatures } from '@aws/language-server-runtimes/testing' import * as assert from 'assert' import sinon, { StubbedInstance, stubInterface } from 'ts-sinon' import { TextDocument } from 'vscode-languageserver-textdocument' -import { CodewhispererServerFactory } from './codeWhispererServer' +import { CodewhispererServerFactory } from '../codeWhispererServer' import { CodeWhispererServiceBase, ResponseContext, Suggestion, SuggestionType, -} from '../../shared/codeWhispererService' -import { CodeWhispererSession, SessionManager } from './session/sessionManager' -import { TelemetryService } from '../../shared/telemetry/telemetryService' -import { initBaseTestServiceManager, TestAmazonQServiceManager } from '../../shared/amazonQServiceManager/testUtils' -import { getNormalizeOsName } from './auto-trigger/autoTrigger' +} from '../../../shared/codeWhispererService' +import { CodeWhispererSession, SessionManager } from '../session/sessionManager' +import { TelemetryService } from '../../../shared/telemetry/telemetryService' +import { initBaseTestServiceManager, TestAmazonQServiceManager } from '../../../shared/amazonQServiceManager/testUtils' +import { getNormalizeOsName } from '../auto-trigger/autoTrigger' describe('Telemetry', () => { const sandbox = sinon.createSandbox() @@ -145,7 +145,7 @@ describe('Telemetry', () => { }, } const EMPTY_RESULT = { items: [], sessionId: '' } - const classifierResult = getNormalizeOsName() !== 'Linux' ? 0.4114381148145918 : 0.46733811481459187 + const classifierResult = getNormalizeOsName() !== 'Linux' ? 0.6014326616203989 : 0.61475353067264 let features: TestFeatures let server: Server @@ -505,7 +505,7 @@ describe('Telemetry', () => { sinon.assert.called(telemetryServiceSpy) }) - it('should not emit User Decision event when session results are received after session was closed', async () => { + it('should not emit User Decision event after second trigger is received', async () => { setServiceResponse(DEFAULT_SUGGESTIONS, { ...EXPECTED_RESPONSE_CONTEXT, codewhispererSessionId: 'cwspr-session-id-1', @@ -519,7 +519,7 @@ describe('Telemetry', () => { sinon.assert.notCalled(sessionManagerSpy.closeSession) sinon.assert.notCalled(telemetryServiceSpy) - // Send second completion request to close first one + // Send second completion request should not close first one setServiceResponse(DEFAULT_SUGGESTIONS, { ...EXPECTED_RESPONSE_CONTEXT, codewhispererSessionId: 'cwspr-session-id-2', @@ -528,7 +528,7 @@ describe('Telemetry', () => { assert.equal(firstSession.state, 'DISCARD') assert.notEqual(firstSession, sessionManager.getCurrentSession()) - sinon.assert.calledWithExactly(sessionManagerSpy.closeSession, firstSession) + sinon.assert.notCalled(sessionManagerSpy.closeSession) // Test that session reports it's status when second request is received const expectedEvent = aUserTriggerDecision({ state: 'DISCARD', @@ -1251,7 +1251,7 @@ describe('Telemetry', () => { triggerType: 'AutoTrigger', autoTriggerType: 'SpecialCharacters', triggerCharacter: '(', - classifierResult: getNormalizeOsName() === 'Linux' ? 0.30173811481459184 : 0.2458381148145919, + classifierResult: getNormalizeOsName() === 'Linux' ? 0.5748673583477094 : 0.5611518554232429, classifierThreshold: 0.43, language: 'csharp', requestContext: { diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeDiffTracker.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codeDiffTracker.test.ts similarity index 100% rename from server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeDiffTracker.test.ts rename to server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codeDiffTracker.test.ts diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeDiffTracker.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codeDiffTracker.ts similarity index 97% rename from server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeDiffTracker.ts rename to server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codeDiffTracker.ts index 5e8072cc1f..8e93c6ec4f 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codeDiffTracker.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codeDiffTracker.ts @@ -1,8 +1,8 @@ import { distance } from 'fastest-levenshtein' import { Position } from '@aws/language-server-runtimes/server-interface' -import { Features } from '../types' -import { getErrorMessage, getUnmodifiedAcceptedTokens } from '../../shared/utils' -import { CodewhispererLanguage } from '../../shared/languageDetection' +import { Features } from '../../types' +import { getErrorMessage, getUnmodifiedAcceptedTokens } from '../../../shared/utils' +import { CodewhispererLanguage } from '../../../shared/languageDetection' export interface AcceptedSuggestionEntry { fileUrl: string diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codeEditTracker.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codeEditTracker.ts index 070b6695bc..90c9d9fdcb 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codeEditTracker.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codeEditTracker.ts @@ -3,15 +3,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { - TextDocumentItem, - InitializeParams, - Logging, - Disposable, - TextDocument, -} from '@aws/language-server-runtimes/server-interface' +import { TextDocumentItem, Logging, Disposable, TextDocument } from '@aws/language-server-runtimes/server-interface' import { CodeWhispererSupplementalContext, DocumentSnapshot, FileSnapshotContent } from '../../../shared/models/model' -import { generateDiffContexts } from '../diffUtils' +import { generateDiffContexts } from '../utils/diffUtils' /** * Configuration for the RecentEditTracker diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codePercentage.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codePercentageTracker.test.ts similarity index 98% rename from server/aws-lsp-codewhisperer/src/language-server/inline-completion/codePercentage.test.ts rename to server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codePercentageTracker.test.ts index 74c192c8f4..8bb79626ee 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codePercentage.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codePercentageTracker.test.ts @@ -1,6 +1,6 @@ import sinon, { StubbedInstance, stubInterface } from 'ts-sinon' -import { CodePercentageTracker } from './codePercentage' -import { TelemetryService } from '../../shared/telemetry/telemetryService' +import { CodePercentageTracker } from './codePercentageTracker' +import { TelemetryService } from '../../../shared/telemetry/telemetryService' describe('CodePercentage', () => { const LANGUAGE_ID = 'python' diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codePercentage.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codePercentageTracker.ts similarity index 96% rename from server/aws-lsp-codewhisperer/src/language-server/inline-completion/codePercentage.ts rename to server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codePercentageTracker.ts index 0513443a35..d32089598b 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/codePercentage.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/codePercentageTracker.ts @@ -1,6 +1,6 @@ -import { CodeWhispererCodePercentageEvent } from '../../shared/telemetry/types' -import { TelemetryService } from '../../shared/telemetry/telemetryService' -import { CodewhispererLanguage } from '../../shared/languageDetection' +import { CodeWhispererCodePercentageEvent } from '../../../shared/telemetry/types' +import { TelemetryService } from '../../../shared/telemetry/telemetryService' +import { CodewhispererLanguage } from '../../../shared/languageDetection' const CODE_PERCENTAGE_INTERVAL = 5 * 60 * 1000 const INSERT_CUTOFF_THRESHOLD = 50 diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/streakTracker.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/streakTracker.test.ts new file mode 100644 index 0000000000..4c69879115 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/streakTracker.test.ts @@ -0,0 +1,85 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +import * as assert from 'assert' +import { StreakTracker } from './streakTracker' + +describe('StreakTracker', function () { + let tracker: StreakTracker + + beforeEach(function () { + StreakTracker.reset() + tracker = StreakTracker.getInstance() + }) + + afterEach(function () { + StreakTracker.reset() + }) + + describe('getInstance', function () { + it('should return the same instance (singleton)', function () { + const instance1 = StreakTracker.getInstance() + const instance2 = StreakTracker.getInstance() + assert.strictEqual(instance1, instance2) + }) + + it('should create new instance after reset', function () { + const instance1 = StreakTracker.getInstance() + StreakTracker.reset() + const instance2 = StreakTracker.getInstance() + assert.notStrictEqual(instance1, instance2) + }) + }) + + describe('getAndUpdateStreakLength', function () { + it('should return -1 for undefined input', function () { + const result = tracker.getAndUpdateStreakLength(undefined) + assert.strictEqual(result, -1) + }) + + it('should return -1 and increment streak on acceptance', function () { + const result = tracker.getAndUpdateStreakLength(true) + assert.strictEqual(result, -1) + }) + + it('should return -1 for rejection with zero streak', function () { + const result = tracker.getAndUpdateStreakLength(false) + assert.strictEqual(result, -1) + }) + + it('should return previous streak on rejection after acceptances', function () { + tracker.getAndUpdateStreakLength(true) + tracker.getAndUpdateStreakLength(true) + tracker.getAndUpdateStreakLength(true) + + const result = tracker.getAndUpdateStreakLength(false) + assert.strictEqual(result, 3) + }) + + it('should handle acceptance after rejection', function () { + tracker.getAndUpdateStreakLength(true) + tracker.getAndUpdateStreakLength(true) + + const resetResult = tracker.getAndUpdateStreakLength(false) + assert.strictEqual(resetResult, 2) + + tracker.getAndUpdateStreakLength(true) + const newResult = tracker.getAndUpdateStreakLength(true) + assert.strictEqual(newResult, -1) + }) + }) + + describe('cross-instance consistency', function () { + it('should maintain state across getInstance calls', function () { + const tracker1 = StreakTracker.getInstance() + tracker1.getAndUpdateStreakLength(true) + tracker1.getAndUpdateStreakLength(true) + + const tracker2 = StreakTracker.getInstance() + const result = tracker2.getAndUpdateStreakLength(false) + assert.strictEqual(result, 2) + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/streakTracker.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/streakTracker.ts new file mode 100644 index 0000000000..21d56c4d74 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/tracker/streakTracker.ts @@ -0,0 +1,42 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +/** + * Tracks acceptance streak across both completion and edit suggestion types. + * Shared singleton to maintain consistent streak count between different code paths. + */ +export class StreakTracker { + private static _instance?: StreakTracker + private streakLength: number = 0 + + private constructor() {} + + public static getInstance(): StreakTracker { + if (!StreakTracker._instance) { + StreakTracker._instance = new StreakTracker() + } + return StreakTracker._instance + } + + public static reset() { + StreakTracker._instance = undefined + } + + /** + * Updates and returns the current streak length based on acceptance status. + * @param isAccepted Whether the suggestion was accepted + * @returns Current streak length before update, or -1 if no change + */ + public getAndUpdateStreakLength(isAccepted: boolean | undefined): number { + if (!isAccepted && this.streakLength !== 0) { + const currentStreakLength = this.streakLength + this.streakLength = 0 + return currentStreakLength + } else if (isAccepted) { + this.streakLength += 1 + } + return -1 + } +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/trigger.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/trigger.ts deleted file mode 100644 index 06453355a8..0000000000 --- a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/trigger.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { CodewhispererLanguage } from '../../shared/languageDetection' -import { SessionManager } from './session/sessionManager' -import { InlineCompletionWithReferencesParams } from '@aws/language-server-runtimes/protocol' -import { editPredictionAutoTrigger } from './auto-trigger/editPredictionAutoTrigger' -import { CursorTracker } from './tracker/cursorTracker' -import { RecentEditTracker } from './tracker/codeEditTracker' -import { CodeWhispererServiceBase, CodeWhispererServiceToken } from '../../shared/codeWhispererService' - -export class NepTrigger {} - -export function shouldTriggerEdits( - service: CodeWhispererServiceBase, - fileContext: { - fileUri: string - filename: string - programmingLanguage: { - languageName: CodewhispererLanguage - } - leftFileContent: string - rightFileContent: string - }, - inlineParams: InlineCompletionWithReferencesParams, - cursorTracker: CursorTracker, - recentEditsTracker: RecentEditTracker, - sessionManager: SessionManager, - editsEnabled: boolean -): NepTrigger | undefined { - if (!editsEnabled) { - return undefined - } - // edits type suggestion is only implemented in bearer token based IDE for now, we dont want to expose such suggestions to other platforms - if (!(service instanceof CodeWhispererServiceToken)) { - return undefined - } - - const documentChangeParams = inlineParams.documentChangeParams - const hasDocChangedParams = - documentChangeParams?.contentChanges && - documentChangeParams.contentChanges.length > 0 && - documentChangeParams.contentChanges[0].text !== undefined - - // if the client does not emit document change for the trigger, use left most character. - const triggerCharacters = hasDocChangedParams - ? documentChangeParams.contentChanges[0].text - : (fileContext.leftFileContent.trim().at(-1) ?? '') - - const previousDecision = sessionManager.getPreviousSession()?.getAggregatedUserTriggerDecision() - const res = editPredictionAutoTrigger({ - fileContext: fileContext, - lineNum: inlineParams.position.line, - char: triggerCharacters, - previousDecision: previousDecision ?? '', - cursorHistory: cursorTracker, - recentEdits: recentEditsTracker, - }) - - if (res.shouldTrigger) { - return new NepTrigger() - } else { - return undefined - } -} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/diffUtils.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/diffUtils.test.ts new file mode 100644 index 0000000000..0dbf3318a7 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/diffUtils.test.ts @@ -0,0 +1,419 @@ +import * as assert from 'assert' +import { + categorizeUnifieddiff, + extractAdditions, + getAddedAndDeletedLines, + getCharacterDifferences, + generateDiffContexts, +} from './diffUtils' + +describe('extractAdditions', function () { + interface Case { + udiff: string + expected: string + } + + const cases: Case[] = [ + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator/src/main/hello/MathUtil.java +@@ -1,9 +1,10 @@ + public class MathUtil { + // write a function to add 2 numbers + public static int add(int a, int b) { + ++ return a + b; + } + + // write a function to subtract 2 numbers + public static int subtract(int a, int b) { + return a - b;`, + expected: ' return a + b;', + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator/src/main/hello/MathUtil.java +@@ -1,9 +1,17 @@ + public class MathUtil { + // write a function to add 2 numbers + public static int add(int a, int b) { + ++ if (a > Integer.MAX_VALUE - b){ ++ throw new IllegalArgumentException("Overflow!"); ++ } ++ else if (a < Integer.MIN_VALUE - b){ ++ throw new IllegalArgumentException("Underflow"); ++ } ++ else{ ++ return a + b; ++ } + } + + // write a function to subtract 2 numbers + public static int subtract(int a, int b) { + return a - b;`, + expected: ` if (a > Integer.MAX_VALUE - b){ + throw new IllegalArgumentException("Overflow!"); + } + else if (a < Integer.MIN_VALUE - b){ + throw new IllegalArgumentException("Underflow"); + } + else{ + return a + b; + }`, + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java +@@ -6,7 +6,11 @@ + + // write a function to subtract 2 numbers + public static int subtract(int a, int b) { + return a - b; + } +- ++ ++ // write a function to multiply 2 numbers ++ public static int multiply(int a, int b) { ++ return a * b; ++ } + }`, + expected: ` + // write a function to multiply 2 numbers + public static int multiply(int a, int b) { + return a * b; + }`, + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java +@@ -3,7 +3,9 @@ + public static int add(int a, int b) { + return a + b; + } + + // write a function to subtract 2 numbers +- ++ public static int subtract(int a, int b) { ++ return a - b; ++ } + }`, + expected: ` public static int subtract(int a, int b) { + return a - b; + }`, + }, + ] + + for (let i = 0; i < cases.length; i++) { + it(`case ${i}`, function () { + const c = cases[i] + const udiff = c.udiff + const expected = c.expected + + const actual = extractAdditions(udiff) + assert.strictEqual(actual, expected) + }) + } +}) + +describe('categorizeUnifieddiffV2v2 should return correct type (addOnly, edit, deleteOnly)', function () { + interface Case { + udiff: string + } + + describe('addOnly', function () { + const addOnlyCases: Case[] = [ + { + udiff: `--- a/src/main/hello/MathUtil.java ++++ b/src/main/hello/MathUtil.java +@@ -10,6 +10,6 @@ public class MathUtil { + } + + public static int multiply(int a, int b) { +- return a * b; ++ return a * b * c; + } + }`, + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java +@@ -6,2 +6,3 @@ +- return a * b; ++ return a * b * ++ c * d; + }`, + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java +@@ -6,7 +6,11 @@ + + // write a function to subtract 2 numbers + public static int subtract(int a, int b) { + return a - b; + } +- ++ ++ // write a function to multiply 2 numbers ++ public static int multiply(int a, int b) { ++ return a * b; ++ } + }`, + }, + { + udiff: `--- a/src/main/hello/MathUtil.java ++++ b/src/main/hello/MathUtil.java +@@ -8,5 +8,10 @@ public class MathUtil { + public static int subtract(int a, int b) { + return a - b; + } +- ++ ++ ++ // write a function to multiply 2 numbers ++ public static int multiply(int a, int b) { ++ return a * b; ++ } + }`, + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java +@@ -6,7 +6,11 @@ + + // write a function to subtract 2 numbers + public static int subtract(int a, int b) { + return a - b; + } +- ++ ++ // write a function to multiply 2 numbers ++ public static int multiply(int a, int b) { ++ return a * b; ++ } + }`, + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator/src/main/hello/MathUtil.java +@@ -1,9 +1,10 @@ + public class MathUtil { + // write a function to add 2 numbers + public static int add(int a, int b) { + ++ return a + b; + } + + // write a function to subtract 2 numbers + public static int subtract(int a, int b) { + return a - b;`, + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java +@@ -3,7 +3,9 @@ + public static int add(int a, int b) { + return a + b; + } + + // write a function to subtract 2 numbers +- ++ public static int subtract(int a, int b) { ++ return a - b; ++ } + }`, + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator-2/src/main/hello/MathUtil.java +@@ -4,8 +4,8 @@ + return a + b; + } + + // write a function to subtract 2 numbers + public static int subtract(int a, int b) { +- return ++ return a - b; + } + }`, + }, + { + udiff: `--- file:///Volumes/workplace/ide/sample_projects/Calculator/src/main/hello/LRUCache.java ++++ file:///Volumes/workplace/ide/sample_projects/Calculator/src/main/hello/LRUCache.java +@@ -7,7 +7,11 @@ + private Map map; + private DoubleLinkedList list; + private int capacity; + + // get +- public LruCache ++ public LruCache(int capacity) { ++ this.capacity = capacity; ++ map = new HashMap<>(); ++ list = new DoubleLinkedList(); ++ } + }`, + }, + ] + + for (let i = 0; i < addOnlyCases.length; i++) { + it(`case ${i}`, function () { + const actual = categorizeUnifieddiff(addOnlyCases[i].udiff) + assert.strictEqual(actual, 'addOnly') + }) + } + }) + + describe('edit', function () { + const cases: Case[] = [ + { + udiff: `--- a/src/main/hello/MathUtil.java ++++ b/src/main/hello/MathUtil.java +@@ -1,6 +1,6 @@ + public class MathUtil { + // write a function to add 2 numbers +- public static int add(int a, int b) { ++ public static double add(double a, double b) { + return a + b; + } + `, + }, + { + udiff: `--- a/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.ts ++++ b/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.ts +@@ -502,11 +502,7 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { + : undefined + } + +- private withProfileArn(request: T): T { +- if (!this.profileArn) return request +- +- return { ...request, profileArn: this.profileArn } +- } ++ // ddddddddddddddddd + + async generateSuggestions(request: BaseGenerateSuggestionsRequest): Promise { + // Cast is now safe because GenerateTokenSuggestionsRequest extends GenerateCompletionsRequest`, + }, + { + udiff: `--- file:///Users/atona/workplace/NEP/language-servers/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/textDocumentUtils.ts ++++ file:///Users/atona/workplace/NEP/language-servers/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/textDocumentUtils.ts +@@ -15,11 +15,11 @@ + return '' + } + } + + export const getTextDocument = async (uri: string, workspace: any, logging: any): Promise => { +- let ++ if (!textDocument) { + if (!textDocument) { + try { + const content = await workspace.fs.readFile(URI.parse(uri).fsPath) + const languageId = getLanguageIdFromUri(uri) + textDocument = TextDocument.create(uri, languageId, 0, content)`, + }, + { + udiff: `--- a/src/main/hello/MathUtil.java ++++ b/src/main/hello/MathUtil.java +@@ -12,4 +12,5 @@ public class MathUtil { + + // write a function to multiply 2 numbers + public static int multiply(int a, int b) { +- return a * b; ++ return a * b * c; ++ }`, + }, + ] + + for (let i = 0; i < cases.length; i++) { + it(`case ${i}`, function () { + const actual = categorizeUnifieddiff(cases[i].udiff) + assert.strictEqual(actual, 'edit') + }) + } + }) +}) + +describe('diffUtils', () => { + describe('getAddedAndDeletedLines', () => { + const SAMPLE_UNIFIED_DIFF = `--- a/file.txt ++++ b/file.txt +@@ -1,3 +1,3 @@ + line1 +-old line ++new line + line3` + it('should extract added and deleted lines from unified diff', () => { + const result = getAddedAndDeletedLines(SAMPLE_UNIFIED_DIFF) + + assert.deepEqual(result.addedLines, ['new line']) + assert.deepEqual(result.deletedLines, ['old line']) + }) + + it('should handle empty diff', () => { + const result = getAddedAndDeletedLines('') + assert.deepEqual(result.addedLines, []) + assert.deepEqual(result.deletedLines, []) + }) + }) + + describe('getCharacterDifferences', () => { + const ADDED_LINES = ['hello world'] + const DELETED_LINES = ['hello there'] + it('should calculate character differences using LCS', () => { + const result = getCharacterDifferences(ADDED_LINES, DELETED_LINES) + + assert.equal(result.charactersAdded, 4) + assert.equal(result.charactersRemoved, 4) + }) + + it('should handle empty added lines', () => { + const result = getCharacterDifferences([], DELETED_LINES) + + assert.equal(result.charactersAdded, 0) + assert.equal(result.charactersRemoved, 11) // 'hello there' = 11 chars + }) + + it('should handle empty deleted lines', () => { + const result = getCharacterDifferences(ADDED_LINES, []) + + assert.equal(result.charactersAdded, 11) // 'hello world' = 11 chars + assert.equal(result.charactersRemoved, 0) + }) + }) + + describe('generateDiffContexts', () => { + const TEST_FILE_PATH = '/test/file.ts' + const CURRENT_CONTENT = 'current content' + const OLD_CONTENT = 'old content' + const MAX_CONTEXTS = 5 + const SNAPSHOT_CONTENTS = [ + { + filePath: TEST_FILE_PATH, + content: OLD_CONTENT, + timestamp: Date.now() - 1000, + }, + ] + it('should generate diff contexts from snapshots', () => { + const result = generateDiffContexts(TEST_FILE_PATH, CURRENT_CONTENT, SNAPSHOT_CONTENTS, MAX_CONTEXTS) + + assert.equal(result.isUtg, false) + assert.equal(result.isProcessTimeout, false) + assert.equal(result.strategy, 'recentEdits') + assert.equal(typeof result.latency, 'number') + assert.equal(typeof result.contentsLength, 'number') + }) + + it('should return empty context for no snapshots', () => { + const result = generateDiffContexts(TEST_FILE_PATH, 'content', [], MAX_CONTEXTS) + + assert.equal(result.isUtg, false) + assert.equal(result.isProcessTimeout, false) + assert.equal(result.supplementalContextItems.length, 0) + assert.equal(result.contentsLength, 0) + assert.equal(result.latency, 0) + assert.equal(result.strategy, 'recentEdits') + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/diffUtils.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/diffUtils.ts new file mode 100644 index 0000000000..5d32f03589 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/diffUtils.ts @@ -0,0 +1,509 @@ +/*! + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +import { parsePatch, Hunk, createTwoFilesPatch } from 'diff' +import { CodeWhispererSupplementalContext, CodeWhispererSupplementalContextItem } from '../../../shared/models/model' +import { trimSupplementalContexts } from '../../../shared/supplementalContextUtil/supplementalContextUtil' +import { Position, TextDocument, Range } from '@aws/language-server-runtimes/protocol' +import { SuggestionType } from '../../../shared/codeWhispererService' +import { getPrefixSuffixOverlap, truncateOverlapWithRightContext } from './mergeRightUtils' + +/** + * Generates a unified diff format between old and new file contents + * + * @param oldFilePath - Path to the old version of the file + * @param newFilePath - Path to the new version of the file + * @param oldContent - Content of the old version + * @param newContent - Content of the new version + * @param oldTimestamp - Timestamp of the old version + * @param newTimestamp - Timestamp of the new version + * @param contextSize - Number of context lines to include in the diff + * @returns Unified diff string + */ +export function generateUnifiedDiffWithTimestamps( + oldFilePath: string, + newFilePath: string, + oldContent: string, + newContent: string, + oldTimestamp: number, + newTimestamp: number, + contextSize: number = 3 +): string { + const patchResult = createTwoFilesPatch( + oldFilePath, + newFilePath, + oldContent, + newContent, + String(oldTimestamp), + String(newTimestamp), + { context: contextSize } + ) + + // Remove unused headers + const lines = patchResult.split('\n') + if (lines.length >= 2 && lines[0].startsWith('Index:')) { + lines.splice(0, 2) + return lines.join('\n') + } + + return patchResult +} + +/** + * Represents a snapshot content of a file at a specific point in time + */ +export interface FileSnapshotContent { + /** URI of the file */ + readonly filePath: string + /** Content of the file */ + readonly content: string + /** Timestamp when the snapshot was taken */ + readonly timestamp: number +} + +/** + * Generates supplemental contexts from snapshot contents and current content + * + * @param filePath - Path to the file + * @param currentContent - Current content of the file + * @param snapshotContents - List of snapshot contents sorted by timestamp (oldest first) + * @param maxContexts - Maximum number of supplemental contexts to return + * @returns CodeWhispererSupplementalContext object containing diffs between snapshots and current content + */ +export function generateDiffContexts( + filePath: string, + currentContent: string, + snapshotContents: FileSnapshotContent[], + maxContexts: number +): CodeWhispererSupplementalContext { + if (snapshotContents.length === 0) { + return { + isUtg: false, + isProcessTimeout: false, + supplementalContextItems: [], + contentsLength: 0, + latency: 0, + strategy: 'recentEdits', + } + } + + const startTime = Date.now() + const supplementalContextItems: CodeWhispererSupplementalContextItem[] = [] + const currentTimestamp = Date.now() + + // Process snapshots from newest to oldest + for (let i = snapshotContents.length - 1; i >= 0; i--) { + const snapshot = snapshotContents[i] + try { + const unifiedDiff = generateUnifiedDiffWithTimestamps( + snapshot.filePath, + filePath, + snapshot.content, + currentContent, + snapshot.timestamp, + currentTimestamp + ) + + // Only add non-empty diffs + if (unifiedDiff.trim().length > 0) { + supplementalContextItems.push({ + filePath: snapshot.filePath, + content: unifiedDiff, + score: 1.0, // Default score for recent edits + }) + } + } catch (err) { + // TODO: logging + // console.error(`Failed to generate diff: ${err}`) + } + } + + const trimmedContextItems = trimSupplementalContexts(supplementalContextItems, maxContexts) + const contentsLength = trimmedContextItems.reduce((sum, ctx) => sum + ctx.content.length, 0) + const latency = Date.now() - startTime + + return { + isUtg: false, + isProcessTimeout: false, + supplementalContextItems: trimmedContextItems, + contentsLength, + latency, + strategy: 'recentEdits', + } +} + +export function getAddedAndDeletedLines(unifiedDiff: string): { addedLines: string[]; deletedLines: string[] } { + const lines = unifiedDiff.split('\n') + const addedLines = lines.filter(line => line.startsWith('+') && !line.startsWith('+++')).map(line => line.slice(1)) + const deletedLines = lines + .filter(line => line.startsWith('-') && !line.startsWith('---')) + .map(line => line.slice(1)) + return { + addedLines, + deletedLines, + } +} + +/** + * Calculate character differences between added and deleted text blocks using LCS + */ +export interface CharDiffResult { + charactersAdded: number + charactersRemoved: number +} + +/** + * Find longest common subsequence length between two strings + */ +function lcsLength(str1: string, str2: string): number[][] { + const m = str1.length + const n = str2.length + const dp = Array(m + 1) + .fill(null) + .map(() => Array(n + 1).fill(0)) + + for (let i = 1; i <= m; i++) { + for (let j = 1; j <= n; j++) { + if (str1[i - 1] === str2[j - 1]) { + dp[i][j] = dp[i - 1][j - 1] + 1 + } else { + dp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]) + } + } + } + + return dp +} + +/** + * Calculate character differences between added and deleted blocks + */ +export function getCharacterDifferences(addedLines: string[], deletedLines: string[]): CharDiffResult { + const addedText = addedLines.join('\n') + const deletedText = deletedLines.join('\n') + + if (addedText.length === 0) { + return { charactersAdded: 0, charactersRemoved: deletedText.length } + } + + if (deletedText.length === 0) { + return { charactersAdded: addedText.length, charactersRemoved: 0 } + } + + const lcsTable = lcsLength(deletedText, addedText) + const lcsLen = lcsTable[deletedText.length][addedText.length] + + return { + charactersAdded: addedText.length - lcsLen, + charactersRemoved: deletedText.length - lcsLen, + } +} + +export function processEditSuggestion( + unifiedDiff: string, + triggerPosition: Position, + document: TextDocument, + rightContext: string +): { suggestionContent: string; type: SuggestionType } { + // Assume it's an edit if anything goes wrong, at the very least it will not be rendered incorrectly + let diffCategory: ReturnType = 'edit' + try { + diffCategory = categorizeUnifieddiff(unifiedDiff, triggerPosition.line) + } catch (e) { + // We dont have logger here.... + diffCategory = 'edit' + } + + if (diffCategory === 'addOnly') { + const preprocessAdd = extractAdditions(unifiedDiff) + const leftContextAtTriggerLine = document.getText( + Range.create(Position.create(triggerPosition.line, 0), triggerPosition) + ) + /** + * SHOULD NOT remove the entire overlapping string, the way inline suggestion prefix matching work depends on where it triggers + * For example (^ note where user triggers) + * console.lo + * ^ + * if LSP returns `g('foo')` instead of `.log()` the suggestion will be discarded because prefix doesnt match + */ + const processedAdd = removeOverlapCodeFromSuggestion(leftContextAtTriggerLine, preprocessAdd) + const mergedWithRightContext = truncateOverlapWithRightContext(rightContext, processedAdd) + return { + suggestionContent: mergedWithRightContext, + type: SuggestionType.COMPLETION, + } + } else { + return { + suggestionContent: unifiedDiff, + type: SuggestionType.EDIT, + } + } +} + +// TODO: MAKE it a class and abstract all the business parsing logic within the classsssss so we dont need to redo the same thing again and again +interface UnifiedDiff { + linesWithoutHeaders: string[] + firstMinusIndex: number + firstPlusIndex: number + minusIndexes: number[] + plusIndexes: number[] + hunk: Hunk +} + +// TODO: refine +export function readUdiff(unifiedDiff: string): UnifiedDiff { + let hunk: Hunk | undefined + try { + const patches = parsePatch(unifiedDiff) + if (patches.length !== 1) { + throw new Error(`Provided unified diff from has 0 or more than 1 patches`) + } + hunk = patches[0].hunks[0] + if (!hunk) { + throw new Error(`Null hunk`) + } + } catch (e) { + throw e + } + + // TODO: Should use hunk instead of parsing manually + const lines = unifiedDiff.split('\n') + const headerEndIndex = lines.findIndex(l => l.startsWith('@@')) + if (headerEndIndex === -1) { + throw new Error('not able to parse') + } + const relevantLines = lines.slice(headerEndIndex + 1) + if (relevantLines.length === 0) { + throw new Error('not able to parse') + } + + const minusIndexes: number[] = [] + const plusIndexes: number[] = [] + for (let i = 0; i < relevantLines.length; i++) { + const l = relevantLines[i] + if (l.startsWith('-')) { + minusIndexes.push(i) + } else if (l.startsWith('+')) { + plusIndexes.push(i) + } + } + + const firstMinusIndex = relevantLines.findIndex(s => s.startsWith('-')) + const firstPlusIndex = relevantLines.findIndex(s => s.startsWith('+')) + + // TODO: Comment these out as they are used for a different version of addonly type determination logic in case the current implementation doesn't work. + // Could remove later if we are sure current imple works. + /** + * Concatenate all contiguous added lines (i.e., unbroken sequence of "+"s). + * Exclude all newlines when concatenating, so we get a single line representing the new text + */ + // let singleLine = '' + // let prev: number | undefined + // for (const idx of plusIndexes) { + // if (!prev || idx === prev + 1) { + // const removedPlus = relevantLines[idx].substring(1) + // const removedStartNewline = trimStartNewline(removedPlus) + // singleLine += removedStartNewline + // } else { + // break + // } + // } + + return { + linesWithoutHeaders: relevantLines, + firstMinusIndex: firstMinusIndex, + firstPlusIndex: firstPlusIndex, + minusIndexes: minusIndexes, + plusIndexes: plusIndexes, + hunk: hunk, + } +} + +// Theoretically, we should always pass userTriggerAtLine, keeping it nullable for easier testing for now +export function categorizeUnifieddiff( + unifiedDiff: string, + userTriggerAtLine?: number +): 'addOnly' | 'deleteOnly' | 'edit' { + try { + const d = readUdiff(unifiedDiff) + const hunk = d.hunk + const firstMinusIndex = d.firstMinusIndex + const firstPlusIndex = d.firstPlusIndex + const diffWithoutHeaders = d.linesWithoutHeaders + + // Shouldn't be the case but if there is no - nor +, assume it's an edit + if (firstMinusIndex === -1 && firstPlusIndex === -1) { + return 'edit' + } + + // If first "EDIT" line is not where users trigger, it must be EDIT + // Note hunk.start is 1 based index + const firstLineEdited = hunk.oldStart - 1 + Math.min(...d.minusIndexes, ...d.plusIndexes) + if (userTriggerAtLine !== undefined && userTriggerAtLine !== firstLineEdited) { + return 'edit' + } + + // Naive case, only + + if (firstMinusIndex === -1 && firstPlusIndex !== -1) { + return 'addOnly' + } + + // Naive case, only - + if (firstMinusIndex !== -1 && firstPlusIndex === -1) { + return 'deleteOnly' + } + + const minusIndexes = d.minusIndexes + const plusIndexes = d.plusIndexes + + // If there are multiple (> 1) non empty '-' lines, it must be edit + const c = minusIndexes.reduce((acc: number, cur: number): number => { + if (diffWithoutHeaders[cur].trim().length > 0) { + return acc++ + } + + return acc + }, 0) + + if (c > 1) { + return 'edit' + } + + // If last '-' line is followed by '+' block, it could be addonly + if (plusIndexes[0] === minusIndexes[minusIndexes.length - 1] + 1) { + /** + ------------------------------- + - return + + return a - b; + ------------------------------- + commonPrefix = "return " + minusLinesDelta = "" + + -------------------------------- + -\t\t\t + +\treturn a - b; + -------------------------------- + commonPrefix = "\t" + minusLinesDelta = "\t\t" + + * + * + * + */ + const minusLine = diffWithoutHeaders[minusIndexes[minusIndexes.length - 1]].substring(1) + const pluscode = extractAdditions(unifiedDiff) + + // If minusLine subtract the longest common substring of minusLine and plugcode and it's empty string, it's addonly + const commonPrefix = longestCommonPrefix(minusLine, pluscode) + const minusLinesDelta = minusLine.substring(commonPrefix.length) + if (minusLinesDelta.trim().length === 0) { + return 'addOnly' + } + + /** + ------------------------------- + - return a * b; + + return a * b * c; + ------------------------------- + commonPrefix = "return a * b" + minusLinesDelta = ";" + pluscodeDelta = " * c;" + * + */ + const pluscodeDelta = pluscode.substring(commonPrefix.length) + if (pluscodeDelta.endsWith(minusLinesDelta)) { + return 'addOnly' + } + } + + return 'edit' + } catch (e) { + return 'edit' + } +} + +// TODO: current implementation here assumes service only return 1 chunk of edits (consecutive lines) and hacky +export function extractAdditions(unifiedDiff: string): string { + const lines = unifiedDiff.split('\n') + let completionSuggestion = '' + let isInAdditionBlock = false + + for (const line of lines) { + // Skip diff headers (files) + if (line.startsWith('+++') || line.startsWith('---')) { + continue + } + + // Skip hunk headers (@@ lines) + if (line.startsWith('@@')) { + continue + } + + // Handle additions + if (line.startsWith('+')) { + completionSuggestion += line.substring(1) + '\n' + isInAdditionBlock = true + } else if (isInAdditionBlock && !line.startsWith('+')) { + // End of addition block + isInAdditionBlock = false + } + } + + // Remove trailing newline + return completionSuggestion.trimEnd() +} + +/** + * + * example + * code = 'return' + * suggestion = 'return a + b;' + * output = ' a + b;' + */ +export function removeOverlapCodeFromSuggestion(code: string, suggestion: string): string { + const suggestionLines = suggestion.split('\n') + const firstLineSuggestion = suggestionLines[0] + + // Find the common string in code surfix and prefix of suggestion + const s = getPrefixSuffixOverlap(code, firstLineSuggestion) + + // Remove overlap s from suggestion + return suggestion.substring(s.length) +} + +export function longestCommonPrefix(str1: string, str2: string): string { + const minLength = Math.min(str1.length, str2.length) + let prefix = '' + + for (let i = 0; i < minLength; i++) { + if (str1[i] === str2[i]) { + prefix += str1[i] + } else { + break + } + } + + return prefix +} + +// TODO: They are used for a different version of addonly type determination logic in case the current implementation doesn't work. +// Could remove later if we are sure current impl works. +// function trimStartNewline(str: string): string { +// return str.replace(/^[\n\r]+/, '') +// } + +// function hasOneContiguousInsert(original: string, changed: string) { +// const delta = changed.length - original.length +// if (delta <= 0) { +// // Changed string must be longer +// return false +// } + +// let p, s +// for (p = 0; original[p] === changed[p] && p < original.length; ++p); +// for (s = original.length - 1; original[s] === changed[s + delta] && s >= 0; --s); + +// return p === s + 1 +// } diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/mergeRightUtils.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/mergeRightUtils.test.ts new file mode 100644 index 0000000000..5fbcb0d717 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/mergeRightUtils.test.ts @@ -0,0 +1,185 @@ +import * as assert from 'assert' +import { + getPrefixSuffixOverlap, + truncateOverlapWithRightContext, + mergeSuggestionsWithRightContext, +} from './mergeRightUtils' +import { Suggestion } from '../../../shared/codeWhispererService' +import { HELLO_WORLD_IN_CSHARP, HELLO_WORLD_WITH_WINDOWS_ENDING } from '../../../shared/testUtils' + +describe('mergeRightUtils', () => { + describe('getPrefixSuffixOverlap', () => { + it('should find overlap between suffix and prefix', () => { + const result = getPrefixSuffixOverlap('adwg31', '31ggrs') + assert.equal(result, '31') + }) + + it('should return empty string when no overlap', () => { + const result = getPrefixSuffixOverlap('hello', 'world') + assert.equal(result, '') + }) + + it('should handle empty strings', () => { + const result = getPrefixSuffixOverlap('', 'test') + assert.equal(result, '') + }) + + it('should find full overlap when second string is prefix of first', () => { + const result = getPrefixSuffixOverlap('hello', 'hello world') + assert.equal(result, 'hello') + }) + }) + + describe('truncateOverlapWithRightContext', () => { + const HELLO_WORLD = 'Console.WriteLine("Hello World!");' + it('should truncate overlap with right context', () => { + const rightContext = '");' + const result = truncateOverlapWithRightContext(rightContext, HELLO_WORLD) + assert.equal(result, 'Console.WriteLine("Hello World!') + }) + + it('should return original suggestion when no overlap', () => { + const rightContext = 'different content' + const result = truncateOverlapWithRightContext(rightContext, HELLO_WORLD) + assert.equal(result, HELLO_WORLD) + }) + + it('should handle right context with leading whitespace', () => { + const suggestion = 'const x = 1;' + const rightContext = ' ; // comment' + const result = truncateOverlapWithRightContext(rightContext, suggestion) + assert.equal(result, 'const x = 1') + }) + + it('should return empty suggestion when right context equals line content ', () => { + const result1 = truncateOverlapWithRightContext(HELLO_WORLD, HELLO_WORLD) + assert.deepEqual(result1, '') + // Without trimStart, this test would fail because the function doesn't trim leading new line from right context + const result2 = truncateOverlapWithRightContext(HELLO_WORLD_IN_CSHARP.trimStart(), HELLO_WORLD_IN_CSHARP) + assert.deepEqual(result2, '') + }) + + it('should not handle the case where right context fully matches suggestion but starts with a newline ', () => { + const result = truncateOverlapWithRightContext('\n' + HELLO_WORLD_IN_CSHARP, HELLO_WORLD_IN_CSHARP) + // Even though right context and suggestion are equal, the newline of right context doesn't get trimmed while the newline of suggestion gets trimmed + // As a result, we end up with no overlap + assert.deepEqual(result, HELLO_WORLD_IN_CSHARP) + }) + + it('should return truncated suggestion when right context matches end of the suggestion', () => { + // File contents will be `nsole.WriteLine("Hello World!");` + // Suggestion will be the full HELLO_WORLD + // Final truncated result should be the first two letters of HELLO_WORLD + const result = truncateOverlapWithRightContext(HELLO_WORLD.substring(2), HELLO_WORLD) + + assert.deepEqual(result, HELLO_WORLD.substring(0, 2)) + }) + + it('should trim right-context tabs and whitespaces until first newline', () => { + const suggestion = '{\n return a + b;\n }' + const rightContent = ' \n }\n\n }\n}' + const expected_result = '{\n return a + b;' + const result = truncateOverlapWithRightContext(rightContent, suggestion) + + assert.deepEqual(result, expected_result) + }) + + it('should handle different line endings', () => { + const suggestion = '{\n return a + b;\n }' + const rightContent = '\r\n }\r\n}\r\n}' + const expected_result = '{\n return a + b;' + const result = truncateOverlapWithRightContext(rightContent, suggestion) + + assert.deepEqual(result, expected_result) + }) + + it('should handle windows line endings for files', () => { + const result = truncateOverlapWithRightContext( + HELLO_WORLD_WITH_WINDOWS_ENDING, + HELLO_WORLD_WITH_WINDOWS_ENDING.replaceAll('\r', '') + ) + assert.deepEqual(result, '') + }) + }) + + describe('mergeSuggestionsWithRightContext', () => { + const mockSuggestions: Suggestion[] = [ + { + itemId: 'item1', + content: 'console.log("test");', + references: [ + { + licenseName: 'MIT', + url: 'https://example.com', + repository: 'test-repo', + recommendationContentSpan: { start: 0, end: 10 }, + }, + ], + mostRelevantMissingImports: [ + { + statement: 'import { test } from "test"', + }, + ], + }, + ] + + it('should merge suggestions with right context', () => { + const rightContext = '");' + const result = mergeSuggestionsWithRightContext(rightContext, mockSuggestions, false) + + assert.equal(result.length, 1) + assert.equal(result[0].itemId, 'item1') + assert.equal(result[0].insertText, 'console.log("test') + assert.equal(result[0].mostRelevantMissingImports, undefined) + }) + + it('should include imports when enabled', () => { + const rightContext = '' + const result = mergeSuggestionsWithRightContext(rightContext, mockSuggestions, true) + + assert.equal(result[0].mostRelevantMissingImports?.length, 1) + assert.equal(result[0].mostRelevantMissingImports?.[0].statement, 'import { test } from "test"') + }) + + it('should filter references based on insert text length', () => { + const suggestions: Suggestion[] = [ + { + itemId: 'item1', + content: 'short', + references: [ + { + licenseName: 'MIT', + url: 'https://example.com', + repository: 'test-repo', + recommendationContentSpan: { start: 10, end: 20 }, // start > insertText.length + }, + ], + }, + ] + + const result = mergeSuggestionsWithRightContext('', suggestions, false) + + assert.equal(result[0].references, undefined) + }) + + it('should include range when provided', () => { + const range = { start: { line: 0, character: 0 }, end: { line: 0, character: 5 } } + const result = mergeSuggestionsWithRightContext('', mockSuggestions, false, range) + + assert.deepEqual(result[0].range, range) + }) + + it('should handle suggestions with no references', () => { + const suggestions: Suggestion[] = [ + { + itemId: 'item1', + content: 'test content', + }, + ] + + const result = mergeSuggestionsWithRightContext('', suggestions, false) + + assert.equal(result[0].references, undefined) + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/mergeRightUtils.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/mergeRightUtils.ts new file mode 100644 index 0000000000..c6451d7d82 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/mergeRightUtils.ts @@ -0,0 +1,75 @@ +import { InlineCompletionItemWithReferences, Range } from '@aws/language-server-runtimes/server-interface' +import { Suggestion } from '../../../shared/codeWhispererService' + +/** + * Returns the longest overlap between the Suffix of firstString and Prefix of second string + * getPrefixSuffixOverlap("adwg31", "31ggrs") = "31" + */ +export function getPrefixSuffixOverlap(firstString: string, secondString: string) { + let i = Math.min(firstString.length, secondString.length) + while (i > 0) { + if (secondString.slice(0, i) === firstString.slice(-i)) { + break + } + i-- + } + return secondString.slice(0, i) +} + +export function truncateOverlapWithRightContext(rightFileContent: string, suggestion: string): string { + const trimmedSuggestion = suggestion.trim() + // limit of 5000 for right context matching + const rightContext = rightFileContent + .substring(0, 5000) + .replaceAll('\r\n', '\n') + .replace(/^[^\S\n]+/, '') // remove leading tabs and whitespaces + const overlap = getPrefixSuffixOverlap(trimmedSuggestion, rightContext) + const overlapIndex = suggestion.lastIndexOf(overlap) + if (overlapIndex >= 0) { + const truncated = suggestion.slice(0, overlapIndex) + return truncated.trim().length ? truncated : '' + } else { + return suggestion + } +} + +export const mergeSuggestionsWithRightContext = ( + rightFileContext: string, + suggestions: Suggestion[], + includeImportsWithSuggestions: boolean, + range?: Range +): InlineCompletionItemWithReferences[] => { + return suggestions.map(suggestion => { + const insertText: string = truncateOverlapWithRightContext(rightFileContext, suggestion.content ?? '') + let references = suggestion.references + ?.filter( + ref => + !( + ref.recommendationContentSpan?.start && insertText.length <= ref.recommendationContentSpan.start + ) && insertText.length + ) + .map(r => { + return { + licenseName: r.licenseName, + referenceUrl: r.url, + referenceName: r.repository, + position: r.recommendationContentSpan && { + startCharacter: r.recommendationContentSpan.start, + endCharacter: r.recommendationContentSpan.end + ? Math.min(r.recommendationContentSpan.end, insertText.length - 1) + : r.recommendationContentSpan.end, + }, + } + }) + + return { + itemId: suggestion.itemId, + insertText: insertText, + range, + references: references?.length ? references : undefined, + mostRelevantMissingImports: includeImportsWithSuggestions + ? suggestion.mostRelevantMissingImports + : undefined, + } + }) +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/textDocumentUtils.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/textDocumentUtils.test.ts new file mode 100644 index 0000000000..3aad7dbcd7 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/textDocumentUtils.test.ts @@ -0,0 +1,113 @@ +import assert = require('assert') +import { getLanguageIdFromUri, getTextDocument } from './textDocumentUtils' +import { TextDocument } from '@aws/language-server-runtimes/server-interface' +import sinon from 'ts-sinon' + +describe('textDocumentUtils', () => { + describe('getLanguageIdFromUri', () => { + it('should return python for notebook cell URIs', () => { + const uri = 'vscode-notebook-cell:/some/path/notebook.ipynb#cell1' + assert.strictEqual(getLanguageIdFromUri(uri), 'python') + }) + + it('should return abap for files with ABAP extensions', () => { + const uris = ['file:///path/to/file.asprog'] + + uris.forEach(uri => { + assert.strictEqual(getLanguageIdFromUri(uri), 'abap') + }) + }) + + it('should return empty string for non-ABAP files', () => { + const uris = ['file:///path/to/file.js', 'file:///path/to/file.ts', 'file:///path/to/file.py'] + + uris.forEach(uri => { + assert.strictEqual(getLanguageIdFromUri(uri), '') + }) + }) + + it('should return empty string for invalid URIs', () => { + const invalidUris = ['', 'invalid-uri', 'file:///'] + + invalidUris.forEach(uri => { + assert.strictEqual(getLanguageIdFromUri(uri), '') + }) + }) + + it('should log errors when provided with a logging object', () => { + const mockLogger = { + log: sinon.spy(), + } + + const invalidUri = {} as string // Force type error + getLanguageIdFromUri(invalidUri, mockLogger) + + sinon.assert.calledOnce(mockLogger.log) + sinon.assert.calledWith(mockLogger.log, sinon.match(/Error parsing URI to determine language:.*/)) + }) + + it('should handle URIs without extensions', () => { + const uri = 'file:///path/to/file' + assert.strictEqual(getLanguageIdFromUri(uri), '') + }) + }) + + describe('getTextDocument', () => { + let mockWorkspace: any + let mockLogging: any + + beforeEach(() => { + mockWorkspace = { + getTextDocument: sinon.stub(), + fs: { + readFile: sinon.stub(), + }, + } + mockLogging = { + log: sinon.stub(), + } + }) + + it('should return existing text document from workspace', async () => { + const existingDoc = TextDocument.create('file:///test.js', 'javascript', 1, 'content') + mockWorkspace.getTextDocument.resolves(existingDoc) + + const result = await getTextDocument('file:///test.js', mockWorkspace, mockLogging) + + assert.strictEqual(result, existingDoc) + sinon.assert.calledOnceWithExactly(mockWorkspace.getTextDocument, 'file:///test.js') + sinon.assert.notCalled(mockWorkspace.fs.readFile) + }) + + it('should create text document from file system when not in workspace', async () => { + mockWorkspace.getTextDocument.resolves(null) + mockWorkspace.fs.readFile.resolves('file content') + + const result = await getTextDocument('file:///test.py', mockWorkspace, mockLogging) + + assert.strictEqual(result?.uri, 'file:///test.py') + assert.strictEqual(result?.getText(), 'file content') + assert.strictEqual(result?.languageId, '') + sinon.assert.calledOnce(mockWorkspace.fs.readFile) + }) + + it('should handle file system read errors', async () => { + mockWorkspace.getTextDocument.resolves(null) + mockWorkspace.fs.readFile.rejects(new Error('File not found')) + + const result = await getTextDocument('file:///missing.js', mockWorkspace, mockLogging) + + assert.strictEqual(result, null) + sinon.assert.calledWith(mockLogging.log, sinon.match(/Unable to load from.*File not found/)) + }) + + it('should use correct language ID for ABAP files', async () => { + mockWorkspace.getTextDocument.resolves(null) + mockWorkspace.fs.readFile.resolves('ABAP content') + + const result = await getTextDocument('file:///test.asprog', mockWorkspace, mockLogging) + + assert.strictEqual(result?.languageId, 'abap') + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/textDocumentUtils.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/textDocumentUtils.ts new file mode 100644 index 0000000000..8813dd5736 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/textDocumentUtils.ts @@ -0,0 +1,31 @@ +import { TextDocument } from '@aws/language-server-runtimes/server-interface' +import { ABAP_EXTENSIONS } from '../contants/constants' +import { URI } from 'vscode-uri' + +export const getLanguageIdFromUri = (uri: string, logging?: any): string => { + try { + if (uri.startsWith('vscode-notebook-cell:')) { + // use python for now as lsp does not support JL cell language detection + return 'python' + } + const extension = uri.split('.').pop()?.toLowerCase() + return ABAP_EXTENSIONS.has(extension || '') ? 'abap' : '' + } catch (err) { + logging?.log(`Error parsing URI to determine language: ${uri}: ${err}`) + return '' + } +} + +export const getTextDocument = async (uri: string, workspace: any, logging: any): Promise => { + let textDocument = await workspace.getTextDocument(uri) + if (!textDocument) { + try { + const content = await workspace.fs.readFile(URI.parse(uri).fsPath) + const languageId = getLanguageIdFromUri(uri) + textDocument = TextDocument.create(uri, languageId, 0, content) + } catch (err) { + logging.log(`Unable to load from ${uri}: ${err}`) + } + } + return textDocument +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/triggerUtils.test.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/triggerUtils.test.ts new file mode 100644 index 0000000000..4fc4ed559a --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/triggerUtils.test.ts @@ -0,0 +1,268 @@ +import * as assert from 'assert' +import * as sinon from 'sinon' +import { shouldTriggerEdits, NepTrigger, isDocumentChangedFromNewLine, lastTokenFromString } from './triggerUtils' +import { SessionManager } from '../session/sessionManager' +import { CursorTracker } from '../tracker/cursorTracker' +import { RecentEditTracker } from '../tracker/codeEditTracker' +import { CodeWhispererServiceToken, CodeWhispererServiceIAM, FileContext } from '../../../shared/codeWhispererService' +import * as editPredictionAutoTrigger from '../auto-trigger/editPredictionAutoTrigger' +import { InlineCompletionWithReferencesParams } from '@aws/language-server-runtimes/server-interface' + +describe('triggerUtils', () => { + let service: sinon.SinonStubbedInstance + let iamService: sinon.SinonStubbedInstance + let cursorTracker: sinon.SinonStubbedInstance + let recentEditsTracker: sinon.SinonStubbedInstance + let sessionManager: sinon.SinonStubbedInstance + let editPredictionAutoTriggerStub: sinon.SinonStub + + const fileContext = { + leftFileContent: 'const x = 1;', + rightFileContent: '', + filename: 'test.ts', + programmingLanguage: { languageName: 'typescript' }, + } as FileContext + + const inlineParams = { + textDocument: { uri: 'file:///test.ts' }, + position: { line: 0, character: 12 }, + context: { triggerKind: 1 }, + documentChangeParams: { + contentChanges: [{ text: ';' }], + }, + } as InlineCompletionWithReferencesParams + + beforeEach(() => { + service = sinon.createStubInstance(CodeWhispererServiceToken) + iamService = sinon.createStubInstance(CodeWhispererServiceIAM) + cursorTracker = sinon.createStubInstance(CursorTracker) + recentEditsTracker = sinon.createStubInstance(RecentEditTracker) + sessionManager = sinon.createStubInstance(SessionManager) + editPredictionAutoTriggerStub = sinon.stub(editPredictionAutoTrigger, 'editPredictionAutoTrigger') + }) + + afterEach(() => { + sinon.restore() + }) + + describe('lastTokenFromString', function () { + interface TestCase { + input: string + expected: string + } + + const cases: TestCase[] = [ + { + input: `line=str`, + expected: `str`, + }, + { + input: `public class Main `, + expected: `Main`, + }, + { + input: `const foo = 5`, + expected: `5`, + }, + { + input: `const fooString = 'foo'`, + expected: `foo`, + }, + { + input: `main(`, + expected: `main`, + }, + { + input: `public class Main { + // print foo + `, + expected: `foo`, + }, + ] + + for (let i = 0; i < cases.length; i++) { + const c = cases[i] + it(`case ${i}`, function () { + const actual = lastTokenFromString(c.input) + assert.strictEqual(actual, c.expected) + }) + } + }) + + describe('isDocumentChangedFromNewLine', function () { + interface TestCase { + input: string + expected: boolean + } + + const cases: TestCase[] = [ + { + input: '\n ', + expected: true, + }, + { + input: '\n\t\t\t', + expected: true, + }, + { + input: '\n ', + expected: true, + }, + { + input: '\n ', + expected: true, + }, + { + input: '\n def', + expected: false, + }, + { + input: ' \n ', + expected: false, + }, + { + input: '\t\n ', + expected: false, + }, + { + input: ' def\n\t', + expected: false, + }, + ] + + for (let i = 0; i < cases.length; i++) { + const c = cases[i] + it(`case ${i}`, function () { + const actual = isDocumentChangedFromNewLine(c.input) + assert.strictEqual(actual, c.expected) + }) + } + }) + + describe('shouldTriggerEdits', () => { + it('should return undefined when edits not enabled', () => { + const result = shouldTriggerEdits( + service, + fileContext, + inlineParams, + cursorTracker, + recentEditsTracker, + sessionManager, + false + ) + + assert.equal(result, undefined) + }) + + it('should return undefined when service is not token-based', () => { + const result = shouldTriggerEdits( + iamService, + fileContext, + inlineParams, + cursorTracker, + recentEditsTracker, + sessionManager, + true + ) + + assert.equal(result, undefined) + }) + + it('should return NepTrigger when auto trigger returns shouldTrigger true', () => { + editPredictionAutoTriggerStub.returns({ shouldTrigger: true }) + sessionManager.getPreviousSession.returns(undefined) + + const result = shouldTriggerEdits( + service, + fileContext, + inlineParams, + cursorTracker, + recentEditsTracker, + sessionManager, + true + ) + + assert.ok(result instanceof NepTrigger) + sinon.assert.calledWith(editPredictionAutoTriggerStub, { + fileContext, + lineNum: 0, + char: ';', + previousDecision: '', + cursorHistory: cursorTracker, + recentEdits: recentEditsTracker, + }) + }) + + it('should return undefined when auto trigger returns shouldTrigger false', () => { + editPredictionAutoTriggerStub.returns({ shouldTrigger: false }) + sessionManager.getPreviousSession.returns(undefined) + + const result = shouldTriggerEdits( + service, + fileContext, + inlineParams, + cursorTracker, + recentEditsTracker, + sessionManager, + true + ) + + assert.equal(result, undefined) + }) + + it('should use last character from file content when no document change', () => { + const paramsWithoutDocChange = { + ...inlineParams, + documentChangeParams: undefined, + } + editPredictionAutoTriggerStub.returns({ shouldTrigger: true }) + sessionManager.getPreviousSession.returns(undefined) + + shouldTriggerEdits( + service, + fileContext, + paramsWithoutDocChange, + cursorTracker, + recentEditsTracker, + sessionManager, + true + ) + + sinon.assert.calledWith(editPredictionAutoTriggerStub, { + fileContext, + lineNum: 0, + char: ';', + previousDecision: '', + cursorHistory: cursorTracker, + recentEdits: recentEditsTracker, + }) + }) + + it('should use previous session decision when available', () => { + const mockSession = { + getAggregatedUserTriggerDecision: sinon.stub().returns('Accept'), + } + sessionManager.getPreviousSession.returns(mockSession as any) + editPredictionAutoTriggerStub.returns({ shouldTrigger: true }) + + shouldTriggerEdits( + service, + fileContext, + inlineParams, + cursorTracker, + recentEditsTracker, + sessionManager, + true + ) + + sinon.assert.calledWith(editPredictionAutoTriggerStub, { + fileContext, + lineNum: 0, + char: ';', + previousDecision: 'Accept', + cursorHistory: cursorTracker, + recentEdits: recentEditsTracker, + }) + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/triggerUtils.ts b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/triggerUtils.ts new file mode 100644 index 0000000000..1ec8f9ae00 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/inline-completion/utils/triggerUtils.ts @@ -0,0 +1,131 @@ +import { SessionManager } from '../session/sessionManager' +import { + DidChangeTextDocumentParams, + InlineCompletionWithReferencesParams, +} from '@aws/language-server-runtimes/protocol' +import { editPredictionAutoTrigger } from '../auto-trigger/editPredictionAutoTrigger' +import { CursorTracker } from '../tracker/cursorTracker' +import { RecentEditTracker } from '../tracker/codeEditTracker' +import { + ClientFileContextClss, + CodeWhispererServiceBase, + CodeWhispererServiceToken, + FileContext, +} from '../../../shared/codeWhispererService' + +export class NepTrigger {} + +export function shouldTriggerEdits( + service: CodeWhispererServiceBase, + fileContext: FileContext, + inlineParams: InlineCompletionWithReferencesParams, + cursorTracker: CursorTracker, + recentEditsTracker: RecentEditTracker, + sessionManager: SessionManager, + editsEnabled: boolean +): NepTrigger | undefined { + if (!editsEnabled) { + return undefined + } + // edits type suggestion is only implemented in bearer token based IDE for now, we dont want to expose such suggestions to other platforms + if (!(service instanceof CodeWhispererServiceToken)) { + return undefined + } + + const documentChangeParams = inlineParams.documentChangeParams + const hasDocChangedParams = + documentChangeParams?.contentChanges && + documentChangeParams.contentChanges.length > 0 && + documentChangeParams.contentChanges[0].text !== undefined + + // if the client does not emit document change for the trigger, use left most character. + const triggerCharacters = hasDocChangedParams + ? documentChangeParams.contentChanges[0].text + : (fileContext.leftFileContent.trim().at(-1) ?? '') + + const previousDecision = sessionManager.getPreviousSession()?.getAggregatedUserTriggerDecision() + const res = editPredictionAutoTrigger({ + fileContext: fileContext, + lineNum: inlineParams.position.line, + char: triggerCharacters, + previousDecision: previousDecision ?? '', + cursorHistory: cursorTracker, + recentEdits: recentEditsTracker, + }) + + if (res.shouldTrigger) { + return new NepTrigger() + } else { + return undefined + } +} + +export function inferTriggerChar( + fileContext: ClientFileContextClss, + changes: DidChangeTextDocumentParams | undefined +): string { + if (changes?.contentChanges && changes.contentChanges.length > 0 && changes.contentChanges[0].text !== undefined) { + const chars = changes.contentChanges[0].text + // TODO: A deletion document change will be empty string with non empty range length, however not sure why we can't access TextDocumentContentChangeEvent.rangeLength here + if (chars.length === 0) { + return fileContext.leftFileContent.trim().at(-1) ?? '' + } + + if (chars.length > 1) { + // TODO: monkey patch, should refine these logic + // Users hit newline and IDE or other extensions auto format for users + // For such documentChanges might be '\n ' (newline + 4 space) + if (isDocumentChangedFromNewLine(chars)) { + return '\n' + } + + if (chars === `''`) { + return `'` + } + + if (chars === `""`) { + return `"` + } + + if (chars === '()') { + return '(' + } + + if (chars === '{}') { + return '{' + } + + if (chars === '[]') { + return '[' + } + } + + return chars + } + + // if the client does not emit document change for the trigger, use left most character. + return fileContext.leftFileContent.trim().at(-1) ?? '' +} + +/** + * A proxy to estimate the provided string is from enter key + * Input = ['\n\t', '\n ', '\n ', ' \ndef '] + * Input = [true, true, true, false] + */ +export function isDocumentChangedFromNewLine(s: string) { + return /^\n[\s\t]+$/.test(s) +} + +// TODO: Should refine the logic +export function lastTokenFromString(str: string): string { + const tokens = str.trim().split(/\s+/) + if (tokens.length === 0) { + return '' + } + + // This step can filter out most naive case however doesnt work for `line=str` such style without empty space + const candidate = tokens[tokens.length - 1] + // Only run regex against a small portion of string instead of the entire str + const finalCandate = candidate.match(/\w+/g) || [] + return finalCandate.at(-1) ?? '' +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/localProjectContext/localProjectContextServer.ts b/server/aws-lsp-codewhisperer/src/language-server/localProjectContext/localProjectContextServer.ts index 1fa2b8301b..9cff865038 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/localProjectContext/localProjectContextServer.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/localProjectContext/localProjectContextServer.ts @@ -1,4 +1,10 @@ -import { InitializeParams, Server, TextDocumentSyncKind } from '@aws/language-server-runtimes/server-interface' +import { + GetSupplementalContextParams, + InitializeParams, + Server, + SupplementalContextItem, + TextDocumentSyncKind, +} from '@aws/language-server-runtimes/server-interface' import { getOrThrowBaseTokenServiceManager } from '../../shared/amazonQServiceManager/AmazonQTokenServiceManager' import { TelemetryService } from '../../shared/telemetry/telemetryService' import { LocalProjectContextController } from '../../shared/localProjectContextController' @@ -127,6 +133,23 @@ export const LocalProjectContextServer = } }) + const onGetSupplementalContext = async ( + param: GetSupplementalContextParams + ): Promise => { + if (localProjectContextController) { + const request = { + query: '', + filePath: param.filePath, + target: 'codemap', + } + const response = await localProjectContextController.queryInlineProjectContext(request) + return response + } + return [] + } + + lsp.extensions.onGetSupplementalContext(onGetSupplementalContext) + lsp.onDidSaveTextDocument(async event => { try { const filePaths = VSCWindowsOverride diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/artifactManager.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/artifactManager.ts index 0b510e7c64..7530dc647c 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/artifactManager.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/artifactManager.ts @@ -22,16 +22,23 @@ const zipFileName = 'artifact.zip' const sourceCodeFolderName = 'sourceCode' const packagesFolderName = 'packages' const thirdPartyPackageFolderName = 'thirdpartypackages' +const customTransformationFolderName = 'customTransformation' +const filteredExtensions = ['.suo', '.meta', '.user', '.obj', '.tmp', '.log', '.dbmdl', '.jfm', '.pdb'] +const filteredDirectories = ['.git', 'bin', 'obj', '.idea', '.vs', 'artifactworkspace', 'node_modules', 'nuget.config'] +const failedCopies: string[] = [] +const filteredPathRegex: RegExp[] = [/.+\.(vspscc|vssscc)$/] export class ArtifactManager { private workspace: Workspace private logging: Logging private workspacePath: string + private solutionRootPath: string - constructor(workspace: Workspace, logging: Logging, workspacePath: string) { + constructor(workspace: Workspace, logging: Logging, workspacePath: string, solutionRootPath: string) { this.workspace = workspace this.logging = logging this.workspacePath = workspacePath + this.solutionRootPath = solutionRootPath } async createZip(request: StartTransformRequest): Promise { @@ -157,16 +164,21 @@ export class ArtifactManager { async createRequirementJsonContent(request: StartTransformRequest): Promise { const projects: Project[] = [] - for (const project of request.ProjectMetadata) { const sourceCodeFilePaths = project.SourceCodeFilePaths.filter(filePath => filePath) const codeFiles: CodeFile[] = [] const references: References[] = [] - for (const filePath of sourceCodeFilePaths) { try { + if (this.shouldFilterFile(filePath)) { + continue + } await this.copySourceFile(request.SolutionRootPath, filePath) const contentHash = await this.calculateMD5Async(filePath) + if (contentHash.length == 0) { + //if can't generate hash then file copy failed previously + continue + } const relativePath = this.normalizeSourceFileRelativePath(request.SolutionRootPath, filePath) codeFiles.push({ contentMd5Hash: contentHash, @@ -178,6 +190,9 @@ export class ArtifactManager { } for (const reference of project.ExternalReferences) { + if (this.shouldFilterFile(reference.AssemblyFullPath)) { + continue + } try { const relativePath = this.normalizeReferenceFileRelativePath( reference.RelativePath, @@ -192,7 +207,7 @@ export class ArtifactManager { relativePath: relativePath, isThirdPartyPackage: false, } - await this.processPrivatePackages(request, reference, artifactReference) + await this.processPrivatePackages(request, artifactReference) references.push(artifactReference) } catch (error) { this.logging.log('Failed to process file: ' + error + reference.AssemblyFullPath) @@ -241,16 +256,13 @@ export class ArtifactManager { } as RequirementJson } - async processPrivatePackages( - request: StartTransformRequest, - reference: ExternalReference, - artifactReference: References - ): Promise { + async processPrivatePackages(request: StartTransformRequest, artifactReference: References): Promise { if (!request.PackageReferences) { return } var thirdPartyPackage = request.PackageReferences.find( - p => p.IsPrivatePackage && reference.RelativePath.includes(p.Id) + // should be toLower because we to lower case the reference paths + p => p.IsPrivatePackage && artifactReference.relativePath.includes(p.Id.concat('.dll').toLowerCase()) ) if (thirdPartyPackage) { artifactReference.isThirdPartyPackage = true @@ -282,6 +294,31 @@ export class ArtifactManager { this.logging.log('Cannot find artifacts folder') return '' } + + const customTransformationPath = path.join(this.solutionRootPath, customTransformationFolderName) + try { + await fs.promises.access(customTransformationPath) + try { + this.logging.log(`Adding custom transformation folder to artifact: ${customTransformationPath}`) + const artifactCustomTransformationPath = path.join(folderPath, customTransformationFolderName) + await fs.promises.cp(customTransformationPath, artifactCustomTransformationPath, { recursive: true }) + } catch (error) { + this.logging.warn(`Failed to copy custom transformation folder: ${error}`) + } + } catch { + this.logging.log( + `Custom transformation folder not accessible (not found or no permissions): ${customTransformationPath}` + ) + } + this.logging.log( + `Files with extensions ${filteredExtensions.join(', ')} are not zipped, as they are not necessary for transformation` + ) + this.logging.log( + `Files in directories ${filteredDirectories.join(', ')} are not zipped, as they are not necessary for transformation` + ) + if (failedCopies.length > 0) { + this.logging.log(`Files - ${failedCopies.join(',')} - could not be copied.`) + } const zipPath = path.join(this.workspacePath, zipFileName) this.logging.log('Zipping files to ' + zipPath) await this.zipDirectory(folderPath, zipPath) @@ -374,17 +411,21 @@ export class ArtifactManager { //Packages folder has been deleted to avoid duplicates in artifacts.zip return } - - return new Promise((resolve, reject) => { - fs.copyFile(sourceFilePath, destFilePath, err => { - if (err) { - this.logging.log(`Failed to copy from ${sourceFilePath} and error is ${err}`) - reject(err) - } else { - resolve() - } + if (this.shouldFilterFile(sourceFilePath)) { + return + } else { + return new Promise((resolve, reject) => { + fs.copyFile(sourceFilePath, destFilePath, err => { + if (err) { + this.logging.log(`Failed to copy from ${sourceFilePath} and error is ${err}`) + failedCopies.push(sourceFilePath) + resolve() + } else { + resolve() + } + }) }) - }) + } } async calculateMD5Async(filePath: string): Promise { @@ -400,4 +441,17 @@ export class ArtifactManager { return '' } } + shouldFilterFile(filePath: string): boolean { + if (filteredExtensions.includes(path.extname(filePath).toLowerCase())) { + return true + } + const dirPath = path.dirname(filePath).toLowerCase() + const pathSegments = dirPath.split(path.sep) + + if (pathSegments.some(segment => filteredDirectories.includes(segment))) { + return true + } + + return filteredPathRegex.some(regex => regex.test(filePath)) + } } diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/converter.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/converter.ts index dc29d20b57..bf97bc94e6 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/converter.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/converter.ts @@ -1,28 +1,22 @@ -import { AWSError } from 'aws-sdk' -import { PromiseResult } from 'aws-sdk/lib/request' import { StartTransformRequest, StartTransformResponse, TransformProjectMetadata } from './models' -import CodeWhispererTokenUserClient = require('../../client/token/codewhispererbearertokenclient') +import { + StartTransformationRequest, + StartTransformationResponse, + TransformationDotNetRuntimeEnv, +} from '@amzn/codewhisperer-runtime' import { Logging } from '@aws/language-server-runtimes/server-interface' -//sequence of targetFrameworkMap matters a lot because we are using as sorted indices of old to new .net versions -export const targetFrameworkMap = new Map([ - ['net8.0', 'NET_8_0'], - ['net9.0', 'NET_9_0'], - ['netstandard2.0', 'NET_STANDARD_2_0'], -]) - -const dummyVersionIndex = 999 - -const targetFrameworkKeysArray = Array.from(targetFrameworkMap.keys()) -function getKeyIndexOfVersion(key: any) { - return targetFrameworkKeysArray.indexOf(key) +const targetFrameworkRecord: Record = { + 'net8.0': 'NET_8_0', + 'net9.0': 'NET_9_0', + 'netstandard2.0': 'NET_STANDARD_2_0', } export function getCWStartTransformRequest( userInputRequest: StartTransformRequest, - uploadId: string, + uploadId: string | undefined, logging: Logging -): CodeWhispererTokenUserClient.StartTransformationRequest { +): StartTransformationRequest { return { workspaceState: { uploadId: uploadId, @@ -48,9 +42,7 @@ export function getCWStartTransformRequest( target: { language: 'C_SHARP', runtimeEnv: { - dotNet: targetFrameworkMap.has(userInputRequest.TargetFramework) - ? targetFrameworkMap.get(userInputRequest.TargetFramework) - : 'NET_8_0', + dotNet: targetFrameworkRecord[userInputRequest.TargetFramework] ?? 'NET_8_0', }, platformConfig: { operatingSystemFamily: 'LINUX', @@ -61,8 +53,8 @@ export function getCWStartTransformRequest( } export function getCWStartTransformResponse( - response: PromiseResult, - uploadId: string, + response: StartTransformationResponse, + uploadId: string | undefined, artifactPath: string, unsupportedProjects: string[], containsUnsupportedViews: boolean diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/metrics.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/metrics.ts index 9459eb3ee4..f40c79d7bf 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/metrics.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/metrics.ts @@ -1,5 +1,5 @@ import { Logging, Telemetry } from '@aws/language-server-runtimes/server-interface' -import { TransformationSpec } from '../../client/token/codewhispererbearertokenclient' +import { TransformationSpec } from '@amzn/codewhisperer-runtime' import { CancelTransformRequest, CancelTransformResponse, @@ -225,7 +225,7 @@ export const emitTransformationPlanReceivedTelemetry = ( ) => { const data: TransformationPlanReceivedEvent = { category: CODETRANSFORM_CATEGORY, - transformationJobId: jobId as string, + transformationJobId: jobId, transformationSteps: response.TransformationPlan.transformationSteps, } diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/models.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/models.ts index 5175403fd9..6b8eead1e4 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/models.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/models.ts @@ -1,5 +1,5 @@ import { ExecuteCommandParams } from 'vscode-languageserver' -import { TransformationJob, TransformationPlan } from '../../client/token/codewhispererbearertokenclient' +import { TransformationJob, TransformationPlan } from '@amzn/codewhisperer-runtime' /** * Error codes for transformation job failures. @@ -29,8 +29,8 @@ export interface StartTransformRequest extends ExecuteCommandParams { } export interface StartTransformResponse { - UploadId: string - TransformationJobId: string + UploadId: string | undefined + TransformationJobId: string | undefined ArtifactPath: string Error?: string IsSupported?: boolean diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/resources/SupportedProjects.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/resources/SupportedProjects.ts index a3d6322a07..69881dfc89 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/resources/SupportedProjects.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/resources/SupportedProjects.ts @@ -1,3 +1,6 @@ +/** + * Reference only - validation moved to backend service. + */ export const supportedProjects = [ 'AspNetCoreMvc', 'AspNetCoreWebApi', diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.createRequirementJsonContent.test.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.createRequirementJsonContent.test.ts new file mode 100644 index 0000000000..fba0da6729 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.createRequirementJsonContent.test.ts @@ -0,0 +1,313 @@ +import { expect } from 'chai' +import { Workspace, Logging } from '@aws/language-server-runtimes/server-interface' +import { StartTransformRequest, RequirementJson } from '../models' +import { ArtifactManager } from '../artifactManager' +import { StubbedInstance, stubInterface } from 'ts-sinon' +import { EXAMPLE_REQUEST } from './mockData' +import sinon = require('sinon') +import * as fs from 'fs' +import * as path from 'path' + +describe('ArtifactManager - createRequirementJsonContent', () => { + let workspace: StubbedInstance + let artifactManager: ArtifactManager + let mockedLogging: StubbedInstance + let baseRequest: StartTransformRequest + let fsStubs: { [key: string]: sinon.SinonStub } + + const setupRequest = (overrides: Partial = {}): StartTransformRequest => ({ + ...EXAMPLE_REQUEST, + SolutionRootPath: path.join('C:', 'solution'), + SolutionFilePath: path.join('C:', 'solution', 'test.sln'), + SelectedProjectPath: path.join('C:', 'solution', 'project.csproj'), + TransformNetStandardProjects: true, + ProjectMetadata: [ + { + Name: 'TestProject', + ProjectPath: path.join('C:', 'solution', 'project.csproj'), + ProjectTargetFramework: 'net48', + ProjectLanguage: 'C#', + ProjectType: 'Console', + SourceCodeFilePaths: [path.join('C:', 'solution', 'file1.cs'), path.join('C:', 'solution', 'file2.vb')], + ExternalReferences: [ + { + ProjectPath: path.join('C:', 'solution', 'project.csproj'), + RelativePath: path.join('lib', 'assembly1.dll'), + AssemblyFullPath: path.join('C:', 'solution', 'lib', 'assembly1.dll'), + IncludedInArtifact: true, + }, + ], + }, + ], + PackageReferences: [ + { + Id: 'TestPackage', + Versions: ['1.0.0'], + IsPrivatePackage: false, + NetCompatiblePackageFilePath: path.join('C:', 'packages', 'test.nupkg'), + }, + ], + ...overrides, + }) + + const mockFileSystem = () => { + fsStubs = { + existsSync: sinon.stub(fs, 'existsSync').returns(true), + mkdirSync: sinon.stub(fs, 'mkdirSync'), + copyFile: sinon.stub(fs, 'copyFile').callsArg(2), + createReadStream: sinon.stub(fs, 'createReadStream').returns({ + [Symbol.asyncIterator]: async function* () { + yield Buffer.from('test content') + }, + } as any), + } + } + + beforeEach(() => { + workspace = stubInterface() + mockedLogging = stubInterface() + artifactManager = new ArtifactManager(workspace, mockedLogging, 'test-workspace', 'test-solution') + baseRequest = setupRequest() + mockFileSystem() + }) + + afterEach(() => { + sinon.restore() + }) + + describe('Basic functionality', () => { + it('should generate requirement json with correct structure', async () => { + const result = await artifactManager.createRequirementJsonContent(baseRequest) + + expect(result).to.have.property('EntryPath') + expect(result).to.have.property('SolutionPath') + expect(result).to.have.property('Projects') + expect(result).to.have.property('TransformNetStandardProjects', true) + expect(result).to.have.property('Packages') + expect(result.Projects).to.have.length(1) + }) + + it('should process source code files correctly', async () => { + const result = await artifactManager.createRequirementJsonContent(baseRequest) + + expect(result.Projects[0].codeFiles).to.have.length(2) + expect(result.Projects[0].codeFiles[0]).to.have.property('contentMd5Hash') + expect(result.Projects[0].codeFiles[0]).to.have.property('relativePath') + }) + + it('should process project metadata correctly', async () => { + const result = await artifactManager.createRequirementJsonContent(baseRequest) + const project = result.Projects[0] + + expect(project).to.have.property('projectFilePath') + expect(project).to.have.property('projectTarget', 'net48') + expect(project).to.have.property('codeFiles') + expect(project).to.have.property('references') + }) + }) + + describe('Filtering functionality', () => { + it('should filter source code files with filtered extensions', async () => { + const request = setupRequest({ + ProjectMetadata: [ + { + ...baseRequest.ProjectMetadata[0], + SourceCodeFilePaths: [ + path.join('C:', 'solution', 'file1.cs'), + path.join('C:', 'solution', 'file2.suo'), // Should be filtered + path.join('C:', 'solution', 'file3.pdb'), // Should be filtered + path.join('C:', 'solution', 'file4.vb'), + ], + ExternalReferences: [], + }, + ], + }) + + const result = await artifactManager.createRequirementJsonContent(request) + + // Should only include .cs and .vb files, not .suo or .pdb + expect(result.Projects[0].codeFiles).to.have.length(2) + }) + + it('should filter external references with filtered extensions', async () => { + const request = setupRequest({ + ProjectMetadata: [ + { + ...baseRequest.ProjectMetadata[0], + SourceCodeFilePaths: [path.join('C:', 'solution', 'file1.cs')], + ExternalReferences: [ + { + ProjectPath: path.join('C:', 'solution', 'project.csproj'), + RelativePath: path.join('lib', 'assembly1.dll'), + AssemblyFullPath: path.join('C:', 'solution', 'lib', 'assembly1.dll'), + IncludedInArtifact: true, + }, + { + ProjectPath: path.join('C:', 'solution', 'project.csproj'), + RelativePath: path.join('lib', 'debug.pdb'), + AssemblyFullPath: path.join('C:', 'solution', 'lib', 'debug.pdb'), // Should be filtered + IncludedInArtifact: true, + }, + ], + }, + ], + }) + + const result = await artifactManager.createRequirementJsonContent(request) + + // Should only include .dll reference, not .pdb + expect(result.Projects[0].references).to.have.length(1) + }) + }) + + describe('Error handling', () => { + it('should handle file processing errors gracefully', async () => { + fsStubs.copyFile.callsArgWith(2, new Error('Copy failed')) + fsStubs.createReadStream.throws(new Error('Read failed')) + + const result = await artifactManager.createRequirementJsonContent(baseRequest) + + expect(result).to.have.property('Projects') + expect(result.Projects[0].codeFiles).to.have.length(0) + }) + + it('should handle reference processing errors gracefully', async () => { + fsStubs.copyFile.callsArgWith(2, new Error('Reference copy failed')) + + const result = await artifactManager.createRequirementJsonContent(baseRequest) + + // Reference is still added even if copy fails, but error is logged + expect(result.Projects[0].references).to.have.length(1) + expect(mockedLogging.log.called).to.be.true + }) + }) + + describe('Package processing', () => { + it('should handle null PackageReferences', async () => { + const request = setupRequest({ PackageReferences: undefined }) + + const result = await artifactManager.createRequirementJsonContent(request) + expect((result as any).Packages).to.have.length(0) + }) + + it('should skip packages without NetCompatiblePackageFilePath', async () => { + const request = setupRequest({ + PackageReferences: [ + { + Id: 'EmptyPathPackage', + Versions: ['1.0.0'], + IsPrivatePackage: false, + NetCompatiblePackageFilePath: undefined, + }, + { + Id: 'ValidPackage', + Versions: ['1.0.0'], + IsPrivatePackage: false, + NetCompatiblePackageFilePath: path.join('C:', 'packages', 'valid.nupkg'), + }, + ], + }) + + const result = await artifactManager.createRequirementJsonContent(request) + expect((result as any).Packages).to.have.length(1) + }) + }) + + describe('Optional properties', () => { + it('should include EnableRazorViewTransform when defined', async () => { + const request = setupRequest({ EnableRazorViewTransform: true }) + + const result = await artifactManager.createRequirementJsonContent(request) + expect(result).to.have.property('EnableRazorViewTransform', true) + }) + + it('should include EnableWebFormsTransform when defined', async () => { + const request = setupRequest({ EnableWebFormsTransform: false }) + + const result = await artifactManager.createRequirementJsonContent(request) + expect(result).to.have.property('EnableWebFormsTransform', false) + }) + + it('should exclude optional properties when undefined', async () => { + const request = setupRequest({ + EnableRazorViewTransform: undefined, + EnableWebFormsTransform: undefined, + }) + + const result = await artifactManager.createRequirementJsonContent(request) + expect(result).to.not.have.property('EnableRazorViewTransform') + expect(result).to.not.have.property('EnableWebFormsTransform') + }) + }) + + describe('Edge cases', () => { + it('should handle empty project metadata', async () => { + const request = setupRequest({ ProjectMetadata: [] }) + + const result = await artifactManager.createRequirementJsonContent(request) + expect(result.Projects).to.have.length(0) + }) + + it('should handle empty source code file paths', async () => { + const request = setupRequest({ + ProjectMetadata: [ + { + ...baseRequest.ProjectMetadata[0], + SourceCodeFilePaths: [], + ExternalReferences: [], + }, + ], + }) + + const result = await artifactManager.createRequirementJsonContent(request) + expect(result.Projects[0].codeFiles).to.have.length(0) + expect(result.Projects[0].references).to.have.length(0) + }) + + it('should filter out empty file paths', async () => { + const request = setupRequest({ + ProjectMetadata: [ + { + ...baseRequest.ProjectMetadata[0], + SourceCodeFilePaths: [ + path.join('C:', 'solution', 'file1.cs'), + '', // Empty path should be filtered + null as any, // Null path should be filtered + path.join('C:', 'solution', 'file2.vb'), + ], + }, + ], + }) + + const result = await artifactManager.createRequirementJsonContent(request) + expect(result.Projects[0].codeFiles).to.have.length(2) + }) + }) + + describe('Multiple projects', () => { + it('should process multiple projects correctly', async () => { + const request = setupRequest({ + ProjectMetadata: [ + baseRequest.ProjectMetadata[0], + { + Name: 'SecondProject', + ProjectPath: path.join('C:', 'solution', 'project2.csproj'), + ProjectTargetFramework: 'net6.0', + ProjectLanguage: 'C#', + ProjectType: 'Library', + SourceCodeFilePaths: [path.join('C:', 'solution', 'file3.cs')], + ExternalReferences: [], + }, + ], + }) + + const result = await artifactManager.createRequirementJsonContent(request) + + expect(result.Projects).to.have.length(2) + expect(result.Projects[0].projectTarget).to.equal('net48') + expect(result.Projects[1].projectTarget).to.equal('net6.0') + expect(result.Projects[0].codeFiles).to.have.length(2) + expect(result.Projects[1].codeFiles).to.have.length(1) + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.createTransformationPreferencesContent.test.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.createTransformationPreferencesContent.test.ts index 24d89651fa..582dcb63e3 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.createTransformationPreferencesContent.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.createTransformationPreferencesContent.test.ts @@ -14,7 +14,7 @@ describe('ArtifactManager - createTransformationPreferencesContent', () => { beforeEach(() => { workspace = stubInterface() mockedLogging = stubInterface() - artifactManager = new ArtifactManager(workspace, mockedLogging, '') + artifactManager = new ArtifactManager(workspace, mockedLogging, '', '') // Create a clean base request for each test baseRequest = { diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.general.test.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.general.test.ts new file mode 100644 index 0000000000..1982259594 --- /dev/null +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.general.test.ts @@ -0,0 +1,280 @@ +import { expect } from 'chai' +import { Workspace, Logging } from '@aws/language-server-runtimes/server-interface' +import { StartTransformRequest } from '../models' +import { ArtifactManager } from '../artifactManager' +import { StubbedInstance, stubInterface } from 'ts-sinon' +import { EXAMPLE_REQUEST } from './mockData' +import sinon = require('sinon') +import * as fs from 'fs' +import * as path from 'path' +import * as os from 'os' + +describe('ArtifactManager - Complete Coverage', () => { + let workspace: StubbedInstance + let artifactManager: ArtifactManager + let mockedLogging: StubbedInstance + let baseRequest: StartTransformRequest + let tempDir: string + + const createTestRequest = (overrides: Partial = {}): StartTransformRequest => ({ + ...EXAMPLE_REQUEST, + SolutionRootPath: path.join(tempDir, 'solution'), + SolutionFilePath: path.join(tempDir, 'solution', 'test.sln'), + SolutionConfigPaths: [path.join(tempDir, 'config.xml')], + DatabaseSettings: { Tools: [{ Name: 'Test', Properties: {} }] }, + DmsArn: 'arn:aws:dms:region:account:task/test', + ...overrides, + }) + + beforeEach(() => { + tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'artifact-test-')) + workspace = stubInterface() + workspace.fs = { + exists: sinon.stub().resolves(true), + rm: sinon.stub().resolves(), + } as any + mockedLogging = stubInterface() + artifactManager = new ArtifactManager(workspace, mockedLogging, tempDir, path.join(tempDir, 'solution')) + baseRequest = createTestRequest() + }) + + afterEach(() => { + sinon.restore() + if (fs.existsSync(tempDir)) { + fs.rmSync(tempDir, { recursive: true, force: true }) + } + }) + + describe('createTransformationPreferencesContent', () => { + it('should create valid transformation preferences with database settings', async () => { + const result = await artifactManager.createTransformationPreferencesContent(baseRequest) + + expect(result).to.have.property('Transformations') + expect(result).to.have.property('Metadata') + expect(result.Transformations.DatabaseModernization).to.exist + expect(result.Transformations.DatabaseModernization?.Enabled).to.be.true + expect(result.Transformations.DatabaseModernization?.DatabaseSettings).to.deep.equal( + baseRequest.DatabaseSettings + ) + expect(result.Transformations.DatabaseModernization?.DmsArn).to.equal(baseRequest.DmsArn) + expect(result.Metadata.GeneratedAt).to.be.a('string') + }) + + it('should handle DmsArn only scenario', async () => { + const request = createTestRequest({ + DatabaseSettings: undefined, + DmsArn: 'arn:aws:dms:test', + }) + + const result = await artifactManager.createTransformationPreferencesContent(request) + + expect(result.Transformations.DatabaseModernization?.DmsArn).to.equal('arn:aws:dms:test') + expect(result.Transformations.DatabaseModernization?.DatabaseSettings?.Tools).to.have.length(1) + expect(result.Transformations.DatabaseModernization?.DatabaseSettings?.Tools?.[0].Name).to.equal('DMS') + }) + + it('should handle no database configuration', async () => { + const request = createTestRequest({ + DatabaseSettings: undefined, + DmsArn: undefined, + }) + + const result = await artifactManager.createTransformationPreferencesContent(request) + expect(result.Transformations.DatabaseModernization).to.be.undefined + }) + }) + + describe('removeDir method', () => { + it('should call workspace.fs.rm when directory exists', async () => { + await artifactManager.removeDir('test-dir') + + expect((workspace.fs.exists as sinon.SinonStub).calledWith('test-dir')).to.be.true + expect((workspace.fs.rm as sinon.SinonStub).calledWith('test-dir')).to.be.true + }) + + it('should not call rm when directory does not exist', async () => { + workspace.fs.exists = sinon.stub().resolves(false) + + await artifactManager.removeDir('test-dir') + expect((workspace.fs.rm as sinon.SinonStub).called).to.be.false + }) + }) + + describe('cleanup method', () => { + it('should handle cleanup gracefully when files exist', () => { + // Create test files + const artifactFolder = path.join(tempDir, 'artifact') + const zipFile = path.join(tempDir, 'artifact.zip') + fs.mkdirSync(artifactFolder, { recursive: true }) + fs.writeFileSync(zipFile, 'test') + + expect(() => artifactManager.cleanup()).to.not.throw() + expect(fs.existsSync(artifactFolder)).to.be.false + expect(fs.existsSync(zipFile)).to.be.false + }) + + it('should handle cleanup errors gracefully', () => { + // Test with non-existent directory + expect(() => artifactManager.cleanup()).to.not.throw() + }) + }) + + describe('file writing methods', () => { + it('should write requirement json with correct content', async () => { + const testDir = path.join(tempDir, 'test-dir') + fs.mkdirSync(testDir, { recursive: true }) + const testContent = '{"test": "content"}' + + await artifactManager.writeRequirementJsonAsync(testDir, testContent) + + const filePath = path.join(testDir, 'requirement.json') + expect(fs.existsSync(filePath)).to.be.true + expect(fs.readFileSync(filePath, 'utf8')).to.equal(testContent) + }) + + it('should write transformation preferences with correct content', async () => { + const testDir = path.join(tempDir, 'test-dir') + fs.mkdirSync(testDir, { recursive: true }) + const testContent = '{"preferences": "data"}' + + await artifactManager.writeTransformationPreferencesAsync(testDir, testContent) + + const filePath = path.join(testDir, 'transformation-preferences.json') + expect(fs.existsSync(filePath)).to.be.true + expect(fs.readFileSync(filePath, 'utf8')).to.equal(testContent) + }) + }) + + describe('path helper methods', () => { + it('should normalize source file paths correctly', () => { + const solutionRoot = path.join('C:', 'solution') + const filePath = path.join('C:', 'solution', 'src', 'file.cs') + + const result = artifactManager.normalizeSourceFileRelativePath(solutionRoot, filePath) + expect(result).to.include('sourceCode') + expect(result).to.include('src') + expect(result).to.include('file.cs') + }) + + it('should normalize reference file paths correctly', () => { + const relativePath = path.join('lib', 'test.dll') + + const result = artifactManager.normalizeReferenceFileRelativePath(relativePath, true) + expect(result).to.include('references') + expect(result).to.include('lib') + expect(result).to.include('test.dll') + }) + + it('should normalize package file paths correctly', () => { + const packagePath = path.join('C:', 'packages', 'test.nupkg') + + const result = artifactManager.normalizePackageFileRelativePath(packagePath) + expect(result).to.include('packages') + expect(result).to.include('test.nupkg') + }) + }) + + describe('getSha256Async static method', () => { + it('should calculate SHA256 hash for existing file', async () => { + const testFile = path.join(tempDir, 'test.txt') + const testContent = 'test content for hashing' + fs.writeFileSync(testFile, testContent) + + const result = await ArtifactManager.getSha256Async(testFile) + + expect(result).to.be.a('string') + expect(result).to.have.length.greaterThan(0) + // Verify it's a valid base64 string + expect(() => Buffer.from(result, 'base64')).to.not.throw() + }) + }) + + describe('zipArtifact method', () => { + it('should return empty string when artifact folder does not exist', async () => { + const result = await artifactManager.zipArtifact() + expect(result).to.equal('') + }) + + it('should create zip path when artifact folder exists', async () => { + const artifactFolder = path.join(tempDir, 'artifact') + fs.mkdirSync(artifactFolder, { recursive: true }) + fs.writeFileSync(path.join(artifactFolder, 'test.txt'), 'test') + + // Mock zipDirectory to avoid actual zip creation + sinon.stub(artifactManager, 'zipDirectory').resolves() + + const result = await artifactManager.zipArtifact() + expect(result).to.include('artifact.zip') + expect(path.isAbsolute(result)).to.be.true + }) + }) + + describe('copySolutionConfigFiles', () => { + it('should process config files when present', async () => { + const copyStub = sinon.stub(artifactManager, 'copySourceFile').resolves() + const request = createTestRequest({ + SolutionConfigPaths: ['config1.xml', 'config2.json'], + }) + + await artifactManager.copySolutionConfigFiles(request) + + expect(copyStub.callCount).to.equal(2) + expect(copyStub.firstCall.args[1]).to.equal('config1.xml') + expect(copyStub.secondCall.args[1]).to.equal('config2.json') + }) + + it('should handle empty config paths array', async () => { + const copyStub = sinon.stub(artifactManager, 'copySourceFile').resolves() + const request = createTestRequest({ SolutionConfigPaths: [] }) + + await artifactManager.copySolutionConfigFiles(request) + expect(copyStub.called).to.be.false + }) + }) + + describe('removeDuplicateNugetPackagesFolder', () => { + it('should remove packages folder when it exists', async () => { + const packagesFolder = path.join(tempDir, 'artifact', 'sourceCode', 'packages') + fs.mkdirSync(packagesFolder, { recursive: true }) + fs.writeFileSync(path.join(packagesFolder, 'test.nupkg'), 'test') + + await artifactManager.removeDuplicateNugetPackagesFolder(baseRequest) + expect(fs.existsSync(packagesFolder)).to.be.false + }) + + it('should handle non-existent packages folder gracefully', async () => { + await artifactManager.removeDuplicateNugetPackagesFolder(baseRequest) + // Should not throw + }) + }) + + describe('shouldFilterFile', () => { + it('should filter filetypes', async () => { + expect(artifactManager.shouldFilterFile('test.cs')).to.be.false + expect(artifactManager.shouldFilterFile('test.jfm.cs')).to.be.false + expect(artifactManager.shouldFilterFile('test.jfm')).to.be.true + }) + + it('should filter directories', async () => { + const unfilteredString = path.join('test', 'solution', 'test.cs') + const filteredString = path.join('test', 'artifactworkspace', 'test.cs') + const filteredStringWithCasing = path.join('test', 'ArtifactWorkspace', 'test.cs') + + expect(artifactManager.shouldFilterFile(unfilteredString)).to.be.false + expect(artifactManager.shouldFilterFile(filteredString)).to.be.true + expect(artifactManager.shouldFilterFile(filteredStringWithCasing)).to.be.true + }) + + it('should filter regex', async () => { + const unfilteredString = '\\users\\test\\dataApp\\test.cs' + const unfilteredStringWithExtraDir = '\\users\\extraDir\\test\\appData\\test.cs' + const filteredExtension = '\\users\\test\\project.vspscc' + const filteredExtensionTwo = '\\users\\test\\project.vssscc' + + expect(artifactManager.shouldFilterFile(unfilteredString)).to.be.false + expect(artifactManager.shouldFilterFile(unfilteredStringWithExtraDir)).to.be.false + expect(artifactManager.shouldFilterFile(filteredExtension)).to.be.true + expect(artifactManager.shouldFilterFile(filteredExtensionTwo)).to.be.true + }) + }) +}) diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.processPrivatePackages.test.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.processPrivatePackages.test.ts index ea1835d132..130da1da70 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.processPrivatePackages.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/artifactManager.processPrivatePackages.test.ts @@ -10,14 +10,13 @@ describe('ArtifactManager - processPrivatePackages', () => { let workspace: StubbedInstance let artifactManager: ArtifactManager let sampleStartTransformRequest: StartTransformRequest - let sampleExternalReference: ExternalReference let sampleArtifactReference: References const mockedLogging = stubInterface() beforeEach(() => { workspace = stubInterface() // Create new instance of ArtifactManager before each test - artifactManager = new ArtifactManager(workspace, mockedLogging, '') + artifactManager = new ArtifactManager(workspace, mockedLogging, '', '') // Mock internal methods that might be called artifactManager.copyFile = async (source: string, destination: string) => { @@ -30,12 +29,6 @@ describe('ArtifactManager - processPrivatePackages', () => { // Setup initial test data sampleStartTransformRequest = EXAMPLE_REQUEST - sampleExternalReference = { - ProjectPath: '', - RelativePath: '', - AssemblyFullPath: '', - IncludedInArtifact: true, - } sampleArtifactReference = { includedInArtifact: true, relativePath: '', @@ -45,11 +38,7 @@ describe('ArtifactManager - processPrivatePackages', () => { it('should do nothing when PackageReferences is undefined', async () => { sampleStartTransformRequest.PackageReferences = undefined - artifactManager.processPrivatePackages( - sampleStartTransformRequest, - sampleExternalReference, - sampleArtifactReference - ) + artifactManager.processPrivatePackages(sampleStartTransformRequest, sampleArtifactReference) expect(sampleArtifactReference.isThirdPartyPackage).to.equal(false) expect(sampleArtifactReference.netCompatibleRelativePath).to.equal(undefined) expect(sampleArtifactReference.netCompatibleVersion).to.equal(undefined) @@ -66,24 +55,20 @@ describe('ArtifactManager - processPrivatePackages', () => { Id: 'test-package', Versions: [], IsPrivatePackage: true, - NetCompatibleAssemblyRelativePath: 'path/to/assembly', - NetCompatibleAssemblyPath: 'full/path/to/assembly', + NetCompatibleAssemblyRelativePath: 'path/to/test-package.dll', + NetCompatibleAssemblyPath: 'full/path/to/test-package.dll', NetCompatiblePackageVersion: '2.0.0', } sampleStartTransformRequest.PackageReferences = [privatePackage] - sampleExternalReference.RelativePath = 'some/path/test-package/more/path' + sampleArtifactReference.relativePath = 'some/path/test-package/more/path/test-package.dll' - await artifactManager.processPrivatePackages( - sampleStartTransformRequest, - sampleExternalReference, - sampleArtifactReference - ) + await artifactManager.processPrivatePackages(sampleStartTransformRequest, sampleArtifactReference) expect(copyFileCalled).to.be.true expect(sampleArtifactReference.isThirdPartyPackage).to.equal(true) expect(sampleArtifactReference.netCompatibleRelativePath).to.equal( - path.join('references', 'thirdpartypackages', 'path/to/assembly').toLowerCase() + path.join('references', 'thirdpartypackages', 'path/to/test-package.dll').toLowerCase() ) expect(sampleArtifactReference.netCompatibleVersion).to.equal('2.0.0') }) @@ -98,20 +83,16 @@ describe('ArtifactManager - processPrivatePackages', () => { const nonPrivatePackage = { Id: 'test-package', IsPrivatePackage: false, - NetCompatibleAssemblyRelativePath: 'path/to/assembly', - NetCompatibleAssemblyPath: 'full/path/to/assembly', + NetCompatibleAssemblyRelativePath: 'path/to/test-package.dll', + NetCompatibleAssemblyPath: 'full/path/to/test-package.dll', NetCompatiblePackageVersion: '1.0.0', Versions: [], } sampleStartTransformRequest.PackageReferences = [nonPrivatePackage] - sampleExternalReference.RelativePath = 'some/path/test-package/more/path' + sampleArtifactReference.relativePath = 'some/path/test-package/more/path/test-package.dll' - artifactManager.processPrivatePackages( - sampleStartTransformRequest, - sampleExternalReference, - sampleArtifactReference - ) + artifactManager.processPrivatePackages(sampleStartTransformRequest, sampleArtifactReference) expect(copyFileCalled).to.be.false expect(sampleArtifactReference.isThirdPartyPackage).to.equal(false) @@ -119,7 +100,7 @@ describe('ArtifactManager - processPrivatePackages', () => { expect(sampleArtifactReference.netCompatibleVersion).to.equal(undefined) }) - it('should not process when package ID is not in reference path', async () => { + it('should not process when assembly is not in reference path', async () => { let copyFileCalled = false artifactManager.copyFile = async (source: string, destination: string): Promise => { copyFileCalled = true @@ -129,20 +110,16 @@ describe('ArtifactManager - processPrivatePackages', () => { const privatePackage = { Id: 'test-package', IsPrivatePackage: true, - NetCompatibleAssemblyRelativePath: 'path/to/assembly', - NetCompatibleAssemblyPath: 'full/path/to/assembly', + NetCompatibleAssemblyRelativePath: 'path/to/test-package.dll', + NetCompatibleAssemblyPath: 'full/path/to/test-package.dll', NetCompatiblePackageVersion: '1.0.0', Versions: [], } sampleStartTransformRequest.PackageReferences = [privatePackage] - sampleExternalReference.RelativePath = 'some/path/different-package/more/path' + sampleArtifactReference.relativePath = 'some/path/different-package/more/path/test-package2.dll' - artifactManager.processPrivatePackages( - sampleStartTransformRequest, - sampleExternalReference, - sampleArtifactReference - ) + artifactManager.processPrivatePackages(sampleStartTransformRequest, sampleArtifactReference) expect(copyFileCalled).to.be.false expect(sampleArtifactReference.isThirdPartyPackage).to.equal(false) @@ -150,6 +127,46 @@ describe('ArtifactManager - processPrivatePackages', () => { expect(sampleArtifactReference.netCompatibleVersion).to.equal(undefined) }) + it('should handle multiple packages with same substring', async () => { + const privatePackage1: PackageReferenceMetadata = { + Id: 'PNMAC.Core', + Versions: ['2.27.0', '2.30.0'], + IsPrivatePackage: true, + NetCompatibleAssemblyRelativePath: 'PNMAC.Core/lib/net8.0/PNMAC.Core.dll', + NetCompatibleAssemblyPath: + 'C:/Users/user/AppData/Local/Temp/AwsToolkit/Transforms/Packages/PNMAC.Core/lib/net8.0/PNMAC.Core.dll', + NetCompatiblePackageVersion: '5.4.1', + } + + const privatePackage2: PackageReferenceMetadata = { + Id: 'PNMAC.Core.EntityService', + Versions: ['2.2.0'], + IsPrivatePackage: true, + NetCompatibleAssemblyRelativePath: 'PNMAC.Core.EntityService/lib/net8.0/PNMAC.Core.EntityService.dll', + NetCompatibleAssemblyPath: + 'C:/Users/user/AppData/Local/Temp/AwsToolkit/Transforms/Packages/PNMAC.Core.EntityService/lib/net8.0/PNMAC.Core.EntityService.dll', + NetCompatiblePackageVersion: '4.1.0.4', + } + + sampleStartTransformRequest.PackageReferences = [privatePackage1, privatePackage2] + sampleArtifactReference.relativePath = + 'references/packages/pnmac.core.entityservice.2.2.0/lib/pnmac.core.entityservice.dll' + + await artifactManager.processPrivatePackages(sampleStartTransformRequest, sampleArtifactReference) + + expect(sampleArtifactReference.isThirdPartyPackage).to.equal(true) + expect(sampleArtifactReference.packageId).to.equal('PNMAC.Core.EntityService') + expect(sampleArtifactReference.netCompatibleVersion).to.equal('4.1.0.4') + + sampleArtifactReference.relativePath = 'references/packages/pnmac.core.2.30.0/lib/pnmac.core.dll' + + await artifactManager.processPrivatePackages(sampleStartTransformRequest, sampleArtifactReference) + + expect(sampleArtifactReference.isThirdPartyPackage).to.equal(true) + expect(sampleArtifactReference.packageId).to.equal('PNMAC.Core') + expect(sampleArtifactReference.netCompatibleVersion).to.equal('5.4.1') + }) + it('should mark as third party package but not copy when paths are null', async () => { let copyFileCalled = false artifactManager.copyFile = async (source: string, destination: string): Promise => { @@ -167,13 +184,9 @@ describe('ArtifactManager - processPrivatePackages', () => { } sampleStartTransformRequest.PackageReferences = [privatePackage] - sampleExternalReference.RelativePath = 'some/path/test-package/more/path' + sampleArtifactReference.relativePath = 'some/path/test-package/more/test-package.dll' - await artifactManager.processPrivatePackages( - sampleStartTransformRequest, - sampleExternalReference, - sampleArtifactReference - ) + await artifactManager.processPrivatePackages(sampleStartTransformRequest, sampleArtifactReference) expect(copyFileCalled).to.be.false expect(sampleArtifactReference.isThirdPartyPackage).to.equal(true) diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/converter.test.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/converter.test.ts index 81c078e874..fb3d98f87b 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/converter.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/converter.test.ts @@ -1,119 +1,31 @@ import { expect } from 'chai' -import { AWSError, HttpResponse } from 'aws-sdk' -import { PromiseResult } from 'aws-sdk/lib/request' -import { Response } from 'aws-sdk/lib/response' -import { StartTransformRequest, TransformProjectMetadata } from '../models' -import { getCWStartTransformRequest, getCWStartTransformResponse, targetFrameworkMap } from '../converter' -import CodeWhispererTokenUserClient = require('../../../client/token/codewhispererbearertokenclient') -import { Logging } from '@aws/language-server-runtimes/server-interface' -import { stubInterface } from 'ts-sinon' -import sinon = require('sinon') - -const mockedLogging = stubInterface() -const sampleStartTransformationRequest: CodeWhispererTokenUserClient.StartTransformationRequest = { - workspaceState: { - uploadId: '', - programmingLanguage: { - languageName: '', - }, - contextTruncationScheme: 'ANALYSIS', - }, - transformationSpec: { - transformationType: 'LANGUAGE_UPGRADE', - source: { - language: 'C_SHARP', - platformConfig: { - operatingSystemFamily: 'WINDOWS', - }, - }, - target: { - language: 'C_SHARP', - runtimeEnv: { - dotNet: '', - }, - platformConfig: { - operatingSystemFamily: 'LINUX', - }, - }, - }, -} - -const sampleUserInputRequest: StartTransformRequest = { - SolutionRootPath: '', - SolutionFilePath: '', - TargetFramework: '', - ProgramLanguage: '', - SelectedProjectPath: '', - SolutionConfigPaths: [], - ProjectMetadata: [ - { - Name: '', - ProjectPath: '', - ProjectLanguage: 'csharp', - ProjectType: '', - ExternalReferences: [], - ProjectTargetFramework: '', - SourceCodeFilePaths: [], - }, - ], - TransformNetStandardProjects: false, - EnableRazorViewTransform: false, - EnableWebFormsTransform: false, - command: '', - PackageReferences: [], -} - -function safeSet(obj: any, path: string[], value: any): void { - let current = obj - for (let i = 0; i < path.length - 1; i++) { - if (current[path[i]] === undefined) { - current[path[i]] = {} - } - current = current[path[i]] - } - current[path[path.length - 1]] = value -} +import { getCWStartTransformResponse } from '../converter' +import { StartTransformationCommandOutput, StartTransformationResponse } from '@amzn/codewhisperer-runtime' describe('Test Converter', () => { describe('Test get CW StartTransformResponse', () => { it('should return the correct StarTransformResponse object', () => { - const mockResponseData: CodeWhispererTokenUserClient.StartTransformationResponse = { + const mockResponseData: StartTransformationResponse = { transformationJobId: 'testJobId', } - const mockHttpResponse: HttpResponse = { - createUnbufferedStream: () => new XMLHttpRequest(), - statusCode: 200, - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify(mockResponseData), - statusMessage: '', - streaming: false, + const mockCommandOutput: StartTransformationCommandOutput = { + ...mockResponseData, + $metadata: { + httpStatusCode: 200, + requestId: 'request-id-123', + attempts: 1, + totalRetryDelay: 0, + }, } - let mockResponse: Response = { - hasNextPage: () => false, - nextPage: () => null, - data: mockResponseData, - error: undefined, - requestId: 'request-id-123', - redirectCount: 0, - retryCount: 0, - httpResponse: mockHttpResponse, - } - - const mockPromiseResult: PromiseResult = - { - ...mockResponseData, - $response: mockResponse, - } - const uploadId = 'upload-id-456' const artifactPath = '/path/to/artifact' const unsupportedProjects = ['project1', 'project2'] const containsUnsupportedViews = true const result = getCWStartTransformResponse( - mockPromiseResult, + mockCommandOutput, uploadId, artifactPath, unsupportedProjects, diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/transformHandler.test.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/transformHandler.test.ts index efaa69e3cf..81c17a141c 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/transformHandler.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/transformHandler.test.ts @@ -3,49 +3,26 @@ import { Logging, Workspace, SDKInitializator, - SDKClientConstructorV2, SDKClientConstructorV3, Runtime, } from '@aws/language-server-runtimes/server-interface' import * as assert from 'assert' -import { HttpResponse } from 'aws-sdk' import { expect } from 'chai' import * as fs from 'fs' import got from 'got' -import { StubbedInstance, default as simon, stubInterface } from 'ts-sinon' +import { StubbedInstance, stubInterface } from 'ts-sinon' import { StreamingClient, createStreamingClient } from '../../../client/streamingClient/codewhispererStreamingClient' import { CodeWhispererServiceToken } from '../../../shared/codeWhispererService' -import { - CancelTransformRequest, - CancellationJobStatus, - GetTransformPlanRequest, - GetTransformRequest, - StartTransformRequest, -} from '../models' +import { CancelTransformRequest, CancellationJobStatus, GetTransformPlanRequest, GetTransformRequest } from '../models' import { TransformHandler } from '../transformHandler' -import { EXAMPLE_REQUEST } from './mockData' import sinon = require('sinon') import { DEFAULT_AWS_Q_ENDPOINT_URL, DEFAULT_AWS_Q_REGION } from '../../../shared/constants' -import { Service } from 'aws-sdk' -import { ServiceConfigurationOptions } from 'aws-sdk/lib/service' import { Readable } from 'stream' import { ArtifactManager } from '../artifactManager' import path = require('path') import { IZipEntry } from 'adm-zip' import { AmazonQTokenServiceManager } from '../../../shared/amazonQServiceManager/AmazonQTokenServiceManager' -const mocked$Response = { - $response: { - hasNextPage: simon.mock(), - nextPage: simon.mock(), - data: undefined, - error: undefined, - requestId: '', - redirectCount: 0, - retryCount: 0, - httpResponse: new HttpResponse(), - }, -} const testUploadId = 'test-upoload-id' const testTransformId = 'test-transform-id' const payloadFileName = 'C:\\test.zip' @@ -81,7 +58,6 @@ describe('Test Transform handler ', () => { uploadId: testUploadId, uploadUrl: 'dummy-upload-url', kmsKeyArn: 'ResourceArn', - ...mocked$Response, }, 'dummy-256' ) @@ -103,7 +79,6 @@ describe('Test Transform handler ', () => { uploadId: testUploadId, uploadUrl: 'dummy-upload-url', kmsKeyArn: 'ResourceArn', - ...mocked$Response, }, 'dummy-256' ) @@ -127,7 +102,7 @@ describe('Test Transform handler ', () => { uploadId: testUploadId, uploadUrl: 'dummy-upload-url', kmsKeyArn: 'ResourceArn', - ...mocked$Response, + $metadata: {}, }) }) @@ -201,7 +176,7 @@ describe('Test Transform handler ', () => { client.codeModernizerStopCodeTransformation.returns( Promise.resolve({ transformationStatus: 'STOPPED', - ...mocked$Response, + $metadata: {}, }) ) }) @@ -218,7 +193,7 @@ describe('Test Transform handler ', () => { client.codeModernizerStopCodeTransformation.returns( Promise.resolve({ transformationStatus: 'COMPLETED', - ...mocked$Response, + $metadata: {}, }) ) @@ -235,14 +210,7 @@ describe('Test Transform handler ', () => { const mockSdkInitializator: SDKInitializator = Object.assign( // Default callable function for v3 clients - (Ctor: SDKClientConstructorV3, current_config: P): T => new Ctor({ ...current_config }), - // Property for v2 clients - { - v2: ( - Ctor: SDKClientConstructorV2, - current_config: P - ): T => new Ctor({ ...current_config }), - } + (Ctor: SDKClientConstructorV3, current_config: P): T => new Ctor({ ...current_config }) ) describe('StreamingClient', () => { @@ -280,9 +248,8 @@ describe('Test Transform handler ', () => { transformationJob: { jobId: testTransformId, status: 'COMPLETED', - ...mocked$Response, }, - ...mocked$Response, + $metadata: {}, }) ) }) @@ -304,9 +271,8 @@ describe('Test Transform handler ', () => { transformationJob: { jobId: testTransformId, status: 'FAILED', - ...mocked$Response, }, - ...mocked$Response, + $metadata: {}, }) ) }) @@ -356,9 +322,9 @@ describe('Test Transform handler ', () => { const request = JSON.parse(requestString) as GetTransformPlanRequest const res = await transformHandler.getTransformationPlan(request) - expect(res.TransformationPlan.transformationSteps[0].status).to.equal('COMPLETED') - expect(res.TransformationPlan.transformationSteps[0].name).to.equal('PlanStepName 1') - if (res.TransformationPlan.transformationSteps[0].progressUpdates) { + expect(res.TransformationPlan.transformationSteps?.[0].status).to.equal('COMPLETED') + expect(res.TransformationPlan.transformationSteps?.[0].name).to.equal('PlanStepName 1') + if (res.TransformationPlan.transformationSteps?.[0].progressUpdates) { expect(res.TransformationPlan.transformationSteps[0].progressUpdates[0].name).to.equal( 'ProgressUpdateName 1 for PlanStep 1' ) diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/validation.getTransformationErrorCode.test.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/validation.getTransformationErrorCode.test.ts index 0332c8400e..a951e61de4 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/validation.getTransformationErrorCode.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/validation.getTransformationErrorCode.test.ts @@ -1,7 +1,7 @@ import { expect } from 'chai' import { TransformationErrorCode } from '../models' import { getTransformationErrorCode } from '../validation' -import { TransformationJob } from '../../../client/token/codewhispererbearertokenclient' +import { TransformationJob } from '@amzn/codewhisperer-runtime' describe('getTransformationErrorCode', () => { it('should return NONE when transformationJob is undefined', () => { diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/validation.test.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/validation.test.ts index a8cfcf3475..90ce3d1f7a 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/validation.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/tests/validation.test.ts @@ -1,6 +1,6 @@ import { expect } from 'chai' import { StartTransformRequest, TransformProjectMetadata } from '../models' -import { isProject, isSolution, validateProject, validateSolution } from '../validation' +import { isProject, isSolution } from '../validation' import { supportedProjects, unsupportedViewComponents } from '../resources/SupportedProjects' import mock = require('mock-fs') import { Logging } from '@aws/language-server-runtimes/server-interface' @@ -46,122 +46,4 @@ describe('Test validation functionality', () => { mockStartTransformationRequest.SelectedProjectPath = 'test.csproj' expect(isSolution(mockStartTransformationRequest)).to.equal(false) }) - - it('should return true when project is a supported type', () => { - let mockStartTransformationRequest: StartTransformRequest = sampleStartTransformRequest - const mockProjectMeta = { - Name: '', - ProjectTargetFramework: '', - ProjectPath: 'test.csproj', - SourceCodeFilePaths: [], - ProjectLanguage: '', - ProjectType: 'AspNetCoreMvc', - ExternalReferences: [], - } - mockStartTransformationRequest.ProjectMetadata.push(mockProjectMeta) - - expect(validateProject(mockStartTransformationRequest, mockedLogging)).to.equal(true) - }) - - it('should return false when project is not a supported type', () => { - let mockStartTransformationRequest: StartTransformRequest = sampleStartTransformRequest - const mockProjectMeta = { - Name: '', - ProjectTargetFramework: '', - ProjectPath: 'test.csproj', - SourceCodeFilePaths: [], - ProjectLanguage: '', - ProjectType: 'not supported', - ExternalReferences: [], - } - mockStartTransformationRequest.ProjectMetadata = [] - mockStartTransformationRequest.ProjectMetadata.push(mockProjectMeta) - - expect(validateProject(mockStartTransformationRequest, mockedLogging)).to.equal(false) - }) - - it('should return false when there is no project path that is the same as the selected project path', () => { - let mockStartTransformationRequest: StartTransformRequest = sampleStartTransformRequest - const mockProjectMeta = { - Name: '', - ProjectTargetFramework: '', - ProjectPath: 'different.csproj', - SourceCodeFilePaths: [], - ProjectLanguage: '', - ProjectType: 'AspNetCoreMvc', - ExternalReferences: [], - } - mockStartTransformationRequest.ProjectMetadata = [] - mockStartTransformationRequest.ProjectMetadata.push(mockProjectMeta) - - expect(validateProject(mockStartTransformationRequest, mockedLogging)).to.equal(false) - }) - - // New tests for AspNetWebForms validation - it('should return true when project is AspNetWebForms type', () => { - let mockStartTransformationRequest: StartTransformRequest = sampleStartTransformRequest - const mockProjectMeta = { - Name: '', - ProjectTargetFramework: '', - ProjectPath: 'test.csproj', - SourceCodeFilePaths: [], - ProjectLanguage: '', - ProjectType: 'AspNetWebForms', - ExternalReferences: [], - } - mockStartTransformationRequest.ProjectMetadata = [] - mockStartTransformationRequest.ProjectMetadata.push(mockProjectMeta) - - expect(validateProject(mockStartTransformationRequest, mockedLogging)).to.equal(true) - }) - - it('should not include AspNetWebForms in unsupported projects list', () => { - let mockStartTransformationRequest: StartTransformRequest = sampleStartTransformRequest - - // Add a supported project - const supportedProjectMeta = { - Name: 'Supported', - ProjectTargetFramework: '', - ProjectPath: 'supported.csproj', - SourceCodeFilePaths: [], - ProjectLanguage: '', - ProjectType: 'AspNetCoreMvc', - ExternalReferences: [], - } - - // Add an unsupported project - const unsupportedProjectMeta = { - Name: 'Unsupported', - ProjectTargetFramework: '', - ProjectPath: 'unsupported.csproj', - SourceCodeFilePaths: [], - ProjectLanguage: '', - ProjectType: 'UnsupportedType', - ExternalReferences: [], - } - - // Add an AspNetWebForms project - const webFormsProjectMeta = { - Name: 'WebForms', - ProjectTargetFramework: '', - ProjectPath: 'webforms.csproj', - SourceCodeFilePaths: [], - ProjectLanguage: '', - ProjectType: 'AspNetWebForms', - ExternalReferences: [], - } - - mockStartTransformationRequest.ProjectMetadata = [ - supportedProjectMeta, - unsupportedProjectMeta, - webFormsProjectMeta, - ] - - const unsupportedProjects = validateSolution(mockStartTransformationRequest) - - // Should only contain the unsupported project, not the AspNetWebForms project - expect(unsupportedProjects).to.have.lengthOf(1) - expect(unsupportedProjects[0]).to.equal('unsupported.csproj') - expect(unsupportedProjects).to.not.include('webforms.csproj') - }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/transformHandler.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/transformHandler.ts index b0afaa06f1..72c4f9fba1 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/transformHandler.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/transformHandler.ts @@ -8,7 +8,7 @@ import { GetTransformationRequest, StopTransformationRequest, TransformationJob, -} from '../../client/token/codewhispererbearertokenclient' +} from '@amzn/codewhisperer-runtime' import { ArtifactManager } from './artifactManager' import { getCWStartTransformRequest, getCWStartTransformResponse } from './converter' import { @@ -54,23 +54,12 @@ export class TransformHandler { isProject, this.logging ) - if (isProject) { - let isValid = validation.validateProject(userInputrequest, this.logging) - if (!isValid) { - return { - Error: 'NotSupported', - IsSupported: false, - ContainsUnsupportedViews: containsUnsupportedViews, - } as StartTransformResponse - } - } else { - unsupportedProjects = validation.validateSolution(userInputrequest) - } const artifactManager = new ArtifactManager( this.workspace, this.logging, - this.getWorkspacePath(userInputrequest.SolutionRootPath) + this.getWorkspacePath(userInputrequest.SolutionRootPath), + userInputrequest.SolutionRootPath ) try { const payloadFilePath = await this.zipCodeAsync(userInputrequest, artifactManager) @@ -106,7 +95,7 @@ export class TransformHandler { } } - async preTransformationUploadCode(payloadFilePath: string): Promise { + async preTransformationUploadCode(payloadFilePath: string): Promise { try { const uploadId = await this.uploadPayloadAsync(payloadFilePath) this.logging.log('Artifact was successfully uploaded. Upload tracking id: ' + uploadId) @@ -117,7 +106,7 @@ export class TransformHandler { } } - async uploadPayloadAsync(payloadFileName: string): Promise { + async uploadPayloadAsync(payloadFileName: string): Promise { const sha256 = await ArtifactManager.getSha256Async(payloadFileName) let response: CreateUploadUrlResponse try { @@ -155,7 +144,7 @@ export class TransformHandler { const headersObj = this.getHeadersObj(sha256, resp.kmsKeyArn) try { const fileStream = fs.createReadStream(fileName) - const response = await got.put(resp.uploadUrl, { + const response = await got.put(resp.uploadUrl ?? 'invalid-url', { body: fileStream, headers: headersObj, }) @@ -342,7 +331,7 @@ export class TransformHandler { break } - status = response.transformationJob.status! + status = response.transformationJob?.status! await this.sleep(10 * 1000) timer += 10 @@ -483,7 +472,11 @@ export class TransformHandler { return exponentialDelay + jitteredDelay // returns in milliseconds } - logSuggestionForFailureResponse(request: GetTransformRequest, job: TransformationJob, failureStates: string[]) { + logSuggestionForFailureResponse( + request: GetTransformRequest, + job: TransformationJob | undefined, + failureStates: string[] + ) { let status = job?.status ?? PollTransformationStatus.NOT_FOUND let reason = job?.reason ?? '' if (failureStates.includes(status)) { @@ -492,8 +485,7 @@ export class TransformHandler { suggestion = 'Please close Visual Studio, delete the directories where build artifacts are generated (e.g. bin and obj), and try running the transformation again.' } - this.logging - .log(`Transformation job for job ${request.TransformationJobId} is ${status} due to "${reason}". + this.logging.log(`Transformation job for job ${request.TransformationJobId} is ${status} due to "${reason}".                 ${suggestion}`) } } diff --git a/server/aws-lsp-codewhisperer/src/language-server/netTransform/validation.ts b/server/aws-lsp-codewhisperer/src/language-server/netTransform/validation.ts index 0d244e09a8..4bd5b0a7c8 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/netTransform/validation.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/netTransform/validation.ts @@ -2,13 +2,11 @@ import * as fs from 'fs' import { StartTransformRequest, TransformProjectMetadata } from './models' import { supportedProjects, unsupportedViewComponents } from './resources/SupportedProjects' import { Logging } from '@aws/language-server-runtimes/server-interface' -import { TransformationJob } from '../../client/token/codewhispererbearertokenclient' import { TransformationErrorCode } from './models' +import { TransformationJob } from '@amzn/codewhisperer-runtime' /** - * TEMPORARY HACK: AspNetWebForms project type is allowed in validateProject and validateSolution - * functions without being added to the supportedProjects array. This is to enable WebForms to Blazor - * transformation without officially supporting it yet. + * Project type validation moved to backend service. */ export function isProject(userInputrequest: StartTransformRequest): boolean { @@ -19,32 +17,6 @@ export function isSolution(userInputrequest: StartTransformRequest): boolean { return userInputrequest.SelectedProjectPath.endsWith('.sln') } -export function validateProject(userInputrequest: StartTransformRequest, logging: Logging): boolean { - var selectedProject = userInputrequest.ProjectMetadata.find( - project => project.ProjectPath == userInputrequest.SelectedProjectPath - ) - - if (selectedProject) { - // Temporary hack: Allow AspNetWebForms project type without adding it to supportedProjects - var isValid = - supportedProjects.includes(selectedProject?.ProjectType) || - selectedProject?.ProjectType === 'AspNetWebForms' - logging.log( - `Selected project ${userInputrequest?.SelectedProjectPath} has project type ${selectedProject.ProjectType}` + - (isValid ? '' : ' that is not supported') - ) - return isValid - } - logging.log(`Error occured in verifying selected project with path ${userInputrequest.SelectedProjectPath}`) - return false -} - -export function validateSolution(userInputrequest: StartTransformRequest): string[] { - return userInputrequest.ProjectMetadata.filter( - project => !supportedProjects.includes(project.ProjectType) && project.ProjectType !== 'AspNetWebForms' - ).map(project => project.ProjectPath) -} - export async function checkForUnsupportedViews( userInputRequest: StartTransformRequest, isProject: boolean, diff --git a/server/aws-lsp-codewhisperer/src/language-server/securityScan/codeWhispererSecurityScanServer.ts b/server/aws-lsp-codewhisperer/src/language-server/securityScan/codeWhispererSecurityScanServer.ts index 3eca7e77c8..a9593c1179 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/securityScan/codeWhispererSecurityScanServer.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/securityScan/codeWhispererSecurityScanServer.ts @@ -8,12 +8,11 @@ import { } from '@aws/language-server-runtimes/server-interface' import { performance } from 'perf_hooks' import { pathToFileURL } from 'url' -import { ArtifactMap } from '../../client/token/codewhispererbearertokenclient' import { DependencyGraphFactory } from './dependencyGraph/dependencyGraphFactory' import { getSupportedLanguageId, supportedSecurityScanLanguages } from '../../shared/languageDetection' import SecurityScanDiagnosticsProvider from './securityScanDiagnosticsProvider' import { SecurityScanCancelledError, SecurityScanHandler } from './securityScanHandler' -import { SecurityScanRequestParams, SecurityScanResponse } from './types' +import { ArtifactMap, SecurityScanRequestParams, SecurityScanResponse } from './types' import { SecurityScanEvent } from '../../shared/telemetry/types' import { getErrorMessage, parseJson } from '../../shared/utils' import { v4 as uuidv4 } from 'uuid' @@ -38,7 +37,7 @@ export const SecurityScanServerToken = */ logging.log(`Starting security scan`) await diagnosticsProvider.resetDiagnostics() - let jobStatus: string + let jobStatus: string | undefined const securityScanStartTime = performance.now() let serviceInvocationStartTime = 0 const securityScanTelemetryEntry: Partial = { diff --git a/server/aws-lsp-codewhisperer/src/language-server/securityScan/securityScanHandler.test.ts b/server/aws-lsp-codewhisperer/src/language-server/securityScan/securityScanHandler.test.ts index 6b6d045c3d..d2cd02608c 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/securityScan/securityScanHandler.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/securityScan/securityScanHandler.test.ts @@ -1,10 +1,9 @@ import { Logging, Workspace } from '@aws/language-server-runtimes/server-interface' import * as assert from 'assert' -import { HttpResponse } from 'aws-sdk' import got from 'got' import * as Sinon from 'sinon' import { StubbedInstance, default as simon, stubInterface } from 'ts-sinon' -import { StartCodeAnalysisRequest } from '../../client/token/codewhispererbearertokenclient' +import { ListCodeAnalysisFindingsRequest, StartCodeAnalysisRequest } from '@amzn/codewhisperer-runtime' import { CodeWhispererServiceToken } from '../../shared/codeWhispererService' import { SecurityScanHandler } from './securityScanHandler' import { RawCodeScanIssue } from './types' @@ -45,7 +44,7 @@ const mocked$Response = { requestId: '', redirectCount: 0, retryCount: 0, - httpResponse: new HttpResponse(), + httpResponse: {}, }, } @@ -71,6 +70,7 @@ describe('securityScanHandler', () => { uploadId: 'dummy-upload-id', uploadUrl: 'dummy-upload-url', kmsKeyArn: 'ResourceArn', + $metadata: {}, ...mocked$Response, }) putStub = Sinon.stub(got, 'put').resolves({ statusCode: 'Success' }) @@ -93,6 +93,7 @@ describe('securityScanHandler', () => { Promise.resolve({ jobId: 'dummy-job-id', status: 'Pending', + $metadata: {}, ...mocked$Response, }) ) @@ -118,6 +119,7 @@ describe('securityScanHandler', () => { // mock default return value for getCodeAnalysis client.getCodeAnalysis.resolves({ status: 'Pending', + $metadata: {}, ...mocked$Response, }) }) @@ -125,10 +127,12 @@ describe('securityScanHandler', () => { it('should change job status from pending to completed', async () => { client.getCodeAnalysis.onCall(0).resolves({ status: 'Pending', + $metadata: {}, ...mocked$Response, }) client.getCodeAnalysis.onCall(1).resolves({ status: 'Completed', + $metadata: {}, ...mocked$Response, }) const dummyJobId = 'dummy-job-id' @@ -142,10 +146,12 @@ describe('securityScanHandler', () => { it('should change job status from pending to failed', async () => { client.getCodeAnalysis.onCall(0).resolves({ status: 'Pending', + $metadata: {}, ...mocked$Response, }) client.getCodeAnalysis.onCall(1).resolves({ status: 'Failed', + $metadata: {}, ...mocked$Response, }) const dummyJobId = 'dummy-job-id' @@ -162,6 +168,7 @@ describe('securityScanHandler', () => { // mock default return value for listCodeAnalysisFindings client.listCodeAnalysisFindings.resolves({ codeAnalysisFindings: mockCodeScanFindings, + $metadata: {}, ...mocked$Response, }) workspace.fs.exists = simon.stub().resolves(true) @@ -171,7 +178,10 @@ describe('securityScanHandler', () => { const dummyJobId = 'dummy-job-id' const codeAnalysisFindingsSchema = 'codeanalysis/findings/1.0' const dummyProjectPath = 'C:\\workspace\\workspaceFolder\\python3.7-plain-sam-app\\hello_world' - const requestParams = { jobId: dummyJobId, codeAnalysisFindingsSchema } + const requestParams = { + jobId: dummyJobId, + codeAnalysisFindingsSchema, + } satisfies ListCodeAnalysisFindingsRequest const aggregatedCodeScanIssueList = await securityScanhandler.listScanResults(dummyJobId, dummyProjectPath) simon.assert.calledWith(client.listCodeAnalysisFindings, requestParams) @@ -181,12 +191,16 @@ describe('securityScanHandler', () => { it('should return zero issues', async () => { client.listCodeAnalysisFindings.resolves({ codeAnalysisFindings: '[]', + $metadata: {}, ...mocked$Response, }) const dummyJobId = 'dummy-job-id' const codeAnalysisFindingsSchema = 'codeanalysis/findings/1.0' const dummyProjectPath = 'C:\\workspace\\workspaceFolder\\python3.7-plain-sam-app\\hello_world' - const requestParams = { jobId: dummyJobId, codeAnalysisFindingsSchema } + const requestParams = { + jobId: dummyJobId, + codeAnalysisFindingsSchema, + } satisfies ListCodeAnalysisFindingsRequest const aggregatedCodeScanIssueList = await securityScanhandler.listScanResults(dummyJobId, dummyProjectPath) simon.assert.calledWith(client.listCodeAnalysisFindings, requestParams) diff --git a/server/aws-lsp-codewhisperer/src/language-server/securityScan/securityScanHandler.ts b/server/aws-lsp-codewhisperer/src/language-server/securityScan/securityScanHandler.ts index cba587b706..da8eb47716 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/securityScan/securityScanHandler.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/securityScan/securityScanHandler.ts @@ -10,15 +10,14 @@ import * as path from 'path' import * as ScanConstants from './constants' import { - ArtifactMap, CreateUploadUrlRequest, CreateUploadUrlResponse, GetCodeAnalysisRequest, ListCodeAnalysisFindingsRequest, StartCodeAnalysisRequest, -} from '../../client/token/codewhispererbearertokenclient' +} from '@amzn/codewhisperer-runtime' import { sleep } from './dependencyGraph/commonUtil' -import { AggregatedCodeScanIssue, RawCodeScanIssue } from './types' +import { AggregatedCodeScanIssue, ArtifactMap, RawCodeScanIssue } from './types' import { AmazonQTokenServiceManager } from '../../shared/amazonQServiceManager/AmazonQTokenServiceManager' export class SecurityScanHandler { @@ -65,7 +64,7 @@ export class SecurityScanHandler { try { this.logging.log('Prepare for uploading src context...') const response = await this.serviceManager.getCodewhispererService().createUploadUrl(request) - this.logging.log(`Request id: ${response.$response.requestId}`) + this.logging.log(`Request id: ${response.$metadata.requestId}`) this.logging.log(`Complete Getting presigned Url for uploading src context.`) this.logging.log(`Uploading src context...`) await this.uploadArtifactToS3(zipContent, response) @@ -99,7 +98,7 @@ export class SecurityScanHandler { 'Content-Type': 'application/zip', 'x-amz-server-side-encryption-context': Buffer.from(encryptionContext, 'utf8').toString('base64'), } - const response = await got.put(resp.uploadUrl, { + const response = await got.put(resp.uploadUrl ?? 'invalid-url', { body: zipBuffer, headers: resp?.requestHeaders ?? headersObj, }) @@ -118,16 +117,16 @@ export class SecurityScanHandler { this.logging.log(`Creating scan job...`) try { const resp = await this.serviceManager.getCodewhispererService().startCodeAnalysis(req) - this.logging.log(`Request id: ${resp.$response.requestId}`) + this.logging.log(`Request id: ${resp.$metadata.requestId}`) return resp } catch (error) { this.logging.log(`Error while creating scan job: ${error}`) throw error } } - async pollScanJobStatus(jobId: string) { + async pollScanJobStatus(jobId: string | undefined) { this.logging.log(`Polling scan job status...`) - let status = 'Pending' + let status: string | undefined = 'Pending' let timer = 0 const codeScanJobPollingIntervalSeconds = 1 const codeScanJobTimeoutSeconds = ScanConstants.standardScanTimeoutMs @@ -137,7 +136,7 @@ export class SecurityScanHandler { jobId: jobId, } const resp = await this.serviceManager.getCodewhispererService().getCodeAnalysis(req) - this.logging.log(`Request id: ${resp.$response.requestId}`) + this.logging.log(`Request id: ${resp.$metadata.requestId}`) if (resp.status !== 'Pending') { status = resp.status @@ -156,19 +155,22 @@ export class SecurityScanHandler { return status } - async listScanResults(jobId: string, projectPath: string) { + async listScanResults(jobId: string | undefined, projectPath: string) { const request: ListCodeAnalysisFindingsRequest = { jobId, codeAnalysisFindingsSchema: 'codeanalysis/findings/1.0', } const response = await this.serviceManager.getCodewhispererService().listCodeAnalysisFindings(request) - this.logging.log(`Request id: ${response.$response.requestId}`) + this.logging.log(`Request id: ${response.$metadata.requestId}`) const aggregatedCodeScanIssueList = await this.mapToAggregatedList(response.codeAnalysisFindings, projectPath) return aggregatedCodeScanIssueList } - async mapToAggregatedList(json: string, projectPath: string) { + async mapToAggregatedList(json: string | undefined, projectPath: string) { + if (json === undefined) { + return [] + } const codeScanIssueMap: Map = new Map() const aggregatedCodeScanIssueList: AggregatedCodeScanIssue[] = [] diff --git a/server/aws-lsp-codewhisperer/src/language-server/securityScan/types.ts b/server/aws-lsp-codewhisperer/src/language-server/securityScan/types.ts index 471b5ea6bc..e2c2862c8f 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/securityScan/types.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/securityScan/types.ts @@ -69,3 +69,7 @@ export interface SecurityScanFindings { findingsWithFixes: number scannedFiles: string } + +export type ArtifactMap = { + [key: string]: string | undefined +} diff --git a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/IdleWorkspaceManager.ts b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/IdleWorkspaceManager.ts index 5a8359ccac..1e27a7f762 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/IdleWorkspaceManager.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/IdleWorkspaceManager.ts @@ -2,7 +2,7 @@ import { WorkspaceFolderManager } from './workspaceFolderManager' export class IdleWorkspaceManager { private static readonly idleThreshold = 30 * 60 * 1000 // 30 minutes - private static lastActivityTimestamp = 0 // treat session as idle as the start + private static lastActivityTimestamp = 0 // treat session as idle at the start private constructor() {} @@ -30,6 +30,10 @@ export class IdleWorkspaceManager { } } + public static setSessionAsIdle(): void { + IdleWorkspaceManager.lastActivityTimestamp = 0 + } + public static isSessionIdle(): boolean { const currentTime = Date.now() const timeSinceLastActivity = currentTime - IdleWorkspaceManager.lastActivityTimestamp diff --git a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/util.ts b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/util.ts index c4a3e5446e..0b38e0eaf7 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/util.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/util.ts @@ -1,5 +1,5 @@ import { CredentialsProvider, WorkspaceFolder } from '@aws/language-server-runtimes/server-interface' -import { CreateUploadUrlResponse } from '../../client/token/codewhispererbearertokenclient' +import { CreateUploadUrlResponse } from '@amzn/codewhisperer-runtime' import { URI } from 'vscode-uri' import * as fs from 'fs' import * as crypto from 'crypto' @@ -29,6 +29,13 @@ export const findWorkspaceRootFolder = ( return matchingFolder } +/** + * Helper function to normalize relative path e.g : src/java/test.java to file:///src/java/test/java for workspace context + */ +export const normalizeFileUri = (fileUri: string): string => { + return fileUri.startsWith('file://') ? fileUri : `file://${fileUri.startsWith('/') ? fileUri : '/' + fileUri}` +} + export const cleanUrl = (s3Url: string): string => { return new URL(s3Url).origin + new URL(s3Url).pathname } @@ -49,7 +56,7 @@ export const uploadArtifactToS3 = async (content: Buffer, resp: CreateUploadUrlR 'x-amz-server-side-encryption-context': Buffer.from(encryptionContext, 'utf8').toString('base64'), }) } - await axios.put(resp.uploadUrl, content, { headers: headersObj }) + await axios.put(resp.uploadUrl ?? 'invalid-url', content, { headers: headersObj }) } export const isDirectory = (path: string): boolean => { diff --git a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceContextServer.ts b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceContextServer.ts index c536c1087d..62119088da 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceContextServer.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceContextServer.ts @@ -35,7 +35,7 @@ function shouldIgnoreFile(workspaceFolder: WorkspaceFolder, fileUri: string): bo } export const WorkspaceContextServer = (): Server => features => { - const { credentialsProvider, workspace, logging, lsp, runtime, sdkInitializator } = features + const { agent, credentialsProvider, workspace, logging, lsp, runtime, sdkInitializator } = features let workspaceIdentifier: string = '' let workspaceFolders: WorkspaceFolder[] = [] @@ -50,6 +50,7 @@ export const WorkspaceContextServer = (): Server => features => { let isOptedIn: boolean = false let abTestingEvaluated = false let abTestingEnabled = false + let semanticSearchAbTestingEnabled = false let amazonQServiceManager: AmazonQTokenServiceManager let allowedExtension: string[] = ['AmazonQ-For-VSCode', 'Amazon Q For JetBrains'] let isSupportedExtension = false @@ -182,31 +183,38 @@ export const WorkspaceContextServer = (): Server => features => { } try { + const clientParams = safeGet(lsp.getClientInitializeParams()) + const userContext = makeUserContextObject( + clientParams, + runtime.platform, + 'CodeWhisperer', + amazonQServiceManager.serverInfo + ) ?? { + ideCategory: 'VSCODE', + operatingSystem: 'MAC', + product: 'CodeWhisperer', + } + const result = await amazonQServiceManager.getCodewhispererService().listFeatureEvaluations({ userContext }) + result.featureEvaluations?.forEach(feature => { + logging.log(`A/B Cohort Assignment feature: ${feature.feature} - variation: ${feature.variation}`) + }) + abTestingEnabled = + result.featureEvaluations?.some( + feature => + feature.feature === 'BuilderIdServiceSideProjectContext' && feature.variation === 'TREATMENT' + ) ?? false + semanticSearchAbTestingEnabled = + result.featureEvaluations?.some( + feature => feature.feature === 'SematicSearchTool' && feature.variation === 'TREATMENT' + ) ?? false const startUrl = credentialsProvider.getConnectionMetadata()?.sso?.startUrl if (startUrl && startUrl.includes(INTERNAL_USER_START_URL)) { // Overriding abTestingEnabled to true for all internal users abTestingEnabled = true - } else { - const clientParams = safeGet(lsp.getClientInitializeParams()) - const userContext = makeUserContextObject(clientParams, runtime.platform, 'CodeWhisperer') ?? { - ideCategory: 'VSCODE', - operatingSystem: 'MAC', - product: 'CodeWhisperer', - } - - const result = await amazonQServiceManager - .getCodewhispererService() - .listFeatureEvaluations({ userContext }) - logging.log(`${JSON.stringify(result)}`) - abTestingEnabled = - result.featureEvaluations?.some( - feature => - feature.feature === 'BuilderIdServiceSideProjectContext' && - feature.variation === 'TREATMENT' - ) ?? false } - - logging.info(`A/B testing enabled: ${abTestingEnabled}`) + logging.info( + `A/B testing enabled: ${abTestingEnabled} semantic search enabled ${semanticSearchAbTestingEnabled}` + ) abTestingEvaluated = true } catch (error: any) { logging.error(`Error while checking A/B status: ${error.code}`) @@ -221,6 +229,7 @@ export const WorkspaceContextServer = (): Server => features => { isLoggedInUsingBearerToken(credentialsProvider) && abTestingEnabled && !workspaceFolderManager.getOptOutStatus() && + !workspaceFolderManager.isFeatureDisabled() && workspaceIdentifier ) } @@ -235,6 +244,7 @@ export const WorkspaceContextServer = (): Server => features => { artifactManager = new ArtifactManager(workspace, logging, workspaceFolders) dependencyDiscoverer = new DependencyDiscoverer(workspace, logging, workspaceFolders, artifactManager) workspaceFolderManager = WorkspaceFolderManager.createInstance( + agent, amazonQServiceManager, logging, artifactManager, @@ -301,8 +311,9 @@ export const WorkspaceContextServer = (): Server => features => { await evaluateABTesting() isWorkflowInitialized = true + workspaceFolderManager.setSemanticSearchToolStatus(semanticSearchAbTestingEnabled) - workspaceFolderManager.resetAdminOptOutStatus() + workspaceFolderManager.resetAdminOptOutAndFeatureDisabledStatus() if (!isUserEligibleForWorkspaceContext()) { return } diff --git a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceFolderManager.test.ts b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceFolderManager.test.ts index 7ab596a930..45bf780ef3 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceFolderManager.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceFolderManager.test.ts @@ -1,15 +1,18 @@ import { WorkspaceFolderManager } from './workspaceFolderManager' import sinon, { stubInterface, StubbedInstance } from 'ts-sinon' import { AmazonQTokenServiceManager } from '../../shared/amazonQServiceManager/AmazonQTokenServiceManager' -import { CredentialsProvider, Logging } from '@aws/language-server-runtimes/server-interface' +import { Agent, CredentialsProvider, Logging, ToolClassification } from '@aws/language-server-runtimes/server-interface' import { DependencyDiscoverer } from './dependency/dependencyDiscoverer' import { WorkspaceFolder } from 'vscode-languageserver-protocol' import { ArtifactManager } from './artifactManager' import { CodeWhispererServiceToken } from '../../shared/codeWhispererService' -import { ListWorkspaceMetadataResponse } from '../../client/token/codewhispererbearertokenclient' +import { ListWorkspaceMetadataResponse, WorkspaceStatus } from '@amzn/codewhisperer-runtime' import { IdleWorkspaceManager } from './IdleWorkspaceManager' +import { ServiceException } from '@smithy/smithy-client' +import { SemanticSearch } from '../agenticChat/tools/workspaceContext/semanticSearch' describe('WorkspaceFolderManager', () => { + let mockAgent: StubbedInstance let mockServiceManager: StubbedInstance let mockLogging: StubbedInstance let mockCredentialsProvider: StubbedInstance @@ -19,6 +22,7 @@ describe('WorkspaceFolderManager', () => { let workspaceFolderManager: WorkspaceFolderManager beforeEach(() => { + mockAgent = stubInterface() mockServiceManager = stubInterface() mockLogging = stubInterface() mockCredentialsProvider = stubInterface() @@ -60,6 +64,7 @@ describe('WorkspaceFolderManager', () => { // Create the WorkspaceFolderManager instance using the static createInstance method workspaceFolderManager = WorkspaceFolderManager.createInstance( + mockAgent, mockServiceManager, mockLogging, mockArtifactManager, @@ -112,6 +117,7 @@ describe('WorkspaceFolderManager', () => { // Create the WorkspaceFolderManager instance using the static createInstance method workspaceFolderManager = WorkspaceFolderManager.createInstance( + mockAgent, mockServiceManager, mockLogging, mockArtifactManager, @@ -129,10 +135,364 @@ describe('WorkspaceFolderManager', () => { // Verify that resetWebSocketClient was called once sinon.assert.calledOnce(resetWebSocketClientSpy) - sinon.assert.calledWith( - mockLogging.log, - sinon.match(/Session is idle, skipping remote workspace status check/) + }) + }) + + describe('isFeatureDisabled', () => { + it('should return true when feature is disabled', async () => { + // Setup + const workspaceFolders: WorkspaceFolder[] = [ + { + uri: 'file:///test/workspace', + name: 'test-workspace', + }, + ] + + const mockError = new ServiceException({ + name: 'AccessDeniedException', + message: 'Feature is not supported', + $fault: 'client', + $metadata: { + httpStatusCode: 403, + }, + }) + + mockCodeWhispererService.listWorkspaceMetadata.rejects(mockError) + + // Create the WorkspaceFolderManager instance + workspaceFolderManager = WorkspaceFolderManager.createInstance( + mockAgent, + mockServiceManager, + mockLogging, + mockArtifactManager, + mockDependencyDiscoverer, + workspaceFolders, + mockCredentialsProvider, + 'test-workspace-identifier' + ) + + // Spy on clearAllWorkspaceResources and related methods + const clearAllWorkspaceResourcesSpy = sinon.stub( + workspaceFolderManager as any, + 'clearAllWorkspaceResources' + ) + + // Act - trigger listWorkspaceMetadata which sets feature disabled state + await (workspaceFolderManager as any).listWorkspaceMetadata() + + // Assert + expect(workspaceFolderManager.isFeatureDisabled()).toBe(true) + + // Verify that clearAllWorkspaceResources was called + sinon.assert.calledOnce(clearAllWorkspaceResourcesSpy) + }) + + it('should return false when feature is not disabled', async () => { + // Setup + const workspaceFolders: WorkspaceFolder[] = [ + { + uri: 'file:///test/workspace', + name: 'test-workspace', + }, + ] + + // Mock successful response + const mockResponse: ListWorkspaceMetadataResponse = { + workspaces: [ + { + workspaceId: 'test-workspace-id', + // TODO: RUNNING does not exist in WorkspaceStatus so we need to use type assertion for now. + workspaceStatus: 'RUNNING' as WorkspaceStatus, + }, + ], + } + + mockCodeWhispererService.listWorkspaceMetadata.resolves(mockResponse as any) + + // Create the WorkspaceFolderManager instance + workspaceFolderManager = WorkspaceFolderManager.createInstance( + mockAgent, + mockServiceManager, + mockLogging, + mockArtifactManager, + mockDependencyDiscoverer, + workspaceFolders, + mockCredentialsProvider, + 'test-workspace-identifier' + ) + + // Act - trigger listWorkspaceMetadata + await (workspaceFolderManager as any).listWorkspaceMetadata() + + // Assert + expect(workspaceFolderManager.isFeatureDisabled()).toBe(false) + }) + }) + + describe('semantic search tool management', () => { + beforeEach(() => { + const workspaceFolders: WorkspaceFolder[] = [ + { + uri: 'file:///test/workspace', + name: 'test-workspace', + }, + ] + + workspaceFolderManager = WorkspaceFolderManager.createInstance( + mockAgent, + mockServiceManager, + mockLogging, + mockArtifactManager, + mockDependencyDiscoverer, + workspaceFolders, + mockCredentialsProvider, + 'test-workspace-identifier' + ) + + // Mock service manager methods + mockServiceManager.getRegion.returns('us-east-1') + }) + + describe('setSemanticSearchToolStatus', () => { + it('should set semantic search tool status to enabled', () => { + // Act + workspaceFolderManager.setSemanticSearchToolStatus(true) + + // Assert - we can't directly access the private property, but we can test the behavior + // through other methods that depend on this status + expect(workspaceFolderManager).toBeDefined() + }) + + it('should set semantic search tool status to disabled', () => { + // Act + workspaceFolderManager.setSemanticSearchToolStatus(false) + + // Assert + expect(workspaceFolderManager).toBeDefined() + }) + }) + + describe('registerSemanticSearchTool', () => { + it('should register semantic search tool when not already present', () => { + // Setup + mockAgent.getTools.returns([]) // No existing tools + workspaceFolderManager.setSemanticSearchToolStatus(true) + + // Act - call the private method through establishConnection + const mockMetadata = { + environmentId: 'test-env-123', + environmentAddress: 'wss://test.amazonaws.com', + workspaceStatus: 'READY' as const, + } + + // Spy on the private method + const registerSemanticSearchToolSpy = sinon.spy( + workspaceFolderManager as any, + 'registerSemanticSearchTool' + ) + + // Trigger establishConnection which calls registerSemanticSearchTool + ;(workspaceFolderManager as any).establishConnection(mockMetadata) + + // Assert + sinon.assert.calledOnce(registerSemanticSearchToolSpy) + sinon.assert.calledOnce(mockAgent.addTool) + + // Verify the tool was added with correct parameters + const addToolCall = mockAgent.addTool.getCall(0) + expect(addToolCall.args[0].name).toBe(SemanticSearch.toolName) + expect(addToolCall.args[2]).toBe(ToolClassification.BuiltIn) + }) + + it('should not register semantic search tool when already present', () => { + // Setup - mock existing tool + const existingTool = { + name: SemanticSearch.toolName, + description: 'Mock semantic search tool', + inputSchema: { type: 'object' as const, properties: {}, required: [] }, + } + mockAgent.getTools.returns([existingTool]) + workspaceFolderManager.setSemanticSearchToolStatus(true) + + // Act + const mockMetadata = { + environmentId: 'test-env-123', + environmentAddress: 'wss://test.amazonaws.com', + workspaceStatus: 'READY' as const, + } + + ;(workspaceFolderManager as any).establishConnection(mockMetadata) + + // Assert - addTool should not be called since tool already exists + sinon.assert.notCalled(mockAgent.addTool) + }) + + it('should not register semantic search tool when status is disabled', () => { + // Setup + mockAgent.getTools.returns([]) + workspaceFolderManager.setSemanticSearchToolStatus(false) // Disabled + + // Act + const mockMetadata = { + environmentId: 'test-env-123', + environmentAddress: 'wss://test.amazonaws.com', + workspaceStatus: 'READY' as const, + } + + ;(workspaceFolderManager as any).establishConnection(mockMetadata) + + // Assert - addTool should not be called since semantic search is disabled + sinon.assert.notCalled(mockAgent.addTool) + }) + }) + + describe('removeSemanticSearchTool', () => { + it('should remove semantic search tool when present', () => { + // Setup - mock existing tool + const existingTool = { + name: SemanticSearch.toolName, + description: 'Mock semantic search tool', + inputSchema: { type: 'object' as const, properties: {}, required: [] }, + } + mockAgent.getTools.returns([existingTool]) + workspaceFolderManager.setSemanticSearchToolStatus(true) + + // Act - call removeSemanticSearchTool through clearAllWorkspaceResources + workspaceFolderManager.clearAllWorkspaceResources() + + // Assert + sinon.assert.calledOnce(mockAgent.removeTool) + sinon.assert.calledWith(mockAgent.removeTool, SemanticSearch.toolName) + }) + + it('should not remove semantic search tool when not present', () => { + // Setup - no existing tools + mockAgent.getTools.returns([]) + workspaceFolderManager.setSemanticSearchToolStatus(true) + + // Act + workspaceFolderManager.clearAllWorkspaceResources() + + // Assert - removeTool should not be called since tool doesn't exist + sinon.assert.notCalled(mockAgent.removeTool) + }) + + it('should remove semantic search tool when session becomes idle', async () => { + // Setup + const existingTool = { + name: SemanticSearch.toolName, + description: 'Mock semantic search tool', + inputSchema: { type: 'object' as const, properties: {}, required: [] }, + } + mockAgent.getTools.returns([existingTool]) + workspaceFolderManager.setSemanticSearchToolStatus(true) + + // Mock IdleSessionManager to return true (idle) + sinon.stub(IdleWorkspaceManager, 'isSessionIdle').returns(true) + + const workspaceFolders: WorkspaceFolder[] = [ + { + uri: 'file:///test/workspace', + name: 'test-workspace', + }, + ] + + // Update workspace folders to trigger the idle check + workspaceFolderManager.updateWorkspaceFolders(workspaceFolders) + + // Act - trigger checkRemoteWorkspaceStatusAndReact which handles idle state + await workspaceFolderManager.checkRemoteWorkspaceStatusAndReact() + + // Assert + sinon.assert.calledOnce(mockAgent.removeTool) + sinon.assert.calledWith(mockAgent.removeTool, SemanticSearch.toolName) + }) + }) + }) + + describe('resetAdminOptOutAndFeatureDisabledStatus', () => { + it('should reset both opt-out and feature disabled status', () => { + // Setup + const workspaceFolders: WorkspaceFolder[] = [ + { + uri: 'file:///test/workspace', + name: 'test-workspace', + }, + ] + + workspaceFolderManager = WorkspaceFolderManager.createInstance( + mockAgent, + mockServiceManager, + mockLogging, + mockArtifactManager, + mockDependencyDiscoverer, + workspaceFolders, + mockCredentialsProvider, + 'test-workspace-identifier' + ) + + // Simulate both statuses being set to true + // We can't directly set these private properties, but we can test the behavior + // by triggering conditions that would set them and then resetting + + // Act + workspaceFolderManager.resetAdminOptOutAndFeatureDisabledStatus() + + // Assert - verify the statuses are reset + expect(workspaceFolderManager.getOptOutStatus()).toBe(false) + expect(workspaceFolderManager.isFeatureDisabled()).toBe(false) + }) + }) + + describe('feature disabled handling in checkRemoteWorkspaceStatusAndReact', () => { + it('should handle feature disabled state and clear resources', async () => { + // Setup + const workspaceFolders: WorkspaceFolder[] = [ + { + uri: 'file:///test/workspace', + name: 'test-workspace', + }, + ] + + // Mock IdleSessionManager to return false (not idle) + sinon.stub(IdleWorkspaceManager, 'isSessionIdle').returns(false) + + // Mock listWorkspaceMetadata to throw AccessDeniedException with feature not supported + const mockError = new ServiceException({ + name: 'AccessDeniedException', + message: 'Feature is not supported', + $fault: 'client', + $metadata: { + httpStatusCode: 403, + }, + }) + + mockCodeWhispererService.listWorkspaceMetadata.rejects(mockError) + + workspaceFolderManager = WorkspaceFolderManager.createInstance( + mockAgent, + mockServiceManager, + mockLogging, + mockArtifactManager, + mockDependencyDiscoverer, + workspaceFolders, + mockCredentialsProvider, + 'test-workspace-identifier' + ) + + // Spy on clearAllWorkspaceResources + const clearAllWorkspaceResourcesSpy = sinon.stub( + workspaceFolderManager as any, + 'clearAllWorkspaceResources' ) + + // Act + await workspaceFolderManager.checkRemoteWorkspaceStatusAndReact() + + // Assert + expect(workspaceFolderManager.isFeatureDisabled()).toBe(true) + sinon.assert.calledOnce(clearAllWorkspaceResourcesSpy) + sinon.assert.calledWith(mockLogging.log, sinon.match(/Feature disabled, clearing all resources/)) }) }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceFolderManager.ts b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceFolderManager.ts index 99fc9c4628..ca274b67a4 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceFolderManager.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/workspaceContext/workspaceFolderManager.ts @@ -5,8 +5,8 @@ import { CreateWorkspaceResponse, WorkspaceMetadata, WorkspaceStatus, -} from '../../client/token/codewhispererbearertokenclient' -import { CredentialsProvider, Logging } from '@aws/language-server-runtimes/server-interface' +} from '@amzn/codewhisperer-runtime' +import { Agent, CredentialsProvider, Logging, ToolClassification } from '@aws/language-server-runtimes/server-interface' import { ArtifactManager, FileMetadata } from './artifactManager' import { cleanUrl, @@ -19,19 +19,22 @@ import { DependencyDiscoverer } from './dependency/dependencyDiscoverer' import { AmazonQTokenServiceManager } from '../../shared/amazonQServiceManager/AmazonQTokenServiceManager' import { URI } from 'vscode-uri' import path = require('path') -import { isAwsError } from '../../shared/utils' +import { isAwsError, isServiceException } from '../../shared/utils' import { IdleWorkspaceManager } from './IdleWorkspaceManager' +import { SemanticSearch, SemanticSearchParams } from '../agenticChat/tools/workspaceContext/semanticSearch' interface WorkspaceState { remoteWorkspaceState: WorkspaceStatus messageQueue: any[] webSocketClient?: WebSocketClient workspaceId?: string + environmentId?: string } type WorkspaceRoot = string export class WorkspaceFolderManager { + private agent: Agent private serviceManager: AmazonQTokenServiceManager private logging: Logging private artifactManager: ArtifactManager @@ -55,10 +58,13 @@ export class WorkspaceFolderManager { private optOutMonitorInterval: NodeJS.Timeout | undefined private messageQueueConsumerInterval: NodeJS.Timeout | undefined private isOptedOut: boolean = false + private featureDisabled: boolean = false // Serve as a server-side control. If true, stop WCS features + private semanticSearchToolEnabled: boolean = false private isCheckingRemoteWorkspaceStatus: boolean = false private isArtifactUploadedToRemoteWorkspace: boolean = false static createInstance( + agent: Agent, serviceManager: AmazonQTokenServiceManager, logging: Logging, artifactManager: ArtifactManager, @@ -69,6 +75,7 @@ export class WorkspaceFolderManager { ): WorkspaceFolderManager { if (!this.instance) { this.instance = new WorkspaceFolderManager( + agent, serviceManager, logging, artifactManager, @@ -86,6 +93,7 @@ export class WorkspaceFolderManager { } private constructor( + agent: Agent, serviceManager: AmazonQTokenServiceManager, logging: Logging, artifactManager: ArtifactManager, @@ -94,6 +102,7 @@ export class WorkspaceFolderManager { credentialsProvider: CredentialsProvider, workspaceIdentifier: string ) { + this.agent = agent this.serviceManager = serviceManager this.logging = logging this.artifactManager = artifactManager @@ -117,7 +126,8 @@ export class WorkspaceFolderManager { this.remoteWorkspaceIdResolver = resolve }) this.workspaceState = { - remoteWorkspaceState: 'CREATION_PENDING', + // TODO: CREATION_PENDING does not exist in WorkspaceStatus so we need to use type assertion for now. + remoteWorkspaceState: 'CREATION_PENDING' as WorkspaceStatus, messageQueue: [], } } @@ -139,8 +149,17 @@ export class WorkspaceFolderManager { return this.isOptedOut } - resetAdminOptOutStatus(): void { + resetAdminOptOutAndFeatureDisabledStatus(): void { this.isOptedOut = false + this.featureDisabled = false + } + + isFeatureDisabled(): boolean { + return this.featureDisabled + } + + setSemanticSearchToolStatus(semanticSearchToolEnabled: boolean): void { + this.semanticSearchToolEnabled = semanticSearchToolEnabled } getWorkspaceState(): WorkspaceState { @@ -225,6 +244,7 @@ export class WorkspaceFolderManager { this.workspaceState.webSocketClient?.destroyClient() this.dependencyDiscoverer.dispose() this.artifactManager.dispose() + this.removeSemanticSearchTool() } /** @@ -318,6 +338,10 @@ export class WorkspaceFolderManager { const webSocketClient = new WebSocketClient(websocketUrl, this.logging, this.credentialsProvider) this.workspaceState.remoteWorkspaceState = 'CONNECTED' this.workspaceState.webSocketClient = webSocketClient + this.workspaceState.environmentId = existingMetadata.environmentId + if (this.semanticSearchToolEnabled) { + this.registerSemanticSearchTool() + } } initializeWorkspaceStatusMonitor() { @@ -326,6 +350,7 @@ export class WorkspaceFolderManager { // Reset workspace ID to force operations to wait for new remote workspace information this.resetRemoteWorkspaceId() + IdleWorkspaceManager.setSessionAsIdle() this.isArtifactUploadedToRemoteWorkspace = false // Set up message queue consumer @@ -371,7 +396,9 @@ export class WorkspaceFolderManager { return resolve(false) } - const { metadata, optOut } = await this.listWorkspaceMetadata(this.workspaceIdentifier) + const { metadata, optOut, featureDisabled } = await this.listWorkspaceMetadata( + this.workspaceIdentifier + ) if (optOut) { this.logging.log(`User opted out during initial connection`) @@ -381,13 +408,21 @@ export class WorkspaceFolderManager { return resolve(false) } + if (featureDisabled) { + this.logging.log(`Feature disabled during initial connection`) + this.featureDisabled = true + this.clearAllWorkspaceResources() + return resolve(false) + } + if (!metadata) { // Continue polling by exiting only this iteration return } - this.workspaceState.remoteWorkspaceState = metadata.workspaceStatus - + if (metadata.workspaceStatus) { + this.workspaceState.remoteWorkspaceState = metadata.workspaceStatus + } switch (metadata.workspaceStatus) { case 'READY': const client = this.workspaceState.webSocketClient @@ -427,6 +462,9 @@ export class WorkspaceFolderManager { try { if (IdleWorkspaceManager.isSessionIdle()) { this.resetWebSocketClient() + if (this.semanticSearchToolEnabled) { + this.removeSemanticSearchTool() + } this.logging.log('Session is idle, skipping remote workspace status check') return } @@ -437,7 +475,9 @@ export class WorkspaceFolderManager { } this.logging.log(`Checking remote workspace status for workspace [${this.workspaceIdentifier}]`) - const { metadata, optOut, error } = await this.listWorkspaceMetadata(this.workspaceIdentifier) + const { metadata, optOut, featureDisabled, error } = await this.listWorkspaceMetadata( + this.workspaceIdentifier + ) if (optOut) { this.logging.log('User opted out, clearing all resources and starting opt-out monitor') @@ -447,6 +487,13 @@ export class WorkspaceFolderManager { return } + if (featureDisabled) { + this.logging.log('Feature disabled, clearing all resources and stoping server-side indexing features') + this.featureDisabled = true + this.clearAllWorkspaceResources() + return + } + if (error) { // Do not do anything if we received an exception but not caused by optOut return @@ -459,8 +506,10 @@ export class WorkspaceFolderManager { return } - this.workspaceState.remoteWorkspaceState = metadata.workspaceStatus - if (this.workspaceState.workspaceId === undefined) { + if (metadata.workspaceStatus) { + this.workspaceState.remoteWorkspaceState = metadata.workspaceStatus + } + if (this.workspaceState.workspaceId === undefined && metadata.workspaceId) { this.setRemoteWorkspaceId(metadata.workspaceId) } @@ -528,7 +577,14 @@ export class WorkspaceFolderManager { if (this.optOutMonitorInterval === undefined) { const intervalId = setInterval(async () => { try { - const { optOut } = await this.listWorkspaceMetadata() + const { optOut, featureDisabled } = await this.listWorkspaceMetadata() + + if (featureDisabled) { + // Stop opt-out monitor when WCS feature is disabled from server-side + this.featureDisabled = true + clearInterval(intervalId) + this.optOutMonitorInterval = undefined + } if (!optOut) { this.isOptedOut = false @@ -636,6 +692,32 @@ export class WorkspaceFolderManager { } } + private registerSemanticSearchTool() { + const existingTool = this.agent.getTools().find(tool => tool.name === SemanticSearch.toolName) + if (!existingTool) { + const semanticSearchTool = new SemanticSearch( + this.logging, + this.credentialsProvider, + this.serviceManager.getRegion() || 'us-east-1' + ) + this.agent.addTool( + semanticSearchTool.getSpec(), + async (input: SemanticSearchParams) => { + semanticSearchTool.validate(input) + return await semanticSearchTool.invoke(input) + }, + ToolClassification.BuiltIn + ) + } + } + + private removeSemanticSearchTool() { + const existingTool = this.agent.getTools().find(tool => tool.name === SemanticSearch.toolName) + if (existingTool) { + this.agent.removeTool(SemanticSearch.toolName) + } + } + private async createNewWorkspace() { const createWorkspaceResult = await this.createWorkspace(this.workspaceIdentifier) const workspaceDetails = createWorkspaceResult.response @@ -644,8 +726,10 @@ export class WorkspaceFolderManager { return createWorkspaceResult } - this.workspaceState.remoteWorkspaceState = workspaceDetails.workspace.workspaceStatus - if (this.workspaceState.workspaceId === undefined) { + if (workspaceDetails.workspace?.workspaceStatus) { + this.workspaceState.remoteWorkspaceState = workspaceDetails.workspace?.workspaceStatus + } + if (this.workspaceState.workspaceId === undefined && workspaceDetails.workspace?.workspaceId) { this.setRemoteWorkspaceId(workspaceDetails.workspace.workspaceId) } @@ -735,15 +819,17 @@ export class WorkspaceFolderManager { private async listWorkspaceMetadata(workspaceRoot?: WorkspaceRoot): Promise<{ metadata: WorkspaceMetadata | undefined | null optOut: boolean + featureDisabled: boolean error: any }> { let metadata: WorkspaceMetadata | undefined | null let optOut = false + let featureDisabled = false let error: any try { const params = workspaceRoot ? { workspaceRoot } : {} const response = await this.serviceManager.getCodewhispererService().listWorkspaceMetadata(params) - metadata = response && response.workspaces.length ? response.workspaces[0] : null + metadata = response && response.workspaces?.length ? response.workspaces[0] : null } catch (e: any) { error = e this.logging.warn(`Error while fetching workspace (${workspaceRoot}) metadata: ${e?.message}`) @@ -754,8 +840,13 @@ export class WorkspaceFolderManager { this.logging.log(`User's administrator opted out server-side workspace context`) optOut = true } + if (isServiceException(e) && e.name === 'AccessDeniedException') { + if (e.message.includes('Feature is not supported')) { + featureDisabled = true + } + } } - return { metadata, optOut, error } + return { metadata, optOut, featureDisabled, error } } private async createWorkspace(workspaceRoot: WorkspaceRoot): Promise<{ @@ -774,7 +865,7 @@ export class WorkspaceFolderManager { this.logging.warn( `Error while creating workspace (${workspaceRoot}): ${e.message}. Error is ${e.retryable ? '' : 'not'} retryable}` ) - if (isAwsError(e) && e.code === 'ServiceQuotaExceededException') { + if (isServiceException(e) && e.name === 'ServiceQuotaExceededException') { isServiceQuotaExceeded = true } error = { diff --git a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQIAMServiceManager.ts b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQIAMServiceManager.ts index 774102a987..bf27a599a2 100644 --- a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQIAMServiceManager.ts +++ b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQIAMServiceManager.ts @@ -74,12 +74,20 @@ export class AmazonQIAMServiceManager extends BaseAmazonQServiceManager< this.region, this.endpoint ) + this.cachedStreamingClient.shareCodeWhispererContentWithAWS = this.configurationCache.getProperty( + 'shareCodeWhispererContentWithAWS' + ) } return this.cachedStreamingClient } - public handleOnCredentialsDeleted(_type: CredentialsType): void { - return + public handleOnCredentialsDeleted(type: CredentialsType): void { + if (type === 'iam') { + this.cachedCodewhispererService?.abortInflightRequests() + this.cachedCodewhispererService = undefined + this.cachedStreamingClient?.abortInflightRequests() + this.cachedStreamingClient = undefined + } } public override handleOnUpdateConfiguration( diff --git a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQTokenServiceManager.test.ts b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQTokenServiceManager.test.ts index 73af1c14fc..bd37da2346 100644 --- a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQTokenServiceManager.test.ts +++ b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQTokenServiceManager.test.ts @@ -57,7 +57,6 @@ const TEST_ENDPOINT_EU_CENTRAL_1 = 'http://amazon-q-in-eu-central-1-endpoint' describe('AmazonQTokenServiceManager', () => { let codewhispererServiceStub: StubbedInstance let codewhispererStubFactory: sinon.SinonStub> - let sdkInitializatorSpy: sinon.SinonSpy let getListAllAvailableProfilesHandlerStub: sinon.SinonStub let amazonQTokenServiceManager: AmazonQTokenServiceManager @@ -84,10 +83,6 @@ describe('AmazonQTokenServiceManager', () => { features = new TestFeatures() - sdkInitializatorSpy = Object.assign(sinon.spy(features.sdkInitializator), { - v2: sinon.spy(features.sdkInitializator.v2), - }) - codewhispererServiceStub = stubInterface() // @ts-ignore codewhispererServiceStub.client = sinon.stub() diff --git a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQTokenServiceManager.ts b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQTokenServiceManager.ts index 8db60a69ab..ee706c0b22 100644 --- a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQTokenServiceManager.ts +++ b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/AmazonQTokenServiceManager.ts @@ -33,6 +33,8 @@ import { getAmazonQRegionAndEndpoint } from './configurationUtils' import { getUserAgent } from '../telemetryUtils' import { StreamingClientServiceToken } from '../streamingClientService' import { parse } from '@aws-sdk/util-arn-parser' +import { ChatDatabase } from '../../language-server/agenticChat/tools/chatDb/chatDb' +import { ProfileStatusMonitor } from '../../language-server/agenticChat/tools/mcp/profileStatusMonitor' /** * AmazonQTokenServiceManager manages state and provides centralized access to @@ -147,11 +149,18 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< if (type === 'iam') { return } + + // Clear model cache when credentials are deleted + ChatDatabase.clearModelCache() + this.cancelActiveProfileChangeToken() this.resetCodewhispererService() this.connectionType = 'none' this.state = 'PENDING_CONNECTION' + + // Reset MCP state cache when auth changes + ProfileStatusMonitor.resetMcpState() } public async handleOnUpdateConfiguration(params: UpdateConfigurationParams, _token: CancellationToken) { @@ -227,10 +236,11 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< this.features.lsp.getClientInitializeParams()?.initializationOptions?.aws?.awsClientCapabilities ?.textDocument?.inlineCompletionWithReferences?.endpointOverride - // Connection type changed to 'builderId' - - if (newConnectionType === 'builderId') { - this.log('Detected New connection type: builderId') + // Connection type changed to 'builderId' | 'external_idp' + // for now pretend External IdP is just a special case of Builder ID where the subscription has already been established + // and user does not need a profile + if (newConnectionType === 'builderId' || newConnectionType === 'external_idp') { + this.log(`Detected New connection type: ${newConnectionType}`) this.resetCodewhispererService() // For the builderId connection type regional endpoint discovery chain is: @@ -238,12 +248,15 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< const clientParams = this.features.lsp.getClientInitializeParams() this.createCodewhispererServiceInstances( - 'builderId', + newConnectionType, clientParams?.initializationOptions?.aws?.region, endpointOverride ) this.state = 'INITIALIZED' - this.log('Initialized Amazon Q service with builderId connection') + this.log(`Initialized Amazon Q service with ${newConnectionType} connection`) + + // Emit auth success event + ProfileStatusMonitor.emitAuthSuccess() return } @@ -267,6 +280,9 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< this.state = 'INITIALIZED' this.log('Initialized Amazon Q service with identityCenter connection') + // Emit auth success event + ProfileStatusMonitor.emitAuthSuccess() + return } @@ -375,6 +391,9 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< `Initialized identityCenter connection to region ${newProfile.identityDetails.region} for profile ${newProfile.arn}` ) + // Emit auth success event + ProfileStatusMonitor.emitAuthSuccess() + return } @@ -385,6 +404,9 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< this.activeIdcProfile = newProfile this.state = 'INITIALIZED' + // Emit auth success event + ProfileStatusMonitor.emitAuthSuccess() + return } @@ -396,9 +418,9 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< const newRegion = newProfile.identityDetails.region if (oldRegion === newRegion) { this.log(`New profile is in the same region as old one, keeping exising service.`) - this.log(`New active profile is ${this.activeIdcProfile.arn}, region ${oldRegion}`) this.activeIdcProfile = newProfile this.state = 'INITIALIZED' + this.log(`New active profile is ${this.activeIdcProfile.arn}, region ${newRegion}`) if (this.cachedCodewhispererService) { this.cachedCodewhispererService.profileArn = newProfile.arn @@ -408,6 +430,9 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< this.cachedStreamingClient.profileArn = newProfile.arn } + // Emit auth success event + ProfileStatusMonitor.emitAuthSuccess() + return } @@ -428,6 +453,9 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< ) this.state = 'INITIALIZED' + // Emit auth success event + ProfileStatusMonitor.emitAuthSuccess() + return } @@ -482,7 +510,7 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< } private createCodewhispererServiceInstances( - connectionType: 'builderId' | 'identityCenter', + connectionType: Exclude, clientOrProfileRegion: string | undefined, endpointOverride: string | undefined ) { @@ -519,19 +547,17 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< } private serviceFactory(region: string, endpoint: string): CodeWhispererServiceToken { + const customUserAgent = this.getCustomUserAgent() const service = new CodeWhispererServiceToken( this.features.credentialsProvider, this.features.workspace, this.features.logging, region, endpoint, - this.features.sdkInitializator + this.features.sdkInitializator, + customUserAgent ) - const customUserAgent = this.getCustomUserAgent() - service.updateClientConfig({ - customUserAgent: customUserAgent, - }) service.customizationArn = this.configurationCache.getProperty('customizationArn') service.profileArn = this.activeIdcProfile?.arn service.shareCodeWhispererContentWithAWS = this.configurationCache.getProperty( @@ -556,6 +582,9 @@ export class AmazonQTokenServiceManager extends BaseAmazonQServiceManager< this.getCustomUserAgent() ) streamingClient.profileArn = this.activeIdcProfile?.arn + streamingClient.shareCodeWhispererContentWithAWS = this.configurationCache.getProperty( + 'shareCodeWhispererContentWithAWS' + ) this.logging.debug(`Created streaming client instance region=${region}, endpoint=${endpoint}`) return streamingClient diff --git a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/BaseAmazonQServiceManager.ts b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/BaseAmazonQServiceManager.ts index 9c241809a7..d8aa1b0b48 100644 --- a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/BaseAmazonQServiceManager.ts +++ b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/BaseAmazonQServiceManager.ts @@ -86,6 +86,10 @@ export abstract class BaseAmazonQServiceManager< abstract getCodewhispererService(): C abstract getStreamingClient(): S + get serverInfo() { + return this.features.runtime.serverInfo + } + public getConfiguration(): Readonly { return this.configurationCache.getConfig() } @@ -152,6 +156,17 @@ export abstract class BaseAmazonQServiceManager< ) this.cachedCodewhispererService.shareCodeWhispererContentWithAWS = shareCodeWhispererContentWithAWS } + + if (this.cachedStreamingClient) { + const shareCodeWhispererContentWithAWS = this.configurationCache.getProperty( + 'shareCodeWhispererContentWithAWS' + ) + this.logging.debug( + 'Update shareCodeWhispererContentWithAWS setting on cachedStreamingClient to ' + + shareCodeWhispererContentWithAWS + ) + this.cachedStreamingClient.shareCodeWhispererContentWithAWS = shareCodeWhispererContentWithAWS + } } private async notifyDidChangeConfigurationListeners(): Promise { diff --git a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/qDeveloperProfiles.test.ts b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/qDeveloperProfiles.test.ts index 022b3dedfa..819c300280 100644 --- a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/qDeveloperProfiles.test.ts +++ b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/qDeveloperProfiles.test.ts @@ -1,11 +1,11 @@ import * as assert from 'assert' import sinon, { StubbedInstance, stubInterface } from 'ts-sinon' import { CodeWhispererServiceToken } from '../codeWhispererService' -import { SsoConnectionType } from '../utils' import { AWSInitializationOptions, CancellationTokenSource, Logging, + SsoConnectionType, } from '@aws/language-server-runtimes/server-interface' import { AmazonQDeveloperProfile, @@ -15,6 +15,7 @@ import { } from './qDeveloperProfiles' import { DEFAULT_AWS_Q_ENDPOINT_URL, DEFAULT_AWS_Q_REGION } from '../../shared/constants' import { AmazonQServiceProfileThrottlingError } from './errors' +import { ListAvailableProfilesCommandOutput } from '@amzn/codewhisperer-runtime' const SOME_Q_DEVELOPER_PROFILE_ARN = 'some-random-q-developer-profile-arn' const SOME_Q_DEVELOPER_PROFILE_NAME = 'some-random-q-developer-profile-name' @@ -49,8 +50,8 @@ describe('ListAllAvailableProfiles Handler', () => { profileName: SOME_Q_DEVELOPER_PROFILE_NAME, }, ], - $response: {} as any, - } + $metadata: {}, + } satisfies ListAvailableProfilesCommandOutput beforeEach(() => { logging = stubInterface() diff --git a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/qDeveloperProfiles.ts b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/qDeveloperProfiles.ts index 47f5ec7c37..495a49b572 100644 --- a/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/qDeveloperProfiles.ts +++ b/server/aws-lsp-codewhisperer/src/shared/amazonQServiceManager/qDeveloperProfiles.ts @@ -4,15 +4,16 @@ import { Logging, LSPErrorCodes, ResponseError, + SsoConnectionType, } from '@aws/language-server-runtimes/server-interface' -import { isBool, isObject, SsoConnectionType } from '../utils' +import { isBool, isObject } from '../utils' import { AWS_Q_ENDPOINTS } from '../../shared/constants' import { CodeWhispererServiceToken } from '../codeWhispererService' import { AmazonQServiceProfileThrottlingError } from './errors' export interface AmazonQDeveloperProfile { - arn: string - name: string + arn: string | undefined + name: string | undefined identityDetails?: IdentityDetails } @@ -147,13 +148,14 @@ async function fetchProfilesFromRegion( logging.debug(`Raw response from ${region}: ${JSON.stringify(response)}`) - const profiles = response.profiles.map(profile => ({ - arn: profile.arn, - name: profile.profileName, - identityDetails: { - region, - }, - })) + const profiles = + response.profiles?.map(profile => ({ + arn: profile.arn, + name: profile.profileName, + identityDetails: { + region, + }, + })) ?? [] logging.log(`Fetched ${profiles.length} profiles from ${region} (page: ${numberOfPages + 1})`) if (profiles.length > 0) { diff --git a/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.test.ts b/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.test.ts index 187bc41f35..ccc8a8ecb0 100644 --- a/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.test.ts +++ b/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.test.ts @@ -14,7 +14,6 @@ import { CancellationToken, InlineCompletionWithReferencesParams, } from '@aws/language-server-runtimes/server-interface' -import { ConfigurationOptions } from 'aws-sdk' import * as sinon from 'sinon' import * as assert from 'assert' import { @@ -23,10 +22,12 @@ import { CodeWhispererServiceIAM, GenerateSuggestionsRequest, GenerateSuggestionsResponse, + isIAMRequest, + isTokenRequest, } from './codeWhispererService' import { RecentEditTracker } from '../language-server/inline-completion/tracker/codeEditTracker' import { CodeWhispererSupplementalContext } from './models/model' -import CodeWhispererTokenClient = require('../client/token/codewhispererbearertokenclient') +import { SupplementalContext } from '@amzn/codewhisperer-runtime' describe('CodeWhispererService', function () { let sandbox: sinon.SinonSandbox @@ -90,7 +91,7 @@ describe('CodeWhispererService', function () { ): Promise< | { supContextData: CodeWhispererSupplementalContext - items: CodeWhispererTokenClient.SupplementalContextList + items: SupplementalContext[] } | undefined > { @@ -137,76 +138,23 @@ describe('CodeWhispererService', function () { }) describe('request tracking', function () { - it('should track inflight requests', function () { - const mockRequest = { - abort: sandbox.stub(), - } as any - - service.trackRequest(mockRequest) - assert.strictEqual(service.inflightRequests.size, 1) - assert.strictEqual(service.inflightRequests.has(mockRequest), true) - }) - - it('should complete and remove tracked requests', function () { - const mockRequest = { - abort: sandbox.stub(), - } as any - - service.trackRequest(mockRequest) - service.completeRequest(mockRequest) - - assert.strictEqual(service.inflightRequests.size, 0) - assert.strictEqual(service.inflightRequests.has(mockRequest), false) - }) - it('should abort all inflight requests', function () { - const mockRequest1 = { abort: sandbox.stub() } as any - const mockRequest2 = { abort: sandbox.stub() } as any + const mockController1 = new AbortController() + const mockController2 = new AbortController() + const abortSpy1 = sandbox.spy(mockController1, 'abort') + const abortSpy2 = sandbox.spy(mockController2, 'abort') - service.trackRequest(mockRequest1) - service.trackRequest(mockRequest2) + service.inflightRequests.add(mockController1) + service.inflightRequests.add(mockController2) service.abortInflightRequests() - assert.strictEqual(mockRequest1.abort.calledOnce, true) - assert.strictEqual(mockRequest2.abort.calledOnce, true) + assert.strictEqual(abortSpy1.calledOnce, true) + assert.strictEqual(abortSpy2.calledOnce, true) assert.strictEqual(service.inflightRequests.size, 0) }) }) - describe('updateClientConfig', function () { - it('should update client configuration', function () { - const mockClient = { - config: { - update: sandbox.stub(), - }, - // Add minimal required properties to satisfy the interface - createCodeScan: sandbox.stub(), - createCodeScanUploadUrl: sandbox.stub(), - createProfile: sandbox.stub(), - deleteProfile: sandbox.stub(), - generateCompletions: sandbox.stub(), - generateSuggestions: sandbox.stub(), - getCodeAnalysis: sandbox.stub(), - getCodeScan: sandbox.stub(), - listCodeAnalysisFindings: sandbox.stub(), - listCodeScans: sandbox.stub(), - listFeatureEvaluations: sandbox.stub(), - listProfiles: sandbox.stub(), - sendTelemetryEvent: sandbox.stub(), - startCodeAnalysis: sandbox.stub(), - stopCodeAnalysis: sandbox.stub(), - updateProfile: sandbox.stub(), - } as any - service.client = mockClient - - const options: ConfigurationOptions = { region: 'us-west-2' } - service.updateClientConfig(options) - - assert.strictEqual(mockClient.config.update.calledOnceWith(options), true) - }) - }) - describe('generateItemId', function () { it('should generate unique item IDs', function () { const id1 = service.generateItemId() @@ -225,20 +173,17 @@ describe('CodeWhispererService', function () { beforeEach(function () { // Mock the createCodeWhispererSigv4Client function to avoid real client creation const mockClient = { - generateRecommendations: sandbox.stub().returns({ - promise: sandbox.stub().resolves({ - recommendations: [], - $response: { - requestId: 'test-request-id', - httpResponse: { - headers: { 'x-amzn-sessionid': 'test-session-id' }, - }, - }, - }), + send: sandbox.stub().resolves({ + recommendations: [], + $metadata: { + requestId: 'test-request-id', + }, + $httpHeaders: { + 'x-amzn-sessionid': 'test-session-id', + }, }), - setupRequestListeners: sandbox.stub(), - config: { - update: sandbox.stub(), + middlewareStack: { + add: sandbox.stub(), }, } @@ -300,8 +245,40 @@ describe('CodeWhispererService', function () { await service.generateSuggestions(mockRequest) // Verify that the client was called with the customizationArn - const clientCall = (service.client.generateRecommendations as sinon.SinonStub).getCall(0) - assert.strictEqual(clientCall.args[0].customizationArn, 'test-arn') + const clientCall = (service.client.send as sinon.SinonStub).getCall(0) + assert.strictEqual(clientCall.args[0].input.customizationArn, 'test-arn') + }) + + it('should include serviceType in response', async function () { + const mockRequest: GenerateSuggestionsRequest = { + fileContext: { + filename: 'test.js', + programmingLanguage: { languageName: 'javascript' }, + leftFileContent: 'const x = ', + rightFileContent: '', + }, + maxResults: 5, + } + + const result = await service.generateSuggestions(mockRequest) + assert.strictEqual(result.responseContext.authType, 'iam') + }) + }) + + describe('Request Type Guards', function () { + it('should identify IAM vs Token requests', function () { + const iamRequest = { + fileContext: { + filename: 'test.js', + programmingLanguage: { languageName: 'javascript' }, + leftFileContent: '', + rightFileContent: '', + }, + } + const tokenRequest = { ...iamRequest, editorState: {} } + + assert.strictEqual(isIAMRequest(iamRequest), true) + assert.strictEqual(isTokenRequest(tokenRequest), true) }) }) }) diff --git a/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.ts b/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.ts index a162ff44e6..af9bc78ac7 100644 --- a/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.ts +++ b/server/aws-lsp-codewhisperer/src/shared/codeWhispererService.ts @@ -13,23 +13,19 @@ import { InlineCompletionWithReferencesParams, } from '@aws/language-server-runtimes/server-interface' import { waitUntil } from '@aws/lsp-core/out/util/timeoutUtils' -import { AWSError, ConfigurationOptions, CredentialProviderChain, Credentials } from 'aws-sdk' -import { PromiseResult } from 'aws-sdk/lib/request' -import { Request } from 'aws-sdk/lib/core' +import { AwsCredentialIdentity } from '@aws-sdk/types' import { v4 as uuidv4 } from 'uuid' import { + CodeWhispererSigv4Client, CodeWhispererSigv4ClientConfigurationOptions, createCodeWhispererSigv4Client, } from '../client/sigv4/codewhisperer' import { CodeWhispererTokenClientConfigurationOptions, createCodeWhispererTokenClient, - RequestExtras, + CodeWhispererTokenClient, } from '../client/token/codewhisperer' -import CodeWhispererSigv4Client = require('../client/sigv4/codewhisperersigv4client') -import CodeWhispererTokenClient = require('../client/token/codewhispererbearertokenclient') import { getErrorId } from './utils' -import { GenerateCompletionsResponse } from '../client/token/codewhispererbearertokenclient' import { getRelativePath } from '../language-server/workspaceContext/util' import { CodewhispererLanguage, getRuntimeLanguage } from './languageDetection' import { RecentEditTracker } from '../language-server/inline-completion/tracker/codeEditTracker' @@ -40,29 +36,102 @@ import { CONTEXT_CHARACTERS_LIMIT, FILE_URI_CHARS_LIMIT, FILENAME_CHARS_LIMIT, -} from '../language-server/inline-completion/constants' +} from '../language-server/inline-completion/contants/constants' +import { + Completion, + CreateSubscriptionTokenCommand, + CreateSubscriptionTokenRequest, + CreateSubscriptionTokenResponse, + CreateUploadUrlCommand, + CreateUploadUrlRequest, + CreateWorkspaceCommand, + CreateWorkspaceRequest, + DeleteWorkspaceCommand, + DeleteWorkspaceRequest, + GenerateCompletionsCommand, + GenerateCompletionsRequest, + GenerateCompletionsResponse, + GetCodeAnalysisCommand, + GetCodeAnalysisRequest, + GetProfileCommand, + GetProfileRequest, + GetTransformationCommand, + GetTransformationPlanCommand, + GetTransformationPlanRequest, + GetTransformationRequest, + ListAvailableCustomizationsCommand, + ListAvailableCustomizationsRequest, + ListAvailableModelsCommand, + ListAvailableModelsRequest, + ListAvailableProfilesCommand, + ListAvailableProfilesRequest, + ListCodeAnalysisFindingsCommand, + ListCodeAnalysisFindingsRequest, + ListFeatureEvaluationsCommand, + ListFeatureEvaluationsRequest, + ListWorkspaceMetadataCommand, + ListWorkspaceMetadataRequest, + SendTelemetryEventCommand, + SendTelemetryEventRequest, + StartCodeAnalysisCommand, + StartCodeAnalysisRequest, + StartTransformationCommand, + StartTransformationRequest, + StopTransformationCommand, + StopTransformationRequest, + SupplementalContext, + SupplementalContextType, +} from '@amzn/codewhisperer-runtime' +import { + GenerateRecommendationsCommand, + GenerateRecommendationsRequest, + GenerateRecommendationsResponse, + Recommendation, +} from '@amzn/codewhisperer' + +// Type guards for request classification +export function isTokenRequest(request: GenerateSuggestionsRequest): request is GenerateTokenSuggestionsRequest { + return 'editorState' in request || 'predictionTypes' in request || 'supplementalContexts' in request +} -export interface Suggestion extends CodeWhispererTokenClient.Completion, CodeWhispererSigv4Client.Recommendation { - itemId: string +export function isIAMRequest(request: GenerateSuggestionsRequest): request is GenerateIAMSuggestionsRequest { + return !isTokenRequest(request) } -export interface GenerateSuggestionsRequest extends CodeWhispererTokenClient.GenerateCompletionsRequest { - // TODO : This is broken due to Interface 'GenerateSuggestionsRequest' cannot simultaneously extend types 'GenerateCompletionsRequest' and 'GenerateRecommendationsRequest'. - //CodeWhispererSigv4Client.GenerateRecommendationsRequest { - maxResults: number +export interface Suggestion extends Completion, Recommendation { + itemId: string } -export type FileContext = GenerateSuggestionsRequest['fileContext'] +// IAM-specific request interface that directly extends the SigV4 client request +export interface GenerateIAMSuggestionsRequest extends GenerateRecommendationsRequest {} + +// Token-specific request interface that directly extends the Token client request +export interface GenerateTokenSuggestionsRequest extends GenerateCompletionsRequest {} + +// Union type for backward compatibility +export type GenerateSuggestionsRequest = GenerateIAMSuggestionsRequest | GenerateTokenSuggestionsRequest + +// FileContext type that's compatible with both clients +export type FileContext = { + fileUri?: string // Optional in both clients + filename: string + programmingLanguage: { + languageName: string + } + leftFileContent: string + rightFileContent: string +} export interface ResponseContext { - requestId: string + requestId: string | undefined codewhispererSessionId: string nextToken?: string + authType?: 'iam' | 'token' } export enum SuggestionType { - EDIT = 'EDIT', - COMPLETION = 'COMPLETION', + EDIT = 'EDITS', + COMPLETION = 'COMPLETIONS', } export interface GenerateSuggestionsResponse { @@ -71,45 +140,76 @@ export interface GenerateSuggestionsResponse { responseContext: ResponseContext } +export class ClientFileContextClss { + readonly leftFileContent: string + readonly rightFileContent: string + readonly filename: string + readonly fileUri: string + readonly programmingLanguage: { + languageName: CodewhispererLanguage + } + readonly leftContextAtCurLine: string + readonly rightContextAtCurLine: string + + constructor(params: { + textDocument: TextDocument + position: Position + inferredLanguageId: CodewhispererLanguage + workspaceFolder: WorkspaceFolder | null | undefined + }) { + const left = params.textDocument.getText({ + start: { line: 0, character: 0 }, + end: params.position, + }) + const trimmedLeft = left.slice(-CONTEXT_CHARACTERS_LIMIT).replaceAll('\r\n', '\n') + + const right = params.textDocument.getText({ + start: params.position, + end: params.textDocument.positionAt(params.textDocument.getText().length), + }) + const trimmedRight = right.slice(0, CONTEXT_CHARACTERS_LIMIT).replaceAll('\r\n', '\n') + + const relativeFilePath = params.workspaceFolder + ? getRelativePath(params.workspaceFolder, params.textDocument.uri) + : path.basename(params.textDocument.uri) + + this.fileUri = params.textDocument.uri.substring(0, FILE_URI_CHARS_LIMIT) + this.filename = relativeFilePath.substring(0, FILENAME_CHARS_LIMIT) + this.programmingLanguage = { + languageName: getRuntimeLanguage(params.inferredLanguageId), + } + this.leftFileContent = trimmedLeft + this.rightFileContent = trimmedRight + + this.leftContextAtCurLine = params.textDocument.getText({ + start: { line: params.position.line, character: 0 }, + end: { line: params.position.line, character: params.position.character }, + }) + + this.rightContextAtCurLine = params.textDocument.getText({ + start: { line: params.position.line, character: params.position.character }, + end: { line: params.position.line, character: Number.MAX_VALUE }, + }) + } + + toServiceModel(): FileContext { + return { + fileUri: this.fileUri, + filename: this.filename, + programmingLanguage: this.programmingLanguage, + leftFileContent: this.leftFileContent, + rightFileContent: this.rightFileContent, + } + } +} + export function getFileContext(params: { textDocument: TextDocument position: Position inferredLanguageId: CodewhispererLanguage workspaceFolder: WorkspaceFolder | null | undefined -}): { - fileUri: string - filename: string - programmingLanguage: { - languageName: CodewhispererLanguage - } - leftFileContent: string - rightFileContent: string -} { - const left = params.textDocument.getText({ - start: { line: 0, character: 0 }, - end: params.position, - }) - const trimmedLeft = left.slice(-CONTEXT_CHARACTERS_LIMIT).replaceAll('\r\n', '\n') - - const right = params.textDocument.getText({ - start: params.position, - end: params.textDocument.positionAt(params.textDocument.getText().length), - }) - const trimmedRight = right.slice(0, CONTEXT_CHARACTERS_LIMIT).replaceAll('\r\n', '\n') - - const relativeFilePath = params.workspaceFolder - ? getRelativePath(params.workspaceFolder, params.textDocument.uri) - : path.basename(params.textDocument.uri) - - return { - fileUri: params.textDocument.uri.substring(0, FILE_URI_CHARS_LIMIT), - filename: relativeFilePath.substring(0, FILENAME_CHARS_LIMIT), - programmingLanguage: { - languageName: getRuntimeLanguage(params.inferredLanguageId), - }, - leftFileContent: trimmedLeft, - rightFileContent: trimmedRight, - } +}): ClientFileContextClss { + return new ClientFileContextClss(params) } // This abstract class can grow in the future to account for any additional changes across the clients @@ -121,7 +221,7 @@ export abstract class CodeWhispererServiceBase { public profileArn?: string abstract client: CodeWhispererSigv4Client | CodeWhispererTokenClient - inflightRequests: Set & RequestExtras> = new Set() + inflightRequests: Set = new Set() abortInflightRequests() { this.inflightRequests.forEach(request => { @@ -130,14 +230,6 @@ export abstract class CodeWhispererServiceBase { this.inflightRequests.clear() } - trackRequest(request: AWS.Request & RequestExtras) { - this.inflightRequests.add(request) - } - - completeRequest(request: AWS.Request & RequestExtras) { - this.inflightRequests.delete(request) - } - abstract getCredentialsType(): CredentialsType abstract generateSuggestions(request: GenerateSuggestionsRequest): Promise @@ -154,7 +246,7 @@ export abstract class CodeWhispererServiceBase { ): Promise< | { supContextData: CodeWhispererSupplementalContext - items: CodeWhispererTokenClient.SupplementalContextList + items: SupplementalContext[] } | undefined > @@ -164,13 +256,6 @@ export abstract class CodeWhispererServiceBase { this.codeWhispererEndpoint = codeWhispererEndpoint } - /** - * Updates Service Client options after client was instantiated. - */ - public updateClientConfig(options: ConfigurationOptions) { - this.client.config.update(options) - } - generateItemId = () => uuidv4() async getSubscriptionStatus( @@ -202,19 +287,33 @@ export class CodeWhispererServiceIAM extends CodeWhispererServiceBase { const options: CodeWhispererSigv4ClientConfigurationOptions = { region: this.codeWhispererRegion, endpoint: this.codeWhispererEndpoint, - credentialProvider: new CredentialProviderChain([ - () => credentialsProvider.getCredentials('iam') as Credentials, - ]), - } - this.client = createCodeWhispererSigv4Client(options, sdkInitializator, logging) - // Avoid overwriting any existing client listeners - const clientRequestListeners = this.client.setupRequestListeners - this.client.setupRequestListeners = (request: Request) => { - if (clientRequestListeners) { - clientRequestListeners.call(this.client, request) - } - request.httpRequest.headers['x-amzn-codewhisperer-optout'] = `${!this.shareCodeWhispererContentWithAWS}` + credentials: async () => { + logging.info('CodeWhispererService IAM: Attempting to get credentials') + + try { + const creds = credentialsProvider.getCredentials('iam') as AwsCredentialIdentity + logging.info('CodeWhispererService IAM: Successfully got credentials') + + return { + accessKeyId: creds.accessKeyId, + secretAccessKey: creds.secretAccessKey, + sessionToken: creds.sessionToken, + expiration: creds.expiration, + } + } catch (err) { + if (err instanceof Error) { + logging.error(`CodeWhispererServiceIAM: Failed to get credentials: ${err.message}`) + } + throw err + } + }, } + this.client = createCodeWhispererSigv4Client( + options, + sdkInitializator, + logging, + this.shareCodeWhispererContentWithAWS + ) } getCredentialsType(): CredentialsType { @@ -233,7 +332,7 @@ export class CodeWhispererServiceIAM extends CodeWhispererServiceBase { ): Promise< | { supContextData: CodeWhispererSupplementalContext - items: CodeWhispererTokenClient.SupplementalContextList + items: SupplementalContext[] } | undefined > { @@ -241,22 +340,39 @@ export class CodeWhispererServiceIAM extends CodeWhispererServiceBase { } async generateSuggestions(request: GenerateSuggestionsRequest): Promise { - // add cancellation check - // add error check - if (this.customizationArn) request = { ...request, customizationArn: this.customizationArn } - const response = await this.client.generateRecommendations(request).promise() - const responseContext = { - requestId: response?.$response?.requestId, - codewhispererSessionId: response?.$response?.httpResponse?.headers['x-amzn-sessionid'], - nextToken: response.nextToken, + // Cast is now safe because GenerateIAMSuggestionsRequest extends GenerateRecommendationsRequest + const iamRequest = request as GenerateIAMSuggestionsRequest + + // Add customization ARN if configured + if (this.customizationArn) { + ;(iamRequest as any).customizationArn = this.customizationArn + } + + // Warn about unsupported features for IAM auth + if ('editorState' in request || 'predictionTypes' in request || 'supplementalContexts' in request) { + console.warn('Advanced features not supported - using basic completion') } - for (const recommendation of response?.recommendations ?? []) { + const response = await this.client.send(new GenerateRecommendationsCommand(iamRequest)) + + return this.mapCodeWhispererApiResponseToSuggestion(response, { + requestId: response?.$metadata?.requestId ?? 'unknown', + codewhispererSessionId: (response as any)?.$httpHeaders?.['x-amzn-sessionid'] ?? 'unknown', + nextToken: response.nextToken, + authType: 'iam' as const, + }) + } + + private mapCodeWhispererApiResponseToSuggestion( + apiResponse: GenerateRecommendationsResponse, + responseContext: ResponseContext + ): GenerateSuggestionsResponse { + for (const recommendation of apiResponse?.recommendations ?? []) { Object.assign(recommendation, { itemId: this.generateItemId() }) } return { - suggestions: response.recommendations as Suggestion[], + suggestions: apiResponse.recommendations as Suggestion[], suggestionType: SuggestionType.COMPLETION, responseContext, } @@ -269,7 +385,7 @@ export class CodeWhispererServiceIAM extends CodeWhispererServiceBase { export class CodeWhispererServiceToken extends CodeWhispererServiceBase { client: CodeWhispererTokenClient /** Debounce createSubscriptionToken by storing the current, pending promise (if any). */ - #createSubscriptionTokenPromise?: Promise + #createSubscriptionTokenPromise?: Promise /** If user clicks "Upgrade" multiple times, cancel the previous wait-promise. */ #waitUntilSubscriptionCancelSource?: CancellationTokenSource @@ -279,57 +395,32 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { private logging: Logging, codeWhispererRegion: string, codeWhispererEndpoint: string, - sdkInitializator: SDKInitializator + sdkInitializator: SDKInitializator, + customUserAgent?: string ) { super(codeWhispererRegion, codeWhispererEndpoint) + const tokenProvider = async () => { + const creds = credentialsProvider.getCredentials('bearer') as BearerCredentials + if (!creds?.token) { + throw new Error('Authorization failed, bearer token is not set') + } + return { token: creds.token, expiration: new Date() } + } + const options: CodeWhispererTokenClientConfigurationOptions = { region: this.codeWhispererRegion, endpoint: this.codeWhispererEndpoint, - onRequestSetup: [ - req => { - logging.debug(`CodeWhispererServiceToken: req=${req.operation}`) - this.trackRequest(req) - req.on('build', async ({ httpRequest }) => { - try { - const creds = credentialsProvider.getCredentials('bearer') as BearerCredentials - if (!creds?.token) { - throw new Error('Authorization failed, bearer token is not set') - } - httpRequest.headers['Authorization'] = `Bearer ${creds.token}` - httpRequest.headers['x-amzn-codewhisperer-optout'] = - `${!this.shareCodeWhispererContentWithAWS}` - } catch (err) { - this.completeRequest(req) - throw err - } - }) - req.on('complete', response => { - const requestStartTime = req.startTime?.getTime() || 0 - const requestEndTime = new Date().getTime() - const latency = requestStartTime > 0 ? requestEndTime - requestStartTime : 0 - - const requestBody = req.httpRequest.body ? JSON.parse(String(req.httpRequest.body)) : {} - this.completeRequest(req) - }) - req.on('error', async (error, response) => { - const requestStartTime = req.startTime?.getTime() || 0 - const requestEndTime = new Date().getTime() - const latency = requestStartTime > 0 ? requestEndTime - requestStartTime : 0 - - const requestBody = req.httpRequest.body ? JSON.parse(String(req.httpRequest.body)) : {} - this.completeRequest(req) - }) - req.on('error', () => { - this.completeRequest(req) - }) - req.on('error', () => { - this.completeRequest(req) - }) - }, - ], + token: tokenProvider, + ...(customUserAgent && { customUserAgent }), } - this.client = createCodeWhispererTokenClient(options, sdkInitializator, logging) + this.client = createCodeWhispererTokenClient( + options, + sdkInitializator, + logging, + credentialsProvider, + this.shareCodeWhispererContentWithAWS + ) } getCredentialsType(): CredentialsType { @@ -348,11 +439,11 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { ): Promise< | { supContextData: CodeWhispererSupplementalContext - items: CodeWhispererTokenClient.SupplementalContextList + items: SupplementalContext[] } | undefined > { - const items: CodeWhispererTokenClient.SupplementalContext[] = [] + const items: SupplementalContext[] = [] const projectContext = await fetchSupplementalContext( document, @@ -379,7 +470,7 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { ...recentEditsContext.supplementalContextItems.map(item => ({ content: item.content, filePath: item.filePath, - type: 'PreviousEditorState', + type: SupplementalContextType.PREVIOUS_EDITOR_STATE, metadata: { previousEditorStateMetadata: { timeOffset: 1000, @@ -418,60 +509,76 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { } async generateSuggestions(request: GenerateSuggestionsRequest): Promise { + // Cast is now safe because GenerateTokenSuggestionsRequest extends GenerateCompletionsRequest // add cancellation check // add error check - if (this.customizationArn) request.customizationArn = this.customizationArn - const beforeApiCall = performance.now() - let recentEditsLogStr = '' - const recentEdits = request.supplementalContexts?.filter(it => it.type === 'PreviousEditorState') - if (recentEdits) { - if (recentEdits.length === 0) { - recentEditsLogStr += `No recent edits` - } else { - recentEditsLogStr += '\n' - for (let i = 0; i < recentEdits.length; i++) { - const e = recentEdits[i] - recentEditsLogStr += `[recentEdits ${i}th]:\n` - recentEditsLogStr += `${e.content}\n` - } - } - } - this.logging.info( - `GenerateCompletion request: - "endpoint": ${this.codeWhispererEndpoint}, - "predictionType": ${request.predictionTypes?.toString() ?? 'Not specified (COMPLETIONS)'}, - "filename": ${request.fileContext.filename}, - "language": ${request.fileContext.programmingLanguage.languageName}, - "supplementalContextCount": ${request.supplementalContexts?.length ?? 0}, - "request.nextToken": ${request.nextToken}, - "recentEdits": ${recentEditsLogStr}` - ) + let logstr = `GenerateCompletion activity:\n` + try { + const tokenRequest = request as GenerateTokenSuggestionsRequest - const response = await this.client.generateCompletions(this.withProfileArn(request)).promise() + // Add customizationArn if available + if (this.customizationArn) { + tokenRequest.customizationArn = this.customizationArn + } - const responseContext = { - requestId: response?.$response?.requestId, - codewhispererSessionId: response?.$response?.httpResponse?.headers['x-amzn-sessionid'], - nextToken: response.nextToken, - } + const beforeApiCall = Date.now() + // TODO: Should make context log as a dev option, too noisy, comment it out temporarily + // let recentEditsLogStr = '' + // const recentEdits = tokenRequest.supplementalContexts?.filter(it => it.type === 'PreviousEditorState') + // if (recentEdits) { + // if (recentEdits.length === 0) { + // recentEditsLogStr += `No recent edits` + // } else { + // recentEditsLogStr += '\n' + // for (let i = 0; i < recentEdits.length; i++) { + // const e = recentEdits[i] + // recentEditsLogStr += `[recentEdits ${i}th]:\n` + // recentEditsLogStr += `${e.content}\n` + // } + // } + // } + + logstr += `@@request metadata@@ + "endpoint": ${this.codeWhispererEndpoint}, + "predictionType": ${tokenRequest.predictionTypes?.toString() ?? 'Not specified (COMPLETIONS)'}, + "filename": ${tokenRequest.fileContext?.filename}, + "leftContextLength": ${tokenRequest.fileContext?.leftFileContent?.length}, + rightContextLength: ${tokenRequest.fileContext?.rightFileContent?.length}, + "language": ${tokenRequest.fileContext?.programmingLanguage?.languageName}, + "supplementalContextCount": ${tokenRequest.supplementalContexts?.length ?? 0}, + "request.nextToken": ${tokenRequest.nextToken}` + // "recentEdits": ${recentEditsLogStr}\n` + + const response = await this.client.send(new GenerateCompletionsCommand(this.withProfileArn(tokenRequest))) + + const responseContext: ResponseContext = { + requestId: response?.$metadata?.requestId ?? 'unknown', + codewhispererSessionId: (response?.$metadata as any)?.httpHeaders?.['x-amzn-sessionid'] ?? 'unknown', + nextToken: response.nextToken, + // CRITICAL: Add service type for proper error handling + authType: 'token' as const, + } - const r = this.mapCodeWhispererApiResponseToSuggestion(response, responseContext) - const firstSuggestionLogstr = r.suggestions.length > 0 ? `\n${r.suggestions[0].content}` : 'No suggestion' + const r = this.mapCodeWhispererApiResponseToSuggestion(response, responseContext) + const firstSuggestionLogstr = r.suggestions.length > 0 ? `\n${r.suggestions[0].content}` : 'No suggestion' - this.logging.info( - `GenerateCompletion response: - "endpoint": ${this.codeWhispererEndpoint}, + logstr += `@@response metadata@@ "requestId": ${responseContext.requestId}, "sessionId": ${responseContext.codewhispererSessionId}, - "responseCompletionCount": ${response.completions?.length ?? 0}, - "responsePredictionCount": ${response.predictions?.length ?? 0}, - "predictionType": ${request.predictionTypes?.toString() ?? ''}, - "latency": ${performance.now() - beforeApiCall}, - "filename": ${request.fileContext.filename}, + "response.completions.length": ${response.completions?.length ?? 0}, + "response.predictions.length": ${response.predictions?.length ?? 0}, + "predictionType": ${tokenRequest.predictionTypes?.toString() ?? 'Not specified (COMPLETIONS)'}, + "latency": ${Date.now() - beforeApiCall}, "response.nextToken": ${response.nextToken}, "firstSuggestion": ${firstSuggestionLogstr}` - ) - return r + + return r + } catch (e) { + logstr += `error: ${(e as Error).message}` + throw e + } finally { + this.logging.info(logstr) + } } private mapCodeWhispererApiResponseToSuggestion( @@ -493,6 +600,7 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { } } + // Backward compatibility, completions will be returned if predictionType is not specified (either Completion or Edit) for (const recommendation of apiResponse?.completions ?? []) { Object.assign(recommendation, { itemId: this.generateItemId() }) } @@ -504,10 +612,8 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { } } - public async codeModernizerCreateUploadUrl( - request: CodeWhispererTokenClient.CreateUploadUrlRequest - ): Promise { - return this.client.createUploadUrl(this.withProfileArn(request)).promise() + public async codeModernizerCreateUploadUrl(request: CreateUploadUrlRequest) { + return this.client.send(new CreateUploadUrlCommand(this.withProfileArn(request))) } /** * @description Use this function to start the transformation job. @@ -515,10 +621,8 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { * @returns transformationJobId - String id for the Job */ - public async codeModernizerStartCodeTransformation( - request: CodeWhispererTokenClient.StartTransformationRequest - ): Promise> { - return await this.client.startTransformation(this.withProfileArn(request)).promise() + public async codeModernizerStartCodeTransformation(request: StartTransformationRequest) { + return await this.client.send(new StartTransformationCommand(this.withProfileArn(request))) } /** @@ -526,10 +630,8 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { * @param request * @returns transformationJobId - String id for the Job */ - public async codeModernizerStopCodeTransformation( - request: CodeWhispererTokenClient.StopTransformationRequest - ): Promise> { - return await this.client.stopTransformation(this.withProfileArn(request)).promise() + public async codeModernizerStopCodeTransformation(request: StopTransformationRequest) { + return await this.client.send(new StopTransformationCommand(this.withProfileArn(request))) } /** @@ -537,10 +639,8 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { * be polling this function periodically to get updated results. When this function * returns COMPLETED we know the transformation is done. */ - public async codeModernizerGetCodeTransformation( - request: CodeWhispererTokenClient.GetTransformationRequest - ): Promise> { - return await this.client.getTransformation(this.withProfileArn(request)).promise() + public async codeModernizerGetCodeTransformation(request: GetTransformationRequest) { + return await this.client.send(new GetTransformationCommand(this.withProfileArn(request))) } /** @@ -548,95 +648,99 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { * transformation plan to the user. * @params tranformationJobId - String id returned from StartCodeTransformationResponse */ - public async codeModernizerGetCodeTransformationPlan( - request: CodeWhispererTokenClient.GetTransformationPlanRequest - ): Promise> { - return this.client.getTransformationPlan(this.withProfileArn(request)).promise() + public async codeModernizerGetCodeTransformationPlan(request: GetTransformationPlanRequest) { + return this.client.send(new GetTransformationPlanCommand(this.withProfileArn(request))) } /** * @description get a pre-signed url to upload source code into S3 bucket */ - async createUploadUrl( - request: CodeWhispererTokenClient.CreateUploadUrlRequest - ): Promise> { - return this.client.createUploadUrl(this.withProfileArn(request)).promise() + async createUploadUrl(request: CreateUploadUrlRequest) { + return this.client.send(new CreateUploadUrlCommand(this.withProfileArn(request))) } /** * @description Once source code uploaded to S3, send a request to run security scan on uploaded source code. */ - async startCodeAnalysis( - request: CodeWhispererTokenClient.StartCodeAnalysisRequest - ): Promise> { - return this.client.startCodeAnalysis(this.withProfileArn(request)).promise() + async startCodeAnalysis(request: StartCodeAnalysisRequest) { + return this.client.send(new StartCodeAnalysisCommand(this.withProfileArn(request))) } /** * @description Send a request to get the code scan status detail. */ - async getCodeAnalysis( - request: CodeWhispererTokenClient.GetCodeAnalysisRequest - ): Promise> { - return this.client.getCodeAnalysis(this.withProfileArn(request)).promise() + async getCodeAnalysis(request: GetCodeAnalysisRequest) { + return this.client.send(new GetCodeAnalysisCommand(this.withProfileArn(request))) + } + + /** + * @description Get profile details + */ + async getProfile(request: GetProfileRequest) { + return this.client.send(new GetProfileCommand(request)) } /** * @description Once scan completed successfully, send a request to get list of all the findings for the given scan. */ - async listCodeAnalysisFindings( - request: CodeWhispererTokenClient.ListCodeAnalysisFindingsRequest - ): Promise> { - return this.client.listCodeAnalysisFindings(this.withProfileArn(request)).promise() + async listCodeAnalysisFindings(request: ListCodeAnalysisFindingsRequest) { + return this.client.send(new ListCodeAnalysisFindingsCommand(this.withProfileArn(request))) } /** * @description Get list of available customizations */ - async listAvailableCustomizations(request: CodeWhispererTokenClient.ListAvailableCustomizationsRequest) { - return this.client.listAvailableCustomizations(this.withProfileArn(request)).promise() + async listAvailableCustomizations(request: ListAvailableCustomizationsRequest) { + return this.client.send(new ListAvailableCustomizationsCommand(this.withProfileArn(request))) } /** * @description Get list of available profiles */ - async listAvailableProfiles(request: CodeWhispererTokenClient.ListAvailableProfilesRequest) { - return this.client.listAvailableProfiles(request).promise() + async listAvailableProfiles(request: ListAvailableProfilesRequest) { + return this.client.send(new ListAvailableProfilesCommand(request)) + } + + /** + * @description Get list of available models + */ + async listAvailableModels(request: ListAvailableModelsRequest) { + return this.client.send(new ListAvailableModelsCommand(request)) } /** * @description send telemetry event to code whisperer data warehouse */ - async sendTelemetryEvent(request: CodeWhispererTokenClient.SendTelemetryEventRequest) { - return this.client.sendTelemetryEvent(this.withProfileArn(request)).promise() + async sendTelemetryEvent(request: SendTelemetryEventRequest) { + return this.client.send(new SendTelemetryEventCommand(this.withProfileArn(request))) } /** * @description create a remote workspace */ - async createWorkspace(request: CodeWhispererTokenClient.CreateWorkspaceRequest) { - return this.client.createWorkspace(this.withProfileArn(request)).promise() + async createWorkspace(request: CreateWorkspaceRequest) { + return this.client.send(new CreateWorkspaceCommand(this.withProfileArn(request))) } /** * @description get list of workspace metadata */ - async listWorkspaceMetadata(request: CodeWhispererTokenClient.ListWorkspaceMetadataRequest) { - return this.client.listWorkspaceMetadata(this.withProfileArn(request)).promise() + async listWorkspaceMetadata(request: ListWorkspaceMetadataRequest) { + return this.client.send(new ListWorkspaceMetadataCommand(this.withProfileArn(request))) } /** * @description delete the remote workspace */ - async deleteWorkspace(request: CodeWhispererTokenClient.DeleteWorkspaceRequest) { - return this.client.deleteWorkspace(this.withProfileArn(request)).promise() + async deleteWorkspace(request: DeleteWorkspaceRequest) { + return this.client.send(new DeleteWorkspaceCommand(this.withProfileArn(request))) } /* * @description get the list of feature evaluations */ - async listFeatureEvaluations(request: CodeWhispererTokenClient.ListFeatureEvaluationsRequest) { - return this.client.listFeatureEvaluations(this.withProfileArn(request)).promise() + async listFeatureEvaluations(request: ListFeatureEvaluationsRequest) { + return this.client.send(new ListFeatureEvaluationsCommand(this.withProfileArn(request))) } /** @@ -644,7 +748,7 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { * * cool api you have there 🥹 */ - async createSubscriptionToken(request: CodeWhispererTokenClient.CreateSubscriptionTokenRequest) { + async createSubscriptionToken(request: CreateSubscriptionTokenRequest) { // Debounce. if (this.#createSubscriptionTokenPromise) { return this.#createSubscriptionTokenPromise @@ -652,7 +756,7 @@ export class CodeWhispererServiceToken extends CodeWhispererServiceBase { this.#createSubscriptionTokenPromise = (async () => { try { - const r = await this.client.createSubscriptionToken(this.withProfileArn(request)).promise() + const r = await this.client.send(new CreateSubscriptionTokenCommand(this.withProfileArn(request))) if (!r.encodedVerificationUrl) { this.logging.error(`setpaidtier request: ${JSON.stringify(request)} diff --git a/server/aws-lsp-codewhisperer/src/shared/constants.ts b/server/aws-lsp-codewhisperer/src/shared/constants.ts index cd453a11ba..47bd84c3f5 100644 --- a/server/aws-lsp-codewhisperer/src/shared/constants.ts +++ b/server/aws-lsp-codewhisperer/src/shared/constants.ts @@ -15,6 +15,8 @@ export const AWS_Q_ENDPOINTS = new Map([ export const AWS_Q_REGION_ENV_VAR = 'AWS_Q_REGION' export const AWS_Q_ENDPOINT_URL_ENV_VAR = 'AWS_Q_ENDPOINT_URL' +export const IDE = 'IDE' + export const Q_CONFIGURATION_SECTION = 'aws.q' export const CODE_WHISPERER_CONFIGURATION_SECTION = 'aws.codeWhisperer' @@ -188,4 +190,8 @@ export const COMMON_GITIGNORE_PATTERNS = [ '**/.vercel/**', '**/node_repl_history', '**/php_errorlog', + + // Python Specific + '.venv', + 'venv', ] diff --git a/server/aws-lsp-codewhisperer/src/shared/localProjectContextController.ts b/server/aws-lsp-codewhisperer/src/shared/localProjectContextController.ts index 27317e954e..63143f1c75 100644 --- a/server/aws-lsp-codewhisperer/src/shared/localProjectContextController.ts +++ b/server/aws-lsp-codewhisperer/src/shared/localProjectContextController.ts @@ -50,6 +50,8 @@ export interface LocalProjectContextInitializationOptions { export class LocalProjectContextController { // Event handler for context items updated public onContextItemsUpdated: ((contextItems: ContextCommandItem[]) => Promise) | undefined + // Event handler for when index is being built + public onIndexingInProgressChanged: ((enabled: boolean) => void) | undefined private static instance: LocalProjectContextController | undefined private workspaceFolders: WorkspaceFolder[] @@ -214,6 +216,7 @@ export class LocalProjectContextController { } try { this._isIndexingInProgress = true + this.onIndexingInProgressChanged?.(this._isIndexingInProgress) if (this._vecLib) { if (!this.workspaceFolders.length) { this.log.info('skip building index because no workspace folder found') @@ -234,6 +237,7 @@ export class LocalProjectContextController { this.log.error(`Error building index: ${error}`) } finally { this._isIndexingInProgress = false + this.onIndexingInProgressChanged?.(this._isIndexingInProgress) } } diff --git a/server/aws-lsp-codewhisperer/src/shared/streamingClientService.test.ts b/server/aws-lsp-codewhisperer/src/shared/streamingClientService.test.ts index bbb6053f28..5b1f08d851 100644 --- a/server/aws-lsp-codewhisperer/src/shared/streamingClientService.test.ts +++ b/server/aws-lsp-codewhisperer/src/shared/streamingClientService.test.ts @@ -12,6 +12,8 @@ import { } from '@amzn/codewhisperer-streaming' import { QDeveloperStreaming } from '@amzn/amazon-q-developer-streaming-client' import { rejects } from 'assert' +import { initBaseTestServiceManager, TestAmazonQServiceManager } from './amazonQServiceManager/testUtils' +import { stubCodeWhispererService } from './testUtils' const TIME_TO_ADVANCE_MS = 100 @@ -113,6 +115,33 @@ describe('StreamingClientServiceToken', () => { sinon.assert.match(sendMessageStub.firstCall.firstArg, expectedRequest) }) + it('creates client with shareCodeWhispererContentWithAWS parameter', () => { + const streamingClientServiceWithOptout = new StreamingClientServiceToken( + features.credentialsProvider, + features.sdkInitializator, + features.logging, + DEFAULT_AWS_Q_REGION, + DEFAULT_AWS_Q_ENDPOINT_URL, + 'some-user-agent' + ) + streamingClientServiceWithOptout.shareCodeWhispererContentWithAWS = false + + expect(streamingClientServiceWithOptout['shareCodeWhispererContentWithAWS']).to.equal(false) + }) + + it('creates client without shareCodeWhispererContentWithAWS parameter', () => { + const streamingClientServiceDefault = new StreamingClientServiceToken( + features.credentialsProvider, + features.sdkInitializator, + features.logging, + DEFAULT_AWS_Q_REGION, + DEFAULT_AWS_Q_ENDPOINT_URL, + 'some-user-agent' + ) + + expect(streamingClientServiceDefault['shareCodeWhispererContentWithAWS']).to.be.undefined + }) + describe('generateAssistantResponse', () => { const MOCKED_GENERATE_RESPONSE_REQUEST = { conversationState: { @@ -272,7 +301,7 @@ describe('StreamingClientServiceIAM', () => { expect(streamingClientServiceIAM['inflightRequests'].size).to.eq(0) }) - it('uses expireTime from credentials when available', async () => { + it('uses expiration from credentials when available', async () => { // Get the credential provider function from the client config const credentialProvider = streamingClientServiceIAM.client.config.credentials expect(credentialProvider).to.not.be.undefined @@ -280,11 +309,11 @@ describe('StreamingClientServiceIAM', () => { // Reset call count on the stub features.credentialsProvider.getCredentials.resetHistory() - // Set up credentials with expireTime + // Set up credentials with expiration const futureDate = new Date(Date.now() + 3600000) // 1 hour in the future const CREDENTIALS_WITH_EXPIRY = { ...MOCKED_IAM_CREDENTIALS, - expireTime: futureDate.toISOString(), + expiration: futureDate, } features.credentialsProvider.getCredentials.withArgs('iam').returns(CREDENTIALS_WITH_EXPIRY) @@ -293,12 +322,12 @@ describe('StreamingClientServiceIAM', () => { await clock.tickAsync(TIME_TO_ADVANCE_MS) const credentials = await credentialsPromise - // Verify expiration is set to the expireTime from credentials + // Verify expiration is set to the expiration from credentials expect(credentials.expiration).to.be.instanceOf(Date) expect(credentials.expiration.getTime()).to.equal(futureDate.getTime()) }) - it('falls back to current date when expireTime is not available', async () => { + it('forces refresh when expiration is not available in credentials', async () => { // Get the credential provider function from the client config const credentialProvider = streamingClientServiceIAM.client.config.credentials expect(credentialProvider).to.not.be.undefined @@ -306,21 +335,91 @@ describe('StreamingClientServiceIAM', () => { // Reset call count on the stub features.credentialsProvider.getCredentials.resetHistory() - // Set up credentials without expireTime + // Set up credentials without expiration features.credentialsProvider.getCredentials.withArgs('iam').returns(MOCKED_IAM_CREDENTIALS) - // Set a fixed time for testing - const fixedNow = new Date() - clock.tick(0) // Ensure clock is at the fixed time - // Call the credential provider const credentialsPromise = (credentialProvider as any)() await clock.tickAsync(TIME_TO_ADVANCE_MS) const credentials = await credentialsPromise - // Verify expiration is set to current date when expireTime is missing + // Verify expiration is set to current date to force refresh when not provided in credentials expect(credentials.expiration).to.be.instanceOf(Date) - // The expiration should be very close to the current time - expect(credentials.expiration.getTime()).to.be.closeTo(fixedNow.getTime(), 100) + expect(credentials.expiration.getTime()).to.be.closeTo(Date.now(), 1000) + }) + + it('creates client with shareCodeWhispererContentWithAWS parameter', () => { + const streamingClientServiceWithOptout = new StreamingClientServiceIAM( + features.credentialsProvider, + features.sdkInitializator, + features.logging, + DEFAULT_AWS_Q_REGION, + DEFAULT_AWS_Q_ENDPOINT_URL + ) + streamingClientServiceWithOptout.shareCodeWhispererContentWithAWS = false + + expect(streamingClientServiceWithOptout['shareCodeWhispererContentWithAWS']).to.equal(false) + }) + + it('creates client without shareCodeWhispererContentWithAWS parameter', () => { + const streamingClientServiceDefault = new StreamingClientServiceIAM( + features.credentialsProvider, + features.sdkInitializator, + features.logging, + DEFAULT_AWS_Q_REGION, + DEFAULT_AWS_Q_ENDPOINT_URL + ) + + expect(streamingClientServiceDefault['shareCodeWhispererContentWithAWS']).to.be.undefined + }) +}) + +describe('BaseAmazonQServiceManager streaming client cache updates', () => { + let features: TestFeatures + let serviceManager: TestAmazonQServiceManager + let streamingClientMock: StreamingClientServiceToken + + beforeEach(() => { + features = new TestFeatures() + const serviceStub = stubCodeWhispererService() + + streamingClientMock = Object.assign(sinon.createStubInstance(StreamingClientServiceToken), { + region: DEFAULT_AWS_Q_REGION, + endpoint: DEFAULT_AWS_Q_ENDPOINT_URL, + }) as unknown as StreamingClientServiceToken + serviceManager = initBaseTestServiceManager(features, serviceStub, streamingClientMock) + }) + + afterEach(() => { + sinon.restore() + TestAmazonQServiceManager.resetInstance() + }) + + it('updates shareCodeWhispererContentWithAWS on cached streaming client when configuration changes', async () => { + // Set initial configuration + features.lsp.workspace.getConfiguration.resolves({ shareCodeWhispererContentWithAWS: true }) + + await serviceManager.handleDidChangeConfiguration() + + expect(streamingClientMock.shareCodeWhispererContentWithAWS).to.equal(true) + + // Change configuration + features.lsp.workspace.getConfiguration.resolves({ shareCodeWhispererContentWithAWS: false }) + + await serviceManager.handleDidChangeConfiguration() + + expect(streamingClientMock.shareCodeWhispererContentWithAWS).to.equal(false) + }) + + it('does not update streaming client when no cached client exists', async () => { + TestAmazonQServiceManager.resetInstance() + const serviceManagerWithoutClient = initBaseTestServiceManager(features, stubCodeWhispererService()) + + features.lsp.workspace.getConfiguration.resolves({ shareCodeWhispererContentWithAWS: false }) + + // Should not throw when no cached streaming client exists + await serviceManagerWithoutClient.handleDidChangeConfiguration() + + expect(serviceManagerWithoutClient['cachedStreamingClient']).to.be.undefined }) }) diff --git a/server/aws-lsp-codewhisperer/src/shared/streamingClientService.ts b/server/aws-lsp-codewhisperer/src/shared/streamingClientService.ts index cc0ec57070..373c2b54c4 100644 --- a/server/aws-lsp-codewhisperer/src/shared/streamingClientService.ts +++ b/server/aws-lsp-codewhisperer/src/shared/streamingClientService.ts @@ -12,14 +12,21 @@ import { SendMessageCommandInput as SendMessageCommandInputQDeveloperStreaming, SendMessageCommandOutput as SendMessageCommandOutputQDeveloperStreaming, } from '@amzn/amazon-q-developer-streaming-client' -import { CredentialsProvider, SDKInitializator, Logging } from '@aws/language-server-runtimes/server-interface' +import { + CredentialsProvider, + SDKInitializator, + Logging, + IamCredentials, +} from '@aws/language-server-runtimes/server-interface' import { getBearerTokenFromProvider, isUsageLimitError } from './utils' -import { ConfiguredRetryStrategy } from '@aws-sdk/util-retry' -import { CredentialProviderChain, Credentials } from 'aws-sdk' -import { CLIENT_TIMEOUT_MS } from '../language-server/agenticChat/constants/constants' +import { CLIENT_TIMEOUT_MS, MAX_REQUEST_ATTEMPTS } from '../language-server/agenticChat/constants/constants' + import { AmazonQUsageLimitError } from './amazonQServiceManager/errors' import { NodeHttpHandler } from '@smithy/node-http-handler' import { AwsCredentialIdentity, AwsCredentialIdentityProvider } from '@aws-sdk/types' +import { QRetryClassifier } from '../language-server/agenticChat/retry/retryClassifier' +import { QDelayTrackingInterceptor, DelayNotification } from '../language-server/agenticChat/retry/delayInterceptor' +import { QRetryStrategy } from '../language-server/agenticChat/retry/qRetryStrategy' export type SendMessageCommandInput = | SendMessageCommandInputCodeWhispererStreaming @@ -34,14 +41,17 @@ export type ChatCommandOutput = SendMessageCommandOutput | GenerateAssistantResp export abstract class StreamingClientServiceBase { protected readonly region protected readonly endpoint + protected delayInterceptor: QDelayTrackingInterceptor + public shareCodeWhispererContentWithAWS?: boolean inflightRequests: Set = new Set() abstract client: CodeWhispererStreaming | QDeveloperStreaming - constructor(region: string, endpoint: string) { + constructor(region: string, endpoint: string, logging?: Logging) { this.region = region this.endpoint = endpoint + this.delayInterceptor = new QDelayTrackingInterceptor(logging) } abstract sendMessage( @@ -55,11 +65,17 @@ export abstract class StreamingClientServiceBase { }) this.inflightRequests.clear() } + + public setDelayNotificationCallback(callback: (notification: DelayNotification) => void): void { + this.delayInterceptor.setDelayNotificationCallback(callback) + } } export class StreamingClientServiceToken extends StreamingClientServiceBase { client: CodeWhispererStreaming public profileArn?: string + private retryClassifier: QRetryClassifier + constructor( credentialsProvider: CredentialsProvider, sdkInitializator: SDKInitializator, @@ -68,7 +84,9 @@ export class StreamingClientServiceToken extends StreamingClientServiceBase { endpoint: string, customUserAgent: string ) { - super(region, endpoint) + super(region, endpoint, logging) + this.retryClassifier = new QRetryClassifier(logging) + const tokenProvider = async () => { const token = getBearerTokenFromProvider(credentialsProvider) // without setting expiration, the tokenProvider will only be called once @@ -78,16 +96,42 @@ export class StreamingClientServiceToken extends StreamingClientServiceBase { logging.log( `Passing client for class CodeWhispererStreaming to sdkInitializator (v3) for additional setup (e.g. proxy)` ) + + // Create Q-specific retry strategy with classifier and delay tracking + const retryStrategy = new QRetryStrategy( + this.retryClassifier, + this.delayInterceptor, + MAX_REQUEST_ATTEMPTS, + logging + ) + this.client = sdkInitializator(CodeWhispererStreaming, { region, endpoint, token: tokenProvider, - retryStrategy: new ConfiguredRetryStrategy(0, (attempt: number) => 500 + attempt ** 10), + retryStrategy: retryStrategy, requestHandler: new NodeHttpHandler({ requestTimeout: CLIENT_TIMEOUT_MS, }), customUserAgent: customUserAgent, }) + + this.client.middlewareStack.add( + (next, context) => (args: any) => { + if (credentialsProvider.getConnectionType() === 'external_idp') { + args.request.headers['TokenType'] = 'EXTERNAL_IDP' + } + if (this.shareCodeWhispererContentWithAWS !== undefined) { + args.request.headers['x-amzn-codewhisperer-optout'] = `${!this.shareCodeWhispererContentWithAWS}` + } + // Log headers for debugging + logging.debug(`StreamingClient headers: ${JSON.stringify(args.request.headers)}`) + return next(args) + }, + { + step: 'build', + } + ) } public async sendMessage( @@ -135,7 +179,6 @@ export class StreamingClientServiceToken extends StreamingClientServiceBase { return response } catch (e) { - // TODO add a test for this if (isUsageLimitError(e)) { throw new AmazonQUsageLimitError(e) } @@ -161,6 +204,8 @@ export class StreamingClientServiceToken extends StreamingClientServiceBase { export class StreamingClientServiceIAM extends StreamingClientServiceBase { client: QDeveloperStreaming + private retryClassifier: QRetryClassifier + constructor( credentialsProvider: CredentialsProvider, sdkInitializator: SDKInitializator, @@ -168,29 +213,55 @@ export class StreamingClientServiceIAM extends StreamingClientServiceBase { region: string, endpoint: string ) { - super(region, endpoint) + super(region, endpoint, logging) + this.retryClassifier = new QRetryClassifier(logging) + logging.log( `Passing client for class QDeveloperStreaming to sdkInitializator (v3) for additional setup (e.g. proxy)` ) // Create a credential provider that fetches fresh credentials on each request const iamCredentialProvider: AwsCredentialIdentityProvider = async (): Promise => { - const creds = (await credentialsProvider.getCredentials('iam')) as Credentials + const creds = (await credentialsProvider.getCredentials('iam')) as IamCredentials logging.log(`Fetching new IAM credentials`) + if (!creds) { + logging.log('Failed to fetch IAM credentials: No IAM credentials found') + throw new Error('No IAM credentials found') + } return { accessKeyId: creds.accessKeyId, secretAccessKey: creds.secretAccessKey, sessionToken: creds.sessionToken, - expiration: creds.expireTime ? new Date(creds.expireTime) : new Date(), // Force refresh on each request if creds do not have expiration time + expiration: creds.expiration ? new Date(creds.expiration) : new Date(), // Force refresh if expiration field is not available } } + // Create Q-specific retry strategy with classifier and delay tracking + const retryStrategy = new QRetryStrategy( + this.retryClassifier, + this.delayInterceptor, + MAX_REQUEST_ATTEMPTS, + logging + ) + this.client = sdkInitializator(QDeveloperStreaming, { region: region, endpoint: endpoint, credentials: iamCredentialProvider, - retryStrategy: new ConfiguredRetryStrategy(0, (attempt: number) => 500 + attempt ** 10), + retryStrategy: retryStrategy, }) + + this.client.middlewareStack.add( + (next, context) => (args: any) => { + if (this.shareCodeWhispererContentWithAWS !== undefined) { + args.request.headers['x-amzn-codewhisperer-optout'] = `${!this.shareCodeWhispererContentWithAWS}` + } + return next(args) + }, + { + step: 'build', + } + ) } public async sendMessage( @@ -201,12 +272,16 @@ export class StreamingClientServiceIAM extends StreamingClientServiceBase { this.inflightRequests.add(controller) - const response = await this.client.sendMessage(request, { - abortSignal: controller.signal, - }) - - this.inflightRequests.delete(controller) + try { + const response = await this.client.sendMessage(request, { + abortSignal: controller.signal, + }) - return response + return response + } catch (e) { + throw e + } finally { + this.inflightRequests.delete(controller) + } } } diff --git a/server/aws-lsp-codewhisperer/src/shared/supplementalContextUtil/crossFileContextUtil.ts b/server/aws-lsp-codewhisperer/src/shared/supplementalContextUtil/crossFileContextUtil.ts index ca5bc40642..39e97a3b8c 100644 --- a/server/aws-lsp-codewhisperer/src/shared/supplementalContextUtil/crossFileContextUtil.ts +++ b/server/aws-lsp-codewhisperer/src/shared/supplementalContextUtil/crossFileContextUtil.ts @@ -71,12 +71,13 @@ export async function fetchSupplementalContextForSrc( const supplementalContextConfig = getSupplementalContextConfig(document.languageId) if (supplementalContextConfig === undefined) { - return supplementalContextConfig + return undefined } - //TODO: add logic for other strategies once available + if (supplementalContextConfig === 'codemap') { return await codemapContext(document, position, workspace, cancellationToken, openTabFiles) } + return { supplementalContextItems: [], strategy: 'Empty' } } @@ -255,10 +256,7 @@ function getInputChunk(document: TextDocument, cursorPosition: Position, chunkSi * @returns specifically returning undefined if the langueage is not supported, * otherwise true/false depending on if the language is fully supported or not belonging to the user group */ -function getSupplementalContextConfig( - languageId: TextDocument['languageId'], - _userGroup?: any -): SupplementalContextStrategy | undefined { +function getSupplementalContextConfig(languageId: TextDocument['languageId']): SupplementalContextStrategy | undefined { return isCrossFileSupported(languageId) ? 'codemap' : undefined } diff --git a/server/aws-lsp-codewhisperer/src/shared/supplementalContextUtil/supplementalContextUtil.ts b/server/aws-lsp-codewhisperer/src/shared/supplementalContextUtil/supplementalContextUtil.ts index 8a5658188b..18fb5a7686 100644 --- a/server/aws-lsp-codewhisperer/src/shared/supplementalContextUtil/supplementalContextUtil.ts +++ b/server/aws-lsp-codewhisperer/src/shared/supplementalContextUtil/supplementalContextUtil.ts @@ -30,7 +30,7 @@ export async function fetchSupplementalContext( cancellationToken: CancellationToken, openTabFiles?: string[] ): Promise { - const timesBeforeFetching = performance.now() + const timesBeforeFetching = Date.now() const isUtg = unitTestIntentDetector.detectUnitTestIntent(document) @@ -55,7 +55,7 @@ export async function fetchSupplementalContext( }, ], contentsLength: srcContent.length, - latency: performance.now() - timesBeforeFetching, + latency: Date.now() - timesBeforeFetching, strategy: 'NEW_UTG', } } @@ -87,11 +87,28 @@ export async function fetchSupplementalContext( (acc, curr) => acc + curr.content.length, 0 ), - latency: performance.now() - timesBeforeFetching, + latency: Date.now() - timesBeforeFetching, strategy: supplementalContextValue.strategy, } - return truncateSupplementalContext(resBeforeTruncation) + const r = truncateSupplementalContext(resBeforeTruncation) + + let logstr = `@@supplemental context@@ +\tisUtg: ${r.isUtg}, +\tisProcessTimeout: ${r.isProcessTimeout}, +\tcontents.length: ${r.contentsLength}, +\tlatency: ${r.latency}, +\tstrategy: ${r.strategy}, +` + r.supplementalContextItems.forEach((item, index) => { + logstr += `\tChunk [${index}th]:\n` + logstr += `\t\tPath: ${item.filePath}\n` + logstr += `\t\tLength: ${item.content.length}\n` + logstr += `\t\tScore: ${item.score}\n` + }) + logging.info(logstr) + + return r } else { return undefined } @@ -102,7 +119,7 @@ export async function fetchSupplementalContext( isProcessTimeout: true, supplementalContextItems: [], contentsLength: 0, - latency: performance.now() - timesBeforeFetching, + latency: Date.now() - timesBeforeFetching, strategy: 'Empty', } } else { diff --git a/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetry.test.ts b/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetry.test.ts index 86b9e4ec9d..e5a2ddd71d 100644 --- a/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetry.test.ts +++ b/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetry.test.ts @@ -93,7 +93,7 @@ class HelloWorld await features.doChangeTextDocument({ textDocument: { uri: SOME_FILE.uri, version: updatedDocument.version }, contentChanges: [ - { range: { start: endPosition, end: endPosition }, text: EXPECTED_SUGGESTION[0].content }, + { range: { start: endPosition, end: endPosition }, text: EXPECTED_SUGGESTION[0].content! }, ], }) @@ -109,8 +109,8 @@ class HelloWorld isInlineEdit: false, }) - const totalInsertCharacters = SOME_TYPING.length + EXPECTED_SUGGESTION[0].content.length - const codeWhispererCharacters = EXPECTED_SUGGESTION[0].content.length + const totalInsertCharacters = SOME_TYPING.length + EXPECTED_SUGGESTION[0].content!.length + const codeWhispererCharacters = EXPECTED_SUGGESTION[0].content!.length const codePercentage = Math.round((codeWhispererCharacters / totalInsertCharacters) * 10000) / 100 clock.tick(5000 * 60) diff --git a/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetryService.test.ts b/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetryService.test.ts index 04d1cf091c..32536f73fd 100644 --- a/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetryService.test.ts +++ b/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetryService.test.ts @@ -10,7 +10,6 @@ import { SsoConnectionType, } from '@aws/language-server-runtimes/server-interface' -import { UserContext, OptOutPreference } from '../../client/token/codewhispererbearertokenclient' import { CodeWhispererSession } from '../../language-server/inline-completion/session/sessionManager' import sinon, { StubbedInstance, stubInterface } from 'ts-sinon' import { BUILDER_ID_START_URL } from '../constants' @@ -18,6 +17,7 @@ import { ChatInteractionType } from './types' import { CodeWhispererServiceToken } from '../codeWhispererService' import { initBaseTestServiceManager, TestAmazonQServiceManager } from '../amazonQServiceManager/testUtils' import { TestFeatures } from '@aws/language-server-runtimes/testing' +import { OptOutPreference, SendTelemetryEventRequest, UserContext } from '@amzn/codewhisperer-runtime' class MockCredentialsProvider implements CredentialsProvider { private mockIamCredentials: IamCredentials | undefined @@ -277,10 +277,11 @@ describe('TelemetryService', () => { addedIdeDiagnostics: undefined, removedIdeDiagnostics: undefined, streakLength: 0, + suggestionType: 'COMPLETIONS', }, }, optOutPreference: 'OPTIN', - } + } satisfies SendTelemetryEventRequest mockCredentialsProvider.setConnectionMetadata({ sso: { startUrl: 'idc-start-url', @@ -390,7 +391,7 @@ describe('TelemetryService', () => { hasProjectLevelContext: false, }, }, - } + } satisfies SendTelemetryEventRequest sinon.assert.calledOnceWithExactly(codeWhisperServiceStub.sendTelemetryEvent, expectedEvent) sinon.assert.calledOnceWithExactly(telemetry.emitMetric as sinon.SinonStub, { @@ -543,7 +544,7 @@ describe('TelemetryService', () => { }, }, optOutPreference: 'OPTIN', - } + } satisfies SendTelemetryEventRequest mockCredentialsProvider.setConnectionMetadata({ sso: { startUrl: 'idc-start-url', @@ -654,7 +655,7 @@ describe('TelemetryService', () => { }, }, optOutPreference: 'OPTIN', - } + } satisfies SendTelemetryEventRequest sinon.assert.calledOnceWithExactly(telemetry.emitMetric as sinon.SinonStub, { name: 'codewhisperer_userModification', data: { @@ -699,7 +700,7 @@ describe('TelemetryService', () => { }, }, optOutPreference: 'OPTIN', - } + } satisfies SendTelemetryEventRequest sinon.assert.calledOnceWithExactly(codeWhisperServiceStub.sendTelemetryEvent, expectedEvent) sinon.assert.calledOnceWithExactly(telemetry.emitMetric as sinon.SinonStub, { name: 'amazonq_modifyCode', @@ -809,7 +810,7 @@ describe('TelemetryService', () => { result: 'SUCCEEDED', }, }, - } + } satisfies SendTelemetryEventRequest sinon.assert.calledOnceWithExactly(codeWhisperServiceStub.sendTelemetryEvent, expectedEvent) sinon.assert.calledOnceWithExactly(telemetry.emitMetric as sinon.SinonStub, { @@ -858,6 +859,8 @@ describe('TelemetryService', () => { cwsprChatPinnedFileContextCount: undefined, cwsprChatPinnedFolderContextCount: undefined, cwsprChatPinnedPromptContextCount: undefined, + errorMessage: undefined, + errorCode: undefined, }, }) }) @@ -991,7 +994,7 @@ describe('TelemetryService', () => { }, }, }, - } + } satisfies SendTelemetryEventRequest sinon.assert.calledOnceWithExactly(codeWhisperServiceStub.sendTelemetryEvent, expectedEvent) }) diff --git a/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetryService.ts b/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetryService.ts index 6f3ba52028..643bad392a 100644 --- a/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetryService.ts +++ b/server/aws-lsp-codewhisperer/src/shared/telemetry/telemetryService.ts @@ -22,11 +22,13 @@ import { ChatAddMessageEvent, UserIntent, InlineChatEvent, - AgenticChatEventStatus, IdeDiagnostic, UserModificationEvent, -} from '../../client/token/codewhispererbearertokenclient' -import { getCompletionType, getSsoConnectionType, isAwsError } from '../utils' + CompletionType, + InlineChatUserDecision, + AgenticChatEventStatus, +} from '@amzn/codewhisperer-runtime' +import { getCompletionType, getSsoConnectionType, isServiceException } from '../utils' import { ChatConversationType, ChatHistoryActionEvent, @@ -66,6 +68,7 @@ export class TelemetryService { [ChatInteractionType.Upvote]: 'UPVOTE', [ChatInteractionType.Downvote]: 'DOWNVOTE', [ChatInteractionType.ClickBodyLink]: 'CLICK_BODY_LINK', + [ChatInteractionType.AgenticCodeAccepted]: 'AGENTIC_CODE_ACCEPTED', } constructor( @@ -150,8 +153,8 @@ export class TelemetryService { private logSendTelemetryEventFailure(error: any) { let requestId: string | undefined - if (isAwsError(error)) { - requestId = error.requestId + if (isServiceException(error)) { + requestId = error.$metadata.requestId } this.logging.log( @@ -179,7 +182,8 @@ export class TelemetryService { if (this.modelId !== undefined) { request.modelId = this.modelId } - await this.getService().sendTelemetryEvent(request) + const r = await this.getService().sendTelemetryEvent(request) + this.logging.log(`SendTelemetryEvent succeeded, requestId: ${r.$metadata.requestId}`) } catch (error) { this.logSendTelemetryEventFailure(error) } @@ -199,6 +203,8 @@ export class TelemetryService { removedIdeDiagnostics?: IdeDiagnostic[], streakLength?: number ) { + session.decisionMadeTimestamp = Date.now() + // Toolkit telemetry API if (this.enableTelemetryEventsToDestination) { const data: CodeWhispererUserTriggerDecisionEvent = { codewhispererSessionId: session.codewhispererSessionId || '', @@ -241,9 +247,9 @@ export class TelemetryService { } const acceptedSuggestion = session.suggestions.find(s => s.itemId === session.acceptedSuggestionId) const generatedLines = - acceptedSuggestion === undefined || acceptedSuggestion.content.trim() === '' + acceptedSuggestion === undefined || acceptedSuggestion.content?.trim() === '' ? 0 - : acceptedSuggestion.content.split('\n').length + : acceptedSuggestion.content?.split('\n').length const referenceCount = acceptedSuggestion === undefined ? 0 @@ -254,8 +260,9 @@ export class TelemetryService { acceptedSuggestion && acceptedSuggestion.content ? acceptedSuggestion.content.length : 0 const perceivedLatencyMilliseconds = session.triggerType === 'OnDemand' ? session.timeToFirstRecommendation : timeSinceLastUserModification - const isInlineEdit = session.suggestionType === SuggestionType.EDIT + const isInlineEdit = session.predictionType === SuggestionType.EDIT + // RTS STE API const event: UserTriggerDecisionEvent = { sessionId: session.codewhispererSessionId || '', requestId: session.responseContext?.requestId || '', @@ -264,11 +271,13 @@ export class TelemetryService { languageName: getRuntimeLanguage(session.language), }, completionType: - session.suggestions.length > 0 ? getCompletionType(session.suggestions[0]).toUpperCase() : 'LINE', + session.suggestions.length > 0 + ? getCompletionType(session.suggestions[0]) === 'Line' + ? CompletionType.Line + : CompletionType.Block + : CompletionType.Line, suggestionState: this.getSuggestionState(userTriggerDecision), - recommendationLatencyMilliseconds: session.firstCompletionDisplayLatency - ? session.firstCompletionDisplayLatency - : 0, + recommendationLatencyMilliseconds: session.firstCompletionDisplayLatency ?? 0, timestamp: new Date(Date.now()), triggerToResponseLatencyMilliseconds: session.timeToFirstRecommendation, suggestionReferenceCount: referenceCount, @@ -281,14 +290,19 @@ export class TelemetryService { addedIdeDiagnostics: addedIdeDiagnostics, removedIdeDiagnostics: removedIdeDiagnostics, streakLength: streakLength ?? 0, + suggestionType: session.predictionType, } - this.logging.info(`Invoking SendTelemetryEvent:UserTriggerDecisionEvent with: + this.logging.info(`Invoking SendTelemetryEvent:UserTriggerDecisionEvent: + "requestId": ${event.requestId} "suggestionState": ${event.suggestionState} "acceptedCharacterCount": ${event.acceptedCharacterCount} "addedCharacterCount": ${event.addedCharacterCount} "deletedCharacterCount": ${event.deletedCharacterCount} - "streakLength": ${event.streakLength} - "firstCompletionDisplayLatency: ${event.recommendationLatencyMilliseconds}`) + "streakLength": ${event.streakLength}, + "preprocessLatency": ${session.preprocessLatency}, + "triggerToResponseLatencyMilliseconds: ${event.triggerToResponseLatencyMilliseconds}", + "firstCompletionDisplayLatency: ${event.recommendationLatencyMilliseconds}, + "suggestionType": ${event.suggestionType}`) return this.invokeSendTelemetryEvent({ userTriggerDecisionEvent: event, }) @@ -559,6 +573,8 @@ export class TelemetryService { requestIds?: string[] experimentName?: string userVariation?: string + errorMessage?: string + errorCode?: string }> ) { const timeBetweenChunks = params.timeBetweenChunks?.slice(0, 100) @@ -612,6 +628,8 @@ export class TelemetryService { requestIds: truncatedRequestIds, experimentName: additionalParams.experimentName, userVariation: additionalParams.userVariation, + errorMessage: additionalParams.errorMessage, + errorCode: additionalParams.errorCode, }, }) } @@ -630,7 +648,7 @@ export class TelemetryService { responseLength: params.responseLength, numberOfCodeBlocks: params.numberOfCodeBlocks, hasProjectLevelContext: false, - result: params.result?.toUpperCase() ?? 'SUCCEEDED', + result: (params.result?.toUpperCase() ?? AgenticChatEventStatus.Succeeded) as AgenticChatEventStatus, } if (params.customizationArn) { event.customizationArn = params.customizationArn @@ -656,7 +674,7 @@ export class TelemetryService { numSuggestionDelChars: params.suggestionDeletedChars, numSuggestionDelLines: params.suggestionDeletedLines, codeIntent: params.codeIntent, - userDecision: params.userDecision, + userDecision: params.userDecision as InlineChatUserDecision, responseStartLatency: params.responseStartLatency, responseEndLatency: params.responseEndLatency, } diff --git a/server/aws-lsp-codewhisperer/src/shared/telemetry/types.ts b/server/aws-lsp-codewhisperer/src/shared/telemetry/types.ts index bed82c2939..6b22972428 100644 --- a/server/aws-lsp-codewhisperer/src/shared/telemetry/types.ts +++ b/server/aws-lsp-codewhisperer/src/shared/telemetry/types.ts @@ -1,4 +1,4 @@ -import { TransformationSpec, TransformationSteps } from '../../client/token/codewhispererbearertokenclient' +import { TransformationSpec, TransformationStep } from '@amzn/codewhisperer-runtime' import { CodewhispererLanguage } from '../languageDetection' import { CancellationJobStatus } from '../../language-server/netTransform/models' import { UserDecision } from '../../language-server/inline-completion/session/sessionManager' @@ -144,8 +144,8 @@ export interface SecurityScanEvent { export interface TransformationJobStartedEvent { category: string - transformationJobId: string - uploadId: string + transformationJobId: string | undefined + uploadId: string | undefined error: string } @@ -163,7 +163,7 @@ export interface TransformationJobReceivedEvent { export interface TransformationPlanReceivedEvent { category: string transformationJobId: string - transformationSteps: TransformationSteps + transformationSteps: TransformationStep[] | undefined } export interface TransformationJobCancelledEvent { @@ -429,6 +429,7 @@ export enum ChatInteractionType { Upvote = 'upvote', Downvote = 'downvote', ClickBodyLink = 'clickBodyLink', + AgenticCodeAccepted = 'agenticCodeAccepted', } export enum ChatHistoryActionType { diff --git a/server/aws-lsp-codewhisperer/src/shared/telemetryUtils.test.ts b/server/aws-lsp-codewhisperer/src/shared/telemetryUtils.test.ts index 565a9505a4..0cfa7fd768 100644 --- a/server/aws-lsp-codewhisperer/src/shared/telemetryUtils.test.ts +++ b/server/aws-lsp-codewhisperer/src/shared/telemetryUtils.test.ts @@ -1,6 +1,6 @@ import * as assert from 'assert' import * as sinon from 'sinon' -import { InitializeParams, Platform } from '@aws/language-server-runtimes/server-interface' +import { InitializeParams, Platform, ServerInfo } from '@aws/language-server-runtimes/server-interface' import { getUserAgent, makeUserContextObject } from './telemetryUtils' describe('getUserAgent', () => { @@ -115,6 +115,7 @@ describe('getUserAgent', () => { describe('makeUserContextObject', () => { let mockInitializeParams: InitializeParams + let mockServerInfo: ServerInfo // let osStub: sinon.SinonStubbedInstance<{ now: () => number }> beforeEach(() => { @@ -123,10 +124,10 @@ describe('makeUserContextObject', () => { aws: { clientInfo: { name: 'test-custom-client-name', - version: '1.2.3', + version: '1.0.0', extension: { name: 'AmazonQ-For-VSCode', - version: '2.2.2', + version: '2.0.0', }, clientId: 'test-client-id', }, @@ -138,6 +139,11 @@ describe('makeUserContextObject', () => { }, } as InitializeParams + mockServerInfo = { + name: 'foo', + version: '3.0.0', + } + sinon.stub(process, 'platform').value('win32') }) @@ -146,33 +152,33 @@ describe('makeUserContextObject', () => { }) it('should return a valid UserContext object', () => { - const result = makeUserContextObject(mockInitializeParams, 'win32', 'TestProduct') + const result = makeUserContextObject(mockInitializeParams, 'win32', 'TestProduct', mockServerInfo) assert(result) assert.ok('ideCategory' in result) assert.ok('operatingSystem' in result) assert.strictEqual(result.operatingSystem, 'WINDOWS') assert.strictEqual(result.product, 'TestProduct') assert.strictEqual(result.clientId, 'test-client-id') - assert.strictEqual(result.ideVersion, '1.2.3') + assert.strictEqual(result.ideVersion, 'ide=1.0.0;plugin=2.0.0;lsp=3.0.0') }) it('should prefer initializationOptions.aws version over clientInfo version', () => { - const result = makeUserContextObject(mockInitializeParams, 'linux', 'TestProduct') - assert.strictEqual(result?.ideVersion, '1.2.3') + const result = makeUserContextObject(mockInitializeParams, 'linux', 'TestProduct', mockServerInfo) + assert.strictEqual(result?.ideVersion, 'ide=1.0.0;plugin=2.0.0;lsp=3.0.0') }) it('should use clientInfo version if initializationOptions.aws version is not available', () => { // @ts-ignore mockInitializeParams.initializationOptions.aws.clientInfo.version = undefined - const result = makeUserContextObject(mockInitializeParams, 'linux', 'TestProduct') - assert.strictEqual(result?.ideVersion, '1.1.1') + const result = makeUserContextObject(mockInitializeParams, 'linux', 'TestProduct', mockServerInfo) + assert.strictEqual(result?.ideVersion, 'ide=1.1.1;plugin=2.0.0;lsp=3.0.0') }) it('should return undefined if ideCategory is not in IDE_CATEGORY_MAP', () => { // @ts-ignore mockInitializeParams.initializationOptions.aws.clientInfo.extension.name = 'Unknown IDE' - const result = makeUserContextObject(mockInitializeParams, 'linux', 'TestProduct') + const result = makeUserContextObject(mockInitializeParams, 'linux', 'TestProduct', mockServerInfo) assert.strictEqual(result, undefined) }) @@ -188,7 +194,7 @@ describe('makeUserContextObject', () => { // @ts-ignore mockInitializeParams.initializationOptions.aws.clientInfo.extension.name = clientName - const result = makeUserContextObject(mockInitializeParams, 'linux', 'TestProduct') + const result = makeUserContextObject(mockInitializeParams, 'linux', 'TestProduct', mockServerInfo) switch (clientName) { case 'AmazonQ-For-VSCode': assert.strictEqual(result?.ideCategory, 'VSCODE') @@ -222,7 +228,7 @@ describe('makeUserContextObject', () => { ] platforms.forEach(platform => { - const result = makeUserContextObject(mockInitializeParams, platform, 'TestProduct') + const result = makeUserContextObject(mockInitializeParams, platform, 'TestProduct', mockServerInfo) switch (platform) { case 'win32': assert.strictEqual(result?.operatingSystem, 'WINDOWS') diff --git a/server/aws-lsp-codewhisperer/src/shared/telemetryUtils.ts b/server/aws-lsp-codewhisperer/src/shared/telemetryUtils.ts index 73e94d4233..0181580002 100644 --- a/server/aws-lsp-codewhisperer/src/shared/telemetryUtils.ts +++ b/server/aws-lsp-codewhisperer/src/shared/telemetryUtils.ts @@ -1,5 +1,5 @@ import { InitializeParams, Platform, ServerInfo } from '@aws/language-server-runtimes/server-interface' -import { IdeCategory, UserContext } from '../client/token/codewhispererbearertokenclient' +import { IdeCategory, OperatingSystem, UserContext } from '@amzn/codewhisperer-runtime' const USER_AGENT_PREFIX = 'AWS-Language-Servers' @@ -48,38 +48,38 @@ export const getUserAgent = (initializeParams: InitializeParams, serverInfo?: Se const IDE_CATEGORY_MAP: { [key: string]: IdeCategory } = { // TODO: VSCode key needs to change for getting the correct coefficient value for inline - 'AmazonQ-For-VSCode': 'VSCODE', - 'Amazon Q For JetBrains': 'JETBRAINS', - 'Amazon Q For Eclipse': 'ECLIPSE', - 'AWS Toolkit For VisualStudio': 'VISUAL_STUDIO', + 'AmazonQ-For-VSCode': IdeCategory.VSCode, + 'Amazon Q For JetBrains': IdeCategory.JetBrains, + 'Amazon Q For Eclipse': IdeCategory.Eclipse, + 'AWS Toolkit For VisualStudio': IdeCategory.VisualStudio, } -const mapClientNameToIdeCategory = (clientName: string): string | undefined => { +const mapClientNameToIdeCategory = (clientName: string): IdeCategory | undefined => { return IDE_CATEGORY_MAP[clientName] } // Use InitializeParams.initializationOptions.aws.clientInfo.extension to derive IDE Category from calling client // https://github.com/aws/language-server-runtimes/blob/main/runtimes/protocol/lsp.ts#L60-L69 export const getIdeCategory = (initializeParams: InitializeParams) => { - let ideCategory + let ideCategory: IdeCategory | undefined if (initializeParams.initializationOptions?.aws?.clientInfo?.extension?.name) { ideCategory = mapClientNameToIdeCategory(initializeParams.initializationOptions.aws.clientInfo.extension.name) } - return ideCategory || 'UNKNOWN' + return ideCategory } // Map result from https://github.com/aws/language-server-runtimes/blob/main/runtimes/server-interface/runtime.ts#L6 to expected Operating system const getOperatingSystem = (platform: Platform) => { switch (platform) { case 'darwin': - return 'MAC' + return OperatingSystem.Mac case 'win32': - return 'WINDOWS' + return OperatingSystem.Windows case 'linux': - return 'LINUX' + return OperatingSystem.Linux default: - return 'UNKNOWN' + return undefined } } @@ -89,18 +89,25 @@ const getOperatingSystem = (platform: Platform) => { export const makeUserContextObject = ( initializeParams: InitializeParams, platform: Platform, - product: string + product: string, + serverInfo: ServerInfo ): UserContext | undefined => { + const ide = getIdeCategory(initializeParams) + const ideVersion = + initializeParams.initializationOptions?.aws?.clientInfo?.version || initializeParams.clientInfo?.version + const pluginVersion = initializeParams.initializationOptions?.aws?.clientInfo?.extension?.version || '' + const lspVersion = serverInfo.version ?? '' const userContext: UserContext = { - ideCategory: getIdeCategory(initializeParams), + ideCategory: ide, operatingSystem: getOperatingSystem(platform), product: product, clientId: initializeParams.initializationOptions?.aws?.clientInfo?.clientId, - ideVersion: - initializeParams.initializationOptions?.aws?.clientInfo?.version || initializeParams.clientInfo?.version, + ideVersion: `ide=${ideVersion};plugin=${pluginVersion};lsp=${lspVersion}`, + pluginVersion: pluginVersion, + lspVersion: lspVersion, } - if (userContext.ideCategory === 'UNKNOWN' || userContext.operatingSystem === 'UNKNOWN') { + if (userContext.ideCategory === undefined || userContext.operatingSystem === undefined) { return } diff --git a/server/aws-lsp-codewhisperer/src/shared/testUtils.ts b/server/aws-lsp-codewhisperer/src/shared/testUtils.ts index 38d6e960cb..451f3ae2c3 100644 --- a/server/aws-lsp-codewhisperer/src/shared/testUtils.ts +++ b/server/aws-lsp-codewhisperer/src/shared/testUtils.ts @@ -1,11 +1,10 @@ import { TextDocument } from 'vscode-languageserver-textdocument' import { CodeWhispererServiceBase, ResponseContext, Suggestion } from './codeWhispererService' import { TestFeatures } from '@aws/language-server-runtimes/testing' -import { SsoConnectionType } from './utils' import { stubInterface } from 'ts-sinon' -import { StreamingClientServiceBase } from './streamingClientService' import { SessionData } from '../language-server/inline-completion/session/sessionManager' import { WorkspaceFolder } from '@aws/language-server-runtimes/protocol' +import { SsoConnectionType } from '@aws/language-server-runtimes/server-interface' export const HELLO_WORLD_IN_CSHARP = `class HelloWorld { @@ -15,7 +14,6 @@ export const HELLO_WORLD_IN_CSHARP = `class HelloWorld } }` -export const INCOMPLETE_HELLO_WORLD_IN_CSHARP = `class HelloWorld\n` export const SPECIAL_CHARACTER_HELLO_WORLD = `{class HelloWorld` export const HELLO_WORLD_WITH_WINDOWS_ENDING = HELLO_WORLD_IN_CSHARP.replaceAll('\n', '\r\n') @@ -28,12 +26,6 @@ export const SOME_FILE_WITH_ALT_CASED_LANGUAGE_ID = TextDocument.create( 1, HELLO_WORLD_IN_CSHARP ) -export const SOME_INCOMPLETE_FILE = TextDocument.create( - 'file:///incomplete.cs', - 'csharp', - 1, - INCOMPLETE_HELLO_WORLD_IN_CSHARP -) export const SOME_CLOSED_FILE = TextDocument.create('file:///closed.cs', 'csharp', 1, HELLO_WORLD_IN_CSHARP) export const SOME_UNSUPPORTED_FILE = TextDocument.create( 'file:///hopper.fm', @@ -251,6 +243,7 @@ export const EMPTY_RESULT = { items: [], sessionId: '' } export const SAMPLE_SESSION_DATA: SessionData = { document: SOME_FILE, + startPreprocessTimestamp: 0, startPosition: { line: 0, character: 0, @@ -268,25 +261,6 @@ export const SAMPLE_SESSION_DATA: SessionData = { }, } -export const SAMPLE_SESSION_DATA_WITH_EXTRA_LEFT_CONTENT: SessionData = { - document: SOME_INCOMPLETE_FILE, - startPosition: { - line: 1, - character: 0, - }, - triggerType: 'OnDemand', - language: 'csharp', - requestContext: { - fileContext: { - filename: SOME_FILE.uri, - programmingLanguage: { languageName: 'csharp' }, - leftFileContent: INCOMPLETE_HELLO_WORLD_IN_CSHARP, - rightFileContent: '', - }, - maxResults: 5, - }, -} - export const createIterableResponse = (data: T[]): AsyncIterable => { let index = 0 diff --git a/server/aws-lsp-codewhisperer/src/shared/utils.test.ts b/server/aws-lsp-codewhisperer/src/shared/utils.test.ts index 85cd8817a7..dc5aacc01b 100644 --- a/server/aws-lsp-codewhisperer/src/shared/utils.test.ts +++ b/server/aws-lsp-codewhisperer/src/shared/utils.test.ts @@ -5,7 +5,7 @@ import { } from '@amzn/codewhisperer-streaming' import { CredentialsProvider, Position, InitializeParams } from '@aws/language-server-runtimes/server-interface' import * as assert from 'assert' -import { AWSError } from 'aws-sdk' +import { ServiceException } from '@smithy/smithy-client' import { expect } from 'chai' import * as sinon from 'sinon' import * as os from 'os' @@ -18,7 +18,6 @@ import { getUnmodifiedAcceptedTokens, isAwsThrottlingError, isUsageLimitError, - isQuotaExceededError, isStringOrNull, safeGet, getFileExtensionName, @@ -27,6 +26,7 @@ import { getClientName, sanitizeInput, sanitizeRequestInput, + isUsingIAMAuth, } from './utils' import { promises as fsPromises } from 'fs' @@ -185,6 +185,82 @@ describe('getOriginFromClientInfo', () => { }) }) +describe('isUsingIAMAuth', () => { + let originalEnv: string | undefined + + beforeEach(() => { + originalEnv = process.env.USE_IAM_AUTH + delete process.env.USE_IAM_AUTH + }) + + afterEach(() => { + if (originalEnv !== undefined) { + process.env.USE_IAM_AUTH = originalEnv + } else { + delete process.env.USE_IAM_AUTH + } + }) + + it('should return true when USE_IAM_AUTH environment variable is "true"', () => { + process.env.USE_IAM_AUTH = 'true' + assert.strictEqual(isUsingIAMAuth(), true) + }) + + it('should return false when USE_IAM_AUTH environment variable is not set', () => { + assert.strictEqual(isUsingIAMAuth(), false) + }) + + it('should return true when only IAM credentials are available', () => { + const mockProvider: CredentialsProvider = { + hasCredentials: sinon.stub().returns(true), + getCredentials: sinon + .stub() + .withArgs('iam') + .returns({ accessKeyId: 'AKIA...', secretAccessKey: 'secret' }) + .withArgs('bearer') + .returns(null), + getConnectionMetadata: sinon.stub(), + getConnectionType: sinon.stub(), + onCredentialsDeleted: sinon.stub(), + } + + assert.strictEqual(isUsingIAMAuth(mockProvider), true) + }) + + it('should return false when bearer credentials are available', () => { + const mockProvider: CredentialsProvider = { + hasCredentials: sinon.stub().returns(true), + getCredentials: sinon + .stub() + .withArgs('iam') + .returns({ accessKeyId: 'AKIA...', secretAccessKey: 'secret' }) + .withArgs('bearer') + .returns({ token: 'bearer-token' }), + getConnectionMetadata: sinon.stub(), + getConnectionType: sinon.stub(), + onCredentialsDeleted: sinon.stub(), + } + + assert.strictEqual(isUsingIAMAuth(mockProvider), false) + }) + + it('should return false when credential access fails', () => { + const mockProvider: CredentialsProvider = { + hasCredentials: sinon.stub().returns(true), + getCredentials: sinon.stub().throws(new Error('Access failed')), + getConnectionMetadata: sinon.stub(), + getConnectionType: sinon.stub(), + onCredentialsDeleted: sinon.stub(), + } + + assert.strictEqual(isUsingIAMAuth(mockProvider), false) + }) + + it('should return false when credentialsProvider is undefined', () => { + assert.strictEqual(isUsingIAMAuth(undefined), false) + }) +}) + describe('getSsoConnectionType', () => { const mockToken = 'mockToken' const mockCredsProvider: CredentialsProvider = { @@ -385,29 +461,28 @@ describe('isAwsThrottlingError', function () { }) it('false for non-throttling AWS errors', function () { - const nonThrottlingError = { + const nonThrottlingError = new ServiceException({ name: 'AWSError', message: 'Not a throttling error', - code: 'SomeOtherError', - time: new Date(), - } as AWSError + $fault: 'server', + $metadata: {}, + }) assert.strictEqual(isAwsThrottlingError(nonThrottlingError), false) }) it('true for AWS throttling errors', function () { - const sdkV2Error = new Error() - ;(sdkV2Error as any).name = 'ThrottlingException' - ;(sdkV2Error as any).message = 'Rate exceeded' - ;(sdkV2Error as any).code = 'ThrottlingException' - ;(sdkV2Error as any).time = new Date() - assert.strictEqual(isAwsThrottlingError(sdkV2Error), true) - const sdkV3Error = new ThrottlingException({ message: 'Too many requests', $metadata: {}, }) assert.strictEqual(isAwsThrottlingError(sdkV3Error), true) + + // Test error with $metadata property + const errorWithMetadata = new Error('Rate exceeded') + ;(errorWithMetadata as any).$metadata = {} + ;(errorWithMetadata as any).name = 'ThrottlingException' + assert.strictEqual(isAwsThrottlingError(errorWithMetadata), true) }) }) @@ -426,76 +501,23 @@ describe('isMonthlyLimitError', function () { }) it('false for throttling errors without MONTHLY_REQUEST_COUNT reason', function () { - const throttlingError = new Error() - ;(throttlingError as any).name = 'ThrottlingException' - ;(throttlingError as any).message = 'Rate exceeded' - ;(throttlingError as any).code = 'ThrottlingException' - ;(throttlingError as any).time = new Date() + const throttlingError = new ThrottlingException({ + message: 'Rate exceeded', + $metadata: {}, + }) ;(throttlingError as any).reason = 'SOME_OTHER_REASON' assert.strictEqual(isUsageLimitError(throttlingError), false) }) it('true for throttling errors with MONTHLY_REQUEST_COUNT reason', function () { - const usageLimitError = new Error() - ;(usageLimitError as any).name = 'ThrottlingException' - ;(usageLimitError as any).message = 'Free tier limit reached' - ;(usageLimitError as any).code = 'ThrottlingException' - ;(usageLimitError as any).time = new Date() - ;(usageLimitError as any).reason = ThrottlingExceptionReason.MONTHLY_REQUEST_COUNT - - assert.strictEqual(isUsageLimitError(usageLimitError), true) - }) -}) - -describe('isQuotaExceededError', function () { - it('false for non-AWS errors', function () { - const regularError = new Error('Some error') - assert.strictEqual(isQuotaExceededError(regularError), false) - - assert.strictEqual(isQuotaExceededError(undefined), false) - assert.strictEqual(isQuotaExceededError(null), false) - assert.strictEqual(isQuotaExceededError('error string'), false) - }) - - it('true for free tier limit errors', function () { - const e = new ThrottlingException({ + const usageLimitError = new ThrottlingException({ message: 'Free tier limit reached', $metadata: {}, }) + ;(usageLimitError as any).reason = ThrottlingExceptionReason.MONTHLY_REQUEST_COUNT - assert.strictEqual(isQuotaExceededError(e), true) - }) - - it('true for ServiceQuotaExceededException errors', function () { - const e = new ServiceQuotaExceededException({ - message: 'Service quota exceeded', - $metadata: {}, - }) - - assert.strictEqual(isQuotaExceededError(e), true) - }) - - it('true for specific messages', function () { - const reachedForThisMonth = new Error() - ;(reachedForThisMonth as any).name = 'ThrottlingException' - ;(reachedForThisMonth as any).message = 'You have reached the limit for this month' - ;(reachedForThisMonth as any).code = 'ThrottlingException' - ;(reachedForThisMonth as any).time = new Date() - - const limitForIterationsError = new ThrottlingException({ - message: 'You have reached the limit for number of iterations', - $metadata: {}, - }) - - assert.strictEqual(isQuotaExceededError(reachedForThisMonth), true) - assert.strictEqual(isQuotaExceededError(limitForIterationsError), true) - - // Invalid cases - reachedForThisMonth.message = 'some other messsage' - assert.strictEqual(isQuotaExceededError(reachedForThisMonth), false) - limitForIterationsError.message = 'foo bar' - assert.strictEqual(isQuotaExceededError(limitForIterationsError), false) + assert.strictEqual(isUsageLimitError(usageLimitError), true) }) }) diff --git a/server/aws-lsp-codewhisperer/src/shared/utils.ts b/server/aws-lsp-codewhisperer/src/shared/utils.ts index a7a95d8801..9dfea144fa 100644 --- a/server/aws-lsp-codewhisperer/src/shared/utils.ts +++ b/server/aws-lsp-codewhisperer/src/shared/utils.ts @@ -1,15 +1,13 @@ import { - AwsResponseError, BearerCredentials, CredentialsProvider, Position, + SsoConnectionType, } from '@aws/language-server-runtimes/server-interface' -import { AWSError, Credentials } from 'aws-sdk' import { distance } from 'fastest-levenshtein' import { Suggestion } from './codeWhispererService' import { CodewhispererCompletionType } from './telemetry/types' import { - BUILDER_ID_START_URL, COMMON_GITIGNORE_PATTERNS, crashMonitoringDirName, driveLetterRegex, @@ -19,7 +17,6 @@ import { import { CodeWhispererStreamingServiceException, Origin, - ServiceQuotaExceededException, ThrottlingException, ThrottlingExceptionReason, } from '@amzn/codewhisperer-streaming' @@ -28,18 +25,21 @@ import { ServiceException } from '@smithy/smithy-client' import { promises as fs } from 'fs' import * as fg from 'fast-glob' import { getAuthFollowUpType } from '../language-server/chat/utils' -import ignore = require('ignore') import { InitializeParams } from '@aws/language-server-runtimes/server-interface' import { QClientCapabilities } from '../language-server/configuration/qConfigurationServer' -export type SsoConnectionType = 'builderId' | 'identityCenter' | 'none' +import escapeHTML = require('escape-html') -export function isAwsError(error: unknown): error is AWSError { +export function isServiceException(error: unknown): error is ServiceException { + return error instanceof ServiceException +} + +export function isAwsError(error: unknown): error is Error & { code: string; time: Date } { if (error === undefined) { return false } - // TODO: do SDK v3 errors have `.code` ? - return error instanceof Error && hasCode(error) && hasTime(error) + // AWS SDK v3 errors extend ServiceException + return error instanceof ServiceException || (error instanceof Error && '$metadata' in error) } export function isAwsThrottlingError(e: unknown): e is ThrottlingException { @@ -53,7 +53,11 @@ export function isAwsThrottlingError(e: unknown): e is ThrottlingException { // return true // } - if (e instanceof ThrottlingException || (isAwsError(e) && e.code === 'ThrottlingException')) { + if ( + e instanceof ThrottlingException || + (isAwsError(e) && e.code === 'ThrottlingException') || + (isServiceException(e) && e.name === 'ThrottlingException') + ) { return true } @@ -90,38 +94,6 @@ export function isUsageLimitError(e: unknown): e is ThrottlingException { return false } -export function isQuotaExceededError(e: unknown): e is AWSError { - if (!e) { - return false - } - - // From client/token/bearer-token-service.json - if (isUsageLimitError(e)) { - return true - } - - // https://github.com/aws/aws-toolkit-vscode/blob/db673c9b74b36591bb5642b3da7d4bc7ae2afaf4/packages/core/src/amazonqFeatureDev/client/featureDev.ts#L199 - // "Backend service will throw ServiceQuota if code generation iteration limit is reached". - if (e instanceof ServiceQuotaExceededException || (isAwsError(e) && e.code == 'ServiceQuotaExceededException')) { - return true - } - - // https://github.com/aws/aws-toolkit-vscode/blob/db673c9b74b36591bb5642b3da7d4bc7ae2afaf4/packages/core/src/amazonqFeatureDev/client/featureDev.ts#L199 - // "API Front-end will throw Throttling if conversation limit is reached. - // API Front-end monitors StartCodeGeneration for throttling" - if ( - isAwsThrottlingError(e) && - (e.message.includes('reached for this month') || - e.message.includes('limit for this month') || - e.message.includes('limit reached') || - e.message.includes('limit for number of iterations')) - ) { - return true - } - - return false -} - /** * Returns the identifier the given error. * Depending on the implementation, the identifier may exist on a @@ -316,9 +288,9 @@ export function isBool(value: unknown): value is boolean { } export function getCompletionType(suggestion: Suggestion): CodewhispererCompletionType { - const nonBlankLines = suggestion.content.split('\n').filter(line => line.trim() !== '').length + const nonBlankLines = suggestion.content?.split('\n').filter(line => line.trim() !== '').length - return nonBlankLines > 1 ? 'Block' : 'Line' + return nonBlankLines && nonBlankLines > 1 ? 'Block' : 'Line' } export function enabledModelSelection(params: InitializeParams | undefined): boolean { @@ -392,8 +364,27 @@ export function getOriginFromClientInfo(clientName: string | undefined): Origin return 'IDE' } -export function isUsingIAMAuth(): boolean { - return process.env.USE_IAM_AUTH === 'true' +export function isUsingIAMAuth(credentialsProvider?: CredentialsProvider): boolean { + if (process.env.USE_IAM_AUTH === 'true') { + return true + } + + // CRITICAL: Add credential-based detection as fallback + if (credentialsProvider) { + try { + const iamCreds = credentialsProvider.getCredentials('iam') + const bearerCreds = credentialsProvider.getCredentials('bearer') + + // If only IAM creds available, use IAM + if (iamCreds && !(bearerCreds as any)?.token) { + return true + } + } catch (error) { + // If credential access fails, default to bearer + return false + } + } + return false } export const flattenMetric = (obj: any, prefix = '') => { @@ -417,9 +408,7 @@ export const flattenMetric = (obj: any, prefix = '') => { } export function getSsoConnectionType(credentialsProvider: CredentialsProvider): SsoConnectionType { - const connectionMetadata = credentialsProvider.getConnectionMetadata() - const startUrl = connectionMetadata?.sso?.startUrl - return !startUrl ? 'none' : startUrl.includes(BUILDER_ID_START_URL) ? 'builderId' : 'identityCenter' + return credentialsProvider.getConnectionType() } // Port of implementation in AWS Toolkit for VSCode @@ -433,7 +422,7 @@ export function getUnmodifiedAcceptedTokens(origin: string, after: string) { return Math.max(origin.length, after.length) - distance(origin, after) } -export function getEndPositionForAcceptedSuggestion(content: string, startPosition: Position): Position { +export function getEndPositionForAcceptedSuggestion(content: string = '', startPosition: Position): Position { const insertedLines = content.split('\n') const numberOfInsertedLines = insertedLines.length @@ -472,9 +461,6 @@ export function isStringOrNull(object: any): object is string | null { export function getHttpStatusCode(err: unknown): number | undefined { // RTS throws validation errors with a 400 status code to LSP, we convert them to 500 from the perspective of the user - if (hasResponse(err) && err?.$response?.statusCode !== undefined) { - return err?.$response?.statusCode - } if (hasMetadata(err) && err.$metadata?.httpStatusCode !== undefined) { return err.$metadata?.httpStatusCode } @@ -485,10 +471,6 @@ export function getHttpStatusCode(err: unknown): number | undefined { return undefined } -function hasResponse(error: T): error is T & Pick { - return typeof (error as { $response?: unknown })?.$response === 'object' -} - function hasMetadata(error: T): error is T & Pick { return typeof (error as { $metadata?: unknown })?.$metadata === 'object' } @@ -593,10 +575,13 @@ export function getFileExtensionName(filepath: string): string { * @param input The input string to sanitize * @returns The sanitized string with dangerous characters removed */ -export function sanitizeInput(input: string): string { +export function sanitizeInput(input: string, enableEscapingHTML: boolean = false): string { if (!input) { return input } + if (enableEscapingHTML) { + input = escapeHTML(input) + } // Remove Unicode tag characters (U+E0000-U+E007F) used in ASCII smuggling // Remove other invisible/control characters that could hide content @@ -606,6 +591,16 @@ export function sanitizeInput(input: string): string { ) } +/** + * Sanitizes input for logging to prevent log injection attacks + * @param input The input string to sanitize + * @returns The sanitized string with control characters replaced + */ +export function sanitizeLogInput(input: string): string { + // Remove newlines, carriage returns, and other control characters + return input.replace(/[\r\n\t\x00-\x1f\x7f-\x9f]/g, '_') +} + /** * Recursively sanitizes the entire request input to prevent Unicode ASCII smuggling * @param input The request input to sanitize diff --git a/server/aws-lsp-identity/package.json b/server/aws-lsp-identity/package.json index e8cb3b2c8a..fbebf05628 100644 --- a/server/aws-lsp-identity/package.json +++ b/server/aws-lsp-identity/package.json @@ -26,8 +26,8 @@ "dependencies": { "@aws-sdk/client-sso-oidc": "^3.616.0", "@aws-sdk/token-providers": "^3.744.0", - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.12", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", "@smithy/node-http-handler": "^3.2.5", "@smithy/shared-ini-file-loader": "^4.0.1", "https-proxy-agent": "^7.0.5", diff --git a/server/aws-lsp-json/CHANGELOG.md b/server/aws-lsp-json/CHANGELOG.md index 31c977b978..d3bf1949b5 100644 --- a/server/aws-lsp-json/CHANGELOG.md +++ b/server/aws-lsp-json/CHANGELOG.md @@ -1,5 +1,49 @@ # Changelog +## [0.1.21](https://github.com/aws/language-servers/compare/lsp-json/v0.1.20...lsp-json/v0.1.21) (2025-10-14) + + +### Bug Fixes + +* set resolveProvider to false in init handler json and yaml language servers ([#2391](https://github.com/aws/language-servers/issues/2391)) ([e11c544](https://github.com/aws/language-servers/commit/e11c544804e4fbe7dbad3e5373223ba919a34758)) + +## [0.1.20](https://github.com/aws/language-servers/compare/lsp-json/v0.1.19...lsp-json/v0.1.20) (2025-10-01) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.15 to ^0.0.16 + +## [0.1.19](https://github.com/aws/language-servers/compare/lsp-json/v0.1.18...lsp-json/v0.1.19) (2025-09-09) + + +### Features + +* add support for getSupplementalContext LSP API ([#2212](https://github.com/aws/language-servers/issues/2212)) ([2ddcae7](https://github.com/aws/language-servers/commit/2ddcae7a4fac6b89cbc9784911959743ea0a6d11)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.14 to ^0.0.15 + +## [0.1.18](https://github.com/aws/language-servers/compare/lsp-json/v0.1.17...lsp-json/v0.1.18) (2025-08-19) + + +### Bug Fixes + +* Use file context override in the inline completion params for Jupyter Notebook ([#2114](https://github.com/aws/language-servers/issues/2114)) ([91c8398](https://github.com/aws/language-servers/commit/91c839857f8aa4d79098189f9fb620b361c51289)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.13 to ^0.0.14 + ## [0.1.17](https://github.com/aws/language-servers/compare/lsp-json/v0.1.16...lsp-json/v0.1.17) (2025-08-04) diff --git a/server/aws-lsp-json/package.json b/server/aws-lsp-json/package.json index 298f3820f0..41c2c0b750 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.17", + "version": "0.1.21", "description": "JSON Language Server", "main": "out/index.js", "repository": { @@ -26,8 +26,8 @@ "prepack": "shx cp ../../LICENSE ../../NOTICE ../../SECURITY.md ." }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.13", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", "vscode-languageserver": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.8" }, @@ -42,6 +42,7 @@ "endOfLine": "lf" }, "devDependencies": { - "c8": "^10.1.2" + "c8": "^10.1.2", + "ts-mocha": "^11.1.0" } } diff --git a/server/aws-lsp-json/src/language-server/jsonServer.ts b/server/aws-lsp-json/src/language-server/jsonServer.ts index e7494a6995..33cf8d6295 100644 --- a/server/aws-lsp-json/src/language-server/jsonServer.ts +++ b/server/aws-lsp-json/src/language-server/jsonServer.ts @@ -36,7 +36,7 @@ export const JsonServerFactory = const onInitializeHandler = () => { return { capabilities: { - completionProvider: { resolveProvider: true }, + completionProvider: { resolveProvider: false }, hoverProvider: true, documentFormattingProvider: true, textDocumentSync: { diff --git a/server/aws-lsp-notification/package.json b/server/aws-lsp-notification/package.json index a9e3cf9d4c..e52d9195d1 100644 --- a/server/aws-lsp-notification/package.json +++ b/server/aws-lsp-notification/package.json @@ -22,8 +22,8 @@ "coverage:report": "c8 report --reporter=html --reporter=text" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.12", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", "vscode-languageserver": "^9.0.1" }, "devDependencies": { diff --git a/server/aws-lsp-partiql/CHANGELOG.md b/server/aws-lsp-partiql/CHANGELOG.md index b1be4c4050..37efbed366 100644 --- a/server/aws-lsp-partiql/CHANGELOG.md +++ b/server/aws-lsp-partiql/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.0.18](https://github.com/aws/language-servers/compare/lsp-partiql/v0.0.17...lsp-partiql/v0.0.18) (2025-09-09) + + +### Features + +* add support for getSupplementalContext LSP API ([#2212](https://github.com/aws/language-servers/issues/2212)) ([2ddcae7](https://github.com/aws/language-servers/commit/2ddcae7a4fac6b89cbc9784911959743ea0a6d11)) + +## [0.0.17](https://github.com/aws/language-servers/compare/lsp-partiql/v0.0.16...lsp-partiql/v0.0.17) (2025-08-19) + + +### Bug Fixes + +* Use file context override in the inline completion params for Jupyter Notebook ([#2114](https://github.com/aws/language-servers/issues/2114)) ([91c8398](https://github.com/aws/language-servers/commit/91c839857f8aa4d79098189f9fb620b361c51289)) + ## [0.0.16](https://github.com/aws/language-servers/compare/lsp-partiql/v0.0.15...lsp-partiql/v0.0.16) (2025-08-04) diff --git a/server/aws-lsp-partiql/package.json b/server/aws-lsp-partiql/package.json index 9ff685cfdc..87470433cd 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.16", + "version": "0.0.18", "repository": { "type": "git", "url": "https://github.com/aws/language-servers" @@ -24,9 +24,9 @@ "out" ], "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "antlr4-c3": "3.4.2", - "antlr4ng": "3.0.14", + "@aws/language-server-runtimes": "^0.3.1", + "antlr4-c3": "3.4.4", + "antlr4ng": "3.0.16", "web-tree-sitter": "0.22.6" }, "devDependencies": { diff --git a/server/aws-lsp-s3/package.json b/server/aws-lsp-s3/package.json index caa7801b5f..5ca107043b 100644 --- a/server/aws-lsp-s3/package.json +++ b/server/aws-lsp-s3/package.json @@ -9,8 +9,8 @@ "dependencies": { "@aws-sdk/client-s3": "^3.623.0", "@aws-sdk/types": "^3.734.0", - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.12", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.15", "vscode-languageserver": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.8" } diff --git a/server/aws-lsp-yaml/CHANGELOG.md b/server/aws-lsp-yaml/CHANGELOG.md index 965da41cfc..c3e85718c7 100644 --- a/server/aws-lsp-yaml/CHANGELOG.md +++ b/server/aws-lsp-yaml/CHANGELOG.md @@ -1,5 +1,49 @@ # Changelog +## [0.1.21](https://github.com/aws/language-servers/compare/lsp-yaml/v0.1.20...lsp-yaml/v0.1.21) (2025-10-14) + + +### Bug Fixes + +* set resolveProvider to false in init handler json and yaml language servers ([#2391](https://github.com/aws/language-servers/issues/2391)) ([e11c544](https://github.com/aws/language-servers/commit/e11c544804e4fbe7dbad3e5373223ba919a34758)) + +## [0.1.20](https://github.com/aws/language-servers/compare/lsp-yaml/v0.1.19...lsp-yaml/v0.1.20) (2025-10-01) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.15 to ^0.0.16 + +## [0.1.19](https://github.com/aws/language-servers/compare/lsp-yaml/v0.1.18...lsp-yaml/v0.1.19) (2025-09-09) + + +### Features + +* add support for getSupplementalContext LSP API ([#2212](https://github.com/aws/language-servers/issues/2212)) ([2ddcae7](https://github.com/aws/language-servers/commit/2ddcae7a4fac6b89cbc9784911959743ea0a6d11)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.14 to ^0.0.15 + +## [0.1.18](https://github.com/aws/language-servers/compare/lsp-yaml/v0.1.17...lsp-yaml/v0.1.18) (2025-08-19) + + +### Bug Fixes + +* Use file context override in the inline completion params for Jupyter Notebook ([#2114](https://github.com/aws/language-servers/issues/2114)) ([91c8398](https://github.com/aws/language-servers/commit/91c839857f8aa4d79098189f9fb620b361c51289)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.13 to ^0.0.14 + ## [0.1.17](https://github.com/aws/language-servers/compare/lsp-yaml/v0.1.16...lsp-yaml/v0.1.17) (2025-08-04) diff --git a/server/aws-lsp-yaml/package.json b/server/aws-lsp-yaml/package.json index 58fd5e591d..7140ad02ef 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.17", + "version": "0.1.21", "description": "YAML Language Server", "main": "out/index.js", "repository": { @@ -26,8 +26,8 @@ "postinstall": "node patchYamlPackage.js" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", - "@aws/lsp-core": "^0.0.13", + "@aws/language-server-runtimes": "^0.3.1", + "@aws/lsp-core": "^0.0.16", "vscode-languageserver": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.8", "yaml-language-server": "1.13.0" diff --git a/server/aws-lsp-yaml/src/language-server/yamlServer.ts b/server/aws-lsp-yaml/src/language-server/yamlServer.ts index 7f9525b33d..6103f1112c 100644 --- a/server/aws-lsp-yaml/src/language-server/yamlServer.ts +++ b/server/aws-lsp-yaml/src/language-server/yamlServer.ts @@ -36,7 +36,7 @@ export const YamlServerFactory = const onInitializeHandler = () => { return { capabilities: { - completionProvider: { resolveProvider: true }, + completionProvider: { resolveProvider: false }, hoverProvider: true, documentFormattingProvider: true, textDocumentSync: { diff --git a/server/device-sso-auth-lsp/package.json b/server/device-sso-auth-lsp/package.json index 573170a3a9..19e77c04dc 100644 --- a/server/device-sso-auth-lsp/package.json +++ b/server/device-sso-auth-lsp/package.json @@ -7,7 +7,7 @@ "compile": "tsc --build" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "vscode-languageserver": "^9.0.1" }, "devDependencies": { diff --git a/server/hello-world-lsp/package.json b/server/hello-world-lsp/package.json index 827509803e..e45a891713 100644 --- a/server/hello-world-lsp/package.json +++ b/server/hello-world-lsp/package.json @@ -13,12 +13,13 @@ "coverage:report": "c8 report --reporter=html --reporter=text" }, "dependencies": { - "@aws/language-server-runtimes": "^0.2.123", + "@aws/language-server-runtimes": "^0.3.1", "vscode-languageserver": "^9.0.1" }, "devDependencies": { "c8": "^10.1.2", "ts-loader": "^9.4.4", + "ts-mocha": "^11.1.0", "webpack": "^5.94.0", "webpack-cli": "^6.0.1" }