diff --git a/.changeset/blue-cobras-allow.md b/.changeset/blue-cobras-allow.md deleted file mode 100644 index acd0c6a3..00000000 --- a/.changeset/blue-cobras-allow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Migrated updateSettings to protos, removed didUpdateSettings, altered Plan/Act toggling in settings menu diff --git a/.changeset/chatty-turkeys-wait.md b/.changeset/chatty-turkeys-wait.md new file mode 100644 index 00000000..0a4e6516 --- /dev/null +++ b/.changeset/chatty-turkeys-wait.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +fix: respect setting litellm models for plan and act diff --git a/.changeset/curvy-bulldogs-jog.md b/.changeset/curvy-bulldogs-jog.md new file mode 100644 index 00000000..771db30d --- /dev/null +++ b/.changeset/curvy-bulldogs-jog.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate didBecomeVisible to protobus diff --git a/.changeset/eight-otters-grow.md b/.changeset/eight-otters-grow.md deleted file mode 100644 index 7852bb9e..00000000 --- a/.changeset/eight-otters-grow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fixed issue where telemetry warning popup was created for every new Cline window diff --git a/.changeset/eleven-monkeys-watch.md b/.changeset/eleven-monkeys-watch.md deleted file mode 100644 index 7388a6e8..00000000 --- a/.changeset/eleven-monkeys-watch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Prioritize active files in file context menu diff --git a/.changeset/giant-cycles-divide.md b/.changeset/giant-cycles-divide.md deleted file mode 100644 index 8e9185d1..00000000 --- a/.changeset/giant-cycles-divide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -toggleWorkflow protobus migration diff --git a/.changeset/heavy-bananas-shave.md b/.changeset/heavy-bananas-shave.md deleted file mode 100644 index 273eb195..00000000 --- a/.changeset/heavy-bananas-shave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Added promise to task init to prevent race condition with checkpoints diff --git a/.changeset/honest-boats-fix.md b/.changeset/honest-boats-fix.md deleted file mode 100644 index 34dc3190..00000000 --- a/.changeset/honest-boats-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Spring cleaning diff --git a/.changeset/lazy-cherries-search.md b/.changeset/lazy-cherries-search.md new file mode 100644 index 00000000..bba0b59f --- /dev/null +++ b/.changeset/lazy-cherries-search.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Prevent reading IS_DEV from the users environment diff --git a/.changeset/pretty-bikes-tickle.md b/.changeset/pretty-bikes-tickle.md new file mode 100644 index 00000000..c6c0c493 --- /dev/null +++ b/.changeset/pretty-bikes-tickle.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +fix(bedrock): remove custom Model encode diff --git a/.changeset/quick-rocks-guess.md b/.changeset/quick-rocks-guess.md deleted file mode 100644 index 2a74afff..00000000 --- a/.changeset/quick-rocks-guess.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix bug where replace_in_file would not be able to handle for out-of-order SEARCH/REPLACE blocks diff --git a/.changeset/rare-ducks-give.md b/.changeset/rare-ducks-give.md deleted file mode 100644 index 2cb3b142..00000000 --- a/.changeset/rare-ducks-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Context menu is default to File option on start up diff --git a/.changeset/six-rice-end.md b/.changeset/six-rice-end.md deleted file mode 100644 index d44312f3..00000000 --- a/.changeset/six-rice-end.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate fetchLatestServersFromHub to protobus diff --git a/.changeset/smart-ladybugs-give.md b/.changeset/smart-ladybugs-give.md deleted file mode 100644 index d6be1c0e..00000000 --- a/.changeset/smart-ladybugs-give.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -the response of the mcps is displayed with a collapsible which allows to focus on the model responses. diff --git a/.changeset/thirty-donkeys-whisper.md b/.changeset/thirty-donkeys-whisper.md new file mode 100644 index 00000000..19fd3660 --- /dev/null +++ b/.changeset/thirty-donkeys-whisper.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +The close task button and delete task button in the task header are now correctly announced by screen readers. diff --git a/.eslintrc.json b/.eslintrc.json index 7c2e1842..ab454150 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -21,7 +21,14 @@ "semi": "off", "react-hooks/exhaustive-deps": "off", "eslint-rules/no-protobuf-object-literals": "error", - "eslint-rules/no-grpc-client-object-literals": "error" + "eslint-rules/no-grpc-client-object-literals": "error", + "no-restricted-syntax": [ + "error", + { + "selector": "VariableDeclarator[id.type=\"ObjectPattern\"][init.object.name=\"process\"][init.property.name=\"env\"]", + "message": "Use process.env.VARIABLE_NAME directly instead of destructuring" + } + ] }, "ignorePatterns": ["out", "dist", "**/*.d.ts"] } diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 73231ad5..81fc744f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: ✨ Feature Request url: https://github.com/cline/cline/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop @@ -6,6 +6,3 @@ contact_links: - name: 👋 Cline Discord url: https://discord.gg/cline about: Join our Discord community for discussions and support - - name: ❓ Other Questions? - url: https://x.com/sdrzn - about: Contact the developer on X @sdrzn for other inquiries diff --git a/.github/ISSUE_TEMPLATE/feature_proposal.yml b/.github/ISSUE_TEMPLATE/feature_proposal.yml new file mode 100644 index 00000000..983bf8b8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_proposal.yml @@ -0,0 +1,130 @@ +name: 📝 Detailed Feature Proposal +description: Propose a new feature or improvement +labels: ["proposal"] +body: + - type: markdown + attributes: + value: | + **Feature Proposal for Cline** + + Thank you for creating a feature proposal for Cline! This template is for clear, actionable proposals that define a specific problem and a high-confidence solution. Please provide enough detail to enable fast prioritization, discussion, and execution. + + Detailed proposals will be prioritized, while vague proposals may be closed or require extensive back and forth communication. + + Before submitting: + - Search existing [Issues](https://github.com/cline/cline/issues) and [Discussions](https://github.com/cline/cline/discussions) to avoid duplicates + - Don’t start implementation until the proposal is reviewed and approved + + - type: textarea + id: problem-description + attributes: + label: What problem does this solve? + description: | + Describe the problem clearly from a user's point of view. Focus on why this matters, who it affects, and when it occurs. + + ✅ Solid: + - "LLM provider returns 400 error when nearing the context window instead of truncating" + - "Submit button is invisible in dark mode" + + ❌ Avoid: + - "Performance is bad" + - "UI needs work" + + Your description should include: + - Who is affected? + - When does it happen? + - What's the current vs expected behavior? + - What is the impact? + placeholder: Be specific about the problem, who it affects, and the impact. + validations: + required: true + + - type: textarea + id: proposed-solution + attributes: + label: What’s the proposed solution? + description: | + Describe how the problem should be solved. Be specific about UX, system behavior, and any flows that would change. + + ✅ Solid: + - "Add error handling immediately after attempting to create the llm stream and retry after manually truncating" + - "Update button styling to ensure contrast in all themes" + + ❌ Avoid: + - "Improve performance" + - "Fix the bug" + + Your solution should include: + - What exactly will change? + - How will users interact with it? + - What’s the expected outcome? + placeholder: Describe the proposed changes and how they solve the problem. + validations: + required: true + + - type: textarea + id: acceptance-criteria + attributes: + label: How will we know it works? (Acceptance Criteria) + description: Define clear, testable success criteria. + placeholder: Provide specific and testable conditions for success. + validations: + required: true + + - type: textarea + id: estimated-effort + attributes: + label: Estimated effort and complexity + description: | + Help us understand scope and risks. Include: + + - Size estimate (XS/S/M/L/XL or hours/days) + - Why this size? What’s technically involved? + - Any tricky parts, refactors, or risks? + - Performance or compatibility concerns? + - Any dependencies on systems, teams, or libraries? + placeholder: Size, reasoning, risks, and dependencies. + validations: + required: true + + - type: textarea + id: technical-considerations + attributes: + label: Technical considerations, tradeoffs, and/or risks (optional) + description: | + Include any technical context that helps us evaluate or implement the proposal more effectively. + + You may include: + - Architectural changes or required refactors + - Performance implications or system-level impacts + - Known limitations, risks, or tricky edge cases + - Compatibility concerns or migration steps + - Alternative approaches you considered and why they were not chosen + - Dependencies on other systems, teams, or libraries + - Were other approaches considered? Why is this one preferred? + placeholder: Technical considerations, tradeoffs, and/or risks. + + - type: textarea + id: additional-context + attributes: + label: Additional context (optional) + description: Diagrams, mockups, logs, links, or anything else that helps explain or justify the proposal. + placeholder: Diagrams, mockups, logs, links, or anything else that helps explain or justify the proposal. + + - type: checkboxes + id: checklist + attributes: + label: Proposal checklist + options: + - label: I’ve checked for existing issues or related proposals + required: true + - label: I understand this needs review before implementation can start + required: true + + - type: checkboxes + id: willingness-to-contribute + attributes: + label: Interested in implementing this? + description: Optional + options: + - label: Yes, I’d like to help implement this feature diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1e263c9b..458a8b64 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,10 +1,47 @@ + + +### Related Issue + + +**Issue:** #XXXX + ### Description - + ### Test Procedure - + ### Type of Change @@ -29,7 +66,15 @@ ### Screenshots - + ### Additional Notes diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 60a40078..25cd9657 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,6 +11,10 @@ on: options: - pre-release - release + tag: + description: "Enter existing tag to publish (e.g., v3.1.2)" + required: true + type: string permissions: contents: write @@ -30,6 +34,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.tag }} - name: Setup Node.js uses: actions/setup-node@v4 @@ -69,14 +75,20 @@ jobs: VERSION=$(node -p "require('./package.json').version") echo "version=$VERSION" >> $GITHUB_OUTPUT - - name: Create Git Tag - id: create_tag + - name: Validate Tag + id: validate_tag run: | - VERSION=v${{ steps.get_version.outputs.version }} - echo "tag=$VERSION" >> $GITHUB_OUTPUT - echo "Tagging with $VERSION" - git tag "$VERSION" - git push origin "$VERSION" + TAG="${{ github.event.inputs.tag }}" + echo "tag=$TAG" >> $GITHUB_OUTPUT + echo "Using existing tag: $TAG" + + # Verify the tag exists + if ! git rev-parse "$TAG" >/dev/null 2>&1; then + echo "Error: Tag '$TAG' does not exist in the repository" + exit 1 + fi + + echo "Tag '$TAG' validated successfully" - name: Package and Publish Extension env: @@ -106,7 +118,7 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: - tag_name: ${{ steps.create_tag.outputs.tag }} + tag_name: ${{ steps.validate_tag.outputs.tag }} files: "*.vsix" # body: ${{ steps.changelog.outputs.content }} generate_release_notes: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2171b498..906a5e71 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -68,6 +68,12 @@ jobs: if: steps.webview-cache.outputs.cache-hit != 'true' run: cd webview-ui && npm ci + - name: Install local modules on windows + if: runner.os == 'Windows' && steps.root-cache.outputs.cache-hit == 'true' + run: | + npm install eslint-plugin-eslint-rules + cd webview-ui/ && npm install eslint-plugin-eslint-rules + - name: Set up NPM on Windows if: runner.os == 'Windows' run: | diff --git a/.gitignore b/.gitignore index 4c42dc52..f38409b5 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,9 @@ coverage *evals.env -# Generated proto files +# Generated files +src/generated/ +# Core src/core/controller/*/methods.ts src/core/controller/*/index.ts src/core/controller/grpc-service-config.ts @@ -30,10 +32,7 @@ src/shared/proto/*.ts src/shared/proto/host/*.ts # Webview webview-ui/src/services/grpc-client.ts -# Standalone -src/standalone/server-setup.ts -src/standalone/services/host-grpc-client.ts # Host bridge -hosts/vscode/*/methods.ts -hosts/vscode/*/index.ts -hosts/vscode/host-grpc-service-config.ts +src/hosts/vscode/*/methods.ts +src/hosts/vscode/*/index.ts +src/hosts/vscode/host-grpc-service-config.ts diff --git a/.husky/pre-commit b/.husky/pre-commit index f7f6972a..487dffc8 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -9,9 +9,9 @@ npm run lint || { # Run Prettier echo "Running Prettier..." -npm run format || { - echo "❌ Prettier check failed. Run 'npm run format:fix' to automatically fix formatting issues." - exit 1 -} +npx lint-staged --verbose || { + echo "❌ Prettier failed. Please fix the errors and try committing again." + exit 1 + } echo "✅ All checks passed!" diff --git a/.vscode/launch.json b/.vscode/launch.json index 5f0e555d..a37f86b9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -42,7 +42,7 @@ { "type": "node", "request": "launch", - "name": "Run Standalone Extension", + "name": "Run Standalone Service", "skipFiles": ["/**"], "sourceMaps": true, "resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"], @@ -53,7 +53,8 @@ "GRPC_TRACE": "all", "GRPC_VERBOSITY": "DEBUG", "NODE_PATH": "${workspaceFolder}/dist-standalone/node_modules", - "CLINE_DIR": "${userHome}/.cline-standalone" + "CLINE_DIR": "${userHome}/.cline-standalone", + "HOST_BRIDGE_ADDRESS": "localhost:50052" }, "program": "standalone.js" } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 25d7c425..5e47a904 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -128,7 +128,25 @@ "type": "npm", "script": "watch:esbuild", "group": "build", - "problemMatcher": "$esbuild-watch", + "problemMatcher": { + "pattern": [ + { + "regexp": "^✘ \\[ERROR\\] (.*)$", + "message": 1 + }, + { + "regexp": "^\\s+(.*):(\\d+):(\\d+):$", + "file": 1, + "line": 2, + "column": 3 + } + ], + "background": { + "activeOnStart": true, + "beginsPattern": "^\\[watch\\] build started$", + "endsPattern": "^\\[watch\\] build finished$" + } + }, "isBackground": true, "label": "npm: watch:esbuild", "dependsOn": ["npm: protos"], @@ -146,7 +164,25 @@ "type": "npm", "script": "watch:esbuild:test", "group": "build", - "problemMatcher": "$esbuild-watch", + "problemMatcher": { + "pattern": [ + { + "regexp": "^✘ \\[ERROR\\] (.*)$", + "message": 1 + }, + { + "regexp": "^\\s+(.*):(\\d+):(\\d+):$", + "file": 1, + "line": 2, + "column": 3 + } + ], + "background": { + "activeOnStart": true, + "beginsPattern": "^\\[watch\\] build started$", + "endsPattern": "^\\[watch\\] build finished$" + } + }, "isBackground": true, "label": "npm: watch:esbuild:test", "dependsOn": ["npm: protos"], diff --git a/CHANGELOG.md b/CHANGELOG.md index d2588772..216fbd6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,43 @@ # Changelog +## [3.17.14] + +- Add Claude Code as a new API provider, allowing integration with Anthropic's Claude Code CLI tool and Claude Max Plan (Thanks @BarreiroT!) +- Add SAP AI Core as a new API provider with support for Claude and GPT models (Thanks @schardosin!) +- Add configurable default terminal profile setting, allowing users to specify which terminal Cline should use (Thanks @valinha!) +- Add terminal output size constraint setting to limit how much terminal output is processed +- Add MCP Rich Display settings to the settings page for persistent configuration (Thanks @Vl4diC0de!) +- Improve copy button functionality with refactored reusable components (Thanks @shouhanzen!) +- Improve AWS Bedrock provider by removing deprecated dependency and using standard AWS SDK (Thanks @watany-dev!) +- Fix list_files tool to properly return files when targeting hidden directories +- Fix search and replace edge case that could cause file deletion, making the algorithm more lenient for models using different diff formats +- Fix task restoration issues that could occur when resuming interrupted tasks +- Fix checkpoint saving to properly track all file changes +- Improve file context warnings to reduce diff edit errors when resuming restored tasks +- Clear chat input when switching between Plan/Act modes within a task +- Exclude .clinerules files from checkpoint tracking + +## [3.17.13] + +- Add Thinking UX for Gemini models, providing visual feedback during model reasoning +- Add support for Notifications MCP integration with Cline +- Add prompt caching indicator for Grok 3 models +- Sort MCP marketplace by newest listings by default for easier discovery of recent servers +- Update O3 model family pricing to reflect latest OpenAI rates +- Remove '-beta' suffix from Grok model identifiers +- Fix AWS Bedrock provider by removing deprecated Anthropic-Bedrock SDK (Thanks @watany-dev!) +- Fix menu display issue for terminal timeout settings +- Improve chat input field styling and behavior + +## [3.17.12] + +- **Free Grok Model Available!** Access Grok 3 completely free through the Cline provider +- Add collapsible MCP response panels to keep conversations focused on the main AI responses while still allowing access to detailed MCP output (Thanks @valinha!) +- Prioritize active files (open tabs) at the top of the file context menu when using @ mentions (Thanks @abeatrix!) +- Fix context menu to properly default to "File" option instead of incorrectly selecting "Git Commits" +- Fix diff editing to handle out-of-order SEARCH/REPLACE blocks, improving reliability with models that don't follow strict ordering +- Fix telemetry warning popup appearing repeatedly for users who have telemetry disabled + ## [3.17.11] - Add support for Gemini 2.5 Pro Preview 06-05 model to Vertex AI and Google Gemini providers diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cbfb3a1c..2d34a988 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,6 +18,18 @@ We also welcome contributions to our [documentation](https://github.com/cline/cl If you're planning to work on a bigger feature, please create a [feature request](https://github.com/cline/cline/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop) first so we can discuss whether it aligns with Cline's vision. +## Before Contributing + +All contributions must begin with a GitHub Issue, unless the change is for small bug fixes, typo corrections, minor wording improvements, or simple type fixes that don't change functionality. + +- **Check existing issues**: Search [GitHub Issues](https://github.com/cline/cline/issues). +- **Create an issue**: Use appropriate templates: + - **Bugs:** "Bug Report" template. + - **Features:** "Detailed Feature Proposal" template. Approval from a core Cline contributor required before starting. +- **Claim issues**: Comment your interest. + +**PRs without approved issues may be closed.** + ## Development Setup 1. **VS Code Extensions** diff --git a/buf.yaml b/buf.yaml new file mode 100644 index 00000000..b67601cb --- /dev/null +++ b/buf.yaml @@ -0,0 +1,22 @@ +version: v2 +modules: + - path: proto + name: cline/cline/lint + +lint: + use: + - STANDARD + + except: # Add exceptions for current patterns that contradict STANDARD settings + - RPC_PASCAL_CASE # rpcs are camel case (start with lowercase) + - PACKAGE_DIRECTORY_MATCH # the protos in the cline package are not in a dir named cline. + - RPC_REQUEST_RESPONSE_UNIQUE # request messages are not unique. + - RPC_REQUEST_STANDARD_NAME # request messages dont all end with Request + - RPC_RESPONSE_STANDARD_NAME # response messages dont all end with Response + - PACKAGE_VERSION_SUFFIX # package name does not contain version. + - ENUM_VALUE_PREFIX # enum values dont start with the enum name. + - ENUM_ZERO_VALUE_SUFFIX # first value does not have to be UNSPECIFIED. + +# breaking: +# use: +# - WIRE_JSON # Detect changes that break the json wire format (this is the minimum recommended level.) diff --git a/esbuild.js b/esbuild.js index a8ec230f..ff1e01e9 100644 --- a/esbuild.js +++ b/esbuild.js @@ -125,9 +125,11 @@ const baseConfig = { minify: production, sourcemap: !production, logLevel: "silent", - define: { - "process.env.IS_DEV": JSON.stringify(!production), - }, + define: production + ? { + "process.env.IS_DEV": JSON.stringify(!production), + } + : undefined, tsconfig: path.resolve(__dirname, "tsconfig.json"), plugins: [ copyWasmFiles, diff --git a/evals/.gitignore b/evals/.gitignore index 4a67796a..f8af1e6c 100644 --- a/evals/.gitignore +++ b/evals/.gitignore @@ -1,3 +1,6 @@ repositories -results/evals.db \ No newline at end of file +results/evals.db + +diff_editing/test_cases/ +diff_editing/test_outputs/ \ No newline at end of file diff --git a/evals/cli/package-lock.json b/evals/cli/package-lock.json index c4f70759..6d49ae75 100644 --- a/evals/cli/package-lock.json +++ b/evals/cli/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "better-sqlite3": "^8.0.0", + "better-sqlite3": "^11.10.0", "chalk": "^4.1.2", "commander": "^9.4.1", "execa": "^5.1.1", @@ -217,10 +217,11 @@ ] }, "node_modules/better-sqlite3": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-8.7.0.tgz", - "integrity": "sha512-99jZU4le+f3G6aIl6PmmV0cxUIWqKieHxsiF7G34CVFiE+/UabpYqkU0NJIkY/96mQKikHeBjtR27vFfs5JpEw==", + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-11.10.0.tgz", + "integrity": "sha512-EwhOpyXiOEL/lKzHz9AW1msWFNzGc/z+LzeB3/jnFJpxu+th2yqvzsSWas1v9jgs9+xiXJcD5A8CJxAG2TaghQ==", "hasInstallScript": true, + "license": "MIT", "dependencies": { "bindings": "^1.5.0", "prebuild-install": "^7.1.1" @@ -1607,9 +1608,9 @@ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "better-sqlite3": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-8.7.0.tgz", - "integrity": "sha512-99jZU4le+f3G6aIl6PmmV0cxUIWqKieHxsiF7G34CVFiE+/UabpYqkU0NJIkY/96mQKikHeBjtR27vFfs5JpEw==", + "version": "11.10.0", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-11.10.0.tgz", + "integrity": "sha512-EwhOpyXiOEL/lKzHz9AW1msWFNzGc/z+LzeB3/jnFJpxu+th2yqvzsSWas1v9jgs9+xiXJcD5A8CJxAG2TaghQ==", "requires": { "bindings": "^1.5.0", "prebuild-install": "^7.1.1" diff --git a/evals/cli/package.json b/evals/cli/package.json index 14f21d40..9ef4fac7 100644 --- a/evals/cli/package.json +++ b/evals/cli/package.json @@ -17,7 +17,7 @@ "author": "", "license": "MIT", "dependencies": { - "better-sqlite3": "^8.0.0", + "better-sqlite3": "^11.10.0", "chalk": "^4.1.2", "commander": "^9.4.1", "execa": "^5.1.1", diff --git a/evals/cli/src/commands/runDiffEval.ts b/evals/cli/src/commands/runDiffEval.ts new file mode 100644 index 00000000..886cf455 --- /dev/null +++ b/evals/cli/src/commands/runDiffEval.ts @@ -0,0 +1,79 @@ +import execa from "execa" +import chalk from "chalk" +import path from "path" + +interface RunDiffEvalOptions { + modelId: string + systemPromptName: string + numberOfRuns: number + parsingFunction: string + diffEditFunction: string + thinkingBudget: number + parallel: boolean + verbose: boolean + testPath: string + outputPath: string + replay: boolean +} + +export async function runDiffEvalHandler(options: RunDiffEvalOptions) { + console.log(chalk.blue("Starting diff editing evaluation...")) + + // Resolve the path to the TestRunner.ts script relative to the current file + const scriptPath = path.resolve(__dirname, "../../../diff_editing/TestRunner.ts") + + // Construct the arguments array for the execa call + const args = [ + "--model-id", + options.modelId, + "--system-prompt-name", + options.systemPromptName, + "--number-of-runs", + String(options.numberOfRuns), + "--parsing-function", + options.parsingFunction, + "--diff-edit-function", + options.diffEditFunction, + ] + + // Conditionally add the optional arguments + if (options.testPath) { + args.push("--test-path", options.testPath) + } + if (options.outputPath) { + args.push("--output-path", options.outputPath) + } + if (options.thinkingBudget > 0) { + args.push("--thinking-budget", String(options.thinkingBudget)) + } + + if (options.parallel) { + args.push("--parallel") + } + + if (options.replay) { + args.push("--replay") + } + + if (options.verbose) { + args.push("--verbose") + } + + try { + console.log(chalk.gray(`Executing: npx tsx ${scriptPath} ${args.join(" ")}`)) + + // Execute the script as a child process + // We use 'inherit' to stream the stdout/stderr directly to the user's terminal + const subprocess = execa("npx", ["tsx", scriptPath, ...args], { + stdio: "inherit", + }) + + await subprocess + + console.log(chalk.green("Diff editing evaluation completed successfully.")) + } catch (error) { + console.error(chalk.red("An error occurred during the diff editing evaluation.")) + // The 'inherit' stdio will have already printed the error details from the script + process.exit(1) + } +} diff --git a/evals/cli/src/index.ts b/evals/cli/src/index.ts index e9a4be54..2b3f6240 100644 --- a/evals/cli/src/index.ts +++ b/evals/cli/src/index.ts @@ -5,6 +5,7 @@ import { setupHandler } from "./commands/setup" import { runHandler } from "./commands/run" import { reportHandler } from "./commands/report" import { evalsEnvHandler } from "./commands/evals-env" +import { runDiffEvalHandler } from "./commands/runDiffEval" // Create the CLI program const program = new Command() @@ -77,6 +78,36 @@ program } }) +// Run-diff-eval command +program + .command("run-diff-eval") + .description("Run the diff editing evaluation suite") + .option("--test-path ", "Path to the directory containing test case JSON files") + .option("--output-path ", "Path to the directory to save the test output JSON files") + .option("--model-id ", "The model ID to use for the test") + .option("--system-prompt-name ", "The name of the system prompt to use", "basicSystemPrompt") + .option("-n, --number-of-runs ", "Number of times to run each test case", "1") + .option("--parsing-function ", "The parsing function to use", "parseAssistantMessageV2") + .option("--diff-edit-function ", "The diff editing function to use", "constructNewFileContentV2") + .option("--thinking-budget ", "Set the thinking tokens budget", "0") + .option("--parallel", "Run tests in parallel", false) + .option("--replay", "Run evaluation from a pre-recorded LLM output, skipping the API call", false) + .option("-v, --verbose", "Enable verbose logging", false) + .action(async (options) => { + try { + // The logic here simplifies slightly + const fullOptions = { + ...options, + numberOfRuns: parseInt(options.numberOfRuns, 10), + thinkingBudget: parseInt(options.thinkingBudget, 10), + } + await runDiffEvalHandler(fullOptions) + } catch (error) { + console.error(chalk.red(`Error during diff eval run: ${error instanceof Error ? error.message : String(error)}`)) + process.exit(1) + } + }) + // Parse command line arguments program.parse(process.argv) diff --git a/evals/diff_editing/ClineWrapper.ts b/evals/diff_editing/ClineWrapper.ts new file mode 100644 index 00000000..d11256d1 --- /dev/null +++ b/evals/diff_editing/ClineWrapper.ts @@ -0,0 +1,279 @@ +import { OpenRouterHandler } from "../../src/api/providers/openrouter" +import { ApiHandlerOptions } from "../../src/shared/api" +import { Anthropic } from "@anthropic-ai/sdk" + +import { + parseAssistantMessageV1, + parseAssistantMessageV2, + parseAssistantMessageV3, + AssistantMessageContent, +} from "./parsing/parse-assistant-message-06-06-25" // "../../src/core/assistant-message" +import { constructNewFileContent as constructNewFileContentV1, constructNewFileContentV2 } from "./diff-apply/diff-06-06-25" +import { constructNewFileContent as constructNewFileContentV3 } from "../../src/core/assistant-message/diff" // this defaults to the new v1 when called + +type ParseAssistantMessageFn = (message: string) => AssistantMessageContent[] +type ConstructNewFileContentFn = (diff: string, original: string, strict: boolean) => Promise + +const parsingFunctions: Record = { + parseAssistantMessageV1: parseAssistantMessageV1, + parseAssistantMessageV2: parseAssistantMessageV2, + parseAssistantMessageV3: parseAssistantMessageV3, +} + +const diffEditingFunctions: Record = { + constructNewFileContentV1: constructNewFileContentV1, + constructNewFileContentV2: constructNewFileContentV2, + constructNewFileContentV3: constructNewFileContentV3, // position invariant diff +} + +import { TestInput, TestResult, ExtractedToolCall } from "./types" +export { TestInput, TestResult, ExtractedToolCall } + +interface StreamResult { + assistantMessage: string + reasoningMessage: string + usage: { + inputTokens: number + outputTokens: number + cacheWriteTokens: number + cacheReadTokens: number + totalCost: number + } +} + +/** + * Process the stream and return full response + */ +async function processStream( + handler: OpenRouterHandler, + systemPrompt: string, + messages: Anthropic.Messages.MessageParam[], +): Promise { + const stream = handler.createMessage(systemPrompt, messages) + + let assistantMessage = "" + let reasoningMessage = "" + let inputTokens = 0 + let outputTokens = 0 + let cacheWriteTokens = 0 + let cacheReadTokens = 0 + let totalCost = 0 + + for await (const chunk of stream) { + if (!chunk) { + continue + } + + switch (chunk.type) { + case "usage": + inputTokens += chunk.inputTokens + outputTokens += chunk.outputTokens + cacheWriteTokens += chunk.cacheWriteTokens ?? 0 + cacheReadTokens += chunk.cacheReadTokens ?? 0 + if (chunk.totalCost) { + totalCost = chunk.totalCost + } + break + case "reasoning": + reasoningMessage += chunk.reasoning + break + case "text": + assistantMessage += chunk.text + break + } + } + + return { + assistantMessage, + reasoningMessage, + usage: { + inputTokens, + outputTokens, + cacheWriteTokens, + cacheReadTokens, + totalCost, + }, + } +} + +/** + * Main evaluation function: + * 1. create and process stream + * 2. extract any tool calls from the stream + * 3. if no diff edit, considered a failure (or rerun) - otherwise attempt to apply the diff edit + */ +export async function runSingleEvaluation(input: TestInput): Promise { + try { + // Extract parameters + const { + apiKey, + systemPrompt, + messages, + modelId, + originalFile, + originalFilePath, + parsingFunction, + diffEditFunction, + thinkingBudgetTokens, + originalDiffEditToolCallMessage, + } = input + + const requiredParams = { + systemPrompt, + messages, + modelId, + originalFile, + originalFilePath, + parsingFunction, + diffEditFunction, + } + + const missingParams = Object.entries(requiredParams) + .filter(([, value]) => !value) + .map(([key]) => key) + + if (missingParams.length > 0) { + return { + success: false, + error: "missing_required_parameters", + errorString: `Missing required parameters: ${missingParams.join(", ")}`, + } + } + + const parseAssistantMessage = parsingFunctions[parsingFunction] + const constructNewFileContent = diffEditingFunctions[diffEditFunction] + + if (!parseAssistantMessage || !constructNewFileContent) { + return { + success: false, + error: "invalid_functions", + } + } + + const options: ApiHandlerOptions = { + openRouterApiKey: apiKey, + openRouterModelId: modelId, + thinkingBudgetTokens: thinkingBudgetTokens, + openRouterModelInfo: { + maxTokens: 10_000, + contextWindow: 1_000_000, + supportsImages: true, + supportsPromptCache: true, // may need to turn this on + inputPrice: 0, + outputPrice: 0, + }, + } + + // Get the output of streaming output of this llm call + let streamResult: StreamResult + if (originalDiffEditToolCallMessage !== undefined) { + // Replay mode: mock the stream result + streamResult = { + assistantMessage: originalDiffEditToolCallMessage, + reasoningMessage: "", + usage: { inputTokens: 0, outputTokens: 0, cacheWriteTokens: 0, cacheReadTokens: 0, totalCost: 0 }, + } + } else { + // Live mode: existing API call logic + try { + const openRouterHandler = new OpenRouterHandler(options) + streamResult = await processStream(openRouterHandler, systemPrompt, messages) + } catch (error: any) { + return { + success: false, + error: "llm_stream_error", + errorString: error.message || error.toString(), + } + } + } + + // process the assistant message into its constituent tool calls & text blocks + const assistantContentBlocks: AssistantMessageContent[] = parseAssistantMessage(streamResult.assistantMessage) + + const detectedToolCalls: ExtractedToolCall[] = [] + + for (const block of assistantContentBlocks) { + if (block.type === "tool_use") { + detectedToolCalls.push({ + name: block.name, + input: block.params, + }) + } + } + + // check if there are any tool calls, if there are none then its a clear error + if (detectedToolCalls.length === 0) { + return { + success: false, + streamResult: streamResult, + toolCalls: detectedToolCalls, + error: "no_tool_calls", + } + } + + // check that there is exactly one tool call, otherwise an error + if (detectedToolCalls.length > 1) { + return { + success: false, + streamResult: streamResult, + toolCalls: detectedToolCalls, + error: "multi_tool_calls", + } + } + + // check that the tool call is diff edit tool call + if (detectedToolCalls[0].name !== "replace_in_file") { + return { + success: false, + streamResult: streamResult, + toolCalls: detectedToolCalls, + error: "wrong_tool_call", + } + } + + const toolCall = detectedToolCalls[0] + const diffToolPath = toolCall.input.path + const diffToolContent = toolCall.input.diff + + if (!diffToolPath || !diffToolContent) { + return { + success: false, + streamResult: streamResult, + toolCalls: detectedToolCalls, + error: "tool_call_params_undefined", + } + } + + // check that we are editing the correct file path + if (diffToolPath !== originalFilePath) { + return { + success: false, + streamResult: streamResult, + toolCalls: detectedToolCalls, + error: "wrong_file_edited", + } + } + + // checking if the diff edit succeeds, if it failed it will throw an error + let diffSuccess = true + try { + await constructNewFileContent(diffToolContent, originalFile, true) + } catch (error: any) { + diffSuccess = false + } + + return { + success: true, + streamResult: streamResult, + toolCalls: detectedToolCalls, + diffEdit: diffToolContent, + diffEditSuccess: diffSuccess, + } + } catch (error: any) { + return { + success: false, + error: "other_error", + errorString: error.message || error.toString(), + } + } +} diff --git a/evals/diff_editing/TestRunner.ts b/evals/diff_editing/TestRunner.ts new file mode 100644 index 00000000..4788104a --- /dev/null +++ b/evals/diff_editing/TestRunner.ts @@ -0,0 +1,391 @@ +import { runSingleEvaluation, TestInput, TestResult } from "./ClineWrapper" +import { basicSystemPrompt } from "./prompts/basicSystemPrompt-06-06-25" +import { claude4SystemPrompt } from "./prompts/claude4SystemPrompt-06-06-25" +import { formatResponse } from "./helpers" +import { Anthropic } from "@anthropic-ai/sdk" +import * as fs from "fs" +import * as path from "path" +import { Command } from "commander" +import { InputMessage, ProcessedTestCase, TestCase, TestConfig, SystemPromptDetails, ConstructSystemPromptFn } from "./types" + +function log(isVerbose: boolean, message: string) { + if (isVerbose) { + console.log(message) + } +} + +const systemPromptGeneratorLookup: Record = { + basicSystemPrompt: basicSystemPrompt, + claude4SystemPrompt: claude4SystemPrompt, +} + +type TestResultSet = { [test_id: string]: (TestResult & { test_id?: string })[] } + +class NodeTestRunner { + private apiKey: string | undefined + + constructor(isReplay: boolean) { + if (!isReplay) { + this.apiKey = process.env.OPENROUTER_API_KEY + if (!this.apiKey) { + throw new Error("OPENROUTER_API_KEY environment variable not set for a non-replay run.") + } + } + } + + /** + * convert our messages array into a properly formatted Anthropic messages array + */ + transformMessages(messages: InputMessage[]): Anthropic.Messages.MessageParam[] { + return messages.map((msg) => { + // Use TextBlockParam here for constructing the input message + const content: (Anthropic.TextBlockParam | Anthropic.ImageBlockParam)[] = [] + + if (msg.text) { + // This object now correctly matches the TextBlockParam type + content.push({ type: "text", text: msg.text }) + } + + if (msg.images && Array.isArray(msg.images)) { + const imageBlocks = formatResponse.imageBlocks(msg.images) + content.push(...imageBlocks) + } + + return { + role: msg.role, + content: content, + } + }) + } + + /** + * Generate the system prompt on the fly + */ + constructSystemPrompt(systemPromptDetails: SystemPromptDetails, systemPromptName: string) { + const systemPromptGenerator = systemPromptGeneratorLookup[systemPromptName] + + const { cwd_value, browser_use, width, height, os_value, shell_value, home_value, mcp_string, user_custom_instructions } = + systemPromptDetails + + const systemPrompt = systemPromptGenerator( + cwd_value, + browser_use, + width, + height, + os_value, + shell_value, + home_value, + mcp_string, + user_custom_instructions, + ) + + return systemPrompt + } + + /** + * Loads our test cases from a directory of json files + */ + loadTestCases(testDirectoryPath: string): TestCase[] { + const testCasesArray: TestCase[] = [] + const dirents = fs.readdirSync(testDirectoryPath, { withFileTypes: true }) + + for (const dirent of dirents) { + if (dirent.isFile() && dirent.name.endsWith(".json")) { + const testFilePath = path.join(testDirectoryPath, dirent.name) + const fileContent = fs.readFileSync(testFilePath, "utf8") + const testCase: TestCase = JSON.parse(fileContent) + + // Use the filename (without extension) as the test_id if not provided + if (!testCase.test_id) { + testCase.test_id = path.parse(dirent.name).name + } + testCasesArray.push(testCase) + } + } + + return testCasesArray + } + + /** + * Saves the test results to the specified output directory. + */ + saveTestResults(results: TestResultSet, outputPath: string) { + // Ensure output directory exists + if (!fs.existsSync(outputPath)) { + fs.mkdirSync(outputPath, { recursive: true }) + } + + // Write each test result to its own file + for (const testId in results) { + const outputFilePath = path.join(outputPath, `${testId}.json`) + const testResult = results[testId] + fs.writeFileSync(outputFilePath, JSON.stringify(testResult, null, 2)) + } + } + + /** + * Run a single test example + */ + async runSingleTest(testCase: ProcessedTestCase, testConfig: TestConfig): Promise { + if (testConfig.replay && !testCase.original_diff_edit_tool_call_message) { + return { + success: false, + error: "missing_original_diff_edit_tool_call_message", + errorString: `Test case ${testCase.test_id} is missing 'original_diff_edit_tool_call_message' for replay.`, + } + } + + const customSystemPrompt = this.constructSystemPrompt(testCase.system_prompt_details, testConfig.system_prompt_name) + + // messages don't include system prompt and are everything up to the first replace_in_file tool call which results in a diff edit error + const input: TestInput = { + apiKey: this.apiKey, + systemPrompt: customSystemPrompt, + messages: testCase.messages, + modelId: testConfig.model_id, + originalFile: testCase.file_contents, + originalFilePath: testCase.file_path, + parsingFunction: testConfig.parsing_function, + diffEditFunction: testConfig.diff_edit_function, + thinkingBudgetTokens: testConfig.thinking_tokens_budget, + originalDiffEditToolCallMessage: testConfig.replay ? testCase.original_diff_edit_tool_call_message : undefined, + } + + return await runSingleEvaluation(input) + } + + /** + * Runs all the text examples synchonously + */ + async runAllTests(testCases: ProcessedTestCase[], testConfig: TestConfig, isVerbose: boolean): Promise { + const results: TestResultSet = {} + + for (const testCase of testCases) { + results[testCase.test_id] = [] + + log(isVerbose, `-Running test: ${testCase.test_id}`) + for (let i = 0; i < testConfig.number_of_runs; i++) { + const result = await this.runSingleTest(testCase, testConfig) + results[testCase.test_id].push(result) + } + } + return results + } + + /** + * Runs all of the text examples asynchronously, with concurrency limit + */ + async runAllTestsParallel( + testCases: ProcessedTestCase[], + testConfig: TestConfig, + isVerbose: boolean, + maxConcurrency: number = 20, + ): Promise { + const results: TestResultSet = {} + testCases.forEach((tc) => { + results[tc.test_id] = [] + }) + + // Create a flat list of all individual runs we need to execute + const allRuns = testCases.flatMap((testCase) => + Array(testConfig.number_of_runs) + .fill(null) + .map(() => testCase), + ) + + for (let i = 0; i < allRuns.length; i += maxConcurrency) { + const batch = allRuns.slice(i, i + maxConcurrency) + + const batchPromises = batch.map((testCase) => + this.runSingleTest(testCase, testConfig).then((result) => ({ + ...result, + test_id: testCase.test_id, + })), + ) + + const batchResults = await Promise.all(batchPromises) + + // Calculate the total cost for this batch + const batchCost = batchResults.reduce((total, result) => { + return total + (result.streamResult?.usage?.totalCost || 0) + }, 0) + + // Populate the results dictionary + for (const result of batchResults) { + if (result.test_id) { + results[result.test_id].push(result) + } + } + + const batchNumber = i / maxConcurrency + 1 + const totalBatches = Math.ceil(allRuns.length / maxConcurrency) + log(isVerbose, `-Completed batch ${batchNumber} of ${totalBatches}... (Batch Cost: $${batchCost.toFixed(6)})`) + } + + return results + } + + /** + * Print output of the tests + */ + printSummary(results: TestResultSet, isVerbose: boolean) { + let totalRuns = 0 + let totalPasses = 0 + let totalInputTokens = 0 + let totalOutputTokens = 0 + let totalCost = 0 + let runsWithUsageData = 0 + let totalDiffEditSuccesses = 0 + let totalRunsWithToolCalls = 0 + const testCaseIds = Object.keys(results) + + log(isVerbose, "\n=== TEST SUMMARY ===") + + for (const testId of testCaseIds) { + const testResults = results[testId] + const passedCount = testResults.filter((r) => r.success && r.diffEditSuccess).length + const runCount = testResults.length + + totalRuns += runCount + totalPasses += passedCount + + const runsWithToolCalls = testResults.filter((r) => r.success === true).length + const diffEditSuccesses = passedCount + totalRunsWithToolCalls += runsWithToolCalls + totalDiffEditSuccesses += diffEditSuccesses + + // Accumulate token and cost data + for (const result of testResults) { + if (result.streamResult?.usage) { + totalInputTokens += result.streamResult.usage.inputTokens + totalOutputTokens += result.streamResult.usage.outputTokens + totalCost += result.streamResult.usage.totalCost + runsWithUsageData++ + } + } + + log(isVerbose, `\n--- Test Case: ${testId} ---`) + log(isVerbose, ` Runs: ${runCount}`) + log(isVerbose, ` Passed: ${passedCount}`) + log(isVerbose, ` Success Rate: ${runCount > 0 ? ((passedCount / runCount) * 100).toFixed(1) : "N/A"}%`) + } + + log(isVerbose, "\n\n=== OVERALL SUMMARY ===") + log(isVerbose, `Total Test Cases: ${testCaseIds.length}`) + log(isVerbose, `Total Runs Executed: ${totalRuns}`) + log(isVerbose, `Overall Passed: ${totalPasses}`) + log(isVerbose, `Overall Failed: ${totalRuns - totalPasses}`) + log(isVerbose, `Overall Success Rate: ${totalRuns > 0 ? ((totalPasses / totalRuns) * 100).toFixed(1) : "N/A"}%`) + + log(isVerbose, "\n\n=== OVERALL DIFF EDIT SUCCESS RATE ===") + if (totalRunsWithToolCalls > 0) { + const diffSuccessRate = (totalDiffEditSuccesses / totalRunsWithToolCalls) * 100 + log(isVerbose, `Total Runs with Successful Tool Calls: ${totalRunsWithToolCalls}`) + log(isVerbose, `Total Runs with Successful Diff Edits: ${totalDiffEditSuccesses}`) + log(isVerbose, `Diff Edit Success Rate: ${diffSuccessRate.toFixed(1)}%`) + } else { + log(isVerbose, "No successful tool calls to analyze for diff edit success.") + } + + log(isVerbose, "\n\n=== TOKEN & COST ANALYSIS ===") + if (runsWithUsageData > 0) { + log(isVerbose, `Total Input Tokens: ${totalInputTokens.toLocaleString()}`) + log(isVerbose, `Total Output Tokens: ${totalOutputTokens.toLocaleString()}`) + log(isVerbose, `Total Cost: $${totalCost.toFixed(6)}`) + log(isVerbose, "---") + log( + isVerbose, + `Avg Input Tokens / Run: ${(totalInputTokens / runsWithUsageData).toLocaleString(undefined, { + maximumFractionDigits: 0, + })}`, + ) + log( + isVerbose, + `Avg Output Tokens / Run: ${(totalOutputTokens / runsWithUsageData).toLocaleString(undefined, { + maximumFractionDigits: 0, + })}`, + ) + log(isVerbose, `Avg Cost / Run: $${(totalCost / runsWithUsageData).toFixed(6)}`) + } else { + log(isVerbose, "No usage data available to analyze.") + } + } +} + +async function main() { + const program = new Command() + + const defaultTestPath = path.join(__dirname, "test_cases") + const defaultOutputPath = path.join(__dirname, "test_outputs") + + program + .name("TestRunner") + .description("Run evaluation tests for diff editing") + .version("1.0.0") + .option("--test-path ", "Path to the directory containing test case JSON files", defaultTestPath) + .option("--output-path ", "Path to the directory to save the test output JSON files", defaultOutputPath) + .option("--model-id ", "The model ID to use for the test") + .option("--system-prompt-name ", "The name of the system prompt to use", "basicSystemPrompt") + .option("-n, --number-of-runs ", "Number of times to run each test case", "1") + .option("--parsing-function ", "The parsing function to use", "parseAssistantMessageV2") + .option("--diff-edit-function ", "The diff editing function to use", "constructNewFileContentV2") + .option("--thinking-budget ", "Set the thinking tokens budget", "0") + .option("--parallel", "Run tests in parallel", false) + .option("--replay", "Run evaluation from a pre-recorded LLM output, skipping the API call", false) + .option("-v, --verbose", "Enable verbose logging", false) + + program.parse(process.argv) + + const options = program.opts() + const isVerbose = options.verbose + const testPath = options.testPath + const outputPath = options.outputPath + + const testConfig: TestConfig = { + model_id: options.modelId, + system_prompt_name: options.systemPromptName, + number_of_runs: parseInt(options.numberOfRuns, 10), + parsing_function: options.parsingFunction, + diff_edit_function: options.diffEditFunction, + thinking_tokens_budget: parseInt(options.thinkingBudget, 10), + replay: options.replay, + } + + try { + const startTime = Date.now() + + const runner = new NodeTestRunner(testConfig.replay) + const testCases = runner.loadTestCases(testPath) + + const processedTestCases: ProcessedTestCase[] = testCases.map((tc) => ({ + ...tc, + messages: runner.transformMessages(tc.messages), + })) + + log(isVerbose, `-Loaded ${testCases.length} test cases.`) + log(isVerbose, `-Executing ${testConfig.number_of_runs} run(s) per test case.`) + if (testConfig.replay) { + log(isVerbose, `-Running in REPLAY mode. No API calls will be made.`) + } + log(isVerbose, "Starting tests...\n") + + const results = options.parallel + ? await runner.runAllTestsParallel(processedTestCases, testConfig, isVerbose) + : await runner.runAllTests(processedTestCases, testConfig, isVerbose) + + runner.printSummary(results, isVerbose) + + const endTime = Date.now() + const durationSeconds = ((endTime - startTime) / 1000).toFixed(2) + log(isVerbose, `\n-Total execution time: ${durationSeconds} seconds`) + + runner.saveTestResults(results, outputPath) + } catch (error) { + console.error("\nError running tests:", error) + process.exit(1) + } +} + +if (require.main === module) { + main() +} diff --git a/evals/diff_editing/diff-apply/diff-06-06-25.ts b/evals/diff_editing/diff-apply/diff-06-06-25.ts new file mode 100644 index 00000000..6a74917a --- /dev/null +++ b/evals/diff_editing/diff-apply/diff-06-06-25.ts @@ -0,0 +1,729 @@ +const SEARCH_BLOCK_START = "------- SEARCH" +const SEARCH_BLOCK_END = "=======" +const REPLACE_BLOCK_END = "+++++++ REPLACE" + +const SEARCH_BLOCK_CHAR = "-" +const REPLACE_BLOCK_CHAR = "+" + +/** + * Attempts a line-trimmed fallback match for the given search content in the original content. + * It tries to match `searchContent` lines against a block of lines in `originalContent` starting + * from `lastProcessedIndex`. Lines are matched by trimming leading/trailing whitespace and ensuring + * they are identical afterwards. + * + * Returns [matchIndexStart, matchIndexEnd] if found, or false if not found. + */ +function lineTrimmedFallbackMatch(originalContent: string, searchContent: string, startIndex: number): [number, number] | false { + // Split both contents into lines + const originalLines = originalContent.split("\n") + const searchLines = searchContent.split("\n") + + // Trim trailing empty line if exists (from the trailing \n in searchContent) + if (searchLines[searchLines.length - 1] === "") { + searchLines.pop() + } + + // Find the line number where startIndex falls + let startLineNum = 0 + let currentIndex = 0 + while (currentIndex < startIndex && startLineNum < originalLines.length) { + currentIndex += originalLines[startLineNum].length + 1 // +1 for \n + startLineNum++ + } + + // For each possible starting position in original content + for (let i = startLineNum; i <= originalLines.length - searchLines.length; i++) { + let matches = true + + // Try to match all search lines from this position + for (let j = 0; j < searchLines.length; j++) { + const originalTrimmed = originalLines[i + j].trim() + const searchTrimmed = searchLines[j].trim() + + if (originalTrimmed !== searchTrimmed) { + matches = false + break + } + } + + // If we found a match, calculate the exact character positions + if (matches) { + // Find start character index + let matchStartIndex = 0 + for (let k = 0; k < i; k++) { + matchStartIndex += originalLines[k].length + 1 // +1 for \n + } + + // Find end character index + let matchEndIndex = matchStartIndex + for (let k = 0; k < searchLines.length; k++) { + matchEndIndex += originalLines[i + k].length + 1 // +1 for \n + } + + return [matchStartIndex, matchEndIndex] + } + } + + return false +} + +/** + * Attempts to match blocks of code by using the first and last lines as anchors. + * This is a third-tier fallback strategy that helps match blocks where we can identify + * the correct location by matching the beginning and end, even if the exact content + * differs slightly. + * + * The matching strategy: + * 1. Only attempts to match blocks of 3 or more lines to avoid false positives + * 2. Extracts from the search content: + * - First line as the "start anchor" + * - Last line as the "end anchor" + * 3. For each position in the original content: + * - Checks if the next line matches the start anchor + * - If it does, jumps ahead by the search block size + * - Checks if that line matches the end anchor + * - All comparisons are done after trimming whitespace + * + * This approach is particularly useful for matching blocks of code where: + * - The exact content might have minor differences + * - The beginning and end of the block are distinctive enough to serve as anchors + * - The overall structure (number of lines) remains the same + * + * @param originalContent - The full content of the original file + * @param searchContent - The content we're trying to find in the original file + * @param startIndex - The character index in originalContent where to start searching + * @returns A tuple of [startIndex, endIndex] if a match is found, false otherwise + */ +function blockAnchorFallbackMatch(originalContent: string, searchContent: string, startIndex: number): [number, number] | false { + const originalLines = originalContent.split("\n") + const searchLines = searchContent.split("\n") + + // Only use this approach for blocks of 3+ lines + if (searchLines.length < 3) { + return false + } + + // Trim trailing empty line if exists + if (searchLines[searchLines.length - 1] === "") { + searchLines.pop() + } + + const firstLineSearch = searchLines[0].trim() + const lastLineSearch = searchLines[searchLines.length - 1].trim() + const searchBlockSize = searchLines.length + + // Find the line number where startIndex falls + let startLineNum = 0 + let currentIndex = 0 + while (currentIndex < startIndex && startLineNum < originalLines.length) { + currentIndex += originalLines[startLineNum].length + 1 + startLineNum++ + } + + // Look for matching start and end anchors + for (let i = startLineNum; i <= originalLines.length - searchBlockSize; i++) { + // Check if first line matches + if (originalLines[i].trim() !== firstLineSearch) { + continue + } + + // Check if last line matches at the expected position + if (originalLines[i + searchBlockSize - 1].trim() !== lastLineSearch) { + continue + } + + // Calculate exact character positions + let matchStartIndex = 0 + for (let k = 0; k < i; k++) { + matchStartIndex += originalLines[k].length + 1 + } + + let matchEndIndex = matchStartIndex + for (let k = 0; k < searchBlockSize; k++) { + matchEndIndex += originalLines[i + k].length + 1 + } + + return [matchStartIndex, matchEndIndex] + } + + return false +} + +/** + * This function reconstructs the file content by applying a streamed diff (in a + * specialized SEARCH/REPLACE block format) to the original file content. It is designed + * to handle both incremental updates and the final resulting file after all chunks have + * been processed. + * + * The diff format is a custom structure that uses three markers to define changes: + * + * ------- SEARCH + * [Exact content to find in the original file] + * ======= + * [Content to replace with] + * +++++++ REPLACE + * + * Behavior and Assumptions: + * 1. The file is processed chunk-by-chunk. Each chunk of `diffContent` may contain + * partial or complete SEARCH/REPLACE blocks. By calling this function with each + * incremental chunk (with `isFinal` indicating the last chunk), the final reconstructed + * file content is produced. + * + * 2. Matching Strategy (in order of attempt): + * a. Exact Match: First attempts to find the exact SEARCH block text in the original file + * b. Line-Trimmed Match: Falls back to line-by-line comparison ignoring leading/trailing whitespace + * c. Block Anchor Match: For blocks of 3+ lines, tries to match using first/last lines as anchors + * If all matching strategies fail, an error is thrown. + * + * 3. Empty SEARCH Section: + * - If SEARCH is empty and the original file is empty, this indicates creating a new file + * (pure insertion). + * - If SEARCH is empty and the original file is not empty, this indicates a complete + * file replacement (the entire original content is considered matched and replaced). + * + * 4. Applying Changes: + * - Before encountering the "=======" marker, lines are accumulated as search content. + * - After "=======" and before ">>>>>>> REPLACE", lines are accumulated as replacement content. + * - Once the block is complete (">>>>>>> REPLACE"), the matched section in the original + * file is replaced with the accumulated replacement lines, and the position in the original + * file is advanced. + * + * 5. Incremental Output: + * - As soon as the match location is found and we are in the REPLACE section, each new + * replacement line is appended to the result so that partial updates can be viewed + * incrementally. + * + * 6. Partial Markers: + * - If the final line of the chunk looks like it might be part of a marker but is not one + * of the known markers, it is removed. This prevents incomplete or partial markers + * from corrupting the output. + * + * 7. Finalization: + * - Once all chunks have been processed (when `isFinal` is true), any remaining original + * content after the last replaced section is appended to the result. + * - Trailing newlines are not forcibly added. The code tries to output exactly what is specified. + * + * Errors: + * - If the search block cannot be matched using any of the available matching strategies, + * an error is thrown. + */ +export async function constructNewFileContent( + diffContent: string, + originalContent: string, + isFinal: boolean, + version: "v1" | "v2" = "v1", +): Promise { + const constructor = constructNewFileContentVersionMapping[version] + if (!constructor) { + throw new Error(`Invalid version '${version}' for file content constructor`) + } + return constructor(diffContent, originalContent, isFinal) +} + +const constructNewFileContentVersionMapping: Record< + string, + (diffContent: string, originalContent: string, isFinal: boolean) => Promise +> = { + v1: constructNewFileContentV1, + v2: constructNewFileContentV2, +} as const + +/** + * @deprecated + */ +async function constructNewFileContentV1(diffContent: string, originalContent: string, isFinal: boolean): Promise { + let result = "" + let lastProcessedIndex = 0 + + let currentSearchContent = "" + let currentReplaceContent = "" + let inSearch = false + let inReplace = false + + let searchMatchIndex = -1 + let searchEndIndex = -1 + + let lines = diffContent.split("\n") + + // If the last line looks like a partial marker but isn't recognized, + // remove it because it might be incomplete. + const lastLine = lines[lines.length - 1] + if ( + lines.length > 0 && + (lastLine.startsWith(SEARCH_BLOCK_CHAR) || lastLine.startsWith("=") || lastLine.startsWith(REPLACE_BLOCK_CHAR)) && + lastLine !== SEARCH_BLOCK_START && + lastLine !== SEARCH_BLOCK_END && + lastLine !== REPLACE_BLOCK_END + ) { + lines.pop() + } + + for (const line of lines) { + if (line === SEARCH_BLOCK_START) { + inSearch = true + currentSearchContent = "" + currentReplaceContent = "" + continue + } + + if (line === SEARCH_BLOCK_END) { + inSearch = false + inReplace = true + + // Remove trailing linebreak for adding the === marker + // if (currentSearchContent.endsWith("\r\n")) { + // currentSearchContent = currentSearchContent.slice(0, -2) + // } else if (currentSearchContent.endsWith("\n")) { + // currentSearchContent = currentSearchContent.slice(0, -1) + // } + + if (!currentSearchContent) { + // Empty search block + if (originalContent.length === 0) { + // New file scenario: nothing to match, just start inserting + searchMatchIndex = 0 + searchEndIndex = 0 + } else { + // Complete file replacement scenario: treat the entire file as matched + searchMatchIndex = 0 + searchEndIndex = originalContent.length + } + } else { + // Add check for inefficient full-file search + // if (currentSearchContent.trim() === originalContent.trim()) { + // throw new Error( + // "The SEARCH block contains the entire file content. Please either:\n" + + // "1. Use an empty SEARCH block to replace the entire file, or\n" + + // "2. Make focused changes to specific parts of the file that need modification.", + // ) + // } + + // Exact search match scenario + const exactIndex = originalContent.indexOf(currentSearchContent, lastProcessedIndex) + if (exactIndex !== -1) { + searchMatchIndex = exactIndex + searchEndIndex = exactIndex + currentSearchContent.length + } else { + // Attempt fallback line-trimmed matching + const lineMatch = lineTrimmedFallbackMatch(originalContent, currentSearchContent, lastProcessedIndex) + if (lineMatch) { + ;[searchMatchIndex, searchEndIndex] = lineMatch + } else { + // Try block anchor fallback for larger blocks + const blockMatch = blockAnchorFallbackMatch(originalContent, currentSearchContent, lastProcessedIndex) + if (blockMatch) { + ;[searchMatchIndex, searchEndIndex] = blockMatch + } else { + throw new Error( + `The SEARCH block:\n${currentSearchContent.trimEnd()}\n...does not match anything in the file or was searched out of order in the provided blocks.`, + ) + } + } + } + } + + // Output everything up to the match location + result += originalContent.slice(lastProcessedIndex, searchMatchIndex) + continue + } + + if (line === REPLACE_BLOCK_END) { + // Finished one replace block + + // // Remove the artificially added linebreak in the last line of the REPLACE block + // if (result.endsWith("\r\n")) { + // result = result.slice(0, -2) + // } else if (result.endsWith("\n")) { + // result = result.slice(0, -1) + // } + + // Advance lastProcessedIndex to after the matched section + lastProcessedIndex = searchEndIndex + + // Reset for next block + inSearch = false + inReplace = false + currentSearchContent = "" + currentReplaceContent = "" + searchMatchIndex = -1 + searchEndIndex = -1 + continue + } + + // Accumulate content for search or replace + // (currentReplaceContent is not being used for anything right now since we directly append to result.) + // (We artificially add a linebreak since we split on \n at the beginning. In order to not include a trailing linebreak in the final search/result blocks we need to remove it before using them. This allows for partial line matches to be correctly identified.) + // NOTE: search/replace blocks must be arranged in the order they appear in the file due to how we build the content using lastProcessedIndex. We also cannot strip the trailing newline since for non-partial lines it would remove the linebreak from the original content. (If we remove end linebreak from search, then we'd also have to remove it from replace but we can't know if it's a partial line or not since the model may be using the line break to indicate the end of the block rather than as part of the search content.) We require the model to output full lines in order for our fallbacks to work as well. + if (inSearch) { + currentSearchContent += line + "\n" + } else if (inReplace) { + currentReplaceContent += line + "\n" + // Output replacement lines immediately if we know the insertion point + if (searchMatchIndex !== -1) { + result += line + "\n" + } + } + } + + // If this is the final chunk, append any remaining original content + if (isFinal && lastProcessedIndex < originalContent.length) { + result += originalContent.slice(lastProcessedIndex) + } + + return result +} + +enum ProcessingState { + Idle = 0, + StateSearch = 1 << 0, + StateReplace = 1 << 1, +} + +class NewFileContentConstructor { + private originalContent: string + private isFinal: boolean + private state: number + private pendingNonStandardLines: string[] + private result: string + private lastProcessedIndex: number + private currentSearchContent: string + private currentReplaceContent: string + private searchMatchIndex: number + private searchEndIndex: number + + constructor(originalContent: string, isFinal: boolean) { + this.originalContent = originalContent + this.isFinal = isFinal + this.pendingNonStandardLines = [] + this.result = "" + this.lastProcessedIndex = 0 + this.state = ProcessingState.Idle + this.currentSearchContent = "" + this.currentReplaceContent = "" + this.searchMatchIndex = -1 + this.searchEndIndex = -1 + } + + private resetForNextBlock() { + // Reset for next block + this.state = ProcessingState.Idle + this.currentSearchContent = "" + this.currentReplaceContent = "" + this.searchMatchIndex = -1 + this.searchEndIndex = -1 + } + + private findLastMatchingLineIndex(regx: RegExp, lineLimit: number) { + for (let i = lineLimit; i > 0; ) { + i-- + if (this.pendingNonStandardLines[i].match(regx)) { + return i + } + } + return -1 + } + + private updateProcessingState(newState: ProcessingState) { + const isValidTransition = + (this.state === ProcessingState.Idle && newState === ProcessingState.StateSearch) || + (this.state === ProcessingState.StateSearch && newState === ProcessingState.StateReplace) + + if (!isValidTransition) { + throw new Error( + `Invalid state transition.\n` + + "Valid transitions are:\n" + + "- Idle → StateSearch\n" + + "- StateSearch → StateReplace", + ) + } + + this.state |= newState + } + + private isStateActive(state: ProcessingState): boolean { + return (this.state & state) === state + } + + private activateReplaceState() { + this.updateProcessingState(ProcessingState.StateReplace) + } + + private activateSearchState() { + this.updateProcessingState(ProcessingState.StateSearch) + this.currentSearchContent = "" + this.currentReplaceContent = "" + } + + private isSearchingActive(): boolean { + return this.isStateActive(ProcessingState.StateSearch) + } + + private isReplacingActive(): boolean { + return this.isStateActive(ProcessingState.StateReplace) + } + + private hasPendingNonStandardLines(pendingNonStandardLineLimit: number): boolean { + return this.pendingNonStandardLines.length - pendingNonStandardLineLimit < this.pendingNonStandardLines.length + } + + public processLine(line: string) { + this.internalProcessLine(line, true, this.pendingNonStandardLines.length) + } + + public getResult() { + // If this is the final chunk, append any remaining original content + if (this.isFinal && this.lastProcessedIndex < this.originalContent.length) { + this.result += this.originalContent.slice(this.lastProcessedIndex) + } + if (this.isFinal && this.state !== ProcessingState.Idle) { + throw new Error("File processing incomplete - SEARCH/REPLACE operations still active during finalization") + } + return this.result + } + + private internalProcessLine( + line: string, + canWritependingNonStandardLines: boolean, + pendingNonStandardLineLimit: number, + ): number { + let removeLineCount = 0 + if (line === SEARCH_BLOCK_START) { + removeLineCount = this.trimPendingNonStandardTrailingEmptyLines(pendingNonStandardLineLimit) + if (removeLineCount > 0) { + pendingNonStandardLineLimit = pendingNonStandardLineLimit - removeLineCount + } + if (this.hasPendingNonStandardLines(pendingNonStandardLineLimit)) { + this.tryFixSearchReplaceBlock(pendingNonStandardLineLimit) + canWritependingNonStandardLines && (this.pendingNonStandardLines.length = 0) + } + this.activateSearchState() + } else if (line === SEARCH_BLOCK_END) { + // 校验非标内容 + if (!this.isSearchingActive()) { + this.tryFixSearchBlock(pendingNonStandardLineLimit) + canWritependingNonStandardLines && (this.pendingNonStandardLines.length = 0) + } + this.activateReplaceState() + this.beforeReplace() + } else if (line === REPLACE_BLOCK_END) { + if (!this.isReplacingActive()) { + this.tryFixReplaceBlock(pendingNonStandardLineLimit) + canWritependingNonStandardLines && (this.pendingNonStandardLines.length = 0) + } + this.lastProcessedIndex = this.searchEndIndex + this.resetForNextBlock() + } else { + // Accumulate content for search or replace + // (currentReplaceContent is not being used for anything right now since we directly append to result.) + // (We artificially add a linebreak since we split on \n at the beginning. In order to not include a trailing linebreak in the final search/result blocks we need to remove it before using them. This allows for partial line matches to be correctly identified.) + // NOTE: search/replace blocks must be arranged in the order they appear in the file due to how we build the content using lastProcessedIndex. We also cannot strip the trailing newline since for non-partial lines it would remove the linebreak from the original content. (If we remove end linebreak from search, then we'd also have to remove it from replace but we can't know if it's a partial line or not since the model may be using the line break to indicate the end of the block rather than as part of the search content.) We require the model to output full lines in order for our fallbacks to work as well. + if (this.isReplacingActive()) { + this.currentReplaceContent += line + "\n" + // Output replacement lines immediately if we know the insertion point + if (this.searchMatchIndex !== -1) { + this.result += line + "\n" + } + } else if (this.isSearchingActive()) { + this.currentSearchContent += line + "\n" + } else { + let appendToPendingNonStandardLines = canWritependingNonStandardLines + if (appendToPendingNonStandardLines) { + // 处理非标内容 + this.pendingNonStandardLines.push(line) + } + } + } + return removeLineCount + } + + private beforeReplace() { + // Remove trailing linebreak for adding the === marker + // if (currentSearchContent.endsWith("\r\n")) { + // currentSearchContent = currentSearchContent.slice(0, -2) + // } else if (currentSearchContent.endsWith("\n")) { + // currentSearchContent = currentSearchContent.slice(0, -1) + // } + + if (!this.currentSearchContent) { + // Empty search block + if (this.originalContent.length === 0) { + // New file scenario: nothing to match, just start inserting + this.searchMatchIndex = 0 + this.searchEndIndex = 0 + } else { + // Complete file replacement scenario: treat the entire file as matched + this.searchMatchIndex = 0 + this.searchEndIndex = this.originalContent.length + } + } else { + // Add check for inefficient full-file search + // if (currentSearchContent.trim() === originalContent.trim()) { + // throw new Error( + // "The SEARCH block contains the entire file content. Please either:\n" + + // "1. Use an empty SEARCH block to replace the entire file, or\n" + + // "2. Make focused changes to specific parts of the file that need modification.", + // ) + // } + // Exact search match scenario + const exactIndex = this.originalContent.indexOf(this.currentSearchContent, this.lastProcessedIndex) + if (exactIndex !== -1) { + this.searchMatchIndex = exactIndex + this.searchEndIndex = exactIndex + this.currentSearchContent.length + } else { + // Attempt fallback line-trimmed matching + const lineMatch = lineTrimmedFallbackMatch( + this.originalContent, + this.currentSearchContent, + this.lastProcessedIndex, + ) + if (lineMatch) { + ;[this.searchMatchIndex, this.searchEndIndex] = lineMatch + } else { + // Try block anchor fallback for larger blocks + const blockMatch = blockAnchorFallbackMatch( + this.originalContent, + this.currentSearchContent, + this.lastProcessedIndex, + ) + if (blockMatch) { + ;[this.searchMatchIndex, this.searchEndIndex] = blockMatch + } else { + throw new Error( + `The SEARCH block:\n${this.currentSearchContent.trimEnd()}\n...does not match anything in the file.`, + ) + } + } + } + } + if (this.searchMatchIndex < this.lastProcessedIndex) { + throw new Error( + `The SEARCH block:\n${this.currentSearchContent.trimEnd()}\n...matched an incorrect content in the file.`, + ) + } + // Output everything up to the match location + this.result += this.originalContent.slice(this.lastProcessedIndex, this.searchMatchIndex) + } + + private tryFixSearchBlock(lineLimit: number): number { + let removeLineCount = 0 + if (lineLimit < 0) { + lineLimit = this.pendingNonStandardLines.length + } + if (!lineLimit) { + throw new Error("Invalid SEARCH/REPLACE block structure - no lines available to process") + } + let searchTagRegexp = /^[-]{3,} SEARCH$/ + const searchTagIndex = this.findLastMatchingLineIndex(searchTagRegexp, lineLimit) + if (searchTagIndex !== -1) { + let fixLines = this.pendingNonStandardLines.slice(searchTagIndex, lineLimit) + fixLines[0] = SEARCH_BLOCK_START + for (const line of fixLines) { + removeLineCount += this.internalProcessLine(line, false, searchTagIndex) + } + } else { + throw new Error( + `Invalid REPLACE marker detected - could not find matching SEARCH block starting from line ${searchTagIndex + 1}`, + ) + } + return removeLineCount + } + + private tryFixReplaceBlock(lineLimit: number): number { + let removeLineCount = 0 + if (lineLimit < 0) { + lineLimit = this.pendingNonStandardLines.length + } + if (!lineLimit) { + throw new Error() + } + let replaceBeginTagRegexp = /^[=]{3,}$/ + const replaceBeginTagIndex = this.findLastMatchingLineIndex(replaceBeginTagRegexp, lineLimit) + if (replaceBeginTagIndex !== -1) { + // // 校验非标内容 + // if (!this.isSearchingActive()) { + // removeLineCount += this.tryFixSearchBlock(replaceBeginTagIndex) + // } + let fixLines = this.pendingNonStandardLines.slice(replaceBeginTagIndex - removeLineCount, lineLimit - removeLineCount) + fixLines[0] = SEARCH_BLOCK_END + for (const line of fixLines) { + removeLineCount += this.internalProcessLine(line, false, replaceBeginTagIndex - removeLineCount) + } + } else { + throw new Error(`Malformed REPLACE block - missing valid separator after line ${replaceBeginTagIndex + 1}`) + } + return removeLineCount + } + + private tryFixSearchReplaceBlock(lineLimit: number): number { + let removeLineCount = 0 + if (lineLimit < 0) { + lineLimit = this.pendingNonStandardLines.length + } + if (!lineLimit) { + throw new Error() + } + + let replaceEndTagRegexp = /^[+]{3,} REPLACE$/ + const replaceEndTagIndex = this.findLastMatchingLineIndex(replaceEndTagRegexp, lineLimit) + const likeReplaceEndTag = replaceEndTagIndex === lineLimit - 1 + if (likeReplaceEndTag) { + // // 校验非标内容 + // if (!this.isReplacingActive()) { + // removeLineCount += this.tryFixReplaceBlock(replaceEndTagIndex) + // } + let fixLines = this.pendingNonStandardLines.slice(replaceEndTagIndex - removeLineCount, lineLimit - removeLineCount) + fixLines[fixLines.length - 1] = REPLACE_BLOCK_END + for (const line of fixLines) { + removeLineCount += this.internalProcessLine(line, false, replaceEndTagIndex - removeLineCount) + } + } else { + throw new Error("Malformed SEARCH/REPLACE block structure: Missing valid closing REPLACE marker") + } + return removeLineCount + } + + /** + * Removes trailing empty lines from the pendingNonStandardLines array + * @param lineLimit - The index to start checking from (exclusive). + * Removes empty lines from lineLimit-1 backwards. + * @returns The number of empty lines removed + */ + private trimPendingNonStandardTrailingEmptyLines(lineLimit: number): number { + let removedCount = 0 + let i = Math.min(lineLimit, this.pendingNonStandardLines.length) - 1 + + while (i >= 0 && this.pendingNonStandardLines[i].trim() === "") { + this.pendingNonStandardLines.pop() + removedCount++ + i-- + } + + return removedCount + } +} + +export async function constructNewFileContentV2(diffContent: string, originalContent: string, isFinal: boolean): Promise { + let newFileContentConstructor = new NewFileContentConstructor(originalContent, isFinal) + + let lines = diffContent.split("\n") + + // If the last line looks like a partial marker but isn't recognized, + // remove it because it might be incomplete. + const lastLine = lines[lines.length - 1] + if ( + lines.length > 0 && + (lastLine.startsWith(SEARCH_BLOCK_CHAR) || lastLine.startsWith("=") || lastLine.startsWith(REPLACE_BLOCK_CHAR)) && + lastLine !== SEARCH_BLOCK_START && + lastLine !== SEARCH_BLOCK_END && + lastLine !== REPLACE_BLOCK_END + ) { + lines.pop() + } + + for (const line of lines) { + newFileContentConstructor.processLine(line) + } + + let result = newFileContentConstructor.getResult() + return result +} diff --git a/evals/diff_editing/helpers.ts b/evals/diff_editing/helpers.ts new file mode 100644 index 00000000..63ccd6d0 --- /dev/null +++ b/evals/diff_editing/helpers.ts @@ -0,0 +1,25 @@ +import { Anthropic } from "@anthropic-ai/sdk" + +const formatImagesIntoBlocks = (images?: string[]): Anthropic.ImageBlockParam[] => { + return images + ? images.map((dataUrl) => { + // data:image/png;base64,base64string + const [rest, base64] = dataUrl.split(",") + const mimeType = rest.split(":")[1].split(";")[0] + return { + type: "image", + source: { + type: "base64", + media_type: mimeType, + data: base64, + }, + } as Anthropic.ImageBlockParam + }) + : [] +} + +export const formatResponse = { + imageBlocks: (images?: string[]): Anthropic.ImageBlockParam[] => { + return formatImagesIntoBlocks(images) + }, +} diff --git a/evals/diff_editing/parsing/parse-assistant-message-06-06-25.ts b/evals/diff_editing/parsing/parse-assistant-message-06-06-25.ts new file mode 100644 index 00000000..1c1241fe --- /dev/null +++ b/evals/diff_editing/parsing/parse-assistant-message-06-06-25.ts @@ -0,0 +1,1163 @@ +export type AssistantMessageContent = TextContent | ToolUse + +export interface TextContent { + type: "text" + content: string + partial: boolean +} + +export const toolUseNames = [ + "execute_command", + "read_file", + "write_to_file", + "replace_in_file", + "search_files", + "list_files", + "list_code_definition_names", + "browser_action", + "use_mcp_tool", + "access_mcp_resource", + "ask_followup_question", + "plan_mode_respond", + "load_mcp_documentation", + "attempt_completion", + "new_task", + "condense", + "report_bug", + "new_rule", + "web_fetch", +] as const + +// Converts array of tool call names into a union type ("execute_command" | "read_file" | ...) +export type ToolUseName = (typeof toolUseNames)[number] + +export const toolParamNames = [ + "command", + "requires_approval", + "path", + "content", + "diff", + "regex", + "file_pattern", + "recursive", + "action", + "url", + "coordinate", + "text", + "server_name", + "tool_name", + "arguments", + "uri", + "question", + "options", + "response", + "result", + "context", + "title", + "what_happened", + "steps_to_reproduce", + "api_request_output", + "additional_context", +] as const + +export type ToolParamName = (typeof toolParamNames)[number] + +export interface ToolUse { + type: "tool_use" + name: ToolUseName + // params is a partial record, allowing only some or none of the possible parameters to be used + params: Partial> + partial: boolean +} + +/** + * @description **Version 1** + * Parses an assistant message string potentially containing mixed text and tool usage blocks + * marked with XML-like tags into an array of structured content objects. + * + * This version iterates through the message character by character, building an accumulator string. + * It maintains state to track whether it's currently parsing text, a tool use block, or a specific tool parameter. + * It detects the start and end of tool uses and parameters by checking if the accumulator ends with + * the corresponding opening or closing tags. + * Special handling is included for `write_to_file` and `new_rule` tool uses to correctly parse + * the `content` parameter, which might contain the closing tag itself, by looking for the *last* + * occurrence of the closing tag. + * If the input string ends mid-tag or mid-content, the last block (text or tool use) is marked as partial. + * + * @param assistantMessage The raw string output from the assistant. + * @returns An array of `AssistantMessageContent` objects, which can be `TextContent` or `ToolUse`. + * Blocks that were not fully closed by the end of the input string will have their `partial` flag set to `true`. + */ +export function parseAssistantMessageV1(assistantMessage: string): AssistantMessageContent[] { + const contentBlocks: AssistantMessageContent[] = [] + let currentTextContent: TextContent | undefined = undefined + let currentTextContentStartIndex = 0 + let currentToolUse: ToolUse | undefined = undefined + let currentToolUseStartIndex = 0 + let currentParamName: ToolParamName | undefined = undefined + let currentParamValueStartIndex = 0 + let accumulator = "" + + for (let i = 0; i < assistantMessage.length; i++) { + const char = assistantMessage[i] + accumulator += char + + // --- State: Parsing a Tool Parameter --- + // there should not be a param without a tool use + if (currentToolUse && currentParamName) { + const currentParamValue = accumulator.slice(currentParamValueStartIndex) + const paramClosingTag = `` + if (currentParamValue.endsWith(paramClosingTag)) { + // End of param value found + currentToolUse.params[currentParamName] = currentParamValue.slice(0, -paramClosingTag.length).trim() + currentParamName = undefined // Go back to parsing tool content or looking for next param + continue // Move to next character + } else { + // Partial param value is accumulating + continue // Move to next character + } + } + + // --- State: Parsing a Tool Use (but not a specific parameter) --- + // no currentParamName + if (currentToolUse) { + const currentToolValue = accumulator.slice(currentToolUseStartIndex) + const toolUseClosingTag = `` + + if (currentToolValue.endsWith(toolUseClosingTag)) { + // End of a tool use found + currentToolUse.partial = false + contentBlocks.push(currentToolUse) + currentToolUse = undefined // Go back to parsing text or looking for next tool + // Reset text start index in case text follows immediately + currentTextContentStartIndex = i + 1 + continue // Move to next character + } else { + // Check if starting a new parameter within the current tool use + const possibleParamOpeningTags = toolParamNames.map((name) => `<${name}>`) + let foundParamStart = false + for (const paramOpeningTag of possibleParamOpeningTags) { + if (accumulator.endsWith(paramOpeningTag)) { + // Start of a new parameter found + currentParamName = paramOpeningTag.slice(1, -1) as ToolParamName + currentParamValueStartIndex = accumulator.length + foundParamStart = true + break + } + } + if (foundParamStart) { + continue // Move to next character + } + + // Special case for write_to_file/new_rule content param allowing nested tags + // Check if a tag appears, potentially indicating the end of the content param + // even if the main tool closing tag hasn't been seen yet. + const contentParamName: ToolParamName = "content" + if ( + (currentToolUse.name === "write_to_file" || currentToolUse.name === "new_rule") && + accumulator.endsWith(``) + ) { + const toolContent = accumulator.slice(currentToolUseStartIndex) + const contentStartTag = `<${contentParamName}>` + const contentEndTag = `` + const contentStartIndex = toolContent.indexOf(contentStartTag) + contentStartTag.length + // Use lastIndexOf to handle cases where might appear within the content itself + const contentEndIndex = toolContent.lastIndexOf(contentEndTag) + + // Ensure we found valid start/end tags and end is after start + if ( + contentStartIndex !== -1 && + contentEndIndex !== -1 && + contentEndIndex > contentStartIndex - contentStartTag.length // Ensure end tag is after start tag begins + ) { + // Check if this content param was already being parsed. If so, update it. + // If not, and we just found the closing tag, assign it. + // This handles cases where the detection might fire before + // the tag detection logic, or if the content is very short. + if (currentParamName === contentParamName) { + // Already parsing content, now we found the end tag + currentToolUse.params[contentParamName] = toolContent.slice(contentStartIndex, contentEndIndex).trim() + currentParamName = undefined // Finished with this param + } else if (currentParamName === undefined) { + // Not parsing a param, but found . Assume it closes the content block. + currentToolUse.params[contentParamName] = toolContent.slice(contentStartIndex, contentEndIndex).trim() + // We stay in the "parsing tool use" state, looking for more params or the tool end tag. + } + } + } + + // If none of the above, partial tool value is accumulating + continue // Move to next character + } + } + + // --- State: Parsing Text (or looking for start of a tool use) --- + // no currentToolUse + let didStartToolUse = false + const possibleToolUseOpeningTags = toolUseNames.map((name) => `<${name}>`) + for (const toolUseOpeningTag of possibleToolUseOpeningTags) { + if (accumulator.endsWith(toolUseOpeningTag)) { + // Start of a new tool use found + const toolName = toolUseOpeningTag.slice(1, -1) as ToolUseName + currentToolUse = { + type: "tool_use", + name: toolName, + params: {}, + partial: true, + } + currentToolUseStartIndex = accumulator.length + + // This also indicates the end of the current text content block (if any) + if (currentTextContent) { + currentTextContent.partial = false + // Extract text content, removing the part that formed the tool opening tag + const textEndIndex = accumulator.length - toolUseOpeningTag.length + currentTextContent.content = accumulator.slice(currentTextContentStartIndex, textEndIndex).trim() + // Only add if there's actual content + if (currentTextContent.content.length > 0) { + contentBlocks.push(currentTextContent) + } + currentTextContent = undefined + } else { + // Check if there was text before this tool use started + const textEndIndex = accumulator.length - toolUseOpeningTag.length + const potentialText = accumulator.slice(currentTextContentStartIndex, textEndIndex).trim() + if (potentialText.length > 0) { + contentBlocks.push({ + type: "text", + content: potentialText, + partial: false, // Ended because tool use started + }) + } + } + + didStartToolUse = true + break // Found tool start, stop checking for others + } + } + + if (!didStartToolUse) { + // No tool use started, so it must be text content accumulating + // (or continuing after a closed tool use) + if (currentTextContent === undefined) { + // Start of a new text block + currentTextContentStartIndex = i - (accumulator.length - currentTextContentStartIndex - 1) // Adjust start index based on how much we've accumulated since the last block ended or the beginning + // If accumulator starts from 0, start index is i + if (contentBlocks.length === 0 && currentToolUse === undefined) { + currentTextContentStartIndex = accumulator.length - 1 // i + } else { + // Re-calculate based on the actual start of the current text segment + // Find the end of the last block + let lastBlockEndIndex = 0 + if (contentBlocks.length > 0) { + const lastBlock = contentBlocks[contentBlocks.length - 1] + // Approximation: find where the accumulator matches the end of the message string representation of the last block. This is complex. + // Simpler: Assume text starts right after the last block ended implicitly at index i. + lastBlockEndIndex = i // Where the loop *was* when the last block finished processing + // Need a more robust way to track the end index of the *raw string* corresponding to the last block. + // Let's stick to the accumulator slice approach for simplicity in this version. + // The start index should be where the current *unmatched* text began. + let lastProcessedIndex = -1 + if (contentBlocks.length > 0) { + // This requires knowing the raw string length of the previous block, which V1 doesn't explicitly track easily. + // We'll approximate based on the current accumulator and start index logic. + // The issue arises if a tool tag was just closed. accumulator contains everything up to i. + // lastBlockEndIndex should point to the character *after* the closing tag of the last block. + } + // Reset start index to the beginning of the *current* potential text block + currentTextContentStartIndex = accumulator.length - 1 // Start accumulating from the current character `i` + } + + // If we just closed a tool, text starts *after* its closing tag + // The logic needs refinement here for accurate start index after a tool closure. + // Let's assume for now the start index logic inside the loop handles it via slicing. + } + + currentTextContent = { + type: "text", + content: "", // Content will be filled by slicing accumulator + partial: true, + } + } + // Update text content based on the accumulator from its start index + currentTextContent.content = accumulator.slice(currentTextContentStartIndex).trimStart() // Trim start to avoid leading space if text follows tool + } + } // End of loop + + // --- Finalization after loop --- + + // If a tool use was open at the end + if (currentToolUse) { + // If a parameter was open within that tool use + if (currentParamName) { + // The remaining accumulator content belongs to this partial parameter + currentToolUse.params[currentParamName] = accumulator.slice(currentParamValueStartIndex).trim() + } + // Add the potentially partial tool use block + contentBlocks.push(currentToolUse) + } + // If text content was being accumulated at the end + // Note: Only one of currentToolUse or currentTextContent can be defined here, + // as starting a tool use finalizes the preceding text block. + else if (currentTextContent) { + // Update content one last time + currentTextContent.content = accumulator.slice(currentTextContentStartIndex).trim() + // Add the potentially partial text block only if it contains content + if (currentTextContent.content.length > 0) { + contentBlocks.push(currentTextContent) + } + } + + return contentBlocks +} + +/** + * @description **Version 2** + * Parses an assistant message string potentially containing mixed text and tool usage blocks + * marked with XML-like tags into an array of structured content objects. + * + * This version aims for efficiency by avoiding the character-by-character accumulator of V1. + * It iterates through the string using an index `i`. At each position, it checks if the substring + * *ending* at `i` matches any known opening or closing tags for tools or parameters using `startsWith` + * with an offset. + * It uses pre-computed Maps (`toolUseOpenTags`, `toolParamOpenTags`) for quick tag lookups. + * State is managed using indices (`currentTextContentStart`, `currentToolUseStart`, `currentParamValueStart`) + * pointing to the start of the current block within the original `assistantMessage` string. + * Slicing is used to extract content only when a block (text, parameter, or tool use) is completed. + * Special handling for `write_to_file` and `new_rule` content parameters is included, using `indexOf` + * and `lastIndexOf` on the relevant slice to handle potentially nested closing tags. + * If the input string ends mid-block, the last open block is added and marked as partial. + * + * @param assistantMessage The raw string output from the assistant. + * @returns An array of `AssistantMessageContent` objects, which can be `TextContent` or `ToolUse`. + * Blocks that were not fully closed by the end of the input string will have their `partial` flag set to `true`. + */ +export function parseAssistantMessageV2(assistantMessage: string): AssistantMessageContent[] { + const contentBlocks: AssistantMessageContent[] = [] + let currentTextContentStart = 0 // Index where the current text block started + let currentTextContent: TextContent | undefined = undefined + let currentToolUseStart = 0 // Index *after* the opening tag of the current tool use + let currentToolUse: ToolUse | undefined = undefined + let currentParamValueStart = 0 // Index *after* the opening tag of the current param + let currentParamName: ToolParamName | undefined = undefined + + // Precompute tags for faster lookups + const toolUseOpenTags = new Map() + const toolParamOpenTags = new Map() + for (const name of toolUseNames) { + toolUseOpenTags.set(`<${name}>`, name) + } + for (const name of toolParamNames) { + toolParamOpenTags.set(`<${name}>`, name) + } + + const len = assistantMessage.length + for (let i = 0; i < len; i++) { + const currentCharIndex = i + + // --- State: Parsing a Tool Parameter --- + if (currentToolUse && currentParamName) { + const closeTag = `` + // Check if the string *ending* at index `i` matches the closing tag + if ( + currentCharIndex >= closeTag.length - 1 && + assistantMessage.startsWith( + closeTag, + currentCharIndex - closeTag.length + 1, // Start checking from potential start of tag + ) + ) { + // Found the closing tag for the parameter + const value = assistantMessage + .slice( + currentParamValueStart, // Start after the opening tag + currentCharIndex - closeTag.length + 1, // End before the closing tag + ) + .trim() + currentToolUse.params[currentParamName] = value + currentParamName = undefined // Go back to parsing tool content + // We don't continue loop here, need to check for tool close or other params at index i + } else { + continue // Still inside param value, move to next char + } + } + + // --- State: Parsing a Tool Use (but not a specific parameter) --- + if (currentToolUse && !currentParamName) { + // Ensure we are not inside a parameter already + // Check if starting a new parameter + let startedNewParam = false + for (const [tag, paramName] of toolParamOpenTags.entries()) { + if (currentCharIndex >= tag.length - 1 && assistantMessage.startsWith(tag, currentCharIndex - tag.length + 1)) { + currentParamName = paramName + currentParamValueStart = currentCharIndex + 1 // Value starts after the tag + startedNewParam = true + break + } + } + if (startedNewParam) { + continue // Handled start of param, move to next char + } + + // Check if closing the current tool use + const toolCloseTag = `` + if ( + currentCharIndex >= toolCloseTag.length - 1 && + assistantMessage.startsWith(toolCloseTag, currentCharIndex - toolCloseTag.length + 1) + ) { + // End of the tool use found + // Special handling for content params *before* finalizing the tool + const toolContentSlice = assistantMessage.slice( + currentToolUseStart, // From after the tool opening tag + currentCharIndex - toolCloseTag.length + 1, // To before the tool closing tag + ) + + // Check if content parameter needs special handling (write_to_file/new_rule) + // This check is important if the closing tag was missed by the parameter parsing logic + // (e.g., if content is empty or parsing logic prioritizes tool close) + const contentParamName: ToolParamName = "content" + if ( + currentToolUse.name === "write_to_file" /* || currentToolUse.name === "new_rule" */ && + toolContentSlice.includes(`<${contentParamName}>`) + ) { + const contentStartTag = `<${contentParamName}>` + const contentEndTag = `` + const contentStart = toolContentSlice.indexOf(contentStartTag) + // Use lastIndexOf for robustness against nested tags + const contentEnd = toolContentSlice.lastIndexOf(contentEndTag) + + if (contentStart !== -1 && contentEnd !== -1 && contentEnd > contentStart) { + const contentValue = toolContentSlice.slice(contentStart + contentStartTag.length, contentEnd).trim() + currentToolUse.params[contentParamName] = contentValue + } + } + + currentToolUse.partial = false // Mark as complete + contentBlocks.push(currentToolUse) + currentToolUse = undefined // Reset state + currentTextContentStart = currentCharIndex + 1 // Potential text starts after this tag + continue // Move to next char + } + // If not starting a param and not closing the tool, continue accumulating tool content implicitly + continue + } + + // --- State: Parsing Text / Looking for Tool Start --- + if (!currentToolUse) { + // Check if starting a new tool use + let startedNewTool = false + for (const [tag, toolName] of toolUseOpenTags.entries()) { + if (currentCharIndex >= tag.length - 1 && assistantMessage.startsWith(tag, currentCharIndex - tag.length + 1)) { + // End current text block if one was active + if (currentTextContent) { + currentTextContent.content = assistantMessage + .slice( + currentTextContentStart, // From where text started + currentCharIndex - tag.length + 1, // To before the tool tag starts + ) + .trim() + currentTextContent.partial = false // Ended because tool started + if (currentTextContent.content.length > 0) { + contentBlocks.push(currentTextContent) + } + currentTextContent = undefined + } else { + // Check for any text between the last block and this tag + const potentialText = assistantMessage + .slice( + currentTextContentStart, // From where text *might* have started + currentCharIndex - tag.length + 1, // To before the tool tag starts + ) + .trim() + if (potentialText.length > 0) { + contentBlocks.push({ + type: "text", + content: potentialText, + partial: false, + }) + } + } + + // Start the new tool use + currentToolUse = { + type: "tool_use", + name: toolName, + params: {}, + partial: true, // Assume partial until closing tag is found + } + currentToolUseStart = currentCharIndex + 1 // Tool content starts after the opening tag + startedNewTool = true + break + } + } + + if (startedNewTool) { + continue // Handled start of tool, move to next char + } + + // If not starting a tool, it must be text content + if (!currentTextContent) { + // Start a new text block if we aren't already in one + currentTextContentStart = currentCharIndex // Text starts at the current character + // Check if the current char is the start of potential text *immediately* after a tag + // This needs the previous state - simpler to let slicing handle it later. + // Resetting start index accurately is key. + // It should be the index *after* the last processed tag. + // The logic managing currentTextContentStart after closing tags handles this. + + currentTextContent = { + type: "text", + content: "", // Will be determined by slicing at the end or when a tool starts + partial: true, + } + } + // Continue accumulating text implicitly; content is extracted later. + } + } // End of loop + + // --- Finalization after loop --- + + // Finalize any open parameter within an open tool use + if (currentToolUse && currentParamName) { + currentToolUse.params[currentParamName] = assistantMessage + .slice(currentParamValueStart) // From param start to end of string + .trim() + // Tool use remains partial + } + + // Finalize any open tool use (which might contain the finalized partial param) + if (currentToolUse) { + // Tool use is partial because the loop finished before its closing tag + contentBlocks.push(currentToolUse) + } + // Finalize any trailing text content + // Only possible if a tool use wasn't open at the very end + else if (currentTextContent) { + currentTextContent.content = assistantMessage + .slice(currentTextContentStart) // From text start to end of string + .trim() + // Text is partial because the loop finished + if (currentTextContent.content.length > 0) { + contentBlocks.push(currentTextContent) + } + } + + return contentBlocks +} + +export function parseAssistantMessageV3(assistantMessage: string): AssistantMessageContent[] { + const contentBlocks: AssistantMessageContent[] = [] + let currentTextContentStart = 0 // Index where the current text block started + let currentTextContent: TextContent | undefined = undefined + let currentToolUseStart = 0 // Index *after* the opening tag of the current tool use + let currentToolUse: ToolUse | undefined = undefined + let currentParamValueStart = 0 // Index *after* the opening tag of the current param + let currentParamName: ToolParamName | undefined = undefined + + // Precompute tags for faster lookups + const toolUseOpenTags = new Map() + const toolParamOpenTags = new Map() + for (const name of toolUseNames) { + toolUseOpenTags.set(`<${name}>`, name) + } + for (const name of toolParamNames) { + toolParamOpenTags.set(`<${name}>`, name) + } + + // Function calls format detection + const isFunctionCallsOpen = "" + const isFunctionCallsClose = "" + const isInvokeStart = '' + const isInvokeClose = "" + const isParameterStart = '' + const isParameterClose = "" + + // Variables for function calls parsing + let inFunctionCalls = false + let currentInvokeName = "" + let currentParameterName = "" + + const len = assistantMessage.length + for (let i = 0; i < len; i++) { + const currentCharIndex = i + + // --- State: Parsing Function Calls --- + // Check for opening function_calls tag + if ( + !inFunctionCalls && + currentCharIndex >= isFunctionCallsOpen.length - 1 && + assistantMessage.startsWith(isFunctionCallsOpen, currentCharIndex - isFunctionCallsOpen.length + 1) + ) { + // End current text block if one was active + if (currentTextContent) { + currentTextContent.content = assistantMessage + .slice(currentTextContentStart, currentCharIndex - isFunctionCallsOpen.length + 1) + .trim() + currentTextContent.partial = false + if (currentTextContent.content.length > 0) { + contentBlocks.push(currentTextContent) + } + currentTextContent = undefined + } + + inFunctionCalls = true + continue + } + + // Check for invoke start within function_calls + if ( + inFunctionCalls && + currentInvokeName === "" && + !currentToolUse && // Don't create a new tool if we already have one + currentCharIndex >= isInvokeStart.length - 1 && + assistantMessage.startsWith(isInvokeStart, currentCharIndex - isInvokeStart.length + 1) + ) { + // Find the end of the invoke name + const nameEndPos = assistantMessage.indexOf(isInvokeEnd, currentCharIndex + 1) + if (nameEndPos !== -1) { + // Extract the invoke name + currentInvokeName = assistantMessage.slice(currentCharIndex + 1, nameEndPos) + i = nameEndPos + isInvokeEnd.length - 1 // Skip to after the '"> + + // If this is an LS invoke, create a list_files tool + if (currentInvokeName === "LS") { + currentToolUse = { + type: "tool_use", + name: "list_files", + params: {}, + partial: true, + } + } + + // If this is a Grep invoke, create a search_files tool + if (currentInvokeName === "Grep") { + currentToolUse = { + type: "tool_use", + name: "search_files", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "Bash") { + currentToolUse = { + type: "tool_use", + name: "execute_command", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "Read") { + currentToolUse = { + type: "tool_use", + name: "read_file", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "Write") { + currentToolUse = { + type: "tool_use", + name: "write_to_file", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "WebFetch") { + currentToolUse = { + type: "tool_use", + name: "web_fetch", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "AskQuestion") { + currentToolUse = { + type: "tool_use", + name: "ask_followup_question", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "UseMCPTool") { + currentToolUse = { + type: "tool_use", + name: "use_mcp_tool", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "AccessMCPResource") { + currentToolUse = { + type: "tool_use", + name: "access_mcp_resource", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "ListCodeDefinitionNames") { + currentToolUse = { + type: "tool_use", + name: "list_code_definition_names", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "PlanModeRespond") { + currentToolUse = { + type: "tool_use", + name: "plan_mode_respond", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "LoadMcpDocumentation") { + currentToolUse = { + type: "tool_use", + name: "load_mcp_documentation", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "AttemptCompletion") { + currentToolUse = { + type: "tool_use", + name: "attempt_completion", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "BrowserAction") { + currentToolUse = { + type: "tool_use", + name: "browser_action", + params: {}, + partial: true, + } + } + + if (currentInvokeName === "NewTask") { + currentToolUse = { + type: "tool_use", + name: "new_task", + params: {}, + partial: true, + } + } + + // If this is a MultiEdit invoke, create a replace_in_file tool + if (currentInvokeName === "MultiEdit") { + currentToolUse = { + type: "tool_use", + name: "replace_in_file", + params: {}, + partial: true, + } + } + + continue + } + } + + // Check for parameter start within invoke + if ( + inFunctionCalls && + currentInvokeName !== "" && + currentParameterName === "" && + currentCharIndex >= isParameterStart.length - 1 && + assistantMessage.startsWith(isParameterStart, currentCharIndex - isParameterStart.length + 1) + ) { + // Find the end of the parameter name + const nameEndPos = assistantMessage.indexOf(isParameterNameEnd, currentCharIndex + 1) + if (nameEndPos !== -1) { + // Extract the parameter name + currentParameterName = assistantMessage.slice(currentCharIndex + 1, nameEndPos) + currentParamValueStart = nameEndPos + isParameterNameEnd.length + i = nameEndPos + isParameterNameEnd.length - 1 // Skip to after the '">' + continue + } + } + + // Check for parameter end + if ( + inFunctionCalls && + currentInvokeName !== "" && + currentParameterName !== "" && + currentCharIndex >= isParameterClose.length - 1 && + assistantMessage.startsWith(isParameterClose, currentCharIndex - isParameterClose.length + 1) + ) { + // Extract parameter value + const value = assistantMessage.slice(currentParamValueStart, currentCharIndex - isParameterClose.length + 1).trim() + + // Map parameter to tool params + if (currentToolUse && currentInvokeName === "LS" && currentParameterName === "path") { + currentToolUse.params["path"] = value + // Default recursive to false - only show top level + currentToolUse.params["recursive"] = "false" + } + + if (currentToolUse && currentInvokeName === "Read" && currentParameterName === "file_path") { + currentToolUse.params["path"] = value + } + + if (currentToolUse && currentInvokeName === "PlanModeRespond" && currentParameterName === "response") { + currentToolUse.params["response"] = value + } + + if (currentToolUse && currentInvokeName === "WebFetch" && currentParameterName === "url") { + currentToolUse.params["url"] = value + } + + if (currentToolUse && currentInvokeName === "ListCodeDefinitionNames" && currentParameterName === "path") { + currentToolUse.params["path"] = value + } + + if (currentToolUse && currentInvokeName === "NewTask" && currentParameterName === "context") { + currentToolUse.params["context"] = value + } + + // Map parameter to tool params for Grep + if (currentToolUse && currentInvokeName === "Grep") { + if (currentParameterName === "pattern") { + currentToolUse.params["regex"] = value + } else if (currentParameterName === "path") { + currentToolUse.params["path"] = value + } else if (currentParameterName === "include") { + currentToolUse.params["file_pattern"] = value + } + } + + if (currentToolUse && currentInvokeName === "Bash") { + if (currentParameterName === "command") { + currentToolUse.params["command"] = value + } else if (currentParameterName === "requires_approval") { + currentToolUse.params["requires_approval"] = value === "true" ? "true" : "false" + } + } + + if (currentToolUse && currentInvokeName === "Write") { + if (currentParameterName === "file_path") { + currentToolUse.params["path"] = value + } else if (currentParameterName === "content") { + currentToolUse.params["content"] = value + } + } + + if (currentToolUse && currentInvokeName === "AskQuestion") { + if (currentParameterName === "question") { + currentToolUse.params["question"] = value + } else if (currentParameterName === "options") { + currentToolUse.params["options"] = value + } + } + + if (currentToolUse && currentInvokeName === "UseMCPTool") { + if (currentParameterName === "server_name") { + currentToolUse.params["server_name"] = value + } else if (currentParameterName === "tool_name") { + currentToolUse.params["tool_name"] = value + } else if (currentParameterName === "arguments") { + currentToolUse.params["arguments"] = value + } + } + + if (currentToolUse && currentInvokeName === "AccessMCPResource") { + if (currentParameterName === "server_name") { + currentToolUse.params["server_name"] = value + } else if (currentParameterName === "uri") { + currentToolUse.params["uri"] = value + } + } + + if (currentToolUse && currentInvokeName === "AttemptCompletion") { + if (currentParameterName === "result") { + currentToolUse.params["result"] = value + } + if (currentParameterName === "command") { + currentToolUse.params["command"] = value + } + } + + if (currentToolUse && currentInvokeName === "BrowserAction") { + if (currentParameterName === "action") { + currentToolUse.params["action"] = value + } else if (currentParameterName === "url") { + currentToolUse.params["url"] = value + } else if (currentParameterName === "coordinate") { + currentToolUse.params["coordinate"] = value + } else if (currentParameterName === "text") { + currentToolUse.params["text"] = value + } + } + + // Map parameter to tool params for MultiEdit + if (currentToolUse && currentInvokeName === "MultiEdit") { + if (currentParameterName === "file_path") { + currentToolUse.params["path"] = value + } else if (currentParameterName === "edits") { + // Save the value to the diff parameter for replace_in_file + currentToolUse.params["diff"] = value + } + } + + currentParameterName = "" + continue + } + + // Check for invoke end + if ( + inFunctionCalls && + currentInvokeName !== "" && + currentCharIndex >= isInvokeClose.length - 1 && + assistantMessage.startsWith(isInvokeClose, currentCharIndex - isInvokeClose.length + 1) + ) { + // If we have a tool use from this invoke, finalize it + if ( + currentToolUse && + (currentInvokeName === "LS" || + currentInvokeName === "Grep" || + currentInvokeName === "Bash" || + currentInvokeName === "Read" || + currentInvokeName === "Write" || + currentInvokeName === "WebFetch" || + currentInvokeName === "AskQuestion" || + currentInvokeName === "UseMCPTool" || + currentInvokeName === "AccessMCPResource" || + currentInvokeName === "ListCodeDefinitionNames" || + currentInvokeName === "PlanModeRespond" || + currentInvokeName === "LoadMcpDocumentation" || + currentInvokeName === "AttemptCompletion" || + currentInvokeName === "BrowserAction" || + currentInvokeName === "NewTask" || + currentInvokeName === "MultiEdit") + ) { + currentToolUse.partial = false + contentBlocks.push(currentToolUse) + currentToolUse = undefined + } + currentInvokeName = "" + continue + } + + // Check for function_calls end + if ( + inFunctionCalls && + currentCharIndex >= isFunctionCallsClose.length - 1 && + assistantMessage.startsWith(isFunctionCallsClose, currentCharIndex - isFunctionCallsClose.length + 1) + ) { + inFunctionCalls = false + currentTextContentStart = currentCharIndex + 1 + // Start a new text content block for any text after function_calls + currentTextContent = { + type: "text", + content: "", + partial: true, + } + continue + } + + // Skip normal parsing when inside function_calls + if (inFunctionCalls) { + continue + } + + // --- State: Parsing a Tool Parameter --- + if (currentToolUse && currentParamName) { + const closeTag = `` + // Check if the string *ending* at index `i` matches the closing tag + if ( + currentCharIndex >= closeTag.length - 1 && + assistantMessage.startsWith( + closeTag, + currentCharIndex - closeTag.length + 1, // Start checking from potential start of tag + ) + ) { + // Found the closing tag for the parameter + const value = assistantMessage + .slice( + currentParamValueStart, // Start after the opening tag + currentCharIndex - closeTag.length + 1, // End before the closing tag + ) + .trim() + currentToolUse.params[currentParamName] = value + currentParamName = undefined // Go back to parsing tool content + // We don't continue loop here, need to check for tool close or other params at index i + } else { + continue // Still inside param value, move to next char + } + } + + // --- State: Parsing a Tool Use (but not a specific parameter) --- + if (currentToolUse && !currentParamName) { + // Ensure we are not inside a parameter already + // Check if starting a new parameter + let startedNewParam = false + for (const [tag, paramName] of toolParamOpenTags.entries()) { + if (currentCharIndex >= tag.length - 1 && assistantMessage.startsWith(tag, currentCharIndex - tag.length + 1)) { + currentParamName = paramName + currentParamValueStart = currentCharIndex + 1 // Value starts after the tag + startedNewParam = true + break + } + } + if (startedNewParam) { + continue // Handled start of param, move to next char + } + + // Check if closing the current tool use + const toolCloseTag = `` + if ( + currentCharIndex >= toolCloseTag.length - 1 && + assistantMessage.startsWith(toolCloseTag, currentCharIndex - toolCloseTag.length + 1) + ) { + // End of the tool use found + // Special handling for content params *before* finalizing the tool + const toolContentSlice = assistantMessage.slice( + currentToolUseStart, // From after the tool opening tag + currentCharIndex - toolCloseTag.length + 1, // To before the tool closing tag + ) + + // Check if content parameter needs special handling (write_to_file/new_rule) + // This check is important if the closing tag was missed by the parameter parsing logic + // (e.g., if content is empty or parsing logic prioritizes tool close) + const contentParamName: ToolParamName = "content" + if ( + currentToolUse.name === "write_to_file" /* || currentToolUse.name === "new_rule" */ && + toolContentSlice.includes(`<${contentParamName}>`) + ) { + const contentStartTag = `<${contentParamName}>` + const contentEndTag = `` + const contentStart = toolContentSlice.indexOf(contentStartTag) + // Use lastIndexOf for robustness against nested tags + const contentEnd = toolContentSlice.lastIndexOf(contentEndTag) + + if (contentStart !== -1 && contentEnd !== -1 && contentEnd > contentStart) { + const contentValue = toolContentSlice.slice(contentStart + contentStartTag.length, contentEnd).trim() + currentToolUse.params[contentParamName] = contentValue + } + } + + currentToolUse.partial = false // Mark as complete + contentBlocks.push(currentToolUse) + currentToolUse = undefined // Reset state + currentTextContentStart = currentCharIndex + 1 // Potential text starts after this tag + continue // Move to next char + } + // If not starting a param and not closing the tool, continue accumulating tool content implicitly + continue + } + + // --- State: Parsing Text / Looking for Tool Start --- + if (!currentToolUse) { + // Check if starting a new tool use + let startedNewTool = false + for (const [tag, toolName] of toolUseOpenTags.entries()) { + if (currentCharIndex >= tag.length - 1 && assistantMessage.startsWith(tag, currentCharIndex - tag.length + 1)) { + // End current text block if one was active + if (currentTextContent) { + currentTextContent.content = assistantMessage + .slice( + currentTextContentStart, // From where text started + currentCharIndex - tag.length + 1, // To before the tool tag starts + ) + .trim() + currentTextContent.partial = false // Ended because tool started + if (currentTextContent.content.length > 0) { + contentBlocks.push(currentTextContent) + } + currentTextContent = undefined + } else { + // Check for any text between the last block and this tag + const potentialText = assistantMessage + .slice( + currentTextContentStart, // From where text *might* have started + currentCharIndex - tag.length + 1, // To before the tool tag starts + ) + .trim() + if (potentialText.length > 0) { + contentBlocks.push({ + type: "text", + content: potentialText, + partial: false, + }) + } + } + + // Start the new tool use + currentToolUse = { + type: "tool_use", + name: toolName, + params: {}, + partial: true, // Assume partial until closing tag is found + } + currentToolUseStart = currentCharIndex + 1 // Tool content starts after the opening tag + startedNewTool = true + break + } + } + + if (startedNewTool) { + continue // Handled start of tool, move to next char + } + + // If not starting a tool, it must be text content + if (!currentTextContent) { + // Start a new text block if we aren't already in one + currentTextContentStart = currentCharIndex // Text starts at the current character + // Check if the current char is the start of potential text *immediately* after a tag + // This needs the previous state - simpler to let slicing handle it later. + // Resetting start index accurately is key. + // It should be the index *after* the last processed tag. + // The logic managing currentTextContentStart after closing tags handles this. + + currentTextContent = { + type: "text", + content: "", // Will be determined by slicing at the end or when a tool starts + partial: true, + } + } + // Continue accumulating text implicitly; content is extracted later. + } + } // End of loop + + // --- Finalization after loop --- + + // Finalize any open parameter within an open tool use + if (currentToolUse && currentParamName) { + currentToolUse.params[currentParamName] = assistantMessage + .slice(currentParamValueStart) // From param start to end of string + .trim() + // Tool use remains partial + } + + // Finalize any open tool use (which might contain the finalized partial param) + if (currentToolUse) { + // Tool use is partial because the loop finished before its closing tag + contentBlocks.push(currentToolUse) + } + // Finalize any trailing text content + // Only possible if a tool use wasn't open at the very end + else if (currentTextContent) { + currentTextContent.content = assistantMessage + .slice(currentTextContentStart) // From text start to end of string + .trim() + // Text is partial because the loop finished + if (currentTextContent.content.length > 0) { + contentBlocks.push(currentTextContent) + } + } + + return contentBlocks +} diff --git a/evals/diff_editing/prompts/basicSystemPrompt-06-06-25.ts b/evals/diff_editing/prompts/basicSystemPrompt-06-06-25.ts new file mode 100644 index 00000000..2452afa7 --- /dev/null +++ b/evals/diff_editing/prompts/basicSystemPrompt-06-06-25.ts @@ -0,0 +1,615 @@ +/** + * Use all standard prompt values to construct prompt + */ +export const basicSystemPrompt = ( + cwdFormatted: string, + supportsBrowserUse: boolean, + browserWidth: number, + browserHeight: number, + os: string, + shell: string, + homeFormatted: string, + mcpHubString: string, + userCustomInstructions: string, +) => { + return `You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. + +==== + +TOOL USE + +You have access to a set of tools that are executed upon the user's approval. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use. + +# Tool Use Formatting + +Tool use is formatted using XML-style tags. The tool name is enclosed in opening and closing tags, and each parameter is similarly enclosed within its own set of tags. Here's the structure: + + +value1 +value2 +... + + +For example: + + +src/main.js + + +Always adhere to this format for the tool use to ensure proper parsing and execution. + +# Tools + +## execute_command +Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Commands will be executed in the current working directory: ${cwdFormatted} +Parameters: +- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. +- requires_approval: (required) A boolean indicating whether this command requires explicit user approval before execution in case the user has auto-approve mode enabled. Set to 'true' for potentially impactful operations like installing/uninstalling packages, deleting/overwriting files, system configuration changes, network operations, or any commands that could have unintended side effects. Set to 'false' for safe operations like reading files/directories, running development servers, building projects, and other non-destructive operations. +Usage: + +Your command here +true or false + + +## read_file +Description: Request to read the contents of a file at the specified path. Use this when you need to examine the contents of an existing file you do not know the contents of, for example to analyze code, review text files, or extract information from configuration files. Automatically extracts raw text from PDF and DOCX files. May not be suitable for other types of binary files, as it returns the raw content as a string. +Parameters: +- path: (required) The path of the file to read (relative to the current working directory ${cwdFormatted}) +Usage: + +File path here + + +## write_to_file +Description: Request to write content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. This tool will automatically create any directories needed to write the file. +Parameters: +- path: (required) The path of the file to write to (relative to the current working directory ${cwdFormatted}) +- content: (required) The content to write to the file. ALWAYS provide the COMPLETE intended content of the file, without any truncation or omissions. You MUST include ALL parts of the file, even if they haven't been modified. +Usage: + +File path here + +Your file content here + + + +## replace_in_file +Description: Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file. +Parameters: +- path: (required) The path of the file to modify (relative to the current working directory ${cwdFormatted}) +- diff: (required) One or more SEARCH/REPLACE blocks following this exact format: + \`\`\` + ------- SEARCH + [exact content to find] + ======= + [new content to replace with] + +++++++ REPLACE + \`\`\` + Critical rules: + 1. SEARCH content must match the associated file section to find EXACTLY: + * Match character-for-character including whitespace, indentation, line endings + * Include all comments, docstrings, etc. + 2. SEARCH/REPLACE blocks will ONLY replace the first match occurrence. + * Including multiple unique SEARCH/REPLACE blocks if you need to make multiple changes. + * Include *just* enough lines in each SEARCH section to uniquely match each set of lines that need to change. + * When using multiple SEARCH/REPLACE blocks, list them in the order they appear in the file. + 3. Keep SEARCH/REPLACE blocks concise: + * Break large SEARCH/REPLACE blocks into a series of smaller blocks that each change a small portion of the file. + * Include just the changing lines, and a few surrounding lines if needed for uniqueness. + * Do not include long runs of unchanging lines in SEARCH/REPLACE blocks. + * Each line must be complete. Never truncate lines mid-way through as this can cause matching failures. + 4. Special operations: + * To move code: Use two SEARCH/REPLACE blocks (one to delete from original + one to insert at new location) + * To delete code: Use empty REPLACE section +Usage: + +File path here + +Search and replace blocks here + + + + +## search_files +Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. +Parameters: +- path: (required) The path of the directory to search in (relative to the current working directory ${cwdFormatted}). This directory will be recursively searched. +- regex: (required) The regular expression pattern to search for. Uses Rust regex syntax. +- file_pattern: (optional) Glob pattern to filter files (e.g., '*.ts' for TypeScript files). If not provided, it will search all files (*). +Usage: + +Directory path here +Your regex pattern here +file pattern here (optional) + + +## list_files +Description: Request to list files and directories within the specified directory. If recursive is true, it will list all files and directories recursively. If recursive is false or not provided, it will only list the top-level contents. Do not use this tool to confirm the existence of files you may have created, as the user will let you know if the files were created successfully or not. +Parameters: +- path: (required) The path of the directory to list contents for (relative to the current working directory ${cwdFormatted}) +- recursive: (optional) Whether to list files recursively. Use true for recursive listing, false or omit for top-level only. +Usage: + +Directory path here +true or false (optional) + + +## list_code_definition_names +Description: Request to list definition names (classes, functions, methods, etc.) used in source code files at the top level of the specified directory. This tool provides insights into the codebase structure and important constructs, encapsulating high-level concepts and relationships that are crucial for understanding the overall architecture. +Parameters: +- path: (required) The path of the directory (relative to the current working directory ${cwdFormatted}) to list top level source code definitions for. +Usage: + +Directory path here +${ + supportsBrowserUse + ? ` + +## browser_action +Description: Request to interact with a Puppeteer-controlled browser. Every action, except \`close\`, will be responded to with a screenshot of the browser's current state, along with any new console logs. You may only perform one browser action per message, and wait for the user's response including a screenshot and logs to determine the next action. +- The sequence of actions **must always start with** launching the browser at a URL, and **must always end with** closing the browser. If you need to visit a new URL that is not possible to navigate to from the current webpage, you must first close the browser, then launch again at the new URL. +- While the browser is active, only the \`browser_action\` tool can be used. No other tools should be called during this time. You may proceed to use other tools only after closing the browser. For example if you run into an error and need to fix a file, you must close the browser, then use other tools to make the necessary changes, then re-launch the browser to verify the result. +- The browser window has a resolution of **${browserWidth}x${browserHeight}** pixels. When performing any click actions, ensure the coordinates are within this resolution range. +- Before clicking on any elements such as icons, links, or buttons, you must consult the provided screenshot of the page to determine the coordinates of the element. The click should be targeted at the **center of the element**, not on its edges. +Parameters: +- action: (required) The action to perform. The available actions are: + * launch: Launch a new Puppeteer-controlled browser instance at the specified URL. This **must always be the first action**. + - Use with the \`url\` parameter to provide the URL. + - Ensure the URL is valid and includes the appropriate protocol (e.g. http://localhost:3000/page, file:///path/to/file.html, etc.) + * click: Click at a specific x,y coordinate. + - Use with the \`coordinate\` parameter to specify the location. + - Always click in the center of an element (icon, button, link, etc.) based on coordinates derived from a screenshot. + * type: Type a string of text on the keyboard. You might use this after clicking on a text field to input text. + - Use with the \`text\` parameter to provide the string to type. + * scroll_down: Scroll down the page by one page height. + * scroll_up: Scroll up the page by one page height. + * close: Close the Puppeteer-controlled browser instance. This **must always be the final browser action**. + - Example: \`close\` +- url: (optional) Use this for providing the URL for the \`launch\` action. + * Example: https://example.com +- coordinate: (optional) The X and Y coordinates for the \`click\` action. Coordinates should be within the **${browserWidth}x${browserHeight}** resolution. + * Example: 450,300 +- text: (optional) Use this for providing the text for the \`type\` action. + * Example: Hello, world! +Usage: + +Action to perform (e.g., launch, click, type, scroll_down, scroll_up, close) +URL to launch the browser at (optional) +x,y coordinates (optional) +Text to type (optional) +` + : "" + } + +## use_mcp_tool +Description: Request to use a tool provided by a connected MCP server. Each MCP server can provide multiple tools with different capabilities. Tools have defined input schemas that specify required and optional parameters. +Parameters: +- server_name: (required) The name of the MCP server providing the tool +- tool_name: (required) The name of the tool to execute +- arguments: (required) A JSON object containing the tool's input parameters, following the tool's input schema +Usage: + +server name here +tool name here + +{ + "param1": "value1", + "param2": "value2" +} + + + +## access_mcp_resource +Description: Request to access a resource provided by a connected MCP server. Resources represent data sources that can be used as context, such as files, API responses, or system information. +Parameters: +- server_name: (required) The name of the MCP server providing the resource +- uri: (required) The URI identifying the specific resource to access +Usage: + +server name here +resource URI here + + +## ask_followup_question +Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +Parameters: +- question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. +- options: (optional) An array of 2-5 options for the user to choose from. Each option should be a string describing a possible answer. You may not always need to provide options, but it may be helpful in many cases where it can save the user from having to type out a response manually. IMPORTANT: NEVER include an option to toggle to Act mode, as this would be something you need to direct the user to do manually themselves if needed. +Usage: + +Your question here + +Array of options here (optional), e.g. ["Option 1", "Option 2", "Option 3"] + + + +## attempt_completion +Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. Optionally you may provide a CLI command to showcase the result of your work. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again. +IMPORTANT NOTE: This tool CANNOT be used until you've confirmed from the user that any previous tool uses were successful. Failure to do so will result in code corruption and system failure. Before using this tool, you must ask yourself in tags if you've confirmed from the user that any previous tool uses were successful. If not, then DO NOT use this tool. +Parameters: +- result: (required) The result of the task. Formulate this result in a way that is final and does not require further input from the user. Don't end your result with questions or offers for further assistance. +- command: (optional) A CLI command to execute to show a live demo of the result to the user. For example, use \`open index.html\` to display a created html website, or \`open localhost:3000\` to display a locally running development server. But DO NOT use commands like \`echo\` or \`cat\` that merely print text. This command should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. +Usage: + + +Your final result description here + +Command to demonstrate result (optional) + + +## new_task +Description: Request to create a new task with preloaded context covering the conversation with the user up to this point and key information for continuing with the new task. With this tool, you will create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions, with a focus on the most relevant information required for the new task. +Among other important areas of focus, this summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing with the new task. The user will be presented with a preview of your generated context and can choose to create a new task or keep chatting in the current conversation. The user may choose to start a new task at any point. +Parameters: +- Context: (required) The context to preload the new task with. If applicable based on the current task, this should include: + 1. Current Work: Describe in detail what was being worked on prior to this request to create a new task. Pay special attention to the more recent messages / conversation. + 2. Key Technical Concepts: List all important technical concepts, technologies, coding conventions, and frameworks discussed, which might be relevant for the new task. + 3. Relevant Files and Code: If applicable, enumerate specific files and code sections examined, modified, or created for the task continuation. Pay special attention to the most recent messages and changes. + 4. Problem Solving: Document problems solved thus far and any ongoing troubleshooting efforts. + 5. Pending Tasks and Next Steps: Outline all pending tasks that you have explicitly been asked to work on, as well as list the next steps you will take for all outstanding work, if applicable. Include code snippets where they add clarity. For any next steps, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no information loss in context between tasks. It's important to be detailed here. +Usage: + +context to preload new task with + + +## plan_mode_respond +Description: Respond to the user's inquiry in an effort to plan a solution to the user's task. This tool should be used when you need to provide a response to a question or statement from the user about how you plan to accomplish the task. This tool is only available in PLAN MODE. The environment_details will specify the current mode, if it is not PLAN MODE then you should not use this tool. Depending on the user's message, you may ask questions to get clarification about the user's request, architect a solution to the task, and to brainstorm ideas with the user. For example, if the user's task is to create a website, you may start by asking some clarifying questions, then present a detailed plan for how you will accomplish the task given the context, and perhaps engage in a back and forth to finalize the details before the user switches you to ACT MODE to implement the solution. +Parameters: +- response: (required) The response to provide to the user. Do not try to use tools in this parameter, this is simply a chat response. (You MUST use the response parameter, do not simply place the response text directly within tags.) +Usage: + +Your response here + + +## load_mcp_documentation +Description: Load documentation about creating MCP servers. This tool should be used when the user requests to create or install an MCP server (the user may ask you something along the lines of "add a tool" that does some function, in other words to create an MCP server that provides tools and resources that may connect to external APIs for example. You have the ability to create an MCP server and add it to a configuration file that will then expose the tools and resources for you to use with \`use_mcp_tool\` and \`access_mcp_resource\`). The documentation provides detailed information about the MCP server creation process, including setup instructions, best practices, and examples. +Parameters: None +Usage: + + + +# Tool Use Examples + +## Example 1: Requesting to execute a command + + +npm run dev +false + + +## Example 2: Requesting to create a new file + + +src/frontend-config.json + +{ + "apiEndpoint": "https://api.example.com", + "theme": { + "primaryColor": "#007bff", + "secondaryColor": "#6c757d", + "fontFamily": "Arial, sans-serif" + }, + "features": { + "darkMode": true, + "notifications": true, + "analytics": false + }, + "version": "1.0.0" +} + + + +## Example 3: Creating a new task + + + +1. Current Work: + [Detailed description] + +2. Key Technical Concepts: + - [Concept 1] + - [Concept 2] + - [...] + +3. Relevant Files and Code: + - [File Name 1] + - [Summary of why this file is important] + - [Summary of the changes made to this file, if any] + - [Important Code Snippet] + - [File Name 2] + - [Important Code Snippet] + - [...] + +4. Problem Solving: + [Detailed description] + +5. Pending Tasks and Next Steps: + - [Task 1 details & next steps] + - [Task 2 details & next steps] + - [...] + + + +## Example 4: Requesting to make targeted edits to a file + + +src/components/App.tsx + +------- SEARCH +import React from 'react'; +======= +import React, { useState } from 'react'; ++++++++ REPLACE + +------- SEARCH +function handleSubmit() { + saveData(); + setLoading(false); +} + +======= ++++++++ REPLACE + +------- SEARCH +return ( +
+======= +function handleSubmit() { + saveData(); + setLoading(false); +} + +return ( +
++++++++ REPLACE + + + + +## Example 5: Requesting to use an MCP tool + + +weather-server +get_forecast + +{ + "city": "San Francisco", + "days": 5 +} + + + +## Example 6: Another example of using an MCP tool (where the server name is a unique identifier such as a URL) + + +github.com/modelcontextprotocol/servers/tree/main/src/github +create_issue + +{ + "owner": "octocat", + "repo": "hello-world", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "labels": ["bug", "help wanted"], + "assignees": ["octocat"] +} + + + +# Tool Use Guidelines + +1. In tags, assess what information you already have and what information you need to proceed with the task. +2. Choose the most appropriate tool based on the task and the tool descriptions provided. Assess if you need additional information to proceed, and which of the available tools would be most effective for gathering this information. For example using the list_files tool is more effective than running a command like \`ls\` in the terminal. It's critical that you think about each available tool and use the one that best fits the current step in the task. +3. If multiple actions are needed, use one tool at a time per message to accomplish the task iteratively, with each tool use being informed by the result of the previous tool use. Do not assume the outcome of any tool use. Each step must be informed by the previous step's result. +4. Formulate your tool use using the XML format specified for each tool. +5. After each tool use, the user will respond with the result of that tool use. This result will provide you with the necessary information to continue your task or make further decisions. This response may include: + - Information about whether the tool succeeded or failed, along with any reasons for failure. + - Linter errors that may have arisen due to the changes you made, which you'll need to address. + - New terminal output in reaction to the changes, which you may need to consider or act upon. + - Any other relevant feedback or information related to the tool use. +6. ALWAYS wait for user confirmation after each tool use before proceeding. Never assume the success of a tool use without explicit confirmation of the result from the user. + +It is crucial to proceed step-by-step, waiting for the user's message after each tool use before moving forward with the task. This approach allows you to: +1. Confirm the success of each step before proceeding. +2. Address any issues or errors that arise immediately. +3. Adapt your approach based on new information or unexpected results. +4. Ensure that each action builds correctly on the previous ones. + +By waiting for and carefully considering the user's response after each tool use, you can react accordingly and make informed decisions about how to proceed with the task. This iterative process helps ensure the overall success and accuracy of your work. + +==== + +MCP SERVERS + +The Model Context Protocol (MCP) enables communication between the system and locally running MCP servers that provide additional tools and resources to extend your capabilities. + +# Connected MCP Servers + +When a server is connected, you can use the server's tools via the \`use_mcp_tool\` tool, and access the server's resources via the \`access_mcp_resource\` tool. + +${mcpHubString} + +==== + +EDITING FILES + +You have access to two tools for working with files: **write_to_file** and **replace_in_file**. Understanding their roles and selecting the right one for the job will help ensure efficient and accurate modifications. + +# write_to_file + +## Purpose + +- Create a new file, or overwrite the entire contents of an existing file. + +## When to Use + +- Initial file creation, such as when scaffolding a new project. +- Overwriting large boilerplate files where you want to replace the entire content at once. +- When the complexity or number of changes would make replace_in_file unwieldy or error-prone. +- When you need to completely restructure a file's content or change its fundamental organization. + +## Important Considerations + +- Using write_to_file requires providing the file's complete final content. +- If you only need to make small changes to an existing file, consider using replace_in_file instead to avoid unnecessarily rewriting the entire file. +- While write_to_file should not be your default choice, don't hesitate to use it when the situation truly calls for it. + +# replace_in_file + +## Purpose + +- Make targeted edits to specific parts of an existing file without overwriting the entire file. + +## When to Use + +- Small, localized changes like updating a few lines, function implementations, changing variable names, modifying a section of text, etc. +- Targeted improvements where only specific portions of the file's content needs to be altered. +- Especially useful for long files where much of the file will remain unchanged. + +## Advantages + +- More efficient for minor edits, since you don't need to supply the entire file content. +- Reduces the chance of errors that can occur when overwriting large files. + +# Choosing the Appropriate Tool + +- **Default to replace_in_file** for most changes. It's the safer, more precise option that minimizes potential issues. +- **Use write_to_file** when: + - Creating new files + - The changes are so extensive that using replace_in_file would be more complex or risky + - You need to completely reorganize or restructure a file + - The file is relatively small and the changes affect most of its content + - You're generating boilerplate or template files + +# Auto-formatting Considerations + +- After using either write_to_file or replace_in_file, the user's editor may automatically format the file +- This auto-formatting may modify the file contents, for example: + - Breaking single lines into multiple lines + - Adjusting indentation to match project style (e.g. 2 spaces vs 4 spaces vs tabs) + - Converting single quotes to double quotes (or vice versa based on project preferences) + - Organizing imports (e.g. sorting, grouping by type) + - Adding/removing trailing commas in objects and arrays + - Enforcing consistent brace style (e.g. same-line vs new-line) + - Standardizing semicolon usage (adding or removing based on style) +- The write_to_file and replace_in_file tool responses will include the final state of the file after any auto-formatting +- Use this final state as your reference point for any subsequent edits. This is ESPECIALLY important when crafting SEARCH blocks for replace_in_file which require the content to match what's in the file exactly. + +# Workflow Tips + +1. Before editing, assess the scope of your changes and decide which tool to use. +2. For targeted edits, apply replace_in_file with carefully crafted SEARCH/REPLACE blocks. If you need multiple changes, you can stack multiple SEARCH/REPLACE blocks within a single replace_in_file call. +3. For major overhauls or initial file creation, rely on write_to_file. +4. Once the file has been edited with either write_to_file or replace_in_file, the system will provide you with the final state of the modified file. Use this updated content as the reference point for any subsequent SEARCH/REPLACE operations, since it reflects any auto-formatting or user-applied changes. +By thoughtfully selecting between write_to_file and replace_in_file, you can make your file editing process smoother, safer, and more efficient. + +==== + +ACT MODE V.S. PLAN MODE + +In each user message, the environment_details will specify the current mode. There are two modes: + +- ACT MODE: In this mode, you have access to all tools EXCEPT the plan_mode_respond tool. + - In ACT MODE, you use tools to accomplish the user's task. Once you've completed the user's task, you use the attempt_completion tool to present the result of the task to the user. +- PLAN MODE: In this special mode, you have access to the plan_mode_respond tool. + - In PLAN MODE, the goal is to gather information and get context to create a detailed plan for accomplishing the task, which the user will review and approve before they switch you to ACT MODE to implement the solution. + - In PLAN MODE, when you need to converse with the user or present a plan, you should use the plan_mode_respond tool to deliver your response directly, rather than using tags to analyze when to respond. Do not talk about using plan_mode_respond - just use it directly to share your thoughts and provide helpful answers. + +## What is PLAN MODE? + +- While you are usually in ACT MODE, the user may switch to PLAN MODE in order to have a back and forth with you to plan how to best accomplish the task. +- When starting in PLAN MODE, depending on the user's request, you may need to do some information gathering e.g. using read_file or search_files to get more context about the task. You may also ask the user clarifying questions to get a better understanding of the task. You may return mermaid diagrams to visually display your understanding. +- Once you've gained more context about the user's request, you should architect a detailed plan for how you will accomplish the task. Returning mermaid diagrams may be helpful here as well. +- Then you might ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. +- If at any point a mermaid diagram would make your plan clearer to help the user quickly see the structure, you are encouraged to include a Mermaid code block in the response. (Note: if you use colors in your mermaid diagrams, be sure to use high contrast colors so the text is readable.) +- Finally once it seems like you've reached a good plan, ask the user to switch you back to ACT MODE to implement the solution. + +==== + +CAPABILITIES + +- You have access to tools that let you execute CLI commands on the user's computer, list files, view source code definitions, regex search${ + supportsBrowserUse ? ", use the browser" : "" + }, read and edit files, and ask follow-up questions. These tools help you effectively accomplish a wide range of tasks, such as writing code, making edits or improvements to existing files, understanding the current state of a project, performing system operations, and much more. +- When the user initially gives you a task, a recursive list of all filepaths in the current working directory ('${cwdFormatted}') will be included in environment_details. This provides an overview of the project's file structure, offering key insights into the project from directory/file names (how developers conceptualize and organize their code) and file extensions (the language used). This can also guide decision-making on which files to explore further. If you need to further explore directories such as outside the current working directory, you can use the list_files tool. If you pass 'true' for the recursive parameter, it will list files recursively. Otherwise, it will list files at the top level, which is better suited for generic directories where you don't necessarily need the nested structure, like the Desktop. +- You can use search_files to perform regex searches across files in a specified directory, outputting context-rich results that include surrounding lines. This is particularly useful for understanding code patterns, finding specific implementations, or identifying areas that need refactoring. +- You can use the list_code_definition_names tool to get an overview of source code definitions for all files at the top level of a specified directory. This can be particularly useful when you need to understand the broader context and relationships between certain parts of the code. You may need to call this tool multiple times to understand various parts of the codebase related to the task. + - For example, when asked to make edits or improvements you might analyze the file structure in the initial environment_details to get an overview of the project, then use list_code_definition_names to get further insight using source code definitions for files located in relevant directories, then read_file to examine the contents of relevant files, analyze the code and suggest improvements or make necessary edits, then use the replace_in_file tool to implement changes. If you refactored code that could affect other parts of the codebase, you could use search_files to ensure you update other files as needed. +- You can use the execute_command tool to run commands on the user's computer whenever you feel it can help accomplish the user's task. When you need to execute a CLI command, you must provide a clear explanation of what the command does. Prefer to execute complex CLI commands over creating executable scripts, since they are more flexible and easier to run. Interactive and long-running commands are allowed, since the commands are run in the user's VSCode terminal. The user may keep commands running in the background and you will be kept updated on their status along the way. Each command you execute is run in a new terminal instance.${ + supportsBrowserUse + ? "\n- You can use the browser_action tool to interact with websites (including html files and locally running development servers) through a Puppeteer-controlled browser when you feel it is necessary in accomplishing the user's task. This tool is particularly useful for web development tasks as it allows you to launch a browser, navigate to pages, interact with elements through clicks and keyboard input, and capture the results through screenshots and console logs. This tool may be useful at key stages of web development tasks-such as after implementing new features, making substantial changes, when troubleshooting issues, or to verify the result of your work. You can analyze the provided screenshots to ensure correct rendering or identify errors, and review console logs for runtime issues.\n - For example, if asked to add a component to a react website, you might create the necessary files, use execute_command to run the site locally, then use browser_action to launch the browser, navigate to the local server, and verify the component renders & functions correctly before closing the browser." + : "" + } +- You have access to MCP servers that may provide additional tools and resources. Each server may provide different capabilities that you can use to accomplish tasks more effectively. +- You can use LaTeX syntax in your responses to render mathematical expressions + +==== + +RULES + +- Your current working directory is: ${cwdFormatted} +- You cannot \`cd\` into a different directory to complete a task. You are stuck operating from '${cwdFormatted}', so be sure to pass in the correct 'path' parameter when using tools that require a path. +- Do not use the ~ character or $HOME to refer to the home directory. +- Before using the execute_command tool, you must first think about the SYSTEM INFORMATION context provided to understand the user's environment and tailor your commands to ensure they are compatible with their system. You must also consider if the command you need to run should be executed in a specific directory outside of the current working directory '${cwdFormatted}', and if so prepend with \`cd\`'ing into that directory && then executing the command (as one command since you are stuck operating from '${cwdFormatted}'). For example, if you needed to run \`npm install\` in a project outside of '${cwdFormatted}', you would need to prepend with a \`cd\` i.e. pseudocode for this would be \`cd (path to project) && (command, in this case npm install)\`. +- When using the search_files tool, craft your regex patterns carefully to balance specificity and flexibility. Based on the user's task you may use it to find code patterns, TODO comments, function definitions, or any text-based information across the project. The results include context, so analyze the surrounding code to better understand the matches. Leverage the search_files tool in combination with other tools for more comprehensive analysis. For example, use it to find specific code patterns, then use read_file to examine the full context of interesting matches before using replace_in_file to make informed changes. +- When creating a new project (such as an app, website, or any software project), organize all new files within a dedicated project directory unless the user specifies otherwise. Use appropriate file paths when creating files, as the write_to_file tool will automatically create any necessary directories. Structure the project logically, adhering to best practices for the specific type of project being created. Unless otherwise specified, new projects should be easily run without additional setup, for example most projects can be built in HTML, CSS, and JavaScript - which you can open in a browser. +- Be sure to consider the type of project (e.g. Python, JavaScript, web application) when determining the appropriate structure and files to include. Also consider what files may be most relevant to accomplishing the task, for example looking at a project's manifest file would help you understand the project's dependencies, which you could incorporate into any code you write. +- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices. +- When you want to modify a file, use the replace_in_file or write_to_file tool directly with the desired changes. You do not need to display the changes before using the tool. +- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively. When you've completed your task, you must use the attempt_completion tool to present the result to the user. The user may provide feedback, which you can use to make improvements and try again. +- You are only allowed to ask the user questions using the ask_followup_question tool. Use this tool only when you need additional details to complete a task, and be sure to use a clear and concise question that will help you move forward with the task. However if you can use the available tools to avoid having to ask the user questions, you should do so. For example, if the user mentions a file that may be in an outside directory like the Desktop, you should use the list_files tool to list the files in the Desktop and check if the file they are talking about is there, rather than asking the user to provide the file path themselves. +- When executing commands, if you don't see the expected output, assume the terminal executed the command successfully and proceed with the task. The user's terminal may be unable to stream the output back properly. If you absolutely need to see the actual terminal output, use the ask_followup_question tool to request the user to copy and paste it back to you. +- The user may provide a file's contents directly in their message, in which case you shouldn't use the read_file tool to get the file contents again since you already have it. +- Your goal is to try to accomplish the user's task, NOT engage in a back and forth conversation.${ + supportsBrowserUse + ? `\n- The user may ask generic non-development tasks, such as "what\'s the latest news" or "look up the weather in San Diego", in which case you might use the browser_action tool to complete the task if it makes sense to do so, rather than trying to create a website or using curl to answer the question. However, if an available MCP server tool or resource can be used instead, you should prefer to use it over browser_action.` + : "" + } +- NEVER end attempt_completion result with a question or request to engage in further conversation! Formulate the end of your result in a way that is final and does not require further input from the user. +- You are STRICTLY FORBIDDEN from starting your messages with "Great", "Certainly", "Okay", "Sure". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say "Great, I've updated the CSS" but instead something like "I've updated the CSS". It is important you be clear and technical in your messages. +- When presented with images, utilize your vision capabilities to thoroughly examine them and extract meaningful information. Incorporate these insights into your thought process as you accomplish the user's task. +- At the end of each user message, you will automatically receive environment_details. This information is not written by the user themselves, but is auto-generated to provide potentially relevant context about the project structure and environment. While this information can be valuable for understanding the project context, do not treat it as a direct part of the user's request or response. Use it to inform your actions and decisions, but don't assume the user is explicitly asking about or referring to this information unless they clearly do so in their message. When using environment_details, explain your actions clearly to ensure the user understands, as they may not be aware of these details. +- Before executing commands, check the "Actively Running Terminals" section in environment_details. If present, consider how these active processes might impact your task. For example, if a local development server is already running, you wouldn't need to start it again. If no active terminals are listed, proceed with command execution as normal. +- When using the replace_in_file tool, you must include complete lines in your SEARCH blocks, not partial lines. The system requires exact line matches and cannot match partial lines. For example, if you want to match a line containing "const x = 5;", your SEARCH block must include the entire line, not just "x = 5" or other fragments. +- When using the replace_in_file tool, if you use multiple SEARCH/REPLACE blocks, list them in the order they appear in the file. For example if you need to make changes to both line 10 and line 50, first include the SEARCH/REPLACE block for line 10, followed by the SEARCH/REPLACE block for line 50. +- When using the replace_in_file tool, Do NOT add extra characters to the markers (e.g., ------- SEARCH> is INVALID). Do NOT forget to use the closing +++++++ REPLACE marker. Do NOT modify the marker format in any way. Malformed XML will cause complete tool failure and break the entire editing process. +- It is critical you wait for the user's response after each tool use, in order to confirm the success of the tool use. For example, if asked to make a todo app, you would create a file, wait for the user's response it was created successfully, then create another file if needed, wait for the user's response it was created successfully, etc.${ + supportsBrowserUse + ? " Then if you want to test your work, you might use browser_action to launch the site, wait for the user's response confirming the site was launched along with a screenshot, then perhaps e.g., click a button to test functionality if needed, wait for the user's response confirming the button was clicked along with a screenshot of the new state, before finally closing the browser." + : "" + } +- MCP operations should be used one at a time, similar to other tool usage. Wait for confirmation of success before proceeding with additional operations. + +==== + +SYSTEM INFORMATION + +Operating System: ${os} +Default Shell: ${shell} +Home Directory: ${homeFormatted} +Current Working Directory: ${cwdFormatted} + +==== + +OBJECTIVE + +You accomplish a given task iteratively, breaking it down into clear steps and working through them methodically. + +1. Analyze the user's task and set clear, achievable goals to accomplish it. Prioritize these goals in a logical order. +2. Work through these goals sequentially, utilizing available tools one at a time as necessary. Each goal should correspond to a distinct step in your problem-solving process. You will be informed on the work completed and what's remaining as you go. +3. Remember, you have extensive capabilities with access to a wide range of tools that can be used in powerful and clever ways as necessary to accomplish each goal. Before calling a tool, do some analysis within tags. First, analyze the file structure provided in environment_details to gain context and insights for proceeding effectively. Then, think about which of the provided tools is the most relevant tool to accomplish the user's task. Next, go through each of the required parameters of the relevant tool and determine if the user has directly provided or given enough information to infer a value. When deciding if the parameter can be inferred, carefully consider all the context to see if it supports a specific value. If all of the required parameters are present or can be reasonably inferred, close the thinking tag and proceed with the tool use. BUT, if one of the values for a required parameter is missing, DO NOT invoke the tool (not even with fillers for the missing params) and instead, ask the user to provide the missing parameters using the ask_followup_question tool. DO NOT ask for more information on optional parameters if it is not provided. +4. Once you've completed the user's task, you must use the attempt_completion tool to present the result of the task to the user. You may also provide a CLI command to showcase the result of your task; this can be particularly useful for web development tasks, where you can run e.g. \`open index.html\` to show the website you've built. +5. The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance. +${ + userCustomInstructions + ? `\n +==== + +USER'S CUSTOM INSTRUCTIONS + +The following additional instructions are provided by the user, and should be followed to the best of your ability without interfering with the TOOL USE guidelines. + +${userCustomInstructions}` + : "" +}` +} diff --git a/evals/diff_editing/prompts/claude4SystemPrompt-06-06-25.ts b/evals/diff_editing/prompts/claude4SystemPrompt-06-06-25.ts new file mode 100644 index 00000000..40084c6d --- /dev/null +++ b/evals/diff_editing/prompts/claude4SystemPrompt-06-06-25.ts @@ -0,0 +1,640 @@ +/** + * Use all standard prompt values to construct prompt + */ +export const claude4SystemPrompt = ( + cwdFormatted: string, + supportsBrowserUse: boolean, + browserWidth: number, + browserHeight: number, + os: string, + shell: string, + homeFormatted: string, + mcpHubString: string, + userCustomInstructions: string, +) => { + return `You are Cline, a highly skilled software engineer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices. + +==== + +TOOL USE + +You have access to a set of tools that are executed upon the user's approval. You can use one tool per message, and will receive the result of that tool use in the user's response. You use tools step-by-step to accomplish a given task, with each tool use informed by the result of the previous tool use. + +# Tool Use Formatting + +Tool use is formatted using XML-style tags. The tool name is enclosed in opening and closing tags, and each parameter is similarly enclosed within its own set of tags. Here's the structure: + + +value1 +value2 +... + + +For example: + + +src/main.js + + +Always adhere to this format for the tool use to ensure proper parsing and execution. + +# Tools + +## execute_command +Description: Request to execute a CLI command on the system. Use this when you need to perform system operations or run specific commands to accomplish any step in the user's task. You must tailor your command to the user's system and provide a clear explanation of what the command does. For command chaining, use the appropriate chaining syntax for the user's shell. Prefer to execute complex CLI commands over creating executable scripts, as they are more flexible and easier to run. Commands will be executed in the current working directory: ${cwdFormatted} +Parameters: +- command: (required) The CLI command to execute. This should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. +- requires_approval: (required) A boolean indicating whether this command requires explicit user approval before execution in case the user has auto-approve mode enabled. Set to 'true' for potentially impactful operations like installing/uninstalling packages, deleting/overwriting files, system configuration changes, network operations, or any commands that could have unintended side effects. Set to 'false' for safe operations like reading files/directories, running development servers, building projects, and other non-destructive operations. +Usage: + +Your command here +true or false + + +## read_file +Description: Request to read the contents of a file at the specified path. Use this when you need to examine the contents of an existing file you do not know the contents of, for example to analyze code, review text files, or extract information from configuration files. Automatically extracts raw text from PDF and DOCX files. May not be suitable for other types of binary files, as it returns the raw content as a string. +Parameters: +- path: (required) The path of the file to read (relative to the current working directory ${cwdFormatted}) +Usage: + +File path here + + +## write_to_file +Description: Request to write content to a file at the specified path. If the file exists, it will be overwritten with the provided content. If the file doesn't exist, it will be created. This tool will automatically create any directories needed to write the file. +Parameters: +- path: (required) The path of the file to write to (relative to the current working directory ${cwdFormatted}) +- content: (required) The content to write to the file. ALWAYS provide the COMPLETE intended content of the file, without any truncation or omissions. You MUST include ALL parts of the file, even if they haven't been modified. +Usage: + +File path here + +Your file content here + + + +## replace_in_file +Description: Request to replace sections of content in an existing file using SEARCH/REPLACE blocks that define exact changes to specific parts of the file. This tool should be used when you need to make targeted changes to specific parts of a file. +Parameters: +- path: (required) The path of the file to modify (relative to the current working directory ${cwdFormatted}) +- diff: (required) One or more SEARCH/REPLACE blocks following this exact format: + \`\`\` + ------- SEARCH + [exact content to find] + ======= + [new content to replace with] + +++++++ REPLACE + \`\`\` + Critical rules: + 1. SEARCH content must match the associated file section to find EXACTLY: + * Match character-for-character including whitespace, indentation, line endings + * Include all comments, docstrings, etc. + 2. SEARCH/REPLACE blocks will ONLY replace the first match occurrence. + * Including multiple unique SEARCH/REPLACE blocks if you need to make multiple changes. + * Include *just* enough lines in each SEARCH section to uniquely match each set of lines that need to change. + * When using multiple SEARCH/REPLACE blocks, list them in the order they appear in the file. + 3. Keep SEARCH/REPLACE blocks concise: + * Break large SEARCH/REPLACE blocks into a series of smaller blocks that each change a small portion of the file. + * Include just the changing lines, and a few surrounding lines if needed for uniqueness. + * Do not include long runs of unchanging lines in SEARCH/REPLACE blocks. + * Each line must be complete. Never truncate lines mid-way through as this can cause matching failures. + 4. Special operations: + * To move code: Use two SEARCH/REPLACE blocks (one to delete from original + one to insert at new location) + * To delete code: Use empty REPLACE section +Usage: + +File path here + +Search and replace blocks here + + + +## list_files +Description: Request to list files and directories within the specified directory. If recursive is true, it will list all files and directories recursively. If recursive is false or not provided, it will only list the top-level contents. Do not use this tool to confirm the existence of files you may have created, as the user will let you know if the files were created successfully or not. +Parameters: +- path: (required) The path of the directory to list contents for (relative to the current working directory ${cwdFormatted}) +- recursive: (optional) Whether to list files recursively. Use true for recursive listing, false or omit for top-level only. +Usage: + +Directory path here +true or false (optional) + + +## list_code_definition_names +Description: Request to list definition names (classes, functions, methods, etc.) used in source code files at the top level of the specified directory. This tool provides insights into the codebase structure and important constructs, encapsulating high-level concepts and relationships that are crucial for understanding the overall architecture. +Parameters: +- path: (required) The path of the directory (relative to the current working directory ${cwdFormatted}) to list top level source code definitions for. +Usage: + +Directory path here +${ + supportsBrowserUse + ? ` + +## browser_action +Description: Request to interact with a Puppeteer-controlled browser. Every action, except \`close\`, will be responded to with a screenshot of the browser's current state, along with any new console logs. You may only perform one browser action per message, and wait for the user's response including a screenshot and logs to determine the next action. +- The sequence of actions **must always start with** launching the browser at a URL, and **must always end with** closing the browser. If you need to visit a new URL that is not possible to navigate to from the current webpage, you must first close the browser, then launch again at the new URL. +- While the browser is active, only the \`browser_action\` tool can be used. No other tools should be called during this time. You may proceed to use other tools only after closing the browser. For example if you run into an error and need to fix a file, you must close the browser, then use other tools to make the necessary changes, then re-launch the browser to verify the result. +- The browser window has a resolution of **${browserWidth}x${browserHeight}** pixels. When performing any click actions, ensure the coordinates are within this resolution range. +- Before clicking on any elements such as icons, links, or buttons, you must consult the provided screenshot of the page to determine the coordinates of the element. The click should be targeted at the **center of the element**, not on its edges. +Parameters: +- action: (required) The action to perform. The available actions are: + * launch: Launch a new Puppeteer-controlled browser instance at the specified URL. This **must always be the first action**. + - Use with the \`url\` parameter to provide the URL. + - Ensure the URL is valid and includes the appropriate protocol (e.g. http://localhost:3000/page, file:///path/to/file.html, etc.) + * click: Click at a specific x,y coordinate. + - Use with the \`coordinate\` parameter to specify the location. + - Always click in the center of an element (icon, button, link, etc.) based on coordinates derived from a screenshot. + * type: Type a string of text on the keyboard. You might use this after clicking on a text field to input text. + - Use with the \`text\` parameter to provide the string to type. + * scroll_down: Scroll down the page by one page height. + * scroll_up: Scroll up the page by one page height. + * close: Close the Puppeteer-controlled browser instance. This **must always be the final browser action**. + - Example: \`close\` +- url: (optional) Use this for providing the URL for the \`launch\` action. + * Example: https://example.com +- coordinate: (optional) The X and Y coordinates for the \`click\` action. Coordinates should be within the **${browserWidth}x${browserHeight}** resolution. + * Example: 450,300 +- text: (optional) Use this for providing the text for the \`type\` action. + * Example: Hello, world! +Usage: + +Action to perform (e.g., launch, click, type, scroll_down, scroll_up, close) +URL to launch the browser at (optional) +x,y coordinates (optional) +Text to type (optional) +` + : "" + } + +## web_fetch +Description: Fetches content from a specified URL and processes into markdown +- Takes a URL as input +- Fetches the URL content, converts HTML to markdown +- Use this tool when you need to retrieve and analyze web content +- IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions. +- The URL must be a fully-formed valid URL +- HTTP URLs will be automatically upgraded to HTTPS +- This tool is read-only and does not modify any files +Parameters: +- url: (required) The URL to fetch content from +Usage: + +https://example.com/docs + + + +## use_mcp_tool +Description: Request to use a tool provided by a connected MCP server. Each MCP server can provide multiple tools with different capabilities. Tools have defined input schemas that specify required and optional parameters. +Parameters: +- server_name: (required) The name of the MCP server providing the tool +- tool_name: (required) The name of the tool to execute +- arguments: (required) A JSON object containing the tool's input parameters, following the tool's input schema +Usage: + +server name here +tool name here + +{ + "param1": "value1", + "param2": "value2" +} + + + +## access_mcp_resource +Description: Request to access a resource provided by a connected MCP server. Resources represent data sources that can be used as context, such as files, API responses, or system information. +Parameters: +- server_name: (required) The name of the MCP server providing the resource +- uri: (required) The URI identifying the specific resource to access +Usage: + +server name here +resource URI here + + +## search_files +Description: Request to perform a regex search across files in a specified directory, providing context-rich results. This tool searches for patterns or specific content across multiple files, displaying each match with encapsulating context. IMPORTANT NOTE: Use this tool sparingly, and opt to explore the codebase using the \`list_files\` and \`read_file\` tools instead. +Parameters: +- path: (required) The path of the directory to search in (relative to the current working directory ${cwdFormatted}). This directory will be recursively searched. +- regex: (required) The regular expression pattern to search for. Uses Rust regex syntax. +- file_pattern: (optional) Glob pattern to filter files (e.g., '*.ts' for TypeScript files). If not provided, it will search all files (*). +Usage: + +Directory path here +Your regex pattern here +file pattern here (optional) + + +## ask_followup_question +Description: Ask the user a question to gather additional information needed to complete the task. This tool should be used when you encounter ambiguities, need clarification, or require more details to proceed effectively. It allows for interactive problem-solving by enabling direct communication with the user. Use this tool judiciously to maintain a balance between gathering necessary information and avoiding excessive back-and-forth. +Parameters: +- question: (required) The question to ask the user. This should be a clear, specific question that addresses the information you need. +- options: (optional) An array of 2-5 options for the user to choose from. Each option should be a string describing a possible answer. You may not always need to provide options, but it may be helpful in many cases where it can save the user from having to type out a response manually. IMPORTANT: NEVER include an option to toggle to Act mode, as this would be something you need to direct the user to do manually themselves if needed. +Usage: + +Your question here + +Array of options here (optional), e.g. ["Option 1", "Option 2", "Option 3"] + + + +## attempt_completion +Description: After each tool use, the user will respond with the result of that tool use, i.e. if it succeeded or failed, along with any reasons for failure. Once you've received the results of tool uses and can confirm that the task is complete, use this tool to present the result of your work to the user. Optionally you may provide a CLI command to showcase the result of your work. The user may respond with feedback if they are not satisfied with the result, which you can use to make improvements and try again. +IMPORTANT NOTE: This tool CANNOT be used until you've confirmed from the user that any previous tool uses were successful. Failure to do so will result in code corruption and system failure. Before using this tool, you must ask yourself in tags if you've confirmed from the user that any previous tool uses were successful. If not, then DO NOT use this tool. +Parameters: +- result: (required) The result of the task. Formulate this result in a way that is final and does not require further input from the user. Don't end your result with questions or offers for further assistance. +- command: (optional) A CLI command to execute to show a live demo of the result to the user. For example, use \`open index.html\` to display a created html website, or \`open localhost:3000\` to display a locally running development server. But DO NOT use commands like \`echo\` or \`cat\` that merely print text. This command should be valid for the current operating system. Ensure the command is properly formatted and does not contain any harmful instructions. +Usage: + + +Your final result description here + +Command to demonstrate result (optional) + + +## new_task +Description: Request to create a new task with preloaded context covering the conversation with the user up to this point and key information for continuing with the new task. With this tool, you will create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions, with a focus on the most relevant information required for the new task. +Among other important areas of focus, this summary should be thorough in capturing technical details, code patterns, and architectural decisions that would be essential for continuing with the new task. The user will be presented with a preview of your generated context and can choose to create a new task or keep chatting in the current conversation. The user may choose to start a new task at any point. +Parameters: +- Context: (required) The context to preload the new task with. If applicable based on the current task, this should include: + 1. Current Work: Describe in detail what was being worked on prior to this request to create a new task. Pay special attention to the more recent messages / conversation. + 2. Key Technical Concepts: List all important technical concepts, technologies, coding conventions, and frameworks discussed, which might be relevant for the new task. + 3. Relevant Files and Code: If applicable, enumerate specific files and code sections examined, modified, or created for the task continuation. Pay special attention to the most recent messages and changes. + 4. Problem Solving: Document problems solved thus far and any ongoing troubleshooting efforts. + 5. Pending Tasks and Next Steps: Outline all pending tasks that you have explicitly been asked to work on, as well as list the next steps you will take for all outstanding work, if applicable. Include code snippets where they add clarity. For any next steps, include direct quotes from the most recent conversation showing exactly what task you were working on and where you left off. This should be verbatim to ensure there's no information loss in context between tasks. It's important to be detailed here. +Usage: + +context to preload new task with + + +## plan_mode_respond +Description: Respond to the user's inquiry in an effort to plan a solution to the user's task. This tool should be used when you need to provide a response to a question or statement from the user about how you plan to accomplish the task. This tool is only available in PLAN MODE. The environment_details will specify the current mode, if it is not PLAN MODE then you should not use this tool. Depending on the user's message, you may ask questions to get clarification about the user's request, architect a solution to the task, and to brainstorm ideas with the user. For example, if the user's task is to create a website, you may start by asking some clarifying questions, then present a detailed plan for how you will accomplish the task given the context, and perhaps engage in a back and forth to finalize the details before the user switches you to ACT MODE to implement the solution. IMPORTANT NOTE: You should NOT ask for permission to read files or explore the repo. Just do that proactively. This tool should only be used when you've already gathered enough information to make a plan, or if you have a question for the user. +Parameters: +- response: (required) The response to provide to the user. Do not try to use tools in this parameter, this is simply a chat response. (You MUST use the response parameter, do not simply place the response text directly within tags.) +Usage: + +Your response here + + +## load_mcp_documentation +Description: Load documentation about creating MCP servers. This tool should be used when the user requests to create or install an MCP server (the user may ask you something along the lines of "add a tool" that does some function, in other words to create an MCP server that provides tools and resources that may connect to external APIs for example. You have the ability to create an MCP server and add it to a configuration file that will then expose the tools and resources for you to use with \`use_mcp_tool\` and \`access_mcp_resource\`). The documentation provides detailed information about the MCP server creation process, including setup instructions, best practices, and examples. +Parameters: None +Usage: + + + +# Tool Use Examples + +## Example 1: Requesting to execute a command + + +npm run dev +false + + +## Example 2: Requesting to create a new file + + +src/frontend-config.json + +{ + "apiEndpoint": "https://api.example.com", + "theme": { + "primaryColor": "#007bff", + "secondaryColor": "#6c757d", + "fontFamily": "Arial, sans-serif" + }, + "features": { + "darkMode": true, + "notifications": true, + "analytics": false + }, + "version": "1.0.0" +} + + + +## Example 3: Creating a new task + + + +1. Current Work: + [Detailed description] + +2. Key Technical Concepts: + - [Concept 1] + - [Concept 2] + - [...] + +3. Relevant Files and Code: + - [File Name 1] + - [Summary of why this file is important] + - [Summary of the changes made to this file, if any] + - [Important Code Snippet] + - [File Name 2] + - [Important Code Snippet] + - [...] + +4. Problem Solving: + [Detailed description] + +5. Pending Tasks and Next Steps: + - [Task 1 details & next steps] + - [Task 2 details & next steps] + - [...] + + + +## Example 4: Requesting to make targeted edits to a file + + +src/components/App.tsx + +------- SEARCH +import React from 'react'; +======= +import React, { useState } from 'react'; ++++++++ REPLACE + +------- SEARCH +function handleSubmit() { + saveData(); + setLoading(false); +} + +======= ++++++++ REPLACE + +------- SEARCH +return ( +
+======= +function handleSubmit() { + saveData(); + setLoading(false); +} + +return ( +
++++++++ REPLACE + + + + +## Example 5: Requesting to use an MCP tool + + +weather-server +get_forecast + +{ + "city": "San Francisco", + "days": 5 +} + + + +## Example 6: Another example of using an MCP tool (where the server name is a unique identifier such as a URL) + + +github.com/modelcontextprotocol/servers/tree/main/src/github +create_issue + +{ + "owner": "octocat", + "repo": "hello-world", + "title": "Found a bug", + "body": "I'm having a problem with this.", + "labels": ["bug", "help wanted"], + "assignees": ["octocat"] +} + + + +# Tool Use Guidelines + +1. In tags, assess what information you already have and what information you need to proceed with the task. +2. Choose the most appropriate tool based on the task and the tool descriptions provided. Assess if you need additional information to proceed, and which of the available tools would be most effective for gathering this information. For example using the list_files tool is more effective than running a command like \`ls\` in the terminal. It's critical that you think about each available tool and use the one that best fits the current step in the task. +3. If multiple actions are needed, use one tool at a time per message to accomplish the task iteratively, with each tool use being informed by the result of the previous tool use. Do not assume the outcome of any tool use. Each step must be informed by the previous step's result. +4. Formulate your tool use using the XML format specified for each tool. +5. After each tool use, the user will respond with the result of that tool use. This result will provide you with the necessary information to continue your task or make further decisions. This response may include: + - Information about whether the tool succeeded or failed, along with any reasons for failure. + - Linter errors that may have arisen due to the changes you made, which you'll need to address. + - New terminal output in reaction to the changes, which you may need to consider or act upon. + - Any other relevant feedback or information related to the tool use. +6. ALWAYS wait for user confirmation after each tool use before proceeding. Never assume the success of a tool use without explicit confirmation of the result from the user. + +It is crucial to proceed step-by-step, waiting for the user's message after each tool use before moving forward with the task. This approach allows you to: +1. Confirm the success of each step before proceeding. +2. Address any issues or errors that arise immediately. +3. Adapt your approach based on new information or unexpected results. +4. Ensure that each action builds correctly on the previous ones. + +By waiting for and carefully considering the user's response after each tool use, you can react accordingly and make informed decisions about how to proceed with the task. This iterative process helps ensure the overall success and accuracy of your work. + +==== + +MCP SERVERS + +The Model Context Protocol (MCP) enables communication between the system and locally running MCP servers that provide additional tools and resources to extend your capabilities. + +# Connected MCP Servers + +When a server is connected, you can use the server's tools via the \`use_mcp_tool\` tool, and access the server's resources via the \`access_mcp_resource\` tool. + +${mcpHubString} + +==== + +EDITING FILES + +You have access to two tools for working with files: **write_to_file** and **replace_in_file**. Understanding their roles and selecting the right one for the job will help ensure efficient and accurate modifications. + +# write_to_file + +## Purpose + +- Create a new file, or overwrite the entire contents of an existing file. + +## When to Use + +- Initial file creation, such as when scaffolding a new project. +- Overwriting large boilerplate files where you want to replace the entire content at once. +- When the complexity or number of changes would make replace_in_file unwieldy or error-prone. +- When you need to completely restructure a file's content or change its fundamental organization. + +## Important Considerations + +- Using write_to_file requires providing the file's complete final content. +- If you only need to make small changes to an existing file, consider using replace_in_file instead to avoid unnecessarily rewriting the entire file. +- While write_to_file should not be your default choice, don't hesitate to use it when the situation truly calls for it. + +# replace_in_file + +## Purpose + +- Make targeted edits to specific parts of an existing file without overwriting the entire file. + +## When to Use + +- Small, localized changes like updating a few lines, function implementations, changing variable names, modifying a section of text, etc. +- Targeted improvements where only specific portions of the file's content needs to be altered. +- Especially useful for long files where much of the file will remain unchanged. + +## Advantages + +- More efficient for minor edits, since you don't need to supply the entire file content. +- Reduces the chance of errors that can occur when overwriting large files. + +# Choosing the Appropriate Tool + +- **Default to replace_in_file** for most changes. It's the safer, more precise option that minimizes potential issues. +- **Use write_to_file** when: + - Creating new files + - The changes are so extensive that using replace_in_file would be more complex or risky + - You need to completely reorganize or restructure a file + - The file is relatively small and the changes affect most of its content + - You're generating boilerplate or template files + +# Auto-formatting Considerations + +- After using either write_to_file or replace_in_file, the user's editor may automatically format the file +- This auto-formatting may modify the file contents, for example: + - Breaking single lines into multiple lines + - Adjusting indentation to match project style (e.g. 2 spaces vs 4 spaces vs tabs) + - Converting single quotes to double quotes (or vice versa based on project preferences) + - Organizing imports (e.g. sorting, grouping by type) + - Adding/removing trailing commas in objects and arrays + - Enforcing consistent brace style (e.g. same-line vs new-line) + - Standardizing semicolon usage (adding or removing based on style) +- The write_to_file and replace_in_file tool responses will include the final state of the file after any auto-formatting +- Use this final state as your reference point for any subsequent edits. This is ESPECIALLY important when crafting SEARCH blocks for replace_in_file which require the content to match what's in the file exactly. + +# Workflow Tips + +1. Before editing, assess the scope of your changes and decide which tool to use. +2. For targeted edits, apply replace_in_file with carefully crafted SEARCH/REPLACE blocks. If you need multiple changes, you can stack multiple SEARCH/REPLACE blocks within a single replace_in_file call. +3. For major overhauls or initial file creation, rely on write_to_file. +4. Once the file has been edited with either write_to_file or replace_in_file, the system will provide you with the final state of the modified file. Use this updated content as the reference point for any subsequent SEARCH/REPLACE operations, since it reflects any auto-formatting or user-applied changes. +By thoughtfully selecting between write_to_file and replace_in_file, you can make your file editing process smoother, safer, and more efficient. + +==== + +ACT MODE V.S. PLAN MODE + +In each user message, the environment_details will specify the current mode. There are two modes: + +- ACT MODE: In this mode, you have access to all tools EXCEPT the plan_mode_respond tool. + - In ACT MODE, you use tools to accomplish the user's task. Once you've completed the user's task, you use the attempt_completion tool to present the result of the task to the user. +- PLAN MODE: In this special mode, you have access to the plan_mode_respond tool. + - In PLAN MODE, the goal is to gather information and get context to create a detailed plan for accomplishing the task, which the user will review and approve before they switch you to ACT MODE to implement the solution. + - In PLAN MODE, when you need to converse with the user or present a plan, you should use the plan_mode_respond tool to deliver your response directly, rather than using tags to analyze when to respond. Do not talk about using plan_mode_respond - just use it directly to share your thoughts and provide helpful answers. + +## What is PLAN MODE? + +- While you are usually in ACT MODE, the user may switch to PLAN MODE in order to have a back and forth with you to plan how to best accomplish the task. +- When starting in PLAN MODE, depending on the user's request, you may need to do some information gathering e.g. using read_file or search_files to get more context about the task. You may also ask the user clarifying questions to get a better understanding of the task. You may return mermaid diagrams to visually display your understanding. +- Once you've gained more context about the user's request, you should architect a detailed plan for how you will accomplish the task. Returning mermaid diagrams may be helpful here as well. +- Then you might ask the user if they are pleased with this plan, or if they would like to make any changes. Think of this as a brainstorming session where you can discuss the task and plan the best way to accomplish it. +- If at any point a mermaid diagram would make your plan clearer to help the user quickly see the structure, you are encouraged to include a Mermaid code block in the response. (Note: if you use colors in your mermaid diagrams, be sure to use high contrast colors so the text is readable.) +- Finally once it seems like you've reached a good plan, ask the user to switch you back to ACT MODE to implement the solution. + +==== + +CAPABILITIES + +- You have access to tools that let you execute CLI commands on the user's computer, list files, view source code definitions, regex search${ + supportsBrowserUse ? ", use the browser" : "" + }, read and edit files, and ask follow-up questions. These tools help you effectively accomplish a wide range of tasks, such as writing code, making edits or improvements to existing files, understanding the current state of a project, performing system operations, and much more. +- When the user initially gives you a task, a recursive list of all filepaths in the current working directory ('${cwdFormatted}') will be included in environment_details. This provides an overview of the project's file structure, offering key insights into the project from directory/file names (how developers conceptualize and organize their code) and file extensions (the language used). This can also guide decision-making on which files to explore further. If you need to further explore directories such as outside the current working directory, you can use the list_files tool. If you pass 'true' for the recursive parameter, it will list files recursively. Otherwise, it will list files at the top level, which is better suited for generic directories where you don't necessarily need the nested structure, like the Desktop. +- You can use search_files to perform regex searches across files in a specified directory, outputting context-rich results that include surrounding lines. This is particularly useful for understanding code patterns, finding specific implementations, or identifying areas that need refactoring. +- You can use the list_code_definition_names tool to get an overview of source code definitions for all files at the top level of a specified directory. This can be particularly useful when you need to understand the broader context and relationships between certain parts of the code. You may need to call this tool multiple times to understand various parts of the codebase related to the task. + - For example, when asked to make edits or improvements you might analyze the file structure in the initial environment_details to get an overview of the project, then use list_code_definition_names to get further insight using source code definitions for files located in relevant directories, then read_file to examine the contents of relevant files, analyze the code and suggest improvements or make necessary edits, then use the replace_in_file tool to implement changes. If you refactored code that could affect other parts of the codebase, you could use search_files to ensure you update other files as needed. +- You can use the execute_command tool to run commands on the user's computer whenever you feel it can help accomplish the user's task. When you need to execute a CLI command, you must provide a clear explanation of what the command does. Prefer to execute complex CLI commands over creating executable scripts, since they are more flexible and easier to run. Interactive and long-running commands are allowed, since the commands are run in the user's VSCode terminal. The user may keep commands running in the background and you will be kept updated on their status along the way. Each command you execute is run in a new terminal instance.${ + supportsBrowserUse + ? "\n- You can use the browser_action tool to interact with websites (including html files and locally running development servers) through a Puppeteer-controlled browser when you feel it is necessary in accomplishing the user's task. This tool is particularly useful for web development tasks as it allows you to launch a browser, navigate to pages, interact with elements through clicks and keyboard input, and capture the results through screenshots and console logs. This tool may be useful at key stages of web development tasks-such as after implementing new features, making substantial changes, when troubleshooting issues, or to verify the result of your work. You can analyze the provided screenshots to ensure correct rendering or identify errors, and review console logs for runtime issues.\n - For example, if asked to add a component to a react website, you might create the necessary files, use execute_command to run the site locally, then use browser_action to launch the browser, navigate to the local server, and verify the component renders & functions correctly before closing the browser." + : "" + } +- You have access to MCP servers that may provide additional tools and resources. Each server may provide different capabilities that you can use to accomplish tasks more effectively. +- You can use LaTeX syntax in your responses to render mathematical expressions + +==== + +If the user asks for help or wants to give feedback inform them of the following: +- To give feedback, users should report the issue using the /reportbug slash command in the chat. + +When the user directly asks about Cline (eg 'can Cline do...', 'does Cline have...') or asks in second person (eg 'are you able...', 'can you do...'), first use the web_fetch tool to gather information to answer the question from Cline docs at https://docs.cline.bot. + - The available sub-pages are \`getting-started\` (Intro for new coders, installing Cline and dev essentials), \`model-selection\` (Model Selection Guide, Custom Model Configs, Bedrock, Vertex, Codestral, LM Studio, Ollama), \`features\` (Auto approve, Checkpoints, Cline rules, Drag & Drop, Plan & Act, Workflows, etc), \`task-management\` (Task and Context Management in Cline), \`prompt-engineering\` (Improving your prompting skills, Prompt Engineering Guide), \`cline-tools\` (Cline Tools Reference Guide, New Task Tool, Remote Browser Support, Slash Commands), \`mcp\` (MCP Overview, Adding/Configuring Servers, Transport Mechanisms, MCP Dev Protocol), \`enterprise\` (Cloud provider integration, Security concerns, Custom instructions), \`more-info\` (Telemetry and other reference content) + - Example: https://docs.cline.bot/features/auto-approve + +==== + +RULES + +- Your current working directory is: ${cwdFormatted} +- You cannot \`cd\` into a different directory to complete a task. You are stuck operating from '${cwdFormatted}', so be sure to pass in the correct 'path' parameter when using tools that require a path. +- Do not use the ~ character or $HOME to refer to the home directory. +- Before using the execute_command tool, you must first think about the SYSTEM INFORMATION context provided to understand the user's environment and tailor your commands to ensure they are compatible with their system. You must also consider if the command you need to run should be executed in a specific directory outside of the current working directory '${cwdFormatted}', and if so prepend with \`cd\`'ing into that directory && then executing the command (as one command since you are stuck operating from '${cwdFormatted}'). For example, if you needed to run \`npm install\` in a project outside of '${cwdFormatted}', you would need to prepend with a \`cd\` i.e. pseudocode for this would be \`cd (path to project) && (command, in this case npm install)\`. +- When using the search_files tool, craft your regex patterns carefully to balance specificity and flexibility. Based on the user's task you may use it to find code patterns, TODO comments, function definitions, or any text-based information across the project. The results include context, so analyze the surrounding code to better understand the matches. Leverage the search_files tool in combination with other tools for more comprehensive analysis. For example, use it to find specific code patterns, then use read_file to examine the full context of interesting matches before using replace_in_file to make informed changes. +- When creating a new project (such as an app, website, or any software project), organize all new files within a dedicated project directory unless the user specifies otherwise. Use appropriate file paths when creating files, as the write_to_file tool will automatically create any necessary directories. Structure the project logically, adhering to best practices for the specific type of project being created. Unless otherwise specified, new projects should be easily run without additional setup, for example most projects can be built in HTML, CSS, and JavaScript - which you can open in a browser. +- Be sure to consider the type of project (e.g. Python, JavaScript, web application) when determining the appropriate structure and files to include. Also consider what files may be most relevant to accomplishing the task, for example looking at a project's manifest file would help you understand the project's dependencies, which you could incorporate into any code you write. +- When making changes to code, always consider the context in which the code is being used. Ensure that your changes are compatible with the existing codebase and that they follow the project's coding standards and best practices. +- When you want to modify a file, use the replace_in_file or write_to_file tool directly with the desired changes. You do not need to display the changes before using the tool. +- Do not ask for more information than necessary. Use the tools provided to accomplish the user's request efficiently and effectively. When you've completed your task, you must use the attempt_completion tool to present the result to the user. The user may provide feedback, which you can use to make improvements and try again. +- You are only allowed to ask the user questions using the ask_followup_question tool. Use this tool only when you need additional details to complete a task, and be sure to use a clear and concise question that will help you move forward with the task. However if you can use the available tools to avoid having to ask the user questions, you should do so. For example, if the user mentions a file that may be in an outside directory like the Desktop, you should use the list_files tool to list the files in the Desktop and check if the file they are talking about is there, rather than asking the user to provide the file path themselves. +- When executing commands, if you don't see the expected output, assume the terminal executed the command successfully and proceed with the task. The user's terminal may be unable to stream the output back properly. If you absolutely need to see the actual terminal output, use the ask_followup_question tool to request the user to copy and paste it back to you. +- The user may provide a file's contents directly in their message, in which case you shouldn't use the read_file tool to get the file contents again since you already have it. +- Your goal is to try to accomplish the user's task, NOT engage in a back and forth conversation.${ + supportsBrowserUse + ? `\n- The user may ask generic non-development tasks, such as "what\'s the latest news" or "look up the weather in San Diego", in which case you might use the browser_action tool to complete the task if it makes sense to do so, rather than trying to create a website or using curl to answer the question. However, if an available MCP server tool or resource can be used instead, you should prefer to use it over browser_action.` + : "" + } +- NEVER end attempt_completion result with a question or request to engage in further conversation! Formulate the end of your result in a way that is final and does not require further input from the user. +- You are STRICTLY FORBIDDEN from starting your messages with "Great", "Certainly", "Okay", "Sure". You should NOT be conversational in your responses, but rather direct and to the point. For example you should NOT say "Great, I've updated the CSS" but instead something like "I've updated the CSS". It is important you be clear and technical in your messages. +- When presented with images, utilize your vision capabilities to thoroughly examine them and extract meaningful information. Incorporate these insights into your thought process as you accomplish the user's task. +- At the end of each user message, you will automatically receive environment_details. This information is not written by the user themselves, but is auto-generated to provide potentially relevant context about the project structure and environment. While this information can be valuable for understanding the project context, do not treat it as a direct part of the user's request or response. Use it to inform your actions and decisions, but don't assume the user is explicitly asking about or referring to this information unless they clearly do so in their message. When using environment_details, explain your actions clearly to ensure the user understands, as they may not be aware of these details. +- Before executing commands, check the "Actively Running Terminals" section in environment_details. If present, consider how these active processes might impact your task. For example, if a local development server is already running, you wouldn't need to start it again. If no active terminals are listed, proceed with command execution as normal. +- When using the replace_in_file tool, you must include complete lines in your SEARCH blocks, not partial lines. The system requires exact line matches and cannot match partial lines. For example, if you want to match a line containing "const x = 5;", your SEARCH block must include the entire line, not just "x = 5" or other fragments. +- When using the replace_in_file tool, if you use multiple SEARCH/REPLACE blocks, list them in the order they appear in the file. For example if you need to make changes to both line 10 and line 50, first include the SEARCH/REPLACE block for line 10, followed by the SEARCH/REPLACE block for line 50. +- When using the replace_in_file tool, Do NOT add extra characters to the markers (e.g., ------- SEARCH> is INVALID). Do NOT forget to use the closing +++++++ REPLACE marker. Do NOT modify the marker format in any way. Malformed XML will cause complete tool failure and break the entire editing process. +- It is critical you wait for the user's response after each tool use, in order to confirm the success of the tool use. For example, if asked to make a todo app, you would create a file, wait for the user's response it was created successfully, then create another file if needed, wait for the user's response it was created successfully, etc.${ + supportsBrowserUse + ? " Then if you want to test your work, you might use browser_action to launch the site, wait for the user's response confirming the site was launched along with a screenshot, then perhaps e.g., click a button to test functionality if needed, wait for the user's response confirming the button was clicked along with a screenshot of the new state, before finally closing the browser." + : "" + } +- MCP operations should be used one at a time, similar to other tool usage. Wait for confirmation of success before proceeding with additional operations. + +==== + +SYSTEM INFORMATION + +Operating System: ${os} +Default Shell: ${shell} +Home Directory: ${homeFormatted} +Current Working Directory: ${cwdFormatted} + +==== + +OBJECTIVE + +You accomplish a given task iteratively, breaking it down into clear steps and working through them methodically. + +1. Analyze the user's task and set clear, achievable goals to accomplish it. Prioritize these goals in a logical order. +2. Work through these goals sequentially, utilizing available tools one at a time as necessary. Each goal should correspond to a distinct step in your problem-solving process. You will be informed on the work completed and what's remaining as you go. +3. Remember, you have extensive capabilities with access to a wide range of tools that can be used in powerful and clever ways as necessary to accomplish each goal. Before calling a tool, do some analysis within tags. First, analyze the file structure provided in environment_details to gain context and insights for proceeding effectively. Then, think about which of the provided tools is the most relevant tool to accomplish the user's task. Next, go through each of the required parameters of the relevant tool and determine if the user has directly provided or given enough information to infer a value. When deciding if the parameter can be inferred, carefully consider all the context to see if it supports a specific value. If all of the required parameters are present or can be reasonably inferred, close the thinking tag and proceed with the tool use. BUT, if one of the values for a required parameter is missing, DO NOT invoke the tool (not even with fillers for the missing params) and instead, ask the user to provide the missing parameters using the ask_followup_question tool. DO NOT ask for more information on optional parameters if it is not provided. +4. Once you've completed the user's task, you must use the attempt_completion tool to present the result of the task to the user. You may also provide a CLI command to showcase the result of your task; this can be particularly useful for web development tasks, where you can run e.g. \`open index.html\` to show the website you've built. +5. The user may provide feedback, which you can use to make improvements and try again. But DO NOT continue in pointless back and forth conversations, i.e. don't end your responses with questions or offers for further assistance. +${ + userCustomInstructions + ? `\n +==== + +USER'S CUSTOM INSTRUCTIONS + +The following additional instructions are provided by the user, and should be followed to the best of your ability without interfering with the TOOL USE guidelines. + +${userCustomInstructions}` + : "" +}` +} diff --git a/evals/diff_editing/types.ts b/evals/diff_editing/types.ts new file mode 100644 index 00000000..89325678 --- /dev/null +++ b/evals/diff_editing/types.ts @@ -0,0 +1,88 @@ +import { Anthropic } from "@anthropic-ai/sdk" +import { ToolUseName, ToolParamName } from "../../src/core/assistant-message" + +export interface InputMessage { + role: "user" | "assistant" + text: string + images?: string[] +} + +export interface ProcessedTestCase { + test_id: string + messages: Anthropic.Messages.MessageParam[] + file_contents: string + file_path: string + system_prompt_details: SystemPromptDetails + original_diff_edit_tool_call_message: string +} + +export interface TestCase { + test_id: string + messages: InputMessage[] + file_contents: string + file_path: string + system_prompt_details: SystemPromptDetails + original_diff_edit_tool_call_message: string +} + +export interface TestConfig { + model_id: string + system_prompt_name: string + number_of_runs: number + parsing_function: string + diff_edit_function: string + thinking_tokens_budget: number + replay: boolean +} + +export interface SystemPromptDetails { + mcp_string: string + cwd_value: string + browser_use: boolean + width: number + height: number + os_value: string + shell_value: string + home_value: string + user_custom_instructions: string +} + +export type ConstructSystemPromptFn = ( + cwdFormatted: string, + supportsBrowserUse: boolean, + browserWidth: number, + browserHeight: number, + os: string, + shell: string, + homeFormatted: string, + mcpHubString: string, + userCustomInstructions: string, +) => string + +export interface TestResult { + success: boolean + streamResult?: any + diffEdit?: string + toolCalls?: ExtractedToolCall[] + diffEditSuccess?: boolean + error?: string + errorString?: string +} + +export interface ExtractedToolCall { + name: ToolUseName + input: Partial> +} + +export interface TestInput { + apiKey?: string + systemPrompt: string + messages: Anthropic.Messages.MessageParam[] + modelId: string + originalFile: string + originalFilePath: string + parsingFunction: string + diffEditFunction: string + thinkingBudgetTokens: number + originalDiffEditToolCallMessage?: string +} diff --git a/hosts/vscode/host-grpc-handler.ts b/hosts/vscode/host-grpc-handler.ts deleted file mode 100644 index c90bba62..00000000 --- a/hosts/vscode/host-grpc-handler.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { v4 as uuidv4 } from "uuid" -import { hostServiceHandlers } from "./host-grpc-service-config" -import { GrpcRequestRegistry } from "../../src/core/controller/grpc-request-registry" - -/** - * Type definition for a streaming response handler - */ -export type StreamingResponseHandler = (response: any, isLast?: boolean, sequenceNumber?: number) => Promise - -// Registry to track active gRPC requests and their cleanup functions -const requestRegistry = new GrpcRequestRegistry() - -/** - * Callback interface for streaming requests - */ -export interface StreamingCallbacks { - onResponse: (response: T) => void - onError?: (error: Error) => void - onComplete?: () => void -} - -/** - * Handles gRPC requests from the webview - */ -export class GrpcHandler { - constructor() {} - - /** - * Handle a gRPC request from the webview - * @param service The service name - * @param method The method name - * @param message The request message - * @param requestId The request ID for response correlation - * @param streamingCallbacks Optional callbacks for streaming responses - * @returns For unary requests: the response message or error. For streaming requests: a cancel function. - */ - async handleRequest( - service: string, - method: string, - message: any, - requestId: string, - streamingCallbacks?: StreamingCallbacks, - ): Promise< - | { - message?: any - error?: string - request_id: string - } - | (() => void) - > { - // If streaming callbacks are provided, handle as a streaming request - if (streamingCallbacks) { - let completionCalled = false - - // Create a response handler that will call the client's callbacks - const responseHandler: StreamingResponseHandler = async (response, isLast = false, sequenceNumber) => { - try { - // Call the client's onResponse callback with the response - streamingCallbacks.onResponse(response) - - // If this is the last response, call the onComplete callback - if (isLast && streamingCallbacks.onComplete && !completionCalled) { - completionCalled = true - streamingCallbacks.onComplete() - } - } catch (error) { - // If there's an error in the callback, call the onError callback - if (streamingCallbacks.onError) { - streamingCallbacks.onError(error instanceof Error ? error : new Error(String(error))) - } - } - } - - // Register the response handler with the registry - requestRegistry.registerRequest( - requestId, - () => { - console.log(`[DEBUG] Cleaning up streaming request: ${requestId}`) - if (streamingCallbacks.onComplete && !completionCalled) { - completionCalled = true - streamingCallbacks.onComplete() - } - }, - { type: "streaming_request", service, method }, - responseHandler, - ) - - // Call the streaming handler directly - console.log(`[DEBUG] Streaming gRPC host call to ${service}.${method} req:${requestId}`) - try { - await this.handleStreamingRequest(service, method, message, requestId) - } catch (error) { - if (streamingCallbacks.onError) { - streamingCallbacks.onError(error instanceof Error ? error : new Error(String(error))) - } - } - - // Return a function to cancel the stream - return () => { - console.log(`[DEBUG] Cancelling streaming request: ${requestId}`) - this.cancelRequest(requestId) - } - } - - // Handle as a unary request - try { - // Get the service handler from the config - const serviceConfig = hostServiceHandlers[service] - if (!serviceConfig) { - throw new Error(`Unknown service: ${service}`) - } - - // Handle unary request - return { - message: await serviceConfig.requestHandler(method, message), - request_id: requestId, - } - } catch (error) { - return { - error: error instanceof Error ? error.message : String(error), - request_id: requestId, - } - } - } - - /** - * Cancel a gRPC request - * @param requestId The request ID to cancel - * @returns True if the request was found and cancelled, false otherwise - */ - public async cancelRequest(requestId: string): Promise { - const cancelled = requestRegistry.cancelRequest(requestId) - - if (cancelled) { - // Get the registered response handler from the registry - const requestInfo = requestRegistry.getRequestInfo(requestId) - if (requestInfo && requestInfo.responseStream) { - try { - // Send cancellation confirmation using the registered response handler - await requestInfo.responseStream( - { cancelled: true }, - true, // Mark as last message - ) - } catch (e) { - console.error(`Error sending cancellation response for ${requestId}:`, e) - } - } - } else { - console.log(`[DEBUG] Request not found for cancellation: ${requestId}`) - } - - return cancelled - } - - /** - * Handle a streaming gRPC request - * @param service The service name - * @param method The method name - * @param message The request message - * @param requestId The request ID for response correlation - */ - private async handleStreamingRequest(service: string, method: string, message: any, requestId: string): Promise { - // Get the service handler from the config - const serviceConfig = hostServiceHandlers[service] - if (!serviceConfig) { - throw new Error(`Unknown service: ${service}`) - } - - // Check if the service supports streaming - if (!serviceConfig.streamingHandler) { - throw new Error(`Service ${service} does not support streaming`) - } - - // Get the registered response handler from the registry - const requestInfo = requestRegistry.getRequestInfo(requestId) - if (!requestInfo || !requestInfo.responseStream) { - throw new Error(`No response handler registered for request: ${requestId}`) - } - - // Use the registered response handler - const responseStream = requestInfo.responseStream - - // Handle streaming request and pass the requestId to all streaming handlers - await serviceConfig.streamingHandler(method, message, responseStream, requestId) - - // Don't send a final message here - the stream should stay open for future updates - // The stream will be closed when the client disconnects or when the service explicitly ends it - } -} - -/** - * Get the request registry instance - * This allows other parts of the code to access the registry - */ -export function getRequestRegistry(): GrpcRequestRegistry { - return requestRegistry -} diff --git a/package-lock.json b/package-lock.json index 1d0f87fb..d72a9aaf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,22 +1,22 @@ { "name": "cline-shengsuan", - "version": "3.17.11", + "version": "3.17.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "cline-shengsuan", - "version": "3.17.11", + "version": "3.17.14", "license": "Apache-2.0", "dependencies": { - "@anthropic-ai/bedrock-sdk": "^0.12.4", "@anthropic-ai/sdk": "^0.37.0", "@anthropic-ai/vertex-sdk": "^0.6.4", - "@aws-sdk/client-bedrock-runtime": "^3.821.0", + "@aws-sdk/client-bedrock-runtime": "^3.826.0", + "@aws-sdk/credential-providers": "^3.826.0", "@bufbuild/protobuf": "^2.2.5", "@cerebras/cerebras_cloud_sdk": "^1.35.0", "@google-cloud/vertexai": "^1.9.3", - "@google/genai": "^0.13.0", + "@google/genai": "1.0.0", "@grpc/grpc-js": "^1.9.15", "@grpc/reflection": "^1.0.4", "@mistralai/mistralai": "^1.5.0", @@ -53,7 +53,8 @@ "jschardet": "^3.1.4", "mammoth": "^1.8.0", "monaco-vscode-textmate-theme-converter": "^0.1.7", - "ollama": "^0.5.15", + "nice-grpc": "^2.1.12", + "ollama": "^0.5.13", "open": "^10.1.2", "open-graph-scraper": "^6.9.0", "openai": "^4.83.0", @@ -76,6 +77,7 @@ "zod": "^3.24.2" }, "devDependencies": { + "@bufbuild/buf": "^1.54.0", "@changesets/cli": "^2.27.12", "@types/chai": "^5.0.1", "@types/clone-deep": "^4.0.4", @@ -101,6 +103,7 @@ "eslint-plugin-eslint-rules": "file:eslint-rules", "grpc-tools": "^1.13.0", "husky": "^9.1.7", + "lint-staged": "^16.1.0", "mintlify": "^4.0.515", "npm-run-all": "^4.1.5", "prettier": "^3.3.3", @@ -139,25 +142,6 @@ "eslint": ">=8.0.0" } }, - "node_modules/@anthropic-ai/bedrock-sdk": { - "version": "0.12.6", - "resolved": "https://registry.npmjs.org/@anthropic-ai/bedrock-sdk/-/bedrock-sdk-0.12.6.tgz", - "integrity": "sha512-g9tmm6zXf3+2P5Se+c2zi7jmZ6+t+qtfu8NhoNYxetPxn6ez1aeNQ+YfqzSMm/ZWye8hy3hcDhbRhWaHC2Wbwg==", - "license": "MIT", - "dependencies": { - "@anthropic-ai/sdk": ">=0.36 <1", - "@aws-crypto/sha256-js": "^4.0.0", - "@aws-sdk/client-bedrock-runtime": "^3.797.0", - "@aws-sdk/credential-providers": "^3.796.0", - "@smithy/eventstream-serde-node": "^2.0.10", - "@smithy/fetch-http-handler": "^2.2.1", - "@smithy/protocol-http": "^3.0.6", - "@smithy/signature-v4": "^3.1.1", - "@smithy/smithy-client": "^2.1.9", - "@smithy/types": "^2.3.4", - "@smithy/util-base64": "^2.0.0" - } - }, "node_modules/@anthropic-ai/sdk": { "version": "0.37.0", "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.37.0.tgz", @@ -291,55 +275,6 @@ "node": ">=16.0.0" } }, - "node_modules/@aws-crypto/crc32/node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-crypto/crc32/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-crypto/crc32/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-crypto/crc32/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-crypto/crc32/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -361,31 +296,6 @@ "tslib": "^2.6.2" } }, - "node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-crypto/sha256-browser/node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, "node_modules/@aws-crypto/sha256-browser/node_modules/@smithy/is-array-buffer": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", @@ -431,16 +341,25 @@ "license": "0BSD" }, "node_modules/@aws-crypto/sha256-js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-4.0.0.tgz", - "integrity": "sha512-MHGJyjE7TX9aaqXj7zk2ppnFUOhaDs5sP+HtNS0evOxn72c+5njUmyJmpGd7TfyoDznZlHMmdo/xGUdu2NIjNQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", "license": "Apache-2.0", "dependencies": { - "@aws-crypto/util": "^4.0.0", + "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", - "tslib": "^1.11.1" + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" } }, + "node_modules/@aws-crypto/sha256-js/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, "node_modules/@aws-crypto/supports-web-crypto": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/supports-web-crypto/-/supports-web-crypto-5.2.0.tgz", @@ -457,89 +376,6 @@ "license": "0BSD" }, "node_modules/@aws-crypto/util": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-4.0.0.tgz", - "integrity": "sha512-2EnmPy2gsFZ6m8bwUQN4jq+IyXV3quHAcwPOS6ZA3k+geujiqI8aRokO2kFJe+idJ/P3v4qWI186rVMo0+zLDQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@aws-sdk/util-utf8-browser": "^3.0.0", - "tslib": "^1.11.1" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.821.0.tgz", - "integrity": "sha512-+cxIkQBCa97Yr0vH5j0+bYJSuyJMuVO7IcVfApvobOWenSzm0MAd2EXSigd7+x97570OWBWNHAMiVVxBnBa08Q==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.821.0", - "@aws-sdk/credential-provider-node": "3.821.0", - "@aws-sdk/eventstream-handler-node": "3.821.0", - "@aws-sdk/middleware-eventstream": "3.821.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.821.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.821.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.821.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.5.1", - "@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-node": "^4.0.4", - "@smithy/invalid-dependency": "^4.0.4", - "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-retry": "^4.1.10", - "@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.1", - "@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.17", - "@smithy/util-defaults-mode-node": "^4.0.17", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.5", - "@smithy/util-stream": "^4.2.2", - "@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/@aws-sdk/client-bedrock-runtime/node_modules/@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-crypto/util": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", @@ -550,7 +386,7 @@ "tslib": "^2.6.2" } }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { + "node_modules/@aws-crypto/util/node_modules/@smithy/is-array-buffer": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", @@ -562,7 +398,7 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { + "node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", @@ -575,7 +411,7 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { + "node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", @@ -588,402 +424,65 @@ "node": ">=14.0.0" } }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/client-sso": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.821.0.tgz", - "integrity": "sha512-aDEBZUKUd/+Tvudi0d9KQlqt2OW2P27LATZX0jkNC8yVk4145bAPS04EYoqdKLuyUn/U33DibEOgKUpxZB12jQ==", + "node_modules/@aws-crypto/util/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@aws-sdk/client-bedrock-runtime": { + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.826.0.tgz", + "integrity": "sha512-GWGdYCUq2n720qhMy5tNrb4Hslg3vQ7tDy6G9xFpLjsUzWVsnHlk8TYa9tbXNHN56X8klbybc+M9h6KAmkCedA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.821.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/credential-provider-node": "3.826.0", + "@aws-sdk/eventstream-handler-node": "3.821.0", + "@aws-sdk/middleware-eventstream": "3.821.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.821.0", + "@aws-sdk/middleware-user-agent": "3.826.0", "@aws-sdk/region-config-resolver": "3.821.0", "@aws-sdk/types": "3.821.0", "@aws-sdk/util-endpoints": "3.821.0", "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.5.1", + "@smithy/core": "^3.5.3", + "@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-node": "^4.0.4", "@smithy/invalid-dependency": "^4.0.4", "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-retry": "^4.1.10", + "@smithy/middleware-endpoint": "^4.1.11", + "@smithy/middleware-retry": "^4.1.12", "@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.1", + "@smithy/smithy-client": "^4.4.3", "@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.17", - "@smithy/util-defaults-mode-node": "^4.0.17", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", "@smithy/util-endpoints": "^3.0.6", "@smithy/util-middleware": "^4.0.4", "@smithy/util-retry": "^4.0.5", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/core": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.821.0.tgz", - "integrity": "sha512-8eB3wKbmfciQFmxFq7hAjy7mXdUs7vBOR5SwT0ZtQBg0Txc18Lc9tMViqqdO6/KU7OukA6ib2IAVSjIJJEN7FQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/core": "^3.5.1", - "@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.1", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "fast-xml-parser": "4.4.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/credential-provider-env": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.821.0.tgz", - "integrity": "sha512-C+s/A72pd7CXwEsJj9+Uq9T726iIfIF18hGRY8o82xcIEfOyakiPnlisku8zZOaAu+jm0CihbbYN4NyYNQ+HZQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/credential-provider-http": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.821.0.tgz", - "integrity": "sha512-gIRzTLnAsRfRSNarCag7G7rhcHagz4x5nNTWRihQs5cwTOghEExDy7Tj5m4TEkv3dcTAsNn+l4tnR4nZXo6R+Q==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.821.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.1", - "@smithy/types": "^4.3.1", "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.821.0.tgz", - "integrity": "sha512-VRTrmsca8kBHtY1tTek1ce+XkK/H0fzodBKcilM/qXjTyumMHPAzVAxKZfSvGC+28/pXyQzhOEyxZfw7giCiWA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/credential-provider-env": "3.821.0", - "@aws-sdk/credential-provider-http": "3.821.0", - "@aws-sdk/credential-provider-process": "3.821.0", - "@aws-sdk/credential-provider-sso": "3.821.0", - "@aws-sdk/credential-provider-web-identity": "3.821.0", - "@aws-sdk/nested-clients": "3.821.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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/credential-provider-node": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.821.0.tgz", - "integrity": "sha512-oBgbcgOXWMgknAfhIdTeHSSVIv+k2LXN9oTbxu1r++o4WWBWrEQ8mHU0Zo9dfr7Uaoqi3pezYZznsBkXnMLEOg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.821.0", - "@aws-sdk/credential-provider-http": "3.821.0", - "@aws-sdk/credential-provider-ini": "3.821.0", - "@aws-sdk/credential-provider-process": "3.821.0", - "@aws-sdk/credential-provider-sso": "3.821.0", - "@aws-sdk/credential-provider-web-identity": "3.821.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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/credential-provider-process": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.821.0.tgz", - "integrity": "sha512-e18ucfqKB3ICNj5RP/FEdvUfhVK6E9MALOsl8pKP13mwegug46p/1BsZWACD5n+Zf9ViiiHxIO7td03zQixfwA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.821.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/client-bedrock-runtime/node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.821.0.tgz", - "integrity": "sha512-Dt+pheBLom4O/egO4L75/72k9C1qtUOLl0F0h6lmqZe4Mvhz+wDtjoO/MdGC/P1q0kcIX/bBKr0NQ3cIvAH8pA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso": "3.821.0", - "@aws-sdk/core": "3.821.0", - "@aws-sdk/token-providers": "3.821.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/client-bedrock-runtime/node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.821.0.tgz", - "integrity": "sha512-FF5wnRJkxSQaCVVvWNv53K1MhTMgH8d+O+MHTbkv51gVIgVATrtfFQMKBLcEAxzXrgAliIO3LiNv+1TqqBZ+BA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/nested-clients": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "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/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "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/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "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/client-bedrock-runtime/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.821.0.tgz", - "integrity": "sha512-rw8q3TxygMg3VrofN04QyWVCCyGwz3bVthYmBZZseENPWG3Krz1OCKcyqjkTcAxMQlEywOske+GIiOasGKnJ3w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.821.0", - "@smithy/core": "^3.5.1", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "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/client-bedrock-runtime/node_modules/@aws-sdk/token-providers": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.821.0.tgz", - "integrity": "sha512-qJ7wgKhdxGbPg718zWXbCYKDuSWZNU3TSw64hPRW6FtbZrIyZxObpiTKC6DKwfsVoZZhHEoP/imGykN1OdOTJA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/nested-clients": "3.821.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/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/util-endpoints": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.821.0.tgz", - "integrity": "sha512-Uknt/zUZnLE76zaAAPEayOeF5/4IZ2puTFXvcSCWHsi9m3tqbb9UozlnlVqvCZLCRWfQryZQoG2W4XSS3qgk5A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "@smithy/util-endpoints": "^3.0.6", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.821.0.tgz", - "integrity": "sha512-YwMXc9EvuzJgnLBTyiQly2juPujXwDgcMHB0iSN92tHe7Dd1jJ1feBmTgdClaaqCeHFUaFpw+3JU/ZUJ6LjR+A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-user-agent": "3.821.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/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "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", - "tslib": "^2.6.2" + "@smithy/util-utf8": "^4.0.0", + "@types/uuid": "^9.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" }, "engines": { "node": ">=18.0.0" @@ -1003,333 +502,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/middleware-retry": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.10.tgz", - "integrity": "sha512-RyhcA3sZIIvAo6r48b2Nx2qfg0OnyohlaV0fw415xrQyx5HQ2bvHl9vs/WBiDXIP49mCfws5wX4308c9Pi/isw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/protocol-http": "^5.1.2", - "@smithy/service-error-classification": "^4.0.5", - "@smithy/smithy-client": "^4.4.1", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.5", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/service-error-classification": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.5.tgz", - "integrity": "sha512-LvcfhrnCBvCmTee81pRlh1F39yTS/+kYleVeLCwNtkY8wtGg8V/ca9rbZZvYIl8OjlMtL6KIjaiL/lgVqHD2nA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-defaults-mode-browser": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.17.tgz", - "integrity": "sha512-HXq5181qnXmIwB7VrwqwP8rsJybHMoYuJnNoXy4PROs2pfSI4sWDMASF2i+7Lo+u64Y6xowhegcdxczowgJtZg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.0.4", - "@smithy/smithy-client": "^4.4.1", - "@smithy/types": "^4.3.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-defaults-mode-node": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.17.tgz", - "integrity": "sha512-RfU2A5LjFhEHw4Nwl1GZNitK4AUWu5jGtigAUDoQtfDUvYHpQxcuLw2QGAdKDtKRflIiHSZ8wXBDR36H9R2Ang==", - "license": "Apache-2.0", - "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.1", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-retry": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.5.tgz", - "integrity": "sha512-V7MSjVDTlEt/plmOFBn1762Dyu5uqMrV2Pl2X0dYk4XvWfdWJNe9Bs5Bzb56wkCuiWjSfClVMGcsuKrGj7S/yg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^4.0.5", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -1337,48 +509,48 @@ "license": "0BSD" }, "node_modules/@aws-sdk/client-cognito-identity": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.812.0.tgz", - "integrity": "sha512-LWkP+Vb2f6aNaway06XvFZG3altSXltAClzCz9cTFuOfKG6V2X+0VWsW9cnFRV4+MFFJW3iQAaPMQ1fBO9Rusg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.826.0.tgz", + "integrity": "sha512-3SStkRCHoB7a2Q4aGA++Zvlps8qxJhtCgSRs9cOSL9ldoYGCjOATkMCYmQD9iySge/WULPDEPf5qYlAyGfoRCg==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/credential-provider-node": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/credential-provider-node": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, @@ -1386,168 +558,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/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==", - "license": "Apache-2.0", - "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/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/client-cognito-identity/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -1555,47 +565,47 @@ "license": "0BSD" }, "node_modules/@aws-sdk/client-sso": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.812.0.tgz", - "integrity": "sha512-O//smQRj1+RXELB7xX54s5pZB0V69KHXpUZmz8V+8GAYO1FKTHfbpUgK+zyMNb+lFZxG9B69yl8pWPZ/K8bvxA==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.826.0.tgz", + "integrity": "sha512-/FEKnUC3xPkLL4RuRydwzx+y4b55HIX6qLPbGnyIs+sNmCUyc/62ijtV1Ml+b++YzEF6jWNBsJOxeyZdgrJ3Ig==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, @@ -1603,168 +613,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/client-sso/node_modules/@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/fetch-http-handler": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.2.tgz", - "integrity": "sha512-+9Dz8sakS9pe7f2cBocpJXdeVjMopUDLgZs1yWeu7h++WqSbjUYv/JAJwKwXw1HV6gq1jyWjxuyn24E2GhoEcQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.0", - "@smithy/querystring-builder": "^4.0.2", - "@smithy/types": "^4.2.0", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/querystring-builder": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.2.tgz", - "integrity": "sha512-NTOs0FwHw1vimmQM4ebh+wFQvOwkEf/kQL6bSM1Lock+Bv4I89B3hGYoUEPkmvYPkDKyp5UdXJYu+PoTQ3T31Q==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/client-sso/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -1772,107 +620,25 @@ "license": "0BSD" }, "node_modules/@aws-sdk/core": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.812.0.tgz", - "integrity": "sha512-myWA9oHMBVDObKrxG+puAkIGs8igcWInQ1PWCRTS/zN4BkhUMFjjh/JPV/4Vzvtvj5E36iujq2WtlrDLl1PpOw==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.826.0.tgz", + "integrity": "sha512-BGbQYzWj3ps+dblq33FY5tz/SsgJCcXX0zjQlSC07tYvU1jHTUvsefphyig+fY38xZ4wdKjbTop+KUmXUYrOXw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.804.0", - "@smithy/core": "^3.3.3", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/property-provider": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/signature-v4": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/util-middleware": "^4.0.2", - "fast-xml-parser": "4.4.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/signature-v4": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.1.0.tgz", - "integrity": "sha512-4t5WX60sL3zGJF/CtZsUQTs3UrZEDO2P7pEaElrekbLqkWPYkgqNW1oeiNYC6xXifBnT9dVBOnNQRvOE9riU9w==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.0.0", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-hex-encoding": "^4.0.0", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-uri-escape": "^4.0.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/xml-builder": "3.821.0", + "@smithy/core": "^3.5.3", + "@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.3", + "@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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/core/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==", - "license": "Apache-2.0", - "dependencies": { + "fast-xml-parser": "4.4.1", "tslib": "^2.6.2" }, "engines": { @@ -1886,27 +652,15 @@ "license": "0BSD" }, "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.812.0.tgz", - "integrity": "sha512-SrEGXP1zs2Cy3jjOwM8eh+UZkr28z7rvjF+cgV4bpOti5F/mzPyVoIxDkG8BQ2sZdAwa9rgEhhOl4CcKjoJoTA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-cognito-identity": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.826.0.tgz", + "integrity": "sha512-WnHLJD1iy0Gqyv0S7PXI+c1c9xBY8L5XnESOzYM78Sx1zlVHw557ZtQM1lKtHa6DiGMN4apYZr0lmalgmtHpQQ==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/client-cognito-identity": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { @@ -1920,27 +674,15 @@ "license": "0BSD" }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.812.0.tgz", - "integrity": "sha512-Ge7IEu06ANurGBZx39q9CNN/ncqb1K8lpKZCY969uNWO0/7YPhnplrRJGMZYIS35nD2mBm3ortEKjY/wMZZd5g==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.826.0.tgz", + "integrity": "sha512-DK3pQY8+iKK3MGDdC3uOZQ2psU01obaKlTYhEwNu4VWzgwQL4Vi3sWj4xSWGEK41vqZxiRLq6fOq7ysRI+qEZA==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/core": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { @@ -1954,119 +696,20 @@ "license": "0BSD" }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.812.0.tgz", - "integrity": "sha512-Vux2U42vPGXeE407Lp6v3yVA65J7hBO9rB67LXshyGVi7VZLAYWc4mrZxNJNqabEkjcDEmMQQakLPT6zc5SvFw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/property-provider": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/fetch-http-handler": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.2.tgz", - "integrity": "sha512-+9Dz8sakS9pe7f2cBocpJXdeVjMopUDLgZs1yWeu7h++WqSbjUYv/JAJwKwXw1HV6gq1jyWjxuyn24E2GhoEcQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.0", - "@smithy/querystring-builder": "^4.0.2", - "@smithy/types": "^4.2.0", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/querystring-builder": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.2.tgz", - "integrity": "sha512-NTOs0FwHw1vimmQM4ebh+wFQvOwkEf/kQL6bSM1Lock+Bv4I89B3hGYoUEPkmvYPkDKyp5UdXJYu+PoTQ3T31Q==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/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": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.826.0.tgz", + "integrity": "sha512-N+IVZBh+yx/9GbMZTKO/gErBi/FYZQtcFRItoLbY+6WU+0cSWyZYfkoeOxHmQV3iX9k65oljERIWUmL9x6OSQg==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/core": "3.826.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.3", + "@smithy/types": "^4.3.1", + "@smithy/util-stream": "^4.2.2", "tslib": "^2.6.2" }, "engines": { @@ -2080,122 +723,71 @@ "license": "0BSD" }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.812.0.tgz", - "integrity": "sha512-oltqGvQ488xtPY5wrNjbD+qQYYkuCjn30IDE1qKMxJ58EM6UVTQl3XV44Xq07xfF5gKwVJQkfIyOkRAguOVybg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.826.0.tgz", + "integrity": "sha512-g7n+qSklq/Lzjxe2Ke5QFNCgYn26a3ydZnbFIk8QqYin4pzG+qiunaqJjpV3c/EeHMlfK8bBc7MXAylKzGRccQ==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/credential-provider-env": "3.812.0", - "@aws-sdk/credential-provider-http": "3.812.0", - "@aws-sdk/credential-provider-process": "3.812.0", - "@aws-sdk/credential-provider-sso": "3.812.0", - "@aws-sdk/credential-provider-web-identity": "3.812.0", - "@aws-sdk/nested-clients": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/credential-provider-imds": "^4.0.4", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/credential-provider-env": "3.826.0", + "@aws-sdk/credential-provider-http": "3.826.0", + "@aws-sdk/credential-provider-process": "3.826.0", + "@aws-sdk/credential-provider-sso": "3.826.0", + "@aws-sdk/credential-provider-web-identity": "3.826.0", + "@aws-sdk/nested-clients": "3.826.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", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/nested-clients": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.812.0.tgz", - "integrity": "sha512-FS/fImbEpJU3cXtBGR9fyVd+CP51eNKlvTMi3f4/6lSk3RmHjudNC9yEF/og3jtpT3O+7vsNOUW9mHco5IjdQQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.826.0.tgz", + "integrity": "sha512-p7olPq0uTtHqGuXI1GSc/gzKDvV55PMbLtnmupEDfnY9SoRu+QatbWQ6da9sI1lhOcNmRMgiNQBXFzaUFrG+SQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, @@ -2203,117 +795,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-provider-ini/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-ini/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/credential-provider-ini/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -2321,34 +802,22 @@ "license": "0BSD" }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.812.0.tgz", - "integrity": "sha512-SnvSWBP6cr9nqx784eETnL2Zl7ZnMB/oJgFVEG1aejAGbT1H9gTpMwuUsBXk4u/mEYe3f1lh1Wqo+HwDgNkfrg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/credential-provider-env": "3.812.0", - "@aws-sdk/credential-provider-http": "3.812.0", - "@aws-sdk/credential-provider-ini": "3.812.0", - "@aws-sdk/credential-provider-process": "3.812.0", - "@aws-sdk/credential-provider-sso": "3.812.0", - "@aws-sdk/credential-provider-web-identity": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/credential-provider-imds": "^4.0.4", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.826.0.tgz", + "integrity": "sha512-UfIJXxHjmSxH6bea00HBPLkjNI2D04enQA/xNLZvB+4xtzt1/gYdCis1P4/73f5aGVVVB4/zQMobBbnjkrmbQw==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/credential-provider-env": "3.826.0", + "@aws-sdk/credential-provider-http": "3.826.0", + "@aws-sdk/credential-provider-ini": "3.826.0", + "@aws-sdk/credential-provider-process": "3.826.0", + "@aws-sdk/credential-provider-sso": "3.826.0", + "@aws-sdk/credential-provider-web-identity": "3.826.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", "tslib": "^2.6.2" }, "engines": { @@ -2362,28 +831,16 @@ "license": "0BSD" }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.812.0.tgz", - "integrity": "sha512-YI8bb153XeEOb59F9KtTZEwDAc14s2YHZz58+OFiJ2udnKsPV87mNiFhJPW6ba9nmOLXVat5XDcwtVT1b664wg==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.826.0.tgz", + "integrity": "sha512-kURrc4amu3NLtw1yZw7EoLNEVhmOMRUTs+chaNcmS+ERm3yK0nKjaJzmKahmwlTQTSl3wJ8jjK7x962VPo+zWw==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/core": "3.826.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": { @@ -2397,30 +854,18 @@ "license": "0BSD" }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.812.0.tgz", - "integrity": "sha512-ODsPcNhgiO6GOa82TVNskM97mml9rioe9Cbhemz48lkfDQPv1u06NaCR0o3FsvprX1sEhMvJTR3sE1fyEOzvJQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/client-sso": "3.812.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/token-providers": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.826.0.tgz", + "integrity": "sha512-F19J3zcfoom6OnQ0MyAtvduVKQXPgkz9i5ExSO01J2CzjbyMhCDA99qAjHYe+LwhW+W7P/jzBPd0+uOQ2Nhh9Q==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/client-sso": "3.826.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/token-providers": "3.826.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": { @@ -2434,115 +879,64 @@ "license": "0BSD" }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.812.0.tgz", - "integrity": "sha512-E9Bmiujvm/Hp9DM/Vc1S+D0pQbx8/x4dR/zyAEZU9EoRq0duQOQ1reWYWbebYmL1OklcVpTfKV0a/VCwuAtGSg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.826.0.tgz", + "integrity": "sha512-o27GZ6Hy7qhuvMFVUL2eFEpBzf33Jaa/x3u3SHwU0nL7ko7jmbpeF0x4+wmagpI9X2IvVlUxIs0VaQ3YayPLEA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/nested-clients": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/nested-clients": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-sdk/nested-clients": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.812.0.tgz", - "integrity": "sha512-FS/fImbEpJU3cXtBGR9fyVd+CP51eNKlvTMi3f4/6lSk3RmHjudNC9yEF/og3jtpT3O+7vsNOUW9mHco5IjdQQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.826.0.tgz", + "integrity": "sha512-p7olPq0uTtHqGuXI1GSc/gzKDvV55PMbLtnmupEDfnY9SoRu+QatbWQ6da9sI1lhOcNmRMgiNQBXFzaUFrG+SQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, @@ -2550,117 +944,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-provider-web-identity/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-web-identity/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -2668,128 +951,77 @@ "license": "0BSD" }, "node_modules/@aws-sdk/credential-providers": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.812.0.tgz", - "integrity": "sha512-hT7Kr8Ao+NS9b8KCB/U8cmpr0DcWOZNZNRBGAOc4eq65JpsRv177QmSqjh75vhM9BzchH3VymcP4GeMoy4SuvA==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.826.0.tgz", + "integrity": "sha512-2wuJFyI5I1LTN3dAF9AzyPDX5zn8/3hWxE8+M3Q1iAP/JH4dBB3SFyvE88Ts01iQ/n4Hu8cAlU5Ke1dnrCxUnw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/client-cognito-identity": "3.812.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/credential-provider-cognito-identity": "3.812.0", - "@aws-sdk/credential-provider-env": "3.812.0", - "@aws-sdk/credential-provider-http": "3.812.0", - "@aws-sdk/credential-provider-ini": "3.812.0", - "@aws-sdk/credential-provider-node": "3.812.0", - "@aws-sdk/credential-provider-process": "3.812.0", - "@aws-sdk/credential-provider-sso": "3.812.0", - "@aws-sdk/credential-provider-web-identity": "3.812.0", - "@aws-sdk/nested-clients": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/credential-provider-imds": "^4.0.4", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/client-cognito-identity": "3.826.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/credential-provider-cognito-identity": "3.826.0", + "@aws-sdk/credential-provider-env": "3.826.0", + "@aws-sdk/credential-provider-http": "3.826.0", + "@aws-sdk/credential-provider-ini": "3.826.0", + "@aws-sdk/credential-provider-node": "3.826.0", + "@aws-sdk/credential-provider-process": "3.826.0", + "@aws-sdk/credential-provider-sso": "3.826.0", + "@aws-sdk/credential-provider-web-identity": "3.826.0", + "@aws-sdk/nested-clients": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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", "tslib": "^2.6.2" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-providers/node_modules/@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/nested-clients": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.812.0.tgz", - "integrity": "sha512-FS/fImbEpJU3cXtBGR9fyVd+CP51eNKlvTMi3f4/6lSk3RmHjudNC9yEF/og3jtpT3O+7vsNOUW9mHco5IjdQQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.826.0.tgz", + "integrity": "sha512-p7olPq0uTtHqGuXI1GSc/gzKDvV55PMbLtnmupEDfnY9SoRu+QatbWQ6da9sI1lhOcNmRMgiNQBXFzaUFrG+SQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, @@ -2797,117 +1029,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/credential-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/credential-providers/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -2929,31 +1050,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/eventstream-handler-node/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/eventstream-handler-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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/eventstream-handler-node/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -2975,44 +1071,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/middleware-eventstream/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-eventstream/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-eventstream/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/middleware-eventstream/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -3020,301 +1078,6 @@ "license": "0BSD" }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.804.0.tgz", - "integrity": "sha512-bum1hLVBrn2lJCi423Z2fMUYtsbkGI2s4N+2RI2WSjvbaVyMSv/WcejIrjkqiiMR+2Y7m5exgoKeg4/TODLDPQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.804.0", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@aws-sdk/middleware-logger": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.804.0.tgz", - "integrity": "sha512-w/qLwL3iq0KOPQNat0Kb7sKndl9BtceigINwBU7SpkYWX9L/Lem6f8NPEKrC9Tl4wDBht3Yztub4oRTy/horJA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.804.0", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.804.0.tgz", - "integrity": "sha512-zqHOrvLRdsUdN/ehYfZ9Tf8svhbiLLz5VaWUz22YndFv6m9qaAcijkpAOlKexsv3nLBMJdSdJ6GUTAeIy3BZzw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.804.0", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.812.0.tgz", - "integrity": "sha512-r+HFwtSvnAs6Fydp4mijylrTX0og9p/xfxOcKsqhMuk3HpZAIcf9sSjRQI6MBusYklg7pnM4sGEnPAZIrdRotA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@smithy/core": "^3.3.3", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@aws-sdk/nested-clients": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.821.0.tgz", - "integrity": "sha512-2IuHcUsWw44ftSEDYU4dvktTEqgyDvkOcfpoGC/UmT4Qo6TVCP3U5tWEGpNK9nN+7nLvekruxxG/jaMt5/oWVw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.821.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.821.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.821.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.821.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.5.1", - "@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.9", - "@smithy/middleware-retry": "^4.1.10", - "@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.1", - "@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.17", - "@smithy/util-defaults-mode-node": "^4.0.17", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.5", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/core": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.821.0.tgz", - "integrity": "sha512-8eB3wKbmfciQFmxFq7hAjy7mXdUs7vBOR5SwT0ZtQBg0Txc18Lc9tMViqqdO6/KU7OukA6ib2IAVSjIJJEN7FQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/core": "^3.5.1", - "@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.1", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "fast-xml-parser": "4.4.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", @@ -3329,7 +1092,13 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/middleware-logger": { + "node_modules/@aws-sdk/middleware-host-header/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "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==", @@ -3343,7 +1112,13 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/middleware-recursion-detection": { + "node_modules/@aws-sdk/middleware-logger/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "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==", @@ -3358,16 +1133,22 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.821.0.tgz", - "integrity": "sha512-rw8q3TxygMg3VrofN04QyWVCCyGwz3bVthYmBZZseENPWG3Krz1OCKcyqjkTcAxMQlEywOske+GIiOasGKnJ3w==", + "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@aws-sdk/middleware-user-agent": { + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.826.0.tgz", + "integrity": "sha512-j404+EcfBbtTlAhyObjXbdKwwDXO1pCxHvR5Fw8FXNvp/H330j6YnXgs3SJ6d3bZUwUJ/ztPx2S5AlBbLVLDFw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.821.0", + "@aws-sdk/core": "3.826.0", "@aws-sdk/types": "3.821.0", "@aws-sdk/util-endpoints": "3.821.0", - "@smithy/core": "^3.5.1", + "@smithy/core": "^3.5.3", "@smithy/protocol-http": "^5.1.2", "@smithy/types": "^4.3.1", "tslib": "^2.6.2" @@ -3376,7 +1157,13 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/region-config-resolver": { + "node_modules/@aws-sdk/middleware-user-agent/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "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==", @@ -3393,488 +1180,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/util-endpoints": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.821.0.tgz", - "integrity": "sha512-Uknt/zUZnLE76zaAAPEayOeF5/4IZ2puTFXvcSCWHsi9m3tqbb9UozlnlVqvCZLCRWfQryZQoG2W4XSS3qgk5A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "@smithy/util-endpoints": "^3.0.6", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.821.0.tgz", - "integrity": "sha512-YwMXc9EvuzJgnLBTyiQly2juPujXwDgcMHB0iSN92tHe7Dd1jJ1feBmTgdClaaqCeHFUaFpw+3JU/ZUJ6LjR+A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/middleware-user-agent": "3.821.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/nested-clients/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==", - "license": "Apache-2.0", - "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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/middleware-retry": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.10.tgz", - "integrity": "sha512-RyhcA3sZIIvAo6r48b2Nx2qfg0OnyohlaV0fw415xrQyx5HQ2bvHl9vs/WBiDXIP49mCfws5wX4308c9Pi/isw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/protocol-http": "^5.1.2", - "@smithy/service-error-classification": "^4.0.5", - "@smithy/smithy-client": "^4.4.1", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.5", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/service-error-classification": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.5.tgz", - "integrity": "sha512-LvcfhrnCBvCmTee81pRlh1F39yTS/+kYleVeLCwNtkY8wtGg8V/ca9rbZZvYIl8OjlMtL6KIjaiL/lgVqHD2nA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/signature-v4/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-buffer-from/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-defaults-mode-browser": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.17.tgz", - "integrity": "sha512-HXq5181qnXmIwB7VrwqwP8rsJybHMoYuJnNoXy4PROs2pfSI4sWDMASF2i+7Lo+u64Y6xowhegcdxczowgJtZg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^4.0.4", - "@smithy/smithy-client": "^4.4.1", - "@smithy/types": "^4.3.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-defaults-mode-node": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.17.tgz", - "integrity": "sha512-RfU2A5LjFhEHw4Nwl1GZNitK4AUWu5jGtigAUDoQtfDUvYHpQxcuLw2QGAdKDtKRflIiHSZ8wXBDR36H9R2Ang==", - "license": "Apache-2.0", - "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.1", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-retry": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.5.tgz", - "integrity": "sha512-V7MSjVDTlEt/plmOFBn1762Dyu5uqMrV2Pl2X0dYk4XvWfdWJNe9Bs5Bzb56wkCuiWjSfClVMGcsuKrGj7S/yg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^4.0.5", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.808.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.808.0.tgz", - "integrity": "sha512-9x2QWfphkARZY5OGkl9dJxZlSlYM2l5inFeo2bKntGuwg4A4YUe5h7d5yJ6sZbam9h43eBrkOdumx03DAkQF9A==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.804.0", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/types": "^4.2.0", - "@smithy/util-config-provider": "^4.0.0", - "@smithy/util-middleware": "^4.0.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/region-config-resolver/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -3882,115 +1187,65 @@ "license": "0BSD" }, "node_modules/@aws-sdk/token-providers": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.812.0.tgz", - "integrity": "sha512-dbVBaKxrxE708ub5uH3w+cmKIeRQas+2Xf6rpckhohYY+IiflGOdK6aLrp3T6dOQgr/FJ37iQtcYNonAG+yVBQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.826.0.tgz", + "integrity": "sha512-iCOcVAqGPSHtQL8ZBXifZMEcHyUl9wJ8HvLZ5l1ohA/3ZNP+dqEPGi7jfhR5jZKs+xyp2jxByFqfil9PjI9c5A==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/nested-clients": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/nested-clients": "3.826.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-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-crypto/util/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@aws-crypto/util/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@aws-sdk/token-providers/node_modules/@aws-sdk/nested-clients": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.812.0.tgz", - "integrity": "sha512-FS/fImbEpJU3cXtBGR9fyVd+CP51eNKlvTMi3f4/6lSk3RmHjudNC9yEF/og3jtpT3O+7vsNOUW9mHco5IjdQQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.826.0.tgz", + "integrity": "sha512-p7olPq0uTtHqGuXI1GSc/gzKDvV55PMbLtnmupEDfnY9SoRu+QatbWQ6da9sI1lhOcNmRMgiNQBXFzaUFrG+SQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, @@ -3998,117 +1253,6 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/token-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/token-providers/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -4116,24 +1260,12 @@ "license": "0BSD" }, "node_modules/@aws-sdk/types": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.804.0.tgz", - "integrity": "sha512-A9qnsy9zQ8G89vrPPlNG9d1d8QcKRGqJKqwyGgS0dclJpwy6d1EWgQLIolKPl6vcFpLoe6avLOLxr+h8ur5wpg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/types/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "3.821.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.821.0.tgz", + "integrity": "sha512-Znroqdai1a90TlxGaJ+FK1lwC0fHpo97Xjsp5UKGR5JODYm7f9+/fF17ebO1KdoBr/Rm0UIFiF5VmI8ts9F1eA==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { @@ -4147,26 +1279,14 @@ "license": "0BSD" }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.808.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.808.0.tgz", - "integrity": "sha512-N6Lic98uc4ADB7fLWlzx+1uVnq04VgVjngZvwHoujcRg9YDhIg9dUDiTzD5VZv13g1BrPYmvYP1HhsildpGV6w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "3.804.0", - "@smithy/types": "^4.2.0", - "@smithy/util-endpoints": "^3.0.4", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/util-endpoints/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "3.821.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.821.0.tgz", + "integrity": "sha512-Uknt/zUZnLE76zaAAPEayOeF5/4IZ2puTFXvcSCWHsi9m3tqbb9UozlnlVqvCZLCRWfQryZQoG2W4XSS3qgk5A==", "license": "Apache-2.0", "dependencies": { + "@aws-sdk/types": "3.821.0", + "@smithy/types": "^4.3.1", + "@smithy/util-endpoints": "^3.0.6", "tslib": "^2.6.2" }, "engines": { @@ -4198,29 +1318,17 @@ "license": "0BSD" }, "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.804.0.tgz", - "integrity": "sha512-KfW6T6nQHHM/vZBBdGn6fMyG/MgX5lq82TDdX4HRQRRuHKLgBWGpKXqqvBwqIaCdXwWHgDrg2VQups6GqOWW2A==", + "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==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.804.0", - "@smithy/types": "^4.2.0", + "@aws-sdk/types": "3.821.0", + "@smithy/types": "^4.3.1", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, - "node_modules/@aws-sdk/util-user-agent-browser/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/util-user-agent-browser/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -4228,15 +1336,15 @@ "license": "0BSD" }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.812.0.tgz", - "integrity": "sha512-8pt+OkHhS2U0LDwnzwRnFxyKn8sjSe752OIZQCNv263odud8jQu9pYO2pKqb2kRBk9h9szynjZBDLXfnvSQ7Bg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.826.0.tgz", + "integrity": "sha512-wHw6bZQWIMcFF/8r03aY9Itp6JLBYY4absGGhCDK1dc3tPEfi8NVSdb05a/Oz+g4TVaDdxLo0OQ/OKMS1DFRHQ==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/types": "^4.2.0", + "@aws-sdk/middleware-user-agent": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { @@ -4251,34 +1359,26 @@ } } }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/util-user-agent-node/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, - "node_modules/@aws-sdk/util-utf8-browser": { - "version": "3.259.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", - "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", + "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==", "license": "Apache-2.0", "dependencies": { - "tslib": "^2.3.1" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/util-utf8-browser/node_modules/tslib": { + "node_modules/@aws-sdk/xml-builder/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", @@ -4326,6 +1426,150 @@ "dev": true, "license": "MIT" }, + "node_modules/@bufbuild/buf": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.54.0.tgz", + "integrity": "sha512-UkjZmVslA7YAxhUQVxE2O4HX4qD7aMspjkuG3vsjnvmAkiV6Jhz47z3focCuPI28e59H20TiQNhc9Y3fkffWPw==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "buf": "bin/buf", + "protoc-gen-buf-breaking": "bin/protoc-gen-buf-breaking", + "protoc-gen-buf-lint": "bin/protoc-gen-buf-lint" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@bufbuild/buf-darwin-arm64": "1.54.0", + "@bufbuild/buf-darwin-x64": "1.54.0", + "@bufbuild/buf-linux-aarch64": "1.54.0", + "@bufbuild/buf-linux-armv7": "1.54.0", + "@bufbuild/buf-linux-x64": "1.54.0", + "@bufbuild/buf-win32-arm64": "1.54.0", + "@bufbuild/buf-win32-x64": "1.54.0" + } + }, + "node_modules/@bufbuild/buf-darwin-arm64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.54.0.tgz", + "integrity": "sha512-MkwlxcuHH8YO2wyQ2nGAv5SwBRCR4PtA8zcQb7AR6q93Cgy314ac8blGjfpenprjI3kAAhxc9BQK4t+/hkIS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-darwin-x64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.54.0.tgz", + "integrity": "sha512-59Z+6BxvVwBbcpLOAwD8TLobngb9YUvUZ1nnP1IyIJnay/tIY+yfmgAdgMwm3VUZlbaFlURGmD34UAwEsxodGQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-aarch64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.54.0.tgz", + "integrity": "sha512-cUbvujfoAQGsnRH/+UfKxt0Hfe6PGHjM/gLiC2Kgv8fcoIWjPJMBBgdl/TLbq1QrVcCXSvMc16hW5ias7Jdyfw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-armv7": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-armv7/-/buf-linux-armv7-1.54.0.tgz", + "integrity": "sha512-xdKjzPsOo6E2eth3uGIRoVG9TpPVHOUucr0MeCRVhM2hb5gbM8KQLn6iDxVGbQFq6eL2qe+B0b8k9HfuwzirWA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-linux-x64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.54.0.tgz", + "integrity": "sha512-ZnfaE5GLAhyvR/ponDgG+s6FbtMEm+RaS2f0EoBLORYC7sK/Elfmw2Q0XcjHyEl83u4hELCqej9T0eUxbgxtow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-arm64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.54.0.tgz", + "integrity": "sha512-N5YlX8c6p+KZIWYmx03viYF/FLuY5GyzHgor17nuJUYhF1xFyIJL8v4mhqcQ8Pq0xua9IyRwmSxHJKyrdNatcg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@bufbuild/buf-win32-x64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.54.0.tgz", + "integrity": "sha512-PepTA9RcLCjukQhFPFBqKXF9mVwct+ZSBeuLjFuUVcHovdGUZXspNTb5LnuIDjWXx2fcALs0xb/FNUNd6pNjbA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@bufbuild/protobuf": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.4.0.tgz", @@ -6084,9 +3328,9 @@ } }, "node_modules/@google/genai": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@google/genai/-/genai-0.13.0.tgz", - "integrity": "sha512-eaEncWt875H7046T04mOpxpHJUM+jLIljEf+5QctRyOeChylE/nhpwm1bZWTRWoOu/t46R9r+PmgsJFhTpE7tQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.0.0.tgz", + "integrity": "sha512-IQiL8UlPblGDrMhTuiHZbfMDVx0KY3eYkmB5Ro9wwyXovYCFIhL5ZC7LP42FjFUj0eWUa4Auo8Ixqf2dqx9JjA==", "license": "Apache-2.0", "dependencies": { "google-auth-library": "^9.14.2", @@ -6096,6 +3340,9 @@ }, "engines": { "node": ">=18.0.0" + }, + "peerDependencies": { + "@modelcontextprotocol/sdk": "^1.11.0" } }, "node_modules/@grpc/grpc-js": { @@ -9896,18 +7143,6 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/abort-controller/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/abort-controller/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -9915,27 +7150,15 @@ "license": "0BSD" }, "node_modules/@smithy/config-resolver": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.1.2.tgz", - "integrity": "sha512-7r6mZGwb5LmLJ+zPtkLoznf2EtwEuSWdtid10pjGl/7HefCE4mueOkrfki8JCUm99W6UfP47/r3tbxx9CfBN5A==", + "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==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.1.1", - "@smithy/types": "^4.2.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.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/config-resolver/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { + "@smithy/util-middleware": "^4.0.4", "tslib": "^2.6.2" }, "engines": { @@ -9949,9 +7172,9 @@ "license": "0BSD" }, "node_modules/@smithy/core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.5.1.tgz", - "integrity": "sha512-xSw7bZEFKwOKrm/iv8e2BLt2ur98YZdrRD6nII8ditQeUsY2Q1JmIQ0rpILOhaLKYxxG2ivnoOpokzr9qLyDWA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.5.3.tgz", + "integrity": "sha512-xa5byV9fEguZNofCclv6v9ra0FYh5FATQW/da7FQUVTic94DfrN/NvmKZjrMyzbpqfot9ZjBaO8U1UeTbmSLuA==", "license": "Apache-2.0", "dependencies": { "@smithy/middleware-serde": "^4.0.8", @@ -9968,45 +7191,6 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/core/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/core/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/core/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10014,27 +7198,15 @@ "license": "0BSD" }, "node_modules/@smithy/credential-provider-imds": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.4.tgz", - "integrity": "sha512-jN6M6zaGVyB8FmNGG+xOPQB4N89M1x97MMdMnm1ESjljLS3Qju/IegQizKujaNcy2vXAvrz0en8bobe6E55FEA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.1.1", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.6.tgz", + "integrity": "sha512-hKMWcANhUiNbCJouYkZ9V3+/Qf9pteR1dnwgdyzR09R4ODEYx8BbUysHwRSyex4rZ9zapddZhLFTnT4ZijR4pw==", "license": "Apache-2.0", "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", "tslib": "^2.6.2" }, "engines": { @@ -10062,30 +7234,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/eventstream-codec/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/eventstream-codec/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10106,18 +7254,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/eventstream-serde-browser/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10137,116 +7273,12 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/eventstream-serde-config-resolver/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "license": "0BSD" }, - "node_modules/@smithy/eventstream-serde-node": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.2.0.tgz", - "integrity": "sha512-zpQMtJVqCUMn+pCSFcl9K/RPNtQE0NuMh8sKpCdEHafhwRsjP50Oq/4kMmvxSRy6d8Jslqd8BLvDngrUtmN9iA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/eventstream-serde-universal": "^2.2.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/eventstream-serde-node/node_modules/@aws-crypto/crc32": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", - "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/util": "^3.0.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^1.11.1" - } - }, - "node_modules/@smithy/eventstream-serde-node/node_modules/@aws-crypto/crc32/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" - }, - "node_modules/@smithy/eventstream-serde-node/node_modules/@aws-crypto/util": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", - "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", - "license": "Apache-2.0", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@aws-sdk/util-utf8-browser": "^3.0.0", - "tslib": "^1.11.1" - } - }, - "node_modules/@smithy/eventstream-serde-node/node_modules/@aws-crypto/util/node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" - }, - "node_modules/@smithy/eventstream-serde-node/node_modules/@smithy/eventstream-codec": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.2.0.tgz", - "integrity": "sha512-8janZoJw85nJmQZc4L8TuePp2pk1nxLgkxIR0TUjKJ5Dkj5oelB9WtiSSGXCQvNsJl0VSTvK/2ueMXxvpa9GVw==", - "license": "Apache-2.0", - "dependencies": { - "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^2.12.0", - "@smithy/util-hex-encoding": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@smithy/eventstream-serde-node/node_modules/@smithy/eventstream-serde-universal": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.2.0.tgz", - "integrity": "sha512-pvoe/vvJY0mOpuF84BEtyZoYfbehiFj8KKWk1ds2AT0mTLYFVs+7sBJZmioOFdBXKd48lfrx1vumdPdmGlCLxA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/eventstream-codec": "^2.2.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/eventstream-serde-node/node_modules/@smithy/util-hex-encoding": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.2.0.tgz", - "integrity": "sha512-7iKXR+/4TpLK194pVjKiasIyqMtTYJsgKgM242Y9uzt5dhHnUDvMNb+3xIhRJ9QhvqGii/5cRUt4fJn3dtXNHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/eventstream-serde-node/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "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", @@ -10261,18 +7293,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/eventstream-serde-universal/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10280,16 +7300,19 @@ "license": "0BSD" }, "node_modules/@smithy/fetch-http-handler": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.5.0.tgz", - "integrity": "sha512-BOWEBeppWhLn/no/JxUL/ghTfANTjT7kg3Ww2rPqTUY9R4yHPXxJ9JhMe3Z03LN3aPwiwlpDIUcVw1xDyHqEhw==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.4.tgz", + "integrity": "sha512-AMtBR5pHppYMVD7z7G+OlHHAcgAN7v0kVKEpHuTO4Gb199Gowh0taYi9oDStFeUhetkeP55JLSVlTW1n9rFtUw==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^3.3.0", - "@smithy/querystring-builder": "^2.2.0", - "@smithy/types": "^2.12.0", - "@smithy/util-base64": "^2.3.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/querystring-builder": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@smithy/fetch-http-handler/node_modules/tslib": { @@ -10299,12 +7322,12 @@ "license": "0BSD" }, "node_modules/@smithy/hash-node": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.2.tgz", - "integrity": "sha512-VnTpYPnRUE7yVhWozFdlxcYknv9UN7CeOqSrMH+V877v4oqtVYuoqhIhtSjmGPvYrYnAkaM61sLMKHvxL138yg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.4.tgz", + "integrity": "sha512-qnbTPUhCVnCgBp4z4BUJUhOEkVwxiEi1cyFM+Zj6o+aY8OFGxUQleKWq8ltgp3dujuhXojIvJWdoqpm6dVO3lQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.2.0", + "@smithy/types": "^4.3.1", "@smithy/util-buffer-from": "^4.0.0", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" @@ -10313,18 +7336,6 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/hash-node/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/hash-node/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10332,24 +7343,12 @@ "license": "0BSD" }, "node_modules/@smithy/invalid-dependency": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.2.tgz", - "integrity": "sha512-GatB4+2DTpgWPday+mnUkoumP54u/MDM/5u44KF9hIu8jF0uafZtQLcdfIKkIcUNuF/fBojpLEHZS/56JqPeXQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/invalid-dependency/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.4.tgz", + "integrity": "sha512-bNYMi7WKTJHu0gn26wg8OscncTt1t2b8KcsZxvOv56XA6cyXtOAAAaNP7+m45xfppXfOatXF3Sb1MNsLUgVLTw==", "license": "Apache-2.0", "dependencies": { + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { @@ -10363,15 +7362,15 @@ "license": "0BSD" }, "node_modules/@smithy/is-array-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", - "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", + "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==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/is-array-buffer/node_modules/tslib": { @@ -10381,38 +7380,13 @@ "license": "0BSD" }, "node_modules/@smithy/middleware-content-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.0.2.tgz", - "integrity": "sha512-hAfEXm1zU+ELvucxqQ7I8SszwQ4znWMbNv6PLMndN83JJN41EPuS93AIyh2N+gJ6x8QFhzSO6b7q2e6oClDI8A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-content-length/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-content-length/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "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==", "license": "Apache-2.0", "dependencies": { + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { @@ -10426,12 +7400,12 @@ "license": "0BSD" }, "node_modules/@smithy/middleware-endpoint": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.9.tgz", - "integrity": "sha512-AjDgX4UjORLltD/LZCBQTwjQqEfyrx/GeDTHcYLzIgf87pIT70tMWnN87NQpJru1K4ITirY2htSOxNECZJCBOg==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.11.tgz", + "integrity": "sha512-zDogwtRLzKl58lVS8wPcARevFZNBOOqnmzWWxVe9XiaXU2CADFjvJ9XfNibgkOWs08sxLuSr81NrpY4mgp9OwQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.5.1", + "@smithy/core": "^3.5.3", "@smithy/middleware-serde": "^4.0.8", "@smithy/node-config-provider": "^4.1.3", "@smithy/shared-ini-file-loader": "^4.0.4", @@ -10444,18 +7418,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/middleware-endpoint/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10463,18 +7425,18 @@ "license": "0BSD" }, "node_modules/@smithy/middleware-retry": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.7.tgz", - "integrity": "sha512-lFIFUJ0E/4I0UaIDY5usNUzNKAghhxO0lDH4TZktXMmE+e4ActD9F154Si0Unc01aCPzcwd+NcOwQw6AfXXRRQ==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.12.tgz", + "integrity": "sha512-wvIH70c4e91NtRxdaLZF+mbLZ/HcC6yg7ySKUiufL6ESp6zJUSnJucZ309AvG9nqCFHSRB5I6T3Ez1Q9wCh0Ww==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.1.1", - "@smithy/protocol-http": "^5.1.0", - "@smithy/service-error-classification": "^4.0.3", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/protocol-http": "^5.1.2", + "@smithy/service-error-classification": "^4.0.5", + "@smithy/smithy-client": "^4.4.3", + "@smithy/types": "^4.3.1", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "tslib": "^2.6.2", "uuid": "^9.0.1" }, @@ -10482,49 +7444,6 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/middleware-retry/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10545,31 +7464,6 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/middleware-serde/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/middleware-serde/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10589,18 +7483,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/middleware-stack/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10622,18 +7504,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/node-config-provider/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10656,57 +7526,6 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/node-http-handler/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/node-http-handler/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/node-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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/node-http-handler/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/node-http-handler/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10726,18 +7545,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/property-provider/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10745,16 +7552,16 @@ "license": "0BSD" }, "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==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", + "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.12.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/protocol-http/node_modules/tslib": { @@ -10764,17 +7571,17 @@ "license": "0BSD" }, "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==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.4.tgz", + "integrity": "sha512-SwREZcDnEYoh9tLNgMbpop+UTGq44Hl9tdj3rf+yeLcfH7+J8OXEBaMc2kDxtyRHu8BhSg9ADEx0gFHvpJgU8w==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^2.12.0", - "@smithy/util-uri-escape": "^2.2.0", + "@smithy/types": "^4.3.1", + "@smithy/util-uri-escape": "^4.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/querystring-builder/node_modules/tslib": { @@ -10796,18 +7603,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/querystring-parser/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10815,35 +7610,17 @@ "license": "0BSD" }, "node_modules/@smithy/service-error-classification": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.3.tgz", - "integrity": "sha512-FTbcajmltovWMjj3tksDQdD23b2w6gH+A0DYA1Yz3iSpjDj8fmkwy62UnXcWMy4d5YoMoSyLFHMfkEVEzbiN8Q==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.5.tgz", + "integrity": "sha512-LvcfhrnCBvCmTee81pRlh1F39yTS/+kYleVeLCwNtkY8wtGg8V/ca9rbZZvYIl8OjlMtL6KIjaiL/lgVqHD2nA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.2.0" + "@smithy/types": "^4.3.1" }, "engines": { "node": ">=18.0.0" } }, - "node_modules/@smithy/service-error-classification/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/service-error-classification/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "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", @@ -10857,18 +7634,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/shared-ini-file-loader/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -10876,96 +7641,22 @@ "license": "0BSD" }, "node_modules/@smithy/signature-v4": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-3.1.2.tgz", - "integrity": "sha512-3BcPylEsYtD0esM4Hoyml/+s7WP2LFhcM3J2AGdcL2vx9O60TtfpDOL72gjb4lU8NeRPeKAwR77YNyyGvMbuEA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.1.2.tgz", + "integrity": "sha512-d3+U/VpX7a60seHziWnVZOHuEgJlclufjkS6zhXvxcJgkJq4UWdH5eOBLzHRMx6gXjsdT9h6lfpmLzbrdupHgQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/is-array-buffer": "^3.0.0", - "@smithy/types": "^3.3.0", - "@smithy/util-hex-encoding": "^3.0.0", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-uri-escape": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", + "@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", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/signature-v4/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/util-buffer-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", - "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/util-hex-encoding": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", - "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/util-middleware": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.11.tgz", - "integrity": "sha512-dWpyc1e1R6VoXrwLoLDd57U1z6CwNSdkM69Ie4+6uYh2GC7Vg51Qtan7ITzczuVpqezdDTKJGJB95fFvvjU/ow==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^3.7.2", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/signature-v4/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", - "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/signature-v4/node_modules/tslib": { @@ -10975,240 +7666,21 @@ "license": "0BSD" }, "node_modules/@smithy/smithy-client": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.5.1.tgz", - "integrity": "sha512-jrbSQrYCho0yDaaf92qWgd+7nAeap5LtHTI51KXqmpIFCceKU3K9+vIVTUH72bOJngBMqa4kyu1VJhRcSrk/CQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.3.tgz", + "integrity": "sha512-xxzNYgA0HD6ETCe5QJubsxP0hQH3QK3kbpJz3QrosBCuIWyEXLR/CO5hFb2OeawEKUxMNhz3a1nuJNN2np2RMA==", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-endpoint": "^2.5.1", - "@smithy/middleware-stack": "^2.2.0", - "@smithy/protocol-http": "^3.3.0", - "@smithy/types": "^2.12.0", - "@smithy/util-stream": "^2.2.0", + "@smithy/core": "^3.5.3", + "@smithy/middleware-endpoint": "^4.1.11", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-stream": "^4.2.2", "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/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" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/middleware-endpoint": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.5.1.tgz", - "integrity": "sha512-1/8kFp6Fl4OsSIVTWHnNjLnTL8IqpIb/D3sTSczrKFnrE9VMNWxnrRKNvpUHOJ6zpGD5f62TPm7+17ilTJpiCQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^2.3.0", - "@smithy/node-config-provider": "^2.3.0", - "@smithy/shared-ini-file-loader": "^2.4.0", - "@smithy/types": "^2.12.0", - "@smithy/url-parser": "^2.2.0", - "@smithy/util-middleware": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/middleware-serde": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.3.0.tgz", - "integrity": "sha512-sIADe7ojwqTyvEQBe1nc/GXB9wdHhi9UwyX0lTyttmUWDJLP655ZYE1WngnNyXREme8I27KCaUhyhZWRXL0q7Q==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/middleware-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.2.0.tgz", - "integrity": "sha512-Qntc3jrtwwrsAC+X8wms8zhrTr0sFXnyEGhZd9sLtsJ/6gGQKFzNB+wWbOcpJd7BR8ThNCoKt76BuQahfMvpeA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/node-config-provider": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.3.0.tgz", - "integrity": "sha512-0elK5/03a1JPWMDPaS726Iw6LpQg80gFut1tNpPfxFuChEEklo2yL823V94SpTZTxmKlXFtFgsP55uh3dErnIg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/property-provider": "^2.2.0", - "@smithy/shared-ini-file-loader": "^2.4.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/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", - "@smithy/querystring-builder": "^2.2.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/property-provider": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.2.0.tgz", - "integrity": "sha512-+xiil2lFhtTRzXkx8F053AV46QnIw6e7MV8od5Mi68E1ICOjCeCHw2XfLnDEUHnT9WGUIkwcqavXjfwuJbGlpg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/querystring-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.2.0.tgz", - "integrity": "sha512-BvHCDrKfbG5Yhbpj4vsbuPV2GgcpHiAkLeIlcA1LtfpMz3jrqizP1+OguSNSj1MwBHEiN+jwNisXLGdajGDQJA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/shared-ini-file-loader": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.4.0.tgz", - "integrity": "sha512-WyujUJL8e1B6Z4PBfAqC/aGY1+C7T0w20Gih3yrvJSk97gpiVfB+y7c46T4Nunk+ZngLq0rOIdeVeIklk0R3OA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/url-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.2.0.tgz", - "integrity": "sha512-hoA4zm61q1mNTpksiSWp2nEl1dt3j726HdRhiNgVJQMj7mLp7dprtF57mOB6JvEk/x9d2bsuL5hlqZbBuHQylQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^2.2.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/util-hex-encoding": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.2.0.tgz", - "integrity": "sha512-7iKXR+/4TpLK194pVjKiasIyqMtTYJsgKgM242Y9uzt5dhHnUDvMNb+3xIhRJ9QhvqGii/5cRUt4fJn3dtXNHQ==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/util-middleware": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.2.0.tgz", - "integrity": "sha512-L1qpleXf9QD6LwLCJ5jddGkgWyuSvWBkJwWAZ6kFkdifdso+sk3L3O1HdmPvCdnCK3IS4qWyPxev01QMnfHSBw==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/util-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.2.0.tgz", - "integrity": "sha512-17faEXbYWIRst1aU9SvPZyMdWmqIrduZjVOqCPMIsWFNxs5yQQgFrJL6b2SdiCzyW9mJoDjFtgi53xx7EH+BXA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^2.5.0", - "@smithy/node-http-handler": "^2.5.0", - "@smithy/types": "^2.12.0", - "@smithy/util-base64": "^2.3.0", - "@smithy/util-buffer-from": "^2.2.0", - "@smithy/util-hex-encoding": "^2.2.0", - "@smithy/util-utf8": "^2.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/smithy-client/node_modules/tslib": { @@ -11218,15 +7690,15 @@ "license": "0BSD" }, "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==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", + "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/types/node_modules/tslib": { @@ -11249,18 +7721,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/url-parser/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -11268,55 +7728,17 @@ "license": "0BSD" }, "node_modules/@smithy/util-base64": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.3.0.tgz", - "integrity": "sha512-s3+eVwNeJuXUwuMbusncZNViuhv2LjVJ1nMwTqSA0XAC7gjKhqqxRdJPhR8+YrkoZ9IiIbFk/yK6ACe/xlF+hw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", + "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", "license": "Apache-2.0", "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "@smithy/util-utf8": "^2.3.0", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/util-base64/node_modules/@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-base64/node_modules/tslib": { @@ -11374,18 +7796,6 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/util-buffer-from/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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/util-buffer-from/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -11411,14 +7821,14 @@ "license": "0BSD" }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.14.tgz", - "integrity": "sha512-l7QnMX8VcDOH6n/fBRu4zqguSlOBZxFzWqp58dXFSARFBjNlmEDk5G/z4T7BMGr+rI0Pg8MkhmMUfEtHFgpy2g==", + "version": "4.0.19", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.19.tgz", + "integrity": "sha512-mvLMh87xSmQrV5XqnUYEPoiFFeEGYeAKIDDKdhE2ahqitm8OHM3aSvhqL6rrK6wm1brIk90JhxDf5lf2hbrLbQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.0.2", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/smithy-client": "^4.4.3", + "@smithy/types": "^4.3.1", "bowser": "^2.11.0", "tslib": "^2.6.2" }, @@ -11426,49 +7836,6 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/util-defaults-mode-browser/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -11476,60 +7843,17 @@ "license": "0BSD" }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.14.tgz", - "integrity": "sha512-Ujs1gsWDo3m/T63VWBTBmHLTD2UlU6J6FEokLCEp7OZQv45jcjLHoxTwgWsi8ULpsYozvH4MTWkRP+bhwr0vDg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/config-resolver": "^4.1.2", - "@smithy/credential-provider-imds": "^4.0.4", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/property-provider": "^4.0.2", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "4.0.19", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.19.tgz", + "integrity": "sha512-8tYnx+LUfj6m+zkUUIrIQJxPM1xVxfRBvoGHua7R/i6qAxOMjqR6CpEpDwKoIs1o0+hOjGvkKE23CafKL0vJ9w==", "license": "Apache-2.0", "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.3", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { @@ -11543,25 +7867,13 @@ "license": "0BSD" }, "node_modules/@smithy/util-endpoints": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.4.tgz", - "integrity": "sha512-VfFATC1bmZLV2858B/O1NpMcL32wYo8DPPhHxYxDCodDl3f3mSZ5oJheW1IF91A0EeAADz2WsakM/hGGPGNKLg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/node-config-provider": "^4.1.1", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-endpoints/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.6.tgz", + "integrity": "sha512-YARl3tFL3WgPuLzljRUnrS2ngLiUtkwhQtj8PAL13XZSyUiNLQxwG3fBBq3QXFqGFUXepIN73pINp3y8c2nBmA==", "license": "Apache-2.0", "dependencies": { + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { @@ -11605,18 +7917,6 @@ "node": ">=18.0.0" } }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@smithy/util-middleware/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -11624,25 +7924,13 @@ "license": "0BSD" }, "node_modules/@smithy/util-retry": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.3.tgz", - "integrity": "sha512-DPuYjZQDXmKr/sNvy9Spu8R/ESa2e22wXZzSAY6NkjOLj6spbIje/Aq8rT97iUMdDj0qHMRIe+bTxvlU74d9Ng==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/service-error-classification": "^4.0.3", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-retry/node_modules/@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.5.tgz", + "integrity": "sha512-V7MSjVDTlEt/plmOFBn1762Dyu5uqMrV2Pl2X0dYk4XvWfdWJNe9Bs5Bzb56wkCuiWjSfClVMGcsuKrGj7S/yg==", "license": "Apache-2.0", "dependencies": { + "@smithy/service-error-classification": "^4.0.5", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { @@ -11674,76 +7962,13 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/util-stream/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } + "node_modules/@smithy/util-stream/node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, - "node_modules/@smithy/util-stream/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-stream/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "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==", - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@smithy/util-stream/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==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^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/util-uri-escape": { + "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==", @@ -11755,24 +7980,6 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/util-stream/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "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" - }, - "engines": { - "node": ">=14.0.0" - } - }, "node_modules/@smithy/util-uri-escape/node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -13252,6 +9459,12 @@ "node": ">=6.5" } }, + "node_modules/abort-controller-x": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/abort-controller-x/-/abort-controller-x-0.4.3.tgz", + "integrity": "sha512-VtUwTNU8fpMwvWGn4xE93ywbogTYsuT+AUxAXOeelbXuQVIwNmC5YLeho9sH4vZ4ITW8414TTAOG1nW6uIVHCA==", + "license": "MIT" + }, "node_modules/accepts": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", @@ -14682,6 +10895,48 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-width": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", @@ -14909,6 +11164,13 @@ "dev": true, "license": "MIT" }, + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -16042,6 +12304,19 @@ "node": ">=6" } }, + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/error": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz", @@ -16860,6 +13135,13 @@ "node": ">=6" } }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true, + "license": "MIT" + }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -20662,6 +16944,19 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -20669,12 +16964,137 @@ "dev": true, "license": "MIT" }, + "node_modules/lint-staged": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.1.0.tgz", + "integrity": "sha512-HkpQh69XHxgCjObjejBT3s2ILwNjFx8M3nw+tJ/ssBauDlIpkx2RpqWSi1fBgkXLSSXnbR3iEq1NkVtpvV+FLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^5.4.1", + "commander": "^14.0.0", + "debug": "^4.4.1", + "lilconfig": "^3.1.3", + "listr2": "^8.3.3", + "micromatch": "^4.0.8", + "nano-spawn": "^1.0.2", + "pidtree": "^0.6.0", + "string-argv": "^0.3.2", + "yaml": "^2.8.0" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=20.17" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" + } + }, + "node_modules/lint-staged/node_modules/commander": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.0.tgz", + "integrity": "sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + } + }, + "node_modules/lint-staged/node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "license": "MIT", + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, "node_modules/listenercount": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==", "license": "ISC" }, + "node_modules/listr2": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.3.3.tgz", + "integrity": "sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/listr2/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/listr2/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/listr2/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/listr2/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -20933,6 +17353,180 @@ "node": ">=8" } }, + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/ansi-escapes": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-update/node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-function": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/log-update/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-update/node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/long": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", @@ -22935,6 +19529,19 @@ "node": "^18.17.0 || >=20.5.0" } }, + "node_modules/nano-spawn": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nano-spawn/-/nano-spawn-1.0.2.tgz", + "integrity": "sha512-21t+ozMQDAL/UGgQVBbZ/xXvNO10++ZPuTmKRO8k9V3AClVRht49ahtDjfY8l1q6nSHOrE5ASfthzH3ol6R/hg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/nano-spawn?sponsor=1" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -23022,6 +19629,39 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/nice-grpc": { + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/nice-grpc/-/nice-grpc-2.1.12.tgz", + "integrity": "sha512-J1n4Wg+D3IhRhGQb+iqh2OpiM0GzTve/kf2lnlW4S+xczmIEd0aHUDV1OsJ5a3q8GSTqJf+s4Rgg1M8uJltarw==", + "license": "MIT", + "dependencies": { + "@grpc/grpc-js": "^1.13.1", + "abort-controller-x": "^0.4.0", + "nice-grpc-common": "^2.0.2" + } + }, + "node_modules/nice-grpc-common": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/nice-grpc-common/-/nice-grpc-common-2.0.2.tgz", + "integrity": "sha512-7RNWbls5kAL1QVUOXvBsv1uO0wPQK3lHv+cY1gwkTzirnG1Nop4cBJZubpgziNbaVc/bl9QJcyvsf/NQxa3rjQ==", + "license": "MIT", + "dependencies": { + "ts-error": "^1.0.6" + } + }, + "node_modules/nice-grpc/node_modules/@grpc/grpc-js": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.4.tgz", + "integrity": "sha512-GsFaMXCkMqkKIvwCQjCrwH+GHbPKBjhwo/8ZuUkWHqbI73Kky9I+pQltrlT0+MWpedCoosda53lgjYfyEPgxBg==", + "license": "Apache-2.0", + "dependencies": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -25614,6 +22254,13 @@ "node": ">=0.10.0" } }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true, + "license": "MIT" + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -26376,6 +23023,49 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -26699,6 +23389,16 @@ "safe-buffer": "~5.2.0" } }, + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, "node_modules/string-template": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", @@ -27283,6 +23983,12 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-error": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ts-error/-/ts-error-1.0.6.tgz", + "integrity": "sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==", + "license": "MIT" + }, "node_modules/ts-morph": { "version": "25.0.1", "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-25.0.1.tgz", @@ -27402,7 +24108,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "license": "0BSD" + "dev": true }, "node_modules/turndown": { "version": "7.2.0", @@ -28964,24 +25670,6 @@ } }, "dependencies": { - "@anthropic-ai/bedrock-sdk": { - "version": "0.12.6", - "resolved": "https://registry.npmjs.org/@anthropic-ai/bedrock-sdk/-/bedrock-sdk-0.12.6.tgz", - "integrity": "sha512-g9tmm6zXf3+2P5Se+c2zi7jmZ6+t+qtfu8NhoNYxetPxn6ez1aeNQ+YfqzSMm/ZWye8hy3hcDhbRhWaHC2Wbwg==", - "requires": { - "@anthropic-ai/sdk": ">=0.36 <1", - "@aws-crypto/sha256-js": "^4.0.0", - "@aws-sdk/client-bedrock-runtime": "^3.797.0", - "@aws-sdk/credential-providers": "^3.796.0", - "@smithy/eventstream-serde-node": "^2.0.10", - "@smithy/fetch-http-handler": "^2.2.1", - "@smithy/protocol-http": "^3.0.6", - "@smithy/signature-v4": "^3.1.1", - "@smithy/smithy-client": "^2.1.9", - "@smithy/types": "^2.3.4", - "@smithy/util-base64": "^2.0.0" - } - }, "@anthropic-ai/sdk": { "version": "0.37.0", "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.37.0.tgz", @@ -29092,42 +25780,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -29149,26 +25801,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "requires": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - } - }, - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, "@smithy/is-array-buffer": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", @@ -29203,13 +25835,20 @@ } }, "@aws-crypto/sha256-js": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-4.0.0.tgz", - "integrity": "sha512-MHGJyjE7TX9aaqXj7zk2ppnFUOhaDs5sP+HtNS0evOxn72c+5njUmyJmpGd7TfyoDznZlHMmdo/xGUdu2NIjNQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", + "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", "requires": { - "@aws-crypto/util": "^4.0.0", + "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", - "tslib": "^1.11.1" + "tslib": "^2.6.2" + }, + "dependencies": { + "tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + } } }, "@aws-crypto/supports-web-crypto": { @@ -29228,37 +25867,70 @@ } }, "@aws-crypto/util": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-4.0.0.tgz", - "integrity": "sha512-2EnmPy2gsFZ6m8bwUQN4jq+IyXV3quHAcwPOS6ZA3k+geujiqI8aRokO2kFJe+idJ/P3v4qWI186rVMo0+zLDQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", + "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", "requires": { "@aws-sdk/types": "^3.222.0", - "@aws-sdk/util-utf8-browser": "^3.0.0", - "tslib": "^1.11.1" + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.6.2" + }, + "dependencies": { + "@smithy/is-array-buffer": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", + "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", + "requires": { + "tslib": "^2.6.2" + } + }, + "@smithy/util-buffer-from": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", + "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", + "requires": { + "@smithy/is-array-buffer": "^2.2.0", + "tslib": "^2.6.2" + } + }, + "@smithy/util-utf8": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", + "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", + "requires": { + "@smithy/util-buffer-from": "^2.2.0", + "tslib": "^2.6.2" + } + }, + "tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" + } } }, "@aws-sdk/client-bedrock-runtime": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.821.0.tgz", - "integrity": "sha512-+cxIkQBCa97Yr0vH5j0+bYJSuyJMuVO7IcVfApvobOWenSzm0MAd2EXSigd7+x97570OWBWNHAMiVVxBnBa08Q==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-bedrock-runtime/-/client-bedrock-runtime-3.826.0.tgz", + "integrity": "sha512-GWGdYCUq2n720qhMy5tNrb4Hslg3vQ7tDy6G9xFpLjsUzWVsnHlk8TYa9tbXNHN56X8klbybc+M9h6KAmkCedA==", "requires": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.821.0", - "@aws-sdk/credential-provider-node": "3.821.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/credential-provider-node": "3.826.0", "@aws-sdk/eventstream-handler-node": "3.821.0", "@aws-sdk/middleware-eventstream": "3.821.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.821.0", + "@aws-sdk/middleware-user-agent": "3.826.0", "@aws-sdk/region-config-resolver": "3.821.0", "@aws-sdk/types": "3.821.0", "@aws-sdk/util-endpoints": "3.821.0", "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.5.1", + "@smithy/core": "^3.5.3", "@smithy/eventstream-serde-browser": "^4.0.4", "@smithy/eventstream-serde-config-resolver": "^4.1.2", "@smithy/eventstream-serde-node": "^4.0.4", @@ -29266,21 +25938,21 @@ "@smithy/hash-node": "^4.0.4", "@smithy/invalid-dependency": "^4.0.4", "@smithy/middleware-content-length": "^4.0.4", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-retry": "^4.1.10", + "@smithy/middleware-endpoint": "^4.1.11", + "@smithy/middleware-retry": "^4.1.12", "@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.1", + "@smithy/smithy-client": "^4.4.3", "@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.17", - "@smithy/util-defaults-mode-node": "^4.0.17", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", "@smithy/util-endpoints": "^3.0.6", "@smithy/util-middleware": "^4.0.4", "@smithy/util-retry": "^4.0.5", @@ -29291,366 +25963,6 @@ "uuid": "^9.0.1" }, "dependencies": { - "@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "requires": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - } - }, - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - } - } - }, - "@aws-sdk/client-sso": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.821.0.tgz", - "integrity": "sha512-aDEBZUKUd/+Tvudi0d9KQlqt2OW2P27LATZX0jkNC8yVk4145bAPS04EYoqdKLuyUn/U33DibEOgKUpxZB12jQ==", - "requires": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.821.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.821.0", - "@aws-sdk/region-config-resolver": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.821.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.821.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.5.1", - "@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.9", - "@smithy/middleware-retry": "^4.1.10", - "@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.1", - "@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.17", - "@smithy/util-defaults-mode-node": "^4.0.17", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.5", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/core": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.821.0.tgz", - "integrity": "sha512-8eB3wKbmfciQFmxFq7hAjy7mXdUs7vBOR5SwT0ZtQBg0Txc18Lc9tMViqqdO6/KU7OukA6ib2IAVSjIJJEN7FQ==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/core": "^3.5.1", - "@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.1", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "fast-xml-parser": "4.4.1", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/credential-provider-env": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.821.0.tgz", - "integrity": "sha512-C+s/A72pd7CXwEsJj9+Uq9T726iIfIF18hGRY8o82xcIEfOyakiPnlisku8zZOaAu+jm0CihbbYN4NyYNQ+HZQ==", - "requires": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/credential-provider-http": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.821.0.tgz", - "integrity": "sha512-gIRzTLnAsRfRSNarCag7G7rhcHagz4x5nNTWRihQs5cwTOghEExDy7Tj5m4TEkv3dcTAsNn+l4tnR4nZXo6R+Q==", - "requires": { - "@aws-sdk/core": "3.821.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.1", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/credential-provider-ini": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.821.0.tgz", - "integrity": "sha512-VRTrmsca8kBHtY1tTek1ce+XkK/H0fzodBKcilM/qXjTyumMHPAzVAxKZfSvGC+28/pXyQzhOEyxZfw7giCiWA==", - "requires": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/credential-provider-env": "3.821.0", - "@aws-sdk/credential-provider-http": "3.821.0", - "@aws-sdk/credential-provider-process": "3.821.0", - "@aws-sdk/credential-provider-sso": "3.821.0", - "@aws-sdk/credential-provider-web-identity": "3.821.0", - "@aws-sdk/nested-clients": "3.821.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", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/credential-provider-node": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.821.0.tgz", - "integrity": "sha512-oBgbcgOXWMgknAfhIdTeHSSVIv+k2LXN9oTbxu1r++o4WWBWrEQ8mHU0Zo9dfr7Uaoqi3pezYZznsBkXnMLEOg==", - "requires": { - "@aws-sdk/credential-provider-env": "3.821.0", - "@aws-sdk/credential-provider-http": "3.821.0", - "@aws-sdk/credential-provider-ini": "3.821.0", - "@aws-sdk/credential-provider-process": "3.821.0", - "@aws-sdk/credential-provider-sso": "3.821.0", - "@aws-sdk/credential-provider-web-identity": "3.821.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", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/credential-provider-process": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.821.0.tgz", - "integrity": "sha512-e18ucfqKB3ICNj5RP/FEdvUfhVK6E9MALOsl8pKP13mwegug46p/1BsZWACD5n+Zf9ViiiHxIO7td03zQixfwA==", - "requires": { - "@aws-sdk/core": "3.821.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" - } - }, - "@aws-sdk/credential-provider-sso": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.821.0.tgz", - "integrity": "sha512-Dt+pheBLom4O/egO4L75/72k9C1qtUOLl0F0h6lmqZe4Mvhz+wDtjoO/MdGC/P1q0kcIX/bBKr0NQ3cIvAH8pA==", - "requires": { - "@aws-sdk/client-sso": "3.821.0", - "@aws-sdk/core": "3.821.0", - "@aws-sdk/token-providers": "3.821.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" - } - }, - "@aws-sdk/credential-provider-web-identity": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.821.0.tgz", - "integrity": "sha512-FF5wnRJkxSQaCVVvWNv53K1MhTMgH8d+O+MHTbkv51gVIgVATrtfFQMKBLcEAxzXrgAliIO3LiNv+1TqqBZ+BA==", - "requires": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/nested-clients": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/middleware-user-agent": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.821.0.tgz", - "integrity": "sha512-rw8q3TxygMg3VrofN04QyWVCCyGwz3bVthYmBZZseENPWG3Krz1OCKcyqjkTcAxMQlEywOske+GIiOasGKnJ3w==", - "requires": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.821.0", - "@smithy/core": "^3.5.1", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@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" - } - }, - "@aws-sdk/token-providers": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.821.0.tgz", - "integrity": "sha512-qJ7wgKhdxGbPg718zWXbCYKDuSWZNU3TSw64hPRW6FtbZrIyZxObpiTKC6DKwfsVoZZhHEoP/imGykN1OdOTJA==", - "requires": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/nested-clients": "3.821.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" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/util-endpoints": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.821.0.tgz", - "integrity": "sha512-Uknt/zUZnLE76zaAAPEayOeF5/4IZ2puTFXvcSCWHsi9m3tqbb9UozlnlVqvCZLCRWfQryZQoG2W4XSS3qgk5A==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "@smithy/util-endpoints": "^3.0.6", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/util-user-agent-node": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.821.0.tgz", - "integrity": "sha512-YwMXc9EvuzJgnLBTyiQly2juPujXwDgcMHB0iSN92tHe7Dd1jJ1feBmTgdClaaqCeHFUaFpw+3JU/ZUJ6LjR+A==", - "requires": { - "@aws-sdk/middleware-user-agent": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@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" - } - }, - "@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==", - "requires": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "tslib": "^2.6.2" - } - }, "@smithy/eventstream-serde-node": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-4.0.4.tgz", @@ -29661,241 +25973,6 @@ "tslib": "^2.6.2" } }, - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/middleware-retry": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.10.tgz", - "integrity": "sha512-RyhcA3sZIIvAo6r48b2Nx2qfg0OnyohlaV0fw415xrQyx5HQ2bvHl9vs/WBiDXIP49mCfws5wX4308c9Pi/isw==", - "requires": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/protocol-http": "^5.1.2", - "@smithy/service-error-classification": "^4.0.5", - "@smithy/smithy-client": "^4.4.1", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.5", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - } - }, - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/service-error-classification": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.5.tgz", - "integrity": "sha512-LvcfhrnCBvCmTee81pRlh1F39yTS/+kYleVeLCwNtkY8wtGg8V/ca9rbZZvYIl8OjlMtL6KIjaiL/lgVqHD2nA==", - "requires": { - "@smithy/types": "^4.3.1" - } - }, - "@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==", - "requires": { - "@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", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "requires": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/is-array-buffer": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-defaults-mode-browser": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.17.tgz", - "integrity": "sha512-HXq5181qnXmIwB7VrwqwP8rsJybHMoYuJnNoXy4PROs2pfSI4sWDMASF2i+7Lo+u64Y6xowhegcdxczowgJtZg==", - "requires": { - "@smithy/property-provider": "^4.0.4", - "@smithy/smithy-client": "^4.4.1", - "@smithy/types": "^4.3.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-defaults-mode-node": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.17.tgz", - "integrity": "sha512-RfU2A5LjFhEHw4Nwl1GZNitK4AUWu5jGtigAUDoQtfDUvYHpQxcuLw2QGAdKDtKRflIiHSZ8wXBDR36H9R2Ang==", - "requires": { - "@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.1", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/util-endpoints": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.6.tgz", - "integrity": "sha512-YARl3tFL3WgPuLzljRUnrS2ngLiUtkwhQtj8PAL13XZSyUiNLQxwG3fBBq3QXFqGFUXepIN73pINp3y8c2nBmA==", - "requires": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-retry": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.5.tgz", - "integrity": "sha512-V7MSjVDTlEt/plmOFBn1762Dyu5uqMrV2Pl2X0dYk4XvWfdWJNe9Bs5Bzb56wkCuiWjSfClVMGcsuKrGj7S/yg==", - "requires": { - "@smithy/service-error-classification": "^4.0.5", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -29904,170 +25981,51 @@ } }, "@aws-sdk/client-cognito-identity": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.812.0.tgz", - "integrity": "sha512-LWkP+Vb2f6aNaway06XvFZG3altSXltAClzCz9cTFuOfKG6V2X+0VWsW9cnFRV4+MFFJW3iQAaPMQ1fBO9Rusg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.826.0.tgz", + "integrity": "sha512-3SStkRCHoB7a2Q4aGA++Zvlps8qxJhtCgSRs9cOSL9ldoYGCjOATkMCYmQD9iySge/WULPDEPf5qYlAyGfoRCg==", "requires": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/credential-provider-node": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/credential-provider-node": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { - "@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "requires": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - } - }, - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - } - } - }, - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "requires": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30076,169 +26034,50 @@ } }, "@aws-sdk/client-sso": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.812.0.tgz", - "integrity": "sha512-O//smQRj1+RXELB7xX54s5pZB0V69KHXpUZmz8V+8GAYO1FKTHfbpUgK+zyMNb+lFZxG9B69yl8pWPZ/K8bvxA==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.826.0.tgz", + "integrity": "sha512-/FEKnUC3xPkLL4RuRydwzx+y4b55HIX6qLPbGnyIs+sNmCUyc/62ijtV1Ml+b++YzEF6jWNBsJOxeyZdgrJ3Ig==", "requires": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { - "@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "requires": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - } - }, - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - } - } - }, - "@smithy/fetch-http-handler": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.2.tgz", - "integrity": "sha512-+9Dz8sakS9pe7f2cBocpJXdeVjMopUDLgZs1yWeu7h++WqSbjUYv/JAJwKwXw1HV6gq1jyWjxuyn24E2GhoEcQ==", - "requires": { - "@smithy/protocol-http": "^5.1.0", - "@smithy/querystring-builder": "^4.0.2", - "@smithy/types": "^4.2.0", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-builder": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.2.tgz", - "integrity": "sha512-NTOs0FwHw1vimmQM4ebh+wFQvOwkEf/kQL6bSM1Lock+Bv4I89B3hGYoUEPkmvYPkDKyp5UdXJYu+PoTQ3T31Q==", - "requires": { - "@smithy/types": "^4.2.0", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "requires": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30247,85 +26086,27 @@ } }, "@aws-sdk/core": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.812.0.tgz", - "integrity": "sha512-myWA9oHMBVDObKrxG+puAkIGs8igcWInQ1PWCRTS/zN4BkhUMFjjh/JPV/4Vzvtvj5E36iujq2WtlrDLl1PpOw==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.826.0.tgz", + "integrity": "sha512-BGbQYzWj3ps+dblq33FY5tz/SsgJCcXX0zjQlSC07tYvU1jHTUvsefphyig+fY38xZ4wdKjbTop+KUmXUYrOXw==", "requires": { - "@aws-sdk/types": "3.804.0", - "@smithy/core": "^3.3.3", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/property-provider": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/signature-v4": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/util-middleware": "^4.0.2", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/xml-builder": "3.821.0", + "@smithy/core": "^3.5.3", + "@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.3", + "@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" }, "dependencies": { - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/signature-v4": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.1.0.tgz", - "integrity": "sha512-4t5WX60sL3zGJF/CtZsUQTs3UrZEDO2P7pEaElrekbLqkWPYkgqNW1oeiNYC6xXifBnT9dVBOnNQRvOE9riU9w==", - "requires": { - "@smithy/is-array-buffer": "^4.0.0", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-hex-encoding": "^4.0.0", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-uri-escape": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "requires": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30334,25 +26115,17 @@ } }, "@aws-sdk/credential-provider-cognito-identity": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.812.0.tgz", - "integrity": "sha512-SrEGXP1zs2Cy3jjOwM8eh+UZkr28z7rvjF+cgV4bpOti5F/mzPyVoIxDkG8BQ2sZdAwa9rgEhhOl4CcKjoJoTA==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.826.0.tgz", + "integrity": "sha512-WnHLJD1iy0Gqyv0S7PXI+c1c9xBY8L5XnESOzYM78Sx1zlVHw557ZtQM1lKtHa6DiGMN4apYZr0lmalgmtHpQQ==", "requires": { - "@aws-sdk/client-cognito-identity": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/client-cognito-identity": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30361,25 +26134,17 @@ } }, "@aws-sdk/credential-provider-env": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.812.0.tgz", - "integrity": "sha512-Ge7IEu06ANurGBZx39q9CNN/ncqb1K8lpKZCY969uNWO0/7YPhnplrRJGMZYIS35nD2mBm3ortEKjY/wMZZd5g==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.826.0.tgz", + "integrity": "sha512-DK3pQY8+iKK3MGDdC3uOZQ2psU01obaKlTYhEwNu4VWzgwQL4Vi3sWj4xSWGEK41vqZxiRLq6fOq7ysRI+qEZA==", "requires": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30388,93 +26153,22 @@ } }, "@aws-sdk/credential-provider-http": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.812.0.tgz", - "integrity": "sha512-Vux2U42vPGXeE407Lp6v3yVA65J7hBO9rB67LXshyGVi7VZLAYWc4mrZxNJNqabEkjcDEmMQQakLPT6zc5SvFw==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.826.0.tgz", + "integrity": "sha512-N+IVZBh+yx/9GbMZTKO/gErBi/FYZQtcFRItoLbY+6WU+0cSWyZYfkoeOxHmQV3iX9k65oljERIWUmL9x6OSQg==", "requires": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/property-provider": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", + "@aws-sdk/core": "3.826.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.3", + "@smithy/types": "^4.3.1", + "@smithy/util-stream": "^4.2.2", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/fetch-http-handler": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.2.tgz", - "integrity": "sha512-+9Dz8sakS9pe7f2cBocpJXdeVjMopUDLgZs1yWeu7h++WqSbjUYv/JAJwKwXw1HV6gq1jyWjxuyn24E2GhoEcQ==", - "requires": { - "@smithy/protocol-http": "^5.1.0", - "@smithy/querystring-builder": "^4.0.2", - "@smithy/types": "^4.2.0", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-builder": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.2.tgz", - "integrity": "sha512-NTOs0FwHw1vimmQM4ebh+wFQvOwkEf/kQL6bSM1Lock+Bv4I89B3hGYoUEPkmvYPkDKyp5UdXJYu+PoTQ3T31Q==", - "requires": { - "@smithy/types": "^4.2.0", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "requires": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30483,189 +26177,70 @@ } }, "@aws-sdk/credential-provider-ini": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.812.0.tgz", - "integrity": "sha512-oltqGvQ488xtPY5wrNjbD+qQYYkuCjn30IDE1qKMxJ58EM6UVTQl3XV44Xq07xfF5gKwVJQkfIyOkRAguOVybg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.826.0.tgz", + "integrity": "sha512-g7n+qSklq/Lzjxe2Ke5QFNCgYn26a3ydZnbFIk8QqYin4pzG+qiunaqJjpV3c/EeHMlfK8bBc7MXAylKzGRccQ==", "requires": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/credential-provider-env": "3.812.0", - "@aws-sdk/credential-provider-http": "3.812.0", - "@aws-sdk/credential-provider-process": "3.812.0", - "@aws-sdk/credential-provider-sso": "3.812.0", - "@aws-sdk/credential-provider-web-identity": "3.812.0", - "@aws-sdk/nested-clients": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/credential-provider-imds": "^4.0.4", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/credential-provider-env": "3.826.0", + "@aws-sdk/credential-provider-http": "3.826.0", + "@aws-sdk/credential-provider-process": "3.826.0", + "@aws-sdk/credential-provider-sso": "3.826.0", + "@aws-sdk/credential-provider-web-identity": "3.826.0", + "@aws-sdk/nested-clients": "3.826.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", "tslib": "^2.6.2" }, "dependencies": { - "@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "requires": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - } - }, - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - } - } - }, "@aws-sdk/nested-clients": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.812.0.tgz", - "integrity": "sha512-FS/fImbEpJU3cXtBGR9fyVd+CP51eNKlvTMi3f4/6lSk3RmHjudNC9yEF/og3jtpT3O+7vsNOUW9mHco5IjdQQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.826.0.tgz", + "integrity": "sha512-p7olPq0uTtHqGuXI1GSc/gzKDvV55PMbLtnmupEDfnY9SoRu+QatbWQ6da9sI1lhOcNmRMgiNQBXFzaUFrG+SQ==", "requires": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" } }, - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "requires": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30674,32 +26249,24 @@ } }, "@aws-sdk/credential-provider-node": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.812.0.tgz", - "integrity": "sha512-SnvSWBP6cr9nqx784eETnL2Zl7ZnMB/oJgFVEG1aejAGbT1H9gTpMwuUsBXk4u/mEYe3f1lh1Wqo+HwDgNkfrg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.826.0.tgz", + "integrity": "sha512-UfIJXxHjmSxH6bea00HBPLkjNI2D04enQA/xNLZvB+4xtzt1/gYdCis1P4/73f5aGVVVB4/zQMobBbnjkrmbQw==", "requires": { - "@aws-sdk/credential-provider-env": "3.812.0", - "@aws-sdk/credential-provider-http": "3.812.0", - "@aws-sdk/credential-provider-ini": "3.812.0", - "@aws-sdk/credential-provider-process": "3.812.0", - "@aws-sdk/credential-provider-sso": "3.812.0", - "@aws-sdk/credential-provider-web-identity": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/credential-provider-imds": "^4.0.4", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/credential-provider-env": "3.826.0", + "@aws-sdk/credential-provider-http": "3.826.0", + "@aws-sdk/credential-provider-ini": "3.826.0", + "@aws-sdk/credential-provider-process": "3.826.0", + "@aws-sdk/credential-provider-sso": "3.826.0", + "@aws-sdk/credential-provider-web-identity": "3.826.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", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30708,26 +26275,18 @@ } }, "@aws-sdk/credential-provider-process": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.812.0.tgz", - "integrity": "sha512-YI8bb153XeEOb59F9KtTZEwDAc14s2YHZz58+OFiJ2udnKsPV87mNiFhJPW6ba9nmOLXVat5XDcwtVT1b664wg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.826.0.tgz", + "integrity": "sha512-kURrc4amu3NLtw1yZw7EoLNEVhmOMRUTs+chaNcmS+ERm3yK0nKjaJzmKahmwlTQTSl3wJ8jjK7x962VPo+zWw==", "requires": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/core": "3.826.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" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30736,28 +26295,20 @@ } }, "@aws-sdk/credential-provider-sso": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.812.0.tgz", - "integrity": "sha512-ODsPcNhgiO6GOa82TVNskM97mml9rioe9Cbhemz48lkfDQPv1u06NaCR0o3FsvprX1sEhMvJTR3sE1fyEOzvJQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.826.0.tgz", + "integrity": "sha512-F19J3zcfoom6OnQ0MyAtvduVKQXPgkz9i5ExSO01J2CzjbyMhCDA99qAjHYe+LwhW+W7P/jzBPd0+uOQ2Nhh9Q==", "requires": { - "@aws-sdk/client-sso": "3.812.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/token-providers": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/client-sso": "3.826.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/token-providers": "3.826.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" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30766,182 +26317,63 @@ } }, "@aws-sdk/credential-provider-web-identity": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.812.0.tgz", - "integrity": "sha512-E9Bmiujvm/Hp9DM/Vc1S+D0pQbx8/x4dR/zyAEZU9EoRq0duQOQ1reWYWbebYmL1OklcVpTfKV0a/VCwuAtGSg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.826.0.tgz", + "integrity": "sha512-o27GZ6Hy7qhuvMFVUL2eFEpBzf33Jaa/x3u3SHwU0nL7ko7jmbpeF0x4+wmagpI9X2IvVlUxIs0VaQ3YayPLEA==", "requires": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/nested-clients": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/nested-clients": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "requires": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - } - }, - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - } - } - }, "@aws-sdk/nested-clients": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.812.0.tgz", - "integrity": "sha512-FS/fImbEpJU3cXtBGR9fyVd+CP51eNKlvTMi3f4/6lSk3RmHjudNC9yEF/og3jtpT3O+7vsNOUW9mHco5IjdQQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.826.0.tgz", + "integrity": "sha512-p7olPq0uTtHqGuXI1GSc/gzKDvV55PMbLtnmupEDfnY9SoRu+QatbWQ6da9sI1lhOcNmRMgiNQBXFzaUFrG+SQ==", "requires": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" } }, - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "requires": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30950,195 +26382,76 @@ } }, "@aws-sdk/credential-providers": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.812.0.tgz", - "integrity": "sha512-hT7Kr8Ao+NS9b8KCB/U8cmpr0DcWOZNZNRBGAOc4eq65JpsRv177QmSqjh75vhM9BzchH3VymcP4GeMoy4SuvA==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.826.0.tgz", + "integrity": "sha512-2wuJFyI5I1LTN3dAF9AzyPDX5zn8/3hWxE8+M3Q1iAP/JH4dBB3SFyvE88Ts01iQ/n4Hu8cAlU5Ke1dnrCxUnw==", "requires": { - "@aws-sdk/client-cognito-identity": "3.812.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/credential-provider-cognito-identity": "3.812.0", - "@aws-sdk/credential-provider-env": "3.812.0", - "@aws-sdk/credential-provider-http": "3.812.0", - "@aws-sdk/credential-provider-ini": "3.812.0", - "@aws-sdk/credential-provider-node": "3.812.0", - "@aws-sdk/credential-provider-process": "3.812.0", - "@aws-sdk/credential-provider-sso": "3.812.0", - "@aws-sdk/credential-provider-web-identity": "3.812.0", - "@aws-sdk/nested-clients": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/credential-provider-imds": "^4.0.4", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/client-cognito-identity": "3.826.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/credential-provider-cognito-identity": "3.826.0", + "@aws-sdk/credential-provider-env": "3.826.0", + "@aws-sdk/credential-provider-http": "3.826.0", + "@aws-sdk/credential-provider-ini": "3.826.0", + "@aws-sdk/credential-provider-node": "3.826.0", + "@aws-sdk/credential-provider-process": "3.826.0", + "@aws-sdk/credential-provider-sso": "3.826.0", + "@aws-sdk/credential-provider-web-identity": "3.826.0", + "@aws-sdk/nested-clients": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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", "tslib": "^2.6.2" }, "dependencies": { - "@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "requires": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - } - }, - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - } - } - }, "@aws-sdk/nested-clients": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.812.0.tgz", - "integrity": "sha512-FS/fImbEpJU3cXtBGR9fyVd+CP51eNKlvTMi3f4/6lSk3RmHjudNC9yEF/og3jtpT3O+7vsNOUW9mHco5IjdQQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.826.0.tgz", + "integrity": "sha512-p7olPq0uTtHqGuXI1GSc/gzKDvV55PMbLtnmupEDfnY9SoRu+QatbWQ6da9sI1lhOcNmRMgiNQBXFzaUFrG+SQ==", "requires": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" } }, - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "requires": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -31157,23 +26470,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -31192,32 +26488,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -31226,33 +26496,16 @@ } }, "@aws-sdk/middleware-host-header": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.804.0.tgz", - "integrity": "sha512-bum1hLVBrn2lJCi423Z2fMUYtsbkGI2s4N+2RI2WSjvbaVyMSv/WcejIrjkqiiMR+2Y7m5exgoKeg4/TODLDPQ==", + "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==", "requires": { - "@aws-sdk/types": "3.804.0", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", + "@aws-sdk/types": "3.821.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -31261,23 +26514,15 @@ } }, "@aws-sdk/middleware-logger": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.804.0.tgz", - "integrity": "sha512-w/qLwL3iq0KOPQNat0Kb7sKndl9BtceigINwBU7SpkYWX9L/Lem6f8NPEKrC9Tl4wDBht3Yztub4oRTy/horJA==", + "version": "3.821.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.821.0.tgz", + "integrity": "sha512-0cvI0ipf2tGx7fXYEEN5fBeZDz2RnHyb9xftSgUsEq7NBxjV0yTZfLJw6Za5rjE6snC80dRN8+bTNR1tuG89zA==", "requires": { - "@aws-sdk/types": "3.804.0", - "@smithy/types": "^4.2.0", + "@aws-sdk/types": "3.821.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -31286,33 +26531,16 @@ } }, "@aws-sdk/middleware-recursion-detection": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.804.0.tgz", - "integrity": "sha512-zqHOrvLRdsUdN/ehYfZ9Tf8svhbiLLz5VaWUz22YndFv6m9qaAcijkpAOlKexsv3nLBMJdSdJ6GUTAeIy3BZzw==", + "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==", "requires": { - "@aws-sdk/types": "3.804.0", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", + "@aws-sdk/types": "3.821.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -31321,527 +26549,19 @@ } }, "@aws-sdk/middleware-user-agent": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.812.0.tgz", - "integrity": "sha512-r+HFwtSvnAs6Fydp4mijylrTX0og9p/xfxOcKsqhMuk3HpZAIcf9sSjRQI6MBusYklg7pnM4sGEnPAZIrdRotA==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.826.0.tgz", + "integrity": "sha512-j404+EcfBbtTlAhyObjXbdKwwDXO1pCxHvR5Fw8FXNvp/H330j6YnXgs3SJ6d3bZUwUJ/ztPx2S5AlBbLVLDFw==", "requires": { - "@aws-sdk/core": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@smithy/core": "^3.3.3", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, - "tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" - } - } - }, - "@aws-sdk/nested-clients": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.821.0.tgz", - "integrity": "sha512-2IuHcUsWw44ftSEDYU4dvktTEqgyDvkOcfpoGC/UmT4Qo6TVCP3U5tWEGpNK9nN+7nLvekruxxG/jaMt5/oWVw==", - "requires": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.821.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.821.0", - "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/core": "3.826.0", "@aws-sdk/types": "3.821.0", "@aws-sdk/util-endpoints": "3.821.0", - "@aws-sdk/util-user-agent-browser": "3.821.0", - "@aws-sdk/util-user-agent-node": "3.821.0", - "@smithy/config-resolver": "^4.1.4", - "@smithy/core": "^3.5.1", - "@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.9", - "@smithy/middleware-retry": "^4.1.10", - "@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/core": "^3.5.3", "@smithy/protocol-http": "^5.1.2", - "@smithy/smithy-client": "^4.4.1", "@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.17", - "@smithy/util-defaults-mode-node": "^4.0.17", - "@smithy/util-endpoints": "^3.0.6", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.5", - "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { - "@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "requires": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - } - }, - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - } - } - }, - "@aws-sdk/core": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.821.0.tgz", - "integrity": "sha512-8eB3wKbmfciQFmxFq7hAjy7mXdUs7vBOR5SwT0ZtQBg0Txc18Lc9tMViqqdO6/KU7OukA6ib2IAVSjIJJEN7FQ==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/core": "^3.5.1", - "@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.1", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "fast-xml-parser": "4.4.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/middleware-user-agent": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.821.0.tgz", - "integrity": "sha512-rw8q3TxygMg3VrofN04QyWVCCyGwz3bVthYmBZZseENPWG3Krz1OCKcyqjkTcAxMQlEywOske+GIiOasGKnJ3w==", - "requires": { - "@aws-sdk/core": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@aws-sdk/util-endpoints": "3.821.0", - "@smithy/core": "^3.5.1", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@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" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/util-endpoints": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.821.0.tgz", - "integrity": "sha512-Uknt/zUZnLE76zaAAPEayOeF5/4IZ2puTFXvcSCWHsi9m3tqbb9UozlnlVqvCZLCRWfQryZQoG2W4XSS3qgk5A==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "@smithy/util-endpoints": "^3.0.6", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@aws-sdk/types": "3.821.0", - "@smithy/types": "^4.3.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "@aws-sdk/util-user-agent-node": { - "version": "3.821.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.821.0.tgz", - "integrity": "sha512-YwMXc9EvuzJgnLBTyiQly2juPujXwDgcMHB0iSN92tHe7Dd1jJ1feBmTgdClaaqCeHFUaFpw+3JU/ZUJ6LjR+A==", - "requires": { - "@aws-sdk/middleware-user-agent": "3.821.0", - "@aws-sdk/types": "3.821.0", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@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" - } - }, - "@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==", - "requires": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/property-provider": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/middleware-retry": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.10.tgz", - "integrity": "sha512-RyhcA3sZIIvAo6r48b2Nx2qfg0OnyohlaV0fw415xrQyx5HQ2bvHl9vs/WBiDXIP49mCfws5wX4308c9Pi/isw==", - "requires": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/protocol-http": "^5.1.2", - "@smithy/service-error-classification": "^4.0.5", - "@smithy/smithy-client": "^4.4.1", - "@smithy/types": "^4.3.1", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-retry": "^4.0.5", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - } - }, - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/service-error-classification": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.5.tgz", - "integrity": "sha512-LvcfhrnCBvCmTee81pRlh1F39yTS/+kYleVeLCwNtkY8wtGg8V/ca9rbZZvYIl8OjlMtL6KIjaiL/lgVqHD2nA==", - "requires": { - "@smithy/types": "^4.3.1" - } - }, - "@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==", - "requires": { - "@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", - "tslib": "^2.6.2" - }, - "dependencies": { - "@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==", - "requires": { - "tslib": "^2.6.2" - } - } - } - }, - "@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "requires": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/is-array-buffer": "^4.0.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@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==", - "requires": { - "tslib": "^2.6.2" - } - } - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-defaults-mode-browser": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.17.tgz", - "integrity": "sha512-HXq5181qnXmIwB7VrwqwP8rsJybHMoYuJnNoXy4PROs2pfSI4sWDMASF2i+7Lo+u64Y6xowhegcdxczowgJtZg==", - "requires": { - "@smithy/property-provider": "^4.0.4", - "@smithy/smithy-client": "^4.4.1", - "@smithy/types": "^4.3.1", - "bowser": "^2.11.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-defaults-mode-node": { - "version": "4.0.17", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.17.tgz", - "integrity": "sha512-RfU2A5LjFhEHw4Nwl1GZNitK4AUWu5jGtigAUDoQtfDUvYHpQxcuLw2QGAdKDtKRflIiHSZ8wXBDR36H9R2Ang==", - "requires": { - "@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.1", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/util-endpoints": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.6.tgz", - "integrity": "sha512-YARl3tFL3WgPuLzljRUnrS2ngLiUtkwhQtj8PAL13XZSyUiNLQxwG3fBBq3QXFqGFUXepIN73pINp3y8c2nBmA==", - "requires": { - "@smithy/node-config-provider": "^4.1.3", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-retry": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.5.tgz", - "integrity": "sha512-V7MSjVDTlEt/plmOFBn1762Dyu5uqMrV2Pl2X0dYk4XvWfdWJNe9Bs5Bzb56wkCuiWjSfClVMGcsuKrGj7S/yg==", - "requires": { - "@smithy/service-error-classification": "^4.0.5", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -31850,26 +26570,18 @@ } }, "@aws-sdk/region-config-resolver": { - "version": "3.808.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.808.0.tgz", - "integrity": "sha512-9x2QWfphkARZY5OGkl9dJxZlSlYM2l5inFeo2bKntGuwg4A4YUe5h7d5yJ6sZbam9h43eBrkOdumx03DAkQF9A==", + "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==", "requires": { - "@aws-sdk/types": "3.804.0", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/types": "^4.2.0", + "@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.2", + "@smithy/util-middleware": "^4.0.4", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -31878,182 +26590,64 @@ } }, "@aws-sdk/token-providers": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.812.0.tgz", - "integrity": "sha512-dbVBaKxrxE708ub5uH3w+cmKIeRQas+2Xf6rpckhohYY+IiflGOdK6aLrp3T6dOQgr/FJ37iQtcYNonAG+yVBQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.826.0.tgz", + "integrity": "sha512-iCOcVAqGPSHtQL8ZBXifZMEcHyUl9wJ8HvLZ5l1ohA/3ZNP+dqEPGi7jfhR5jZKs+xyp2jxByFqfil9PjI9c5A==", "requires": { - "@aws-sdk/nested-clients": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/property-provider": "^4.0.2", - "@smithy/shared-ini-file-loader": "^4.0.2", - "@smithy/types": "^4.2.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/nested-clients": "3.826.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" }, "dependencies": { - "@aws-crypto/sha256-js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/sha256-js/-/sha256-js-5.2.0.tgz", - "integrity": "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA==", - "requires": { - "@aws-crypto/util": "^5.2.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^2.6.2" - } - }, - "@aws-crypto/util": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-5.2.0.tgz", - "integrity": "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - } - } - }, "@aws-sdk/nested-clients": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.812.0.tgz", - "integrity": "sha512-FS/fImbEpJU3cXtBGR9fyVd+CP51eNKlvTMi3f4/6lSk3RmHjudNC9yEF/og3jtpT3O+7vsNOUW9mHco5IjdQQ==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.826.0.tgz", + "integrity": "sha512-p7olPq0uTtHqGuXI1GSc/gzKDvV55PMbLtnmupEDfnY9SoRu+QatbWQ6da9sI1lhOcNmRMgiNQBXFzaUFrG+SQ==", "requires": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.812.0", - "@aws-sdk/middleware-host-header": "3.804.0", - "@aws-sdk/middleware-logger": "3.804.0", - "@aws-sdk/middleware-recursion-detection": "3.804.0", - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/region-config-resolver": "3.808.0", - "@aws-sdk/types": "3.804.0", - "@aws-sdk/util-endpoints": "3.808.0", - "@aws-sdk/util-user-agent-browser": "3.804.0", - "@aws-sdk/util-user-agent-node": "3.812.0", - "@smithy/config-resolver": "^4.1.2", - "@smithy/core": "^3.3.3", - "@smithy/fetch-http-handler": "^5.0.2", - "@smithy/hash-node": "^4.0.2", - "@smithy/invalid-dependency": "^4.0.2", - "@smithy/middleware-content-length": "^4.0.2", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-retry": "^4.1.7", - "@smithy/middleware-serde": "^4.0.5", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/node-http-handler": "^4.0.4", - "@smithy/protocol-http": "^5.1.0", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@aws-sdk/core": "3.826.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.826.0", + "@aws-sdk/region-config-resolver": "3.821.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@aws-sdk/util-user-agent-browser": "3.821.0", + "@aws-sdk/util-user-agent-node": "3.826.0", + "@smithy/config-resolver": "^4.1.4", + "@smithy/core": "^3.5.3", + "@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.11", + "@smithy/middleware-retry": "^4.1.12", + "@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.3", + "@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.14", - "@smithy/util-defaults-mode-node": "^4.0.14", - "@smithy/util-endpoints": "^3.0.4", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/util-defaults-mode-browser": "^4.0.19", + "@smithy/util-defaults-mode-node": "^4.0.19", + "@smithy/util-endpoints": "^3.0.6", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" } }, - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.1.tgz", - "integrity": "sha512-XPbcHRfd0iwx8dY5XCBCGyI7uweMW0oezYezxXcG8ANgvZ5YPuC6Ylh+n0bTHpdU3SCMZOnhzgVklYz+p3fIhw==", - "requires": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", - "@smithy/middleware-stack": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-stream": "^4.2.2", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -32062,22 +26656,14 @@ } }, "@aws-sdk/types": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.804.0.tgz", - "integrity": "sha512-A9qnsy9zQ8G89vrPPlNG9d1d8QcKRGqJKqwyGgS0dclJpwy6d1EWgQLIolKPl6vcFpLoe6avLOLxr+h8ur5wpg==", + "version": "3.821.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.821.0.tgz", + "integrity": "sha512-Znroqdai1a90TlxGaJ+FK1lwC0fHpo97Xjsp5UKGR5JODYm7f9+/fF17ebO1KdoBr/Rm0UIFiF5VmI8ts9F1eA==", "requires": { - "@smithy/types": "^4.2.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -32086,24 +26672,16 @@ } }, "@aws-sdk/util-endpoints": { - "version": "3.808.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.808.0.tgz", - "integrity": "sha512-N6Lic98uc4ADB7fLWlzx+1uVnq04VgVjngZvwHoujcRg9YDhIg9dUDiTzD5VZv13g1BrPYmvYP1HhsildpGV6w==", + "version": "3.821.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.821.0.tgz", + "integrity": "sha512-Uknt/zUZnLE76zaAAPEayOeF5/4IZ2puTFXvcSCWHsi9m3tqbb9UozlnlVqvCZLCRWfQryZQoG2W4XSS3qgk5A==", "requires": { - "@aws-sdk/types": "3.804.0", - "@smithy/types": "^4.2.0", - "@smithy/util-endpoints": "^3.0.4", + "@aws-sdk/types": "3.821.0", + "@smithy/types": "^4.3.1", + "@smithy/util-endpoints": "^3.0.6", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -32127,24 +26705,16 @@ } }, "@aws-sdk/util-user-agent-browser": { - "version": "3.804.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.804.0.tgz", - "integrity": "sha512-KfW6T6nQHHM/vZBBdGn6fMyG/MgX5lq82TDdX4HRQRRuHKLgBWGpKXqqvBwqIaCdXwWHgDrg2VQups6GqOWW2A==", + "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==", "requires": { - "@aws-sdk/types": "3.804.0", - "@smithy/types": "^4.2.0", + "@aws-sdk/types": "3.821.0", + "@smithy/types": "^4.3.1", "bowser": "^2.11.0", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -32153,25 +26723,17 @@ } }, "@aws-sdk/util-user-agent-node": { - "version": "3.812.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.812.0.tgz", - "integrity": "sha512-8pt+OkHhS2U0LDwnzwRnFxyKn8sjSe752OIZQCNv263odud8jQu9pYO2pKqb2kRBk9h9szynjZBDLXfnvSQ7Bg==", + "version": "3.826.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.826.0.tgz", + "integrity": "sha512-wHw6bZQWIMcFF/8r03aY9Itp6JLBYY4absGGhCDK1dc3tPEfi8NVSdb05a/Oz+g4TVaDdxLo0OQ/OKMS1DFRHQ==", "requires": { - "@aws-sdk/middleware-user-agent": "3.812.0", - "@aws-sdk/types": "3.804.0", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/types": "^4.2.0", + "@aws-sdk/middleware-user-agent": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -32179,12 +26741,13 @@ } } }, - "@aws-sdk/util-utf8-browser": { - "version": "3.259.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-utf8-browser/-/util-utf8-browser-3.259.0.tgz", - "integrity": "sha512-UvFa/vR+e19XookZF8RzFZBrw2EUkQWxiBW0yYQAhvk3C+QVGl0H3ouca8LDBlBfQKXwmW3huo/59H8rwb1wJw==", + "@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==", "requires": { - "tslib": "^2.3.1" + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" }, "dependencies": { "tslib": { @@ -32223,6 +26786,70 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@bufbuild/buf": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf/-/buf-1.54.0.tgz", + "integrity": "sha512-UkjZmVslA7YAxhUQVxE2O4HX4qD7aMspjkuG3vsjnvmAkiV6Jhz47z3focCuPI28e59H20TiQNhc9Y3fkffWPw==", + "dev": true, + "requires": { + "@bufbuild/buf-darwin-arm64": "1.54.0", + "@bufbuild/buf-darwin-x64": "1.54.0", + "@bufbuild/buf-linux-aarch64": "1.54.0", + "@bufbuild/buf-linux-armv7": "1.54.0", + "@bufbuild/buf-linux-x64": "1.54.0", + "@bufbuild/buf-win32-arm64": "1.54.0", + "@bufbuild/buf-win32-x64": "1.54.0" + } + }, + "@bufbuild/buf-darwin-arm64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-arm64/-/buf-darwin-arm64-1.54.0.tgz", + "integrity": "sha512-MkwlxcuHH8YO2wyQ2nGAv5SwBRCR4PtA8zcQb7AR6q93Cgy314ac8blGjfpenprjI3kAAhxc9BQK4t+/hkIS/A==", + "dev": true, + "optional": true + }, + "@bufbuild/buf-darwin-x64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-darwin-x64/-/buf-darwin-x64-1.54.0.tgz", + "integrity": "sha512-59Z+6BxvVwBbcpLOAwD8TLobngb9YUvUZ1nnP1IyIJnay/tIY+yfmgAdgMwm3VUZlbaFlURGmD34UAwEsxodGQ==", + "dev": true, + "optional": true + }, + "@bufbuild/buf-linux-aarch64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-aarch64/-/buf-linux-aarch64-1.54.0.tgz", + "integrity": "sha512-cUbvujfoAQGsnRH/+UfKxt0Hfe6PGHjM/gLiC2Kgv8fcoIWjPJMBBgdl/TLbq1QrVcCXSvMc16hW5ias7Jdyfw==", + "dev": true, + "optional": true + }, + "@bufbuild/buf-linux-armv7": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-armv7/-/buf-linux-armv7-1.54.0.tgz", + "integrity": "sha512-xdKjzPsOo6E2eth3uGIRoVG9TpPVHOUucr0MeCRVhM2hb5gbM8KQLn6iDxVGbQFq6eL2qe+B0b8k9HfuwzirWA==", + "dev": true, + "optional": true + }, + "@bufbuild/buf-linux-x64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-linux-x64/-/buf-linux-x64-1.54.0.tgz", + "integrity": "sha512-ZnfaE5GLAhyvR/ponDgG+s6FbtMEm+RaS2f0EoBLORYC7sK/Elfmw2Q0XcjHyEl83u4hELCqej9T0eUxbgxtow==", + "dev": true, + "optional": true + }, + "@bufbuild/buf-win32-arm64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-arm64/-/buf-win32-arm64-1.54.0.tgz", + "integrity": "sha512-N5YlX8c6p+KZIWYmx03viYF/FLuY5GyzHgor17nuJUYhF1xFyIJL8v4mhqcQ8Pq0xua9IyRwmSxHJKyrdNatcg==", + "dev": true, + "optional": true + }, + "@bufbuild/buf-win32-x64": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/@bufbuild/buf-win32-x64/-/buf-win32-x64-1.54.0.tgz", + "integrity": "sha512-PepTA9RcLCjukQhFPFBqKXF9mVwct+ZSBeuLjFuUVcHovdGUZXspNTb5LnuIDjWXx2fcALs0xb/FNUNd6pNjbA==", + "dev": true, + "optional": true + }, "@bufbuild/protobuf": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.4.0.tgz", @@ -33484,9 +28111,9 @@ } }, "@google/genai": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@google/genai/-/genai-0.13.0.tgz", - "integrity": "sha512-eaEncWt875H7046T04mOpxpHJUM+jLIljEf+5QctRyOeChylE/nhpwm1bZWTRWoOu/t46R9r+PmgsJFhTpE7tQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.0.0.tgz", + "integrity": "sha512-IQiL8UlPblGDrMhTuiHZbfMDVx0KY3eYkmB5Ro9wwyXovYCFIhL5ZC7LP42FjFUj0eWUa4Auo8Ixqf2dqx9JjA==", "requires": { "google-auth-library": "^9.14.2", "ws": "^8.18.0", @@ -35982,14 +30609,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -35998,25 +30617,17 @@ } }, "@smithy/config-resolver": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.1.2.tgz", - "integrity": "sha512-7r6mZGwb5LmLJ+zPtkLoznf2EtwEuSWdtid10pjGl/7HefCE4mueOkrfki8JCUm99W6UfP47/r3tbxx9CfBN5A==", + "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==", "requires": { - "@smithy/node-config-provider": "^4.1.1", - "@smithy/types": "^4.2.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.2", + "@smithy/util-middleware": "^4.0.4", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36025,9 +30636,9 @@ } }, "@smithy/core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.5.1.tgz", - "integrity": "sha512-xSw7bZEFKwOKrm/iv8e2BLt2ur98YZdrRD6nII8ditQeUsY2Q1JmIQ0rpILOhaLKYxxG2ivnoOpokzr9qLyDWA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.5.3.tgz", + "integrity": "sha512-xa5byV9fEguZNofCclv6v9ra0FYh5FATQW/da7FQUVTic94DfrN/NvmKZjrMyzbpqfot9ZjBaO8U1UeTbmSLuA==", "requires": { "@smithy/middleware-serde": "^4.0.8", "@smithy/protocol-http": "^5.1.2", @@ -36040,33 +30651,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36075,25 +30659,17 @@ } }, "@smithy/credential-provider-imds": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.4.tgz", - "integrity": "sha512-jN6M6zaGVyB8FmNGG+xOPQB4N89M1x97MMdMnm1ESjljLS3Qju/IegQizKujaNcy2vXAvrz0en8bobe6E55FEA==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.0.6.tgz", + "integrity": "sha512-hKMWcANhUiNbCJouYkZ9V3+/Qf9pteR1dnwgdyzR09R4ODEYx8BbUysHwRSyex4rZ9zapddZhLFTnT4ZijR4pw==", "requires": { - "@smithy/node-config-provider": "^4.1.1", - "@smithy/property-provider": "^4.0.2", - "@smithy/types": "^4.2.0", - "@smithy/url-parser": "^4.0.2", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/property-provider": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36112,22 +30688,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36145,14 +30705,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36169,94 +30721,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" - } - } - }, - "@smithy/eventstream-serde-node": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.2.0.tgz", - "integrity": "sha512-zpQMtJVqCUMn+pCSFcl9K/RPNtQE0NuMh8sKpCdEHafhwRsjP50Oq/4kMmvxSRy6d8Jslqd8BLvDngrUtmN9iA==", - "requires": { - "@smithy/eventstream-serde-universal": "^2.2.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@aws-crypto/crc32": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/crc32/-/crc32-3.0.0.tgz", - "integrity": "sha512-IzSgsrxUcsrejQbPVilIKy16kAT52EwB6zSaI+M3xxIhKh5+aldEyvI+z6erM7TCLB2BJsFrtHjp6/4/sr+3dA==", - "requires": { - "@aws-crypto/util": "^3.0.0", - "@aws-sdk/types": "^3.222.0", - "tslib": "^1.11.1" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - } - } - }, - "@aws-crypto/util": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@aws-crypto/util/-/util-3.0.0.tgz", - "integrity": "sha512-2OJlpeJpCR48CC8r+uKVChzs9Iungj9wkZrl8Z041DWEWvyIHILYKCPNzJghKsivj+S3mLo6BVc7mBNzdxA46w==", - "requires": { - "@aws-sdk/types": "^3.222.0", - "@aws-sdk/util-utf8-browser": "^3.0.0", - "tslib": "^1.11.1" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" - } - } - }, - "@smithy/eventstream-codec": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.2.0.tgz", - "integrity": "sha512-8janZoJw85nJmQZc4L8TuePp2pk1nxLgkxIR0TUjKJ5Dkj5oelB9WtiSSGXCQvNsJl0VSTvK/2ueMXxvpa9GVw==", - "requires": { - "@aws-crypto/crc32": "3.0.0", - "@smithy/types": "^2.12.0", - "@smithy/util-hex-encoding": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/eventstream-serde-universal": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.2.0.tgz", - "integrity": "sha512-pvoe/vvJY0mOpuF84BEtyZoYfbehiFj8KKWk1ds2AT0mTLYFVs+7sBJZmioOFdBXKd48lfrx1vumdPdmGlCLxA==", - "requires": { - "@smithy/eventstream-codec": "^2.2.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-hex-encoding": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.2.0.tgz", - "integrity": "sha512-7iKXR+/4TpLK194pVjKiasIyqMtTYJsgKgM242Y9uzt5dhHnUDvMNb+3xIhRJ9QhvqGii/5cRUt4fJn3dtXNHQ==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36274,14 +30738,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36290,14 +30746,14 @@ } }, "@smithy/fetch-http-handler": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.5.0.tgz", - "integrity": "sha512-BOWEBeppWhLn/no/JxUL/ghTfANTjT7kg3Ww2rPqTUY9R4yHPXxJ9JhMe3Z03LN3aPwiwlpDIUcVw1xDyHqEhw==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.0.4.tgz", + "integrity": "sha512-AMtBR5pHppYMVD7z7G+OlHHAcgAN7v0kVKEpHuTO4Gb199Gowh0taYi9oDStFeUhetkeP55JLSVlTW1n9rFtUw==", "requires": { - "@smithy/protocol-http": "^3.3.0", - "@smithy/querystring-builder": "^2.2.0", - "@smithy/types": "^2.12.0", - "@smithy/util-base64": "^2.3.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/querystring-builder": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { @@ -36309,24 +30765,16 @@ } }, "@smithy/hash-node": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.2.tgz", - "integrity": "sha512-VnTpYPnRUE7yVhWozFdlxcYknv9UN7CeOqSrMH+V877v4oqtVYuoqhIhtSjmGPvYrYnAkaM61sLMKHvxL138yg==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.0.4.tgz", + "integrity": "sha512-qnbTPUhCVnCgBp4z4BUJUhOEkVwxiEi1cyFM+Zj6o+aY8OFGxUQleKWq8ltgp3dujuhXojIvJWdoqpm6dVO3lQ==", "requires": { - "@smithy/types": "^4.2.0", + "@smithy/types": "^4.3.1", "@smithy/util-buffer-from": "^4.0.0", "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36335,22 +30783,14 @@ } }, "@smithy/invalid-dependency": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.2.tgz", - "integrity": "sha512-GatB4+2DTpgWPday+mnUkoumP54u/MDM/5u44KF9hIu8jF0uafZtQLcdfIKkIcUNuF/fBojpLEHZS/56JqPeXQ==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.0.4.tgz", + "integrity": "sha512-bNYMi7WKTJHu0gn26wg8OscncTt1t2b8KcsZxvOv56XA6cyXtOAAAaNP7+m45xfppXfOatXF3Sb1MNsLUgVLTw==", "requires": { - "@smithy/types": "^4.2.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36359,9 +30799,9 @@ } }, "@smithy/is-array-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-3.0.0.tgz", - "integrity": "sha512-+Fsu6Q6C4RSJiy81Y8eApjEB5gVtM+oFKTffg+jSuwtvomJJrhUJBu2zS8wjXSgH/g1MKEWrzyChTBe6clb5FQ==", + "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==", "requires": { "tslib": "^2.6.2" }, @@ -36374,32 +30814,15 @@ } }, "@smithy/middleware-content-length": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.0.2.tgz", - "integrity": "sha512-hAfEXm1zU+ELvucxqQ7I8SszwQ4znWMbNv6PLMndN83JJN41EPuS93AIyh2N+gJ6x8QFhzSO6b7q2e6oClDI8A==", + "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==", "requires": { - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36408,11 +30831,11 @@ } }, "@smithy/middleware-endpoint": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.9.tgz", - "integrity": "sha512-AjDgX4UjORLltD/LZCBQTwjQqEfyrx/GeDTHcYLzIgf87pIT70tMWnN87NQpJru1K4ITirY2htSOxNECZJCBOg==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.11.tgz", + "integrity": "sha512-zDogwtRLzKl58lVS8wPcARevFZNBOOqnmzWWxVe9XiaXU2CADFjvJ9XfNibgkOWs08sxLuSr81NrpY4mgp9OwQ==", "requires": { - "@smithy/core": "^3.5.1", + "@smithy/core": "^3.5.3", "@smithy/middleware-serde": "^4.0.8", "@smithy/node-config-provider": "^4.1.3", "@smithy/shared-ini-file-loader": "^4.0.4", @@ -36422,14 +30845,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36438,52 +30853,21 @@ } }, "@smithy/middleware-retry": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.7.tgz", - "integrity": "sha512-lFIFUJ0E/4I0UaIDY5usNUzNKAghhxO0lDH4TZktXMmE+e4ActD9F154Si0Unc01aCPzcwd+NcOwQw6AfXXRRQ==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.1.12.tgz", + "integrity": "sha512-wvIH70c4e91NtRxdaLZF+mbLZ/HcC6yg7ySKUiufL6ESp6zJUSnJucZ309AvG9nqCFHSRB5I6T3Ez1Q9wCh0Ww==", "requires": { - "@smithy/node-config-provider": "^4.1.1", - "@smithy/protocol-http": "^5.1.0", - "@smithy/service-error-classification": "^4.0.3", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", - "@smithy/util-middleware": "^4.0.2", - "@smithy/util-retry": "^4.0.3", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/protocol-http": "^5.1.2", + "@smithy/service-error-classification": "^4.0.5", + "@smithy/smithy-client": "^4.4.3", + "@smithy/types": "^4.3.1", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-retry": "^4.0.5", "tslib": "^2.6.2", "uuid": "^9.0.1" }, "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "requires": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36501,23 +30885,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36534,14 +30901,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36560,14 +30919,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36587,41 +30938,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36638,14 +30954,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36654,11 +30962,11 @@ } }, "@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==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", + "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", "requires": { - "@smithy/types": "^2.12.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { @@ -36670,12 +30978,12 @@ } }, "@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==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.0.4.tgz", + "integrity": "sha512-SwREZcDnEYoh9tLNgMbpop+UTGq44Hl9tdj3rf+yeLcfH7+J8OXEBaMc2kDxtyRHu8BhSg9ADEx0gFHvpJgU8w==", "requires": { - "@smithy/types": "^2.12.0", - "@smithy/util-uri-escape": "^2.2.0", + "@smithy/types": "^4.3.1", + "@smithy/util-uri-escape": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { @@ -36695,14 +31003,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36711,26 +31011,11 @@ } }, "@smithy/service-error-classification": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.3.tgz", - "integrity": "sha512-FTbcajmltovWMjj3tksDQdD23b2w6gH+A0DYA1Yz3iSpjDj8fmkwy62UnXcWMy4d5YoMoSyLFHMfkEVEzbiN8Q==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.0.5.tgz", + "integrity": "sha512-LvcfhrnCBvCmTee81pRlh1F39yTS/+kYleVeLCwNtkY8wtGg8V/ca9rbZZvYIl8OjlMtL6KIjaiL/lgVqHD2nA==", "requires": { - "@smithy/types": "^4.2.0" - }, - "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, - "tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" - } + "@smithy/types": "^4.3.1" } }, "@smithy/shared-ini-file-loader": { @@ -36742,14 +31027,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36758,70 +31035,20 @@ } }, "@smithy/signature-v4": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-3.1.2.tgz", - "integrity": "sha512-3BcPylEsYtD0esM4Hoyml/+s7WP2LFhcM3J2AGdcL2vx9O60TtfpDOL72gjb4lU8NeRPeKAwR77YNyyGvMbuEA==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.1.2.tgz", + "integrity": "sha512-d3+U/VpX7a60seHziWnVZOHuEgJlclufjkS6zhXvxcJgkJq4UWdH5eOBLzHRMx6gXjsdT9h6lfpmLzbrdupHgQ==", "requires": { - "@smithy/is-array-buffer": "^3.0.0", - "@smithy/types": "^3.3.0", - "@smithy/util-hex-encoding": "^3.0.0", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-uri-escape": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", + "@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", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.7.2.tgz", - "integrity": "sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-buffer-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-3.0.0.tgz", - "integrity": "sha512-aEOHCgq5RWFbP+UDPvPot26EJHjOC+bRgse5A8V3FSShqd5E5UN4qc7zkwsvJPPAVsf73QwYcHN1/gt/rtLwQA==", - "requires": { - "@smithy/is-array-buffer": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-hex-encoding": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-3.0.0.tgz", - "integrity": "sha512-eFndh1WEK5YMUYvy3lPlVmYY/fZcQE1D8oSf41Id2vCeIkKJXPcYDCZD+4+xViI6b1XSd7tE+s5AmXzz5ilabQ==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-middleware": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.11.tgz", - "integrity": "sha512-dWpyc1e1R6VoXrwLoLDd57U1z6CwNSdkM69Ie4+6uYh2GC7Vg51Qtan7ITzczuVpqezdDTKJGJB95fFvvjU/ow==", - "requires": { - "@smithy/types": "^3.7.2", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-3.0.0.tgz", - "integrity": "sha512-rUeT12bxFnplYDe815GXbq/oixEGHfRFFtcTF3YdDi/JaENIM6aSYYLJydG83UNzLXeRI5K8abYd/8Sp/QM0kA==", - "requires": { - "@smithy/util-buffer-from": "^3.0.0", - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -36830,177 +31057,19 @@ } }, "@smithy/smithy-client": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.5.1.tgz", - "integrity": "sha512-jrbSQrYCho0yDaaf92qWgd+7nAeap5LtHTI51KXqmpIFCceKU3K9+vIVTUH72bOJngBMqa4kyu1VJhRcSrk/CQ==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.4.3.tgz", + "integrity": "sha512-xxzNYgA0HD6ETCe5QJubsxP0hQH3QK3kbpJz3QrosBCuIWyEXLR/CO5hFb2OeawEKUxMNhz3a1nuJNN2np2RMA==", "requires": { - "@smithy/middleware-endpoint": "^2.5.1", - "@smithy/middleware-stack": "^2.2.0", - "@smithy/protocol-http": "^3.3.0", - "@smithy/types": "^2.12.0", - "@smithy/util-stream": "^2.2.0", + "@smithy/core": "^3.5.3", + "@smithy/middleware-endpoint": "^4.1.11", + "@smithy/middleware-stack": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-stream": "^4.2.2", "tslib": "^2.6.2" }, "dependencies": { - "@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==", - "requires": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/middleware-endpoint": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.5.1.tgz", - "integrity": "sha512-1/8kFp6Fl4OsSIVTWHnNjLnTL8IqpIb/D3sTSczrKFnrE9VMNWxnrRKNvpUHOJ6zpGD5f62TPm7+17ilTJpiCQ==", - "requires": { - "@smithy/middleware-serde": "^2.3.0", - "@smithy/node-config-provider": "^2.3.0", - "@smithy/shared-ini-file-loader": "^2.4.0", - "@smithy/types": "^2.12.0", - "@smithy/url-parser": "^2.2.0", - "@smithy/util-middleware": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/middleware-serde": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.3.0.tgz", - "integrity": "sha512-sIADe7ojwqTyvEQBe1nc/GXB9wdHhi9UwyX0lTyttmUWDJLP655ZYE1WngnNyXREme8I27KCaUhyhZWRXL0q7Q==", - "requires": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/middleware-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.2.0.tgz", - "integrity": "sha512-Qntc3jrtwwrsAC+X8wms8zhrTr0sFXnyEGhZd9sLtsJ/6gGQKFzNB+wWbOcpJd7BR8ThNCoKt76BuQahfMvpeA==", - "requires": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/node-config-provider": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.3.0.tgz", - "integrity": "sha512-0elK5/03a1JPWMDPaS726Iw6LpQg80gFut1tNpPfxFuChEEklo2yL823V94SpTZTxmKlXFtFgsP55uh3dErnIg==", - "requires": { - "@smithy/property-provider": "^2.2.0", - "@smithy/shared-ini-file-loader": "^2.4.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/abort-controller": "^2.2.0", - "@smithy/protocol-http": "^3.3.0", - "@smithy/querystring-builder": "^2.2.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/property-provider": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.2.0.tgz", - "integrity": "sha512-+xiil2lFhtTRzXkx8F053AV46QnIw6e7MV8od5Mi68E1ICOjCeCHw2XfLnDEUHnT9WGUIkwcqavXjfwuJbGlpg==", - "requires": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.2.0.tgz", - "integrity": "sha512-BvHCDrKfbG5Yhbpj4vsbuPV2GgcpHiAkLeIlcA1LtfpMz3jrqizP1+OguSNSj1MwBHEiN+jwNisXLGdajGDQJA==", - "requires": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/shared-ini-file-loader": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.4.0.tgz", - "integrity": "sha512-WyujUJL8e1B6Z4PBfAqC/aGY1+C7T0w20Gih3yrvJSk97gpiVfB+y7c46T4Nunk+ZngLq0rOIdeVeIklk0R3OA==", - "requires": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/url-parser": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.2.0.tgz", - "integrity": "sha512-hoA4zm61q1mNTpksiSWp2nEl1dt3j726HdRhiNgVJQMj7mLp7dprtF57mOB6JvEk/x9d2bsuL5hlqZbBuHQylQ==", - "requires": { - "@smithy/querystring-parser": "^2.2.0", - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-hex-encoding": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.2.0.tgz", - "integrity": "sha512-7iKXR+/4TpLK194pVjKiasIyqMtTYJsgKgM242Y9uzt5dhHnUDvMNb+3xIhRJ9QhvqGii/5cRUt4fJn3dtXNHQ==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-middleware": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.2.0.tgz", - "integrity": "sha512-L1qpleXf9QD6LwLCJ5jddGkgWyuSvWBkJwWAZ6kFkdifdso+sk3L3O1HdmPvCdnCK3IS4qWyPxev01QMnfHSBw==", - "requires": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.2.0.tgz", - "integrity": "sha512-17faEXbYWIRst1aU9SvPZyMdWmqIrduZjVOqCPMIsWFNxs5yQQgFrJL6b2SdiCzyW9mJoDjFtgi53xx7EH+BXA==", - "requires": { - "@smithy/fetch-http-handler": "^2.5.0", - "@smithy/node-http-handler": "^2.5.0", - "@smithy/types": "^2.12.0", - "@smithy/util-base64": "^2.3.0", - "@smithy/util-buffer-from": "^2.2.0", - "@smithy/util-hex-encoding": "^2.2.0", - "@smithy/util-utf8": "^2.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37009,9 +31078,9 @@ } }, "@smithy/types": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.12.0.tgz", - "integrity": "sha512-QwYgloJ0sVNBeBuBs65cIkTbfzV/Q6ZNPCJ99EICFEdJYG50nGIY/uYXp+TbsdJReIuPr0a0kXmCvren3MbRRw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", + "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", "requires": { "tslib": "^2.6.2" }, @@ -37033,14 +31102,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37049,41 +31110,15 @@ } }, "@smithy/util-base64": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.3.0.tgz", - "integrity": "sha512-s3+eVwNeJuXUwuMbusncZNViuhv2LjVJ1nMwTqSA0XAC7gjKhqqxRdJPhR8+YrkoZ9IiIbFk/yK6ACe/xlF+hw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", + "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "@smithy/util-utf8": "^2.3.0", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/is-array-buffer": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.2.0.tgz", - "integrity": "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-buffer-from": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.2.0.tgz", - "integrity": "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA==", - "requires": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/util-utf8": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.3.0.tgz", - "integrity": "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A==", - "requires": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37130,14 +31165,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37161,48 +31188,17 @@ } }, "@smithy/util-defaults-mode-browser": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.14.tgz", - "integrity": "sha512-l7QnMX8VcDOH6n/fBRu4zqguSlOBZxFzWqp58dXFSARFBjNlmEDk5G/z4T7BMGr+rI0Pg8MkhmMUfEtHFgpy2g==", + "version": "4.0.19", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.0.19.tgz", + "integrity": "sha512-mvLMh87xSmQrV5XqnUYEPoiFFeEGYeAKIDDKdhE2ahqitm8OHM3aSvhqL6rrK6wm1brIk90JhxDf5lf2hbrLbQ==", "requires": { - "@smithy/property-provider": "^4.0.2", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", + "@smithy/property-provider": "^4.0.4", + "@smithy/smithy-client": "^4.4.3", + "@smithy/types": "^4.3.1", "bowser": "^2.11.0", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "requires": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37211,50 +31207,19 @@ } }, "@smithy/util-defaults-mode-node": { - "version": "4.0.14", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.14.tgz", - "integrity": "sha512-Ujs1gsWDo3m/T63VWBTBmHLTD2UlU6J6FEokLCEp7OZQv45jcjLHoxTwgWsi8ULpsYozvH4MTWkRP+bhwr0vDg==", + "version": "4.0.19", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.0.19.tgz", + "integrity": "sha512-8tYnx+LUfj6m+zkUUIrIQJxPM1xVxfRBvoGHua7R/i6qAxOMjqR6CpEpDwKoIs1o0+hOjGvkKE23CafKL0vJ9w==", "requires": { - "@smithy/config-resolver": "^4.1.2", - "@smithy/credential-provider-imds": "^4.0.4", - "@smithy/node-config-provider": "^4.1.1", - "@smithy/property-provider": "^4.0.2", - "@smithy/smithy-client": "^4.2.6", - "@smithy/types": "^4.2.0", + "@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.3", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.0.tgz", - "integrity": "sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==", - "requires": { - "@smithy/types": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.2.6.tgz", - "integrity": "sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==", - "requires": { - "@smithy/core": "^3.3.3", - "@smithy/middleware-endpoint": "^4.1.6", - "@smithy/middleware-stack": "^4.0.2", - "@smithy/protocol-http": "^5.1.0", - "@smithy/types": "^4.2.0", - "@smithy/util-stream": "^4.2.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37263,23 +31228,15 @@ } }, "@smithy/util-endpoints": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.4.tgz", - "integrity": "sha512-VfFATC1bmZLV2858B/O1NpMcL32wYo8DPPhHxYxDCodDl3f3mSZ5oJheW1IF91A0EeAADz2WsakM/hGGPGNKLg==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.0.6.tgz", + "integrity": "sha512-YARl3tFL3WgPuLzljRUnrS2ngLiUtkwhQtj8PAL13XZSyUiNLQxwG3fBBq3QXFqGFUXepIN73pINp3y8c2nBmA==", "requires": { - "@smithy/node-config-provider": "^4.1.1", - "@smithy/types": "^4.2.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37311,14 +31268,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37327,23 +31276,15 @@ } }, "@smithy/util-retry": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.3.tgz", - "integrity": "sha512-DPuYjZQDXmKr/sNvy9Spu8R/ESa2e22wXZzSAY6NkjOLj6spbIje/Aq8rT97iUMdDj0qHMRIe+bTxvlU74d9Ng==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.0.5.tgz", + "integrity": "sha512-V7MSjVDTlEt/plmOFBn1762Dyu5uqMrV2Pl2X0dYk4XvWfdWJNe9Bs5Bzb56wkCuiWjSfClVMGcsuKrGj7S/yg==", "requires": { - "@smithy/service-error-classification": "^4.0.3", - "@smithy/types": "^4.2.0", + "@smithy/service-error-classification": "^4.0.5", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.2.0.tgz", - "integrity": "sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37366,63 +31307,6 @@ "tslib": "^2.6.2" }, "dependencies": { - "@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==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.1.2.tgz", - "integrity": "sha512-rOG5cNLBXovxIrICSBm95dLqzfvxjEmuZx4KK3hWwPFHGdW3lxY0fZNXfv2zebfRO7sJZ5pKJYHScsqopeIWtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "@smithy/types": "^4.3.1", - "@smithy/util-uri-escape": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", - "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-4.0.0.tgz", - "integrity": "sha512-CvHfCmO2mchox9kjrtzoHkWHxjHZzaFojLc8quxXY7WAAMAg43nuxwv95tATVgQFNDwd4M9S1qFzj40Ul41Kmg==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -37431,9 +31315,9 @@ } }, "@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==", + "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==", "requires": { "tslib": "^2.6.2" }, @@ -38506,6 +32390,11 @@ "event-target-shim": "^5.0.0" } }, + "abort-controller-x": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/abort-controller-x/-/abort-controller-x-0.4.3.tgz", + "integrity": "sha512-VtUwTNU8fpMwvWGn4xE93ywbogTYsuT+AUxAXOeelbXuQVIwNmC5YLeho9sH4vZ4ITW8414TTAOG1nW6uIVHCA==" + }, "accepts": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", @@ -39417,6 +33306,35 @@ "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", "dev": true }, + "cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "requires": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + } + } + }, "cli-width": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", @@ -39578,6 +33496,12 @@ "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" }, + "colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -40318,6 +34242,12 @@ "integrity": "sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==", "dev": true }, + "environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true + }, "error": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/error/-/error-7.0.2.tgz", @@ -40894,6 +34824,12 @@ "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==" }, + "eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, "events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -43451,17 +37387,105 @@ } } }, + "lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true + }, "lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "lint-staged": { + "version": "16.1.0", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.1.0.tgz", + "integrity": "sha512-HkpQh69XHxgCjObjejBT3s2ILwNjFx8M3nw+tJ/ssBauDlIpkx2RpqWSi1fBgkXLSSXnbR3iEq1NkVtpvV+FLQ==", + "dev": true, + "requires": { + "chalk": "^5.4.1", + "commander": "^14.0.0", + "debug": "^4.4.1", + "lilconfig": "^3.1.3", + "listr2": "^8.3.3", + "micromatch": "^4.0.8", + "nano-spawn": "^1.0.2", + "pidtree": "^0.6.0", + "string-argv": "^0.3.2", + "yaml": "^2.8.0" + }, + "dependencies": { + "commander": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.0.tgz", + "integrity": "sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==", + "dev": true + }, + "pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true + } + } + }, "listenercount": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", "integrity": "sha512-3mk/Zag0+IJxeDrxSgaDPy4zZ3w05PRZeJNnlWhzFz5OkX49J4krc+A8X2d2M69vGMBEX0uyl8M+W+8gH+kBqQ==" }, + "listr2": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.3.3.tgz", + "integrity": "sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==", + "dev": true, + "requires": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + } + } + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -43654,6 +37678,111 @@ } } }, + "log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", + "dev": true, + "requires": { + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "dependencies": { + "ansi-escapes": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", + "dev": true, + "requires": { + "environment": "^1.0.0" + } + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", + "dev": true, + "requires": { + "restore-cursor": "^5.0.0" + } + }, + "emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "requires": { + "get-east-asian-width": "^1.0.0" + } + }, + "onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "requires": { + "mimic-function": "^5.0.0" + } + }, + "restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "requires": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + } + }, + "slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + } + }, + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + } + } + } + }, "long": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", @@ -44934,6 +39063,12 @@ "integrity": "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==", "dev": true }, + "nano-spawn": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/nano-spawn/-/nano-spawn-1.0.2.tgz", + "integrity": "sha512-21t+ozMQDAL/UGgQVBbZ/xXvNO10++ZPuTmKRO8k9V3AClVRht49ahtDjfY8l1q6nSHOrE5ASfthzH3ol6R/hg==", + "dev": true + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -44988,6 +39123,35 @@ } } }, + "nice-grpc": { + "version": "2.1.12", + "resolved": "https://registry.npmjs.org/nice-grpc/-/nice-grpc-2.1.12.tgz", + "integrity": "sha512-J1n4Wg+D3IhRhGQb+iqh2OpiM0GzTve/kf2lnlW4S+xczmIEd0aHUDV1OsJ5a3q8GSTqJf+s4Rgg1M8uJltarw==", + "requires": { + "@grpc/grpc-js": "^1.13.1", + "abort-controller-x": "^0.4.0", + "nice-grpc-common": "^2.0.2" + }, + "dependencies": { + "@grpc/grpc-js": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.13.4.tgz", + "integrity": "sha512-GsFaMXCkMqkKIvwCQjCrwH+GHbPKBjhwo/8ZuUkWHqbI73Kky9I+pQltrlT0+MWpedCoosda53lgjYfyEPgxBg==", + "requires": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + } + } + } + }, + "nice-grpc-common": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/nice-grpc-common/-/nice-grpc-common-2.0.2.tgz", + "integrity": "sha512-7RNWbls5kAL1QVUOXvBsv1uO0wPQK3lHv+cY1gwkTzirnG1Nop4cBJZubpgziNbaVc/bl9QJcyvsf/NQxa3rjQ==", + "requires": { + "ts-error": "^1.0.6" + } + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -46725,6 +40889,12 @@ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==" }, + "rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -47249,6 +41419,30 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==" }, + "slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true + } + } + }, "smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -47467,6 +41661,12 @@ "safe-buffer": "~5.2.0" } }, + "string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true + }, "string-template": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/string-template/-/string-template-0.2.1.tgz", @@ -47854,6 +42054,11 @@ "dev": true, "requires": {} }, + "ts-error": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/ts-error/-/ts-error-1.0.6.tgz", + "integrity": "sha512-tLJxacIQUM82IR7JO1UUkKlYuUTmoY9HBJAmNWFzheSlDS5SPMcNIepejHJa4BpPQLAcbRhRf3GDJzyj6rbKvA==" + }, "ts-morph": { "version": "25.0.1", "resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-25.0.1.tgz", @@ -47936,7 +42141,8 @@ "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true }, "turndown": { "version": "7.2.0", diff --git a/package.json b/package.json index 188e3895..99989bc3 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cline-shengsuan", "displayName": "Cline-中文版", "description": "Cline-中文版是一款在您的IDE中运行的强大自主编程助手,经您许可后可创建/编辑文件、运行命令、使用浏览器等。", - "version": "3.17.11", + "version": "3.17.14", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" @@ -325,13 +325,13 @@ "watch:esbuild": "node esbuild.js --watch", "watch:tsc": "tsc --noEmit --watch --project tsconfig.json", "package": "npm run check-types && npm run build:webview && npm run lint && node esbuild.js --production", - "protos": "node proto/build-proto.js && node scripts/generate-server-setup.mjs", - "postprotos": "prettier src/shared/proto src/core/controller webview-ui/src/services src/standalone/server-setup.ts --write --log-level silent", + "protos": "node proto/build-proto.js && node scripts/generate-server-setup.mjs && node scripts/generate-host-bridge-client.mjs", + "postprotos": "prettier src/shared/proto src/core/controller src/hosts/ webview-ui/src/services src/generated --write --log-level warn", "compile-tests": "node ./scripts/build-tests.js", "watch-tests": "tsc -p . -w --outDir out", "pretest": "npm run compile-tests && npm run compile && npm run compile-standalone && npm run lint", "check-types": "npm run protos && tsc --noEmit", - "lint": "eslint src --ext ts && eslint webview-ui/src --ext ts && cd webview-ui && npm run lint", + "lint": "eslint src --ext ts && eslint webview-ui/src --ext ts && buf lint && cd webview-ui && npm run lint", "format": "prettier . --check", "format:fix": "prettier . --write", "test": "npm-run-all test:unit test:integration", @@ -351,9 +351,16 @@ "docs": "cd docs && mintlify dev", "docs:check-links": "cd docs && mintlify broken-links", "docs:rename-file": "cd docs && mintlify rename", - "report-issue": "node scripts/report-issue.js" + "report-issue": "node scripts/report-issue.js", + "pkg": "npx vsce package" + }, + "lint-staged": { + "*": [ + "prettier --write --ignore-unknown --log-level=log" + ] }, "devDependencies": { + "@bufbuild/buf": "^1.54.0", "@changesets/cli": "^2.27.12", "@types/chai": "^5.0.1", "@types/clone-deep": "^4.0.4", @@ -379,6 +386,7 @@ "eslint-plugin-eslint-rules": "file:eslint-rules", "grpc-tools": "^1.13.0", "husky": "^9.1.7", + "lint-staged": "^16.1.0", "mintlify": "^4.0.515", "npm-run-all": "^4.1.5", "prettier": "^3.3.3", @@ -392,14 +400,14 @@ "typescript": "^5.4.5" }, "dependencies": { - "@anthropic-ai/bedrock-sdk": "^0.12.4", "@anthropic-ai/sdk": "^0.37.0", "@anthropic-ai/vertex-sdk": "^0.6.4", - "@aws-sdk/client-bedrock-runtime": "^3.821.0", + "@aws-sdk/client-bedrock-runtime": "^3.826.0", + "@aws-sdk/credential-providers": "^3.826.0", "@bufbuild/protobuf": "^2.2.5", "@cerebras/cerebras_cloud_sdk": "^1.35.0", "@google-cloud/vertexai": "^1.9.3", - "@google/genai": "^0.13.0", + "@google/genai": "1.0.0", "@grpc/grpc-js": "^1.9.15", "@grpc/reflection": "^1.0.4", "@mistralai/mistralai": "^1.5.0", @@ -436,7 +444,8 @@ "jschardet": "^3.1.4", "mammoth": "^1.8.0", "monaco-vscode-textmate-theme-converter": "^0.1.7", - "ollama": "^0.5.15", + "nice-grpc": "^2.1.12", + "ollama": "^0.5.13", "open": "^10.1.2", "open-graph-scraper": "^6.9.0", "openai": "^4.83.0", diff --git a/proto/account.proto b/proto/account.proto index 36072b18..fafe0f28 100644 --- a/proto/account.proto +++ b/proto/account.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; diff --git a/proto/browser.proto b/proto/browser.proto index 6f1ad805..08c461f4 100644 --- a/proto/browser.proto +++ b/proto/browser.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; diff --git a/proto/build-proto.js b/proto/build-proto.js index 0197d5f6..ee0ce8be 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -10,17 +10,30 @@ import os from "os" import { createRequire } from "module" const require = createRequire(import.meta.url) -const protoc = path.join(require.resolve("grpc-tools"), "../bin/protoc") +const PROTOC = path.join(require.resolve("grpc-tools"), "../bin/protoc") -const __filename = fileURLToPath(import.meta.url) -const SCRIPT_DIR = path.dirname(__filename) +const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url)) const ROOT_DIR = path.resolve(SCRIPT_DIR, "..") +const TS_OUT_DIR = path.join(ROOT_DIR, "src/shared/proto") +const GRPC_JS_OUT_DIR = path.join(ROOT_DIR, "src/generated/grpc-js") +const NICE_JS_OUT_DIR = path.join(ROOT_DIR, "src/generated/nice-grpc") +const DESCRIPTOR_OUT_DIR = path.join(ROOT_DIR, "dist-standalone/proto") + const isWindows = process.platform === "win32" -const tsProtoPlugin = isWindows +const TS_PROTO_PLUGIN = isWindows ? path.join(ROOT_DIR, "node_modules", ".bin", "protoc-gen-ts_proto.cmd") // Use the .bin directory path for Windows : require.resolve("ts-proto/protoc-gen-ts_proto") +const TS_PROTO_OPTIONS = [ + "env=node", + "esModuleInterop=true", + "outputServices=generic-definitions", // output generic ServiceDefinitions + "outputIndex=true", // output an index file for each package which exports all protos in the package. + "useOptionals=messages", // Message fields are optional, scalars are not. + "useDate=false", // Timestamp fields will not be automatically converted to Date. +] + // List of gRPC services // To add a new service, simply add it to this map and run this script // The service handler will be automatically discovered and used by grpc-handler.ts @@ -38,7 +51,7 @@ const serviceNameMap = { ui: "ClineShengsuan.UiService", // Add new services here - no other code changes needed! } -const serviceDirs = Object.keys(serviceNameMap).map((serviceKey) => path.join(ROOT_DIR, "src", "core", "controller", serviceKey)) +const serviceDirs = Object.keys(serviceNameMap).map((serviceKey) => path.join(ROOT_DIR, "src/core/controller", serviceKey)) // List of host gRPC services (IDE API bridge) // These services are implemented in the IDE extension and called by the standalone Cline Core @@ -47,7 +60,7 @@ const hostServiceNameMap = { watch: "host.WatchService", // Add new host services here } -const hostServiceDirs = Object.keys(hostServiceNameMap).map((serviceKey) => path.join(ROOT_DIR, "hosts", "vscode", serviceKey)) +const hostServiceDirs = Object.keys(hostServiceNameMap).map((serviceKey) => path.join(ROOT_DIR, "src/hosts/vscode", serviceKey)) async function main() { console.log(chalk.bold.blue("Starting Protocol Buffer code generation...")) @@ -55,65 +68,44 @@ async function main() { // Check for Apple Silicon compatibility before proceeding checkAppleSiliconCompatibility() - // Define output directories - const TS_OUT_DIR = path.join(ROOT_DIR, "src", "shared", "proto") - // Create output directories if they don't exist - await fs.mkdir(TS_OUT_DIR, { recursive: true }) - - // Clean up existing generated files - console.log(chalk.cyan("Cleaning up existing generated TypeScript files...")) - const existingFiles = await globby("**/*.ts", { cwd: TS_OUT_DIR }) - for (const file of existingFiles) { - await fs.unlink(path.join(TS_OUT_DIR, file)) + for (const dir of [TS_OUT_DIR, GRPC_JS_OUT_DIR, NICE_JS_OUT_DIR, DESCRIPTOR_OUT_DIR]) { + await fs.mkdir(dir, { recursive: true }) } + await cleanup() + // Check for missing proto files for services in serviceNameMap await ensureProtoFilesExist() // Process all proto files - console.log(chalk.cyan("Processing proto files from"), SCRIPT_DIR) const protoFiles = await globby("**/*.proto", { cwd: SCRIPT_DIR, realpath: true }) + console.log(chalk.cyan(`Processing ${protoFiles.length} proto files from`), SCRIPT_DIR) - // Build the protoc command with proper path handling for cross-platform - const tsProtocCommand = [ - protoc, - `--proto_path="${SCRIPT_DIR}"`, - `--plugin=protoc-gen-ts_proto="${tsProtoPlugin}"`, - `--ts_proto_out="${TS_OUT_DIR}"`, - "--ts_proto_opt=exportCommonSymbols=false", - "--ts_proto_opt=outputIndex=true", - "--ts_proto_opt=outputServices=generic-definitions,env=node,esModuleInterop=true,useDate=false,useOptionals=messages", - ...protoFiles, - ].join(" ") - try { - console.log(chalk.cyan(`Generating TypeScript code for:\n${protoFiles.join("\n")}...`)) - execSync(tsProtocCommand, { stdio: "inherit" }) - } catch (error) { - console.error(chalk.red("Error generating TypeScript for proto files:"), error) - process.exit(1) - } + tsProtoc(TS_OUT_DIR, protoFiles, TS_PROTO_OPTIONS) + // grpc-js is used to generate service impls for the ProtoBus service. + tsProtoc(GRPC_JS_OUT_DIR, protoFiles, ["outputServices=grpc-js,outputClientImpl=false", ...TS_PROTO_OPTIONS]) + // nice-js is used for the Host Bridge client impls because it uses promises. + tsProtoc(NICE_JS_OUT_DIR, protoFiles, ["outputServices=nice-grpc,useExactTypes=false", ...TS_PROTO_OPTIONS]) - const descriptorOutDir = path.join(ROOT_DIR, "dist-standalone", "proto") - await fs.mkdir(descriptorOutDir, { recursive: true }) - const descriptorFile = path.join(descriptorOutDir, "descriptor_set.pb") + const descriptorFile = path.join(DESCRIPTOR_OUT_DIR, "descriptor_set.pb") const descriptorProtocCommand = [ - protoc, + PROTOC, `--proto_path="${SCRIPT_DIR}"`, `--descriptor_set_out="${descriptorFile}"`, "--include_imports", ...protoFiles, ].join(" ") try { - console.log(chalk.cyan("Generating descriptor set...")) + log_verbose(chalk.cyan("Generating descriptor set...")) execSync(descriptorProtocCommand, { stdio: "inherit" }) } catch (error) { console.error(chalk.red("Error generating descriptor set for proto file:"), error) process.exit(1) } - console.log(chalk.green("Protocol Buffer code generation completed successfully.")) - console.log(chalk.green(`TypeScript files generated in: ${TS_OUT_DIR}`)) + log_verbose(chalk.green("Protocol Buffer code generation completed successfully.")) + log_verbose(chalk.green(`TypeScript files generated in: ${TS_OUT_DIR}`)) await generateMethodRegistrations() await generateHostMethodRegistrations() @@ -121,6 +113,28 @@ async function main() { await generateHostServiceConfig() await generateGrpcClientConfig() await generateHostGrpcClientConfig() + + console.log(chalk.bold.blue("Finished Protocol Buffer code generation.")) +} + +async function tsProtoc(outDir, protoFiles, protoOptions) { + // Build the protoc command with proper path handling for cross-platform + const command = [ + PROTOC, + `--proto_path="${SCRIPT_DIR}"`, + `--plugin=protoc-gen-ts_proto="${TS_PROTO_PLUGIN}"`, + `--ts_proto_out="${outDir}"`, + `--ts_proto_opt=${protoOptions.join(",")} `, + ...protoFiles.map((s) => `"${s}"`), + ].join(" ") + try { + log_verbose(chalk.cyan(`Generating TypeScript code in ${outDir} for:\n${protoFiles.join("\n")}...`)) + log_verbose(command) + execSync(command, { stdio: "inherit" }) + } catch (error) { + console.error(chalk.red("Error generating TypeScript for proto files:"), error) + process.exit(1) + } } /** @@ -128,14 +142,14 @@ async function main() { * This eliminates the need for manual imports and client creation in grpc-client.ts */ async function generateGrpcClientConfig() { - console.log(chalk.cyan("Generating gRPC client configuration...")) + log_verbose(chalk.cyan("Generating gRPC client configuration...")) const serviceImports = [] const serviceClientCreations = [] const serviceExports = [] // Process each service in the serviceNameMap - for (const [dirName, fullServiceName] of Object.entries(serviceNameMap)) { + for (const [dirName, _fullServiceName] of Object.entries(serviceNameMap)) { const capitalizedName = dirName.charAt(0).toUpperCase() + dirName.slice(1) // Add import statement @@ -163,9 +177,9 @@ export { ${serviceExports.join(",\n\t")} }` - const configPath = path.join(ROOT_DIR, "webview-ui", "src", "services", "grpc-client.ts") - await fs.writeFile(configPath, content) - console.log(chalk.green(`Generated gRPC client at ${configPath}`)) + const filePath = path.join(ROOT_DIR, "webview-ui/src/services/grpc-client.ts") + await writeFileWithMkdirs(filePath, content) + log_verbose(chalk.green(`Generated gRPC client at ${filePath}`)) } /** @@ -175,7 +189,7 @@ export { * @returns Map of service names to their streaming methods */ async function parseProtoForStreamingMethods(protoFiles, scriptDir) { - console.log(chalk.cyan("Parsing proto files for streaming methods...")) + log_verbose(chalk.cyan("Parsing proto files for streaming methods...")) // Map of service name to array of streaming method names const streamingMethodsMap = new Map() @@ -227,28 +241,18 @@ async function parseProtoForStreamingMethods(protoFiles, scriptDir) { } async function generateMethodRegistrations() { - console.log(chalk.cyan("Generating method registration files...")) + log_verbose(chalk.cyan("Generating method registration files...")) // Parse proto files for streaming methods const protoFiles = await globby("*.proto", { cwd: SCRIPT_DIR }) const streamingMethodsMap = await parseProtoForStreamingMethods(protoFiles, SCRIPT_DIR) for (const serviceDir of serviceDirs) { - try { - await fs.access(serviceDir) - } catch (error) { - console.log(chalk.cyan(`Creating directory ${serviceDir} for new service`)) - await fs.mkdir(serviceDir, { recursive: true }) - } - const serviceName = path.basename(serviceDir) - const registryFile = path.join(serviceDir, "methods.ts") - const indexFile = path.join(serviceDir, "index.ts") - const fullServiceName = serviceNameMap[serviceName] const streamingMethods = streamingMethodsMap.get(fullServiceName) || [] - console.log(chalk.cyan(`Generating method registrations for ${serviceName}...`)) + log_verbose(chalk.cyan(`Generating method registrations for ${serviceName}...`)) // Get all TypeScript files in the service directory const files = await globby("*.ts", { cwd: serviceDir }) @@ -300,8 +304,9 @@ export function registerAllMethods(): void { methodsContent += `}` // Write the methods.ts file - await fs.writeFile(registryFile, methodsContent) - console.log(chalk.green(`Generated ${registryFile}`)) + const registryFile = path.join(serviceDir, "methods.ts") + await writeFileWithMkdirs(registryFile, methodsContent) + log_verbose(chalk.green(`Generated ${registryFile}`)) // Generate index.ts file const capitalizedServiceName = serviceName.charAt(0).toUpperCase() + serviceName.slice(1) @@ -329,11 +334,12 @@ export const isStreamingMethod = ${serviceName}Service.isStreamingMethod registerAllMethods()` // Write the index.ts file - await fs.writeFile(indexFile, indexContent) - console.log(chalk.green(`Generated ${indexFile}`)) + const indexFile = path.join(serviceDir, "index.ts") + await writeFileWithMkdirs(indexFile, indexContent) + log_verbose(chalk.green(`Generated ${indexFile}`)) } - console.log(chalk.green("Method registration files generated successfully.")) + log_verbose(chalk.green("Method registration files generated successfully.")) } /** @@ -341,7 +347,7 @@ registerAllMethods()` * This eliminates the need for manual switch/case statements in grpc-handler.ts */ async function generateServiceConfig() { - console.log(chalk.cyan("Generating service configuration file...")) + log_verbose(chalk.cyan("Generating service configuration file...")) const serviceImports = [] const serviceConfigs = [] @@ -380,9 +386,9 @@ export interface ServiceHandlerConfig { export const serviceHandlers: Record = {${serviceConfigs.join(",")} };` - const configPath = path.join(ROOT_DIR, "src", "core", "controller", "grpc-service-config.ts") - await fs.writeFile(configPath, content) - console.log(chalk.green(`Generated service configuration at ${configPath}`)) + const configPath = path.join(ROOT_DIR, "src/core/controller/grpc-service-config.ts") + await writeFileWithMkdirs(configPath, content) + log_verbose(chalk.green(`Generated service configuration at ${configPath}`)) } /** @@ -390,7 +396,7 @@ export const serviceHandlers: Record = {${serviceC * If a .proto file doesn't exist, create a template file */ async function ensureProtoFilesExist() { - console.log(chalk.cyan("Checking for missing proto files...")) + log_verbose(chalk.cyan("Checking for missing proto files...")) // Get existing proto files const existingProtoFiles = await globby("*.proto", { cwd: SCRIPT_DIR }) @@ -399,7 +405,7 @@ async function ensureProtoFilesExist() { // Check each service in serviceNameMap for (const [serviceName, fullServiceName] of Object.entries(serviceNameMap)) { if (!existingProtoServices.includes(serviceName)) { - console.log(chalk.yellow(`Creating template proto file for ${serviceName}...`)) + log_verbose(chalk.yellow(`Creating template proto file for ${serviceName}...`)) // Extract service class name from full name (e.g., "ClineShengsuan.ModelsService" -> "ModelsService") const serviceClassName = fullServiceName.split(".").pop() @@ -407,7 +413,7 @@ async function ensureProtoFilesExist() { // Create template proto file const protoContent = `syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; @@ -432,7 +438,7 @@ service ${serviceClassName} { // Write the template proto file const protoFilePath = path.join(SCRIPT_DIR, `${serviceName}.proto`) await fs.writeFile(protoFilePath, protoContent) - console.log(chalk.green(`Created template proto file at ${protoFilePath}`)) + log_verbose(chalk.green(`Created template proto file at ${protoFilePath}`)) } } } @@ -441,28 +447,18 @@ service ${serviceClassName} { * Generate method registration files for host services */ async function generateHostMethodRegistrations() { - console.log(chalk.cyan("Generating host method registration files...")) + log_verbose(chalk.cyan("Generating host method registration files...")) // Parse proto files for streaming methods const hostProtoFiles = await globby("*.proto", { cwd: path.join(SCRIPT_DIR, "host") }) const streamingMethodsMap = await parseProtoForStreamingMethods(hostProtoFiles, path.join(SCRIPT_DIR, "host")) for (const serviceDir of hostServiceDirs) { - try { - await fs.access(serviceDir) - } catch (error) { - console.log(chalk.cyan(`Creating directory ${serviceDir} for new host service`)) - await fs.mkdir(serviceDir, { recursive: true }) - } - const serviceName = path.basename(serviceDir) - const registryFile = path.join(serviceDir, "methods.ts") - const indexFile = path.join(serviceDir, "index.ts") - const fullServiceName = hostServiceNameMap[serviceName] const streamingMethods = streamingMethodsMap.get(fullServiceName) || [] - console.log(chalk.cyan(`Generating method registrations for host ${serviceName}...`)) + log_verbose(chalk.cyan(`Generating method registrations for host ${serviceName}...`)) // Get all TypeScript files in the service directory const files = await globby("*.ts", { cwd: serviceDir }) @@ -514,8 +510,9 @@ export function registerAllMethods(): void { methodsContent += `}` // Write the methods.ts file - await fs.writeFile(registryFile, methodsContent) - console.log(chalk.green(`Generated ${registryFile}`)) + const registryFile = path.join(serviceDir, "methods.ts") + await writeFileWithMkdirs(registryFile, methodsContent) + log_verbose(chalk.green(`Generated ${registryFile}`)) // Generate index.ts file const capitalizedServiceName = serviceName.charAt(0).toUpperCase() + serviceName.slice(1) @@ -543,18 +540,19 @@ export const isStreamingMethod = ${serviceName}Service.isStreamingMethod registerAllMethods()` // Write the index.ts file - await fs.writeFile(indexFile, indexContent) - console.log(chalk.green(`Generated ${indexFile}`)) + const indexFile = path.join(serviceDir, "index.ts") + await writeFileWithMkdirs(indexFile, indexContent) + log_verbose(chalk.green(`Generated ${indexFile}`)) } - console.log(chalk.green("Host method registration files generated successfully.")) + log_verbose(chalk.green("Host method registration files generated successfully.")) } /** * Generate a service configuration file for host services */ async function generateHostServiceConfig() { - console.log(chalk.cyan("Generating host service configuration file...")) + log_verbose(chalk.cyan("Generating host service configuration file...")) const serviceImports = [] const serviceConfigs = [] @@ -592,55 +590,81 @@ export interface HostServiceHandlerConfig { export const hostServiceHandlers: Record = {${serviceConfigs.join(",")} };` - const configPath = path.join(ROOT_DIR, "hosts", "vscode", "host-grpc-service-config.ts") - await fs.mkdir(path.dirname(configPath), { recursive: true }) - await fs.writeFile(configPath, content) - console.log(chalk.green(`Generated host service configuration at ${configPath}`)) + const filePath = path.join(ROOT_DIR, "src/hosts/vscode/host-grpc-service-config.ts") + await writeFileWithMkdirs(filePath, content) + log_verbose(chalk.green(`Generated host service configuration at ${filePath}`)) } /** * Generate a gRPC client configuration file for host services */ async function generateHostGrpcClientConfig() { - console.log(chalk.cyan("Generating host gRPC client configuration...")) - - const serviceImports = [] - const serviceClientCreations = [] - const serviceExports = [] + log_verbose(chalk.cyan("Generating host gRPC client configuration...")) + const clients = [] // Process each service in the hostServiceNameMap - for (const [dirName, fullServiceName] of Object.entries(hostServiceNameMap)) { - const capitalizedName = dirName.charAt(0).toUpperCase() + dirName.slice(1) - - // Add import statement - serviceImports.push(`import { ${capitalizedName}ServiceDefinition } from "@shared/proto/host/${dirName}"`) - - // Add client creation - serviceClientCreations.push( - `const ${capitalizedName}ServiceClient = createGrpcClient(${capitalizedName}ServiceDefinition)`, - ) - - // Add to exports - serviceExports.push(`${capitalizedName}ServiceClient`) + for (const [_dirName, fullServiceName] of Object.entries(hostServiceNameMap)) { + const serviceName = fullServiceName.replace(/.*\./, "") + clients.push(`${serviceName}Client: createGrpcClient(${fullServiceName}Definition)`) } // Generate the file content const content = `// AUTO-GENERATED FILE - DO NOT MODIFY DIRECTLY // Generated by proto/build-proto.js -import { createGrpcClient } from "./host-grpc-client-base" -${serviceImports.join("\n")} +import { createGrpcClient } from "@hosts/vscode/client/host-grpc-client-base" +import { HostBridgeClientProvider } from "@/hosts/host-bridge-client" +import * as host from "@shared/proto/index.host" -${serviceClientCreations.join("\n")} - -export { - ${serviceExports.join(",\n\t")} +export const vscodeHostBridgeClient: HostBridgeClientProvider = { + ${clients.join(",\n\t")} }` - const configPath = path.join(ROOT_DIR, "src", "standalone", "services", "host-grpc-client.ts") - await fs.mkdir(path.dirname(configPath), { recursive: true }) - await fs.writeFile(configPath, content) - console.log(chalk.green(`Generated host gRPC client at ${configPath}`)) + const filePath = path.join(ROOT_DIR, "src/generated/hosts/vscode/client/host-grpc-client.ts") + await writeFileWithMkdirs(filePath, content) + log_verbose(chalk.green(`Generated host gRPC client at ${filePath}`)) +} + +async function cleanup() { + // Clean up existing generated files + log_verbose(chalk.cyan("Cleaning up existing generated TypeScript files...")) + const existingFiles = await globby("**/*.ts", { cwd: TS_OUT_DIR }) + for (const file of existingFiles) { + await fs.unlink(path.join(TS_OUT_DIR, file)) + } + await rmdir(path.join(ROOT_DIR, "src/generated")) + + // Clean up generated files that were moved. + await fs.rm(path.join(ROOT_DIR, "src/hosts/vscode/client/host-grpc-client.ts"), { force: true }) + await fs.rm(path.join(ROOT_DIR, "src/standalone/services/host-grpc-client.ts"), { force: true }) + await rmdir(path.join(ROOT_DIR, "src/standalone/services")) + + await fs.rm(path.join(ROOT_DIR, "hosts/vscode"), { force: true, recursive: true }) + await rmdir(path.join(ROOT_DIR, "hosts")) + + await fs.rm(path.join(ROOT_DIR, "src/standalone/server-setup.ts"), { force: true }) +} + +/** + * Write `contents` to `filePath`, creating any necessary directories in `filePath`. + */ +async function writeFileWithMkdirs(filePath, content) { + await fs.mkdir(path.dirname(filePath), { recursive: true }) + await fs.writeFile(filePath, content) +} + +/** + * Remove an empty dir, do nothing if the directory doesn't exist or is not empty. + */ +async function rmdir(path) { + try { + await fs.rmdir(path) + } catch (error) { + if (error.code !== "ENOTEMPTY" && error.code !== "ENOENT") { + // Only re-throw if it's not "not empty" or "doesn't exist" + throw error + } + } } // Check for Apple Silicon compatibility @@ -673,6 +697,12 @@ function checkAppleSiliconCompatibility() { } } +function log_verbose(s) { + if (process.argv.includes("-v") || process.argv.includes("--verbose")) { + console.log(s) + } +} + // Run the main function main().catch((error) => { console.error(chalk.red("Error:"), error) diff --git a/proto/checkpoints.proto b/proto/checkpoints.proto index 4a909bb5..64df64cc 100644 --- a/proto/checkpoints.proto +++ b/proto/checkpoints.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; diff --git a/proto/common.proto b/proto/common.proto index 2774b510..2b74dcc5 100644 --- a/proto/common.proto +++ b/proto/common.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; diff --git a/proto/file.proto b/proto/file.proto index 214c8cf6..3b27ee76 100644 --- a/proto/file.proto +++ b/proto/file.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; diff --git a/proto/host/uri.proto b/proto/host/uri.proto index fc7b2bf5..e0616761 100644 --- a/proto/host/uri.proto +++ b/proto/host/uri.proto @@ -9,13 +9,13 @@ import "common.proto"; // UriService provides methods for working with URIs in the IDE service UriService { // Create a new file URI from a file path - rpc file(ClineShengsuan.StringRequest) returns (Uri); + rpc file(cline_shengsuan.StringRequest) returns (Uri); // Join a URI with additional path segments rpc joinPath(JoinPathRequest) returns (Uri); // Parse a string URI into a Uri object - rpc parse(ClineShengsuan.StringRequest) returns (Uri); + rpc parse(cline_shengsuan.StringRequest) returns (Uri); } // Uri represents a URI in the IDE @@ -25,12 +25,12 @@ message Uri { string path = 3; string query = 4; string fragment = 5; - string fsPath = 6; + string fs_path = 6; } // Request for joining path segments to a URI message JoinPathRequest { - ClineShengsuan.Metadata metadata = 1; + cline_shengsuan.Metadata metadata = 1; Uri base = 2; - repeated string pathSegments = 3; + repeated string path_segments = 3; } diff --git a/proto/host/watch.proto b/proto/host/watch.proto index eb7b05c8..1efda17d 100644 --- a/proto/host/watch.proto +++ b/proto/host/watch.proto @@ -14,7 +14,7 @@ service WatchService { // Request to subscribe to file changes message SubscribeToFileRequest { - ClineShengsuan.Metadata metadata = 1; + cline_shengsuan.Metadata metadata = 1; string path = 2; } diff --git a/proto/mcp.proto b/proto/mcp.proto index a568f126..f8f7195a 100644 --- a/proto/mcp.proto +++ b/proto/mcp.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; diff --git a/proto/models.proto b/proto/models.proto index b9313def..bb81c6d8 100644 --- a/proto/models.proto +++ b/proto/models.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; @@ -24,19 +24,21 @@ service ModelsService { rpc refreshShengSuanYunModels(EmptyRequest) returns (OpenRouterCompatibleModelInfo); // Subscribe to OpenRouter models updates rpc subscribeToOpenRouterModels(EmptyRequest) returns (stream OpenRouterCompatibleModelInfo); + // Updates API configuration + rpc updateApiConfigurationProto(UpdateApiConfigurationRequest) returns (Empty); } // List of VS Code LM models message VsCodeLmModelsArray { - repeated VsCodeLmModel models = 1; + repeated LanguageModelChatSelector models = 1; } -// Structure representing a VS Code LM model -message VsCodeLmModel { - string vendor = 1; - string family = 2; - string version = 3; - string id = 4; +// Structure representing a language model chat selector +message LanguageModelChatSelector { + optional string vendor = 1; + optional string family = 2; + optional string version = 3; + optional string id = 4; } // Price tier for tiered pricing models @@ -85,8 +87,157 @@ message OpenRouterCompatibleModelInfo { // Request for fetching OpenAI models message OpenAiModelsRequest { Metadata metadata = 1; - string baseUrl = 2; - string apiKey = 3; + string base_url = 2; + string api_key = 3; +} + +// Request for updating API configuration +message UpdateApiConfigurationRequest { + Metadata metadata = 1; + ModelsApiConfiguration api_configuration = 2; +} + +// API Provider enumeration +enum ApiProvider { + ANTHROPIC = 0; + OPENROUTER = 1; + BEDROCK = 2; + VERTEX = 3; + OPENAI = 4; + OLLAMA = 5; + LMSTUDIO = 6; + GEMINI = 7; + OPENAI_NATIVE = 8; + REQUESTY = 9; + TOGETHER = 10; + DEEPSEEK = 11; + QWEN = 12; + DOUBAO = 13; + MISTRAL = 14; + VSCODE_LM = 15; + CLINE = 16; + LITELLM = 17; + NEBIUS = 18; + FIREWORKS = 19; + ASKSAGE = 20; + XAI = 21; + SAMBANOVA = 22; + CEREBRAS = 23; + SAPAICORE = 24; + CLAUDE_CODE = 25; +} + +// Model info for OpenAI-compatible models +message OpenAiCompatibleModelInfo { + optional int32 max_tokens = 1; + optional int32 context_window = 2; + optional bool supports_images = 3; + bool supports_prompt_cache = 4; + optional double input_price = 5; + optional double output_price = 6; + optional ThinkingConfig thinking_config = 7; + optional bool supports_global_endpoint = 8; + optional double cache_writes_price = 9; + optional double cache_reads_price = 10; + optional string description = 11; + repeated ModelTier tiers = 12; + optional double temperature = 13; + optional bool is_r1_format_required = 14; +} + +// Model info for LiteLLM models +message LiteLLMModelInfo { + optional int32 max_tokens = 1; + optional int32 context_window = 2; + optional bool supports_images = 3; + bool supports_prompt_cache = 4; + optional double input_price = 5; + optional double output_price = 6; + optional ThinkingConfig thinking_config = 7; + optional bool supports_global_endpoint = 8; + optional double cache_writes_price = 9; + optional double cache_reads_price = 10; + optional string description = 11; + repeated ModelTier tiers = 12; + optional double temperature = 13; +} + +// Main ApiConfiguration message +message ModelsApiConfiguration { + // From ApiHandlerOptions (excluding onRetryAttempt function) + optional string api_model_id = 1; + optional string api_key = 2; + optional string cline_api_key = 3; + optional string task_id = 4; + optional string lite_llm_base_url = 5; + optional string lite_llm_model_id = 6; + optional string lite_llm_api_key = 7; + optional bool lite_llm_use_prompt_cache = 8; + map open_ai_headers = 9; + optional LiteLLMModelInfo lite_llm_model_info = 10; + optional string anthropic_base_url = 11; + optional string open_router_api_key = 12; + optional string open_router_model_id = 13; + optional OpenRouterModelInfo open_router_model_info = 14; + optional string open_router_provider_sorting = 15; + optional string aws_access_key = 16; + optional string aws_secret_key = 17; + optional string aws_session_token = 18; + optional string aws_region = 19; + optional bool aws_use_cross_region_inference = 20; + optional bool aws_bedrock_use_prompt_cache = 21; + optional bool aws_use_profile = 22; + optional string aws_profile = 23; + optional string aws_bedrock_endpoint = 24; + optional bool aws_bedrock_custom_selected = 25; + optional string aws_bedrock_custom_model_base_id = 26; + optional string vertex_project_id = 27; + optional string vertex_region = 28; + optional string open_ai_base_url = 29; + optional string open_ai_api_key = 30; + optional string open_ai_model_id = 31; + optional OpenAiCompatibleModelInfo open_ai_model_info = 32; + optional string ollama_model_id = 33; + optional string ollama_base_url = 34; + optional string ollama_api_options_ctx_num = 35; + optional string lm_studio_model_id = 36; + optional string lm_studio_base_url = 37; + optional string gemini_api_key = 38; + optional string gemini_base_url = 39; + optional string open_ai_native_api_key = 40; + optional string deep_seek_api_key = 41; + optional string requesty_api_key = 42; + optional string requesty_model_id = 43; + optional OpenRouterModelInfo requesty_model_info = 44; + optional string together_api_key = 45; + optional string together_model_id = 46; + optional string fireworks_api_key = 47; + optional string fireworks_model_id = 48; + optional int32 fireworks_model_max_completion_tokens = 49; + optional int32 fireworks_model_max_tokens = 50; + optional string qwen_api_key = 51; + optional string doubao_api_key = 52; + optional string mistral_api_key = 53; + optional string azure_api_version = 54; + optional LanguageModelChatSelector vs_code_lm_model_selector = 55; + optional string qwen_api_line = 56; + optional string nebius_api_key = 57; + optional string asksage_api_url = 58; + optional string asksage_api_key = 59; + optional string xai_api_key = 60; + optional int32 thinking_budget_tokens = 61; + optional string reasoning_effort = 62; + optional string sambanova_api_key = 63; + optional string cerebras_api_key = 64; + optional int32 request_timeout_ms = 65; + optional ApiProvider api_provider = 66; + repeated string favorited_model_ids = 67; + optional string sap_ai_core_client_id = 68; + optional string sap_ai_core_client_secret = 69; + optional string sap_ai_resource_group = 70; + optional string sap_ai_core_token_url = 71; + optional string sap_ai_core_base_url = 72; + optional string claude_code_path = 73; } message ShengSuanYunModelInfo { diff --git a/proto/slash.proto b/proto/slash.proto index 17d5aa1a..9fc2cd16 100644 --- a/proto/slash.proto +++ b/proto/slash.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; diff --git a/proto/state.proto b/proto/state.proto index 8b63359e..8d805be6 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -1,5 +1,5 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; @@ -7,11 +7,14 @@ import "common.proto"; service StateService { rpc getLatestState(EmptyRequest) returns (State); + rpc updateTerminalConnectionTimeout(Int64Request) returns (Int64); + rpc updateTerminalReuseEnabled(BooleanRequest) returns (Empty); + rpc updateDefaultTerminalProfile(StringRequest) returns (TerminalProfileUpdateResponse); + rpc getAvailableTerminalProfiles(EmptyRequest) returns (TerminalProfiles); rpc subscribeToState(EmptyRequest) returns (stream State); rpc toggleFavoriteModel(StringRequest) returns (Empty); - rpc resetState(EmptyRequest) returns (Empty); + rpc resetState(ResetStateRequest) returns (Empty); rpc togglePlanActMode(TogglePlanActModeRequest) returns (Empty); - rpc updateTerminalConnectionTimeout(Int64Request) returns (Int64); rpc updateAutoApprovalSettings(AutoApprovalSettingsRequest) returns (Empty); rpc updateSettings(UpdateSettingsRequest) returns (Empty); } @@ -20,6 +23,23 @@ message State { string state_json = 1; } +message TerminalProfiles { + repeated TerminalProfile profiles = 1; +} + +message TerminalProfile { + string id = 1; + string name = 2; + optional string path = 3; + optional string description = 4; +} + +message TerminalProfileUpdateResponse { + int32 closed_count = 1; + int32 busy_terminals_count = 2; + bool has_busy_terminals = 3; +} + message TogglePlanActModeRequest { Metadata metadata = 1; ChatSettings chat_settings = 2; @@ -43,10 +63,13 @@ message ChatContent { repeated string files = 3; } -// Message for auto approval settings +message ResetStateRequest { + Metadata metadata = 1; + optional bool global = 2; +} + message AutoApprovalSettingsRequest { Metadata metadata = 1; - message Actions { bool read_files = 1; bool read_files_externally = 2; @@ -57,7 +80,6 @@ message AutoApprovalSettingsRequest { bool use_browser = 7; bool use_mcp = 8; } - int32 version = 2; bool enabled = 3; Actions actions = 4; @@ -70,15 +92,16 @@ message AutoApprovalSettingsRequest { message UpdateSettingsRequest { Metadata metadata = 1; optional ApiConfiguration api_configuration = 2; - optional string custom_instructions_setting = 3; - optional string telemetry_setting = 4; - optional bool plan_act_separate_models_setting = 5; - optional bool enable_checkpoints_setting = 6; - optional bool mcp_marketplace_enabled = 7; - optional ChatSettings chat_settings = 8; - optional int64 shell_integration_timeout = 9; - optional bool terminal_reuse_enabled = 10; - optional bool mcp_responses_collapsed = 11; + optional string telemetry_setting = 3; + optional bool plan_act_separate_models_setting = 4; + optional bool enable_checkpoints_setting = 5; + optional bool mcp_marketplace_enabled = 6; + optional ChatSettings chat_settings = 7; + optional int64 shell_integration_timeout = 8; + optional bool terminal_reuse_enabled = 9; + optional bool mcp_responses_collapsed = 10; + optional bool mcp_rich_display_enabled = 11; + optional int64 terminal_output_line_limit = 12; } // Complete API Configuration message @@ -194,7 +217,13 @@ message ApiConfiguration { optional string shengsuanyun_model_info = 74; optional string shengsuanyun_token = 75; - //Dify - optional string dify_api_key = 76; - optional string dify_base_url = 77; + // SAP AI Core specific + optional string sap_ai_core_client_id = 76; + optional string sap_ai_core_client_secret = 77; + optional string sap_ai_core_base_url = 78; + optional string sap_ai_core_token_url = 79; + optional string sap_ai_resource_group = 80; + + // Claude Code specific + optional string claude_code_path = 81; } diff --git a/proto/task.proto b/proto/task.proto index ab171f0e..0b9a6a6a 100644 --- a/proto/task.proto +++ b/proto/task.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; diff --git a/proto/ui.proto b/proto/ui.proto index daad7fcf..0023c18f 100644 --- a/proto/ui.proto +++ b/proto/ui.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; @@ -15,7 +15,7 @@ enum WebviewProviderType { // Define a new message type for webview provider info message WebviewProviderTypeRequest { Metadata metadata = 1; - WebviewProviderType providerType = 2; + WebviewProviderType provider_type = 2; } // Enum for ClineMessage type @@ -65,13 +65,14 @@ enum ClineSay { BROWSER_ACTION_RESULT = 16; MCP_SERVER_REQUEST_STARTED = 17; MCP_SERVER_RESPONSE = 18; - USE_MCP_SERVER_SAY = 19; - DIFF_ERROR = 20; - DELETED_API_REQS = 21; - CLINEIGNORE_ERROR = 22; - CHECKPOINT_CREATED = 23; - LOAD_MCP_DOCUMENTATION = 24; - INFO = 25; + MCP_NOTIFICATION = 19; + USE_MCP_SERVER_SAY = 20; + DIFF_ERROR = 21; + DELETED_API_REQS = 22; + CLINEIGNORE_ERROR = 23; + CHECKPOINT_CREATED = 24; + LOAD_MCP_DOCUMENTATION = 25; + INFO = 26; } // Enum for ClineSayTool tool types @@ -255,4 +256,10 @@ service UiService { // Subscribe to relinquish control events rpc subscribeToRelinquishControl(EmptyRequest) returns (stream Empty); + + // Subscribe to focus chat input events with client ID + rpc subscribeToFocusChatInput(StringRequest) returns (stream Empty); + + // Subscribe to webview visibility change events + rpc subscribeToDidBecomeVisible(EmptyRequest) returns (stream Empty); } diff --git a/proto/web.proto b/proto/web.proto index 2a9d5840..e5da2634 100644 --- a/proto/web.proto +++ b/proto/web.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package ClineShengsuan; +package cline_shengsuan; option java_package = "bot.ClineShengsuan.proto"; option java_multiple_files = true; diff --git a/scripts/build-tests.js b/scripts/build-tests.js index 247d247b..8b1e4b0c 100644 --- a/scripts/build-tests.js +++ b/scripts/build-tests.js @@ -34,7 +34,6 @@ const srcConfig = { format: "cjs", platform: "node", define: { - "process.env.IS_DEV": "true", "process.env.IS_TEST": "true", }, external: ["vscode"], diff --git a/scripts/generate-host-bridge-client.mjs b/scripts/generate-host-bridge-client.mjs new file mode 100755 index 00000000..eb6c340d --- /dev/null +++ b/scripts/generate-host-bridge-client.mjs @@ -0,0 +1,192 @@ +#!/usr/bin/env node + +import * as fs from "fs/promises" +import * as path from "path" +import * as grpc from "@grpc/grpc-js" +import * as protoLoader from "@grpc/proto-loader" +import chalk from "chalk" + +const IMPL_FILE = path.resolve("src/generated/standalone/host-bridge-clients.ts") +const INTERFACE_FILE = path.resolve("src/generated/hosts/host-bridge-client-types.ts") +const DESCRIPTOR_SET = path.resolve("dist-standalone/proto/descriptor_set.pb") + +const typeNameToFQN = new Map() + +function addTypeNameToFqn(name, fqn) { + if (typeNameToFQN.has(name)) { + throw new Error(`Proto type ${name} redefined (${fqn}).`) + } + typeNameToFQN.set(name, fqn) +} +function getFqn(name) { + if (!typeNameToFQN.has(name)) { + throw Error(`No FQN for ${name}`) + } + return typeNameToFQN.get(name) +} +/** + * Main function to generate the host bridge client + */ +async function main() { + // Load service definitions from descriptor set + const descriptorBuffer = await fs.readFile(DESCRIPTOR_SET) + const packageDefinition = protoLoader.loadFileDescriptorSetFromBuffer(descriptorBuffer) + const proto = grpc.loadPackageDefinition(packageDefinition) + + // Extract host services and proto messages from the proto definition + const hostServices = {} + for (const [name, def] of Object.entries(proto.host)) { + if (def && "service" in def) { + hostServices[name] = def + } else { + addTypeNameToFqn(name, `proto.host.${name}`) + } + } + for (const [name, def] of Object.entries(proto.cline_shengsuan)) { + if (def && !("service" in def)) { + addTypeNameToFqn(name, `proto.cline_shengsuan.${name}`) + } + } + + // Generate interfaces file + await generateInterfacesFile(hostServices) + + // // Generate implementation file + await generateImplementationFile(hostServices) + + console.log(`Generated host bridge client files at:`) + console.log(`- ${INTERFACE_FILE}`) + console.log(`- ${IMPL_FILE}`) +} + +/** + * Generate the client interfaces file. + */ +async function generateInterfacesFile(hostServices) { + const clientInterfaces = [] + for (const [name, def] of Object.entries(hostServices)) { + const clientInterface = generateClientInterface(name, def) + clientInterfaces.push(clientInterface) + } + const content = `// GENERATED CODE -- DO NOT EDIT! +// Generated by scripts/generate-host-bridge-client.mjs +import * as proto from "@shared/proto/index" +import { StreamingCallbacks } from "@hosts/host-bridge-client" + +${clientInterfaces.join("\n\n")} +` + // Write output file + await fs.mkdir(path.dirname(INTERFACE_FILE), { recursive: true }) + await fs.writeFile(INTERFACE_FILE, content) +} + +/** + * Generate a client interface for a service. + */ +function generateClientInterface(serviceName, serviceDefinition) { + // Get the methods from the service definition + const methods = Object.entries(serviceDefinition.service) + .map(([methodName, methodDef]) => { + const requestType = getFqn(methodDef.requestType.type.name) + const responseType = getFqn(methodDef.responseType.type.name) + + if (!methodDef.responseStream) { + // Generate unary method signature. + return ` ${methodName}(request: ${requestType}): Promise<${responseType}>;` + } + // Generate streaming method signature. + return ` ${methodName}(request: ${requestType}, callbacks: StreamingCallbacks<${responseType}>): () => void;` + }) + .join("\n\n") + + // Generate the interface + return `/** + * Interface for ${serviceName} client. + */ +export interface ${serviceName}ClientInterface { + +${methods} +}` +} + +/** + * Generate the client implementations file. + */ +async function generateImplementationFile(hostServices) { + // Generate imports + const imports = [] + // Add imports for the interfaces + for (const [name, _def] of Object.entries(hostServices)) { + imports.push(`import { ${name}ClientInterface } from "@generated/hosts/host-bridge-client-types"`) + } + const clientImplementations = [] + for (const [name, def] of Object.entries(hostServices)) { + clientImplementations.push(generateClientImplementation(name, def)) + } + + const content = `// GENERATED CODE -- DO NOT EDIT! +// Generated by scripts/generate-host-bridge-client.mjs +import { asyncIteratorToCallbacks } from "@/standalone/utils" +import * as niceGrpc from "@generated/nice-grpc/index" +import { StreamingCallbacks } from "@hosts/host-bridge-client" +import * as proto from "@shared/proto/index" +import { Channel, createClient } from "nice-grpc" + +${imports.join("\n")} + +${clientImplementations.join("\n\n")} +` + + // Write output file + await fs.mkdir(path.dirname(IMPL_FILE), { recursive: true }) + await fs.writeFile(IMPL_FILE, content) +} + +/** + * Generate a client implementation class for a service + */ +function generateClientImplementation(serviceName, serviceDefinition) { + // Get the methods from the service definition + const methods = Object.entries(serviceDefinition.service) + .map(([methodName, methodDef]) => { + // Get fully qualified type names + const requestType = getFqn(methodDef.requestType.type.name) + const responseType = getFqn(methodDef.responseType.type.name) + const isStreamingResponse = methodDef.responseStream + + if (!isStreamingResponse) { + return ` ${methodName}(request: ${requestType}): Promise<${responseType}> { + return this.client.${methodName}(request) + }` + } else { + // Generate streaming method + return ` ${methodName}(request: ${requestType}, callbacks: StreamingCallbacks<${responseType}>): () => void { + const abortController = new AbortController() + const stream: AsyncIterable<${responseType}> = this.client.${methodName}(request, {signal: abortController.signal}) + asyncIteratorToCallbacks(stream, callbacks) + return () => {abortController.abort()} + }` + } + }) + .join("\n\n") + + // Generate the class + return `/** + * Type-safe client implementation for ${serviceName}. + */ +export class ${serviceName}ClientImpl implements ${serviceName}ClientInterface { + private client: niceGrpc.host.${serviceName}Client + + constructor(channel: Channel) { + this.client = createClient(niceGrpc.host.${serviceName}Definition, channel) + } + +${methods} +}` +} + +// Run the main function +main().catch((error) => { + console.error(chalk.red("Error:"), error) + process.exit(1) +}) diff --git a/scripts/generate-server-setup.mjs b/scripts/generate-server-setup.mjs index 397ef4b7..85e740ca 100644 --- a/scripts/generate-server-setup.mjs +++ b/scripts/generate-server-setup.mjs @@ -1,11 +1,11 @@ -import * as fs from "fs" import * as grpc from "@grpc/grpc-js" import * as protoLoader from "@grpc/proto-loader" +import * as fs from "fs" import * as health from "grpc-health-check" +import path, { basename, dirname } from "path" import { fileURLToPath } from "url" -import path from "path" -const OUT_FILE = path.resolve("src/standalone/server-setup.ts") +const OUT_FILE = path.resolve("src/generated/standalone/server-setup.ts") const DESCRIPTOR_SET = path.resolve("dist-standalone/proto/descriptor_set.pb") // Load service definitions. @@ -21,7 +21,7 @@ function generateHandlersAndExports() { let imports = [] let handlerSetup = [] - for (const [name, def] of Object.entries(proto.ClineShengsuan)) { + for (const [name, def] of Object.entries(proto.cline_shengsuan)) { if (!def || !("service" in def)) { continue } @@ -29,17 +29,17 @@ function generateHandlersAndExports() { const dir = domain.charAt(0).toLowerCase() + domain.slice(1) imports.push(`// ${domain} Service`) handlerSetup.push(` // ${domain} Service`) - handlerSetup.push(` server.addService(proto.ClineShengsuan.${name}.service, {`) + handlerSetup.push(` server.addService(cline_shengsuan.${name}Service, {`) for (const [rpcName, rpc] of Object.entries(def.service)) { - imports.push(`import { ${rpcName} } from "../core/controller/${dir}/${rpcName}"`) - const requestType = "proto.ClineShengsuan." + rpc.requestType.type.name + imports.push(`import { ${rpcName} } from "@core/controller/${dir}/${rpcName}"`) + const requestType = "cline_shengsuan." + rpc.requestType.type.name if (rpc.requestStream) { throw new Error("Request streaming is not supported") } if (rpc.responseStream) { handlerSetup.push(` ${rpcName}: wrapStreamingResponse<${requestType},void>(${rpcName}, controller),`) } else { - const responseType = "proto.ClineShengsuan." + rpc.responseType.type.name + const responseType = "cline_shengsuan." + rpc.responseType.type.name handlerSetup.push(` ${rpcName}: wrapper<${requestType},${responseType}>(${rpcName}, controller),`) } } @@ -60,14 +60,13 @@ const scriptName = path.basename(fileURLToPath(import.meta.url)) let output = `// GENERATED CODE -- DO NOT EDIT! // Generated by ${scriptName} import * as grpc from "@grpc/grpc-js" -import * as proto from "@/shared/proto" -import { Controller } from "../core/controller" -import { GrpcHandlerWrapper, GrpcStreamingResponseHandlerWrapper } from "./grpc-types" +import { cline_shengsuan } from "@generated/grpc-js" +import { Controller } from "@core/controller" +import { GrpcHandlerWrapper, GrpcStreamingResponseHandlerWrapper } from "@/standalone/grpc-types" ${imports} -export function addServices( +export function addProtobusServices( server: grpc.Server, - proto: any, controller: Controller, wrapper: GrpcHandlerWrapper, wrapStreamingResponse: GrpcStreamingResponseHandlerWrapper, @@ -76,6 +75,7 @@ ${handlerSetup} } ` // Write output file +fs.mkdirSync(dirname(OUT_FILE), { recursive: true }) fs.writeFileSync(OUT_FILE, output) console.log(`Generated service handlers in ${OUT_FILE}.`) diff --git a/scripts/get-vscode-usages.sh b/scripts/get-vscode-usages.sh index 79b40cb6..c295958e 100755 --- a/scripts/get-vscode-usages.sh +++ b/scripts/get-vscode-usages.sh @@ -12,6 +12,7 @@ git grep -h 'vscode\.' $DIR | grep -Ev '//.*vscode' | # remove commented out code sed 's|.*vscode\.|vscode.|'| # remove everything before vscode. sed 's/[^a-zA-Z0-9_.].*$//' | # remove everything after last identifier +grep -E '\.[a-z][^.]+$' | # remove types (last part of identifier should be lowercase) sort | uniq > $SDK_DEST } echo Wrote uses of the vscode SDK to $(realpath $SDK_DEST) diff --git a/scripts/package-standalone.mjs b/scripts/package-standalone.mjs index ea710d9d..0655a707 100644 --- a/scripts/package-standalone.mjs +++ b/scripts/package-standalone.mjs @@ -36,12 +36,14 @@ if (nativeModules.length > 0) { // Zip the build directory (excluding any pre-existing output zip). const zipPath = path.join(BUILD_DIR, "standalone.zip") const output = fs.createWriteStream(zipPath) -const archive = archiver("zip", { zlib: { level: 9 } }) +const archive = archiver("zip", { zlib: { level: 3 } }) output.on("close", () => { console.log(`Created ${zipPath} (${(archive.pointer() / 1024 / 1024).toFixed(1)} MB)`) }) - +archive.on("warning", (err) => { + console.warn(`Warning: ${err}`) +}) archive.on("error", (err) => { throw err }) @@ -51,4 +53,20 @@ archive.glob("**/*", { cwd: BUILD_DIR, ignore: ["standalone.zip"], }) + +// Add the whole cline directory under "extension" +archive.directory(process.cwd(), "extension", (entry) => { + // Skip certain directories + if ( + entry.name.startsWith(BUILD_DIR + "/") || + entry.name.startsWith("node_modules/") || // node_modules nearly 1GB. + entry.name.startsWith("webview-ui/node_modules/") || // node_modules nearly 1GB. + entry.name.match(/(^|\/)\./) // exclude dot directories + ) { + return false + } + return entry +}) + +console.log("Zipping package...") await archive.finalize() diff --git a/src/api/index.ts b/src/api/index.ts index a4c01527..44840495 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -26,6 +26,9 @@ import { XAIHandler } from "./providers/xai" import { SambanovaHandler } from "./providers/sambanova" import { CerebrasHandler } from "./providers/cerebras" import { ShengSuanYunHandler } from "./providers/shengsuanyun" +import { SapAiCoreHandler } from "./providers/sapaicore" +import { ClaudeCodeHandler } from "./providers/claude-code" + export interface ApiHandler { createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream getModel(): { id: string; info: ModelInfo } @@ -89,6 +92,10 @@ export function buildApiHandler(configuration: ApiConfiguration): ApiHandler { return new ShengSuanYunHandler(options) case "cerebras": return new CerebrasHandler(options) + case "sapaicore": + return new SapAiCoreHandler(options) + case "claude-code": + return new ClaudeCodeHandler(options) default: return new AnthropicHandler(options) } diff --git a/src/api/providers/__tests__/bedrock.test.ts b/src/api/providers/__tests__/bedrock.test.ts index 9de25412..a9d76bb9 100644 --- a/src/api/providers/__tests__/bedrock.test.ts +++ b/src/api/providers/__tests__/bedrock.test.ts @@ -1,8 +1,49 @@ import "should" import { AwsBedrockHandler } from "../bedrock" import { ApiHandlerOptions } from "@shared/api" +import { ConverseStreamCommand } from "@aws-sdk/client-bedrock-runtime" +import { Readable } from "stream" describe("AwsBedrockHandler", () => { + // Helper function to create a mock stream + function createMockStream(chunks: any[]): Readable { + const stream = new Readable({ + objectMode: true, + read() { + if (chunks.length > 0) { + this.push(chunks.shift()) + } else { + this.push(null) + } + }, + }) + return stream + } + + // Helper function to collect generator results + async function collectGeneratorResults(generator: AsyncGenerator): Promise { + const results: any[] = [] + for await (const item of generator) { + results.push(item) + } + return results + } + + // Mock AWS Bedrock client + class MockBedrockClient { + private streamChunks: any[] + + constructor(streamChunks: any[]) { + this.streamChunks = streamChunks + } + + async send(_command: any): Promise { + return { + stream: createMockStream(this.streamChunks), + } + } + } + describe("withTempEnv", () => { // Store original env vars for cleanup const originalEnv: Record = {} @@ -142,4 +183,511 @@ describe("AwsBedrockHandler", () => { process.env["AWS_PROFILE"]!.should.equal(preAWSProfile) }) }) + + const mockOptions: ApiHandlerOptions = { + apiModelId: "anthropic.claude-3-7-sonnet-20250219-v1:0", + awsRegion: "us-east-1", + awsAccessKey: "test-key", + awsSecretKey: "test-secret", + awsSessionToken: "", + awsUseProfile: false, + awsProfile: "", + awsBedrockUsePromptCache: false, + awsUseCrossRegionInference: false, + awsBedrockEndpoint: "", + awsBedrockCustomSelected: false, + awsBedrockCustomModelBaseId: undefined, + thinkingBudgetTokens: 1600, + } + + const mockModelInfo = { + maxTokens: 8192, + contextWindow: 200000, + supportsPromptCache: true, + supportsImages: true, + inputPrice: 3.0, + outputPrice: 15.0, + cacheWritesPrice: 3.75, + cacheReadsPrice: 0.3, + } + + describe("executeConverseStream", () => { + let handler: AwsBedrockHandler + + beforeEach(() => { + handler = new AwsBedrockHandler(mockOptions) + }) + + describe("reasoning content handling (deprecated)", () => { + // These tests are for the old reasoningContent API that may be deprecated + // Keep them for backward compatibility but they may fail with new API + }) + + describe("thinking response handling (new API structure)", () => { + it("should handle thinking response in additionalModelResponseFields", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + { + metadata: { + additionalModelResponseFields: { + thinkingResponse: { + reasoning: [ + { + type: "text", + text: "まず与えられた数値50.653の立方根を求める必要があります。", + signature: "sig1", + }, + { + type: "text", + text: "立方根を近似するために数値を3乗したときの誤差を調整していきます。", + signature: "sig2", + }, + ], + }, + }, + }, + }, + { contentBlockDelta: { delta: { text: "50.653の立方根は約3.707です。" }, contentBlockIndex: 0 } }, + { contentBlockStop: { contentBlockIndex: 0 } }, + { messageStop: { stopReason: "end_turn" } }, + { metadata: { usage: { inputTokens: 100, outputTokens: 50 } } }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify thinking steps are yielded before the final answer + results.should.have.length(4) + results[0].type.should.equal("reasoning") + results[0].reasoning.should.equal("まず与えられた数値50.653の立方根を求める必要があります。") + results[1].type.should.equal("reasoning") + results[1].reasoning.should.equal("立方根を近似するために数値を3乗したときの誤差を調整していきます。") + results[2].type.should.equal("text") + results[2].text.should.equal("50.653の立方根は約3.707です。") + results[3].type.should.equal("usage") + }) + + it("should not parse thinking tags in text content", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + // Regular text that contains thinking tags should NOT be parsed as thinking + { + contentBlockDelta: { + delta: { text: "Let me explain this is not real thinking in the text." }, + contentBlockIndex: 0, + }, + }, + { contentBlockStop: { contentBlockIndex: 0 } }, + { messageStop: { stopReason: "end_turn" } }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify that thinking tags are treated as regular text + results.should.have.length(1) + results[0].type.should.equal("text") + results[0].text.should.equal("Let me explain this is not real thinking in the text.") + }) + + it("should handle thinking response with empty reasoning array", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + { + metadata: { + additionalModelResponseFields: { + thinkingResponse: { + reasoning: [], + }, + }, + }, + }, + { contentBlockDelta: { delta: { text: "Direct response without thinking" }, contentBlockIndex: 0 } }, + { contentBlockStop: { contentBlockIndex: 0 } }, + { messageStop: { stopReason: "end_turn" } }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify only text is returned when reasoning array is empty + results.should.have.length(1) + results[0].type.should.equal("text") + results[0].text.should.equal("Direct response without thinking") + }) + + it("should handle thinking response interleaved with text chunks", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + // First, some thinking + { + metadata: { + additionalModelResponseFields: { + thinkingResponse: { + reasoning: [{ type: "text", text: "Initial thought process", signature: "sig1" }], + }, + }, + }, + }, + // Then some text + { contentBlockDelta: { delta: { text: "Based on my analysis" }, contentBlockIndex: 0 } }, + // More thinking + { + metadata: { + additionalModelResponseFields: { + thinkingResponse: { + reasoning: [{ type: "text", text: "Additional consideration", signature: "sig2" }], + }, + }, + }, + }, + // Final text + { contentBlockDelta: { delta: { text: ", here is the answer." }, contentBlockIndex: 0 } }, + { contentBlockStop: { contentBlockIndex: 0 } }, + { messageStop: { stopReason: "end_turn" } }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify interleaved thinking and text + results.should.have.length(4) + results[0].type.should.equal("reasoning") + results[0].reasoning.should.equal("Initial thought process") + results[1].type.should.equal("text") + results[1].text.should.equal("Based on my analysis") + results[2].type.should.equal("reasoning") + results[2].reasoning.should.equal("Additional consideration") + results[3].type.should.equal("text") + results[3].text.should.equal(", here is the answer.") + }) + }) + + describe("multiple content blocks", () => { + it("should handle multiple content blocks (reasoning + text)", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + // Text block only - reasoning is now in additionalModelResponseFields + { contentBlockDelta: { delta: { text: "Here is " }, contentBlockIndex: 0 } }, + { contentBlockDelta: { delta: { text: "my response" }, contentBlockIndex: 0 } }, + { contentBlockStop: { contentBlockIndex: 0 } }, + { messageStop: { stopReason: "end_turn" } }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify text chunks are yielded correctly + results.should.have.length(2) + results[0].type.should.equal("text") + results[0].text.should.equal("Here is ") + results[1].type.should.equal("text") + results[1].text.should.equal("my response") + }) + + it("should handle real-world Japanese content", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + // Text block with Japanese response + { contentBlockDelta: { delta: { text: "# 生成AIの仕組み - 10歳の君にも分かる説明" }, contentBlockIndex: 0 } }, + { contentBlockStop: { contentBlockIndex: 0 } }, + { messageStop: { stopReason: "end_turn" } }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify Japanese content is handled correctly + results.should.have.length(1) + results[0].type.should.equal("text") + results[0].text.should.equal("# 生成AIの仕組み - 10歳の君にも分かる説明") + }) + + it("should handle interleaved content blocks", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + // Interleaved text blocks + { contentBlockDelta: { delta: { text: "Text 1" }, contentBlockIndex: 0 } }, + { contentBlockDelta: { delta: { text: " Text 2" }, contentBlockIndex: 0 } }, + // Stop blocks + { contentBlockStop: { contentBlockIndex: 0 } }, + { messageStop: { stopReason: "end_turn" } }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify text chunks are yielded correctly + results.should.have.length(2) + results[0].type.should.equal("text") + results[0].text.should.equal("Text 1") + results[1].type.should.equal("text") + results[1].text.should.equal(" Text 2") + }) + }) + + describe("error handling", () => { + it("should handle internalServerException", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + { internalServerException: { message: "Internal server error occurred" } }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify error was handled + results.should.have.length(1) + results[0].type.should.equal("text") + results[0].text.should.equal("[ERROR] Internal server error: Internal server error occurred") + }) + + it("should handle throttlingException", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + { throttlingException: { message: "Rate limit exceeded" } }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify error was handled + results.should.have.length(1) + results[0].type.should.equal("text") + results[0].text.should.equal("[ERROR] Throttling error: Rate limit exceeded") + }) + }) + + describe("usage tracking", () => { + it("should track usage with cache tokens", async () => { + const mockChunks = [ + { messageStart: { role: "assistant" } }, + { contentBlockDelta: { delta: { text: "Response" }, contentBlockIndex: 0 } }, + { contentBlockStop: { contentBlockIndex: 0 } }, + { messageStop: { stopReason: "end_turn" } }, + { + metadata: { + usage: { + inputTokens: 100, + outputTokens: 50, + cacheReadInputTokens: 20, + cacheWriteInputTokens: 30, + }, + }, + }, + ] + + const mockClient = new MockBedrockClient(mockChunks) + const command = new ConverseStreamCommand({ modelId: "test-model", messages: [] }) + + // Replace getBedrockClient with our mock + const originalGetBedrockClient = handler["getBedrockClient"] + handler["getBedrockClient"] = async () => mockClient as any + + const generator = handler["executeConverseStream"](command, mockModelInfo) + const results = await collectGeneratorResults(generator) + + // Restore original method + handler["getBedrockClient"] = originalGetBedrockClient + + // Verify usage tracking + results.should.have.length(2) + results[0].type.should.equal("text") + results[0].text.should.equal("Response") + results[1].type.should.equal("usage") + results[1].inputTokens.should.equal(100) + results[1].outputTokens.should.equal(50) + results[1].cacheReadTokens.should.equal(20) + results[1].cacheWriteTokens.should.equal(30) + }) + }) + }) + + describe("getModelId", () => { + it("should return raw model ID for custom models", async () => { + const customOptions: ApiHandlerOptions = { + ...mockOptions, + awsBedrockCustomSelected: true, + apiModelId: + "arn:aws:bedrock:us-west-2:123456789012:custom-model/anthropic.claude-3-5-sonnet-20241022-v2:0/Qk8MMyLmRd", + } + const customHandler = new AwsBedrockHandler(customOptions) + + const modelId = await customHandler.getModelId() + modelId.should.equal( + "arn:aws:bedrock:us-west-2:123456789012:custom-model/anthropic.claude-3-5-sonnet-20241022-v2:0/Qk8MMyLmRd", + ) + }) + + it("should not encode custom model IDs with slashes", async () => { + const customOptions: ApiHandlerOptions = { + ...mockOptions, + awsBedrockCustomSelected: true, + apiModelId: "my-namespace/my-custom-model", + } + const customHandler = new AwsBedrockHandler(customOptions) + + const modelId = await customHandler.getModelId() + modelId.should.equal("my-namespace/my-custom-model") + modelId.should.not.match(/%2F/) + }) + + it("should apply cross-region prefix for non-custom models when enabled", async () => { + const crossRegionOptions: ApiHandlerOptions = { + ...mockOptions, + awsUseCrossRegionInference: true, + awsRegion: "us-west-2", + } + const crossRegionHandler = new AwsBedrockHandler(crossRegionOptions) + + const modelId = await crossRegionHandler.getModelId() + modelId.should.equal("us.anthropic.claude-3-7-sonnet-20250219-v1:0") + }) + + it("should apply EU cross-region prefix", async () => { + const euOptions: ApiHandlerOptions = { + ...mockOptions, + awsUseCrossRegionInference: true, + awsRegion: "eu-central-1", + } + const euHandler = new AwsBedrockHandler(euOptions) + + const modelId = await euHandler.getModelId() + modelId.should.equal("eu.anthropic.claude-3-7-sonnet-20250219-v1:0") + }) + + it("should apply APAC cross-region prefix", async () => { + const apacOptions: ApiHandlerOptions = { + ...mockOptions, + awsUseCrossRegionInference: true, + awsRegion: "ap-northeast-1", + } + const apacHandler = new AwsBedrockHandler(apacOptions) + + const modelId = await apacHandler.getModelId() + modelId.should.equal("apac.anthropic.claude-3-7-sonnet-20250219-v1:0") + }) + + it("should not apply cross-region prefix for custom models even when enabled", async () => { + const customCrossRegionOptions: ApiHandlerOptions = { + ...mockOptions, + awsBedrockCustomSelected: true, + apiModelId: "arn:aws:bedrock:us-west-2:123456789012:custom-model/my-model", + awsUseCrossRegionInference: true, + } + const customCrossRegionHandler = new AwsBedrockHandler(customCrossRegionOptions) + + const modelId = await customCrossRegionHandler.getModelId() + modelId.should.equal("arn:aws:bedrock:us-west-2:123456789012:custom-model/my-model") + }) + + it("should handle UltraThink model ARN correctly", async () => { + const ultraThinkOptions: ApiHandlerOptions = { + ...mockOptions, + awsBedrockCustomSelected: true, + apiModelId: + "arn:aws:bedrock:us-west-2:123456789012:custom-model/anthropic.claude-3-5-sonnet-20241022-v2:0/Qk8MMyLmRd", + awsBedrockCustomModelBaseId: "anthropic.claude-3-5-sonnet-20241022-v2:0", + } + const ultraThinkHandler = new AwsBedrockHandler(ultraThinkOptions) + + const modelId = await ultraThinkHandler.getModelId() + // Should return the raw ARN without any encoding + modelId.should.equal( + "arn:aws:bedrock:us-west-2:123456789012:custom-model/anthropic.claude-3-5-sonnet-20241022-v2:0/Qk8MMyLmRd", + ) + modelId.should.not.match(/%2F/) + modelId.should.not.match(/%3A/) + }) + }) }) diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index 12903a66..b89b131d 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -1,4 +1,3 @@ -import AnthropicBedrock from "@anthropic-ai/bedrock-sdk" import { Anthropic } from "@anthropic-ai/sdk" import { withRetry } from "../retry" import { ApiHandler } from "../" @@ -14,6 +13,81 @@ import { InvokeModelWithResponseStreamCommand, } from "@aws-sdk/client-bedrock-runtime" +// Import proper AWS SDK types +import type { Message, ContentBlock } from "@aws-sdk/client-bedrock-runtime" + +// Extend AWS SDK types to include additionalModelResponseFields +interface ExtendedMetadata { + usage?: { + inputTokens?: number + outputTokens?: number + cacheReadInputTokens?: number + cacheWriteInputTokens?: number + } + additionalModelResponseFields?: { + thinkingResponse?: { + reasoning?: Array<{ + type: string + text?: string + signature?: string + }> + } + } +} + +// Define types for stream response content blocks +interface ContentBlockStart { + contentBlockIndex?: number + start?: { + type?: string + thinking?: string + } + contentBlock?: { + type?: string + thinking?: string + } + type?: string + thinking?: string +} + +// Define types for stream response deltas +interface ContentBlockDelta { + contentBlockIndex?: number + delta?: { + type?: string + thinking?: string + text?: string + reasoningContent?: { + text?: string + } + } +} + +// Define types for supported content types +type SupportedContentType = "text" | "image" | "thinking" + +interface ContentItem { + type: SupportedContentType + text?: string + source?: { + data: string | Buffer | Uint8Array + media_type?: string + } +} + +// Define cache point type for AWS Bedrock +interface CachePointContentBlock { + cachePoint: { + type: "default" + } +} + +// Define provider options type based on AWS SDK patterns +interface ProviderChainOptions { + ignoreCache?: boolean + profile?: string +} + // https://docs.anthropic.com/en/api/claude-on-amazon-bedrock export class AwsBedrockHandler implements ApiHandler { private options: ApiHandlerOptions @@ -22,7 +96,7 @@ export class AwsBedrockHandler implements ApiHandler { this.options = options } - @withRetry() + @withRetry({ maxRetries: 4 }) async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream { // cross region inference requires prefixing the model id with the region const modelId = await this.getModelId() @@ -46,146 +120,8 @@ export class AwsBedrockHandler implements ApiHandler { return } - const budget_tokens = this.options.thinkingBudgetTokens || 0 - const reasoningOn = - (baseModelId.includes("3-7") || baseModelId.includes("sonnet-4") || baseModelId.includes("opus-4")) && - budget_tokens !== 0 - ? true - : false - - // Get model info and message indices for caching - const userMsgIndices = messages.reduce((acc, msg, index) => (msg.role === "user" ? [...acc, index] : acc), [] as number[]) - const lastUserMsgIndex = userMsgIndices[userMsgIndices.length - 1] ?? -1 - const secondLastMsgUserIndex = userMsgIndices[userMsgIndices.length - 2] ?? -1 - - // Create anthropic client, using sessions created or renewed after this handler's - // initialization, and allowing for session renewal if necessary as well - const client = await this.getAnthropicClient() - - // Use withTempEnv to ensure environment variables are properly restored - const stream = await AwsBedrockHandler.withTempEnv( - () => { - // AWS SDK prioritizes AWS_PROFILE over AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair - // If this is set as an env variable already (ie. from ~/.zshrc) it will override credentials configured by Cline - // Temporarily remove AWS_PROFILE to ensure our credentials are used - delete process.env["AWS_PROFILE"] - }, - async () => { - return await client.messages.create({ - model: modelId, - max_tokens: model.info.maxTokens || 8192, - thinking: reasoningOn ? { type: "enabled", budget_tokens: budget_tokens } : undefined, - temperature: reasoningOn ? undefined : 0, - system: [ - { - text: systemPrompt, - type: "text", - ...(this.options.awsBedrockUsePromptCache === true && { - cache_control: { type: "ephemeral" }, - }), - }, - ], - messages: messages.map((message, index) => { - if (index === lastUserMsgIndex || index === secondLastMsgUserIndex) { - return { - ...message, - content: - typeof message.content === "string" - ? [ - { - type: "text", - text: message.content, - ...(this.options.awsBedrockUsePromptCache === true && { - cache_control: { type: "ephemeral" }, - }), - }, - ] - : message.content.map((content, contentIndex) => - contentIndex === message.content.length - 1 - ? { - ...content, - ...(this.options.awsBedrockUsePromptCache === true && { - cache_control: { type: "ephemeral" }, - }), - } - : content, - ), - } - } - return message - }), - stream: true, - }) - }, - ) - - for await (const chunk of stream) { - switch (chunk?.type) { - case "message_start": - const usage = chunk.message.usage - yield { - type: "usage", - inputTokens: usage.input_tokens || 0, - outputTokens: usage.output_tokens || 0, - cacheWriteTokens: usage.cache_creation_input_tokens || undefined, - cacheReadTokens: usage.cache_read_input_tokens || undefined, - } - break - case "message_delta": - yield { - type: "usage", - inputTokens: 0, - outputTokens: chunk.usage.output_tokens || 0, - } - break - case "content_block_start": - switch (chunk.content_block.type) { - case "thinking": - yield { - type: "reasoning", - reasoning: chunk.content_block.thinking || "", - } - break - case "redacted_thinking": - // Handle redacted thinking blocks - we still mark it as reasoning - // but note that the content is encrypted - yield { - type: "reasoning", - reasoning: "[Redacted thinking block]", - } - break - case "text": - if (chunk.index > 0) { - yield { - type: "text", - text: "\n", - } - } - yield { - type: "text", - text: chunk.content_block.text, - } - break - } - break - case "content_block_delta": - switch (chunk.delta.type) { - case "thinking_delta": - yield { - type: "reasoning", - reasoning: chunk.delta.thinking, - } - break - case "text_delta": - yield { - type: "text", - text: chunk.delta.text, - } - break - } - break - } - } + // Default: Use Anthropic Converse API for all Anthropic models + yield* this.createAnthropicMessage(systemPrompt, messages, modelId, model) } getModel(): { id: string; info: ModelInfo } { @@ -197,11 +133,20 @@ export class AwsBedrockHandler implements ApiHandler { const customSelected = this.options.awsBedrockCustomSelected const baseModel = this.options.awsBedrockCustomModelBaseId - if (customSelected && modelId && baseModel && baseModel in bedrockModels) { - // Use the user-input model ID but inherit capabilities from the base model + + // Handle custom models + if (customSelected && modelId) { + // If base model is provided and valid, use its capabilities + if (baseModel && baseModel in bedrockModels) { + return { + id: modelId, + info: bedrockModels[baseModel], + } + } + // For custom models without valid base model in bedrock model list, use default model's capabilities return { id: modelId, - info: bedrockModels[baseModel], + info: bedrockModels[bedrockDefaultModelId], } } @@ -224,7 +169,7 @@ export class AwsBedrockHandler implements ApiHandler { sessionToken?: string }> { // Configure provider options - const providerOptions: any = {} + const providerOptions: ProviderChainOptions = {} if (this.options.awsUseProfile) { // For profile-based auth, always use ignoreCache to detect credential file changes // This solves the AWS Identity Manager issue where credential files change externally @@ -276,30 +221,11 @@ export class AwsBedrockHandler implements ApiHandler { }) } - /** - * Creates an AnthropicBedrock client with the appropriate credentials - */ - private async getAnthropicClient(): Promise { - const credentials = await this.getAwsCredentials() - - // Return an AnthropicBedrock client with the resolved/assumed credentials. - return new AnthropicBedrock({ - awsAccessKey: credentials.accessKeyId, - awsSecretKey: credentials.secretAccessKey, - awsSessionToken: credentials.sessionToken, - awsRegion: this.getRegion(), - ...(this.options.awsBedrockEndpoint && { baseURL: this.options.awsBedrockEndpoint }), - }) - } - /** * Gets the appropriate model ID, accounting for cross-region inference if enabled. - * If the model ID is an ARN that contains a slash, you will get the URL encoded ARN. + * For custom models, returns the raw model ID without any encoding. */ async getModelId(): Promise { - if (this.options.awsBedrockCustomSelected && this.getModel().id.includes("/")) { - return encodeURIComponent(this.getModel().id) - } if (!this.options.awsBedrockCustomSelected && this.options.awsUseCrossRegionInference) { const regionPrefix = this.getRegion().slice(0, 3) switch (regionPrefix) { @@ -536,126 +462,318 @@ export class AwsBedrockHandler implements ApiHandler { } /** - * Creates a message using Amazon Nova models through AWS Bedrock - * Implements support for Amazon Nova models + * Executes a Converse API stream command and handles the response + * Common implementation for both Anthropic and Nova models */ - private async *createNovaMessage( - systemPrompt: string, - messages: Anthropic.Messages.MessageParam[], - modelId: string, - model: { id: string; info: ModelInfo }, - ): ApiStream { - // Get Bedrock client with proper credentials - const client = await this.getBedrockClient() - - // Format messages for Nova model - const formattedMessages = this.formatNovaMessages(messages) - - // Prepare request for Nova model - const command = new ConverseStreamCommand({ - modelId: modelId, - messages: formattedMessages, - system: systemPrompt ? [{ text: systemPrompt }] : undefined, - inferenceConfig: { - maxTokens: model.info.maxTokens || 5000, - temperature: 0, - // topP: 0.9, // Alternative: use topP instead of temperature - }, - }) - - // Execute the streaming request and handle response + private async *executeConverseStream(command: ConverseStreamCommand, modelInfo: ModelInfo): ApiStream { try { + const client = await this.getBedrockClient() const response = await client.send(command) if (response.stream) { - let hasReportedInputTokens = false + // Buffer content by contentBlockIndex to handle multi-block responses correctly + const contentBuffers: Record = {} + const blockTypes = new Map() for await (const chunk of response.stream) { + // Debug logging to see actual response structure + // console.log("Bedrock chunk:", JSON.stringify(chunk, null, 2)) + + // Handle thinking response in additionalModelResponseFields (LangChain format) + const metadata = chunk.metadata as ExtendedMetadata | undefined + if (metadata?.additionalModelResponseFields?.thinkingResponse) { + const thinkingResponse = metadata.additionalModelResponseFields.thinkingResponse + if (thinkingResponse.reasoning && Array.isArray(thinkingResponse.reasoning)) { + for (const reasoningBlock of thinkingResponse.reasoning) { + if (reasoningBlock.type === "text" && reasoningBlock.text) { + yield { + type: "reasoning", + reasoning: reasoningBlock.text, + } + } + } + } + } + // Handle metadata events with token usage information if (chunk.metadata?.usage) { - // Report complete token usage from the model itself const inputTokens = chunk.metadata.usage.inputTokens || 0 const outputTokens = chunk.metadata.usage.outputTokens || 0 + const cacheReadInputTokens = chunk.metadata.usage.cacheReadInputTokens || 0 + const cacheWriteInputTokens = chunk.metadata.usage.cacheWriteInputTokens || 0 + yield { type: "usage", inputTokens, outputTokens, - totalCost: calculateApiCostOpenAI(model.info, inputTokens, outputTokens, 0, 0), - } - hasReportedInputTokens = true - } - - // Handle content delta (text generation) - if (chunk.contentBlockDelta?.delta?.text) { - yield { - type: "text", - text: chunk.contentBlockDelta.delta.text, + cacheReadTokens: cacheReadInputTokens, + cacheWriteTokens: cacheWriteInputTokens, + totalCost: calculateApiCostOpenAI( + modelInfo, + inputTokens, + outputTokens, + cacheWriteInputTokens, + cacheReadInputTokens, + ), } } - // Handle reasoning content if present - if (chunk.contentBlockDelta?.delta?.reasoningContent?.text) { - yield { - type: "reasoning", - reasoning: chunk.contentBlockDelta.delta.reasoningContent.text, + // Handle content block start - check if Bedrock uses Anthropic SDK format + if (chunk.contentBlockStart) { + const blockStart = chunk.contentBlockStart as ContentBlockStart + const blockIndex = chunk.contentBlockStart.contentBlockIndex + + // Check for thinking block in various possible formats + if ( + blockStart.start?.type === "thinking" || + blockStart.contentBlock?.type === "thinking" || + blockStart.type === "thinking" + ) { + if (blockIndex !== undefined) { + blockTypes.set(blockIndex, "reasoning") + // Initialize content if provided + const initialContent = + blockStart.start?.thinking || blockStart.contentBlock?.thinking || blockStart.thinking || "" + if (initialContent) { + yield { + type: "reasoning", + reasoning: initialContent, + } + } + } } } - // Handle errors - if (chunk.internalServerException) { - yield { - type: "text", - text: `[ERROR] Internal server error: ${chunk.internalServerException.message}`, - } - } else if (chunk.modelStreamErrorException) { - yield { - type: "text", - text: `[ERROR] Model stream error: ${chunk.modelStreamErrorException.message}`, - } - } else if (chunk.validationException) { - yield { - type: "text", - text: `[ERROR] Validation error: ${chunk.validationException.message}`, - } - } else if (chunk.throttlingException) { - yield { - type: "text", - text: `[ERROR] Throttling error: ${chunk.throttlingException.message}`, - } - } else if (chunk.serviceUnavailableException) { - yield { - type: "text", - text: `[ERROR] Service unavailable: ${chunk.serviceUnavailableException.message}`, + // Handle content block delta - accumulate content by block index + if (chunk.contentBlockDelta) { + const blockIndex = chunk.contentBlockDelta.contentBlockIndex + + if (blockIndex !== undefined) { + // Initialize buffer for this block if it doesn't exist + if (!(blockIndex in contentBuffers)) { + contentBuffers[blockIndex] = "" + } + + // Check if this is a thinking block + const blockType = blockTypes.get(blockIndex) + const delta = chunk.contentBlockDelta.delta as ContentBlockDelta["delta"] + + // Handle thinking delta (Anthropic SDK format) + if (delta?.type === "thinking_delta" || delta?.thinking) { + const thinkingContent = delta.thinking || delta.text || "" + if (thinkingContent) { + yield { + type: "reasoning", + reasoning: thinkingContent, + } + } + } else if (delta?.reasoningContent?.text) { + // Handle reasoning content (Bedrock format) + const reasoningText = delta.reasoningContent.text + if (reasoningText) { + yield { + type: "reasoning", + reasoning: reasoningText, + } + } + } else if (chunk.contentBlockDelta.delta?.text) { + // Handle regular text content + const textContent = chunk.contentBlockDelta.delta.text + contentBuffers[blockIndex] += textContent + + // Stream based on block type + if (blockType === "reasoning") { + yield { + type: "reasoning", + reasoning: textContent, + } + } else { + yield { + type: "text", + text: textContent, + } + } + } } } + + // Handle content block stop - clean up buffers + if (chunk.contentBlockStop) { + const blockIndex = chunk.contentBlockStop.contentBlockIndex + + if (blockIndex !== undefined) { + // Clean up buffers and tracking for this block + delete contentBuffers[blockIndex] + blockTypes.delete(blockIndex) + } + } + + // Handle errors with unified error handling + yield* this.handleBedrockStreamError(chunk) } } } catch (error) { - console.error("Error processing Nova model response:", error) + console.error("Error processing Converse API response:", error) yield { type: "text", - text: `[ERROR] Failed to process Nova response: ${error instanceof Error ? error.message : String(error)}`, + text: `[ERROR] Failed to process response: ${error instanceof Error ? error.message : String(error)}`, } } } /** - * Formats messages for Amazon Nova models according to the SDK specification + * Handles Bedrock stream errors in a unified way */ - private formatNovaMessages(messages: Anthropic.Messages.MessageParam[]): { role: ConversationRole; content: any[] }[] { + private *handleBedrockStreamError(chunk: any): Generator<{ type: "text"; text: string }> { + if (chunk.internalServerException) { + yield { + type: "text", + text: `[ERROR] Internal server error: ${chunk.internalServerException.message}`, + } + } else if (chunk.modelStreamErrorException) { + yield { + type: "text", + text: `[ERROR] Model stream error: ${chunk.modelStreamErrorException.message}`, + } + } else if (chunk.validationException) { + yield { + type: "text", + text: `[ERROR] Validation error: ${chunk.validationException.message}`, + } + } else if (chunk.throttlingException) { + yield { + type: "text", + text: `[ERROR] Throttling error: ${chunk.throttlingException.message}`, + } + } else if (chunk.serviceUnavailableException) { + yield { + type: "text", + text: `[ERROR] Service unavailable: ${chunk.serviceUnavailableException.message}`, + } + } + } + + /** + * Prepares system messages with optional caching support + */ + private prepareSystemMessages(systemPrompt: string, enableCaching: boolean): any[] | undefined { + if (!systemPrompt) { + return undefined + } + + if (enableCaching) { + return [{ text: systemPrompt }, { cachePoint: { type: "default" } }] + } + + return [{ text: systemPrompt }] + } + + /** + * Gets inference configuration for different model types + */ + private getInferenceConfig(modelInfo: ModelInfo, modelType: "anthropic" | "nova"): any { + // For Anthropic models with thinking enabled, temperature must be 1 + if (modelType === "anthropic") { + const budget_tokens = this.options.thinkingBudgetTokens || 0 + const baseModelId = + (this.options.awsBedrockCustomSelected ? this.options.awsBedrockCustomModelBaseId : this.getModel().id) || + this.getModel().id + const reasoningOn = this.shouldEnableReasoning(baseModelId, budget_tokens) + + return { + maxTokens: modelInfo.maxTokens || 8192, + temperature: reasoningOn ? 1 : 0, + } + } + + return { + maxTokens: modelInfo.maxTokens || (modelType === "nova" ? 5000 : 8192), + temperature: 0, + } + } + + /** + * Determines if reasoning should be enabled for Claude models + */ + private shouldEnableReasoning(baseModelId: string, budgetTokens: number): boolean { + return ( + (baseModelId.includes("3-7") || baseModelId.includes("sonnet-4") || baseModelId.includes("opus-4")) && + budgetTokens !== 0 + ) + } + + /** + * Creates a message using Anthropic Claude models through AWS Bedrock Converse API + * Implements support for Anthropic Claude models using the unified Converse API + */ + private async *createAnthropicMessage( + systemPrompt: string, + messages: Anthropic.Messages.MessageParam[], + modelId: string, + model: { id: string; info: ModelInfo }, + ): ApiStream { + // Format messages for Anthropic model using unified formatter + const formattedMessages = this.formatMessagesForConverseAPI(messages) + + // Get model info and message indices for caching + const userMsgIndices = messages.reduce((acc, msg, index) => (msg.role === "user" ? [...acc, index] : acc), [] as number[]) + const lastUserMsgIndex = userMsgIndices[userMsgIndices.length - 1] ?? -1 + const secondLastMsgUserIndex = userMsgIndices[userMsgIndices.length - 2] ?? -1 + + // Apply caching controls to messages if enabled + const messagesWithCache = this.options.awsBedrockUsePromptCache + ? this.applyCacheControlToMessages(formattedMessages, lastUserMsgIndex, secondLastMsgUserIndex) + : formattedMessages + + // Prepare system message with caching support + const systemMessages = this.prepareSystemMessages(systemPrompt, this.options.awsBedrockUsePromptCache || false) + + // Get thinking configuration + const budget_tokens = this.options.thinkingBudgetTokens || 0 + const baseModelId = + (this.options.awsBedrockCustomSelected ? this.options.awsBedrockCustomModelBaseId : this.getModel().id) || + this.getModel().id + const reasoningOn = this.shouldEnableReasoning(baseModelId, budget_tokens) + + // Prepare request for Anthropic model using Converse API + const command = new ConverseStreamCommand({ + modelId: modelId, + messages: messagesWithCache, + system: systemMessages, + inferenceConfig: this.getInferenceConfig(model.info, "anthropic"), + // Add thinking configuration as per LangChain documentation + additionalModelRequestFields: reasoningOn + ? { + thinking: { + type: "enabled", + budget_tokens: budget_tokens, + }, + } + : undefined, + }) + + // Execute the streaming request using unified handler + yield* this.executeConverseStream(command, model.info) + } + + /** + * Formats messages for models using the Converse API specification + * Used by both Anthropic and Nova models to avoid code duplication + */ + private formatMessagesForConverseAPI(messages: Anthropic.Messages.MessageParam[]): Message[] { return messages.map((message) => { // Determine role (user or assistant) const role = message.role === "user" ? ConversationRole.USER : ConversationRole.ASSISTANT // Process content based on type - let content: any[] = [] + let content: ContentBlock[] = [] if (typeof message.content === "string") { // Simple text content content = [{ text: message.content }] } else if (Array.isArray(message.content)) { - // Convert Anthropic content format to Nova content format - content = message.content + // Convert Anthropic content format to Converse API content format + const processedContent = message.content .map((item) => { // Text content if (item.type === "text") { @@ -664,55 +782,16 @@ export class AwsBedrockHandler implements ApiHandler { // Image content if (item.type === "image") { - // Handle different image source formats - let imageData: Uint8Array - let format = "jpeg" // default format - - // Extract format from media_type if available - if (item.source.media_type) { - // Extract format from media_type (e.g., "image/jpeg" -> "jpeg") - const formatMatch = item.source.media_type.match(/image\/(\w+)/) - if (formatMatch && formatMatch[1]) { - format = formatMatch[1] - // Ensure format is one of the allowed values - if (!["png", "jpeg", "gif", "webp"].includes(format)) { - format = "jpeg" // Default to jpeg if not supported - } - } - } - - // Get image data - try { - if (typeof item.source.data === "string") { - // Handle base64 encoded data - const base64Data = item.source.data.replace(/^data:image\/\w+;base64,/, "") - imageData = new Uint8Array(Buffer.from(base64Data, "base64")) - } else if (item.source.data && typeof item.source.data === "object") { - // Try to convert to Uint8Array - imageData = new Uint8Array(Buffer.from(item.source.data as any)) - } else { - console.error("Unsupported image data format") - return null // Skip this item if format is not supported - } - } catch (error) { - console.error("Could not convert image data to Uint8Array:", error) - return null // Skip this item if conversion fails - } - - return { - image: { - format, - source: { - bytes: imageData, - }, - }, - } + return this.processImageContent(item) } - // Return null for unsupported content types + // Log unsupported content types for debugging + console.warn(`Unsupported content type: ${(item as ContentItem).type}`) return null }) - .filter(Boolean) // Remove any null items + .filter((item): item is ContentBlock => item !== null) + + content = processedContent } // Return formatted message @@ -722,4 +801,129 @@ export class AwsBedrockHandler implements ApiHandler { } }) } + + /** + * Processes image content with proper error handling and user notification + */ + private processImageContent(item: any): ContentBlock | null { + let imageData: Uint8Array + let format: "png" | "jpeg" | "gif" | "webp" = "jpeg" // default format + + // Extract format from media_type if available + if (item.source.media_type) { + // Extract format from media_type (e.g., "image/jpeg" -> "jpeg") + const formatMatch = item.source.media_type.match(/image\/(\w+)/) + if (formatMatch && formatMatch[1]) { + const extractedFormat = formatMatch[1] + // Ensure format is one of the allowed values + if (["png", "jpeg", "gif", "webp"].includes(extractedFormat)) { + format = extractedFormat as "png" | "jpeg" | "gif" | "webp" + } + } + } + + // Get image data with improved error handling + try { + if (typeof item.source.data === "string") { + // Handle base64 encoded data + const base64Data = item.source.data.replace(/^data:image\/\w+;base64,/, "") + imageData = new Uint8Array(Buffer.from(base64Data, "base64")) + } else if (item.source.data && typeof item.source.data === "object") { + // Try to convert to Uint8Array + imageData = new Uint8Array(Buffer.from(item.source.data as Buffer | Uint8Array)) + } else { + throw new Error("Unsupported image data format") + } + + return { + image: { + format, + source: { + bytes: imageData, + }, + }, + } + } catch (error) { + console.error("Failed to process image content:", error) + // Return a text content indicating the error instead of null + // This ensures users are aware of the issue + return { + text: `[ERROR: Failed to process image - ${error instanceof Error ? error.message : "Unknown error"}]`, + } + } + } + + /** + * Applies cache control to messages for prompt caching using AWS Bedrock's cachePoint system + * AWS Bedrock uses cachePoint objects instead of Anthropic's cache_control approach + */ + private applyCacheControlToMessages( + messages: Message[], + lastUserMsgIndex: number, + secondLastMsgUserIndex: number, + ): Message[] { + return messages.map((message, index) => { + // Add cachePoint to the last user message and second-to-last user message + if (index === lastUserMsgIndex || index === secondLastMsgUserIndex) { + // Clone the message to avoid modifying the original + const messageWithCache = { ...message } + + if (messageWithCache.content && Array.isArray(messageWithCache.content)) { + // Add cachePoint to the end of the content array + messageWithCache.content = [ + ...messageWithCache.content, + { + cachePoint: { + type: "default", + }, + } as CachePointContentBlock, // Properly typed cache point for AWS SDK + ] + } + + return messageWithCache + } + + return message + }) + } + + /** + * Creates a message using Amazon Nova models through AWS Bedrock + * Implements support for Amazon Nova models with caching support + */ + private async *createNovaMessage( + systemPrompt: string, + messages: Anthropic.Messages.MessageParam[], + modelId: string, + model: { id: string; info: ModelInfo }, + ): ApiStream { + // Format messages for Nova model using unified formatter + const formattedMessages = this.formatMessagesForConverseAPI(messages) + + // Get model info and message indices for caching (for Nova models that support it) + const userMsgIndices = messages.reduce((acc, msg, index) => (msg.role === "user" ? [...acc, index] : acc), [] as number[]) + const lastUserMsgIndex = userMsgIndices[userMsgIndices.length - 1] ?? -1 + const secondLastMsgUserIndex = userMsgIndices[userMsgIndices.length - 2] ?? -1 + + // Apply caching controls to messages if model supports caching and option is enabled + const messagesWithCache = + this.options.awsBedrockUsePromptCache && model.info.supportsPromptCache + ? this.applyCacheControlToMessages(formattedMessages, lastUserMsgIndex, secondLastMsgUserIndex) + : formattedMessages + + // Prepare system message with caching support for Nova models that support it + const enableCaching = this.options.awsBedrockUsePromptCache && model.info.supportsPromptCache + const systemMessages = this.prepareSystemMessages(systemPrompt, enableCaching || false) + + // Prepare request for Nova model + const command = new ConverseStreamCommand({ + modelId: modelId, + messages: messagesWithCache, + system: systemMessages, + inferenceConfig: this.getInferenceConfig(model.info, "nova"), + }) + + // Execute the streaming request using unified handler + yield* this.executeConverseStream(command, model.info) + } } diff --git a/src/api/providers/claude-code.ts b/src/api/providers/claude-code.ts new file mode 100644 index 00000000..c9870df5 --- /dev/null +++ b/src/api/providers/claude-code.ts @@ -0,0 +1,165 @@ +import type { Anthropic } from "@anthropic-ai/sdk" +import { claudeCodeDefaultModelId, ClaudeCodeModelId, claudeCodeModels, type ApiHandlerOptions } from "@/shared/api" +import { type ApiHandler } from ".." +import { ApiStreamUsageChunk, type ApiStream } from "../transform/stream" +import { withRetry } from "../retry" +import { runClaudeCode } from "@/integrations/claude-code/run" +import { ClaudeCodeMessage } from "@/integrations/claude-code/types" + +export class ClaudeCodeHandler implements ApiHandler { + private options: ApiHandlerOptions + + constructor(options: ApiHandlerOptions) { + this.options = options + } + + @withRetry({ + maxRetries: 4, + baseDelay: 2000, + maxDelay: 15000, + }) + async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream { + const claudeProcess = runClaudeCode({ + systemPrompt, + messages, + path: this.options.claudeCodePath, + modelId: this.getModel().id, + }) + + const dataQueue: string[] = [] + let processError = null + let errorOutput = "" + let exitCode: number | null = null + + claudeProcess.stdout.on("data", (data) => { + const output = data.toString() + const lines = output.split("\n").filter((line: string) => line.trim() !== "") + + for (const line of lines) { + dataQueue.push(line) + } + }) + + claudeProcess.stderr.on("data", (data) => { + errorOutput += data.toString() + }) + + claudeProcess.on("close", (code) => { + exitCode = code + }) + + claudeProcess.on("error", (error) => { + processError = error + }) + + // Usage is included with assistant messages, + // but cost is included in the result chunk + let usage: ApiStreamUsageChunk = { + type: "usage", + inputTokens: 0, + outputTokens: 0, + cacheReadTokens: 0, + cacheWriteTokens: 0, + } + + while (exitCode !== 0 || dataQueue.length > 0) { + if (dataQueue.length === 0) { + await new Promise((resolve) => setImmediate(resolve)) + } + + if (exitCode !== null && exitCode !== 0) { + throw new Error( + `Claude Code process exited with code ${exitCode}.${errorOutput ? ` Error output: ${errorOutput.trim()}` : ""}`, + ) + } + + const data = dataQueue.shift() + if (!data) { + continue + } + + const chunk = this.attemptParseChunk(data) + + if (!chunk) { + yield { + type: "text", + text: data || "", + } + + continue + } + + if (chunk.type === "system" && chunk.subtype === "init") { + continue + } + + if (chunk.type === "assistant" && "message" in chunk) { + const message = chunk.message + + if (message.stop_reason !== null && message.stop_reason !== "tool_use") { + const errorMessage = message.content[0]?.text || `Claude Code stopped with reason: ${message.stop_reason}` + + if (errorMessage.includes("Invalid model name")) { + throw new Error( + errorMessage + + `\n\nAPI keys and subscription plans allow different models. Make sure the selected model is included in your plan.`, + ) + } + + throw new Error(errorMessage) + } + + for (const content of message.content) { + if (content.type === "text") { + yield { + type: "text", + text: content.text, + } + } else { + console.warn("Unsupported content type:", content.type) + } + } + + usage.inputTokens += message.usage.input_tokens + usage.outputTokens += message.usage.output_tokens + usage.cacheReadTokens = (usage.cacheReadTokens || 0) + (message.usage.cache_read_input_tokens || 0) + usage.cacheWriteTokens = (usage.cacheWriteTokens || 0) + (message.usage.cache_creation_input_tokens || 0) + + continue + } + + if (chunk.type === "result" && "result" in chunk) { + usage.totalCost = chunk.cost_usd || 0 + + yield usage + } + + if (processError) { + throw processError + } + } + } + + getModel() { + const modelId = this.options.apiModelId + if (modelId && modelId in claudeCodeModels) { + const id = modelId as ClaudeCodeModelId + return { id, info: claudeCodeModels[id] } + } + + return { + id: claudeCodeDefaultModelId, + info: claudeCodeModels[claudeCodeDefaultModelId], + } + } + + // TOOD: Validate instead of parsing + private attemptParseChunk(data: string): ClaudeCodeMessage | null { + try { + return JSON.parse(data) + } catch (error) { + console.error("Error parsing chunk:", error) + return null + } + } +} diff --git a/src/api/providers/cline.ts b/src/api/providers/cline.ts index 4c0413df..2214f645 100644 --- a/src/api/providers/cline.ts +++ b/src/api/providers/cline.ts @@ -74,6 +74,16 @@ export class ClineHandler implements ApiHandler { } if (!didOutputUsage && chunk.usage) { + // @ts-ignore-next-line + let totalCost = chunk.usage.cost || 0 + const modelId = this.getModel().id + const provider = modelId.split("/")[0] + + // If provider is x-ai, set totalCost to 0 (we're doing a promo) + if (provider === "x-ai") { + totalCost = 0 + } + yield { type: "usage", cacheWriteTokens: 0, @@ -81,7 +91,7 @@ export class ClineHandler implements ApiHandler { inputTokens: chunk.usage.prompt_tokens || 0, outputTokens: chunk.usage.completion_tokens || 0, // @ts-ignore-next-line - totalCost: chunk.usage.cost || 0, + totalCost, } didOutputUsage = true } @@ -124,7 +134,10 @@ export class ClineHandler implements ApiHandler { } getModel(): { id: string; info: ModelInfo } { - const modelId = this.options.openRouterModelId + let modelId = this.options.openRouterModelId + if (modelId === "x-ai/grok-3") { + modelId = "x-ai/grok-3-beta" + } const modelInfo = this.options.openRouterModelInfo if (modelId && modelInfo) { return { id: modelId, info: modelInfo } diff --git a/src/api/providers/dify.ts b/src/api/providers/dify.ts deleted file mode 100644 index 05c42a17..00000000 --- a/src/api/providers/dify.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { Anthropic } from "@anthropic-ai/sdk" -import { ApiConfiguration, ApiHandlerOptions, ModelInfo, difyModels } from "../../shared/api" -import { getApiMetrics } from "../../shared/getApiMetrics" -import { ApiHandler } from ".." -import { ApiStream, ApiStreamChunk } from "../transform/stream" - -export class DifyHandler implements ApiHandler { - private readonly baseUrl: string - private readonly apiKey: string - private readonly modelInfo: ModelInfo - - constructor(options: ApiHandlerOptions) { - if (!options.difyBaseUrl) { - throw new Error("需要 Dify 基础 URL") - } - if (!options.difyApiKey) { - throw new Error("需要 Dify API 密钥") - } - - this.baseUrl = options.difyBaseUrl.replace(/\/$/, "") // 如果存在,则删除末尾的斜杠 - this.apiKey = options.difyApiKey - this.modelInfo = difyModels["dify-default"] - } - - async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream { - if (!messages || messages.length === 0) { - throw new Error("未提供消息") - } - - const lastMessage = messages[messages.length - 1] - console.log("最后一条消息:", lastMessage) - - // 将消息转换为 Dify 格式 - const query = - `${systemPrompt}\n\n` + - "# UserTask" + - messages - .map((msg) => { - if (typeof msg === "string") { - return msg - } - - if (msg.content) { - if (Array.isArray(msg.content)) { - return msg.content - .map((part) => { - if (typeof part === "string") { - return part - } - if (typeof part === "object") { - switch (part.type) { - case "text": - return part.text - case "image": - console.warn("Dify 不支持图像输入") - return "" - case "tool_result": - return typeof part.content === "string" - ? part.content - : Array.isArray(part.content) - ? part.content - .filter((p) => p.type === "text") - .map((p) => p.text) - .join("\n") - : "" - } - } - return "" - }) - .filter(Boolean) - .join("\n") - } - return typeof msg.content === "string" ? msg.content : "" - } - return "" - }) - .join("\n\n") - - if (!query) { - throw new Error("查询是必需的") - } - - console.log("正在向 Dify 发送查询:", query) - - const response = await fetch(`${this.baseUrl}/v1/chat-messages`, { - method: "POST", - headers: { - "Content-Type": "application/json", - Authorization: `Bearer ${this.apiKey}`, - }, - body: JSON.stringify({ - query, - user: "vscode-user", - inputs: {}, - response_mode: "streaming", - conversation_id: "", // 可选,用于继续之前的对话 - files: [], // 可选,用于文件输入 - auto_generate_name: true, // 可选,用于自动生成对话标题 - }), - }) - - if (!response.ok) { - const error = await response.text() - console.error("Dify API 错误响应:", error) - throw new Error(`Dify API 错误: ${error}`) - } - - if (!response.body) { - throw new Error("无响应正文") - } - - const reader = response.body.getReader() - const decoder = new TextDecoder() - let buffer = "" - - try { - while (true) { - const { value, done } = await reader.read() - if (done) { - break - } - - const chunk = decoder.decode(value) - buffer += chunk - - // 将缓冲区拆分为行并处理每个完整的行 - const lines = buffer.split("\n") - // 将最后可能不完整的行保留在缓冲区中 - buffer = lines.pop() || "" - - for (const line of lines) { - const trimmedLine = line.trim() - if (!trimmedLine || !trimmedLine.startsWith("data: ")) { - continue - } - - try { - const jsonStr = trimmedLine.slice(6) - const data = JSON.parse(jsonStr) - - if (data.event === "message") { - // 处理消息事件 - yield { - type: "text", - text: data.answer || "", - } as ApiStreamChunk - } else if (data.event === "error") { - // 处理错误事件 - console.error("Dify 流式传输错误:", data.message) - throw new Error(`Dify 流式传输错误: ${data.message}`) - } else if (data.event === "message_end") { - // 处理消息结束事件 - 可能包含令牌使用情况(如果可用) - console.log("Dify 消息结束:", data) - } - } catch (e) { - if (e instanceof SyntaxError) { - console.warn("流中的 JSON 无效:", trimmedLine) - } else { - throw e - } - } - } - } - - // 处理缓冲区中任何剩余的数据 - if (buffer.trim()) { - if (buffer.startsWith("data: ")) { - try { - const data = JSON.parse(buffer.slice(6)) - if (data.event === "message") { - yield { - type: "text", - text: data.answer || "", - } as ApiStreamChunk - } - } catch (e) { - console.warn("解析剩余缓冲区时出错:", e) - } - } else { - // 不执行任何操作 - } - } - } finally { - reader.releaseLock() - } - } - - getModel(): { id: string; info: ModelInfo } { - return { - id: "dify-default", - info: this.modelInfo, - } - } -} diff --git a/src/api/providers/gemini.ts b/src/api/providers/gemini.ts index bfecbea4..db7cc2a6 100644 --- a/src/api/providers/gemini.ts +++ b/src/api/providers/gemini.ts @@ -2,6 +2,7 @@ import type { Anthropic } from "@anthropic-ai/sdk" // Restore GenerateContentConfig import and add GenerateContentResponseUsageMetadata import { GoogleGenAI, type GenerateContentConfig, type GenerateContentResponseUsageMetadata } from "@google/genai" import { withRetry } from "../retry" +import { Part } from "@google/genai" import { ApiHandler } from "../" import { ApiHandlerOptions, geminiDefaultModelId, GeminiModelId, geminiModels, ModelInfo } from "@shared/api" import { convertAnthropicMessageToGemini } from "../transform/gemini-format" @@ -96,9 +97,10 @@ export class GeminiHandler implements ApiHandler { } // Add thinking config if the model supports it - if (info.thinkingConfig?.outputPrice !== undefined && maxBudget > 0) { + if (thinkingBudget > 0) { requestConfig.thinkingConfig = { thinkingBudget: thinkingBudget, + includeThoughts: true, } } @@ -111,6 +113,7 @@ export class GeminiHandler implements ApiHandler { let promptTokens = 0 let outputTokens = 0 let cacheReadTokens = 0 + let thoughtsTokenCount = 0 // Initialize thought token counts let lastUsageMetadata: GenerateContentResponseUsageMetadata | undefined try { @@ -130,6 +133,31 @@ export class GeminiHandler implements ApiHandler { isFirstSdkChunk = false } + // Handle thinking content from Gemini's response + const candidateForThoughts = chunk?.candidates?.[0] + const partsForThoughts = candidateForThoughts?.content?.parts + let thoughts = "" // Initialize as empty string + + if (partsForThoughts) { + // This ensures partsForThoughts is a Part[] array + for (const part of partsForThoughts) { + const { thought, text } = part as Part + if (thought && text) { + // Ensure part.text exists + // Handle the thought part + thoughts += text + "\n" // Append thought and a newline + } + } + } + + if (thoughts.trim() !== "") { + yield { + type: "reasoning", + reasoning: thoughts.trim(), + } + thoughts = "" // Reset thoughts after yielding + } + if (chunk.text) { yield { type: "text", @@ -141,6 +169,7 @@ export class GeminiHandler implements ApiHandler { lastUsageMetadata = chunk.usageMetadata promptTokens = lastUsageMetadata.promptTokenCount ?? promptTokens outputTokens = lastUsageMetadata.candidatesTokenCount ?? outputTokens + thoughtsTokenCount = lastUsageMetadata.thoughtsTokenCount ?? thoughtsTokenCount cacheReadTokens = lastUsageMetadata.cachedContentTokenCount ?? cacheReadTokens } } @@ -151,12 +180,14 @@ export class GeminiHandler implements ApiHandler { info, inputTokens: promptTokens, outputTokens, + thoughtsTokenCount, cacheReadTokens, }) yield { type: "usage", - inputTokens: promptTokens, + inputTokens: promptTokens - cacheReadTokens, outputTokens, + thoughtsTokenCount, cacheReadTokens, cacheWriteTokens: 0, totalCost, @@ -239,11 +270,13 @@ export class GeminiHandler implements ApiHandler { info, inputTokens, outputTokens, + thoughtsTokenCount = 0, cacheReadTokens = 0, }: { info: ModelInfo inputTokens: number outputTokens: number + thoughtsTokenCount: number cacheReadTokens?: number }) { // Exit early if any required pricing information is missing @@ -275,18 +308,18 @@ export class GeminiHandler implements ApiHandler { const inputTokensCost = inputPrice * (uncachedInputTokens / 1_000_000) // 2. Output token costs - const outputTokensCost = outputPrice * (outputTokens / 1_000_000) + const responseTokensCost = outputPrice * ((outputTokens + thoughtsTokenCount) / 1_000_000) // 3. Cache read costs (immediate) const cacheReadCost = (cacheReadTokens ?? 0) > 0 ? cacheReadsPrice * ((cacheReadTokens ?? 0) / 1_000_000) : 0 // Calculate total immediate cost (excluding cache write/storage costs) - const totalCost = inputTokensCost + outputTokensCost + cacheReadCost + const totalCost = inputTokensCost + responseTokensCost + cacheReadCost // Create the trace object for debugging const trace: Record = { input: { price: inputPrice, tokens: uncachedInputTokens, cost: inputTokensCost }, - output: { price: outputPrice, tokens: outputTokens, cost: outputTokensCost }, + output: { price: outputPrice, tokens: outputTokens, cost: responseTokensCost }, } // Only include cache read costs in the trace (cache write costs are tracked separately) diff --git a/src/api/providers/openrouter.ts b/src/api/providers/openrouter.ts index 1fec496d..7d85598d 100644 --- a/src/api/providers/openrouter.ts +++ b/src/api/providers/openrouter.ts @@ -139,7 +139,10 @@ export class OpenRouterHandler implements ApiHandler { } getModel(): { id: string; info: ModelInfo } { - const modelId = this.options.openRouterModelId + let modelId = this.options.openRouterModelId + if (modelId === "x-ai/grok-3") { + modelId = "x-ai/grok-3-beta" + } const modelInfo = this.options.openRouterModelInfo if (modelId && modelInfo) { return { id: modelId, info: modelInfo } diff --git a/src/api/providers/sapaicore.ts b/src/api/providers/sapaicore.ts new file mode 100644 index 00000000..e5bcbbac --- /dev/null +++ b/src/api/providers/sapaicore.ts @@ -0,0 +1,540 @@ +import { Anthropic } from "@anthropic-ai/sdk" +import axios from "axios" +import OpenAI from "openai" +import { ApiHandler } from "../" +import { ApiHandlerOptions, ModelInfo, sapAiCoreDefaultModelId, SapAiCoreModelId, sapAiCoreModels } from "../../shared/api" +import { convertToOpenAiMessages } from "../transform/openai-format" +import { ApiStream } from "../transform/stream" + +interface Deployment { + id: string + name: string +} +interface Token { + access_token: string + expires_in: number + scope: string + jti: string + token_type: string + expires_at: number +} +export class SapAiCoreHandler implements ApiHandler { + private options: ApiHandlerOptions + private token?: Token + private deployments?: Deployment[] + + constructor(options: ApiHandlerOptions) { + this.options = options + } + + private async authenticate(): Promise { + const payload = { + grant_type: "client_credentials", + client_id: this.options.sapAiCoreClientId || "", + client_secret: this.options.sapAiCoreClientSecret || "", + } + + const tokenUrl = (this.options.sapAiCoreTokenUrl || "").replace(/\/+$/, "") + "/oauth/token" + const response = await axios.post(tokenUrl, payload, { + headers: { "Content-Type": "application/x-www-form-urlencoded" }, + }) + const token = response.data as Token + token.expires_at = Date.now() + token.expires_in * 1000 + return token + } + + private async getToken(): Promise { + if (!this.token || this.token.expires_at < Date.now()) { + this.token = await this.authenticate() + } + return this.token.access_token + } + + private async getAiCoreDeployments(): Promise { + if (this.options.sapAiCoreClientSecret === "") { + return [{ id: "notconfigured", name: "ai-core-not-configured" }] + } + + const token = await this.getToken() + const headers = { + Authorization: `Bearer ${token}`, + "AI-Resource-Group": this.options.sapAiResourceGroup || "default", + "Content-Type": "application/json", + } + + const url = `${this.options.sapAiCoreBaseUrl}/v2/lm/deployments?$top=10000&$skip=0` + + try { + const response = await axios.get(url, { headers }) + const deployments = response.data.resources + + return deployments + .filter((deployment: any) => deployment.targetStatus === "RUNNING") + .map((deployment: any) => { + const model = deployment.details?.resources?.backend_details?.model + if (!model?.name || !model?.version) { + return null // Skip this row + } + return { + id: deployment.id, + name: `${model.name}:${model.version}`, + } + }) + .filter((deployment: any) => deployment !== null) + } catch (error) { + console.error("Error fetching deployments:", error) + throw new Error("Failed to fetch deployments") + } + } + + private async getDeploymentForModel(modelId: string): Promise { + // If deployments are not fetched yet or the model is not found in the fetched deployments, fetch deployments + if (!this.deployments || !this.hasDeploymentForModel(modelId)) { + this.deployments = await this.getAiCoreDeployments() + } + + const deployment = this.deployments.find((d) => { + const deploymentBaseName = d.name.split(":")[0].toLowerCase() + const modelBaseName = modelId.split(":")[0].toLowerCase() + return deploymentBaseName === modelBaseName + }) + + if (!deployment) { + throw new Error(`No running deployment found for model ${modelId}`) + } + + return deployment.id + } + + private hasDeploymentForModel(modelId: string): boolean { + return this.deployments?.some((d) => d.name.split(":")[0].toLowerCase() === modelId.split(":")[0].toLowerCase()) ?? false + } + + async *createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream { + const token = await this.getToken() + const headers = { + Authorization: `Bearer ${token}`, + "AI-Resource-Group": this.options.sapAiResourceGroup || "default", + "Content-Type": "application/json", + } + + const model = this.getModel() + const deploymentId = await this.getDeploymentForModel(model.id) + + const anthropicModels = [ + "anthropic--claude-3.7-sonnet", + "anthropic--claude-3.5-sonnet", + "anthropic--claude-3-sonnet", + "anthropic--claude-3-haiku", + "anthropic--claude-3-opus", + ] + + const openAIModels = ["gpt-4o", "gpt-4", "gpt-4o-mini", "o1", "gpt-4.1", "gpt-4.1-nano", "o3-mini", "o3", "o4-mini"] + + let url: string + let payload: any + if (anthropicModels.includes(model.id)) { + url = `${this.options.sapAiCoreBaseUrl}/v2/inference/deployments/${deploymentId}/invoke-with-response-stream` + + if (model.id === "anthropic--claude-3.7-sonnet") { + url = `${this.options.sapAiCoreBaseUrl}/v2/inference/deployments/${deploymentId}/converse-stream` + payload = { + inferenceConfig: { + maxTokens: model.info.maxTokens, + temperature: 0.0, + }, + system: systemPrompt ? [{ text: systemPrompt }] : undefined, + messages: this.formatAnthropicMessages(messages), + } + } else { + payload = { + max_tokens: model.info.maxTokens, + system: systemPrompt, + messages, + anthropic_version: "bedrock-2023-05-31", + } + } + } else if (openAIModels.includes(model.id)) { + let openAiMessages: OpenAI.Chat.ChatCompletionMessageParam[] = [ + { role: "system", content: systemPrompt }, + ...convertToOpenAiMessages(messages), + ] + + url = `${this.options.sapAiCoreBaseUrl}/v2/inference/deployments/${deploymentId}/chat/completions?api-version=2024-12-01-preview` + payload = { + stream: true, + messages: openAiMessages, + max_tokens: model.info.maxTokens, + temperature: 0.0, + frequency_penalty: 0, + presence_penalty: 0, + stop: null, + stream_options: { include_usage: true }, + } + + if (["o1", "o3-mini", "o3", "o4-mini"].includes(model.id)) { + delete payload.max_tokens + delete payload.temperature + } + + if (model.id === "o3-mini") { + delete payload.stream + delete payload.stream_options + } + } else { + throw new Error(`Unsupported model: ${model.id}`) + } + + try { + const response = await axios.post(url, JSON.stringify(payload, null, 2), { + headers, + responseType: "stream", + }) + + if (model.id === "o3-mini") { + const response = await axios.post(url, JSON.stringify(payload, null, 2), { headers }) + + // Yield the usage information + if (response.data.usage) { + yield { + type: "usage", + inputTokens: response.data.usage.prompt_tokens, + outputTokens: response.data.usage.completion_tokens, + } + } + + // Yield the content + if (response.data.choices && response.data.choices.length > 0) { + yield { + type: "text", + text: response.data.choices[0].message.content, + } + } + + // Final usage yield + if (response.data.usage) { + yield { + type: "usage", + inputTokens: response.data.usage.prompt_tokens, + outputTokens: response.data.usage.completion_tokens, + } + } + } else if (openAIModels.includes(model.id)) { + yield* this.streamCompletionGPT(response.data, model) + } else if (model.id === "anthropic--claude-3.7-sonnet") { + yield* this.streamCompletionSonnet37(response.data, model) + } else { + yield* this.streamCompletion(response.data, model) + } + } catch (error) { + if (error.response) { + // The request was made and the server responded with a status code + // that falls out of the range of 2xx + console.error("Error status:", error.response.status) + console.error("Error data:", error.response.data) + console.error("Error headers:", error.response.headers) + + if (error.response.status === 404) { + console.error("404 Error reason:", error.response.data) + throw new Error(`404 Not Found: ${error.response.data}`) + } + } else if (error.request) { + // The request was made but no response was received + console.error("Error request:", error.request) + throw new Error("No response received from server") + } else { + // Something happened in setting up the request that triggered an Error + console.error("Error message:", error.message) + throw new Error(`Error setting up request: ${error.message}`) + } + + throw new Error("Failed to create message") + } + } + + private async *streamCompletion( + stream: any, + model: { id: SapAiCoreModelId; info: ModelInfo }, + ): AsyncGenerator { + let usage = { input_tokens: 0, output_tokens: 0 } + + try { + for await (const chunk of stream) { + const lines = chunk.toString().split("\n").filter(Boolean) + for (const line of lines) { + if (line.startsWith("data: ")) { + const jsonData = line.slice(6) + try { + const data = JSON.parse(jsonData) + console.log("Received data:", data) + if (data.type === "message_start") { + usage.input_tokens = data.message.usage.input_tokens + yield { + type: "usage", + inputTokens: usage.input_tokens, + outputTokens: usage.output_tokens, + } + } else if (data.type === "content_block_start" || data.type === "content_block_delta") { + const contentBlock = data.type === "content_block_start" ? data.content_block : data.delta + + if (contentBlock.type === "text" || contentBlock.type === "text_delta") { + yield { + type: "text", + text: contentBlock.text || "", + } + } + } else if (data.type === "message_delta") { + if (data.usage) { + usage.output_tokens = data.usage.output_tokens + yield { + type: "usage", + inputTokens: 0, + outputTokens: data.usage.output_tokens, + } + } + } + } catch (error) { + console.error("Failed to parse JSON data:", error) + } + } + } + } + } catch (error) { + console.error("Error streaming completion:", error) + throw error + } + } + + private async *streamCompletionSonnet37( + stream: any, + model: { id: SapAiCoreModelId; info: ModelInfo }, + ): AsyncGenerator { + function toStrictJson(str: string): string { + // Wrap it in parentheses so JS will treat it as an expression + const obj = new Function("return " + str)() + return JSON.stringify(obj) + } + + let usage = { input_tokens: 0, output_tokens: 0 } + + try { + // Iterate over the stream and process each chunk + for await (const chunk of stream) { + const lines = chunk.toString().split("\n").filter(Boolean) + + for (const line of lines) { + if (line.startsWith("data: ")) { + const jsonData = line.slice(6) + + try { + // Parse the incoming JSON data from the stream + const data = JSON.parse(toStrictJson(jsonData)) + console.log("Received data:", data) + + // Handle metadata (token usage) + if (data.metadata?.usage) { + const inputTokens = data.metadata.usage.inputTokens || 0 + const outputTokens = data.metadata.usage.outputTokens || 0 + + yield { + type: "usage", + inputTokens, + outputTokens, + } + } + + // Handle content block delta (text generation) + if (data.contentBlockDelta) { + if (data.contentBlockDelta?.delta?.text) { + yield { + type: "text", + text: data.contentBlockDelta.delta.text, + } + } + + // Handle reasoning content if present + if (data.contentBlockDelta?.delta?.reasoningContent?.text) { + yield { + type: "reasoning", + reasoning: data.contentBlockDelta.delta.reasoningContent.text, + } + } + } + } catch (error) { + console.error("Failed to parse JSON data:", error) + yield { + type: "text", + text: `[ERROR] Failed to parse response data: ${error instanceof Error ? error.message : String(error)}`, + } + } + } + } + } + } catch (error) { + console.error("Error streaming completion:", error) + yield { + type: "text", + text: `[ERROR] Failed to process stream: ${error instanceof Error ? error.message : String(error)}`, + } + } + } + + private async *streamCompletionGPT( + stream: any, + model: { id: SapAiCoreModelId; info: ModelInfo }, + ): AsyncGenerator { + let currentContent = "" + let inputTokens = 0 + let outputTokens = 0 + + try { + for await (const chunk of stream) { + const lines = chunk.toString().split("\n").filter(Boolean) + for (const line of lines) { + if (line.trim() === "data: [DONE]") { + // End of stream, yield final usage + yield { + type: "usage", + inputTokens, + outputTokens, + } + return + } + + if (line.startsWith("data: ")) { + const jsonData = line.slice(6) + try { + const data = JSON.parse(jsonData) + console.log("Received GPT data:", data) + + if (data.choices && data.choices.length > 0) { + const choice = data.choices[0] + if (choice.delta && choice.delta.content) { + yield { + type: "text", + text: choice.delta.content, + } + currentContent += choice.delta.content + } + } + + // Handle usage information + if (data.usage) { + inputTokens = data.usage.prompt_tokens || inputTokens + outputTokens = data.usage.completion_tokens || outputTokens + yield { + type: "usage", + inputTokens, + outputTokens, + } + } + + if (data.choices && data.choices[0].finish_reason === "stop") { + // Final usage yield, if not already provided + if (!data.usage) { + yield { + type: "usage", + inputTokens, + outputTokens, + } + } + } + } catch (error) { + console.error("Failed to parse GPT JSON data:", error) + } + } + } + } + } catch (error) { + console.error("Error streaming GPT completion:", error) + throw error + } + } + + createUserReadableRequest( + userContent: Array< + Anthropic.TextBlockParam | Anthropic.ImageBlockParam | Anthropic.ToolUseBlockParam | Anthropic.ToolResultBlockParam + >, + ): any { + return { + model: this.getModel().id, + max_tokens: this.getModel().info.maxTokens, + system: "(see SYSTEM_PROMPT in src/ClaudeDev.ts)", + messages: [{ conversation_history: "..." }, { role: "user", content: userContent }], + tools: "(see tools in src/ClaudeDev.ts)", + tool_choice: { type: "auto" }, + } + } + + getModel(): { id: SapAiCoreModelId; info: ModelInfo } { + const modelId = this.options.apiModelId + if (modelId && modelId in sapAiCoreModels) { + const id = modelId as SapAiCoreModelId + return { id, info: sapAiCoreModels[id] } + } + return { id: sapAiCoreDefaultModelId, info: sapAiCoreModels[sapAiCoreDefaultModelId] } + } + + private getValidImageFormat(mediaType: string): string { + const format = mediaType.split("/")[1]?.toLowerCase() + const validFormats = ["png", "jpeg", "gif", "webp"] + + if (validFormats.includes(format)) { + return format + } + throw new Error(`Unsupported image format: ${format}`) + } + + private formatAnthropicMessages(messages: Anthropic.Messages.MessageParam[]): any[] { + return messages.map((m) => { + const contentBlocks: any[] = [] + + if (typeof m.content === "string") { + contentBlocks.push({ text: m.content }) + } else if (Array.isArray(m.content)) { + for (const block of m.content) { + if (block.type === "text") { + if (!block.text) { + throw new Error('Text block is missing the "text" field.') + } + contentBlocks.push({ text: block.text }) + } else if (block.type === "image") { + if (!block.source) { + throw new Error('Image block is missing the "source" field.') + } + + const { type, media_type, data } = block.source + + if (!type || !media_type || !data) { + throw new Error('Image source must have "type", "media_type", and "data" fields.') + } + + if (type !== "base64") { + throw new Error(`Unsupported image source type: ${type}. Only "base64" is supported.`) + } + + const format = this.getValidImageFormat(media_type) + + contentBlocks.push({ + image: { + format, + source: { + bytes: data, + }, + }, + }) + } else { + throw new Error(`Unsupported content block type: ${block.type}`) + } + } + } else { + throw new Error("Unsupported content format.") + } + + return { + role: m.role, + content: contentBlocks, + } + }) + } +} diff --git a/src/api/retry.ts b/src/api/retry.ts index 807a12dc..f9ff73b2 100644 --- a/src/api/retry.ts +++ b/src/api/retry.ts @@ -57,7 +57,7 @@ export function withRetry(options: RetryOptions = {}) { const handlerInstance = this as any if (handlerInstance.options?.onRetryAttempt) { try { - handlerInstance.options.onRetryAttempt(attempt + 1, maxRetries, delay, error) + await handlerInstance.options.onRetryAttempt(attempt + 1, maxRetries, delay, error) } catch (e) { console.error("Error in onRetryAttempt callback:", e) } diff --git a/src/api/transform/o1-format.ts b/src/api/transform/o1-format.ts index b9031b88..5b3da652 100644 --- a/src/api/transform/o1-format.ts +++ b/src/api/transform/o1-format.ts @@ -207,7 +207,6 @@ export function convertToO1Messages( } as OpenAI.Chat.ChatCompletionUserMessageParam, ...toolsReplaced, ] - // If there's an assistant message, insert the system prompt after it // if (lastAssistantIndex !== -1) { // const insertIndex = lastAssistantIndex + 1 @@ -224,7 +223,6 @@ export function convertToO1Messages( // content: o1SystemPrompt(systemPrompt), // }) // } - return messagesWithSystemPrompt } diff --git a/src/api/transform/shengsuanyun-stream.ts b/src/api/transform/shengsuanyun-stream.ts index d8603a27..e492e895 100644 --- a/src/api/transform/shengsuanyun-stream.ts +++ b/src/api/transform/shengsuanyun-stream.ts @@ -22,61 +22,36 @@ export async function createShengsuanyunStream( // prompt caching: https://openrouter.ai/docs/prompt-caching // this was initially specifically for claude models (some models may 'support prompt caching' automatically without this) // gemini models only use the last breakpoint for caching, so the others will be ignored - switch (model.id) { - case "anthropic/claude-3.7-sonnet": - case "anthropic/claude-3.7-sonnet:beta": - case "anthropic/claude-3.7-sonnet:thinking": - case "anthropic/claude-3-7-sonnet": - case "anthropic/claude-3-7-sonnet:beta": - case "anthropic/claude-3.5-sonnet": - case "anthropic/claude-3.5-sonnet:beta": - case "anthropic/claude-3.5-sonnet-20240620": - case "anthropic/claude-3.5-sonnet-20240620:beta": - case "anthropic/claude-3-5-haiku": - case "anthropic/claude-3-5-haiku:beta": - case "anthropic/claude-3-5-haiku-20241022": - case "anthropic/claude-3-5-haiku-20241022:beta": - case "anthropic/claude-3-haiku": - case "anthropic/claude-3-haiku:beta": - case "anthropic/claude-3-opus": - case "anthropic/claude-3-opus:beta": - case "google/gemini-2.5-pro-preview-03-25": - case "google/gemini-2.0-flash-001": - case "google/gemini-flash-1.5": - case "google/gemini-pro-1.5": - openAiMessages[0] = { - role: "system", - content: [ - { - type: "text", - text: systemPrompt, - // @ts-ignore-next-line - cache_control: { type: "ephemeral" }, - }, - ], - } - // Add cache_control to the last two user messages - // (note: this works because we only ever add one user message at a time, but if we added multiple we'd need to mark the user message before the last assistant message) - const lastTwoUserMessages = openAiMessages.filter((msg) => msg.role === "user").slice(-2) - lastTwoUserMessages.forEach((msg) => { - if (typeof msg.content === "string") { - msg.content = [{ type: "text", text: msg.content }] - } - if (Array.isArray(msg.content)) { - // NOTE: this is fine since env details will always be added at the end. but if it weren't there, and the user added a image_url type message, it would pop a text part before it and then move it after to the end. - let lastTextPart = msg.content.filter((part) => part.type === "text").pop() - - if (!lastTextPart) { - lastTextPart = { type: "text", text: "..." } - msg.content.push(lastTextPart) - } + if (model.info.supportsPromptCache) { + openAiMessages[0] = { + role: "system", + content: [ + { + type: "text", + text: systemPrompt, // @ts-ignore-next-line - lastTextPart["cache_control"] = { type: "ephemeral" } + cache_control: { type: "ephemeral" }, + }, + ], + } + // Add cache_control to the last two user messages + // (note: this works because we only ever add one user message at a time, but if we added multiple we'd need to mark the user message before the last assistant message) + const lastTwoUserMessages = openAiMessages.filter((msg) => msg.role === "user").slice(-2) + lastTwoUserMessages.forEach((msg) => { + if (typeof msg.content === "string") { + msg.content = [{ type: "text", text: msg.content }] + } + if (Array.isArray(msg.content)) { + // NOTE: this is fine since env details will always be added at the end. but if it weren't there, and the user added a image_url type message, it would pop a text part before it and then move it after to the end. + let lastTextPart = msg.content.filter((part) => part.type === "text").pop() + if (!lastTextPart) { + lastTextPart = { type: "text", text: "..." } + msg.content.push(lastTextPart) } - }) - break - default: - break + // @ts-ignore-next-line + lastTextPart["cache_control"] = { type: "ephemeral" } + } + }) } // Not sure how openrouter defaults max tokens when no value is provided, but the anthropic api requires this value and since they offer both 4096 and 8192 variants, we should ensure 8192. diff --git a/src/api/transform/stream.ts b/src/api/transform/stream.ts index 712f839b..2261b61c 100644 --- a/src/api/transform/stream.ts +++ b/src/api/transform/stream.ts @@ -17,5 +17,6 @@ export interface ApiStreamUsageChunk { outputTokens: number cacheWriteTokens?: number cacheReadTokens?: number + thoughtsTokenCount?: number // openrouter totalCost?: number // openrouter } diff --git a/src/core/assistant-message/diff.test.ts b/src/core/assistant-message/diff.test.ts index 8573022e..f821086d 100644 --- a/src/core/assistant-message/diff.test.ts +++ b/src/core/assistant-message/diff.test.ts @@ -19,14 +19,34 @@ new content isFinal: true, }, { - name: "full file replacement", - original: "old content", - diff: `------- SEARCH + name: "malformed search - mixed symbols", + original: "line1\nline2\nline3", + diff: `<<-- SEARCH +line2 ======= -new content +replaced +++++++ REPLACE`, - expected: "new content\n", - isFinal: true, + shouldThrow: true, + }, + { + name: "malformed search - insufficient dashes", + original: "line1\nline2\nline3", + diff: `-- SEARCH +line2 +======= +replaced ++++++++ REPLACE`, + shouldThrow: true, + }, + { + name: "malformed search - missing space", + original: "line1\nline2\nline3", + diff: `-------SEARCH +line2 +======= +replaced ++++++++ REPLACE`, + shouldThrow: true, }, { name: "exact match replacement", @@ -139,17 +159,33 @@ replaced ] //.filter(({name}) => name === "multiple ordered replacements") //.filter(({name}) => name === "delete then replace") - testCases.forEach(({ name, original, diff, expected, isFinal }) => { + testCases.forEach(({ name, original, diff, expected, isFinal, shouldThrow }) => { it(`should handle ${name} case correctly`, async () => { - const result1 = await cnfc(diff, original, isFinal) - const result2 = await cnfc2(diff, original, isFinal) - const equal = result1 === result2 - const equal2 = result1 === expected - // Verify both implementations produce same result - expect(result1).to.equal(result2) + if (shouldThrow) { + try { + await cnfc(diff, original, isFinal ?? true) + expect.fail("Expected an error to be thrown") + } catch (err) { + expect(err).to.be.an("error") + } - // Verify result matches expected - expect(result1).to.equal(expected) + try { + await cnfc2(diff, original, isFinal ?? true) + expect.fail("Expected an error to be thrown") + } catch (err) { + expect(err).to.be.an("error") + } + } else { + const result1 = await cnfc(diff, original, isFinal ?? true) + const result2 = await cnfc2(diff, original, isFinal ?? true) + const equal = result1 === result2 + const equal2 = result1 === expected + // Verify both implementations produce same result + expect(result1).to.equal(result2) + + // Verify result matches expected + expect(result1).to.equal(expected) + } }) }) diff --git a/src/core/assistant-message/diff.ts b/src/core/assistant-message/diff.ts index 91ab1b0b..e03d7724 100644 --- a/src/core/assistant-message/diff.ts +++ b/src/core/assistant-message/diff.ts @@ -4,15 +4,19 @@ const REPLACE_BLOCK_END = "+++++++ REPLACE" const SEARCH_BLOCK_CHAR = "-" const REPLACE_BLOCK_CHAR = "+" +const LEGACY_SEARCH_BLOCK_CHAR = "<" +const LEGACY_REPLACE_BLOCK_CHAR = ">" // Replace the exact string constants with flexible regex patterns const SEARCH_BLOCK_START_REGEX = /^[-]{3,} SEARCH$/ const SEARCH_BLOCK_END_REGEX = /^[=]{3,}$/ const REPLACE_BLOCK_END_REGEX = /^[+]{3,} REPLACE$/ +const LEGACY_SEARCH_BLOCK_START_REGEX = /^[<]{3,} SEARCH$/ +const LEGACY_REPLACE_BLOCK_END_REGEX = /^[>]{3,} REPLACE$/ // Helper functions to check if a line matches the flexible patterns function isSearchBlockStart(line: string): boolean { - return SEARCH_BLOCK_START_REGEX.test(line) + return SEARCH_BLOCK_START_REGEX.test(line) || LEGACY_SEARCH_BLOCK_START_REGEX.test(line) } function isSearchBlockEnd(line: string): boolean { @@ -20,7 +24,7 @@ function isSearchBlockEnd(line: string): boolean { } function isReplaceBlockEnd(line: string): boolean { - return REPLACE_BLOCK_END_REGEX.test(line) + return REPLACE_BLOCK_END_REGEX.test(line) || LEGACY_REPLACE_BLOCK_END_REGEX.test(line) } /** @@ -269,7 +273,11 @@ async function constructNewFileContentV1(diffContent: string, originalContent: s const lastLine = lines[lines.length - 1] if ( lines.length > 0 && - (lastLine.startsWith(SEARCH_BLOCK_CHAR) || lastLine.startsWith("=") || lastLine.startsWith(REPLACE_BLOCK_CHAR)) && + (lastLine.startsWith(SEARCH_BLOCK_CHAR) || + lastLine.startsWith(LEGACY_SEARCH_BLOCK_CHAR) || + lastLine.startsWith("=") || + lastLine.startsWith(REPLACE_BLOCK_CHAR) || + lastLine.startsWith(LEGACY_REPLACE_BLOCK_CHAR)) && !isSearchBlockStart(lastLine) && !isSearchBlockEnd(lastLine) && !isReplaceBlockEnd(lastLine) @@ -303,9 +311,12 @@ async function constructNewFileContentV1(diffContent: string, originalContent: s searchMatchIndex = 0 searchEndIndex = 0 } else { - // Complete file replacement scenario: treat the entire file as matched - searchMatchIndex = 0 - searchEndIndex = originalContent.length + // ERROR: Empty search block with non-empty file indicates malformed SEARCH marker + throw new Error( + "Empty SEARCH block detected with non-empty file. This usually indicates a malformed SEARCH marker.\n" + + "Please ensure your SEARCH marker follows the correct format:\n" + + "- Use '------- SEARCH' (7+ dashes + space + SEARCH)\n", + ) } } else { // Add check for inefficient full-file search @@ -570,7 +581,7 @@ class NewFileContentConstructor { pendingNonStandardLineLimit: number, ): number { let removeLineCount = 0 - if (line === SEARCH_BLOCK_START) { + if (isSearchBlockStart(line)) { removeLineCount = this.trimPendingNonStandardTrailingEmptyLines(pendingNonStandardLineLimit) if (removeLineCount > 0) { pendingNonStandardLineLimit = pendingNonStandardLineLimit - removeLineCount @@ -580,7 +591,7 @@ class NewFileContentConstructor { canWritependingNonStandardLines && (this.pendingNonStandardLines.length = 0) } this.activateSearchState() - } else if (line === SEARCH_BLOCK_END) { + } else if (isSearchBlockEnd(line)) { // 校验非标内容 if (!this.isSearchingActive()) { this.tryFixSearchBlock(pendingNonStandardLineLimit) @@ -588,7 +599,7 @@ class NewFileContentConstructor { } this.activateReplaceState() this.beforeReplace() - } else if (line === REPLACE_BLOCK_END) { + } else if (isReplaceBlockEnd(line)) { if (!this.isReplacingActive()) { this.tryFixReplaceBlock(pendingNonStandardLineLimit) canWritependingNonStandardLines && (this.pendingNonStandardLines.length = 0) @@ -695,7 +706,7 @@ class NewFileContentConstructor { if (!lineLimit) { throw new Error("Invalid SEARCH/REPLACE block structure - no lines available to process") } - let searchTagRegexp = /^[-]{3,} SEARCH$/ + let searchTagRegexp = /^([-]{3,}|[<]{3,}) SEARCH$/ const searchTagIndex = this.findLastMatchingLineIndex(searchTagRegexp, lineLimit) if (searchTagIndex !== -1) { let fixLines = this.pendingNonStandardLines.slice(searchTagIndex, lineLimit) @@ -746,7 +757,7 @@ class NewFileContentConstructor { throw new Error() } - let replaceEndTagRegexp = /^[+]{3,} REPLACE$/ + let replaceEndTagRegexp = /^([+]{3,}|[>]{3,}) REPLACE$/ const replaceEndTagIndex = this.findLastMatchingLineIndex(replaceEndTagRegexp, lineLimit) const likeReplaceEndTag = replaceEndTagIndex === lineLimit - 1 if (likeReplaceEndTag) { @@ -795,7 +806,11 @@ export async function constructNewFileContentV2(diffContent: string, originalCon const lastLine = lines[lines.length - 1] if ( lines.length > 0 && - (lastLine.startsWith(SEARCH_BLOCK_CHAR) || lastLine.startsWith("=") || lastLine.startsWith(REPLACE_BLOCK_CHAR)) && + (lastLine.startsWith(SEARCH_BLOCK_CHAR) || + lastLine.startsWith(LEGACY_SEARCH_BLOCK_CHAR) || + lastLine.startsWith("=") || + lastLine.startsWith(REPLACE_BLOCK_CHAR) || + lastLine.startsWith(LEGACY_REPLACE_BLOCK_CHAR)) && lastLine !== SEARCH_BLOCK_START && lastLine !== SEARCH_BLOCK_END && lastLine !== REPLACE_BLOCK_END diff --git a/src/core/context/context-management/context-error-handling.ts b/src/core/context/context-management/context-error-handling.ts index eb830069..ad63605a 100644 --- a/src/core/context/context-management/context-error-handling.ts +++ b/src/core/context/context-management/context-error-handling.ts @@ -8,10 +8,7 @@ export function checkIsOpenRouterContextWindowError(error: any): boolean { export function checkIsAnthropicContextWindowError(response: any): boolean { try { - return ( - response?.error?.error?.type === "invalid_request_error" && - response?.error?.error?.message?.includes("prompt is too long") - ) + return response?.error?.error?.type === "invalid_request_error" } catch (e: unknown) { return false } diff --git a/src/core/context/context-tracking/FileContextTracker.ts b/src/core/context/context-tracking/FileContextTracker.ts index b49a95cc..26c70b10 100644 --- a/src/core/context/context-tracking/FileContextTracker.ts +++ b/src/core/context/context-tracking/FileContextTracker.ts @@ -1,7 +1,10 @@ import * as path from "path" import * as vscode from "vscode" import { getTaskMetadata, saveTaskMetadata } from "@core/storage/disk" +import { getWorkspaceState, updateWorkspaceState } from "@core/storage/state" +import { getGlobalState } from "@core/storage/state" import type { FileMetadataEntry } from "./ContextTrackerTypes" +import type { ClineMessage } from "@shared/ExtensionMessage" // This class is responsible for tracking file operations that may result in stale context. // If a user modifies a file outside of Cline, the context may become stale and need to be updated. @@ -11,10 +14,12 @@ import type { FileMetadataEntry } from "./ContextTrackerTypes" // a diff edit because the file was modified since Cline last read it. // FileContextTracker -// -// This class is responsible for tracking file operations. -// If the full contents of a file are pass to Cline via a tool, mention, or edit, the file is marked as active. -// If a file is modified outside of Cline, we detect and track this change to prevent stale context. +/** +This class is responsible for tracking file operations. +If the full contents of a file are passed to Cline via a tool, mention, or edit, the file is marked as active. +If a file is modified outside of Cline, we detect and track this change to prevent stale context. +This is used when restoring a task (non-git "checkpoint" restore), and mid-task. +*/ export class FileContextTracker { private context: vscode.ExtensionContext readonly taskId: string @@ -29,7 +34,9 @@ export class FileContextTracker { this.taskId = taskId } - // Gets the current working directory or returns undefined if it cannot be determined + /** + * Gets the current working directory or returns undefined if it cannot be determined + */ private getCwd(): string | undefined { const cwd = vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0) if (!cwd) { @@ -38,7 +45,9 @@ export class FileContextTracker { return cwd } - // File watchers are set up for each file that is tracked in the task metadata. + /** + * File watchers are set up for each file that is tracked in the task metadata. + */ async setupFileWatcher(filePath: string) { // Only setup watcher if it doesn't already exist for this file if (this.fileWatchers.has(filePath)) { @@ -70,8 +79,10 @@ export class FileContextTracker { this.fileWatchers.set(filePath, watcher) } - // Tracks a file operation in metadata and sets up a watcher for the file - // This is the main entry point for FileContextTracker and is called when a file is passed to Cline via a tool, mention, or edit. + /** + * Tracks a file operation in metadata and sets up a watcher for the file + * This is the main entry point for FileContextTracker and is called when a file is passed to Cline via a tool, mention, or edit. + */ async trackFileContext(filePath: string, operation: "read_tool" | "user_edited" | "cline_edited" | "file_mentioned") { try { const cwd = this.getCwd() @@ -89,9 +100,11 @@ export class FileContextTracker { } } - // Adds a file to the metadata tracker - // This handles the business logic of determining if the file is new, stale, or active. - // It also updates the metadata with the latest read/edit dates. + /** + * Adds a file to the metadata tracker + * This handles the business logic of determining if the file is new, stale, or active. + * It also updates the metadata with the latest read/edit dates. + */ async addFileToFileContextTracker( context: vscode.ExtensionContext, taskId: string, @@ -154,23 +167,149 @@ export class FileContextTracker { } } - // Returns (and then clears) the set of recently modified files + /** + * Returns (and then clears) the set of recently modified files + */ getAndClearRecentlyModifiedFiles(): string[] { const files = Array.from(this.recentlyModifiedFiles) this.recentlyModifiedFiles.clear() return files } - // Marks a file as edited by Cline to prevent false positives in file watchers + /** + * Marks a file as edited by Cline to prevent false positives in file watchers + */ markFileAsEditedByCline(filePath: string): void { this.recentlyEditedByCline.add(filePath) } - // Disposes all file watchers + /** + * Disposes all file watchers + */ dispose(): void { for (const watcher of this.fileWatchers.values()) { watcher.dispose() } this.fileWatchers.clear() } + + /** + * Detects files that were edited by Cline or users after a specific message timestamp + * This is used when restoring checkpoints to warn about potential file content mismatches + */ + async detectFilesEditedAfterMessage(messageTs: number, deletedMessages: ClineMessage[]): Promise { + const editedFiles: string[] = [] + + try { + // Check task metadata for files that were edited by Cline or users after the message timestamp + const taskMetadata = await getTaskMetadata(this.context, this.taskId) + + if (taskMetadata?.files_in_context) { + for (const fileEntry of taskMetadata.files_in_context) { + const clineEditedAfter = fileEntry.cline_edit_date && fileEntry.cline_edit_date > messageTs + const userEditedAfter = fileEntry.user_edit_date && fileEntry.user_edit_date > messageTs + + if (clineEditedAfter || userEditedAfter) { + editedFiles.push(fileEntry.path) + } + } + } + } catch (error) { + console.error("Error checking file context metadata:", error) + } + + // Also check deleted task messages for file operations + for (const message of deletedMessages) { + if (message.say === "tool" && message.text) { + try { + const toolData = JSON.parse(message.text) + if ((toolData.tool === "editedExistingFile" || toolData.tool === "newFileCreated") && toolData.path) { + if (!editedFiles.includes(toolData.path)) { + editedFiles.push(toolData.path) + } + } + } catch (error) { + console.error("Error checking task messages:", error) + } + } + } + return [...new Set(editedFiles)] + } + + /** + * Stores pending file context warning in workspace state so it persists across task reinitialization + */ + async storePendingFileContextWarning(files: string[]): Promise { + try { + const key = `pendingFileContextWarning_${this.taskId}` + await updateWorkspaceState(this.context, key, files) + } catch (error) { + console.error("Error storing pending file context warning:", error) + } + } + + /** + * Retrieves pending file context warning from workspace state (without clearing it) + */ + async retrievePendingFileContextWarning(): Promise { + try { + const key = `pendingFileContextWarning_${this.taskId}` + const files = (await getWorkspaceState(this.context, key)) as string[] + return files + } catch (error) { + console.error("Error retrieving pending file context warning:", error) + } + return undefined + } + + /** + * Retrieves and clears pending file context warning from workspace state + */ + async retrieveAndClearPendingFileContextWarning(): Promise { + try { + const files = await this.retrievePendingFileContextWarning() + if (files) { + await updateWorkspaceState(this.context, `pendingFileContextWarning_${this.taskId}`, undefined) + return files + } + } catch (error) { + console.error("Error retrieving pending file context warning:", error) + } + return undefined + } + + /** + * Static method to clean up orphaned pending file context warnings at startup + * This removes warnings for tasks that may no longer exist + */ + static async cleanupOrphanedWarnings(context: vscode.ExtensionContext): Promise { + const startTime = Date.now() + try { + const taskHistory = ((await getGlobalState(context, "taskHistory")) as Array<{ id: string }>) || [] + const existingTaskIds = new Set(taskHistory.map((task) => task.id)) + const allStateKeys = context.workspaceState.keys() + const pendingWarningKeys = allStateKeys.filter((key) => key.startsWith("pendingFileContextWarning_")) + + const orphanedPendingContextTasks: string[] = [] + for (const key of pendingWarningKeys) { + const taskId = key.replace("pendingFileContextWarning_", "") + if (!existingTaskIds.has(taskId)) { + orphanedPendingContextTasks.push(key) + } + } + + if (orphanedPendingContextTasks.length > 0) { + for (const key of orphanedPendingContextTasks) { + await updateWorkspaceState(context, key, undefined) + } + } + + const duration = Date.now() - startTime + console.log( + `FileContextTracker: Processed ${existingTaskIds.size} tasks, found ${pendingWarningKeys.length} pending warnings, ${orphanedPendingContextTasks.length} orphaned, deleted ${orphanedPendingContextTasks.length}, took ${duration}ms`, + ) + } catch (error) { + console.error("Error cleaning up orphaned file context warnings:", error) + } + } } diff --git a/src/core/controller/checkpoints/checkpointRestore.ts b/src/core/controller/checkpoints/checkpointRestore.ts index 9330e0cd..ba7159be 100644 --- a/src/core/controller/checkpoints/checkpointRestore.ts +++ b/src/core/controller/checkpoints/checkpointRestore.ts @@ -9,7 +9,7 @@ export async function checkpointRestore(controller: Controller, request: Checkpo if (request.number) { // wait for messages to be loaded - await pWaitFor(() => controller.task?.isInitialized === true, { + await pWaitFor(() => controller.task?.taskState.isInitialized === true, { timeout: 3_000, }).catch(() => { console.error("Failed to init new cline instance") diff --git a/src/core/controller/file/getRelativePaths.ts b/src/core/controller/file/getRelativePaths.ts index c2906d82..cbec57e5 100644 --- a/src/core/controller/file/getRelativePaths.ts +++ b/src/core/controller/file/getRelativePaths.ts @@ -3,7 +3,7 @@ import { RelativePathsRequest, RelativePaths } from "@shared/proto/file" import { FileMethodHandler } from "./index" import * as vscode from "vscode" import * as path from "path" -import { UriServiceClient } from "../../../standalone/services/host-grpc-client" +import { UriServiceClient } from "@hosts/host-bridge-client" import { Metadata, StringRequest } from "@shared/proto/common" /** diff --git a/src/core/controller/grpc-request-registry.ts b/src/core/controller/grpc-request-registry.ts index e8585aa9..c3ef86aa 100644 --- a/src/core/controller/grpc-request-registry.ts +++ b/src/core/controller/grpc-request-registry.ts @@ -64,17 +64,17 @@ export class GrpcRequestRegistry { */ public cancelRequest(requestId: string): boolean { const requestInfo = this.activeRequests.get(requestId) - if (requestInfo) { - try { - requestInfo.cleanup() - console.log(`[DEBUG] Cleaned up request: ${requestId}`) - } catch (error) { - console.error(`Error cleaning up request ${requestId}:`, error) - } - this.activeRequests.delete(requestId) - return true + if (!requestInfo) { + return false } - return false + try { + requestInfo.cleanup() + console.log(`[DEBUG] Cleaned up request: ${requestId}`) + } catch (error) { + console.error(`Error cleaning up request ${requestId}:`, error) + } + this.activeRequests.delete(requestId) + return true } /** diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 868e6721..298a2b38 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -115,7 +115,7 @@ export class Controller { try { await updateGlobalState(this.context, "shengSuanYunToken", undefined) await updateGlobalState(this.context, "userInfo", undefined) - await updateGlobalState(this.context, "apiProvider", "shengsuanyun") + await updateWorkspaceState(this.context, "apiProvider", "shengsuanyun") await this.postStateToWebview() // vscode.window.showInformationMessage("成功登出 Cline 胜算云") } catch (error) { @@ -131,12 +131,13 @@ export class Controller { await this.clearTask() // ensures that an existing task doesn't exist before starting a new one, although this shouldn't be possible since user must clear task before starting a new one const { apiConfiguration, - customInstructions, autoApprovalSettings, browserSettings, chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + terminalOutputLineLimit, + defaultTerminalProfile, enableCheckpointsSetting, isNewUser, taskHistory, @@ -172,8 +173,9 @@ export class Controller { chatSettings, shellIntegrationTimeout, terminalReuseEnabled ?? true, + terminalOutputLineLimit ?? 500, + defaultTerminalProfile ?? "default", enableCheckpointsSetting ?? true, - customInstructions, task, images, files, @@ -205,15 +207,7 @@ export class Controller { await this.setUserInfo(message.user || message.userSSY || undefined) await this.postStateToWebview() break - case "apiConfiguration": - if (message.apiConfiguration) { - await updateApiConfiguration(this.context, message.apiConfiguration) - if (this.task) { - this.task.api = buildApiHandler(message.apiConfiguration) - } - } - await this.postStateToWebview() - break + case "fetchUserCreditsData": { await this.fetchUserCreditsData() break @@ -231,6 +225,7 @@ export class Controller { await this.postStateToWebview() break } + case "clearAllTaskHistory": { const answer = await vscode.window.showWarningMessage( "删除哪些内容?", @@ -307,6 +302,12 @@ export class Controller { previousModeReasoningEffort: newReasoningEffort, previousModeAwsBedrockCustomSelected: newAwsBedrockCustomSelected, previousModeAwsBedrockCustomModelBaseId: newAwsBedrockCustomModelBaseId, + previousModeSapAiCoreClientId: newSapAiCoreClientId, + previousModeSapAiCoreClientSecret: newSapAiCoreClientSecret, + previousModeSapAiCoreBaseUrl: newSapAiCoreBaseUrl, + previousModeSapAiCoreTokenUrl: newSapAiCoreTokenUrl, + previousModeSapAiCoreResourceGroup: newSapAiResourceGroup, + previousModeSapAiCoreModelId: newSapAiCoreModelId, planActSeparateModelsSetting, } = await getAllExtensionState(this.context) @@ -314,9 +315,9 @@ export class Controller { if (shouldSwitchModel) { // Save the last model used in this mode - await updateGlobalState(this.context, "previousModeApiProvider", apiConfiguration.apiProvider) - await updateGlobalState(this.context, "previousModeThinkingBudgetTokens", apiConfiguration.thinkingBudgetTokens) - await updateGlobalState(this.context, "previousModeReasoningEffort", apiConfiguration.reasoningEffort) + await updateWorkspaceState(this.context, "previousModeApiProvider", apiConfiguration.apiProvider) + await updateWorkspaceState(this.context, "previousModeThinkingBudgetTokens", apiConfiguration.thinkingBudgetTokens) + await updateWorkspaceState(this.context, "previousModeReasoningEffort", apiConfiguration.reasoningEffort) switch (apiConfiguration.apiProvider) { case "anthropic": case "vertex": @@ -326,20 +327,20 @@ export class Controller { case "qwen": case "deepseek": case "xai": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.apiModelId) + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.apiModelId) break case "shengsuanyun": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.shengSuanYunModelId) - await updateGlobalState(this.context, "previousModeModelInfo", apiConfiguration.shengSuanYunModelInfo) + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.shengSuanYunModelId) + await updateWorkspaceState(this.context, "previousModeModelInfo", apiConfiguration.shengSuanYunModelInfo) break case "bedrock": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.apiModelId) - await updateGlobalState( + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.apiModelId) + await updateWorkspaceState( this.context, "previousModeAwsBedrockCustomSelected", apiConfiguration.awsBedrockCustomSelected, ) - await updateGlobalState( + await updateWorkspaceState( this.context, "previousModeAwsBedrockCustomModelBaseId", apiConfiguration.awsBedrockCustomModelBaseId, @@ -347,34 +348,51 @@ export class Controller { break case "openrouter": case "cline": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.openRouterModelId) - await updateGlobalState(this.context, "previousModeModelInfo", apiConfiguration.openRouterModelInfo) + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.openRouterModelId) + await updateWorkspaceState(this.context, "previousModeModelInfo", apiConfiguration.openRouterModelInfo) break case "vscode-lm": // Important we don't set modelId to this, as it's an object not string (webview expects model id to be a string) - await updateGlobalState( + await updateWorkspaceState( this.context, "previousModeVsCodeLmModelSelector", apiConfiguration.vsCodeLmModelSelector, ) break case "openai": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.openAiModelId) - await updateGlobalState(this.context, "previousModeModelInfo", apiConfiguration.openAiModelInfo) + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.openAiModelId) + await updateWorkspaceState(this.context, "previousModeModelInfo", apiConfiguration.openAiModelInfo) break case "ollama": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.ollamaModelId) + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.ollamaModelId) break case "lmstudio": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.lmStudioModelId) + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.lmStudioModelId) break case "litellm": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.liteLlmModelId) - await updateGlobalState(this.context, "previousModeModelInfo", apiConfiguration.liteLlmModelInfo) + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.liteLlmModelId) + await updateWorkspaceState(this.context, "previousModeModelInfo", apiConfiguration.liteLlmModelInfo) break case "requesty": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.requestyModelId) - await updateGlobalState(this.context, "previousModeModelInfo", apiConfiguration.requestyModelInfo) + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.requestyModelId) + await updateWorkspaceState(this.context, "previousModeModelInfo", apiConfiguration.requestyModelInfo) + break + case "sapaicore": + await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.apiModelId) + await updateWorkspaceState(this.context, "previousModeSapAiCoreClientId", apiConfiguration.sapAiCoreClientId) + await updateWorkspaceState( + this.context, + "previousModeSapAiCoreClientSecret", + apiConfiguration.sapAiCoreClientSecret, + ) + await updateWorkspaceState(this.context, "previousModeSapAiCoreBaseUrl", apiConfiguration.sapAiCoreBaseUrl) + await updateWorkspaceState(this.context, "previousModeSapAiCoreTokenUrl", apiConfiguration.sapAiCoreTokenUrl) + await updateWorkspaceState( + this.context, + "previousModeSapAiCoreResourceGroup", + apiConfiguration.sapAiResourceGroup, + ) + await updateWorkspaceState(this.context, "previousModeSapAiCoreModelId", apiConfiguration.sapAiCoreModelId) break } @@ -386,9 +404,9 @@ export class Controller { newReasoningEffort || newVsCodeLmModelSelector ) { - await updateGlobalState(this.context, "apiProvider", newApiProvider) - await updateGlobalState(this.context, "thinkingBudgetTokens", newThinkingBudgetTokens) - await updateGlobalState(this.context, "reasoningEffort", newReasoningEffort) + await updateWorkspaceState(this.context, "apiProvider", newApiProvider) + await updateWorkspaceState(this.context, "thinkingBudgetTokens", newThinkingBudgetTokens) + await updateWorkspaceState(this.context, "reasoningEffort", newReasoningEffort) switch (newApiProvider) { case "anthropic": case "vertex": @@ -397,42 +415,46 @@ export class Controller { case "openai-native": case "qwen": case "deepseek": - await updateGlobalState(this.context, "apiModelId", newModelId) + case "xai": + await updateWorkspaceState(this.context, "apiModelId", newModelId) break case "shengsuanyun": await updateGlobalState(this.context, "shengSuanYunModelId", newModelId) await updateGlobalState(this.context, "shengSuanYunModelInfo", newModelInfo) break case "bedrock": - await updateGlobalState(this.context, "apiModelId", newModelId) - await updateGlobalState(this.context, "awsBedrockCustomSelected", newAwsBedrockCustomSelected) - await updateGlobalState(this.context, "awsBedrockCustomModelBaseId", newAwsBedrockCustomModelBaseId) + await updateWorkspaceState(this.context, "apiModelId", newModelId) + await updateWorkspaceState(this.context, "awsBedrockCustomSelected", newAwsBedrockCustomSelected) + await updateWorkspaceState(this.context, "awsBedrockCustomModelBaseId", newAwsBedrockCustomModelBaseId) break case "openrouter": case "cline": - await updateGlobalState(this.context, "openRouterModelId", newModelId) - await updateGlobalState(this.context, "openRouterModelInfo", newModelInfo) + await updateWorkspaceState(this.context, "openRouterModelId", newModelId) + await updateWorkspaceState(this.context, "openRouterModelInfo", newModelInfo) break case "vscode-lm": - await updateGlobalState(this.context, "vsCodeLmModelSelector", newVsCodeLmModelSelector) + await updateWorkspaceState(this.context, "vsCodeLmModelSelector", newVsCodeLmModelSelector) break case "openai": - await updateGlobalState(this.context, "openAiModelId", newModelId) - await updateGlobalState(this.context, "openAiModelInfo", newModelInfo) + await updateWorkspaceState(this.context, "openAiModelId", newModelId) + await updateWorkspaceState(this.context, "openAiModelInfo", newModelInfo) break case "ollama": - await updateGlobalState(this.context, "ollamaModelId", newModelId) + await updateWorkspaceState(this.context, "ollamaModelId", newModelId) break case "lmstudio": - await updateGlobalState(this.context, "lmStudioModelId", newModelId) + await updateWorkspaceState(this.context, "lmStudioModelId", newModelId) break case "litellm": - await updateGlobalState(this.context, "previousModeModelId", apiConfiguration.liteLlmModelId) - await updateGlobalState(this.context, "previousModeModelInfo", apiConfiguration.liteLlmModelInfo) + await updateWorkspaceState(this.context, "liteLlmModelId", newModelId) + await updateWorkspaceState(this.context, "liteLlmModelInfo", newModelInfo) break case "requesty": - await updateGlobalState(this.context, "requestyModelId", newModelId) - await updateGlobalState(this.context, "requestyModelInfo", newModelInfo) + await updateWorkspaceState(this.context, "requestyModelId", newModelId) + await updateWorkspaceState(this.context, "requestyModelInfo", newModelInfo) + break + case "sapaicore": + await updateWorkspaceState(this.context, "apiModelId", newModelId) break } @@ -443,13 +465,13 @@ export class Controller { } } - await updateGlobalState(this.context, "chatSettings", chatSettings) + await updateWorkspaceState(this.context, "chatSettings", chatSettings) await this.postStateToWebview() if (this.task) { this.task.chatSettings = chatSettings - if (this.task.isAwaitingPlanResponse && didSwitchToActMode) { - this.task.didRespondToPlanAskBySwitchingMode = true + if (this.task.taskState.isAwaitingPlanResponse && didSwitchToActMode) { + this.task.taskState.didRespondToPlanAskBySwitchingMode = true // Use chatContent if provided, otherwise use default message await this.task.handleWebviewAskResponse( "messageResponse", @@ -474,9 +496,9 @@ export class Controller { await pWaitFor( () => this.task === undefined || - this.task.isStreaming === false || - this.task.didFinishAbortingStream || - this.task.isWaitingForFirstChunk, // if only first chunk is processed, then there's no need to wait for graceful abort (closes edits, browser, etc) + this.task.taskState.isStreaming === false || + this.task.taskState.didFinishAbortingStream || + this.task.taskState.isWaitingForFirstChunk, // if only first chunk is processed, then there's no need to wait for graceful abort (closes edits, browser, etc) { timeout: 3_000, }, @@ -485,21 +507,13 @@ export class Controller { }) if (this.task) { // 'abandoned' will prevent this cline instance from affecting future cline instance gui. this may happen if its hanging on a streaming request - this.task.abandoned = true + this.task.taskState.abandoned = true } await this.initTask(undefined, undefined, undefined, historyItem) // clears task again, so we need to abortTask manually above // await this.postStateToWebview() // new Cline instance will post state when it's ready. having this here sent an empty messages array to webview leading to virtuoso having to reload the entire list } } - async updateCustomInstructions(instructions?: string) { - // User may be clearing the field - await updateGlobalState(this.context, "customInstructions", instructions || undefined) - if (this.task) { - this.task.customInstructions = instructions || undefined - } - } - // Account async fetchUserCreditsData() { @@ -534,7 +548,7 @@ export class Controller { await sendAuthCallbackEvent(customToken) const clineProvider: ApiProvider = "cline" - await updateGlobalState(this.context, "apiProvider", clineProvider) + await updateWorkspaceState(this.context, "apiProvider", clineProvider) // Update API configuration with the new provider and API key const { apiConfiguration } = await getAllExtensionState(this.context) @@ -693,7 +707,7 @@ export class Controller { } const openrouter: ApiProvider = "openrouter" - await updateGlobalState(this.context, "apiProvider", openrouter) + await updateWorkspaceState(this.context, "apiProvider", openrouter) await storeSecret(this.context, "openRouterApiKey", apiKey) await this.postStateToWebview() if (this.task) { @@ -730,7 +744,7 @@ export class Controller { } const shengsuanyun: ApiProvider = "shengsuanyun" - await updateGlobalState(this.context, "apiProvider", shengsuanyun) + await updateWorkspaceState(this.context, "apiProvider", shengsuanyun) await updateGlobalState(this.context, "shengSuanYunToken", customToken) await storeSecret(this.context, "shengSuanYunApiKey", apiKey) await this.postStateToWebview() @@ -1017,13 +1031,13 @@ export class Controller { const { apiConfiguration, lastShownAnnouncementId, - customInstructions, taskHistory, autoApprovalSettings, browserSettings, chatSettings, userInfo, mcpMarketplaceEnabled, + mcpRichDisplayEnabled, telemetrySetting, planActSeparateModelsSetting, enableCheckpointsSetting, @@ -1031,8 +1045,10 @@ export class Controller { globalWorkflowToggles, shellIntegrationTimeout, terminalReuseEnabled, + defaultTerminalProfile, isNewUser, mcpResponsesCollapsed, + terminalOutputLineLimit, } = await getAllExtensionState(this.context) const localClineRulesToggles = @@ -1049,11 +1065,10 @@ export class Controller { return { version: this.context.extension?.packageJSON?.version ?? "", apiConfiguration, - customInstructions, uriScheme: vscode.env.uriScheme, currentTaskItem: this.task?.taskId ? (taskHistory || []).find((item) => item.id === this.task?.taskId) : undefined, - checkpointTrackerErrorMessage: this.task?.checkpointTrackerErrorMessage, - clineMessages: this.task?.clineMessages || [], + checkpointTrackerErrorMessage: this.task?.taskState.checkpointTrackerErrorMessage, + clineMessages: this.task?.messageStateHandler.getClineMessages() || [], taskHistory: (taskHistory || []) .filter((item) => item.ts && item.task) .sort((a, b) => b.ts - a.ts) @@ -1065,6 +1080,7 @@ export class Controller { chatSettings, userInfo, mcpMarketplaceEnabled, + mcpRichDisplayEnabled, telemetrySetting, planActSeparateModelsSetting, enableCheckpointsSetting: enableCheckpointsSetting ?? true, @@ -1077,8 +1093,10 @@ export class Controller { globalWorkflowToggles: globalWorkflowToggles || {}, shellIntegrationTimeout, terminalReuseEnabled, + defaultTerminalProfile, isNewUser, mcpResponsesCollapsed, + terminalOutputLineLimit, } } diff --git a/src/core/controller/models/methods.ts b/src/core/controller/models/methods.ts index b2c95659..db0f5b18 100644 --- a/src/core/controller/models/methods.ts +++ b/src/core/controller/models/methods.ts @@ -11,11 +11,7 @@ import { refreshOpenRouterModels } from "./refreshOpenRouterModels" import { refreshRequestyModels } from "./refreshRequestyModels" import { refreshShengSuanYunModels } from "./refreshShengSuanYunModels" import { subscribeToOpenRouterModels } from "./subscribeToOpenRouterModels" - -// Streaming methods for this service -export const streamingMethods = [ - "subscribeToOpenRouterModels" -] +import { updateApiConfigurationProto } from "./updateApiConfigurationProto" // Register all models service methods export function registerAllMethods(): void { @@ -27,5 +23,6 @@ export function registerAllMethods(): void { registerMethod("refreshOpenRouterModels", refreshOpenRouterModels) registerMethod("refreshRequestyModels", refreshRequestyModels) registerMethod("refreshShengSuanYunModels", refreshShengSuanYunModels) - registerMethod("subscribeToOpenRouterModels", subscribeToOpenRouterModels, { isStreaming: true }) + registerMethod("subscribeToOpenRouterModels", subscribeToOpenRouterModels) + registerMethod("updateApiConfigurationProto", updateApiConfigurationProto) } \ No newline at end of file diff --git a/src/core/controller/models/refreshOpenRouterModels.ts b/src/core/controller/models/refreshOpenRouterModels.ts index 80f84e0e..3dbae316 100644 --- a/src/core/controller/models/refreshOpenRouterModels.ts +++ b/src/core/controller/models/refreshOpenRouterModels.ts @@ -99,6 +99,11 @@ export async function refreshOpenRouterModels( modelInfo.cacheWritesPrice = 0.14 modelInfo.cacheReadsPrice = 0.014 break + case "x-ai/grok-3-beta": + modelInfo.supportsPromptCache = true + modelInfo.cacheWritesPrice = 0 + modelInfo.cacheReadsPrice = 0 + break default: if (rawModel.id.startsWith("openai/")) { modelInfo.cacheReadsPrice = parsePrice(rawModel.pricing?.input_cache_read) @@ -117,6 +122,11 @@ export async function refreshOpenRouterModels( break } + // add new model id + if (rawModel.id === "x-ai/grok-3-beta") { + models["x-ai/grok-3"] = modelInfo + } + models[rawModel.id] = modelInfo } } else { diff --git a/src/core/controller/models/updateApiConfigurationProto.ts b/src/core/controller/models/updateApiConfigurationProto.ts new file mode 100644 index 00000000..5826035b --- /dev/null +++ b/src/core/controller/models/updateApiConfigurationProto.ts @@ -0,0 +1,43 @@ +import type { Controller } from "../index" +import { Empty } from "@shared/proto/common" +import { UpdateApiConfigurationRequest } from "@shared/proto/models" +import { updateApiConfiguration } from "../../storage/state" +import { buildApiHandler } from "@api/index" +import { convertProtoToApiConfiguration } from "@shared/proto-conversions/models/api-configuration-conversion" + +/** + * Updates API configuration + * @param controller The controller instance + * @param request The update API configuration request + * @returns Empty response + */ +export async function updateApiConfigurationProto( + controller: Controller, + request: UpdateApiConfigurationRequest, +): Promise { + try { + if (!request.apiConfiguration) { + console.log("[APICONFIG: updateApiConfigurationProto] API configuration is required") + throw new Error("API configuration is required") + } + + // Convert proto ApiConfiguration to application ApiConfiguration + const appApiConfiguration = convertProtoToApiConfiguration(request.apiConfiguration) + + // Update the API configuration in storage + await updateApiConfiguration(controller.context, appApiConfiguration) + + // Update the task's API handler if there's an active task + if (controller.task) { + controller.task.api = buildApiHandler(appApiConfiguration) + } + + // Post updated state to webview + await controller.postStateToWebview() + + return Empty.create() + } catch (error) { + console.error(`Failed to update API configuration: ${error}`) + throw error + } +} diff --git a/src/core/controller/state/getAvailableTerminalProfiles.ts b/src/core/controller/state/getAvailableTerminalProfiles.ts new file mode 100644 index 00000000..d7f9d6d2 --- /dev/null +++ b/src/core/controller/state/getAvailableTerminalProfiles.ts @@ -0,0 +1,19 @@ +import { Controller } from "../index" +import * as proto from "@/shared/proto" +import { getAvailableTerminalProfiles as getTerminalProfilesFromShell } from "../../../utils/shell" + +export async function getAvailableTerminalProfiles( + controller: Controller, + request: proto.cline_shengsuan.EmptyRequest, +): Promise { + const profiles = getTerminalProfilesFromShell() + + return proto.cline_shengsuan.TerminalProfiles.create({ + profiles: profiles.map((profile) => ({ + id: profile.id, + name: profile.name, + path: profile.path || "", + description: profile.description || "", + })), + }) +} diff --git a/src/core/controller/state/resetState.ts b/src/core/controller/state/resetState.ts index 4b0540b5..883fb974 100644 --- a/src/core/controller/state/resetState.ts +++ b/src/core/controller/state/resetState.ts @@ -1,19 +1,25 @@ import { Controller } from ".." -import { Empty, EmptyRequest } from "../../../shared/proto/common" -import { resetExtensionState } from "../../../core/storage/state" +import { Empty } from "../../../shared/proto/common" +import { ResetStateRequest } from "../../../shared/proto/state" +import { resetGlobalState, resetWorkspaceState } from "../../../core/storage/state" import * as vscode from "vscode" import { sendChatButtonClickedEvent } from "../ui/subscribeToChatButtonClicked" /** * Resets the extension state to its defaults * @param controller The controller instance - * @param request An empty request (no parameters needed) + * @param request The reset state request containing the global flag * @returns An empty response */ -export async function resetState(controller: Controller, request: EmptyRequest): Promise { +export async function resetState(controller: Controller, request: ResetStateRequest): Promise { try { - vscode.window.showInformationMessage("重置状态...") - await resetExtensionState(controller.context) + if (request.global) { + vscode.window.showInformationMessage("重置全局状态...") + await resetGlobalState(controller.context) + } else { + vscode.window.showInformationMessage("重置工作区状态...") + await resetWorkspaceState(controller.context) + } if (controller.task) { controller.task.abortTask() diff --git a/src/core/controller/state/updateDefaultTerminalProfile.ts b/src/core/controller/state/updateDefaultTerminalProfile.ts new file mode 100644 index 00000000..b8586f91 --- /dev/null +++ b/src/core/controller/state/updateDefaultTerminalProfile.ts @@ -0,0 +1,50 @@ +import * as vscode from "vscode" +import { Controller } from "../index" +import * as proto from "@/shared/proto" +import { updateGlobalState } from "../../storage/state" +import { TerminalInfo } from "@/integrations/terminal/TerminalRegistry" + +export async function updateDefaultTerminalProfile( + controller: Controller, + request: proto.cline_shengsuan.StringRequest, +): Promise { + const profileId = request.value + + // Update the terminal profile in the state + await updateGlobalState(controller.context, "defaultTerminalProfile", profileId) + + let closedCount = 0 + let busyTerminals: TerminalInfo[] = [] + + // Update the terminal manager of the current task if it exists + if (controller.task) { + // Call the updated setDefaultTerminalProfile method that returns closed terminal info + const result = controller.task.terminalManager.setDefaultTerminalProfile(profileId) + closedCount = result.closedCount + busyTerminals = result.busyTerminals + + // Show information message if terminals were closed + if (closedCount > 0) { + vscode.window.showInformationMessage( + `Closed ${closedCount} ${closedCount === 1 ? "terminal" : "terminals"} with different profile.`, + ) + } + + // Show warning if there are busy terminals that couldn't be closed + if (busyTerminals.length > 0) { + vscode.window.showWarningMessage( + `${busyTerminals.length} busy ${busyTerminals.length === 1 ? "terminal has" : "terminals have"} a different profile. ` + + `Close ${busyTerminals.length === 1 ? "it" : "them"} to use the new profile for all commands.`, + ) + } + } + + // Broadcast state update to all webviews + await controller.postStateToWebview() + + return proto.cline_shengsuan.TerminalProfileUpdateResponse.create({ + closedCount, + busyTerminalsCount: busyTerminals.length, + hasBusyTerminals: busyTerminals.length > 0, + }) +} diff --git a/src/core/controller/state/updateSettings.ts b/src/core/controller/state/updateSettings.ts index 5ebb666b..925a3baa 100644 --- a/src/core/controller/state/updateSettings.ts +++ b/src/core/controller/state/updateSettings.ts @@ -25,11 +25,6 @@ export async function updateSettings(controller: Controller, request: UpdateSett } } - // Update custom instructions - if (request.customInstructionsSetting !== undefined) { - await controller.updateCustomInstructions(request.customInstructionsSetting) - } - // Update telemetry setting if (request.telemetrySetting) { await controller.updateTelemetrySetting(request.telemetrySetting as TelemetrySetting) @@ -55,6 +50,11 @@ export async function updateSettings(controller: Controller, request: UpdateSett await controller.context.globalState.update("mcpResponsesCollapsed", request.mcpResponsesCollapsed) } + // Update MCP responses collapsed setting + if (request.mcpRichDisplayEnabled !== undefined) { + await controller.context.globalState.update("mcpRichDisplayEnabled", request.mcpRichDisplayEnabled) + } + // Update chat settings if (request.chatSettings) { const chatSettings = convertProtoChatSettingsToChatSettings(request.chatSettings) @@ -74,6 +74,11 @@ export async function updateSettings(controller: Controller, request: UpdateSett await controller.context.globalState.update("terminalReuseEnabled", request.terminalReuseEnabled) } + // Update terminal output line limit + if (request.terminalOutputLineLimit !== undefined) { + await controller.context.globalState.update("terminalOutputLineLimit", Number(request.terminalOutputLineLimit)) + } + // Post updated state to webview await controller.postStateToWebview() diff --git a/src/core/controller/state/updateTerminalConnectionTimeout.ts b/src/core/controller/state/updateTerminalConnectionTimeout.ts index e3e549b1..33c30950 100644 --- a/src/core/controller/state/updateTerminalConnectionTimeout.ts +++ b/src/core/controller/state/updateTerminalConnectionTimeout.ts @@ -1,27 +1,18 @@ -import { Controller } from ".." -import { Int64, Int64Request } from "../../../shared/proto/common" +import { Controller } from "../index" +import * as proto from "@/shared/proto" import { updateGlobalState } from "../../storage/state" -/** - * Updates the terminal connection timeout setting - * @param controller The controller instance - * @param request The request containing the timeout value in milliseconds - * @returns The updated timeout value - */ -export async function updateTerminalConnectionTimeout(controller: Controller, request: Int64Request): Promise { - try { - const timeout = request.value +export async function updateTerminalConnectionTimeout( + controller: Controller, + request: proto.cline_shengsuan.Int64Request, +): Promise { + const timeoutValue = request.value - if (typeof timeout === "number" && !isNaN(timeout) && timeout > 0) { - // Update the global state directly - await updateGlobalState(controller.context, "shellIntegrationTimeout", timeout) - return Int64.create({ value: timeout }) - } else { - console.warn(`Invalid shell integration timeout value received: ${timeout}. Expected a positive number.`) - throw new Error("Invalid timeout value. Expected a positive number.") - } - } catch (error) { - console.error(`Failed to update terminal connection timeout: ${error}`) - throw error - } + // Update the terminal connection timeout setting in the state + await updateGlobalState(controller.context, "shellIntegrationTimeout", timeoutValue) + + // Broadcast state update to all webviews + await controller.postStateToWebview() + + return proto.cline_shengsuan.Int64.create({ value: timeoutValue }) } diff --git a/src/core/controller/state/updateTerminalReuseEnabled.ts b/src/core/controller/state/updateTerminalReuseEnabled.ts new file mode 100644 index 00000000..81bdcba4 --- /dev/null +++ b/src/core/controller/state/updateTerminalReuseEnabled.ts @@ -0,0 +1,18 @@ +import { Controller } from "../index" +import * as proto from "@/shared/proto" +import { updateGlobalState } from "../../storage/state" + +export async function updateTerminalReuseEnabled( + controller: Controller, + request: proto.cline_shengsuan.BooleanRequest, +): Promise { + const enabled = request.value + + // Update the terminal reuse setting in the state + await updateGlobalState(controller.context, "terminalReuseEnabled", enabled) + + // Broadcast state update to all webviews + await controller.postStateToWebview() + + return proto.cline_shengsuan.Empty.create({}) +} diff --git a/src/core/controller/ui/initializeWebview.ts b/src/core/controller/ui/initializeWebview.ts index f799ffa8..74f17ea1 100644 --- a/src/core/controller/ui/initializeWebview.ts +++ b/src/core/controller/ui/initializeWebview.ts @@ -1,7 +1,7 @@ import type { Controller } from "../index" import { EmptyRequest, Empty } from "@shared/proto/common" import { handleModelsServiceRequest } from "../models" -import { getAllExtensionState, getGlobalState, updateGlobalState } from "../../storage/state" +import { getAllExtensionState, getGlobalState, updateWorkspaceState } from "../../storage/state" import { sendOpenRouterModelsEvent } from "../models/subscribeToOpenRouterModels" import { sendMcpMarketplaceCatalogEvent } from "../mcp/subscribeToMcpMarketplaceCatalog" import { telemetryService } from "@/services/posthog/telemetry/TelemetryService" @@ -32,7 +32,7 @@ export async function initializeWebview(controller: Controller, request: EmptyRe // Update model info in state (this needs to be done here since we don't want to update state while settings is open, and we may refresh models there) const { apiConfiguration } = await getAllExtensionState(controller.context) if (apiConfiguration.openRouterModelId && response.models[apiConfiguration.openRouterModelId]) { - await updateGlobalState( + await updateWorkspaceState( controller.context, "openRouterModelInfo", response.models[apiConfiguration.openRouterModelId], diff --git a/src/core/controller/ui/methods.ts b/src/core/controller/ui/methods.ts index 32d36d41..21427994 100644 --- a/src/core/controller/ui/methods.ts +++ b/src/core/controller/ui/methods.ts @@ -9,6 +9,8 @@ import { scrollToSettings } from "./scrollToSettings" import { subscribeToAccountButtonClicked } from "./subscribeToAccountButtonClicked" import { subscribeToAddToInput } from "./subscribeToAddToInput" import { subscribeToChatButtonClicked } from "./subscribeToChatButtonClicked" +import { subscribeToDidBecomeVisible } from "./subscribeToDidBecomeVisible" +import { subscribeToFocusChatInput } from "./subscribeToFocusChatInput" import { subscribeToHistoryButtonClicked } from "./subscribeToHistoryButtonClicked" import { subscribeToMcpButtonClicked } from "./subscribeToMcpButtonClicked" import { subscribeToPartialMessage } from "./subscribeToPartialMessage" @@ -16,32 +18,21 @@ import { subscribeToRelinquishControl } from "./subscribeToRelinquishControl" import { subscribeToSettingsButtonClicked } from "./subscribeToSettingsButtonClicked" import { subscribeToTheme } from "./subscribeToTheme" -// Streaming methods for this service -export const streamingMethods = [ - "subscribeToAddToInput", - "subscribeToMcpButtonClicked", - "subscribeToHistoryButtonClicked", - "subscribeToChatButtonClicked", - "subscribeToAccountButtonClicked", - "subscribeToSettingsButtonClicked", - "subscribeToPartialMessage", - "subscribeToTheme", - "subscribeToRelinquishControl" -] - // Register all ui service methods export function registerAllMethods(): void { // Register each method with the registry registerMethod("initializeWebview", initializeWebview) registerMethod("onDidShowAnnouncement", onDidShowAnnouncement) registerMethod("scrollToSettings", scrollToSettings) - registerMethod("subscribeToAccountButtonClicked", subscribeToAccountButtonClicked, { isStreaming: true }) - registerMethod("subscribeToAddToInput", subscribeToAddToInput, { isStreaming: true }) - registerMethod("subscribeToChatButtonClicked", subscribeToChatButtonClicked, { isStreaming: true }) - registerMethod("subscribeToHistoryButtonClicked", subscribeToHistoryButtonClicked, { isStreaming: true }) - registerMethod("subscribeToMcpButtonClicked", subscribeToMcpButtonClicked, { isStreaming: true }) - registerMethod("subscribeToPartialMessage", subscribeToPartialMessage, { isStreaming: true }) - registerMethod("subscribeToRelinquishControl", subscribeToRelinquishControl, { isStreaming: true }) - registerMethod("subscribeToSettingsButtonClicked", subscribeToSettingsButtonClicked, { isStreaming: true }) - registerMethod("subscribeToTheme", subscribeToTheme, { isStreaming: true }) + registerMethod("subscribeToAccountButtonClicked", subscribeToAccountButtonClicked) + registerMethod("subscribeToAddToInput", subscribeToAddToInput) + registerMethod("subscribeToChatButtonClicked", subscribeToChatButtonClicked) + registerMethod("subscribeToDidBecomeVisible", subscribeToDidBecomeVisible) + registerMethod("subscribeToFocusChatInput", subscribeToFocusChatInput) + registerMethod("subscribeToHistoryButtonClicked", subscribeToHistoryButtonClicked) + registerMethod("subscribeToMcpButtonClicked", subscribeToMcpButtonClicked) + registerMethod("subscribeToPartialMessage", subscribeToPartialMessage) + registerMethod("subscribeToRelinquishControl", subscribeToRelinquishControl) + registerMethod("subscribeToSettingsButtonClicked", subscribeToSettingsButtonClicked) + registerMethod("subscribeToTheme", subscribeToTheme) } \ No newline at end of file diff --git a/src/core/controller/ui/subscribeToDidBecomeVisible.ts b/src/core/controller/ui/subscribeToDidBecomeVisible.ts new file mode 100644 index 00000000..ff307906 --- /dev/null +++ b/src/core/controller/ui/subscribeToDidBecomeVisible.ts @@ -0,0 +1,63 @@ +import { Controller } from "../index" +import { Empty } from "@shared/proto/common" +import { EmptyRequest } from "@shared/proto/common" +import { StreamingResponseHandler, getRequestRegistry } from "../grpc-handler" + +// Keep track of active didBecomeVisible subscriptions by controller ID +const activeDidBecomeVisibleSubscriptions = new Map() + +/** + * Subscribe to didBecomeVisible events + * @param controller The controller instance + * @param request The empty request + * @param responseStream The streaming response handler + * @param requestId The ID of the request (passed by the gRPC handler) + */ +export async function subscribeToDidBecomeVisible( + controller: Controller, + request: EmptyRequest, + responseStream: StreamingResponseHandler, + requestId?: string, +): Promise { + const controllerId = controller.id + console.log(`[DEBUG] set up didBecomeVisible subscription for controller ${controllerId}`) + + // Add this subscription to the active subscriptions with the controller ID + activeDidBecomeVisibleSubscriptions.set(controllerId, responseStream) + + // Register cleanup when the connection is closed + const cleanup = () => { + activeDidBecomeVisibleSubscriptions.delete(controllerId) + } + + // Register the cleanup function with the request registry if we have a requestId + if (requestId) { + getRequestRegistry().registerRequest(requestId, cleanup, { type: "didBecomeVisible_subscription" }, responseStream) + } +} + +/** + * Send a didBecomeVisible event to a specific controller's subscription + * @param controllerId The ID of the controller to send the event to + */ +export async function sendDidBecomeVisibleEvent(controllerId: string): Promise { + // Get the subscription for this specific controller + const responseStream = activeDidBecomeVisibleSubscriptions.get(controllerId) + + if (!responseStream) { + console.log(`[DEBUG] No active subscription for controller ${controllerId}`) + return + } + + try { + const event: Empty = Empty.create({}) + await responseStream( + event, + false, // Not the last message + ) + } catch (error) { + console.error(`Error sending didBecomeVisible event to controller ${controllerId}:`, error) + // Remove the subscription if there was an error + activeDidBecomeVisibleSubscriptions.delete(controllerId) + } +} diff --git a/src/core/controller/ui/subscribeToFocusChatInput.ts b/src/core/controller/ui/subscribeToFocusChatInput.ts new file mode 100644 index 00000000..16388180 --- /dev/null +++ b/src/core/controller/ui/subscribeToFocusChatInput.ts @@ -0,0 +1,62 @@ +import { StringRequest, Empty } from "@shared/proto/common" +import { StreamingResponseHandler, getRequestRegistry } from "../grpc-handler" +import type { Controller } from "../index" + +// Map client IDs to their subscription handlers +const focusChatInputSubscriptions = new Map() + +/** + * Subscribe to focus chat input events + * @param controller The controller instance + * @param request The request containing the client ID + * @param responseStream The streaming response handler + * @param requestId The ID of the request + */ +export async function subscribeToFocusChatInput( + controller: Controller, + request: StringRequest, + responseStream: StreamingResponseHandler, + requestId?: string, +): Promise { + const clientId = request.value + if (!clientId) { + throw new Error("Client ID is required for focusChatInput subscription") + } + + // Store this subscription with its client ID + focusChatInputSubscriptions.set(clientId, responseStream) + + // Register cleanup when the connection is closed + const cleanup = () => { + focusChatInputSubscriptions.delete(clientId) + } + + // Register the cleanup function with the request registry if we have a requestId + if (requestId) { + getRequestRegistry().registerRequest(requestId, cleanup, { type: "focus_chat_input_subscription" }, responseStream) + } +} + +/** + * Send a focus chat input event to a specific webview by client ID + * @param clientId The ID of the client to send the event to + */ +export async function sendFocusChatInputEvent(clientId: string): Promise { + const responseStream = focusChatInputSubscriptions.get(clientId) + if (!responseStream) { + console.warn(`No subscription found for client ID: ${clientId}`) + return + } + + try { + const event = Empty.create({}) + await responseStream( + event, + false, // Not the last message + ) + } catch (error) { + console.error(`Error sending focus chat input event to client ${clientId}:`, error) + // Remove the subscription if there was an error + focusChatInputSubscriptions.delete(clientId) + } +} diff --git a/src/core/prompts/model_prompts/claude4.ts b/src/core/prompts/model_prompts/claude4.ts index 9072dea6..5c08ced8 100644 --- a/src/core/prompts/model_prompts/claude4.ts +++ b/src/core/prompts/model_prompts/claude4.ts @@ -663,7 +663,6 @@ You accomplish a given task iteratively, breaking it down into clear steps and w } export function addUserInstructions( - settingsCustomInstructions?: string, globalClineRulesFileInstructions?: string, localClineRulesFileInstructions?: string, localCursorRulesFileInstructions?: string, @@ -676,9 +675,6 @@ export function addUserInstructions( if (preferredLanguageInstructions) { customInstructions += preferredLanguageInstructions + "\n\n" } - if (settingsCustomInstructions) { - customInstructions += settingsCustomInstructions + "\n\n" - } if (globalClineRulesFileInstructions) { customInstructions += globalClineRulesFileInstructions + "\n\n" } diff --git a/src/core/prompts/responses.ts b/src/core/prompts/responses.ts index eab7e1ae..6284e795 100644 --- a/src/core/prompts/responses.ts +++ b/src/core/prompts/responses.ts @@ -149,13 +149,14 @@ Otherwise, if you have not completed the task and do not need additional informa cwd: string, wasRecent: boolean | 0 | undefined, responseText?: string, + hasPendingFileContextWarnings?: boolean, ): [string, string] => { const taskResumptionMessage = `[TASK RESUMPTION] ${ mode === "plan" ? `This task was interrupted ${agoText}. The conversation may have been incomplete. Be aware that the project state may have changed since then. The current working directory is now '${cwd.toPosix()}'.\n\nNote: If you previously attempted a tool use that the user did not provide a result for, you should assume the tool use was not successful. However you are in PLAN MODE, so rather than continuing the task, you must respond to the user's message.` : `This task was interrupted ${agoText}. It may or may not be complete, so please reassess the task context. Be aware that the project state may have changed since then. The current working directory is now '${cwd.toPosix()}'. If the task has not been completed, retry the last step before interruption and proceed with completing the task.\n\nNote: If you previously attempted a tool use that the user did not provide a result for, you should assume the tool use was not successful and assess whether you should retry. If the last tool was a browser_action, the browser has been closed and you must launch a new browser if needed.` }${ - wasRecent + wasRecent && !hasPendingFileContextWarnings ? "\n\nIMPORTANT: If the last tool use was a replace_in_file or write_to_file that was interrupted, the file was reverted back to its original state before the interrupted edit, and you do NOT need to re-read the file as you already have its up-to-date contents." : "" }` @@ -240,6 +241,19 @@ Otherwise, if you have not completed the task and do not need additional informa cursorRulesLocalDirectoryInstructions: (cwd: string, content: string) => `# .cursor/rules\n\nThe following is provided by a root-level .cursor/rules directory where the user has specified instructions for this working directory (${cwd.toPosix()})\n\n${content}`, + + fileContextWarning: (editedFiles: string[]): string => { + const fileCount = editedFiles.length + const fileVerb = fileCount === 1 ? "file has" : "files have" + const fileDemonstrativePronoun = fileCount === 1 ? "this file" : "these files" + const filePersonalPronoun = fileCount === 1 ? "it" : "they" + + return ( + `\nCRITICAL FILE STATE ALERT: ${fileCount} ${fileVerb} been externally modified since your last interaction. Your cached understanding of ${fileDemonstrativePronoun} is now stale and unreliable. Before making ANY modifications to ${fileDemonstrativePronoun}, you must execute read_file to obtain the current state, as ${filePersonalPronoun} may contain completely different content than what you expect:\n` + + `${editedFiles.map((file) => ` ${path.resolve(file).toPosix()}`).join("\n")}\n` + + `Failure to re-read before editing will result in replace_in_file edit errors, requiring subsequent attempts and wasting tokens. You DO NOT need to re-read these files after subsequent edits, unless instructed to do so.\n` + ) + }, } // to avoid circular dependency diff --git a/src/core/prompts/system.ts b/src/core/prompts/system.ts index 51a0f97e..795c9e26 100644 --- a/src/core/prompts/system.ts +++ b/src/core/prompts/system.ts @@ -651,7 +651,6 @@ You accomplish a given task iteratively, breaking it down into clear steps and w export function addUserInstructions( - settingsCustomInstructions?: string, globalClineRulesFileInstructions?: string, localClineRulesFileInstructions?: string, localCursorRulesFileInstructions?: string, @@ -664,9 +663,6 @@ export function addUserInstructions( if (preferredLanguageInstructions) { customInstructions += preferredLanguageInstructions + "\n\n" } - if (settingsCustomInstructions) { - customInstructions += settingsCustomInstructions + "\n\n" - } if (globalClineRulesFileInstructions) { customInstructions += globalClineRulesFileInstructions + "\n\n" } diff --git a/src/core/storage/state-keys.ts b/src/core/storage/state-keys.ts index 0f8812d5..2994d14a 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -23,29 +23,24 @@ export type SecretKey = | "sambanovaApiKey" | "shengSuanYunApiKey" | "cerebrasApiKey" - | "difyApiKey" + | "sapAiCoreClientId" + | "sapAiCoreClientSecret" export type GlobalStateKey = - | "apiProvider" - | "apiModelId" | "awsRegion" | "awsUseCrossRegionInference" | "awsBedrockUsePromptCache" | "awsBedrockEndpoint" | "awsProfile" | "awsUseProfile" - | "awsBedrockCustomSelected" - | "awsBedrockCustomModelBaseId" | "vertexProjectId" | "vertexRegion" | "lastShownAnnouncementId" - | "customInstructions" | "taskHistory" | "openAiBaseUrl" | "openAiModelId" | "openAiModelInfo" | "openAiHeaders" - | "ollamaModelId" | "ollamaBaseUrl" | "ollamaApiOptionsCtxNum" | "lmStudioModelId" @@ -53,40 +48,20 @@ export type GlobalStateKey = | "anthropicBaseUrl" | "geminiBaseUrl" | "azureApiVersion" - | "openRouterModelId" - | "openRouterModelInfo" | "openRouterProviderSorting" | "autoApprovalSettings" | "globalClineRulesToggles" | "globalWorkflowToggles" | "browserSettings" - | "chatSettings" - | "vsCodeLmModelSelector" | "userInfo" - | "previousModeApiProvider" - | "previousModeModelId" - | "previousModeThinkingBudgetTokens" - | "previousModeReasoningEffort" - | "previousModeVsCodeLmModelSelector" - | "previousModeAwsBedrockCustomSelected" - | "previousModeAwsBedrockCustomModelBaseId" - | "previousModeModelInfo" | "liteLlmBaseUrl" - | "liteLlmModelId" - | "liteLlmModelInfo" | "liteLlmUsePromptCache" - | "fireworksModelId" | "fireworksModelMaxCompletionTokens" | "fireworksModelMaxTokens" | "qwenApiLine" - | "requestyModelId" - | "requestyModelInfo" - | "togetherModelId" | "mcpMarketplaceCatalog" | "telemetrySetting" | "asksageApiUrl" - | "thinkingBudgetTokens" - | "reasoningEffort" | "planActSeparateModelsSetting" | "enableCheckpointsSetting" | "mcpMarketplaceEnabled" @@ -95,10 +70,56 @@ export type GlobalStateKey = | "shellIntegrationTimeout" | "mcpResponsesCollapsed" | "terminalReuseEnabled" + | "defaultTerminalProfile" | "isNewUser" | "shengSuanYunToken" | "shengSuanYunModelId" | "shengSuanYunModelInfo" - | "difyBaseUrl" + | "terminalOutputLineLimit" + | "mcpRichDisplayEnabled" + | "sapAiCoreTokenUrl" + | "sapAiCoreBaseUrl" + | "sapAiResourceGroup" + | "sapAiCoreClientId" + | "sapAiCoreClientSecret" + | "sapAiCoreModelId" + | "claudeCodePath" -export type LocalStateKey = "localClineRulesToggles" +export type LocalStateKey = + | "localClineRulesToggles" + | "chatSettings" + // Current active model configuration (per workspace) + | "apiProvider" + | "apiModelId" + | "thinkingBudgetTokens" + | "reasoningEffort" + | "vsCodeLmModelSelector" + | "awsBedrockCustomSelected" + | "awsBedrockCustomModelBaseId" + | "openRouterModelId" + | "openRouterModelInfo" + | "openAiModelId" + | "openAiModelInfo" + | "ollamaModelId" + | "lmStudioModelId" + | "liteLlmModelId" + | "liteLlmModelInfo" + | "requestyModelId" + | "requestyModelInfo" + | "togetherModelId" + | "fireworksModelId" + // Previous mode saved configurations (per workspace) + | "previousModeApiProvider" + | "previousModeModelId" + | "previousModeModelInfo" + | "previousModeVsCodeLmModelSelector" + | "previousModeThinkingBudgetTokens" + | "previousModeReasoningEffort" + | "previousModeAwsBedrockCustomSelected" + | "previousModeAwsBedrockCustomModelBaseId" + | "previousModeSapAiCoreClientId" + | "previousModeSapAiCoreClientSecret" + | "previousModeSapAiCoreBaseUrl" + | "previousModeSapAiCoreTokenUrl" + | "previousModeSapAiCoreResourceGroup" + | "previousModeSapAiCoreModelId" diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index 5a96a254..19efb076 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -11,6 +11,9 @@ import { ChatSettings } from "@shared/ChatSettings" import { TelemetrySetting } from "@shared/TelemetrySetting" import { UserInfo } from "@shared/UserInfo" import { ClineRulesToggles } from "@shared/cline-rules" +import { ensureRulesDirectoryExists } from "./disk" +import fs from "fs/promises" +import path from "path" /* Storage https://dev.to/kompotkot/how-to-use-secretstorage-in-your-vscode-extensions-2hco @@ -51,6 +54,57 @@ export async function getWorkspaceState(context: vscode.ExtensionContext, key: s return await context.workspaceState.get(key) } +export async function migratePlanActGlobalToWorkspaceStorage(context: vscode.ExtensionContext) { + // Keys that were migrated from global storage to workspace storage + const keysToMigrate = [ + // Core settings + "apiProvider", + "apiModelId", + "thinkingBudgetTokens", + "reasoningEffort", + "chatSettings", + "vsCodeLmModelSelector", + + // Provider-specific model keys + "awsBedrockCustomSelected", + "awsBedrockCustomModelBaseId", + "openRouterModelId", + "openRouterModelInfo", + "openAiModelId", + "openAiModelInfo", + "ollamaModelId", + "lmStudioModelId", + "liteLlmModelId", + "liteLlmModelInfo", + "requestyModelId", + "requestyModelInfo", + "togetherModelId", + "fireworksModelId", + + // Previous mode settings + "previousModeApiProvider", + "previousModeModelId", + "previousModeModelInfo", + "previousModeVsCodeLmModelSelector", + "previousModeThinkingBudgetTokens", + "previousModeReasoningEffort", + "previousModeAwsBedrockCustomSelected", + "previousModeAwsBedrockCustomModelBaseId", + ] + + for (const key of keysToMigrate) { + const globalValue = await getGlobalState(context, key as GlobalStateKey) + if (globalValue !== undefined) { + const workspaceValue = await getWorkspaceState(context, key) + if (workspaceValue === undefined) { + await updateWorkspaceState(context, key, globalValue) + } + // Delete from global storage regardless of whether we copied it + await updateGlobalState(context, key as GlobalStateKey, undefined) + } + } +} + async function migrateMcpMarketplaceEnableSetting(mcpMarketplaceEnabledRaw: boolean | undefined): Promise { const config = vscode.workspace.getConfiguration("cline") const mcpMarketplaceEnabled = config.get("mcpMarketplace.enabled") @@ -74,11 +128,54 @@ async function migrateEnableCheckpointsSetting(enableCheckpointsSettingRaw: bool return enableCheckpointsSettingRaw ?? true } +export async function migrateCustomInstructionsToGlobalRules(context: vscode.ExtensionContext) { + try { + const customInstructions = (await context.globalState.get("customInstructions")) as string | undefined + + if (customInstructions?.trim()) { + console.log("Migrating custom instructions to global Cline rules...") + + // Create global .clinerules directory if it doesn't exist + const globalRulesDir = await ensureRulesDirectoryExists() + + // Use a fixed filename for custom instructions + const migrationFileName = "custom_instructions.md" + const migrationFilePath = path.join(globalRulesDir, migrationFileName) + + try { + // Check if file already exists to determine if we should append + let existingContent = "" + try { + existingContent = await fs.readFile(migrationFilePath, "utf8") + } catch (readError) { + // File doesn't exist, which is fine + } + + // Append or create the file with custom instructions + const contentToWrite = existingContent + ? `${existingContent}\n\n---\n\n${customInstructions.trim()}` + : customInstructions.trim() + + await fs.writeFile(migrationFilePath, contentToWrite) + console.log(`Successfully ${existingContent ? "appended to" : "created"} migration file: ${migrationFilePath}`) + } catch (fileError) { + console.error("Failed to write migration file:", fileError) + return + } + + // Remove customInstructions from global state only after successful file creation + await context.globalState.update("customInstructions", undefined) + console.log("Successfully migrated custom instructions to global Cline rules") + } + } catch (error) { + console.error("Failed to migrate custom instructions to global rules:", error) + // Continue execution - migration failure shouldn't break extension startup + } +} + export async function getAllExtensionState(context: vscode.ExtensionContext) { const [ isNewUser, - storedApiProvider, - apiModelId, apiKey, openRouterApiKey, clineApiKey, @@ -91,19 +188,13 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { awsBedrockEndpoint, awsProfile, awsUseProfile, - awsBedrockCustomSelected, - awsBedrockCustomModelBaseId, vertexProjectId, vertexRegion, openAiBaseUrl, openAiApiKey, - openAiModelId, - openAiModelInfo, openAiHeaders, - ollamaModelId, ollamaBaseUrl, ollamaApiOptionsCtxNum, - lmStudioModelId, lmStudioBaseUrl, anthropicBaseUrl, geminiApiKey, @@ -111,49 +202,28 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { openAiNativeApiKey, deepSeekApiKey, requestyApiKey, - requestyModelId, - requestyModelInfo, togetherApiKey, - togetherModelId, qwenApiKey, doubaoApiKey, mistralApiKey, azureApiVersion, - openRouterModelId, - openRouterModelInfo, openRouterProviderSorting, lastShownAnnouncementId, - customInstructions, taskHistory, autoApprovalSettings, browserSettings, - chatSettings, - vsCodeLmModelSelector, liteLlmBaseUrl, - liteLlmModelId, - liteLlmModelInfo, liteLlmUsePromptCache, fireworksApiKey, - fireworksModelId, fireworksModelMaxCompletionTokens, fireworksModelMaxTokens, userInfo, - previousModeApiProvider, - previousModeModelId, - previousModeModelInfo, - previousModeVsCodeLmModelSelector, - previousModeThinkingBudgetTokens, - previousModeReasoningEffort, - previousModeAwsBedrockCustomSelected, - previousModeAwsBedrockCustomModelBaseId, qwenApiLine, liteLlmApiKey, telemetrySetting, asksageApiKey, asksageApiUrl, xaiApiKey, - thinkingBudgetTokens, - reasoningEffort, sambanovaApiKey, shengSuanYunApiKey, cerebrasApiKey, @@ -168,15 +238,21 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { shengSuanYunModelInfo, enableCheckpointsSettingRaw, mcpMarketplaceEnabledRaw, + mcpRichDisplayEnabled, mcpResponsesCollapsedRaw, globalWorkflowToggles, terminalReuseEnabled, - difyApiKey, - difyBaseUrl, + terminalOutputLineLimit, + defaultTerminalProfile, + sapAiCoreClientId, + sapAiCoreClientSecret, + sapAiCoreBaseUrl, + sapAiCoreTokenUrl, + sapAiResourceGroup, + sapAiCoreModelId, + claudeCodePath, ] = await Promise.all([ getGlobalState(context, "isNewUser") as Promise, - getGlobalState(context, "apiProvider") as Promise, - getGlobalState(context, "apiModelId") as Promise, getSecret(context, "apiKey") as Promise, getSecret(context, "openRouterApiKey") as Promise, getSecret(context, "clineApiKey") as Promise, @@ -189,19 +265,13 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "awsBedrockEndpoint") as Promise, getGlobalState(context, "awsProfile") as Promise, getGlobalState(context, "awsUseProfile") as Promise, - getGlobalState(context, "awsBedrockCustomSelected") as Promise, - getGlobalState(context, "awsBedrockCustomModelBaseId") as Promise, getGlobalState(context, "vertexProjectId") as Promise, getGlobalState(context, "vertexRegion") as Promise, getGlobalState(context, "openAiBaseUrl") as Promise, getSecret(context, "openAiApiKey") as Promise, - getGlobalState(context, "openAiModelId") as Promise, - getGlobalState(context, "openAiModelInfo") as Promise, getGlobalState(context, "openAiHeaders") as Promise | undefined>, - getGlobalState(context, "ollamaModelId") as Promise, getGlobalState(context, "ollamaBaseUrl") as Promise, getGlobalState(context, "ollamaApiOptionsCtxNum") as Promise, - getGlobalState(context, "lmStudioModelId") as Promise, getGlobalState(context, "lmStudioBaseUrl") as Promise, getGlobalState(context, "anthropicBaseUrl") as Promise, getSecret(context, "geminiApiKey") as Promise, @@ -209,49 +279,28 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getSecret(context, "openAiNativeApiKey") as Promise, getSecret(context, "deepSeekApiKey") as Promise, getSecret(context, "requestyApiKey") as Promise, - getGlobalState(context, "requestyModelId") as Promise, - getGlobalState(context, "requestyModelInfo") as Promise, getSecret(context, "togetherApiKey") as Promise, - getGlobalState(context, "togetherModelId") as Promise, getSecret(context, "qwenApiKey") as Promise, getSecret(context, "doubaoApiKey") as Promise, getSecret(context, "mistralApiKey") as Promise, getGlobalState(context, "azureApiVersion") as Promise, - getGlobalState(context, "openRouterModelId") as Promise, - getGlobalState(context, "openRouterModelInfo") as Promise, getGlobalState(context, "openRouterProviderSorting") as Promise, getGlobalState(context, "lastShownAnnouncementId") as Promise, - getGlobalState(context, "customInstructions") as Promise, getGlobalState(context, "taskHistory") as Promise, getGlobalState(context, "autoApprovalSettings") as Promise, getGlobalState(context, "browserSettings") as Promise, - getGlobalState(context, "chatSettings") as Promise, - getGlobalState(context, "vsCodeLmModelSelector") as Promise, getGlobalState(context, "liteLlmBaseUrl") as Promise, - getGlobalState(context, "liteLlmModelId") as Promise, - getGlobalState(context, "liteLlmModelInfo") as Promise, getGlobalState(context, "liteLlmUsePromptCache") as Promise, getSecret(context, "fireworksApiKey") as Promise, - getGlobalState(context, "fireworksModelId") as Promise, getGlobalState(context, "fireworksModelMaxCompletionTokens") as Promise, getGlobalState(context, "fireworksModelMaxTokens") as Promise, getGlobalState(context, "userInfo") as Promise, - getGlobalState(context, "previousModeApiProvider") as Promise, - getGlobalState(context, "previousModeModelId") as Promise, - getGlobalState(context, "previousModeModelInfo") as Promise, - getGlobalState(context, "previousModeVsCodeLmModelSelector") as Promise, - getGlobalState(context, "previousModeThinkingBudgetTokens") as Promise, - getGlobalState(context, "previousModeReasoningEffort") as Promise, - getGlobalState(context, "previousModeAwsBedrockCustomSelected") as Promise, - getGlobalState(context, "previousModeAwsBedrockCustomModelBaseId") as Promise, getGlobalState(context, "qwenApiLine") as Promise, getSecret(context, "liteLlmApiKey") as Promise, getGlobalState(context, "telemetrySetting") as Promise, getSecret(context, "asksageApiKey") as Promise, getGlobalState(context, "asksageApiUrl") as Promise, getSecret(context, "xaiApiKey") as Promise, - getGlobalState(context, "thinkingBudgetTokens") as Promise, - getGlobalState(context, "reasoningEffort") as Promise, getSecret(context, "sambanovaApiKey") as Promise, getSecret(context, "shengSuanYunApiKey") as Promise, getSecret(context, "cerebrasApiKey") as Promise, @@ -266,11 +315,93 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "shengSuanYunModelInfo") as Promise, getGlobalState(context, "enableCheckpointsSetting") as Promise, getGlobalState(context, "mcpMarketplaceEnabled") as Promise, + getGlobalState(context, "mcpRichDisplayEnabled") as Promise, getGlobalState(context, "mcpResponsesCollapsed") as Promise, getGlobalState(context, "globalWorkflowToggles") as Promise, getGlobalState(context, "terminalReuseEnabled") as Promise, - getSecret(context, "difyApiKey") as Promise, - getGlobalState(context, "difyBaseUrl") as Promise, + getGlobalState(context, "terminalOutputLineLimit") as Promise, + getGlobalState(context, "defaultTerminalProfile") as Promise, + getSecret(context, "sapAiCoreClientId") as Promise, + getSecret(context, "sapAiCoreClientSecret") as Promise, + getGlobalState(context, "sapAiCoreBaseUrl") as Promise, + getGlobalState(context, "sapAiCoreTokenUrl") as Promise, + getGlobalState(context, "sapAiResourceGroup") as Promise, + getGlobalState(context, "sapAiCoreModelId") as Promise, + getGlobalState(context, "claudeCodePath") as Promise, + ]) + + const localClineRulesToggles = (await getWorkspaceState(context, "localClineRulesToggles")) as ClineRulesToggles + + const [ + chatSettings, + storedApiProvider, + apiModelId, + thinkingBudgetTokens, + reasoningEffort, + vsCodeLmModelSelector, + awsBedrockCustomSelected, + awsBedrockCustomModelBaseId, + openRouterModelId, + openRouterModelInfo, + openAiModelId, + openAiModelInfo, + ollamaModelId, + lmStudioModelId, + liteLlmModelId, + liteLlmModelInfo, + requestyModelId, + requestyModelInfo, + togetherModelId, + fireworksModelId, + previousModeApiProvider, + previousModeModelId, + previousModeModelInfo, + previousModeVsCodeLmModelSelector, + previousModeThinkingBudgetTokens, + previousModeReasoningEffort, + previousModeAwsBedrockCustomSelected, + previousModeAwsBedrockCustomModelBaseId, + previousModeSapAiCoreClientId, + previousModeSapAiCoreClientSecret, + previousModeSapAiCoreBaseUrl, + previousModeSapAiCoreTokenUrl, + previousModeSapAiCoreResourceGroup, + previousModeSapAiCoreModelId, + ] = await Promise.all([ + getWorkspaceState(context, "chatSettings") as Promise, + getWorkspaceState(context, "apiProvider") as Promise, + getWorkspaceState(context, "apiModelId") as Promise, + getWorkspaceState(context, "thinkingBudgetTokens") as Promise, + getWorkspaceState(context, "reasoningEffort") as Promise, + getWorkspaceState(context, "vsCodeLmModelSelector") as Promise, + getWorkspaceState(context, "awsBedrockCustomSelected") as Promise, + getWorkspaceState(context, "awsBedrockCustomModelBaseId") as Promise, + getWorkspaceState(context, "openRouterModelId") as Promise, + getWorkspaceState(context, "openRouterModelInfo") as Promise, + getWorkspaceState(context, "openAiModelId") as Promise, + getWorkspaceState(context, "openAiModelInfo") as Promise, + getWorkspaceState(context, "ollamaModelId") as Promise, + getWorkspaceState(context, "lmStudioModelId") as Promise, + getWorkspaceState(context, "liteLlmModelId") as Promise, + getWorkspaceState(context, "liteLlmModelInfo") as Promise, + getWorkspaceState(context, "requestyModelId") as Promise, + getWorkspaceState(context, "requestyModelInfo") as Promise, + getWorkspaceState(context, "togetherModelId") as Promise, + getWorkspaceState(context, "fireworksModelId") as Promise, + getWorkspaceState(context, "previousModeApiProvider") as Promise, + getWorkspaceState(context, "previousModeModelId") as Promise, + getWorkspaceState(context, "previousModeModelInfo") as Promise, + getWorkspaceState(context, "previousModeVsCodeLmModelSelector") as Promise, + getWorkspaceState(context, "previousModeThinkingBudgetTokens") as Promise, + getWorkspaceState(context, "previousModeReasoningEffort") as Promise, + getWorkspaceState(context, "previousModeAwsBedrockCustomSelected") as Promise, + getWorkspaceState(context, "previousModeAwsBedrockCustomModelBaseId") as Promise, + getWorkspaceState(context, "previousModeSapAiCoreClientId") as Promise, + getWorkspaceState(context, "previousModeSapAiCoreClientSecret") as Promise, + getWorkspaceState(context, "previousModeSapAiCoreBaseUrl") as Promise, + getWorkspaceState(context, "previousModeSapAiCoreTokenUrl") as Promise, + getWorkspaceState(context, "previousModeSapAiCoreResourceGroup") as Promise, + getWorkspaceState(context, "previousModeSapAiCoreModelId") as Promise, ]) let apiProvider: ApiProvider @@ -287,8 +418,6 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { } } - const localClineRulesToggles = (await getWorkspaceState(context, "localClineRulesToggles")) as ClineRulesToggles - const mcpMarketplaceEnabled = await migrateMcpMarketplaceEnableSetting(mcpMarketplaceEnabledRaw) const enableCheckpointsSetting = await migrateEnableCheckpointsSetting(enableCheckpointsSettingRaw) const mcpResponsesCollapsed = mcpResponsesCollapsedRaw ?? false @@ -318,6 +447,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { apiKey, openRouterApiKey, clineApiKey, + claudeCodePath, awsAccessKey, awsSecretKey, awsSessionToken, @@ -383,12 +513,15 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { shengSuanYunToken, shengSuanYunModelId, shengSuanYunModelInfo, - difyApiKey, - difyBaseUrl, + sapAiCoreClientId, + sapAiCoreClientSecret, + sapAiCoreBaseUrl, + sapAiCoreTokenUrl, + sapAiResourceGroup, + sapAiCoreModelId, }, isNewUser: isNewUser ?? true, lastShownAnnouncementId, - customInstructions, taskHistory, autoApprovalSettings: autoApprovalSettings || DEFAULT_AUTO_APPROVAL_SETTINGS, // default value can be 0 or empty string globalClineRulesToggles: globalClineRulesToggles || {}, @@ -407,13 +540,22 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { previousModeReasoningEffort, previousModeAwsBedrockCustomSelected, previousModeAwsBedrockCustomModelBaseId, + previousModeSapAiCoreClientId, + previousModeSapAiCoreClientSecret, + previousModeSapAiCoreBaseUrl, + previousModeSapAiCoreTokenUrl, + previousModeSapAiCoreResourceGroup, + previousModeSapAiCoreModelId, mcpMarketplaceEnabled: mcpMarketplaceEnabled, + mcpRichDisplayEnabled: mcpRichDisplayEnabled ?? true, mcpResponsesCollapsed: mcpResponsesCollapsed, telemetrySetting: telemetrySetting || "unset", planActSeparateModelsSetting, enableCheckpointsSetting: enableCheckpointsSetting, shellIntegrationTimeout: shellIntegrationTimeout || 4000, terminalReuseEnabled: terminalReuseEnabled ?? true, + terminalOutputLineLimit: terminalOutputLineLimit ?? 500, + defaultTerminalProfile: defaultTerminalProfile ?? "default", globalWorkflowToggles: globalWorkflowToggles || {}, } } @@ -485,39 +627,82 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a shengSuanYunToken, shengSuanYunModelId, shengSuanYunModelInfo, - difyApiKey, - difyBaseUrl, + fireworksApiKey, + fireworksModelId, + fireworksModelMaxCompletionTokens, + fireworksModelMaxTokens, + sapAiCoreClientId, + sapAiCoreClientSecret, + sapAiCoreBaseUrl, + sapAiCoreTokenUrl, + sapAiResourceGroup, + sapAiCoreModelId, + claudeCodePath, } = apiConfiguration - await updateGlobalState(context, "apiProvider", apiProvider) - await updateGlobalState(context, "apiModelId", apiModelId) - await storeSecret(context, "apiKey", apiKey) - await storeSecret(context, "openRouterApiKey", openRouterApiKey) - await storeSecret(context, "awsAccessKey", awsAccessKey) - await storeSecret(context, "awsSecretKey", awsSecretKey) - await storeSecret(context, "awsSessionToken", awsSessionToken) + // Workspace state updates + await updateWorkspaceState(context, "apiProvider", apiProvider) + await updateWorkspaceState(context, "apiModelId", apiModelId) + await updateWorkspaceState(context, "thinkingBudgetTokens", thinkingBudgetTokens) + await updateWorkspaceState(context, "reasoningEffort", reasoningEffort) + await updateWorkspaceState(context, "vsCodeLmModelSelector", vsCodeLmModelSelector) + await updateWorkspaceState(context, "awsBedrockCustomSelected", awsBedrockCustomSelected) + await updateWorkspaceState(context, "awsBedrockCustomModelBaseId", awsBedrockCustomModelBaseId) + await updateWorkspaceState(context, "openRouterModelId", openRouterModelId) + await updateWorkspaceState(context, "openRouterModelInfo", openRouterModelInfo) + await updateWorkspaceState(context, "openAiModelId", openAiModelId) + await updateWorkspaceState(context, "openAiModelInfo", openAiModelInfo) + await updateWorkspaceState(context, "ollamaModelId", ollamaModelId) + await updateWorkspaceState(context, "lmStudioModelId", lmStudioModelId) + await updateWorkspaceState(context, "liteLlmModelId", liteLlmModelId) + await updateWorkspaceState(context, "liteLlmModelInfo", liteLlmModelInfo) + await updateWorkspaceState(context, "requestyModelId", requestyModelId) + await updateWorkspaceState(context, "requestyModelInfo", requestyModelInfo) + await updateWorkspaceState(context, "togetherModelId", togetherModelId) + await updateWorkspaceState(context, "fireworksModelId", fireworksModelId) + + // Global state updates await updateGlobalState(context, "awsRegion", awsRegion) await updateGlobalState(context, "awsUseCrossRegionInference", awsUseCrossRegionInference) await updateGlobalState(context, "awsBedrockUsePromptCache", awsBedrockUsePromptCache) await updateGlobalState(context, "awsBedrockEndpoint", awsBedrockEndpoint) await updateGlobalState(context, "awsProfile", awsProfile) await updateGlobalState(context, "awsUseProfile", awsUseProfile) - await updateGlobalState(context, "awsBedrockCustomSelected", awsBedrockCustomSelected) - await updateGlobalState(context, "awsBedrockCustomModelBaseId", awsBedrockCustomModelBaseId) await updateGlobalState(context, "vertexProjectId", vertexProjectId) await updateGlobalState(context, "vertexRegion", vertexRegion) await updateGlobalState(context, "openAiBaseUrl", openAiBaseUrl) - await storeSecret(context, "openAiApiKey", openAiApiKey) - await updateGlobalState(context, "openAiModelId", openAiModelId) - await updateGlobalState(context, "openAiModelInfo", openAiModelInfo) await updateGlobalState(context, "openAiHeaders", openAiHeaders || {}) - await updateGlobalState(context, "ollamaModelId", ollamaModelId) await updateGlobalState(context, "ollamaBaseUrl", ollamaBaseUrl) await updateGlobalState(context, "ollamaApiOptionsCtxNum", ollamaApiOptionsCtxNum) - await updateGlobalState(context, "lmStudioModelId", lmStudioModelId) await updateGlobalState(context, "lmStudioBaseUrl", lmStudioBaseUrl) await updateGlobalState(context, "anthropicBaseUrl", anthropicBaseUrl) - await storeSecret(context, "geminiApiKey", geminiApiKey) await updateGlobalState(context, "geminiBaseUrl", geminiBaseUrl) + await updateGlobalState(context, "azureApiVersion", azureApiVersion) + await updateGlobalState(context, "openRouterProviderSorting", openRouterProviderSorting) + await updateGlobalState(context, "liteLlmBaseUrl", liteLlmBaseUrl) + await updateGlobalState(context, "liteLlmUsePromptCache", liteLlmUsePromptCache) + await updateGlobalState(context, "qwenApiLine", qwenApiLine) + await updateGlobalState(context, "asksageApiUrl", asksageApiUrl) + await updateGlobalState(context, "favoritedModelIds", favoritedModelIds) + await updateGlobalState(context, "requestTimeoutMs", apiConfiguration.requestTimeoutMs) + await updateGlobalState(context, "fireworksModelMaxCompletionTokens", fireworksModelMaxCompletionTokens) + await updateGlobalState(context, "fireworksModelMaxTokens", fireworksModelMaxTokens) + await updateGlobalState(context, "favoritedModelIds", favoritedModelIds) + await updateGlobalState(context, "requestTimeoutMs", apiConfiguration.requestTimeoutMs) + await updateGlobalState(context, "sapAiCoreBaseUrl", sapAiCoreBaseUrl) + await updateGlobalState(context, "sapAiCoreTokenUrl", sapAiCoreTokenUrl) + await updateGlobalState(context, "sapAiResourceGroup", sapAiResourceGroup) + await updateGlobalState(context, "sapAiCoreModelId", sapAiCoreModelId) + await updateGlobalState(context, "claudeCodePath", claudeCodePath) + + // Secret updates + await storeSecret(context, "apiKey", apiKey) + await storeSecret(context, "openRouterApiKey", openRouterApiKey) + await storeSecret(context, "clineApiKey", clineApiKey) + await storeSecret(context, "awsAccessKey", awsAccessKey) + await storeSecret(context, "awsSecretKey", awsSecretKey) + await storeSecret(context, "awsSessionToken", awsSessionToken) + await storeSecret(context, "openAiApiKey", openAiApiKey) + await storeSecret(context, "geminiApiKey", geminiApiKey) await storeSecret(context, "openAiNativeApiKey", openAiNativeApiKey) await storeSecret(context, "deepSeekApiKey", deepSeekApiKey) await storeSecret(context, "requestyApiKey", requestyApiKey) @@ -526,39 +711,28 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a await storeSecret(context, "doubaoApiKey", doubaoApiKey) await storeSecret(context, "mistralApiKey", mistralApiKey) await storeSecret(context, "liteLlmApiKey", liteLlmApiKey) - await storeSecret(context, "xaiApiKey", xaiApiKey) - await updateGlobalState(context, "azureApiVersion", azureApiVersion) - await updateGlobalState(context, "openRouterModelId", openRouterModelId) - await updateGlobalState(context, "openRouterModelInfo", openRouterModelInfo) - await updateGlobalState(context, "openRouterProviderSorting", openRouterProviderSorting) - await updateGlobalState(context, "vsCodeLmModelSelector", vsCodeLmModelSelector) - await updateGlobalState(context, "liteLlmBaseUrl", liteLlmBaseUrl) - await updateGlobalState(context, "liteLlmModelId", liteLlmModelId) - await updateGlobalState(context, "liteLlmModelInfo", liteLlmModelInfo) - await updateGlobalState(context, "liteLlmUsePromptCache", liteLlmUsePromptCache) - await updateGlobalState(context, "qwenApiLine", qwenApiLine) - await updateGlobalState(context, "requestyModelId", requestyModelId) - await updateGlobalState(context, "requestyModelInfo", requestyModelInfo) - await updateGlobalState(context, "togetherModelId", togetherModelId) + await storeSecret(context, "fireworksApiKey", fireworksApiKey) await storeSecret(context, "asksageApiKey", asksageApiKey) - await updateGlobalState(context, "asksageApiUrl", asksageApiUrl) - await updateGlobalState(context, "thinkingBudgetTokens", thinkingBudgetTokens) - await updateGlobalState(context, "reasoningEffort", reasoningEffort) - await storeSecret(context, "clineApiKey", clineApiKey) + await storeSecret(context, "xaiApiKey", xaiApiKey) await storeSecret(context, "sambanovaApiKey", sambanovaApiKey) await storeSecret(context, "cerebrasApiKey", cerebrasApiKey) await storeSecret(context, "nebiusApiKey", nebiusApiKey) - await updateGlobalState(context, "favoritedModelIds", favoritedModelIds) - await updateGlobalState(context, "requestTimeoutMs", apiConfiguration.requestTimeoutMs) await storeSecret(context, "shengSuanYunApiKey", shengSuanYunApiKey) await updateGlobalState(context, "shengSuanYunToken", shengSuanYunToken) await updateGlobalState(context, "shengSuanYunModelId", shengSuanYunModelId) await updateGlobalState(context, "shengSuanYunModelInfo", shengSuanYunModelInfo) - await storeSecret(context, "difyApiKey", difyApiKey) - await updateGlobalState(context, "difyBaseUrl", difyBaseUrl) + await storeSecret(context, "sapAiCoreClientId", sapAiCoreClientId) + await storeSecret(context, "sapAiCoreClientSecret", sapAiCoreClientSecret) } -export async function resetExtensionState(context: vscode.ExtensionContext) { +export async function resetWorkspaceState(context: vscode.ExtensionContext) { + for (const key of context.workspaceState.keys()) { + await context.workspaceState.update(key, undefined) + } +} + +export async function resetGlobalState(context: vscode.ExtensionContext) { + // TODO: Reset all workspace states? for (const key of context.globalState.keys()) { await context.globalState.update(key, undefined) } @@ -586,7 +760,6 @@ export async function resetExtensionState(context: vscode.ExtensionContext) { "shengSuanYunApiKey", "cerebrasApiKey", "nebiusApiKey", - "difyApiKey", ] for (const key of secretKeys) { await storeSecret(context, key, undefined) diff --git a/src/core/task/TaskState.ts b/src/core/task/TaskState.ts new file mode 100644 index 00000000..f84f7642 --- /dev/null +++ b/src/core/task/TaskState.ts @@ -0,0 +1,57 @@ +import { Anthropic } from "@anthropic-ai/sdk" +import { AssistantMessageContent } from "@core/assistant-message" +import { StreamingJsonReplacer } from "@core/assistant-message/diff-json" +import { ClineAskResponse } from "@shared/WebviewMessage" + +export class TaskState { + // Streaming flags + isStreaming = false + isWaitingForFirstChunk = false + didCompleteReadingStream = false + + // Content processing + currentStreamingContentIndex = 0 + assistantMessageContent: AssistantMessageContent[] = [] + userMessageContent: (Anthropic.TextBlockParam | Anthropic.ImageBlockParam)[] = [] + userMessageContentReady = false + + // Presentation locks + presentAssistantMessageLocked = false + presentAssistantMessageHasPendingUpdates = false + + // Claude 4 experimental JSON streaming + streamingJsonReplacer?: StreamingJsonReplacer + lastProcessedJsonLength: number = 0 + + // Ask/Response handling + askResponse?: ClineAskResponse + askResponseText?: string + askResponseImages?: string[] + askResponseFiles?: string[] + lastMessageTs?: number + + // Plan mode specific state + isAwaitingPlanResponse = false + didRespondToPlanAskBySwitchingMode = false + + // Tool execution flags + didRejectTool = false + didAlreadyUseTool = false + didEditFile: boolean = false + + // Consecutive request tracking + consecutiveAutoApprovedRequestsCount: number = 0 + + // Error tracking + consecutiveMistakeCount: number = 0 + didAutomaticallyRetryFailedApiRequest = false + checkpointTrackerErrorMessage?: string + + // Task Initialization + isInitialized = false + + // Task Abort / Cancellation + abort: boolean = false + didFinishAbortingStream = false + abandoned = false +} diff --git a/src/core/task/index.ts b/src/core/task/index.ts index eecb7e80..9cd0c5bd 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -1,13 +1,11 @@ import { Anthropic } from "@anthropic-ai/sdk" import cloneDeep from "clone-deep" import { execa } from "execa" -import getFolderSize from "get-folder-size" import { setTimeout as setTimeoutPromise } from "node:timers/promises" import os from "os" import pTimeout from "p-timeout" import pWaitFor from "p-wait-for" import * as path from "path" -import { serializeError } from "serialize-error" import * as vscode from "vscode" import { Logger } from "@services/logging/Logger" import { ApiHandler, buildApiHandler } from "@api/index" @@ -90,8 +88,6 @@ import { getSavedApiConversationHistory, getSavedClineMessages, GlobalFileNames, - saveApiConversationHistory, - saveClineMessages, } from "@core/storage/disk" import { getGlobalClineRules, @@ -105,14 +101,18 @@ import { getLocalCursorRules, } from "@core/context/instructions/user-instructions/external-rules" import { refreshWorkflowToggles } from "../context/instructions/user-instructions/workflows" -import { getGlobalState } from "@core/storage/state" +import { getWorkspaceState } from "@core/storage/state" import { parseSlashCommands } from "@core/slash-commands" import WorkspaceTracker from "@integrations/workspace/WorkspaceTracker" import { McpHub } from "@services/mcp/McpHub" import { isInTestMode } from "../../services/test/TestMode" import { processFilesIntoText } from "@integrations/misc/extract-text" -import { featureFlagsService } from "@services/posthog/feature-flags/FeatureFlagsService" import { StreamingJsonReplacer, ChangeLocation } from "@core/assistant-message/diff-json" +import { isClaude4ModelFamily } from "@utils/model-utils" +import { MessageStateHandler } from "./message-state" +import { formatErrorWithStatusCode, showNotificationForApprovalIfAutoApprovalEnabled, updateApiReqMsg } from "./utils" +import { serializeError } from "serialize-error" +import { TaskState } from "./TaskState" export const USE_EXPERIMENTAL_CLAUDE4_FEATURES = false @@ -123,71 +123,49 @@ type ToolResponse = string | Array export class Task { - private streamingJsonReplacer?: StreamingJsonReplacer - private lastProcessedJsonLength: number = 0 + // Core task variables + readonly taskId: string + private taskIsFavorited?: boolean - // dependencies + taskState: TaskState + + // Task configuration + private enableCheckpoints: boolean + + // Core dependencies private context: vscode.ExtensionContext private mcpHub: McpHub private workspaceTracker: WorkspaceTracker + + // Service handlers + api: ApiHandler + terminalManager: TerminalManager + private urlContentFetcher: UrlContentFetcher + browserSession: BrowserSession + contextManager: ContextManager + private diffViewProvider: DiffViewProvider + private checkpointTracker?: CheckpointTracker + private clineIgnoreController: ClineIgnoreController + + // Metadata tracking + private fileContextTracker: FileContextTracker + private modelContextTracker: ModelContextTracker + + // Callbacks private updateTaskHistory: (historyItem: HistoryItem) => Promise private postStateToWebview: () => Promise private postMessageToWebview: (message: ExtensionMessage) => Promise private reinitExistingTaskFromId: (taskId: string) => Promise private cancelTask: () => Promise - readonly taskId: string - private taskIsFavorited?: boolean - api: ApiHandler - private terminalManager: TerminalManager - private urlContentFetcher: UrlContentFetcher - browserSession: BrowserSession - contextManager: ContextManager - private didEditFile: boolean = false - customInstructions?: string + // User chat state autoApprovalSettings: AutoApprovalSettings browserSettings: BrowserSettings chatSettings: ChatSettings - apiConversationHistory: Anthropic.MessageParam[] = [] - clineMessages: ClineMessage[] = [] - private clineIgnoreController: ClineIgnoreController - private askResponse?: ClineAskResponse - private askResponseText?: string - private askResponseImages?: string[] - private askResponseFiles?: string[] - private lastMessageTs?: number - private consecutiveAutoApprovedRequestsCount: number = 0 - private consecutiveMistakeCount: number = 0 - private abort: boolean = false - didFinishAbortingStream = false - abandoned = false - private diffViewProvider: DiffViewProvider - private checkpointTracker?: CheckpointTracker - checkpointTrackerErrorMessage?: string + + // Message and conversation state + messageStateHandler: MessageStateHandler conversationHistoryDeletedRange?: [number, number] - isInitialized = false - private initTaskPromise?: Promise - isAwaitingPlanResponse = false - didRespondToPlanAskBySwitchingMode = false - - // Metadata tracking - private fileContextTracker: FileContextTracker - private modelContextTracker: ModelContextTracker - - // streaming - isWaitingForFirstChunk = false - isStreaming = false - private currentStreamingContentIndex = 0 - private assistantMessageContent: AssistantMessageContent[] = [] - private presentAssistantMessageLocked = false - private presentAssistantMessageHasPendingUpdates = false - private userMessageContent: (Anthropic.TextBlockParam | Anthropic.ImageBlockParam)[] = [] - private userMessageContentReady = false - private didRejectTool = false - private didAlreadyUseTool = false - private didCompleteReadingStream = false - private didAutomaticallyRetryFailedApiRequest = false - private enableCheckpoints: boolean constructor( context: vscode.ExtensionContext, @@ -204,13 +182,15 @@ export class Task { chatSettings: ChatSettings, shellIntegrationTimeout: number, terminalReuseEnabled: boolean, + terminalOutputLineLimit: number, + defaultTerminalProfile: string, enableCheckpointsSetting: boolean, - customInstructions?: string, task?: string, images?: string[], files?: string[], historyItem?: HistoryItem, ) { + this.taskState = new TaskState() this.context = context this.mcpHub = mcpHub this.workspaceTracker = workspaceTracker @@ -224,16 +204,23 @@ export class Task { this.terminalManager = new TerminalManager() this.terminalManager.setShellIntegrationTimeout(shellIntegrationTimeout) this.terminalManager.setTerminalReuseEnabled(terminalReuseEnabled ?? true) + this.terminalManager.setTerminalOutputLineLimit(terminalOutputLineLimit) + this.terminalManager.setDefaultTerminalProfile(defaultTerminalProfile) this.urlContentFetcher = new UrlContentFetcher(context) this.browserSession = new BrowserSession(context, browserSettings) this.contextManager = new ContextManager() this.diffViewProvider = new DiffViewProvider(cwd) - this.customInstructions = customInstructions this.autoApprovalSettings = autoApprovalSettings this.browserSettings = browserSettings this.chatSettings = chatSettings this.enableCheckpoints = enableCheckpointsSetting + // Set up MCP notification callback for real-time notifications + this.mcpHub.setNotificationCallback(async (serverName: string, level: string, message: string) => { + // Display notification in chat immediately + await this.say("mcp_notification", `[${serverName}] ${message}`) + }) + // Initialize taskId first if (historyItem) { this.taskId = historyItem.id @@ -245,6 +232,14 @@ export class Task { throw new Error("Either historyItem or task/images must be provided") } + this.messageStateHandler = new MessageStateHandler({ + context, + taskId: this.taskId, + conversationHistoryDeletedRange: this.conversationHistoryDeletedRange, + taskIsFavorited: this.taskIsFavorited, + updateTaskHistory: this.updateTaskHistory, + }) + // Initialize file context tracker this.fileContextTracker = new FileContextTracker(context, this.taskId) this.modelContextTracker = new ModelContextTracker(context, this.taskId) @@ -253,13 +248,12 @@ export class Task { let effectiveApiConfiguration: ApiConfiguration = { ...apiConfiguration, taskId: this.taskId, - onRetryAttempt: (attempt: number, maxRetries: number, delay: number, error: any) => { - const lastApiReqStartedIndex = findLastIndex(this.clineMessages, (m) => m.say === "api_req_started") + onRetryAttempt: async (attempt: number, maxRetries: number, delay: number, error: any) => { + const clineMessages = this.messageStateHandler.getClineMessages() + const lastApiReqStartedIndex = findLastIndex(clineMessages, (m) => m.say === "api_req_started") if (lastApiReqStartedIndex !== -1) { try { - const currentApiReqInfo: ClineApiReqInfo = JSON.parse( - this.clineMessages[lastApiReqStartedIndex].text || "{}", - ) + const currentApiReqInfo: ClineApiReqInfo = JSON.parse(clineMessages[lastApiReqStartedIndex].text || "{}") currentApiReqInfo.retryStatus = { attempt: attempt, // attempt is already 1-indexed from retry.ts maxAttempts: maxRetries, // total attempts @@ -269,10 +263,12 @@ export class Task { // Clear previous cancelReason and streamingFailedMessage if we are retrying delete currentApiReqInfo.cancelReason delete currentApiReqInfo.streamingFailedMessage - this.clineMessages[lastApiReqStartedIndex].text = JSON.stringify(currentApiReqInfo) + await this.messageStateHandler.updateClineMessage(lastApiReqStartedIndex, { + text: JSON.stringify(currentApiReqInfo), + }) // Post the updated state to the webview so the UI reflects the retry attempt - this.postStateToWebview().catch((e) => + await this.postStateToWebview().catch((e) => console.error("Error posting state to webview in onRetryAttempt:", e), ) @@ -298,9 +294,9 @@ export class Task { // Continue with task initialization if (historyItem) { - this.initTaskPromise = this.resumeTaskFromHistory() + this.resumeTaskFromHistory() } else if (task || images || files) { - this.initTaskPromise = this.startTask(task, images, files) + this.startTask(task, images, files) } // initialize telemetry @@ -323,84 +319,16 @@ export class Task { return context } - // Storing task to disk for history - private async addToApiConversationHistory(message: Anthropic.MessageParam) { - this.apiConversationHistory.push(message) - await saveApiConversationHistory(this.getContext(), this.taskId, this.apiConversationHistory) - } - - private async overwriteApiConversationHistory(newHistory: Anthropic.MessageParam[]) { - this.apiConversationHistory = newHistory - await saveApiConversationHistory(this.getContext(), this.taskId, this.apiConversationHistory) - } - - private async addToClineMessages(message: ClineMessage) { - // these values allow us to reconstruct the conversation history at the time this cline message was created - // it's important that apiConversationHistory is initialized before we add cline messages - message.conversationHistoryIndex = this.apiConversationHistory.length - 1 // NOTE: this is the index of the last added message which is the user message, and once the clinemessages have been presented we update the apiconversationhistory with the completed assistant message. This means when resetting to a message, we need to +1 this index to get the correct assistant message that this tool use corresponds to - message.conversationHistoryDeletedRange = this.conversationHistoryDeletedRange - this.clineMessages.push(message) - await this.saveClineMessagesAndUpdateHistory() - } - - private async overwriteClineMessages(newMessages: ClineMessage[]) { - this.clineMessages = newMessages - await this.saveClineMessagesAndUpdateHistory() - } - - private async saveClineMessagesAndUpdateHistory() { - try { - await saveClineMessages(this.getContext(), this.taskId, this.clineMessages) - - // combined as they are in ChatView - const apiMetrics = getApiMetrics(combineApiRequests(combineCommandSequences(this.clineMessages.slice(1)))) - const taskMessage = this.clineMessages[0] // first message is always the task say - const lastRelevantMessage = - this.clineMessages[ - findLastIndex(this.clineMessages, (m) => !(m.ask === "resume_task" || m.ask === "resume_completed_task")) - ] - const taskDir = await ensureTaskDirectoryExists(this.getContext(), this.taskId) - let taskDirSize = 0 - try { - // getFolderSize.loose silently ignores errors - // returns # of bytes, size/1000/1000 = MB - taskDirSize = await getFolderSize.loose(taskDir) - } catch (error) { - console.error("Failed to get task directory size:", taskDir, error) - } - await this.updateTaskHistory({ - id: this.taskId, - ts: lastRelevantMessage.ts, - task: taskMessage.text ?? "", - tokensIn: apiMetrics.totalTokensIn, - tokensOut: apiMetrics.totalTokensOut, - cacheWrites: apiMetrics.totalCacheWrites, - cacheReads: apiMetrics.totalCacheReads, - totalCost: apiMetrics.totalCost, - size: taskDirSize, - shadowGitConfigWorkTree: await this.checkpointTracker?.getShadowGitConfigWorkTree(), - cwdOnTaskInitialization: cwd, - conversationHistoryDeletedRange: this.conversationHistoryDeletedRange, - isFavorited: this.taskIsFavorited, - }) - } catch (error) { - console.error("Failed to save cline messages:", error) - } - } - async restoreCheckpoint(messageTs: number, restoreType: ClineCheckpointRestore, offset?: number) { - if (this.initTaskPromise && !this.isInitialized) { - await this.initTaskPromise - } - - const messageIndex = this.clineMessages.findIndex((m) => m.ts === messageTs) - (offset || 0) + const clineMessages = this.messageStateHandler.getClineMessages() + const messageIndex = clineMessages.findIndex((m) => m.ts === messageTs) - (offset || 0) // Find the last message before messageIndex that has a lastCheckpointHash - const lastHashIndex = findLastIndex(this.clineMessages.slice(0, messageIndex), (m) => m.lastCheckpointHash !== undefined) - const message = this.clineMessages[messageIndex] - const lastMessageWithHash = this.clineMessages[lastHashIndex] + const lastHashIndex = findLastIndex(clineMessages.slice(0, messageIndex), (m) => m.lastCheckpointHash !== undefined) + const message = clineMessages[messageIndex] + const lastMessageWithHash = clineMessages[lastHashIndex] if (!message) { - console.error("Message not found", this.clineMessages) + console.error("Message not found", clineMessages) return } @@ -417,17 +345,18 @@ export class Task { break } - if (!this.checkpointTracker && !this.checkpointTrackerErrorMessage) { + if (!this.checkpointTracker && !this.taskState.checkpointTrackerErrorMessage) { try { this.checkpointTracker = await CheckpointTracker.create( this.taskId, this.context.globalStorageUri.fsPath, this.enableCheckpoints, ) + this.messageStateHandler.setCheckpointTracker(this.checkpointTracker) } catch (error) { const errorMessage = error instanceof Error ? error.message : "未知错误" console.error("Failed to initialize checkpoint tracker:", errorMessage) - this.checkpointTrackerErrorMessage = errorMessage + this.taskState.checkpointTrackerErrorMessage = errorMessage await this.postStateToWebview() vscode.window.showErrorMessage(errorMessage) didWorkspaceRestoreFail = true @@ -449,6 +378,18 @@ export class Task { vscode.window.showErrorMessage("无法恢复检查点偏移: " + errorMessage) didWorkspaceRestoreFail = true } + } else if (!offset && lastMessageWithHash.lastCheckpointHash && this.checkpointTracker) { + // Fallback: restore to most recent checkpoint when target message has no checkpoint hash + console.warn(`Message ${messageTs} has no checkpoint hash, falling back to previous checkpoint`) + try { + await this.checkpointTracker.resetHead(lastMessageWithHash.lastCheckpointHash) + } catch (error) { + const errorMessage = error instanceof Error ? error.message : "Unknown error" + vscode.window.showErrorMessage("Failed to restore checkpoint: " + errorMessage) + didWorkspaceRestoreFail = true + } + } else { + vscode.window.showErrorMessage("Failed to restore checkpoint") } break } @@ -458,11 +399,9 @@ export class Task { case "task": case "taskAndWorkspace": this.conversationHistoryDeletedRange = message.conversationHistoryDeletedRange - const newConversationHistory = this.apiConversationHistory.slice( - 0, - (message.conversationHistoryIndex || 0) + 2, - ) // +1 since this index corresponds to the last user message, and another +1 since slice end index is exclusive - await this.overwriteApiConversationHistory(newConversationHistory) + const apiConversationHistory = this.messageStateHandler.getApiConversationHistory() + const newConversationHistory = apiConversationHistory.slice(0, (message.conversationHistoryIndex || 0) + 2) // +1 since this index corresponds to the last user message, and another +1 since slice end index is exclusive + await this.messageStateHandler.overwriteApiConversationHistory(newConversationHistory) // update the context history state await this.contextManager.truncateContextHistory( @@ -471,11 +410,24 @@ export class Task { ) // aggregate deleted api reqs info so we don't lose costs/tokens - const deletedMessages = this.clineMessages.slice(messageIndex + 1) + const clineMessages = this.messageStateHandler.getClineMessages() + const deletedMessages = clineMessages.slice(messageIndex + 1) const deletedApiReqsMetrics = getApiMetrics(combineApiRequests(combineCommandSequences(deletedMessages))) - const newClineMessages = this.clineMessages.slice(0, messageIndex + 1) - await this.overwriteClineMessages(newClineMessages) // calls saveClineMessages which saves historyItem + // Detect files edited after this message timestamp for file context warning + // Only needed for task-only restores when a user edits a message or restores the task context, but not the files. + if (restoreType === "task") { + const filesEditedAfterMessage = await this.fileContextTracker.detectFilesEditedAfterMessage( + messageTs, + deletedMessages, + ) + if (filesEditedAfterMessage.length > 0) { + await this.fileContextTracker.storePendingFileContextWarning(filesEditedAfterMessage) + } + } + + const newClineMessages = clineMessages.slice(0, messageIndex + 1) + await this.messageStateHandler.overwriteClineMessages(newClineMessages) // calls saveClineMessages which saves historyItem await this.say( "deleted_api_reqs", @@ -507,7 +459,9 @@ export class Task { if (restoreType !== "task") { // Set isCheckpointCheckedOut flag on the message // Find all checkpoint messages before this one - const checkpointMessages = this.clineMessages.filter((m) => m.say === "checkpoint_created") + const checkpointMessages = this.messageStateHandler + .getClineMessages() + .filter((m) => m.say === "checkpoint_created") const currentMessageIndex = checkpointMessages.findIndex((m) => m.ts === messageTs) // Set isCheckpointCheckedOut to false for all checkpoint messages @@ -516,9 +470,7 @@ export class Task { }) } - await this.saveClineMessagesAndUpdateHistory() - - sendRelinquishControlEvent() + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() this.cancelTask() // the task is already cancelled by the provider beforehand, but we need to re-init to get the updated messages } else { @@ -527,10 +479,6 @@ export class Task { } async presentMultifileDiff(messageTs: number, seeNewChangesSinceLastTaskCompletion: boolean) { - if (this.initTaskPromise && !this.isInitialized) { - await this.initTaskPromise - } - const relinquishButton = () => { sendRelinquishControlEvent() } @@ -541,8 +489,9 @@ export class Task { } console.log("presentMultifileDiff", messageTs) - const messageIndex = this.clineMessages.findIndex((m) => m.ts === messageTs) - const message = this.clineMessages[messageIndex] + const clineMessages = this.messageStateHandler.getClineMessages() + const messageIndex = clineMessages.findIndex((m) => m.ts === messageTs) + const message = clineMessages[messageIndex] if (!message) { console.error("Message not found") relinquishButton() @@ -556,17 +505,18 @@ export class Task { } // TODO: handle if this is called from outside original workspace, in which case we need to show user error message we can't show diff outside of workspace? - if (!this.checkpointTracker && this.enableCheckpoints && !this.checkpointTrackerErrorMessage) { + if (!this.checkpointTracker && this.enableCheckpoints && !this.taskState.checkpointTrackerErrorMessage) { try { this.checkpointTracker = await CheckpointTracker.create( this.taskId, this.context.globalStorageUri.fsPath, this.enableCheckpoints, ) + this.messageStateHandler.setCheckpointTracker(this.checkpointTracker) } catch (error) { const errorMessage = error instanceof Error ? error.message : "未知错误" console.error("无法初始化检查点跟踪器:", errorMessage) - this.checkpointTrackerErrorMessage = errorMessage + this.taskState.checkpointTrackerErrorMessage = errorMessage await this.postStateToWebview() vscode.window.showErrorMessage(errorMessage) relinquishButton() @@ -587,7 +537,7 @@ export class Task { if (seeNewChangesSinceLastTaskCompletion) { // Get last task completed const lastTaskCompletedMessageCheckpointHash = findLast( - this.clineMessages.slice(0, messageIndex), + this.messageStateHandler.getClineMessages().slice(0, messageIndex), (m) => m.say === "completion_result", )?.lastCheckpointHash // ask is only used to relinquish control, its the last say we care about // if undefined, then we get diff from beginning of git @@ -596,9 +546,9 @@ export class Task { // return // } // This value *should* always exist - const firstCheckpointMessageCheckpointHash = this.clineMessages.find( - (m) => m.say === "checkpoint_created", - )?.lastCheckpointHash + const firstCheckpointMessageCheckpointHash = this.messageStateHandler + .getClineMessages() + .find((m) => m.say === "checkpoint_created")?.lastCheckpointHash const previousCheckpointHash = lastTaskCompletedMessageCheckpointHash || firstCheckpointMessageCheckpointHash // either use the diff between the first checkpoint and the task completion, or the diff between the latest two task completions @@ -660,16 +610,13 @@ export class Task { } async doesLatestTaskCompletionHaveNewChanges() { - if (this.initTaskPromise && !this.isInitialized) { - await this.initTaskPromise - } - if (!this.enableCheckpoints) { return false } - const messageIndex = findLastIndex(this.clineMessages, (m) => m.say === "completion_result") - const message = this.clineMessages[messageIndex] + const clineMessages = this.messageStateHandler.getClineMessages() + const messageIndex = findLastIndex(clineMessages, (m) => m.say === "completion_result") + const message = clineMessages[messageIndex] if (!message) { console.error("Completion message not found") return false @@ -680,13 +627,14 @@ export class Task { return false } - if (this.enableCheckpoints && !this.checkpointTracker && !this.checkpointTrackerErrorMessage) { + if (this.enableCheckpoints && !this.checkpointTracker && !this.taskState.checkpointTrackerErrorMessage) { try { this.checkpointTracker = await CheckpointTracker.create( this.taskId, this.context.globalStorageUri.fsPath, this.enableCheckpoints, ) + this.messageStateHandler.setCheckpointTracker(this.checkpointTracker) } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error" console.error("Failed to initialize checkpoint tracker:", errorMessage) @@ -695,7 +643,10 @@ export class Task { } // Get last task completed - const lastTaskCompletedMessage = findLast(this.clineMessages.slice(0, messageIndex), (m) => m.say === "completion_result") + const lastTaskCompletedMessage = findLast( + this.messageStateHandler.getClineMessages().slice(0, messageIndex), + (m) => m.say === "completion_result", + ) try { // Get last task completed @@ -706,9 +657,9 @@ export class Task { // return // } // This value *should* always exist - const firstCheckpointMessageCheckpointHash = this.clineMessages.find( - (m) => m.say === "checkpoint_created", - )?.lastCheckpointHash + const firstCheckpointMessageCheckpointHash = this.messageStateHandler + .getClineMessages() + .find((m) => m.say === "checkpoint_created")?.lastCheckpointHash const previousCheckpointHash = lastTaskCompletedMessageCheckpointHash || firstCheckpointMessageCheckpointHash // either use the diff between the first checkpoint and the task completion, or the diff between the latest two task completions @@ -743,19 +694,23 @@ export class Task { files?: string[] }> { // If this Cline instance was aborted by the provider, then the only thing keeping us alive is a promise still running in the background, in which case we don't want to send its result to the webview as it is attached to a new instance of Cline now. So we can safely ignore the result of any active promises, and this class will be deallocated. (Although we set Cline = undefined in provider, that simply removes the reference to this instance, but the instance is still alive until this promise resolves or rejects.) - if (this.abort) { + if (this.taskState.abort) { throw new Error("Cline instance aborted") } let askTs: number if (partial !== undefined) { - const lastMessage = this.clineMessages.at(-1) + const clineMessages = this.messageStateHandler.getClineMessages() + const lastMessage = clineMessages.at(-1) + const lastMessageIndex = clineMessages.length - 1 const isUpdatingPreviousPartial = lastMessage && lastMessage.partial && lastMessage.type === "ask" && lastMessage.ask === type if (partial) { if (isUpdatingPreviousPartial) { // existing partial message, so update it - lastMessage.text = text - lastMessage.partial = partial + await this.messageStateHandler.updateClineMessage(lastMessageIndex, { + text, + partial, + }) // todo be more efficient about saving and posting only new data or one whole message at a time so ignore partial for saves, and only post parts of partial message instead of whole array in new listener // await this.saveClineMessagesAndUpdateHistory() // await this.postStateToWebview() @@ -768,8 +723,8 @@ export class Task { // this.askResponseText = undefined // this.askResponseImages = undefined askTs = Date.now() - this.lastMessageTs = askTs - await this.addToClineMessages({ + this.taskState.lastMessageTs = askTs + await this.messageStateHandler.addToClineMessages({ ts: askTs, type: "ask", ask: type, @@ -783,10 +738,10 @@ export class Task { // partial=false means its a complete version of a previously partial message if (isUpdatingPreviousPartial) { // this is the complete version of a previously partial message, so replace the partial with the complete version - this.askResponse = undefined - this.askResponseText = undefined - this.askResponseImages = undefined - this.askResponseFiles = undefined + this.taskState.askResponse = undefined + this.taskState.askResponseText = undefined + this.taskState.askResponseImages = undefined + this.taskState.askResponseFiles = undefined /* Bug for the history books: @@ -795,23 +750,24 @@ export class Task { So in this case we must make sure that the message ts is never altered after first setting it. */ askTs = lastMessage.ts - this.lastMessageTs = askTs + this.taskState.lastMessageTs = askTs // lastMessage.ts = askTs - lastMessage.text = text - lastMessage.partial = false - await this.saveClineMessagesAndUpdateHistory() + await this.messageStateHandler.updateClineMessage(lastMessageIndex, { + text, + partial: false, + }) // await this.postStateToWebview() const protoMessage = convertClineMessageToProto(lastMessage) await sendPartialMessageEvent(protoMessage) } else { // this is a new partial=false message, so add it like normal - this.askResponse = undefined - this.askResponseText = undefined - this.askResponseImages = undefined - this.askResponseFiles = undefined + this.taskState.askResponse = undefined + this.taskState.askResponseText = undefined + this.taskState.askResponseImages = undefined + this.taskState.askResponseFiles = undefined askTs = Date.now() - this.lastMessageTs = askTs - await this.addToClineMessages({ + this.taskState.lastMessageTs = askTs + await this.messageStateHandler.addToClineMessages({ ts: askTs, type: "ask", ask: type, @@ -823,13 +779,13 @@ export class Task { } else { // this is a new non-partial message, so add it like normal // const lastMessage = this.clineMessages.at(-1) - this.askResponse = undefined - this.askResponseText = undefined - this.askResponseImages = undefined - this.askResponseFiles = undefined + this.taskState.askResponse = undefined + this.taskState.askResponseText = undefined + this.taskState.askResponseImages = undefined + this.taskState.askResponseFiles = undefined askTs = Date.now() - this.lastMessageTs = askTs - await this.addToClineMessages({ + this.taskState.lastMessageTs = askTs + await this.messageStateHandler.addToClineMessages({ ts: askTs, type: "ask", ask: type, @@ -838,37 +794,39 @@ export class Task { await this.postStateToWebview() } - await pWaitFor(() => this.askResponse !== undefined || this.lastMessageTs !== askTs, { interval: 100 }) - if (this.lastMessageTs !== askTs) { + await pWaitFor(() => this.taskState.askResponse !== undefined || this.taskState.lastMessageTs !== askTs, { + interval: 100, + }) + if (this.taskState.lastMessageTs !== askTs) { throw new Error("Current ask promise was ignored") // could happen if we send multiple asks in a row i.e. with command_output. It's important that when we know an ask could fail, it is handled gracefully } const result = { - response: this.askResponse!, - text: this.askResponseText, - images: this.askResponseImages, - files: this.askResponseFiles, + response: this.taskState.askResponse!, + text: this.taskState.askResponseText, + images: this.taskState.askResponseImages, + files: this.taskState.askResponseFiles, } - this.askResponse = undefined - this.askResponseText = undefined - this.askResponseImages = undefined - this.askResponseFiles = undefined + this.taskState.askResponse = undefined + this.taskState.askResponseText = undefined + this.taskState.askResponseImages = undefined + this.taskState.askResponseFiles = undefined return result } async handleWebviewAskResponse(askResponse: ClineAskResponse, text?: string, images?: string[], files?: string[]) { - this.askResponse = askResponse - this.askResponseText = text - this.askResponseImages = images - this.askResponseFiles = files + this.taskState.askResponse = askResponse + this.taskState.askResponseText = text + this.taskState.askResponseImages = images + this.taskState.askResponseFiles = files } async say(type: ClineSay, text?: string, images?: string[], files?: string[], partial?: boolean): Promise { - if (this.abort) { + if (this.taskState.abort) { throw new Error("Cline instance aborted") } if (partial !== undefined) { - const lastMessage = this.clineMessages.at(-1) + const lastMessage = this.messageStateHandler.getClineMessages().at(-1) const isUpdatingPreviousPartial = lastMessage && lastMessage.partial && lastMessage.type === "say" && lastMessage.say === type if (partial) { @@ -883,8 +841,8 @@ export class Task { } else { // this is a new partial message, so add it with partial state const sayTs = Date.now() - this.lastMessageTs = sayTs - await this.addToClineMessages({ + this.taskState.lastMessageTs = sayTs + await this.messageStateHandler.addToClineMessages({ ts: sayTs, type: "say", say: type, @@ -899,7 +857,7 @@ export class Task { // partial=false means its a complete version of a previously partial message if (isUpdatingPreviousPartial) { // this is the complete version of a previously partial message, so replace the partial with the complete version - this.lastMessageTs = lastMessage.ts + this.taskState.lastMessageTs = lastMessage.ts // lastMessage.ts = sayTs lastMessage.text = text lastMessage.images = images @@ -907,15 +865,15 @@ export class Task { lastMessage.partial = false // instead of streaming partialMessage events, we do a save and post like normal to persist to disk - await this.saveClineMessagesAndUpdateHistory() + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() // await this.postStateToWebview() const protoMessage = convertClineMessageToProto(lastMessage) await sendPartialMessageEvent(protoMessage) // more performant than an entire postStateToWebview } else { // this is a new partial=false message, so add it like normal const sayTs = Date.now() - this.lastMessageTs = sayTs - await this.addToClineMessages({ + this.taskState.lastMessageTs = sayTs + await this.messageStateHandler.addToClineMessages({ ts: sayTs, type: "say", say: type, @@ -929,8 +887,8 @@ export class Task { } else { // this is a new non-partial message, so add it like normal const sayTs = Date.now() - this.lastMessageTs = sayTs - await this.addToClineMessages({ + this.taskState.lastMessageTs = sayTs + await this.messageStateHandler.addToClineMessages({ ts: sayTs, type: "say", say: type, @@ -953,11 +911,11 @@ export class Task { } async removeLastPartialMessageIfExistsWithType(type: "ask" | "say", askOrSay: ClineAsk | ClineSay) { - const lastMessage = this.clineMessages.at(-1) + const clineMessages = this.messageStateHandler.getClineMessages() + const lastMessage = clineMessages.at(-1) if (lastMessage?.partial && lastMessage.type === type && (lastMessage.ask === askOrSay || lastMessage.say === askOrSay)) { - this.clineMessages.pop() - await this.saveClineMessagesAndUpdateHistory() - await this.postStateToWebview() + this.messageStateHandler.setClineMessages(clineMessages.slice(0, -1)) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() } } @@ -972,14 +930,14 @@ export class Task { } // conversationHistory (for API) and clineMessages (for webview) need to be in sync // if the extension process were killed, then on restart the clineMessages might not be empty, so we need to set it to [] when we create a new Cline client (otherwise webview would show stale messages from previous session) - this.clineMessages = [] - this.apiConversationHistory = [] + this.messageStateHandler.setClineMessages([]) + this.messageStateHandler.setApiConversationHistory([]) await this.postStateToWebview() await this.say("text", task, images, files) - this.isInitialized = true + this.taskState.isInitialized = true let imageBlocks: Anthropic.ImageBlockParam[] = formatResponse.imageBlocks(images) @@ -1018,41 +976,43 @@ export class Task { // this.checkpointTrackerErrorMessage = "Checkpoints are only available for new tasks" // } - const modifiedClineMessages = await getSavedClineMessages(this.getContext(), this.taskId) + const savedClineMessages = await getSavedClineMessages(this.getContext(), this.taskId) // Remove any resume messages that may have been added before const lastRelevantMessageIndex = findLastIndex( - modifiedClineMessages, + savedClineMessages, (m) => !(m.ask === "resume_task" || m.ask === "resume_completed_task"), ) if (lastRelevantMessageIndex !== -1) { - modifiedClineMessages.splice(lastRelevantMessageIndex + 1) + savedClineMessages.splice(lastRelevantMessageIndex + 1) } // since we don't use api_req_finished anymore, we need to check if the last api_req_started has a cost value, if it doesn't and no cancellation reason to present, then we remove it since it indicates an api request without any partial content streamed - const lastApiReqStartedIndex = findLastIndex( - modifiedClineMessages, - (m) => m.type === "say" && m.say === "api_req_started", - ) + const lastApiReqStartedIndex = findLastIndex(savedClineMessages, (m) => m.type === "say" && m.say === "api_req_started") if (lastApiReqStartedIndex !== -1) { - const lastApiReqStarted = modifiedClineMessages[lastApiReqStartedIndex] + const lastApiReqStarted = savedClineMessages[lastApiReqStartedIndex] const { cost, cancelReason }: ClineApiReqInfo = JSON.parse(lastApiReqStarted.text || "{}") if (cost === undefined && cancelReason === undefined) { - modifiedClineMessages.splice(lastApiReqStartedIndex, 1) + savedClineMessages.splice(lastApiReqStartedIndex, 1) } } - await this.overwriteClineMessages(modifiedClineMessages) - this.clineMessages = await getSavedClineMessages(this.getContext(), this.taskId) + await this.messageStateHandler.overwriteClineMessages(savedClineMessages) + this.messageStateHandler.setClineMessages(await getSavedClineMessages(this.getContext(), this.taskId)) // Now present the cline messages to the user and ask if they want to resume (NOTE: we ran into a bug before where the apiconversationhistory wouldn't be initialized when opening a old task, and it was because we were waiting for resume) // This is important in case the user deletes messages without resuming the task first - this.apiConversationHistory = await getSavedApiConversationHistory(this.getContext(), this.taskId) + const context = this.getContext() + const savedApiConversationHistory = await getSavedApiConversationHistory(context, this.taskId) + this.messageStateHandler.setApiConversationHistory(savedApiConversationHistory) // load the context history state + + const taskDir = await ensureTaskDirectoryExists(context, this.taskId) await this.contextManager.initializeContextHistory(await ensureTaskDirectoryExists(this.getContext(), this.taskId)) - const lastClineMessage = this.clineMessages + const lastClineMessage = this.messageStateHandler + .getClineMessages() .slice() .reverse() .find((m) => !(m.ask === "resume_task" || m.ask === "resume_completed_task")) // could be multiple resume tasks @@ -1064,7 +1024,7 @@ export class Task { askType = "resume_task" } - this.isInitialized = true + this.taskState.isInitialized = true const { response, text, images, files } = await this.ask(askType) // calls poststatetowebview let responseText: string | undefined @@ -1130,12 +1090,17 @@ export class Task { const wasRecent = lastClineMessage?.ts && Date.now() - lastClineMessage.ts < 30_000 + // Check if there are pending file context warnings before calling taskResumption + const pendingContextWarning = await this.fileContextTracker.retrieveAndClearPendingFileContextWarning() + const hasPendingFileContextWarnings = pendingContextWarning && pendingContextWarning.length > 0 + const [taskResumptionMessage, userResponseMessage] = formatResponse.taskResumption( this.chatSettings?.mode === "plan" ? "plan" : "act", agoText, cwd, wasRecent, responseText, + hasPendingFileContextWarnings, ) if (taskResumptionMessage !== "") { @@ -1166,14 +1131,23 @@ export class Task { } } - await this.overwriteApiConversationHistory(modifiedApiConversationHistory) + // Inject file context warning if there were pending warnings from message editing + if (pendingContextWarning && pendingContextWarning.length > 0) { + const fileContextWarning = formatResponse.fileContextWarning(pendingContextWarning) + newUserContent.push({ + type: "text", + text: fileContextWarning, + }) + } + + await this.messageStateHandler.overwriteApiConversationHistory(modifiedApiConversationHistory) await this.initiateTaskLoop(newUserContent) } private async initiateTaskLoop(userContent: UserContent): Promise { let nextUserContent = userContent let includeFileDetails = true - while (!this.abort) { + while (!this.taskState.abort) { const didEndLoop = await this.recursivelyMakeClineRequests(nextUserContent, includeFileDetails) includeFileDetails = false // we only need file details the first time @@ -1196,34 +1170,33 @@ export class Task { text: formatResponse.noToolsUsed(), }, ] - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ } } } async abortTask() { - this.abort = true // will stop any autonomously running promises + this.taskState.abort = true // will stop any autonomously running promises this.terminalManager.disposeAll() this.urlContentFetcher.closeBrowser() await this.browserSession.dispose() this.clineIgnoreController.dispose() this.fileContextTracker.dispose() await this.diffViewProvider.revertChanges() // need to await for when we want to make sure directories/files are reverted before re-starting the task from a checkpoint + + // Clear the notification callback when task is aborted + this.mcpHub.clearNotificationCallback() } // Checkpoints async saveCheckpoint(isAttemptCompletionMessage: boolean = false) { - if (this.initTaskPromise && !this.isInitialized) { - await this.initTaskPromise - } - if (!this.enableCheckpoints) { // If checkpoints are disabled, do nothing. return } // Set isCheckpointCheckedOut to false for all checkpoint_created messages - this.clineMessages.forEach((message) => { + this.messageStateHandler.getClineMessages().forEach((message) => { if (message.say === "checkpoint_created") { message.isCheckpointCheckedOut = false } @@ -1231,20 +1204,44 @@ export class Task { if (!isAttemptCompletionMessage) { // ensure we aren't creating a duplicate checkpoint - const lastMessage = this.clineMessages.at(-1) + const lastMessage = this.messageStateHandler.getClineMessages().at(-1) if (lastMessage?.say === "checkpoint_created") { return } - // For non-attempt completion we just say checkpoints - await this.say("checkpoint_created") - this.checkpointTracker?.commit().then(async (commitHash) => { - const lastCheckpointMessage = findLast(this.clineMessages, (m) => m.say === "checkpoint_created") - if (lastCheckpointMessage) { - lastCheckpointMessage.lastCheckpointHash = commitHash - await this.saveClineMessagesAndUpdateHistory() + // Initialize checkpoint tracker if it doesn't exist + if (!this.checkpointTracker && !this.taskState.checkpointTrackerErrorMessage) { + try { + this.checkpointTracker = await CheckpointTracker.create( + this.taskId, + this.context.globalStorageUri.fsPath, + this.enableCheckpoints, + ) + } catch (error) { + const errorMessage = error instanceof Error ? error.message : "Unknown error" + console.error("Failed to initialize checkpoint tracker:", errorMessage) + this.taskState.checkpointTrackerErrorMessage = errorMessage + await this.postStateToWebview() + return } - }) // silently fails for now + } + + // Create a checkpoint commit and update clineMessages with a commitHash + if (this.checkpointTracker) { + const commitHash = await this.checkpointTracker.commit() + if (commitHash) { + await this.say("checkpoint_created") + const lastCheckpointMessageIndex = findLastIndex( + this.messageStateHandler.getClineMessages(), + (m) => m.say === "checkpoint_created", + ) + if (lastCheckpointMessageIndex !== -1) { + await this.messageStateHandler.updateClineMessage(lastCheckpointMessageIndex, { + lastCheckpointHash: commitHash, + }) + } + } + } // silently fails for now // } else { @@ -1257,6 +1254,7 @@ export class Task { this.context.globalStorageUri.fsPath, this.enableCheckpoints, ) + this.messageStateHandler.setCheckpointTracker(this.checkpointTracker) } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error" console.error("Failed to initialize checkpoint tracker for attempt completion:", errorMessage) @@ -1269,12 +1267,12 @@ export class Task { // For attempt_completion, find the last completion_result message and set its checkpoint hash. This will be used to present the 'see new changes' button const lastCompletionResultMessage = findLast( - this.clineMessages, + this.messageStateHandler.getClineMessages(), (m) => m.say === "completion_result" || m.ask === "completion_result", ) if (lastCompletionResultMessage) { lastCompletionResultMessage.lastCheckpointHash = commitHash - await this.saveClineMessagesAndUpdateHistory() + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() } } else { console.error("Checkpoint tracker does not exist and could not be initialized for attempt completion") @@ -1463,9 +1461,9 @@ export class Task { chunkTimer = setTimeout(async () => await flushBuffer(), CHUNK_DEBOUNCE_MS) } - let result = "" + const outputLines: string[] = [] process.on("line", async (line) => { - result += line + "\n" + outputLines.push(line) if (!didContinue) { outputBuffer.push(line) @@ -1507,7 +1505,7 @@ export class Task { // grouping command_output messages despite any gaps anyways) await setTimeoutPromise(50) - result = result.trim() + let result = this.terminalManager.processOutput(outputLines) if (userFeedback) { await this.say("user_feedback", userFeedback.text, userFeedback.images, userFeedback.files) @@ -1605,14 +1603,6 @@ export class Task { } } - private formatErrorWithStatusCode(error: any): string { - const statusCode = error.status || error.statusCode || (error.response && error.response.status) - const message = error.message ?? JSON.stringify(serializeError(error), null, 2) - - // Only prepend the statusCode if it's not already part of the message - return statusCode && !message.includes(statusCode.toString()) ? `${statusCode} - ${message}` : message - } - /** * Migrates the disableBrowserTool setting from VSCode configuration to browserSettings */ @@ -1637,12 +1627,6 @@ export class Task { } } - private async isClaude4ModelFamily(): Promise { - const model = this.api.getModel() - const modelId = model.id - return modelId.includes("sonnet-4") || modelId.includes("opus-4") - } - async *attemptApiRequest(previousApiReqIndex: number): ApiStream { // Wait for MCP servers to be connected before generating system prompt await pWaitFor(() => this.mcpHub.isConnecting !== true, { timeout: 10_000 }).catch(() => { @@ -1656,10 +1640,9 @@ export class Task { const supportsBrowserUse = modelSupportsBrowserUse && !disableBrowserTool // only enable browser use if the model supports it and the user hasn't disabled it - const isClaude4ModelFamily = await this.isClaude4ModelFamily() - let systemPrompt = await SYSTEM_PROMPT(cwd, supportsBrowserUse, this.mcpHub, this.browserSettings, isClaude4ModelFamily) + const isClaude4Model = isClaude4ModelFamily(this.api) + let systemPrompt = await SYSTEM_PROMPT(cwd, supportsBrowserUse, this.mcpHub, this.browserSettings, isClaude4Model) - let settingsCustomInstructions = this.customInstructions?.trim() await this.migratePreferredLanguageToolSetting() const preferredLanguage = getLanguageKey(this.chatSettings.preferredLanguage as LanguageDisplay) const preferredLanguageInstructions = @@ -1687,7 +1670,6 @@ export class Task { } if ( - settingsCustomInstructions || globalClineRulesFileInstructions || localClineRulesFileInstructions || localCursorRulesFileInstructions || @@ -1698,7 +1680,6 @@ export class Task { ) { // altering the system prompt mid-task will break the prompt cache, but in the grand scheme this will not change often so it's better to not pollute user messages with it the way we have to with const userInstructions = addUserInstructions( - settingsCustomInstructions, globalClineRulesFileInstructions, localClineRulesFileInstructions, localCursorRulesFileInstructions, @@ -1710,8 +1691,8 @@ export class Task { systemPrompt += userInstructions } const contextManagementMetadata = await this.contextManager.getNewContextMessagesAndMetadata( - this.apiConversationHistory, - this.clineMessages, + this.messageStateHandler.getApiConversationHistory(), + this.messageStateHandler.getClineMessages(), this.api, this.conversationHistoryDeletedRange, previousApiReqIndex, @@ -1720,7 +1701,8 @@ export class Task { if (contextManagementMetadata.updatedConversationHistoryDeletedRange) { this.conversationHistoryDeletedRange = contextManagementMetadata.conversationHistoryDeletedRange - await this.saveClineMessagesAndUpdateHistory() // saves task history item which we use to keep track of conversation history deleted range + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() + // saves task history item which we use to keep track of conversation history deleted range } let stream = this.api.createMessage(systemPrompt, contextManagementMetadata.truncatedConversationHistory) @@ -1729,37 +1711,37 @@ export class Task { try { // awaiting first chunk to see if it will throw an error - this.isWaitingForFirstChunk = true + this.taskState.isWaitingForFirstChunk = true const firstChunk = await iterator.next() yield firstChunk.value - this.isWaitingForFirstChunk = false + this.taskState.isWaitingForFirstChunk = false } catch (error) { const isOpenRouter = this.api instanceof OpenRouterHandler || this.api instanceof ClineHandler const isAnthropic = this.api instanceof AnthropicHandler const isOpenRouterContextWindowError = checkIsOpenRouterContextWindowError(error) && isOpenRouter const isAnthropicContextWindowError = checkIsAnthropicContextWindowError(error) && isAnthropic - if (isAnthropic && isAnthropicContextWindowError && !this.didAutomaticallyRetryFailedApiRequest) { + if (isAnthropic && isAnthropicContextWindowError && !this.taskState.didAutomaticallyRetryFailedApiRequest) { this.conversationHistoryDeletedRange = this.contextManager.getNextTruncationRange( - this.apiConversationHistory, + this.messageStateHandler.getApiConversationHistory(), this.conversationHistoryDeletedRange, "quarter", // Force aggressive truncation ) - await this.saveClineMessagesAndUpdateHistory() + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( Date.now(), await ensureTaskDirectoryExists(this.getContext(), this.taskId), ) - this.didAutomaticallyRetryFailedApiRequest = true - } else if (isOpenRouter && !this.didAutomaticallyRetryFailedApiRequest) { + this.taskState.didAutomaticallyRetryFailedApiRequest = true + } else if (isOpenRouter && !this.taskState.didAutomaticallyRetryFailedApiRequest) { if (isOpenRouterContextWindowError) { this.conversationHistoryDeletedRange = this.contextManager.getNextTruncationRange( - this.apiConversationHistory, + this.messageStateHandler.getApiConversationHistory(), this.conversationHistoryDeletedRange, "quarter", // Force aggressive truncation ) - await this.saveClineMessagesAndUpdateHistory() + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( Date.now(), await ensureTaskDirectoryExists(this.getContext(), this.taskId), @@ -1768,14 +1750,14 @@ export class Task { console.log("first chunk failed, waiting 1 second before retrying") await setTimeoutPromise(1000) - this.didAutomaticallyRetryFailedApiRequest = true + this.taskState.didAutomaticallyRetryFailedApiRequest = true } else { // request failed after retrying automatically once, ask user if they want to retry again // note that this api_req_failed ask is unique in that we only present this option if the api hasn't streamed any content yet (ie it fails on the first chunk due), as it would allow them to hit a retry button. However if the api failed mid-stream, it could be in any arbitrary state where some tools may have executed, so that error is handled differently and requires cancelling the task entirely. if (isOpenRouterContextWindowError || isAnthropicContextWindowError) { const truncatedConversationHistory = this.contextManager.getTruncatedMessages( - this.apiConversationHistory, + this.messageStateHandler.getApiConversationHistory(), this.conversationHistoryDeletedRange, ) @@ -1783,23 +1765,29 @@ export class Task { // ToDo: Allow the user to change their input if this is the case. if (truncatedConversationHistory.length > 3) { error = new Error("Context window exceeded. Click retry to truncate the conversation and try again.") - this.didAutomaticallyRetryFailedApiRequest = false + this.taskState.didAutomaticallyRetryFailedApiRequest = false } } - const errorMessage = this.formatErrorWithStatusCode(error) + const errorMessage = formatErrorWithStatusCode(error) // Update the 'api_req_started' message to reflect final failure before asking user to manually retry - const lastApiReqStartedIndex = findLastIndex(this.clineMessages, (m) => m.say === "api_req_started") + const lastApiReqStartedIndex = findLastIndex( + this.messageStateHandler.getClineMessages(), + (m) => m.say === "api_req_started", + ) if (lastApiReqStartedIndex !== -1) { - const currentApiReqInfo: ClineApiReqInfo = JSON.parse(this.clineMessages[lastApiReqStartedIndex].text || "{}") + const clineMessages = this.messageStateHandler.getClineMessages() + const currentApiReqInfo: ClineApiReqInfo = JSON.parse(clineMessages[lastApiReqStartedIndex].text || "{}") delete currentApiReqInfo.retryStatus - this.clineMessages[lastApiReqStartedIndex].text = JSON.stringify({ - ...currentApiReqInfo, // Spread the modified info (with retryStatus removed) - cancelReason: "retries_exhausted", // Indicate that automatic retries failed - streamingFailedMessage: errorMessage, - } satisfies ClineApiReqInfo) + await this.messageStateHandler.updateClineMessage(lastApiReqStartedIndex, { + text: JSON.stringify({ + ...currentApiReqInfo, // Spread the modified info (with retryStatus removed) + cancelReason: "retries_exhausted", // Indicate that automatic retries failed + streamingFailedMessage: errorMessage, + } satisfies ClineApiReqInfo), + }) // this.ask will trigger postStateToWebview, so this change should be picked up. } @@ -1830,10 +1818,10 @@ export class Task { currentFullJson: string, ): Promise<{ shouldBreak: boolean; newContent?: string; error?: string }> { // Calculate the delta - what's new since last time - const newJsonChunk = currentFullJson.substring(this.lastProcessedJsonLength) + const newJsonChunk = currentFullJson.substring(this.taskState.lastProcessedJsonLength) if (block.partial) { // Initialize on first chunk - if (!this.streamingJsonReplacer) { + if (!this.taskState.streamingJsonReplacer) { if (!this.diffViewProvider.isEditing) { await this.diffViewProvider.open(relPath) } @@ -1848,42 +1836,42 @@ export class Task { console.error("StreamingJsonReplacer error:", error) console.log("Failed StreamingJsonReplacer update:") // Handle error: push tool result, cleanup - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: formatResponse.toolError(`JSON replacement error: ${error.message}`), }) - this.didAlreadyUseTool = true - this.userMessageContentReady = true - this.streamingJsonReplacer = undefined - this.lastProcessedJsonLength = 0 + this.taskState.didAlreadyUseTool = true + this.taskState.userMessageContentReady = true + this.taskState.streamingJsonReplacer = undefined + this.taskState.lastProcessedJsonLength = 0 throw error } - this.streamingJsonReplacer = new StreamingJsonReplacer( + this.taskState.streamingJsonReplacer = new StreamingJsonReplacer( this.diffViewProvider.originalContent || "", onContentUpdated, onError, ) - this.lastProcessedJsonLength = 0 + this.taskState.lastProcessedJsonLength = 0 } // Feed only the new chunk if (newJsonChunk.length > 0) { try { - this.streamingJsonReplacer.write(newJsonChunk) - this.lastProcessedJsonLength = currentFullJson.length + this.taskState.streamingJsonReplacer.write(newJsonChunk) + this.taskState.lastProcessedJsonLength = currentFullJson.length } catch (e) { // Handle write error return { shouldBreak: true, error: `Write error: ${e}` } } - const newContentParsed = this.streamingJsonReplacer.getSuccessfullyParsedItems() + const newContentParsed = this.taskState.streamingJsonReplacer.getSuccessfullyParsedItems() } return { shouldBreak: true } // Wait for more chunks } else { // Final chunk (!block.partial) - if (!this.streamingJsonReplacer) { + if (!this.taskState.streamingJsonReplacer) { // JSON came all at once, initialize if (!this.diffViewProvider.isEditing) { await this.diffViewProvider.open(relPath) @@ -1898,30 +1886,30 @@ export class Task { const onError = (error: Error) => { console.error("StreamingJsonReplacer error:", error) // Handle error - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: formatResponse.toolError(`JSON replacement error: ${error.message}`), }) - this.didAlreadyUseTool = true - this.userMessageContentReady = true + this.taskState.didAlreadyUseTool = true + this.taskState.userMessageContentReady = true throw error } - this.streamingJsonReplacer = new StreamingJsonReplacer( + this.taskState.streamingJsonReplacer = new StreamingJsonReplacer( this.diffViewProvider.originalContent || "", onContentUpdated, onError, ) // Write the entire JSON at once - this.streamingJsonReplacer.write(currentFullJson) + this.taskState.streamingJsonReplacer.write(currentFullJson) // Get the final content - const newContent = this.streamingJsonReplacer.getCurrentContent() + const newContent = this.taskState.streamingJsonReplacer.getCurrentContent() // Cleanup - this.streamingJsonReplacer = undefined - this.lastProcessedJsonLength = 0 + this.taskState.streamingJsonReplacer = undefined + this.taskState.lastProcessedJsonLength = 0 // Update diff view with final content await this.diffViewProvider.update(newContent, true) @@ -1931,18 +1919,17 @@ export class Task { // Feed final delta if (newJsonChunk.length > 0) { - this.streamingJsonReplacer.write(newJsonChunk) + this.taskState.streamingJsonReplacer.write(newJsonChunk) } - const newContent = this.streamingJsonReplacer.getCurrentContent() + const newContent = this.taskState.streamingJsonReplacer.getCurrentContent() // Get final list of replacements - const allReplacements = this.streamingJsonReplacer.getSuccessfullyParsedItems() - // console.log(`Total replacements applied: ${allReplacements.length}`) + const allReplacements = this.taskState.streamingJsonReplacer.getSuccessfullyParsedItems() // Cleanup - this.streamingJsonReplacer = undefined - this.lastProcessedJsonLength = 0 + this.taskState.streamingJsonReplacer = undefined + this.taskState.lastProcessedJsonLength = 0 // Update diff view with final content await this.diffViewProvider.update(newContent, true) @@ -1952,32 +1939,31 @@ export class Task { } async presentAssistantMessage() { - if (this.abort) { + if (this.taskState.abort) { throw new Error("Cline instance aborted") } - if (this.presentAssistantMessageLocked) { - this.presentAssistantMessageHasPendingUpdates = true + if (this.taskState.presentAssistantMessageLocked) { + this.taskState.presentAssistantMessageHasPendingUpdates = true return } - this.presentAssistantMessageLocked = true - this.presentAssistantMessageHasPendingUpdates = false + this.taskState.presentAssistantMessageLocked = true + this.taskState.presentAssistantMessageHasPendingUpdates = false - if (this.currentStreamingContentIndex >= this.assistantMessageContent.length) { + if (this.taskState.currentStreamingContentIndex >= this.taskState.assistantMessageContent.length) { // this may happen if the last content block was completed before streaming could finish. if streaming is finished, and we're out of bounds then this means we already presented/executed the last content block and are ready to continue to next request - if (this.didCompleteReadingStream) { - this.userMessageContentReady = true + if (this.taskState.didCompleteReadingStream) { + this.taskState.userMessageContentReady = true } - // console.log("no more content blocks to stream! this shouldn't happen?") - this.presentAssistantMessageLocked = false + this.taskState.presentAssistantMessageLocked = false return //throw new Error("No more content blocks to stream! This shouldn't happen...") // remove and just return after testing } - const block = cloneDeep(this.assistantMessageContent[this.currentStreamingContentIndex]) // need to create copy bc while stream is updating the array, it could be updating the reference block properties too + const block = cloneDeep(this.taskState.assistantMessageContent[this.taskState.currentStreamingContentIndex]) // need to create copy bc while stream is updating the array, it could be updating the reference block properties too switch (block.type) { case "text": { - if (this.didRejectTool || this.didAlreadyUseTool) { + if (this.taskState.didRejectTool || this.taskState.didAlreadyUseTool) { break } let content = block.content @@ -2078,16 +2064,16 @@ export class Task { } } - if (this.didRejectTool) { + if (this.taskState.didRejectTool) { // ignore any tool content after user has rejected tool once if (!block.partial) { - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: `Skipping tool ${toolDescription()} due to user rejecting a previous tool.`, }) } else { // partial tool after user rejected a previous tool - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: `Tool ${toolDescription()} was interrupted and not executed due to user rejecting a previous tool.`, }) @@ -2095,41 +2081,41 @@ export class Task { break } - if (this.didAlreadyUseTool) { + if (this.taskState.didAlreadyUseTool) { // ignore any content after a tool has already been used - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: formatResponse.toolAlreadyUsed(block.name), }) break } - const pushToolResult = (content: ToolResponse, isClaude4ModelFamily: boolean = false) => { + const pushToolResult = (content: ToolResponse, isClaude4Model: boolean = false) => { if (typeof content === "string") { const resultText = content || "(tool did not return anything)" - if (isClaude4ModelFamily && USE_EXPERIMENTAL_CLAUDE4_FEATURES) { + if (isClaude4Model && USE_EXPERIMENTAL_CLAUDE4_FEATURES) { // Claude 4 family: Use function_results format - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: `\n${resultText}\n`, }) } else { // Non-Claude 4: Use traditional format with header - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: `${toolDescription()} Result:`, }) - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: resultText, }) } } else { - this.userMessageContent.push(...content) + this.taskState.userMessageContent.push(...content) } // once a tool result has been collected, ignore all other tool uses since we should only ever present one tool result per message - this.didAlreadyUseTool = true + this.taskState.didAlreadyUseTool = true } // The user can approve, reject, or provide feedback (rejection). However the user may also send a message along with an approval, in which case we add a separate user message with this feedback. @@ -2143,12 +2129,12 @@ export class Task { fileContentString, ) if (typeof content === "string") { - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: content, }) } else { - this.userMessageContent.push(...content) + this.taskState.userMessageContent.push(...content) } } @@ -2167,7 +2153,7 @@ export class Task { await this.say("user_feedback", text, images, files) await this.saveCheckpoint() } - this.didRejectTool = true // Prevent further tool uses in this message + this.taskState.didRejectTool = true // Prevent further tool uses in this message return false } else { // User hit the approve button, and may have provided feedback @@ -2185,17 +2171,8 @@ export class Task { } } - const showNotificationForApprovalIfAutoApprovalEnabled = (message: string) => { - if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { - showSystemNotification({ - subtitle: "Approval Required", - message, - }) - } - } - - const handleError = async (action: string, error: Error, isClaude4ModelFamily: boolean = false) => { - if (this.abandoned) { + const handleError = async (action: string, error: Error, isClaude4Model: boolean = false) => { + if (this.taskState.abandoned) { console.log("Ignoring error since task was abandoned (i.e. from task cancellation after resetting)") return } @@ -2205,7 +2182,7 @@ export class Task { `Error ${action}:\n${error.message ?? JSON.stringify(serializeError(error), null, 2)}`, ) - pushToolResult(formatResponse.toolError(errorString), isClaude4ModelFamily) + pushToolResult(formatResponse.toolError(errorString), isClaude4Model) } // If block is partial, remove partial closing tag so its not presented to user @@ -2283,10 +2260,9 @@ export class Task { const currentFullJson = block.params.diff // Check if we should use streaming (e.g., for specific models) - const isClaude4ModelFamily = await this.isClaude4ModelFamily() + const isClaude4Model = isClaude4ModelFamily(this.api) // Going through claude family of models - if (isClaude4ModelFamily && USE_EXPERIMENTAL_CLAUDE4_FEATURES && currentFullJson) { - console.log("[EDIT] Streaming JSON replacement") + if (isClaude4Model && USE_EXPERIMENTAL_CLAUDE4_FEATURES && currentFullJson) { const streamingResult = await this.handleStreamingJsonReplacement( block, relPath, @@ -2394,35 +2370,35 @@ export class Task { break } else { if (!relPath) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError(block.name, "path")) await this.diffViewProvider.reset() await this.saveCheckpoint() break } if (block.name === "replace_in_file" && !diff) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("replace_in_file", "diff")) await this.diffViewProvider.reset() await this.saveCheckpoint() break } if (block.name === "write_to_file" && !content) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("write_to_file", "content")) await this.diffViewProvider.reset() await this.saveCheckpoint() break } if (block.name === "new_rule" && !content) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("new_rule", "content")) await this.diffViewProvider.reset() await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 // if isEditingFile false, that means we have the full contents of the file already. // it's important to note how this function works, you can't make the assumption that the block.partial conditional will always be called since it may immediately get complete, non-partial data. So this part of the logic will always be called. @@ -2452,7 +2428,7 @@ export class Task { if (this.shouldAutoApproveToolWithPath(block.name, relPath)) { this.removeLastPartialMessageIfExistsWithType("ask", "tool") await this.say("tool", completeMessage, undefined, undefined, false) - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ telemetryService.captureToolUsage(this.taskId, block.name, this.api.getModel().id, true, true) // we need an artificial delay to let the diagnostics catch up to the changes @@ -2461,6 +2437,8 @@ export class Task { // If auto-approval is enabled but this tool wasn't auto-approved, send notification showNotificationForApprovalIfAutoApprovalEnabled( `Cline 需要 ${fileExists ? "编辑" : "创建"} ${path.basename(relPath)}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "tool") @@ -2489,7 +2467,7 @@ export class Task { await this.say("user_feedback", text, images, askFiles) await this.saveCheckpoint() } - this.didRejectTool = true + this.taskState.didRejectTool = true didApprove = false telemetryService.captureToolUsage( this.taskId, @@ -2531,7 +2509,7 @@ export class Task { const { newProblemsMessage, userEdits, autoFormattingEdits, finalContent } = await this.diffViewProvider.saveChanges() - this.didEditFile = true // used to determine if we should wait for busy terminal to update before sending api request + this.taskState.didEditFile = true // used to determine if we should wait for busy terminal to update before sending api request // Track file edit operation await this.fileContextTracker.trackFileContext(relPath, "cline_edited") @@ -2609,7 +2587,7 @@ export class Task { break } else { if (!relPath) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("read_file", "path")) await this.saveCheckpoint() break @@ -2623,7 +2601,7 @@ export class Task { break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 const absolutePath = path.resolve(cwd, relPath) const completeMessage = JSON.stringify({ ...sharedMessageProps, @@ -2633,11 +2611,13 @@ export class Task { if (this.shouldAutoApproveToolWithPath(block.name, block.params.path)) { this.removeLastPartialMessageIfExistsWithType("ask", "tool") await this.say("tool", completeMessage, undefined, undefined, false) // need to be sending partialValue bool, since undefined has its own purpose in that the message is treated neither as a partial or completion of a partial, but as a single complete message - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ telemetryService.captureToolUsage(this.taskId, block.name, this.api.getModel().id, true, true) } else { showNotificationForApprovalIfAutoApprovalEnabled( - `Cline 需要读取 ${path.basename(absolutePath)}`, + `Cline 需要读 ${path.basename(absolutePath)}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "tool") const didApprove = await askApproval("tool", completeMessage) @@ -2677,7 +2657,7 @@ export class Task { } } case "list_files": { - const isClaude4ModelFamily = await this.isClaude4ModelFamily() + const isClaude4Model = isClaude4ModelFamily(this.api) const relDirPath: string | undefined = block.params.path const recursiveRaw: string | undefined = block.params.recursive const recursive = recursiveRaw?.toLowerCase() === "true" @@ -2702,15 +2682,12 @@ export class Task { break } else { if (!relDirPath) { - this.consecutiveMistakeCount++ - pushToolResult( - await this.sayAndCreateMissingParamError("list_files", "path"), - isClaude4ModelFamily, - ) + this.taskState.consecutiveMistakeCount++ + pushToolResult(await this.sayAndCreateMissingParamError("list_files", "path"), isClaude4Model) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 const absolutePath = path.resolve(cwd, relDirPath) @@ -2730,11 +2707,13 @@ export class Task { if (this.shouldAutoApproveToolWithPath(block.name, block.params.path)) { this.removeLastPartialMessageIfExistsWithType("ask", "tool") await this.say("tool", completeMessage, undefined, undefined, false) - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ telemetryService.captureToolUsage(this.taskId, block.name, this.api.getModel().id, true, true) } else { showNotificationForApprovalIfAutoApprovalEnabled( - `Cline 需要查看目录 ${path.basename(absolutePath)}/`, + `Cline 查看目录 ${path.basename(absolutePath)}/`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "tool") const didApprove = await askApproval("tool", completeMessage) @@ -2757,12 +2736,12 @@ export class Task { true, ) } - pushToolResult(result, isClaude4ModelFamily) + pushToolResult(result, isClaude4Model) await this.saveCheckpoint() break } } catch (error) { - await handleError("listing files", error, isClaude4ModelFamily) + await handleError("listing files", error, isClaude4Model) await this.saveCheckpoint() break } @@ -2790,13 +2769,13 @@ export class Task { break } else { if (!relDirPath) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("list_code_definition_names", "path")) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 const absolutePath = path.resolve(cwd, relDirPath) const result = await parseSourceCodeForDefinitionsTopLevel( @@ -2812,11 +2791,13 @@ export class Task { if (this.shouldAutoApproveToolWithPath(block.name, block.params.path)) { this.removeLastPartialMessageIfExistsWithType("ask", "tool") await this.say("tool", completeMessage, undefined, undefined, false) - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ telemetryService.captureToolUsage(this.taskId, block.name, this.api.getModel().id, true, true) } else { showNotificationForApprovalIfAutoApprovalEnabled( - `Cline 需要查看 ${path.basename(absolutePath)}/ 中的代码`, + `Cline 查看代码 ${path.basename(absolutePath)}/`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "tool") const didApprove = await askApproval("tool", completeMessage) @@ -2850,7 +2831,7 @@ export class Task { } } case "search_files": { - const isClaude4ModelFamily = await this.isClaude4ModelFamily() + const isClaude4Model = isClaude4ModelFamily(this.api) const relDirPath: string | undefined = block.params.path const regex: string | undefined = block.params.regex const filePattern: string | undefined = block.params.file_pattern @@ -2877,24 +2858,24 @@ export class Task { break } else { if (!relDirPath) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult( await this.sayAndCreateMissingParamError("search_files", "path"), - isClaude4ModelFamily, + isClaude4Model, ) await this.saveCheckpoint() break } if (!regex) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult( await this.sayAndCreateMissingParamError("search_files", "regex"), - isClaude4ModelFamily, + isClaude4Model, ) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 const absolutePath = path.resolve(cwd, relDirPath) const results = await regexSearchFiles( @@ -2913,11 +2894,13 @@ export class Task { if (this.shouldAutoApproveToolWithPath(block.name, block.params.path)) { this.removeLastPartialMessageIfExistsWithType("ask", "tool") await this.say("tool", completeMessage, undefined, undefined, false) - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ telemetryService.captureToolUsage(this.taskId, block.name, this.api.getModel().id, true, true) } else { showNotificationForApprovalIfAutoApprovalEnabled( `Cline wants to search files in ${path.basename(absolutePath)}/`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "tool") const didApprove = await askApproval("tool", completeMessage) @@ -2940,12 +2923,12 @@ export class Task { true, ) } - pushToolResult(results, isClaude4ModelFamily) + pushToolResult(results, isClaude4Model) await this.saveCheckpoint() break } } catch (error) { - await handleError("searching files", error, isClaude4ModelFamily) + await handleError("searching files", error, isClaude4Model) await this.saveCheckpoint() break } @@ -2959,7 +2942,7 @@ export class Task { // checking for action to ensure it is complete and valid if (!block.partial) { // if the block is complete and we don't have a valid action this is a mistake - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("browser_action", "action")) await this.browserSession.closeBrowser() await this.saveCheckpoint() @@ -3005,21 +2988,23 @@ export class Task { let browserActionResult: BrowserActionResult if (action === "launch") { if (!url) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("browser_action", "url")) await this.browserSession.closeBrowser() await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 if (this.shouldAutoApproveTool(block.name)) { this.removeLastPartialMessageIfExistsWithType("ask", "browser_action_launch") await this.say("browser_action_launch", url, undefined, undefined, false) - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ } else { showNotificationForApprovalIfAutoApprovalEnabled( `Cline wants to use a browser and launch ${url}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "browser_action_launch") const didApprove = await askApproval("browser_action_launch", url) @@ -3045,7 +3030,7 @@ export class Task { } else { if (action === "click") { if (!coordinate) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult( await this.sayAndCreateMissingParamError("browser_action", "coordinate"), ) @@ -3056,14 +3041,14 @@ export class Task { } if (action === "type") { if (!text) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("browser_action", "text")) await this.browserSession.closeBrowser() await this.saveCheckpoint() break } } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 await this.say( "browser_action", JSON.stringify({ @@ -3152,20 +3137,20 @@ export class Task { break } else { if (!command) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("execute_command", "command")) await this.saveCheckpoint() break } if (!requiresApprovalRaw) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult( await this.sayAndCreateMissingParamError("execute_command", "requires_approval"), ) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 // gemini models tend to use unescaped html entities in commands if (this.api.getModel().id.includes("gemini")) { @@ -3197,10 +3182,14 @@ export class Task { ) { this.removeLastPartialMessageIfExistsWithType("ask", "command") await this.say("command", command, undefined, undefined, false) - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ didAutoApprove = true } else { - showNotificationForApprovalIfAutoApprovalEnabled(`Cline 需要执行命令: ${command}`) + showNotificationForApprovalIfAutoApprovalEnabled( + `Cline 需要执行命令: ${command}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, + ) // this.removeLastPartialMessageIfExistsWithType("say", "command") const didApprove = await askApproval( "command", @@ -3229,7 +3218,7 @@ export class Task { clearTimeout(timeoutId) } if (userRejected) { - this.didRejectTool = true + this.taskState.didRejectTool = true } // Re-populate file paths in case the command modified the workspace (vscode listeners do not trigger unless the user manually creates/deletes files) @@ -3271,13 +3260,13 @@ export class Task { break } else { if (!server_name) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("use_mcp_tool", "server_name")) await this.saveCheckpoint() break } if (!tool_name) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("use_mcp_tool", "tool_name")) await this.saveCheckpoint() break @@ -3293,8 +3282,8 @@ export class Task { try { parsedArguments = JSON.parse(mcp_arguments) } catch (error) { - this.consecutiveMistakeCount++ - await this.say("error", `Cline 使用 ${tool_name} 但是 JSON 参数无效. 正在重试...`) + this.taskState.consecutiveMistakeCount++ + await this.say("error", `Cline 尝试用无效的JSON参数使用 ${tool_name}. 重试...`) pushToolResult( formatResponse.toolError( formatResponse.invalidMcpToolArgumentError(server_name, tool_name), @@ -3304,7 +3293,7 @@ export class Task { break } } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 const completeMessage = JSON.stringify({ type: "use_mcp_tool", serverName: server_name, @@ -3319,10 +3308,12 @@ export class Task { if (this.shouldAutoApproveTool(block.name) && isToolAutoApproved) { this.removeLastPartialMessageIfExistsWithType("ask", "use_mcp_server") await this.say("use_mcp_server", completeMessage, undefined, undefined, false) - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ } else { showNotificationForApprovalIfAutoApprovalEnabled( `Cline wants to use ${tool_name} on ${server_name}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "use_mcp_server") const didApprove = await askApproval("use_mcp_server", completeMessage) @@ -3334,8 +3325,21 @@ export class Task { // now execute the tool await this.say("mcp_server_request_started") // same as browser_action_result + + // Check for any pending notifications before the tool call + const notificationsBefore = this.mcpHub.getPendingNotifications() + for (const notification of notificationsBefore) { + await this.say("mcp_notification", `[${notification.serverName}] ${notification.message}`) + } + const toolResult = await this.mcpHub.callTool(server_name, tool_name, parsedArguments) + // Check for any pending notifications after the tool call + const notificationsAfter = this.mcpHub.getPendingNotifications() + for (const notification of notificationsAfter) { + await this.say("mcp_notification", `[${notification.serverName}] ${notification.message}`) + } + // TODO: add progress indicator const toolResultImages = @@ -3408,18 +3412,18 @@ export class Task { break } else { if (!server_name) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("access_mcp_resource", "server_name")) await this.saveCheckpoint() break } if (!uri) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("access_mcp_resource", "uri")) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 const completeMessage = JSON.stringify({ type: "access_mcp_resource", serverName: server_name, @@ -3429,10 +3433,12 @@ export class Task { if (this.shouldAutoApproveTool(block.name)) { this.removeLastPartialMessageIfExistsWithType("ask", "use_mcp_server") await this.say("use_mcp_server", completeMessage, undefined, undefined, false) - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ } else { showNotificationForApprovalIfAutoApprovalEnabled( `Cline wants to access ${uri} on ${server_name}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "use_mcp_server") const didApprove = await askApproval("use_mcp_server", completeMessage) @@ -3479,12 +3485,12 @@ export class Task { break } else { if (!question) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("ask_followup_question", "question")) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { showSystemNotification({ @@ -3506,14 +3512,16 @@ export class Task { if (optionsRaw && text && parsePartialArrayString(optionsRaw).includes(text)) { // Valid option selected, don't show user message in UI // Update last followup message with selected option - const lastFollowupMessage = findLast(this.clineMessages, (m) => m.ask === "followup") + const lastFollowupMessage = findLast( + this.messageStateHandler.getClineMessages(), + (m) => m.ask === "followup", + ) if (lastFollowupMessage) { lastFollowupMessage.text = JSON.stringify({ ...sharedMessage, selected: text, } satisfies ClineAskQuestion) - await this.saveClineMessagesAndUpdateHistory() - telemetryService.captureOptionSelected(this.taskId, options.length, "act") + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() } } else { // Option not selected, send user feedback @@ -3546,12 +3554,12 @@ export class Task { break } else { if (!context) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("new_task", "context")) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { showSystemNotification({ @@ -3598,12 +3606,12 @@ export class Task { break } else { if (!context) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("condense", "context")) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { showSystemNotification({ @@ -3632,18 +3640,18 @@ export class Task { } else { // If no response, the user accepted the condensed version pushToolResult(formatResponse.toolResult(formatResponse.condense())) - - const lastMessage = this.apiConversationHistory[this.apiConversationHistory.length - 1] + const apiConversationHistory = this.messageStateHandler.getApiConversationHistory() + const lastMessage = apiConversationHistory[apiConversationHistory.length - 1] const summaryAlreadyAppended = lastMessage && lastMessage.role === "assistant" const keepStrategy = summaryAlreadyAppended ? "lastTwo" : "none" // clear the context history at this point in time this.conversationHistoryDeletedRange = this.contextManager.getNextTruncationRange( - this.apiConversationHistory, + apiConversationHistory, this.conversationHistoryDeletedRange, keepStrategy, ) - await this.saveClineMessagesAndUpdateHistory() + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( Date.now(), await ensureTaskDirectoryExists(this.getContext(), this.taskId), @@ -3681,37 +3689,37 @@ export class Task { break } else { if (!title) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("report_bug", "title")) await this.saveCheckpoint() break } if (!what_happened) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("report_bug", "what_happened")) await this.saveCheckpoint() break } if (!steps_to_reproduce) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("report_bug", "steps_to_reproduce")) await this.saveCheckpoint() break } if (!api_request_output) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("report_bug", "api_request_output")) await this.saveCheckpoint() break } if (!additional_context) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("report_bug", "additional_context")) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { showSystemNotification({ @@ -3726,7 +3734,7 @@ export class Task { vscode.extensions.getExtension("shengsuan-cloud.cline-shengsuan")?.packageJSON.version || "Unknown" const systemInfo = `VSCode: ${vscode.version}, Node.js: ${process.version}, Architecture: ${os.arch()}` - const providerAndModel = `${(await getGlobalState(this.getContext(), "apiProvider")) as string} / ${this.api.getModel().id}` + const providerAndModel = `${(await getWorkspaceState(this.getContext(), "apiProvider")) as string} / ${this.api.getModel().id}` // Ask user for confirmation const bugReportData = JSON.stringify({ @@ -3823,13 +3831,13 @@ export class Task { break } else { if (!url) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("web_fetch", "url")) await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 const completeMessage = JSON.stringify({ ...sharedMessageProps, operationIsLocatedInWorkspace: false, @@ -3838,7 +3846,7 @@ export class Task { if (this.shouldAutoApproveTool("web_fetch" as ToolUseName)) { this.removeLastPartialMessageIfExistsWithType("ask", "tool") await this.say("tool", completeMessage, undefined, undefined, false) - this.consecutiveAutoApprovedRequestsCount++ + this.taskState.consecutiveAutoApprovedRequestsCount++ telemetryService.captureToolUsage( this.taskId, "web_fetch" as ToolUseName, @@ -3847,7 +3855,11 @@ export class Task { true, ) } else { - showNotificationForApprovalIfAutoApprovalEnabled(`Cline wants to fetch content from ${url}`) + showNotificationForApprovalIfAutoApprovalEnabled( + `Cline wants to fetch content from ${url}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, + ) this.removeLastPartialMessageIfExistsWithType("say", "tool") const didApprove = await askApproval("tool", completeMessage) if (!didApprove) { @@ -3905,12 +3917,12 @@ export class Task { break } else { if (!response) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("plan_mode_respond", "response")) // break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 // if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { // showSystemNotification({ @@ -3922,13 +3934,13 @@ export class Task { // Store the number of options for telemetry const options = parsePartialArrayString(optionsRaw || "[]") - this.isAwaitingPlanResponse = true + this.taskState.isAwaitingPlanResponse = true let { text, images, files: planResponseFiles, } = await this.ask("plan_mode_respond", JSON.stringify(sharedMessage), false) - this.isAwaitingPlanResponse = false + this.taskState.isAwaitingPlanResponse = false // webview invoke sendMessage will send this marker in order to put webview into the proper state (responding to an ask) and as a flag to extension that the user switched to ACT mode. if (text === "PLAN_MODE_TOGGLE_RESPONSE") { @@ -3939,14 +3951,16 @@ export class Task { if (optionsRaw && text && parsePartialArrayString(optionsRaw).includes(text)) { // Valid option selected, don't show user message in UI // Update last followup message with selected option - const lastPlanMessage = findLast(this.clineMessages, (m) => m.ask === "plan_mode_respond") + const lastPlanMessage = findLast( + this.messageStateHandler.getClineMessages(), + (m) => m.ask === "plan_mode_respond", + ) if (lastPlanMessage) { lastPlanMessage.text = JSON.stringify({ ...sharedMessage, selected: text, } satisfies ClinePlanModeResponse) - await this.saveClineMessagesAndUpdateHistory() - telemetryService.captureOptionSelected(this.taskId, options.length, "plan") + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() } } else { // Option not selected, send user feedback @@ -3966,7 +3980,7 @@ export class Task { fileContentString = await processFilesIntoText(planResponseFiles) } - if (this.didRespondToPlanAskBySwitchingMode) { + if (this.taskState.didRespondToPlanAskBySwitchingMode) { pushToolResult( formatResponse.toolResult( `[The user has switched to ACT MODE, so you may now proceed with the task.]` + @@ -4014,7 +4028,7 @@ export class Task { } case "attempt_completion": { /* - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 let resultToSend = result if (command) { await this.say("completion_result", resultToSend) @@ -4040,19 +4054,31 @@ export class Task { // Add newchanges flag if there are new changes to the workspace const hasNewChanges = await this.doesLatestTaskCompletionHaveNewChanges() - const lastCompletionResultMessage = findLast(this.clineMessages, (m) => m.say === "completion_result") + + const clineMessages = this.messageStateHandler.getClineMessages() + + const lastCompletionResultMessageIndex = findLastIndex( + clineMessages, + (m) => m.say === "completion_result", + ) + const lastCompletionResultMessage = + lastCompletionResultMessageIndex !== -1 + ? clineMessages[lastCompletionResultMessageIndex] + : undefined if ( lastCompletionResultMessage && + lastCompletionResultMessageIndex !== -1 && hasNewChanges && !lastCompletionResultMessage.text?.endsWith(COMPLETION_RESULT_CHANGES_FLAG) ) { - lastCompletionResultMessage.text += COMPLETION_RESULT_CHANGES_FLAG + await this.messageStateHandler.updateClineMessage(lastCompletionResultMessageIndex, { + text: lastCompletionResultMessage.text + COMPLETION_RESULT_CHANGES_FLAG, + }) } - await this.saveClineMessagesAndUpdateHistory() } try { - const lastMessage = this.clineMessages.at(-1) + const lastMessage = this.messageStateHandler.getClineMessages().at(-1) if (block.partial) { if (command) { // the attempt_completion text is done, now we're getting command @@ -4094,11 +4120,11 @@ export class Task { break } else { if (!result) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult(await this.sayAndCreateMissingParamError("attempt_completion", "result")) break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { showSystemNotification({ @@ -4128,7 +4154,7 @@ export class Task { } const [userRejected, execCommandResult] = await this.executeCommandTool(command!) if (userRejected) { - this.didRejectTool = true + this.taskState.didRejectTool = true pushToolResult(execCommandResult) await this.saveCheckpoint() break @@ -4172,11 +4198,11 @@ export class Task { text: `The user has provided feedback on the results. Consider their input to continue the task, and then attempt completion again.\n\n${text}\n`, }) toolResults.push(...formatResponse.imageBlocks(images)) - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: `${toolDescription()} Result:`, }) - this.userMessageContent.push(...toolResults) + this.taskState.userMessageContent.push(...toolResults) let fileContentString = "" if (completionFiles && completionFiles.length > 0) { @@ -4184,7 +4210,7 @@ export class Task { } if (fileContentString) { - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: fileContentString, }) @@ -4207,20 +4233,20 @@ export class Task { Seeing out of bounds is fine, it means that the next too call is being built up and ready to add to assistantMessageContent to present. When you see the UI inactive during this, it means that a tool is breaking without presenting any UI. For example the write_to_file tool was breaking when relpath was undefined, and for invalid relpath it never presented UI. */ - this.presentAssistantMessageLocked = false // this needs to be placed here, if not then calling this.presentAssistantMessage below would fail (sometimes) since it's locked + this.taskState.presentAssistantMessageLocked = false // this needs to be placed here, if not then calling this.presentAssistantMessage below would fail (sometimes) since it's locked // NOTE: when tool is rejected, iterator stream is interrupted and it waits for userMessageContentReady to be true. Future calls to present will skip execution since didRejectTool and iterate until contentIndex is set to message length and it sets userMessageContentReady to true itself (instead of preemptively doing it in iterator) - if (!block.partial || this.didRejectTool || this.didAlreadyUseTool) { + if (!block.partial || this.taskState.didRejectTool || this.taskState.didAlreadyUseTool) { // block is finished streaming and executing - if (this.currentStreamingContentIndex === this.assistantMessageContent.length - 1) { + if (this.taskState.currentStreamingContentIndex === this.taskState.assistantMessageContent.length - 1) { // its okay that we increment if !didCompleteReadingStream, it'll just return bc out of bounds and as streaming continues it will call presentAssistantMessage if a new block is ready. if streaming is finished then we set userMessageContentReady to true when out of bounds. This gracefully allows the stream to continue on and all potential content blocks be presented. // last block is complete and it is finished executing - this.userMessageContentReady = true // will allow pwaitfor to continue + this.taskState.userMessageContentReady = true // will allow pwaitfor to continue } // call next block if it exists (if not then read stream will call it when its ready) - this.currentStreamingContentIndex++ // need to increment regardless, so when read stream calls this function again it will be streaming the next block + this.taskState.currentStreamingContentIndex++ // need to increment regardless, so when read stream calls this function again it will be streaming the next block - if (this.currentStreamingContentIndex < this.assistantMessageContent.length) { + if (this.taskState.currentStreamingContentIndex < this.taskState.assistantMessageContent.length) { // there are already more content blocks to stream, so we'll call this function ourselves // await this.presentAssistantContent() @@ -4229,25 +4255,25 @@ export class Task { } } // block is partial, but the read stream may have finished - if (this.presentAssistantMessageHasPendingUpdates) { + if (this.taskState.presentAssistantMessageHasPendingUpdates) { this.presentAssistantMessage() } } async recursivelyMakeClineRequests(userContent: UserContent, includeFileDetails: boolean = false): Promise { - if (this.abort) { + if (this.taskState.abort) { throw new Error("Cline instance aborted") } // Used to know what models were used in the task if user wants to export metadata for error reporting purposes - const currentProviderId = (await getGlobalState(this.getContext(), "apiProvider")) as string + const currentProviderId = (await getWorkspaceState(this.getContext(), "apiProvider")) as string if (currentProviderId && this.api.getModel().id) { try { await this.modelContextTracker.recordModelUsage(currentProviderId, this.api.getModel().id, this.chatSettings.mode) } catch {} } - if (this.consecutiveMistakeCount >= 3) { + if (this.taskState.consecutiveMistakeCount >= 3) { if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { showSystemNotification({ subtitle: "Error", @@ -4285,12 +4311,12 @@ export class Task { userContent = feedbackUserContent } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 } if ( this.autoApprovalSettings.enabled && - this.consecutiveAutoApprovedRequestsCount >= this.autoApprovalSettings.maxRequests + this.taskState.consecutiveAutoApprovedRequestsCount >= this.autoApprovalSettings.maxRequests ) { if (this.autoApprovalSettings.enableNotifications) { showSystemNotification({ @@ -4303,14 +4329,14 @@ export class Task { `Cline has auto-approved ${this.autoApprovalSettings.maxRequests.toString()} API requests. Would you like to reset the count and proceed with the task?`, ) // if we get past the promise it means the user approved and did not start a new task - this.consecutiveAutoApprovedRequestsCount = 0 + this.taskState.consecutiveAutoApprovedRequestsCount = 0 } // get previous api req's index to check token usage and determine if we need to truncate conversation history - const previousApiReqIndex = findLastIndex(this.clineMessages, (m) => m.say === "api_req_started") + const previousApiReqIndex = findLastIndex(this.messageStateHandler.getClineMessages(), (m) => m.say === "api_req_started") // Save checkpoint if this is the first API request - const isFirstRequest = this.clineMessages.filter((m) => m.say === "api_req_started").length === 0 + const isFirstRequest = this.messageStateHandler.getClineMessages().filter((m) => m.say === "api_req_started").length === 0 // getting verbose details is an expensive operation, it uses globby to top-down build file structure of project which for large projects can take a few seconds // for the best UX we show a placeholder api_req_started message with a loading spinner as this happens @@ -4322,7 +4348,12 @@ export class Task { ) // Initialize checkpoint tracker first if enabled and it's the first request - if (isFirstRequest && this.enableCheckpoints && !this.checkpointTracker && !this.checkpointTrackerErrorMessage) { + if ( + isFirstRequest && + this.enableCheckpoints && + !this.checkpointTracker && + !this.taskState.checkpointTrackerErrorMessage + ) { try { this.checkpointTracker = await pTimeout( CheckpointTracker.create(this.taskId, this.context.globalStorageUri.fsPath, this.enableCheckpoints), @@ -4335,23 +4366,33 @@ export class Task { } catch (error) { const errorMessage = error instanceof Error ? error.message : "Unknown error" console.error("Failed to initialize checkpoint tracker:", errorMessage) - this.checkpointTrackerErrorMessage = errorMessage // will be displayed right away since we saveClineMessages next which posts state to webview + this.taskState.checkpointTrackerErrorMessage = errorMessage // will be displayed right away since we saveClineMessages next which posts state to webview } } // Now, if it's the first request AND checkpoints are enabled AND tracker was successfully initialized, // then say "checkpoint_created" and perform the commit. if (isFirstRequest && this.enableCheckpoints && this.checkpointTracker) { - await this.say("checkpoint_created") // Now this is conditional const commitHash = await this.checkpointTracker.commit() // Actual commit - const lastCheckpointMessage = findLast(this.clineMessages, (m) => m.say === "checkpoint_created") - if (lastCheckpointMessage) { - lastCheckpointMessage.lastCheckpointHash = commitHash + await this.say("checkpoint_created") // Now this is conditional + const lastCheckpointMessageIndex = findLastIndex( + this.messageStateHandler.getClineMessages(), + (m) => m.say === "checkpoint_created", + ) + if (lastCheckpointMessageIndex !== -1) { + await this.messageStateHandler.updateClineMessage(lastCheckpointMessageIndex, { + lastCheckpointHash: commitHash, + }) // saveClineMessagesAndUpdateHistory will be called later after API response, // so no need to call it here unless this is the only modification to this message. // For now, assuming it's handled later. } - } else if (isFirstRequest && this.enableCheckpoints && !this.checkpointTracker && this.checkpointTrackerErrorMessage) { + } else if ( + isFirstRequest && + this.enableCheckpoints && + !this.checkpointTracker && + this.taskState.checkpointTrackerErrorMessage + ) { // Checkpoints are enabled, but tracker failed to initialize. // checkpointTrackerErrorMessage is already set and will be part of the state. // No explicit UI message here, error message will be in ExtensionState. @@ -4371,7 +4412,7 @@ export class Task { // add environment details as its own text block, separate from tool results userContent.push({ type: "text", text: environmentDetails }) - await this.addToApiConversationHistory({ + await this.messageStateHandler.addToApiConversationHistory({ role: "user", content: userContent, }) @@ -4379,11 +4420,12 @@ export class Task { telemetryService.captureConversationTurnEvent(this.taskId, currentProviderId, this.api.getModel().id, "user", true) // since we sent off a placeholder api_req_started message to update the webview while waiting to actually start the API request (to load potential details for example), we need to update the text of that message - const lastApiReqIndex = findLastIndex(this.clineMessages, (m) => m.say === "api_req_started") - this.clineMessages[lastApiReqIndex].text = JSON.stringify({ - request: userContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n"), - } satisfies ClineApiReqInfo) - await this.saveClineMessagesAndUpdateHistory() + const lastApiReqIndex = findLastIndex(this.messageStateHandler.getClineMessages(), (m) => m.say === "api_req_started") + await this.messageStateHandler.updateClineMessage(lastApiReqIndex, { + text: JSON.stringify({ + request: userContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n"), + } satisfies ClineApiReqInfo), + }) await this.postStateToWebview() try { @@ -4393,40 +4435,13 @@ export class Task { let outputTokens = 0 let totalCost: number | undefined - // update api_req_started. we can't use api_req_finished anymore since it's a unique case where it could come after a streaming message (ie in the middle of being updated or executed) - // fortunately api_req_finished was always parsed out for the gui anyways, so it remains solely for legacy purposes to keep track of prices in tasks from history - // (it's worth removing a few months from now) - const updateApiReqMsg = (cancelReason?: ClineApiReqCancelReason, streamingFailedMessage?: string) => { - const currentApiReqInfo: ClineApiReqInfo = JSON.parse(this.clineMessages[lastApiReqIndex].text || "{}") - delete currentApiReqInfo.retryStatus // Clear retry status when request is finalized - - this.clineMessages[lastApiReqIndex].text = JSON.stringify({ - ...currentApiReqInfo, // Spread the modified info (with retryStatus removed) - tokensIn: inputTokens, - tokensOut: outputTokens, - cacheWrites: cacheWriteTokens, - cacheReads: cacheReadTokens, - cost: - totalCost ?? - calculateApiCostAnthropic( - this.api.getModel().info, - inputTokens, - outputTokens, - cacheWriteTokens, - cacheReadTokens, - ), - cancelReason, - streamingFailedMessage, - } satisfies ClineApiReqInfo) - } - const abortStream = async (cancelReason: ClineApiReqCancelReason, streamingFailedMessage?: string) => { if (this.diffViewProvider.isEditing) { await this.diffViewProvider.revertChanges() // closes diff view } // if last message is a partial we need to update and save it - const lastMessage = this.clineMessages.at(-1) + const lastMessage = this.messageStateHandler.getClineMessages().at(-1) if (lastMessage && lastMessage.partial) { // lastMessage.ts = Date.now() DO NOT update ts since it is used as a key for virtuoso list lastMessage.partial = false @@ -4436,7 +4451,7 @@ export class Task { } // Let assistant know their response was interrupted for when task is resumed - await this.addToApiConversationHistory({ + await this.messageStateHandler.addToApiConversationHistory({ role: "assistant", content: [ { @@ -4453,8 +4468,19 @@ export class Task { }) // update api_req_started to have cancelled and cost, so that we can display the cost of the partial stream - updateApiReqMsg(cancelReason, streamingFailedMessage) - await this.saveClineMessagesAndUpdateHistory() + await updateApiReqMsg({ + messageStateHandler: this.messageStateHandler, + lastApiReqIndex, + inputTokens, + outputTokens, + cacheWriteTokens, + cacheReadTokens, + totalCost, + api: this.api, + cancelReason, + streamingFailedMessage, + }) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() telemetryService.captureConversationTurnEvent( this.taskId, @@ -4465,26 +4491,26 @@ export class Task { ) // signals to provider that it can retrieve the saved messages from disk, as abortTask can not be awaited on in nature - this.didFinishAbortingStream = true + this.taskState.didFinishAbortingStream = true } // reset streaming state - this.currentStreamingContentIndex = 0 - this.assistantMessageContent = [] - this.didCompleteReadingStream = false - this.userMessageContent = [] - this.userMessageContentReady = false - this.didRejectTool = false - this.didAlreadyUseTool = false - this.presentAssistantMessageLocked = false - this.presentAssistantMessageHasPendingUpdates = false - this.didAutomaticallyRetryFailedApiRequest = false + this.taskState.currentStreamingContentIndex = 0 + this.taskState.assistantMessageContent = [] + this.taskState.didCompleteReadingStream = false + this.taskState.userMessageContent = [] + this.taskState.userMessageContentReady = false + this.taskState.didRejectTool = false + this.taskState.didAlreadyUseTool = false + this.taskState.presentAssistantMessageLocked = false + this.taskState.presentAssistantMessageHasPendingUpdates = false + this.taskState.didAutomaticallyRetryFailedApiRequest = false await this.diffViewProvider.reset() const stream = this.attemptApiRequest(previousApiReqIndex) // yields only if the first chunk is successful, otherwise will allow the user to retry the request (most likely due to rate limit error, which gets thrown on the first chunk) let assistantMessage = "" let reasoningMessage = "" - this.isStreaming = true + this.taskState.isStreaming = true let didReceiveUsageChunk = false try { for await (const chunk of stream) { @@ -4504,7 +4530,7 @@ export class Task { // reasoning will always come before assistant message reasoningMessage += chunk.reasoning // fixes bug where cancelling task > aborts task > for loop may be in middle of streaming reasoning > say function throws error before we get a chance to properly clean up and cancel the task. - if (!this.abort) { + if (!this.taskState.abort) { await this.say("reasoning", reasoningMessage, undefined, undefined, true) } break @@ -4515,33 +4541,32 @@ export class Task { } assistantMessage += chunk.text // parse raw assistant message into content blocks - const prevLength = this.assistantMessageContent.length - const isClaude4ModelFamily = await this.isClaude4ModelFamily() - - if (isClaude4ModelFamily && USE_EXPERIMENTAL_CLAUDE4_FEATURES) { - this.assistantMessageContent = parseAssistantMessageV3(assistantMessage) + const prevLength = this.taskState.assistantMessageContent.length + const isClaude4Model = isClaude4ModelFamily(this.api) + if (isClaude4Model && USE_EXPERIMENTAL_CLAUDE4_FEATURES) { + this.taskState.assistantMessageContent = parseAssistantMessageV3(assistantMessage) } else { - this.assistantMessageContent = parseAssistantMessageV2(assistantMessage) + this.taskState.assistantMessageContent = parseAssistantMessageV2(assistantMessage) } - if (this.assistantMessageContent.length > prevLength) { - this.userMessageContentReady = false // new content we need to present, reset to false in case previous content set this to true + if (this.taskState.assistantMessageContent.length > prevLength) { + this.taskState.userMessageContentReady = false // new content we need to present, reset to false in case previous content set this to true } // present content to user this.presentAssistantMessage() break } - if (this.abort) { + if (this.taskState.abort) { console.log("aborting stream...") - if (!this.abandoned) { + if (!this.taskState.abandoned) { // only need to gracefully abort if this instance isn't abandoned (sometimes openrouter stream hangs, in which case this would affect future instances of cline) await abortStream("user_cancelled") } break // aborts the stream } - if (this.didRejectTool) { + if (this.taskState.didRejectTool) { // userContent has a tool rejection, so interrupt the assistant's response to present the user's feedback assistantMessage += "\n\n[Response interrupted by user feedback]" // this.userMessageContentReady = true // instead of setting this preemptively, we allow the present iterator to finish and set userMessageContentReady when its ready @@ -4550,7 +4575,7 @@ export class Task { // PREV: we need to let the request finish for openrouter to get generation details // UPDATE: it's better UX to interrupt the request at the cost of the api cost not being retrieved - if (this.didAlreadyUseTool) { + if (this.taskState.didAlreadyUseTool) { assistantMessage += "\n\n[Response interrupted by a tool use result. Only one tool may be used at a time and should be placed at the end of the message.]" break @@ -4558,15 +4583,15 @@ export class Task { } } catch (error) { // abandoned happens when extension is no longer waiting for the cline instance to finish aborting (error is thrown here when any function in the for loop throws due to this.abort) - if (!this.abandoned) { + if (!this.taskState.abandoned) { this.abortTask() // if the stream failed, there's various states the task could be in (i.e. could have streamed some tools the user may have executed), so we just resort to replicating a cancel task - const errorMessage = this.formatErrorWithStatusCode(error) + const errorMessage = formatErrorWithStatusCode(error) await abortStream("streaming_failed", errorMessage) await this.reinitExistingTaskFromId(this.taskId) } } finally { - this.isStreaming = false + this.taskState.isStreaming = false } // OpenRouter/Cline may not return token usage as part of the stream (since it may abort early), so we fetch after the stream is finished @@ -4580,22 +4605,31 @@ export class Task { cacheReadTokens += apiStreamUsage.cacheReadTokens ?? 0 totalCost = apiStreamUsage.totalCost } - updateApiReqMsg() - await this.saveClineMessagesAndUpdateHistory() + await updateApiReqMsg({ + messageStateHandler: this.messageStateHandler, + lastApiReqIndex, + inputTokens, + outputTokens, + cacheWriteTokens, + cacheReadTokens, + api: this.api, + totalCost, + }) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.postStateToWebview() }) } // need to call here in case the stream was aborted - if (this.abort) { + if (this.taskState.abort) { throw new Error("Cline instance aborted") } - this.didCompleteReadingStream = true + this.taskState.didCompleteReadingStream = true // set any blocks to be complete to allow presentAssistantMessage to finish and set userMessageContentReady to true // (could be a text block that had no subsequent tool uses, or a text block at the very end, or an invalid tool use, etc. whatever the case, presentAssistantMessage relies on these blocks either to be completed or the user to reject a block in order to proceed and eventually set userMessageContentReady to true) - const partialBlocks = this.assistantMessageContent.filter((block) => block.partial) + const partialBlocks = this.taskState.assistantMessageContent.filter((block) => block.partial) partialBlocks.forEach((block) => { block.partial = false }) @@ -4604,8 +4638,17 @@ export class Task { this.presentAssistantMessage() // if there is content to update then it will complete and update this.userMessageContentReady to true, which we pwaitfor before making the next request. all this is really doing is presenting the last partial message that we just set to complete } - updateApiReqMsg() - await this.saveClineMessagesAndUpdateHistory() + await updateApiReqMsg({ + messageStateHandler: this.messageStateHandler, + lastApiReqIndex, + inputTokens, + outputTokens, + cacheWriteTokens, + cacheReadTokens, + api: this.api, + totalCost, + }) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.postStateToWebview() // now add to apiconversationhistory @@ -4620,7 +4663,7 @@ export class Task { true, ) - await this.addToApiConversationHistory({ + await this.messageStateHandler.addToApiConversationHistory({ role: "assistant", content: [{ type: "text", text: assistantMessage }], }) @@ -4633,21 +4676,21 @@ export class Task { // this.userMessageContentReady = true // } - await pWaitFor(() => this.userMessageContentReady) + await pWaitFor(() => this.taskState.userMessageContentReady) // if the model did not tool use, then we need to tell it to either use a tool or attempt_completion - const didToolUse = this.assistantMessageContent.some((block) => block.type === "tool_use") + const didToolUse = this.taskState.assistantMessageContent.some((block) => block.type === "tool_use") if (!didToolUse) { // normal request where tool use is required - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: formatResponse.noToolsUsed(), }) - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ } - const recDidEndLoop = await this.recursivelyMakeClineRequests(this.userMessageContent) + const recDidEndLoop = await this.recursivelyMakeClineRequests(this.taskState.userMessageContent) didEndLoop = recDidEndLoop } else { // if there's no assistant_responses, that means we got no text or tool_use content blocks from API which we should assume is an error @@ -4655,7 +4698,7 @@ export class Task { "error", "Unexpected API Response: The language model did not provide any assistant messages. This may indicate an issue with the API or the model's output.", ) - await this.addToApiConversationHistory({ + await this.messageStateHandler.addToApiConversationHistory({ role: "assistant", content: [ { @@ -4783,7 +4826,7 @@ export class Task { const inactiveTerminals = this.terminalManager.getTerminals(false) // const allTerminals = [...busyTerminals, ...inactiveTerminals] - if (busyTerminals.length > 0 && this.didEditFile) { + if (busyTerminals.length > 0 && this.taskState.didEditFile) { // || this.didEditFile await setTimeoutPromise(300) // delay after saving file to let terminals catch up } @@ -4815,7 +4858,7 @@ export class Task { } } */ - this.didEditFile = false // reset, this lets us know when to wait for saved files to update terminals + this.taskState.didEditFile = false // reset, this lets us know when to wait for saved files to update terminals // waiting for updated diagnostics lets terminal output be the most up-to-date possible let terminalDetails = "" @@ -4919,7 +4962,8 @@ export class Task { } } - const modifiedMessages = combineApiRequests(combineCommandSequences(this.clineMessages.slice(1))) + const clineMessages = this.messageStateHandler.getClineMessages() + const modifiedMessages = combineApiRequests(combineCommandSequences(clineMessages.slice(1))) const lastApiReqMessage = findLast(modifiedMessages, (msg) => { if (msg.say !== "api_req_started") { return false diff --git a/src/core/task/message-state.ts b/src/core/task/message-state.ts new file mode 100644 index 00000000..75fb2282 --- /dev/null +++ b/src/core/task/message-state.ts @@ -0,0 +1,141 @@ +import { combineApiRequests } from "@/shared/combineApiRequests" +import { ensureTaskDirectoryExists, saveApiConversationHistory, saveClineMessages } from "../storage/disk" +import * as vscode from "vscode" +import { ClineMessage } from "@/shared/ExtensionMessage" +import { getApiMetrics } from "@/shared/getApiMetrics" +import { combineCommandSequences } from "@/shared/combineCommandSequences" +import { findLastIndex } from "@/shared/array" +import getFolderSize from "get-folder-size" +import os from "os" +import * as path from "path" +import CheckpointTracker from "@integrations/checkpoints/CheckpointTracker" +import { HistoryItem } from "@/shared/HistoryItem" +import Anthropic from "@anthropic-ai/sdk" + +interface MessageStateHandlerParams { + context: vscode.ExtensionContext + taskId: string + conversationHistoryDeletedRange?: [number, number] + taskIsFavorited?: boolean + updateTaskHistory: (historyItem: HistoryItem) => Promise +} + +const cwd = vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0) ?? path.join(os.homedir(), "Desktop") // may or may not exist but fs checking existence would immediately ask for permission which would be bad UX, need to come up with a better solution + +export class MessageStateHandler { + private apiConversationHistory: Anthropic.MessageParam[] = [] + private clineMessages: ClineMessage[] = [] + private conversationHistoryDeletedRange: [number, number] | undefined + private taskIsFavorited: boolean + private checkpointTracker: CheckpointTracker | undefined + private updateTaskHistory: (historyItem: HistoryItem) => Promise + private context: vscode.ExtensionContext + private taskId: string + + constructor(params: MessageStateHandlerParams) { + this.context = params.context + this.taskId = params.taskId + this.conversationHistoryDeletedRange = params.conversationHistoryDeletedRange + this.taskIsFavorited = params.taskIsFavorited ?? false + this.updateTaskHistory = params.updateTaskHistory + } + + setCheckpointTracker(tracker: CheckpointTracker | undefined) { + this.checkpointTracker = tracker + } + + getApiConversationHistory(): Anthropic.MessageParam[] { + return this.apiConversationHistory + } + + setApiConversationHistory(newHistory: Anthropic.MessageParam[]): void { + this.apiConversationHistory = newHistory + } + + getClineMessages(): ClineMessage[] { + return this.clineMessages + } + + setClineMessages(newMessages: ClineMessage[]) { + this.clineMessages = newMessages + } + + async saveClineMessagesAndUpdateHistory(): Promise { + try { + await saveClineMessages(this.context, this.taskId, this.clineMessages) + + // combined as they are in ChatView + const apiMetrics = getApiMetrics(combineApiRequests(combineCommandSequences(this.clineMessages.slice(1)))) + const taskMessage = this.clineMessages[0] // first message is always the task say + const lastRelevantMessage = + this.clineMessages[ + findLastIndex( + this.clineMessages, + (message) => !(message.ask === "resume_task" || message.ask === "resume_completed_task"), + ) + ] + const taskDir = await ensureTaskDirectoryExists(this.context, this.taskId) + let taskDirSize = 0 + try { + // getFolderSize.loose silently ignores errors + // returns # of bytes, size/1000/1000 = MB + taskDirSize = await getFolderSize.loose(taskDir) + } catch (error) { + console.error("Failed to get task directory size:", taskDir, error) + } + await this.updateTaskHistory({ + id: this.taskId, + ts: lastRelevantMessage.ts, + task: taskMessage.text ?? "", + tokensIn: apiMetrics.totalTokensIn, + tokensOut: apiMetrics.totalTokensOut, + cacheWrites: apiMetrics.totalCacheWrites, + cacheReads: apiMetrics.totalCacheReads, + totalCost: apiMetrics.totalCost, + size: taskDirSize, + shadowGitConfigWorkTree: await this.checkpointTracker?.getShadowGitConfigWorkTree(), + cwdOnTaskInitialization: cwd, + conversationHistoryDeletedRange: this.conversationHistoryDeletedRange, + isFavorited: this.taskIsFavorited, + }) + } catch (error) { + console.error("Failed to save cline messages:", error) + } + } + + async addToApiConversationHistory(message: Anthropic.MessageParam) { + this.apiConversationHistory.push(message) + await saveApiConversationHistory(this.context, this.taskId, this.apiConversationHistory) + } + + async overwriteApiConversationHistory(newHistory: Anthropic.MessageParam[]): Promise { + this.apiConversationHistory = newHistory + await saveApiConversationHistory(this.context, this.taskId, this.apiConversationHistory) + } + + async addToClineMessages(message: ClineMessage) { + // these values allow us to reconstruct the conversation history at the time this cline message was created + // it's important that apiConversationHistory is initialized before we add cline messages + message.conversationHistoryIndex = this.apiConversationHistory.length - 1 // NOTE: this is the index of the last added message which is the user message, and once the clinemessages have been presented we update the apiconversationhistory with the completed assistant message. This means when resetting to a message, we need to +1 this index to get the correct assistant message that this tool use corresponds to + message.conversationHistoryDeletedRange = this.conversationHistoryDeletedRange + this.clineMessages.push(message) + await this.saveClineMessagesAndUpdateHistory() + } + + async overwriteClineMessages(newMessages: ClineMessage[]) { + this.clineMessages = newMessages + await this.saveClineMessagesAndUpdateHistory() + } + + async updateClineMessage(index: number, updates: Partial): Promise { + if (index < 0 || index >= this.clineMessages.length) { + throw new Error(`Invalid message index: ${index}`) + } + + // Apply updates to the message + Object.assign(this.clineMessages[index], updates) + + // Save changes and update history + await this.saveClineMessagesAndUpdateHistory() + } +} diff --git a/src/core/task/utils.ts b/src/core/task/utils.ts new file mode 100644 index 00000000..e0ff8d06 --- /dev/null +++ b/src/core/task/utils.ts @@ -0,0 +1,70 @@ +import { showSystemNotification } from "@/integrations/notifications" +import { ClineApiReqCancelReason, ClineApiReqInfo } from "@/shared/ExtensionMessage" +import { serializeError } from "serialize-error" +import { MessageStateHandler } from "./message-state" +import { calculateApiCostAnthropic } from "@/utils/cost" +import { ApiHandler } from "@/api" + +export function formatErrorWithStatusCode(error: any): string { + const statusCode = error.status || error.statusCode || (error.response && error.response.status) + const message = error.message ?? JSON.stringify(serializeError(error), null, 2) + + // Only prepend the statusCode if it's not already part of the message + return statusCode && !message.includes(statusCode.toString()) ? `${statusCode} - ${message}` : message +} + +export const showNotificationForApprovalIfAutoApprovalEnabled = ( + message: string, + autoApprovalSettingsEnabled: boolean, + notificationsEnabled: boolean, +) => { + if (autoApprovalSettingsEnabled && notificationsEnabled) { + showSystemNotification({ + subtitle: "Approval Required", + message, + }) + } +} + +type UpdateApiReqMsgParams = { + messageStateHandler: MessageStateHandler + lastApiReqIndex: number + inputTokens: number + outputTokens: number + cacheWriteTokens: number + cacheReadTokens: number + totalCost?: number + api: ApiHandler + cancelReason?: ClineApiReqCancelReason + streamingFailedMessage?: string +} + +// update api_req_started. we can't use api_req_finished anymore since it's a unique case where it could come after a streaming message (ie in the middle of being updated or executed) +// fortunately api_req_finished was always parsed out for the gui anyways, so it remains solely for legacy purposes to keep track of prices in tasks from history +// (it's worth removing a few months from now) +export const updateApiReqMsg = async (params: UpdateApiReqMsgParams) => { + const clineMessages = params.messageStateHandler.getClineMessages() + const currentApiReqInfo: ClineApiReqInfo = JSON.parse(clineMessages[params.lastApiReqIndex].text || "{}") + delete currentApiReqInfo.retryStatus // Clear retry status when request is finalized + + await params.messageStateHandler.updateClineMessage(params.lastApiReqIndex, { + text: JSON.stringify({ + ...currentApiReqInfo, // Spread the modified info (with retryStatus removed) + tokensIn: params.inputTokens, + tokensOut: params.outputTokens, + cacheWrites: params.cacheWriteTokens, + cacheReads: params.cacheReadTokens, + cost: + params.totalCost ?? + calculateApiCostAnthropic( + params.api.getModel().info, + params.inputTokens, + params.outputTokens, + params.cacheWriteTokens, + params.cacheReadTokens, + ), + cancelReason: params.cancelReason, + streamingFailedMessage: params.streamingFailedMessage, + } satisfies ClineApiReqInfo), + }) +} diff --git a/src/core/webview/index.ts b/src/core/webview/index.ts index 607dbaf3..d4d8eb78 100644 --- a/src/core/webview/index.ts +++ b/src/core/webview/index.ts @@ -9,6 +9,8 @@ import { readFile } from "fs/promises" import path from "node:path" import { WebviewProviderType } from "@/shared/webview/types" import { sendThemeEvent } from "@core/controller/ui/subscribeToTheme" +import { v4 as uuidv4 } from "uuid" +import { sendDidBecomeVisibleEvent } from "../controller/ui/subscribeToDidBecomeVisible" /* https://github.com/microsoft/vscode-webview-ui-toolkit-samples/blob/main/default/weather-webview/src/providers/WeatherViewProvider.ts @@ -19,9 +21,11 @@ export class WebviewProvider implements vscode.WebviewViewProvider { public static readonly sideBarId = "ClineShengsuan.SidebarProvider" // used in package.json as the view's id. This value cannot be changed due to how vscode caches views based on their id, and updating the id would break existing instances of the extension. public static readonly tabPanelId = "ClineShengsuan.TabPanelProvider" private static activeInstances: Set = new Set() + private static clientIdMap = new Map() public view?: vscode.WebviewView | vscode.WebviewPanel private disposables: vscode.Disposable[] = [] controller: Controller + private clientId: string constructor( readonly context: vscode.ExtensionContext, @@ -29,9 +33,21 @@ export class WebviewProvider implements vscode.WebviewViewProvider { private readonly providerType: WebviewProviderType = WebviewProviderType.TAB, // Default to tab provider ) { WebviewProvider.activeInstances.add(this) + this.clientId = uuidv4() + WebviewProvider.clientIdMap.set(this, this.clientId) this.controller = new Controller(context, outputChannel, (message) => this.view?.webview.postMessage(message)) } + // Add a method to get the client ID + public getClientId(): string { + return this.clientId + } + + // Add a static method to get the client ID for a specific instance + public static getClientIdForInstance(instance: WebviewProvider): string | undefined { + return WebviewProvider.clientIdMap.get(instance) + } + async dispose() { if (this.view && "dispose" in this.view) { this.view.dispose() @@ -44,6 +60,8 @@ export class WebviewProvider implements vscode.WebviewViewProvider { } await this.controller.dispose() WebviewProvider.activeInstances.delete(this) + // Remove from client ID map + WebviewProvider.clientIdMap.delete(this) } public static getVisibleInstance(): WebviewProvider | undefined { @@ -96,12 +114,9 @@ export class WebviewProvider implements vscode.WebviewViewProvider { // WebviewView and WebviewPanel have all the same properties except for this visibility listener // panel webviewView.onDidChangeViewState( - () => { + async () => { if (this.view?.visible) { - this.controller.postMessageToWebview({ - type: "action", - action: "didBecomeVisible", - }) + await sendDidBecomeVisibleEvent(this.controller.id) } }, null, @@ -110,12 +125,9 @@ export class WebviewProvider implements vscode.WebviewViewProvider { } else if ("onDidChangeVisibility" in webviewView) { // sidebar webviewView.onDidChangeVisibility( - () => { + async () => { if (this.view?.visible) { - this.controller.postMessageToWebview({ - type: "action", - action: "didBecomeVisible", - }) + await sendDidBecomeVisibleEvent(this.controller.id) } }, null, @@ -245,6 +257,9 @@ export class WebviewProvider implements vscode.WebviewViewProvider { @@ -358,6 +373,9 @@ export class WebviewProvider implements vscode.WebviewViewProvider { ${reactRefresh} diff --git a/src/exports/README.md b/src/exports/README.md index 8c98ec0e..155a0e17 100644 --- a/src/exports/README.md +++ b/src/exports/README.md @@ -18,13 +18,6 @@ The Cline extension exposes an API that can be used by other extensions. To use if (cline) { // Now you can use the API - // Set custom instructions - await cline.setCustomInstructions("Talk like a pirate") - - // Get custom instructions - const instructions = await cline.getCustomInstructions() - console.log("Current custom instructions:", instructions) - // Start a new task with an initial message await cline.startNewTask("Hello, Cline! Let's make a new project...") diff --git a/src/exports/__tests__/cline-api.test.ts b/src/exports/__tests__/cline-api.test.ts index dbbdf70d..7666933e 100644 --- a/src/exports/__tests__/cline-api.test.ts +++ b/src/exports/__tests__/cline-api.test.ts @@ -65,59 +65,6 @@ describe("ClineAPI Core Functionality", () => { sandbox.restore() }) - describe("setCustomInstructions", () => { - it("should update custom instructions in controller", async () => { - const testInstructions = "Test custom instructions" - - await api.setCustomInstructions(testInstructions) - - // Verify controller method was called - sinon.assert.calledOnce(mockController.updateCustomInstructions) - sinon.assert.calledWith(mockController.updateCustomInstructions, testInstructions) - - // Verify output channel was updated - sinon.assert.calledWith(mockOutputChannel.appendLine, "Custom instructions set") - }) - - it("should handle empty instructions", async () => { - await api.setCustomInstructions("") - - sinon.assert.calledWith(mockController.updateCustomInstructions, "") - sinon.assert.calledWith(mockOutputChannel.appendLine, "Custom instructions set") - }) - - it("should handle very long instructions", async () => { - const longInstructions = "a".repeat(10000) - - await api.setCustomInstructions(longInstructions) - - sinon.assert.calledWith(mockController.updateCustomInstructions, longInstructions) - }) - }) - - describe("getCustomInstructions", () => { - it("should retrieve custom instructions from state", async () => { - const testInstructions = "Retrieved instructions" - // The real implementation uses getGlobalState from the state module - getGlobalStateStub.resolves(testInstructions) - - const result = await api.getCustomInstructions() - - result!.should.equal(testInstructions) - sinon.assert.calledWith(getGlobalStateStub, mockController.context, "customInstructions") - }) - - it("should return undefined when no instructions set", async () => { - // The real implementation uses getGlobalState from the state module - getGlobalStateStub.resolves(undefined) - - const result = await api.getCustomInstructions() - - should.not.exist(result) - sinon.assert.calledWith(getGlobalStateStub, mockController.context, "customInstructions") - }) - }) - describe("startNewTask", () => { it("should clear existing task and start new one with description", async () => { const taskDescription = "Create a test function" @@ -260,17 +207,6 @@ describe("ClineAPI Core Functionality", () => { }) describe("Error Handling", () => { - it("should handle errors in setCustomInstructions", async () => { - mockController.updateCustomInstructions.rejects(new Error("Update failed")) - - try { - await api.setCustomInstructions("test") - should.fail("", "", "Should have thrown an error", "") - } catch (error: any) { - error.message.should.equal("Update failed") - } - }) - it("should handle errors in task initialization", async () => { mockController.initTask.rejects(new Error("Init failed")) diff --git a/src/exports/cline.d.ts b/src/exports/cline.d.ts index 1ae285f8..85cd277b 100644 --- a/src/exports/cline.d.ts +++ b/src/exports/cline.d.ts @@ -1,16 +1,4 @@ export interface ClineAPI { - /** - * Sets the custom instructions in the global storage. - * @param value The custom instructions to be saved. - */ - setCustomInstructions(value: string): Promise - - /** - * Retrieves the custom instructions from the global storage. - * @returns The saved custom instructions, or undefined if not set. - */ - getCustomInstructions(): Promise - /** * Starts a new task with an optional initial message and images. * @param task Optional initial task message. diff --git a/src/exports/index.ts b/src/exports/index.ts index 11db0d8d..7a6cc5d9 100644 --- a/src/exports/index.ts +++ b/src/exports/index.ts @@ -7,15 +7,6 @@ import { WebviewProviderType as WebviewProviderTypeEnum } from "@shared/proto/ui export function createClineAPI(outputChannel: vscode.OutputChannel, sidebarController: Controller): ClineAPI { const api: ClineAPI = { - setCustomInstructions: async (value: string) => { - await sidebarController.updateCustomInstructions(value) - outputChannel.appendLine("Custom instructions set") - }, - - getCustomInstructions: async () => { - return (await getGlobalState(sidebarController.context, "customInstructions")) as string | undefined - }, - startNewTask: async (task?: string, images?: string[]) => { outputChannel.appendLine("Starting new task") await sidebarController.clearTask() diff --git a/src/extension.ts b/src/extension.ts index 96667a91..fee8517d 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -22,6 +22,12 @@ import { WebviewProviderType as WebviewProviderTypeEnum } from "@shared/proto/ui import { WebviewProviderType } from "./shared/webview/types" import { sendHistoryButtonClickedEvent } from "./core/controller/ui/subscribeToHistoryButtonClicked" import { sendAccountButtonClickedEvent } from "./core/controller/ui/subscribeToAccountButtonClicked" +import { migratePlanActGlobalToWorkspaceStorage, migrateCustomInstructionsToGlobalRules } from "./core/storage/state" + +import { sendFocusChatInputEvent } from "./core/controller/ui/subscribeToFocusChatInput" +import { FileContextTracker } from "./core/context/context-tracking/FileContextTracker" +import { maybeInitializeHostBridgeClient } from "./hosts/host-bridge-client" +import { vscodeHostBridgeClient } from "@generated/hosts/vscode/client/host-grpc-client" /* Built using https://github.com/microsoft/vscode-webview-ui-toolkit @@ -44,6 +50,17 @@ export async function activate(context: vscode.ExtensionContext) { Logger.initialize(outputChannel) Logger.log("Cline extension activated") + maybeInitializeHostBridgeClient(vscodeHostBridgeClient) + + // Migrate global storage values to workspace storage (one-time cleanup) + await migratePlanActGlobalToWorkspaceStorage(context) + + // Migrate custom instructions to global Cline rules (one-time cleanup) + await migrateCustomInstructionsToGlobalRules(context) + + // Clean up orphaned file context warnings (startup cleanup) + await FileContextTracker.cleanupOrphanedWarnings(context) + // Version checking for autoupdate notification const currentVersion = context.extension.packageJSON.version const previousVersion = context.globalState.get("clineVersion") @@ -598,10 +615,9 @@ export async function activate(context: vscode.ExtensionContext) { // At this point, activeWebviewProvider should be the one we want to send the message to. // It could still be undefined if opening a new tab failed or timed out. if (activeWebviewProvider) { - activeWebviewProvider.controller.postMessageToWebview({ - type: "action", - action: "focusChatInput", - }) + // Use the gRPC streaming method instead of postMessageToWebview + const clientId = activeWebviewProvider.getClientId() + sendFocusChatInputEvent(clientId) } else { console.error("FocusChatInput: Could not find or activate a Cline webview to focus.") vscode.window.showErrorMessage("无法激活 Cline 视图。请尝试从活动栏手动打开。") @@ -639,7 +655,8 @@ export async function activate(context: vscode.ExtensionContext) { // // This is a workaround to reload the extension when the source code changes // since vscode doesn't support hot reload for extensions -const { IS_DEV, DEV_WORKSPACE_FOLDER } = process.env +const IS_DEV = process.env.IS_DEV +const DEV_WORKSPACE_FOLDER = process.env.DEV_WORKSPACE_FOLDER // This method is called when your extension is deactivated export async function deactivate() { diff --git a/src/hosts/host-bridge-client.ts b/src/hosts/host-bridge-client.ts new file mode 100644 index 00000000..1fb240e6 --- /dev/null +++ b/src/hosts/host-bridge-client.ts @@ -0,0 +1,38 @@ +import { UriServiceClientInterface, WatchServiceClientInterface } from "@generated/hosts/host-bridge-client-types" + +/** + * Callback interface for streaming requests + */ +export interface StreamingCallbacks { + onResponse: (response: T) => void + onError?: (error: Error) => void + onComplete?: () => void +} + +/** + * Interface for host bridge client providers + */ +export interface HostBridgeClientProvider { + UriServiceClient: UriServiceClientInterface + WatchServiceClient: WatchServiceClientInterface +} + +let isSetup = false + +// Export the clients directly - they'll be set during initialization +export let UriServiceClient: UriServiceClientInterface +export let WatchServiceClient: WatchServiceClientInterface + +export function initializeHostBridgeClient(provider: HostBridgeClientProvider): void { + UriServiceClient = provider.UriServiceClient + WatchServiceClient = provider.WatchServiceClient + isSetup = true +} + +export function maybeInitializeHostBridgeClient(provider: HostBridgeClientProvider): void { + if (isSetup) { + console.log("Host bridge client already initialized, not re-initializing.") + return + } + initializeHostBridgeClient(provider) +} diff --git a/src/standalone/services/host-grpc-client-base.ts b/src/hosts/vscode/client/host-grpc-client-base.ts similarity index 85% rename from src/standalone/services/host-grpc-client-base.ts rename to src/hosts/vscode/client/host-grpc-client-base.ts index 8e693a94..14db3a83 100644 --- a/src/standalone/services/host-grpc-client-base.ts +++ b/src/hosts/vscode/client/host-grpc-client-base.ts @@ -1,5 +1,6 @@ import { v4 as uuidv4 } from "uuid" -import { GrpcHandler, StreamingCallbacks } from "../../../hosts/vscode/host-grpc-handler" +import { GrpcHandler } from "../host-grpc-handler" +import { StreamingCallbacks } from "@hosts/host-bridge-client" // Generic type for any protobuf service definition export type ProtoService = { @@ -33,10 +34,11 @@ export function createGrpcClient(service: T): GrpcClient const grpcHandler = new GrpcHandler() Object.values(service.methods).forEach((method) => { + // Use lowercase method name as the key in the client object + const methodKey = method.name.charAt(0).toLowerCase() + method.name.slice(1) + // Streaming method implementation if (method.responseStream) { - // Use lowercase method name as the key in the client object - const methodKey = method.name.charAt(0).toLowerCase() + method.name.slice(1) client[methodKey as keyof GrpcClientType] = (( request: any, options: StreamingCallbacks>, @@ -75,7 +77,6 @@ export function createGrpcClient(service: T): GrpcClient }) as any } else { // Unary method implementation - const methodKey = method.name.charAt(0).toLowerCase() + method.name.slice(1) client[methodKey as keyof GrpcClientType] = ((request: any) => { return new Promise(async (resolve, reject) => { const requestId = uuidv4() @@ -84,15 +85,12 @@ export function createGrpcClient(service: T): GrpcClient const response = await grpcHandler.handleRequest(service.fullName, methodKey, request, requestId) console.log(`[DEBUG] gRPC host resp to ${service.fullName}.${methodKey} req:${requestId}`) - // Check if the response is a function (streaming) or an object (unary) + // Check if the response is a function (streaming) if (typeof response === "function") { // This shouldn't happen for unary requests throw new Error("Received streaming response for unary request") - } else if (response && response.message) { - resolve(response.message) - } else { - throw new Error("gRPC response didn't have a message") } + resolve(response) } catch (e) { console.log(`[DEBUG] gRPC host ERR to ${service.fullName}.${methodKey} req:${requestId} err:${e}`) reject(e) @@ -101,6 +99,5 @@ export function createGrpcClient(service: T): GrpcClient }) as any } }) - return client } diff --git a/src/hosts/vscode/host-grpc-handler.ts b/src/hosts/vscode/host-grpc-handler.ts new file mode 100644 index 00000000..b76e6f3a --- /dev/null +++ b/src/hosts/vscode/host-grpc-handler.ts @@ -0,0 +1,170 @@ +import { StreamingCallbacks } from "@hosts/host-bridge-client" +import { HostServiceHandlerConfig, hostServiceHandlers } from "./host-grpc-service-config" +import { GrpcRequestRegistry } from "@core/controller/grpc-request-registry" + +/** + * Type definition for a streaming response handler + */ +export type StreamingResponseHandler = (response: any, isLast?: boolean, sequenceNumber?: number) => Promise + +// Registry to track active gRPC requests and their cleanup functions +const requestRegistry = new GrpcRequestRegistry() + +/** + * Handles gRPC requests for the host bridge. + */ +export class GrpcHandler { + constructor() {} + + /** + * Handle a gRPC request for the host bridge. + * @param service The service name + * @param method The method name + * @param message The request message + * @param requestId The request ID for response correlation + * @param streamingCallbacks Optional callbacks for streaming responses + * @returns For unary requests: the response message or error. For streaming requests: a cancel function. + */ + async handleRequest( + service: string, + method: string, + request: any, + requestId: string, + streamingCallbacks?: StreamingCallbacks, + ): Promise void)> { + if (!streamingCallbacks) { + return this.handleUnaryRequest(service, method, request) + } + + // If streaming callbacks are provided, handle as a streaming request + let completionCalled = false + + // Create a response handler that will call the client's callbacks + const responseHandler: StreamingResponseHandler = async (response, isLast = false, sequenceNumber) => { + try { + // Call the client's onResponse callback with the response + streamingCallbacks.onResponse(response) + + // If this is the last response, call the onComplete callback + if (isLast && streamingCallbacks.onComplete && !completionCalled) { + completionCalled = true + streamingCallbacks.onComplete() + } + } catch (error) { + // If there's an error in the callback, call the onError callback + if (streamingCallbacks.onError) { + streamingCallbacks.onError(error instanceof Error ? error : new Error(String(error))) + } + } + } + + // Register the response handler with the registry + requestRegistry.registerRequest( + requestId, + () => { + console.log(`[DEBUG] Cleaning up streaming request: ${requestId}`) + if (streamingCallbacks.onComplete && !completionCalled) { + completionCalled = true + streamingCallbacks.onComplete() + } + }, + { type: "streaming_request", service, method }, + responseHandler, + ) + + // Call the streaming handler directly + console.log(`[DEBUG] Streaming gRPC host call to ${service}.${method} req:${requestId}`) + try { + await this.handleStreamingRequest(service, method, request, requestId) + } catch (error) { + if (streamingCallbacks.onError) { + streamingCallbacks.onError(error instanceof Error ? error : new Error(String(error))) + } + } + + // Return a function to cancel the stream + return () => { + console.log(`[DEBUG] Cancelling streaming request: ${requestId}`) + this.cancelRequest(requestId) + } + } + + private async handleUnaryRequest(service: string, method: string, request: any): Promise { + const serviceConfig = this.getServiceHandlerConfig(service) + const response = await serviceConfig.requestHandler(method, request) + return response + } + + /** + * Cancel a gRPC request + * @param requestId The request ID to cancel + * @returns True if the request was found and cancelled, false otherwise + */ + public async cancelRequest(requestId: string): Promise { + const requestInfo = requestRegistry.getRequestInfo(requestId) + if (!requestInfo) { + return false + } + + const cancelled = requestRegistry.cancelRequest(requestId) + if (!cancelled) { + console.log(`[DEBUG] Request not found for cancellation: ${requestId}`) + return false + } + if (requestInfo.responseStream) { + try { + // Send cancellation confirmation using the registered response handler + await requestInfo.responseStream({ cancelled: true }, true /* isLast */) + } catch (e) { + console.error(`Error sending cancellation response for ${requestId}:`, e) + } + } + return true + } + + /** + * Handle a streaming gRPC request + * @param service The service name + * @param method The method name + * @param message The request message + * @param requestId The request ID for response correlation + */ + private async handleStreamingRequest(service: string, method: string, message: any, requestId: string): Promise { + const serviceConfig = this.getServiceHandlerConfig(service) + + // Check if the service supports streaming + if (!serviceConfig.streamingHandler) { + throw new Error(`Service ${service} does not support streaming`) + } + + // Get the registered response handler from the registry + const requestInfo = requestRegistry.getRequestInfo(requestId) + if (!requestInfo || !requestInfo.responseStream) { + throw new Error(`No response handler registered for request: ${requestId}`) + } + + // Use the registered response handler + const responseStream = requestInfo.responseStream + + // Handle streaming request and pass the requestId to all streaming handlers + await serviceConfig.streamingHandler(method, message, responseStream, requestId) + + // Don't send a final message here - the stream should stay open for future updates + // The stream will be closed when the client disconnects or when the service explicitly ends it + } + + private getServiceHandlerConfig(serviceName: string): HostServiceHandlerConfig { + if (!(serviceName in hostServiceHandlers)) { + throw new Error(`Unknown service: ${serviceName}`) + } + return hostServiceHandlers[serviceName] + } +} + +/** + * Get the request registry instance + * This allows other parts of the code to access the registry + */ +export function getRequestRegistry(): GrpcRequestRegistry { + return requestRegistry +} diff --git a/hosts/vscode/host-grpc-service.ts b/src/hosts/vscode/host-grpc-service.ts similarity index 100% rename from hosts/vscode/host-grpc-service.ts rename to src/hosts/vscode/host-grpc-service.ts diff --git a/hosts/vscode/uri/file.ts b/src/hosts/vscode/uri/file.ts similarity index 78% rename from hosts/vscode/uri/file.ts rename to src/hosts/vscode/uri/file.ts index 945ce6d3..425c2cff 100644 --- a/hosts/vscode/uri/file.ts +++ b/src/hosts/vscode/uri/file.ts @@ -1,6 +1,6 @@ import * as vscode from "vscode" -import { Uri } from "../../../src/shared/proto/host/uri" -import { StringRequest } from "../../../src/shared/proto/common" +import { Uri } from "@shared/proto/host/uri" +import { StringRequest } from "@shared/proto/common" /** * Creates a file URI from a file path diff --git a/hosts/vscode/uri/joinPath.ts b/src/hosts/vscode/uri/joinPath.ts similarity index 91% rename from hosts/vscode/uri/joinPath.ts rename to src/hosts/vscode/uri/joinPath.ts index 43f36307..e5dcc85b 100644 --- a/hosts/vscode/uri/joinPath.ts +++ b/src/hosts/vscode/uri/joinPath.ts @@ -1,5 +1,5 @@ import * as vscode from "vscode" -import { JoinPathRequest, Uri } from "../../../src/shared/proto/host/uri" +import { JoinPathRequest, Uri } from "@shared/proto/host/uri" /** * Joins a URI with additional path segments diff --git a/hosts/vscode/uri/parse.ts b/src/hosts/vscode/uri/parse.ts similarity index 79% rename from hosts/vscode/uri/parse.ts rename to src/hosts/vscode/uri/parse.ts index db8e851b..359f02c7 100644 --- a/hosts/vscode/uri/parse.ts +++ b/src/hosts/vscode/uri/parse.ts @@ -1,6 +1,6 @@ import * as vscode from "vscode" -import { Uri } from "../../../src/shared/proto/host/uri" -import { StringRequest } from "../../../src/shared/proto/common" +import { Uri } from "@shared/proto/host/uri" +import { StringRequest } from "@shared/proto/common" /** * Parses a string URI into a Uri object diff --git a/hosts/vscode/watch/subscribeToFile.ts b/src/hosts/vscode/watch/subscribeToFile.ts similarity index 99% rename from hosts/vscode/watch/subscribeToFile.ts rename to src/hosts/vscode/watch/subscribeToFile.ts index e431052b..26549daa 100644 --- a/hosts/vscode/watch/subscribeToFile.ts +++ b/src/hosts/vscode/watch/subscribeToFile.ts @@ -1,6 +1,6 @@ import * as fs from "fs/promises" import * as fsSync from "fs" -import { SubscribeToFileRequest, FileChangeEvent, FileChangeEvent_ChangeType } from "../../../src/shared/proto/host/watch" +import { SubscribeToFileRequest, FileChangeEvent, FileChangeEvent_ChangeType } from "@shared/proto/host/watch" import { StreamingResponseHandler, getRequestRegistry } from "../host-grpc-handler" // Debounce configuration diff --git a/src/integrations/checkpoints/CheckpointExclusions.ts b/src/integrations/checkpoints/CheckpointExclusions.ts index b0255c1c..c38023a8 100644 --- a/src/integrations/checkpoints/CheckpointExclusions.ts +++ b/src/integrations/checkpoints/CheckpointExclusions.ts @@ -83,6 +83,7 @@ function getBuildArtifactPatterns(): string[] { ".sass-cache/", ".vs/", ".vscode/", + ".clinerules/", "Pods/", "__pycache__/", "bin/", diff --git a/src/integrations/claude-code/run.ts b/src/integrations/claude-code/run.ts new file mode 100644 index 00000000..84de5670 --- /dev/null +++ b/src/integrations/claude-code/run.ts @@ -0,0 +1,45 @@ +import * as vscode from "vscode" +import Anthropic from "@anthropic-ai/sdk" +import { execa } from "execa" + +const cwd = vscode.workspace.workspaceFolders?.map((folder) => folder.uri.fsPath).at(0) + +export function runClaudeCode({ + systemPrompt, + messages, + path, + modelId, +}: { + systemPrompt: string + messages: Anthropic.Messages.MessageParam[] + path?: string + modelId?: string +}) { + const claudePath = path || "claude" + + // TODO: Is it worh using sessions? Where do we store the session ID? + const args = [ + "-p", + JSON.stringify(messages), + "--system-prompt", + systemPrompt, + "--verbose", + "--output-format", + "stream-json", + // Cline will handle recursive calls + "--max-turns", + "1", + ] + + if (modelId) { + args.push("--model", modelId) + } + + return execa(claudePath, args, { + stdin: "ignore", + stdout: "pipe", + stderr: "pipe", + env: process.env, + cwd, + }) +} diff --git a/src/integrations/claude-code/types.ts b/src/integrations/claude-code/types.ts new file mode 100644 index 00000000..8b0c9778 --- /dev/null +++ b/src/integrations/claude-code/types.ts @@ -0,0 +1,52 @@ +type InitMessage = { + type: "system" + subtype: "init" + session_id: string + tools: string[] + mcp_servers: string[] +} + +type ClaudeCodeContent = { + type: "text" + text: string +} + +type AssistantMessage = { + type: "assistant" + message: { + id: string + type: "message" + role: "assistant" + model: string + content: ClaudeCodeContent[] + stop_reason: null + stop_sequence: null + usage: { + input_tokens: number + cache_creation_input_tokens?: number + cache_read_input_tokens?: number + output_tokens: number + service_tier: "standard" + } + } + session_id: string +} + +type ErrorMessage = { + type: "error" +} + +type ResultMessage = { + type: "result" + subtype: "success" + cost_usd: number + is_error: boolean + duration_ms: number + duration_api_ms: number + num_turns: number + result: string + total_cost: number + session_id: string +} + +export type ClaudeCodeMessage = InitMessage | AssistantMessage | ErrorMessage | ResultMessage diff --git a/src/integrations/terminal/TerminalManager.ts b/src/integrations/terminal/TerminalManager.ts index e8827dee..b2baea67 100644 --- a/src/integrations/terminal/TerminalManager.ts +++ b/src/integrations/terminal/TerminalManager.ts @@ -1,6 +1,7 @@ import pWaitFor from "p-wait-for" import * as vscode from "vscode" import { arePathsEqual } from "@utils/path" +import { getShellForProfile } from "@utils/shell" import { mergePromise, TerminalProcess, TerminalProcessResultPromise } from "./TerminalProcess" import { TerminalInfo, TerminalRegistry } from "./TerminalRegistry" @@ -95,6 +96,8 @@ export class TerminalManager { private disposables: vscode.Disposable[] = [] private shellIntegrationTimeout: number = 4000 private terminalReuseEnabled: boolean = true + private terminalOutputLineLimit: number = 500 + private defaultTerminalProfile: string = "default" constructor() { let disposable: vscode.Disposable | undefined @@ -153,12 +156,16 @@ export class TerminalManager { } runCommand(terminalInfo: TerminalInfo, command: string): TerminalProcessResultPromise { + console.log(`[TerminalManager] Running command on terminal ${terminalInfo.id}: "${command}"`) + console.log(`[TerminalManager] Terminal ${terminalInfo.id} busy state before: ${terminalInfo.busy}`) + terminalInfo.busy = true terminalInfo.lastCommand = command const process = new TerminalProcess() this.processes.set(terminalInfo.id, process) process.once("completed", () => { + console.log(`[TerminalManager] Terminal ${terminalInfo.id} completed, setting busy to false`) terminalInfo.busy = false }) @@ -218,26 +225,40 @@ export class TerminalManager { async getOrCreateTerminal(cwd: string): Promise { const terminals = TerminalRegistry.getAllTerminals() + const expectedShellPath = + this.defaultTerminalProfile !== "default" ? getShellForProfile(this.defaultTerminalProfile) : undefined // Find available terminal from our pool first (created for this task) + console.log(`[TerminalManager] Looking for terminal in cwd: ${cwd}`) + console.log(`[TerminalManager] Available terminals: ${terminals.length}`) + const matchingTerminal = terminals.find((t) => { if (t.busy) { + console.log(`[TerminalManager] Terminal ${t.id} is busy, skipping`) + return false + } + // Check if shell path matches current configuration + if (t.shellPath !== expectedShellPath) { return false } const terminalCwd = t.terminal.shellIntegration?.cwd // one of cline's commands could have changed the cwd of the terminal if (!terminalCwd) { + console.log(`[TerminalManager] Terminal ${t.id} has no cwd, skipping`) return false } - return arePathsEqual(vscode.Uri.file(cwd).fsPath, terminalCwd.fsPath) + const matches = arePathsEqual(vscode.Uri.file(cwd).fsPath, terminalCwd.fsPath) + console.log(`[TerminalManager] Terminal ${t.id} cwd: ${terminalCwd.fsPath}, matches: ${matches}`) + return matches }) if (matchingTerminal) { + console.log(`[TerminalManager] Found matching terminal ${matchingTerminal.id} in correct cwd`) this.terminalIds.add(matchingTerminal.id) return matchingTerminal } // If no non-busy terminal in the current working dir exists and terminal reuse is enabled, try to find any non-busy terminal regardless of CWD if (this.terminalReuseEnabled) { - const availableTerminal = terminals.find((t) => !t.busy) + const availableTerminal = terminals.find((t) => !t.busy && t.shellPath === expectedShellPath) if (availableTerminal) { // Set up promise and tracking for CWD change const cwdPromise = new Promise((resolve, reject) => { @@ -246,7 +267,13 @@ export class TerminalManager { }) // Navigate back to the desired directory - await this.runCommand(availableTerminal, `cd "${cwd}"`) + const cdProcess = this.runCommand(availableTerminal, `cd "${cwd}"`) + + // Wait for the cd command to complete before proceeding + await cdProcess + + // Add a small delay to ensure terminal is ready after cd + await new Promise((resolve) => setTimeout(resolve, 100)) // Either resolve immediately if CWD already updated or wait for event/timeout if (this.isCwdMatchingExpected(availableTerminal)) { @@ -275,8 +302,8 @@ export class TerminalManager { } } - // If all terminals are busy, create a new one - const newTerminalInfo = TerminalRegistry.createTerminal(cwd) + // If all terminals are busy or don't match shell profile, create a new one with the configured shell + const newTerminalInfo = TerminalRegistry.createTerminal(cwd, expectedShellPath) this.terminalIds.add(newTerminalInfo.id) return newTerminalInfo } @@ -318,4 +345,117 @@ export class TerminalManager { setTerminalReuseEnabled(enabled: boolean): void { this.terminalReuseEnabled = enabled } + + setTerminalOutputLineLimit(limit: number): void { + this.terminalOutputLineLimit = limit + } + + public processOutput(outputLines: string[]): string { + if (outputLines.length > this.terminalOutputLineLimit) { + const halfLimit = Math.floor(this.terminalOutputLineLimit / 2) + const start = outputLines.slice(0, halfLimit) + const end = outputLines.slice(outputLines.length - halfLimit) + return `${start.join("\n")}\n... (output truncated) ...\n${end.join("\n")}`.trim() + } + return outputLines.join("\n").trim() + } + + setDefaultTerminalProfile(profileId: string): { closedCount: number; busyTerminals: TerminalInfo[] } { + // Only handle terminal change if profile actually changed + if (this.defaultTerminalProfile === profileId) { + return { closedCount: 0, busyTerminals: [] } + } + + const oldProfileId = this.defaultTerminalProfile + this.defaultTerminalProfile = profileId + + // Get the shell path for the new profile + const newShellPath = profileId !== "default" ? getShellForProfile(profileId) : undefined + + // Handle terminal management for the profile change + const result = this.handleTerminalProfileChange(newShellPath) + + // Update lastActive for any remaining terminals + const allTerminals = TerminalRegistry.getAllTerminals() + allTerminals.forEach((terminal) => { + if (terminal.shellPath !== newShellPath) { + TerminalRegistry.updateTerminal(terminal.id, { lastActive: Date.now() }) + } + }) + + return result + } + + /** + * Filters terminals based on a provided criteria function + * @param filterFn Function that accepts TerminalInfo and returns boolean + * @returns Array of terminals that match the criteria + */ + filterTerminals(filterFn: (terminal: TerminalInfo) => boolean): TerminalInfo[] { + const terminals = TerminalRegistry.getAllTerminals() + return terminals.filter(filterFn) + } + + /** + * Closes terminals that match the provided criteria + * @param filterFn Function that accepts TerminalInfo and returns boolean for terminals to close + * @param force If true, closes even busy terminals (with warning) + * @returns Number of terminals closed + */ + closeTerminals(filterFn: (terminal: TerminalInfo) => boolean, force: boolean = false): number { + const terminalsToClose = this.filterTerminals(filterFn) + let closedCount = 0 + + for (const terminalInfo of terminalsToClose) { + // Skip busy terminals unless force is true + if (terminalInfo.busy && !force) { + continue + } + + // Remove from our tracking + if (this.terminalIds.has(terminalInfo.id)) { + this.terminalIds.delete(terminalInfo.id) + } + this.processes.delete(terminalInfo.id) + + // Dispose the actual terminal + terminalInfo.terminal.dispose() + + // Remove from registry + TerminalRegistry.removeTerminal(terminalInfo.id) + + closedCount++ + } + + return closedCount + } + + /** + * Handles terminal management when the terminal profile changes + * @param newShellPath New shell path to use + * @returns Object with information about closed terminals and remaining busy terminals + */ + handleTerminalProfileChange(newShellPath: string | undefined): { + closedCount: number + busyTerminals: TerminalInfo[] + } { + // Close non-busy terminals with different shell path + const closedCount = this.closeTerminals((terminal) => !terminal.busy && terminal.shellPath !== newShellPath, false) + + // Get remaining busy terminals with different shell path + const busyTerminals = this.filterTerminals((terminal) => terminal.busy && terminal.shellPath !== newShellPath) + + return { + closedCount, + busyTerminals, + } + } + + /** + * Forces closure of all terminals (including busy ones) + * @returns Number of terminals closed + */ + closeAllTerminals(): number { + return this.closeTerminals(() => true, true) + } } diff --git a/src/integrations/terminal/TerminalProcess.ts b/src/integrations/terminal/TerminalProcess.ts index 3ad07601..df4d9c1b 100644 --- a/src/integrations/terminal/TerminalProcess.ts +++ b/src/integrations/terminal/TerminalProcess.ts @@ -23,20 +23,84 @@ export class TerminalProcess extends EventEmitter { private lastRetrievedIndex: number = 0 isHot: boolean = false private hotTimer: NodeJS.Timeout | null = null + private command: string = "" + private gracePeriodTimer: NodeJS.Timeout | null = null + private hasEmittedCompleted: boolean = false // constructor() { // super() async run(terminal: vscode.Terminal, command: string) { + // Clear any existing grace period timer from previous commands + if (this.gracePeriodTimer) { + clearTimeout(this.gracePeriodTimer) + this.gracePeriodTimer = null + console.log(`[TerminalProcess] Cleared existing grace period timer before starting new command`) + } + + // Clear any existing hot timer + if (this.hotTimer) { + clearTimeout(this.hotTimer) + this.hotTimer = null + } + + // Reset state for new command + this.hasEmittedCompleted = false + this.buffer = "" + this.fullOutput = "" + this.lastRetrievedIndex = 0 + this.isListening = true + this.isHot = false + + this.command = command + console.log(`[TerminalProcess] Starting command: "${command}"`) + console.log(`[TerminalProcess] Shell integration available: ${!!terminal.shellIntegration?.executeCommand}`) + console.log(`[TerminalProcess] Terminal ID: ${terminal.name}`) if (terminal.shellIntegration && terminal.shellIntegration.executeCommand) { - const execution = terminal.shellIntegration.executeCommand(command) - const stream = execution.read() + let execution + let stream + + try { + execution = terminal.shellIntegration.executeCommand(command) + stream = execution.read() + } catch (error) { + console.error(`[TerminalProcess] Failed to execute command: ${error}`) + this.emit("error", error as Error) + return + } + // todo: need to handle errors let isFirstChunk = true let didOutputNonCommand = false let didEmitEmptyLine = false + let receivedFirstChunk = false + + // Set up a timeout to emit empty line if no output is received within 3 seconds + // This ensures the "proceed while running" button appears even for commands with no/delayed output + const firstChunkTimeout = setTimeout(() => { + if (!receivedFirstChunk && !didEmitEmptyLine) { + console.log(`[TerminalProcess] First chunk timeout fired - no output received within 3s for: "${command}"`) + this.emit("line", "") // empty line to show proceed button + didEmitEmptyLine = true + + // Also emit a message indicating the command might be running without output + this.emit("line", "[Command is running but producing no output]") + } + }, 3000) // 3 second timeout for await (let data of stream) { + // Clear the timeout since we received output + if (!receivedFirstChunk) { + clearTimeout(firstChunkTimeout) + receivedFirstChunk = true + console.log(`[TerminalProcess] First chunk received for command: "${command}"`) + } + + // Log raw data length + console.log(`[TerminalProcess] Raw data chunk received: ${data.length} chars`) + if (!data || data.trim() === "") { + console.log(`[TerminalProcess] WARNING: Received empty or whitespace-only chunk`) + } // 1. Process chunk and remove artifacts if (isFirstChunk) { /* @@ -176,14 +240,79 @@ export class TerminalProcess extends EventEmitter { this.emitRemainingBufferIfListening() + // Clean up the first chunk timeout if it's still active + if (!receivedFirstChunk) { + clearTimeout(firstChunkTimeout) + console.log(`[TerminalProcess] WARNING: Stream ended without receiving any chunks for command: "${command}"`) + + // If we never received any chunks and haven't emitted anything yet, emit now + if (!didEmitEmptyLine) { + console.log(`[TerminalProcess] Emitting fallback empty line for no-output command`) + this.emit("line", "") // empty line to show proceed button + this.emit("line", "[Command completed with no output]") + didEmitEmptyLine = true + } + } + // for now we don't want this delaying requests since we don't send diagnostics automatically anymore (previous: "even though the command is finished, we still want to consider it 'hot' in case so that api request stalls to let diagnostics catch up") if (this.hotTimer) { clearTimeout(this.hotTimer) } this.isHot = false - this.emit("completed") - this.emit("continue") + console.log(`[TerminalProcess] Stream ended for command: "${command}"`) + console.log(`[TerminalProcess] Final output length: ${this.fullOutput.length} characters`) + + // Check if this looks like a command that completed vs one that's still running + const quickCommands = ["cd ", "pwd", "ls ", "echo ", "mkdir ", "touch ", "rm ", "cp ", "mv "] + const isQuickCommand = quickCommands.some((cmd) => command.startsWith(cmd) || command.includes(" && " + cmd)) + + // Check if output suggests a long-running process + const longRunningIndicators = [ + "listening on", + "server running", + "started on", + "watching for", + "compiled successfully", + "webpack", + "vite", + "nodemon", + "dev server", + "press ctrl", + "to quit", + "to exit", + "to stop", + ] + const hasLongRunningOutput = longRunningIndicators.some((indicator) => + this.fullOutput.toLowerCase().includes(indicator), + ) + + // Check if this is likely a command that starts a server or long-running process + const longRunningCommands = ["npm run", "npm start", "yarn", "node ", "python ", "serve", "dev", "watch"] + const isLongRunningCommand = longRunningCommands.some((cmd) => command.includes(cmd)) + + if (this.fullOutput.length === 0) { + console.log(`[TerminalProcess] WARNING: Process completed but no output was captured`) + // Ensure we emit at least one line for UI feedback + if (!didEmitEmptyLine) { + this.emit("line", "[Command completed silently]") + } + } + + // Only skip grace period for truly quick commands that have no output or are known to complete instantly + if ((this.fullOutput.length === 0 || isQuickCommand) && !isLongRunningCommand && !hasLongRunningOutput) { + console.log(`[TerminalProcess] Command appears to have completed immediately, skipping grace period`) + this.emit("completed") + this.emit("continue") + } else { + console.log( + `[TerminalProcess] Command may still be running (longRunningCommand: ${isLongRunningCommand}, longRunningOutput: ${hasLongRunningOutput})`, + ) + console.log(`[TerminalProcess] Starting grace period to detect true completion...`) + // Start grace period - wait 2.5 seconds to see if more output comes + // This prevents premature "proceed while running" for commands that clearly finished + this.startGracePeriod() + } } else { terminal.sendText(command, true) // For terminals without shell integration, we can't know when the command completes @@ -202,14 +331,24 @@ export class TerminalProcess extends EventEmitter { private emitIfEol(chunk: string) { this.buffer += chunk let lineEndIndex: number + let lineCount = 0 while ((lineEndIndex = this.buffer.indexOf("\n")) !== -1) { let line = this.buffer.slice(0, lineEndIndex).trimEnd() // removes trailing \r // Remove \r if present (for Windows-style line endings) // if (line.endsWith("\r")) { // line = line.slice(0, -1) // } + if (!line || line.trim() === "") { + console.log(`[TerminalProcess] Emitting empty line`) + } else { + console.log(`[TerminalProcess] Emitting line: ${line.substring(0, 100)}${line.length > 100 ? "..." : ""}`) + } this.emit("line", line) this.buffer = this.buffer.slice(lineEndIndex + 1) + lineCount++ + } + if (lineCount === 0 && chunk.length > 0) { + console.log(`[TerminalProcess] Buffering partial line, buffer size: ${this.buffer.length}`) } } @@ -224,7 +363,41 @@ export class TerminalProcess extends EventEmitter { } } + private startGracePeriod() { + // Clear any existing grace period timer + if (this.gracePeriodTimer) { + clearTimeout(this.gracePeriodTimer) + } + + // Emit completed event for UI to show "proceed while running" button + console.log(`[TerminalProcess] Emitting completed event for UI (grace period active)`) + this.emit("completed") + + // Wait 2.5 seconds to see if the command is truly finished + this.gracePeriodTimer = setTimeout(() => { + // Double-check the timer hasn't been cleared + if (this.gracePeriodTimer && !this.hasEmittedCompleted) { + console.log(`[TerminalProcess] Grace period completed - command appears truly finished: "${this.command}"`) + console.log(`[TerminalProcess] Auto-continuing without user intervention`) + this.hasEmittedCompleted = true + this.gracePeriodTimer = null + // Only emit continue after the grace period, not immediately + this.emit("continue") + } + }, 2500) // 2.5 second grace period + } + continue() { + console.log(`[TerminalProcess] Manual continue() called for: "${this.command}"`) + + // Clear grace period since user manually continued + if (this.gracePeriodTimer) { + console.log(`[TerminalProcess] Clearing grace period timer due to manual continue`) + clearTimeout(this.gracePeriodTimer) + this.gracePeriodTimer = null + } + + this.hasEmittedCompleted = true this.emitRemainingBufferIfListening() this.isListening = false this.removeAllListeners("line") diff --git a/src/integrations/terminal/TerminalRegistry.ts b/src/integrations/terminal/TerminalRegistry.ts index 085f06e4..c4ed1f63 100644 --- a/src/integrations/terminal/TerminalRegistry.ts +++ b/src/integrations/terminal/TerminalRegistry.ts @@ -5,6 +5,8 @@ export interface TerminalInfo { busy: boolean lastCommand: string id: number + shellPath?: string + lastActive: number pendingCwdChange?: string cwdResolved?: { resolve: () => void @@ -18,17 +20,26 @@ export class TerminalRegistry { private static terminals: TerminalInfo[] = [] private static nextTerminalId = 1 - static createTerminal(cwd?: string | vscode.Uri | undefined): TerminalInfo { - const terminal = vscode.window.createTerminal({ + static createTerminal(cwd?: string | vscode.Uri | undefined, shellPath?: string): TerminalInfo { + const terminalOptions: vscode.TerminalOptions = { cwd, name: "ClineShengsuan", iconPath: new vscode.ThemeIcon("robot"), - }) + } + + // If a specific shell path is provided, use it + if (shellPath) { + terminalOptions.shellPath = shellPath + } + + const terminal = vscode.window.createTerminal(terminalOptions) const newInfo: TerminalInfo = { terminal, busy: false, lastCommand: "", id: this.nextTerminalId++, + shellPath, + lastActive: Date.now(), } this.terminals.push(newInfo) return newInfo diff --git a/src/services/glob/list-files.ts b/src/services/glob/list-files.ts index 4d564d64..fc1f49e2 100644 --- a/src/services/glob/list-files.ts +++ b/src/services/glob/list-files.ts @@ -1,55 +1,81 @@ import { globby, Options } from "globby" -import os from "os" +import * as os from "os" import * as path from "path" import { arePathsEqual } from "@utils/path" -export async function listFiles(dirPath: string, recursive: boolean, limit: number): Promise<[string[], boolean]> { - // First resolve the path normally - path.resolve doesn't care about glob special characters - const absolutePath = path.resolve(dirPath) - // Do not allow listing files in root or home directory, which cline tends to want to do when the user's prompt is vague. +// Constants +const DEFAULT_IGNORE_DIRECTORIES = [ + "node_modules", + "__pycache__", + "env", + "venv", + "target/dependency", + "build/dependencies", + "dist", + "out", + "bundle", + "vendor", + "tmp", + "temp", + "deps", + "pkg", + "Pods", +] + +// Helper functions +function isRestrictedPath(absolutePath: string): boolean { const root = process.platform === "win32" ? path.parse(absolutePath).root : "/" const isRoot = arePathsEqual(absolutePath, root) if (isRoot) { - return [[root], false] + return true } + const homeDir = os.homedir() const isHomeDir = arePathsEqual(absolutePath, homeDir) if (isHomeDir) { - return [[homeDir], false] + return true } - const dirsToIgnore = [ - "node_modules", - "__pycache__", - "env", - "venv", - "target/dependency", - "build/dependencies", - "dist", - "out", - "bundle", - "vendor", - "tmp", - "temp", - "deps", - "pkg", - "Pods", - ".*", // '!**/.*' excludes hidden directories, while '!**/.*/**' excludes only their contents. This way we are at least aware of the existence of hidden directories. - ].map((dir) => `**/${dir}/**`) + return false +} + +function isTargetingHiddenDirectory(absolutePath: string): boolean { + const dirName = path.basename(absolutePath) + return dirName.startsWith(".") +} + +function buildIgnorePatterns(absolutePath: string): string[] { + const isTargetHidden = isTargetingHiddenDirectory(absolutePath) + + const patterns = [...DEFAULT_IGNORE_DIRECTORIES] + + // Only ignore hidden directories if we're not explicitly targeting a hidden directory + if (!isTargetHidden) { + patterns.push(".*") + } + + return patterns.map((dir) => `**/${dir}/**`) +} + +export async function listFiles(dirPath: string, recursive: boolean, limit: number): Promise<[string[], boolean]> { + const absolutePath = path.resolve(dirPath) + + // Do not allow listing files in root or home directory + if (isRestrictedPath(absolutePath)) { + return [[], false] + } const options: Options = { cwd: dirPath, dot: true, // do not ignore hidden files/directories absolute: true, - markDirectories: true, // Append a / on any directories matched (/ is used on windows as well, so dont use path.sep) + markDirectories: true, // Append a / on any directories matched gitignore: recursive, // globby ignores any files that are gitignored - ignore: recursive ? dirsToIgnore : undefined, // just in case there is no gitignore, we ignore sensible defaults - onlyFiles: false, // true by default, false means it will list directories on their own too + ignore: recursive ? buildIgnorePatterns(absolutePath) : undefined, + onlyFiles: false, // include directories in results suppressErrors: true, } - // * globs all files in one dir, ** globs files in nested directories - // For non-recursive listing, we still use a simple pattern const filePaths = recursive ? await globbyLevelByLevel(limit, options) : (await globby("*", options)).slice(0, limit) return [filePaths, filePaths.length >= limit] diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index 1f09d58b..8e4c010f 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -1,5 +1,5 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js" -import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js" +import { StdioClientTransport, getDefaultEnvironment } from "@modelcontextprotocol/sdk/client/stdio.js" import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js" import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js" import ReconnectingEventSource from "reconnecting-eventsource" @@ -19,7 +19,7 @@ import * as fs from "fs/promises" import * as path from "path" import * as vscode from "vscode" import { z } from "zod" -import { WatchServiceClient } from "../../standalone/services/host-grpc-client" +import { WatchServiceClient } from "@hosts/host-bridge-client" import { FileChangeEvent_ChangeType, SubscribeToFileRequest } from "../../shared/proto/host/watch" import { Metadata } from "../../shared/proto/common" import { @@ -54,6 +54,17 @@ export class McpHub { connections: McpConnection[] = [] isConnecting: boolean = false + // Store notifications for display in chat + private pendingNotifications: Array<{ + serverName: string + level: string + message: string + timestamp: number + }> = [] + + // Callback for sending notifications to active task + private notificationCallback?: (serverName: string, level: string, message: string) => void + constructor( getMcpServersPath: () => Promise, getSettingsDirectoryPath: () => Promise, @@ -140,7 +151,6 @@ export class McpHub { const settings = await this.readAndValidateMcpSettingsFile() if (settings) { try { - vscode.window.showInformationMessage("更新 MCP 服务...") await this.updateServerConnections(settings.mcpServers) vscode.window.showInformationMessage("MCP 服务已更新") } catch (error) { @@ -203,8 +213,8 @@ export class McpHub { cwd: config.cwd, env: { // ...(config.env ? await injectEnv(config.env) : {}), // Commented out as injectEnv is not found + ...getDefaultEnvironment(), ...(config.env || {}), // Use config.env directly or an empty object - ...(process.env.PATH ? { PATH: process.env.PATH } : {}), }, stderr: "pipe", }) @@ -319,6 +329,88 @@ export class McpHub { connection.server.status = "connected" connection.server.error = "" + // Register notification handler for real-time messages + console.log(`[MCP Debug] Setting up notification handlers for server: ${name}`) + console.log(`[MCP Debug] Client instance:`, connection.client) + console.log(`[MCP Debug] Transport type:`, config.type) + + // Try to set notification handler using the client's method + try { + // Import the notification schema from MCP SDK + const { z } = await import("zod") + + // Define the notification schema for notifications/message + const NotificationMessageSchema = z.object({ + method: z.literal("notifications/message"), + params: z + .object({ + level: z.enum(["debug", "info", "warning", "error"]).optional(), + logger: z.string().optional(), + data: z.string().optional(), + message: z.string().optional(), + }) + .optional(), + }) + + // Set the notification handler + connection.client.setNotificationHandler(NotificationMessageSchema as any, async (notification: any) => { + console.log(`[MCP Notification] ${name}:`, JSON.stringify(notification, null, 2)) + + const params = notification.params || {} + const level = params.level || "info" + const data = params.data || params.message || "" + const logger = params.logger || "" + + console.log(`[MCP Message Notification] ${name}: level=${level}, data=${data}, logger=${logger}`) + + // Format the message + const message = logger ? `[${logger}] ${data}` : data + + // Send notification directly to active task if callback is set + if (this.notificationCallback) { + console.log(`[MCP Debug] Sending notification to active task: ${message}`) + this.notificationCallback(name, level, message) + } else { + // Fallback: store for later retrieval + console.log(`[MCP Debug] No active task, storing notification: ${message}`) + this.pendingNotifications.push({ + serverName: name, + level, + message, + timestamp: Date.now(), + }) + } + + // Forward to webview if available + if (this.postMessageToWebview) { + await this.postMessageToWebview({ + type: "mcpNotification", + serverName: name, + notification: { + level, + data, + logger, + timestamp: Date.now(), + }, + } as any) + } + }) + console.log(`[MCP Debug] Successfully set notifications/message handler for ${name}`) + + // Also set a fallback handler for any other notification types + connection.client.fallbackNotificationHandler = async (notification: any) => { + console.log(`[MCP Fallback Notification] ${name}:`, JSON.stringify(notification, null, 2)) + + // Show in VS Code for visibility + vscode.window.showInformationMessage( + `MCP ${name}: ${notification.method || "unknown"} - ${JSON.stringify(notification.params || {})}`, + ) + } + console.log(`[MCP Debug] Successfully set fallback notification handler for ${name}`) + } catch (error) { + console.error(`[MCP Debug] Error setting notification handlers for ${name}:`, error) + } + // Initial fetch of tools and resources connection.server.tools = await this.fetchToolsList(name) connection.server.resources = await this.fetchResourcesList(name) @@ -941,6 +1033,38 @@ export class McpHub { } } + /** + * Get and clear pending notifications + * @returns Array of pending notifications + */ + getPendingNotifications(): Array<{ + serverName: string + level: string + message: string + timestamp: number + }> { + const notifications = [...this.pendingNotifications] + this.pendingNotifications = [] + return notifications + } + + /** + * Set the notification callback for real-time notifications + * @param callback Function to call when notifications arrive + */ + setNotificationCallback(callback: (serverName: string, level: string, message: string) => void): void { + this.notificationCallback = callback + console.log("[MCP Debug] Notification callback set") + } + + /** + * Clear the notification callback + */ + clearNotificationCallback(): void { + this.notificationCallback = undefined + console.log("[MCP Debug] Notification callback cleared") + } + async dispose(): Promise { this.removeAllFileWatchers() for (const connection of this.connections) { diff --git a/src/services/mcp/schemas.ts b/src/services/mcp/schemas.ts index 7e523c6a..63b7b3ce 100644 --- a/src/services/mcp/schemas.ts +++ b/src/services/mcp/schemas.ts @@ -16,49 +16,71 @@ const createServerTypeSchema = () => { // Stdio config (has command field) BaseConfigSchema.extend({ type: z.literal("stdio").optional(), + transportType: z.string().optional(), // Support legacy field command: z.string(), args: z.array(z.string()).optional(), cwd: z.string().optional(), env: z.record(z.string()).optional(), - // Explicitly disallow other types' fields - url: z.undefined().optional(), - headers: z.undefined().optional(), + // Allow other fields for backward compatibility + url: z.string().optional(), + headers: z.record(z.string()).optional(), }) - .transform((data) => ({ - ...data, - type: "stdio" as const, - })) - .refine((data) => data.type === undefined || data.type === "stdio", { message: TYPE_ERROR_MESSAGE }), + .transform((data) => { + // Support both type and transportType fields + const finalType = data.type || (data.transportType === "stdio" ? "stdio" : undefined) || "stdio" + return { + ...data, + type: finalType as "stdio", + // Remove the legacy field after transformation + transportType: undefined, + } + }) + .refine((data) => data.type === "stdio", { message: TYPE_ERROR_MESSAGE }), // SSE config (has url field) BaseConfigSchema.extend({ type: z.literal("sse").optional(), + transportType: z.string().optional(), // Support legacy field url: z.string().url("URL must be a valid URL format"), headers: z.record(z.string()).optional(), - // Explicitly disallow other types' fields - command: z.undefined().optional(), - args: z.undefined().optional(), - env: z.undefined().optional(), + // Allow other fields for backward compatibility + command: z.string().optional(), + args: z.array(z.string()).optional(), + env: z.record(z.string()).optional(), }) - .transform((data) => ({ - ...data, - type: "sse" as const, - })) - .refine((data) => data.type === undefined || data.type === "sse", { message: TYPE_ERROR_MESSAGE }), + .transform((data) => { + // Support both type and transportType fields + const finalType = data.type || (data.transportType === "sse" ? "sse" : undefined) || "sse" + return { + ...data, + type: finalType as "sse", + // Remove the legacy field after transformation + transportType: undefined, + } + }) + .refine((data) => data.type === "sse", { message: TYPE_ERROR_MESSAGE }), // Streamable HTTP config (has url field) BaseConfigSchema.extend({ type: z.literal("streamableHttp").optional(), + transportType: z.string().optional(), // Support legacy field url: z.string().url("URL must be a valid URL format"), headers: z.record(z.string()).optional(), - // Explicitly disallow other types' fields - command: z.undefined().optional(), - args: z.undefined().optional(), - env: z.undefined().optional(), + // Allow other fields for backward compatibility + command: z.string().optional(), + args: z.array(z.string()).optional(), + env: z.record(z.string()).optional(), }) - .transform((data) => ({ - ...data, - type: "streamableHttp" as const, - })) - .refine((data) => data.type === undefined || data.type === "streamableHttp", { + .transform((data) => { + // Support both type and transportType fields + // Note: legacy transportType was "http" not "streamableHttp" + const finalType = data.type || (data.transportType === "http" ? "streamableHttp" : undefined) || "streamableHttp" + return { + ...data, + type: finalType as "streamableHttp", + // Remove the legacy field after transformation + transportType: undefined, + } + }) + .refine((data) => data.type === "streamableHttp", { message: TYPE_ERROR_MESSAGE, }), ]) diff --git a/src/services/test/TestServer.ts b/src/services/test/TestServer.ts index 194ce4ca..79d6303a 100644 --- a/src/services/test/TestServer.ts +++ b/src/services/test/TestServer.ts @@ -13,7 +13,13 @@ import { getFileChanges, calculateToolSuccessRate, } from "./GitHelper" -import { updateGlobalState, getAllExtensionState, updateApiConfiguration, storeSecret } from "@core/storage/state" +import { + updateGlobalState, + getAllExtensionState, + updateApiConfiguration, + storeSecret, + updateWorkspaceState, +} from "@core/storage/state" import { ClineAsk, ExtensionMessage } from "@shared/ExtensionMessage" import { ApiProvider } from "@shared/api" import { HistoryItem } from "@shared/HistoryItem" @@ -272,7 +278,7 @@ export function createTestServer(webviewProvider?: WebviewProvider): http.Server await updateApiConfiguration(visibleWebview.controller.context, updatedConfig) // Update global state to use cline provider - await updateGlobalState(visibleWebview.controller.context, "apiProvider", "cline" as ApiProvider) + await updateWorkspaceState(visibleWebview.controller.context, "apiProvider", "cline" as ApiProvider) // Post state to webview to reflect changes await visibleWebview.controller.postStateToWebview() diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 0d7c7e10..68644b93 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -29,7 +29,7 @@ export interface ExtensionMessage { | "shengSuanYunModels" | "authCallback" text?: string - action?: "didBecomeVisible" | "accountLogoutClicked" | "focusChatInput" + action?: "accountLogoutClicked" state?: ExtensionState images?: string[] files?: string[] @@ -87,8 +87,8 @@ export interface ExtensionState { checkpointTrackerErrorMessage?: string clineMessages: ClineMessage[] currentTaskItem?: HistoryItem - customInstructions?: string mcpMarketplaceEnabled?: boolean + mcpRichDisplayEnabled: boolean planActSeparateModelsSetting: boolean enableCheckpointsSetting?: boolean platform: Platform @@ -97,6 +97,8 @@ export interface ExtensionState { telemetrySetting: TelemetrySetting shellIntegrationTimeout: number terminalReuseEnabled?: boolean + terminalOutputLineLimit: number + defaultTerminalProfile?: string uriScheme?: string userInfo?: any version: string @@ -165,6 +167,7 @@ export type ClineSay = | "browser_action_result" | "mcp_server_request_started" | "mcp_server_response" + | "mcp_notification" | "use_mcp_server" | "diff_error" | "deleted_api_reqs" diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 68fbce78..7cd2361a 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -8,7 +8,6 @@ import { McpViewTab } from "./mcp" export interface WebviewMessage { type: - | "apiConfiguration" | "requestVsCodeLmModels" | "authStateChanged" | "fetchMcpMarketplace" @@ -50,7 +49,7 @@ export interface WebviewMessage { mcpMarketplaceEnabled?: boolean mcpResponsesCollapsed?: boolean telemetrySetting?: TelemetrySetting - customInstructionsSetting?: string + mcpRichDisplayEnabled?: boolean mentionsRequestId?: string query?: string // For toggleFavoriteModel @@ -75,6 +74,7 @@ export interface WebviewMessage { offset?: number shellIntegrationTimeout?: number terminalReuseEnabled?: boolean + defaultTerminalProfile?: string } export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "messageResponse" diff --git a/src/shared/api.ts b/src/shared/api.ts index 8cd65815..a4818e69 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -2,6 +2,7 @@ import type { LanguageModelChatSelector } from "../api/providers/types" export type ApiProvider = | "anthropic" + | "claude-code" | "openrouter" | "bedrock" | "vertex" @@ -26,7 +27,7 @@ export type ApiProvider = | "sambanova" | "shengsuanyun" | "cerebras" - | "dify" + | "sapaicore" export interface ApiHandlerOptions { apiModelId?: string @@ -55,6 +56,7 @@ export interface ApiHandlerOptions { awsBedrockEndpoint?: string awsBedrockCustomSelected?: boolean awsBedrockCustomModelBaseId?: BedrockModelId + claudeCodePath?: string vertexProjectId?: string vertexRegion?: string openAiBaseUrl?: string @@ -98,8 +100,12 @@ export interface ApiHandlerOptions { shengSuanYunToken?: string shengSuanYunModelId?: string shengSuanYunModelInfo?: ModelInfo - difyBaseUrl?: string - difyApiKey?: string + sapAiCoreClientId?: string + sapAiCoreClientSecret?: string + sapAiResourceGroup?: string + sapAiCoreTokenUrl?: string + sapAiCoreBaseUrl?: string + sapAiCoreModelId?: string onRetryAttempt?: (attempt: number, maxRetries: number, delay: number, error: any) => void } @@ -225,6 +231,17 @@ export const anthropicModels = { }, } as const satisfies Record // as const assertion makes the object deeply readonly +// Claude Code +export type ClaudeCodeModelId = keyof typeof claudeCodeModels +export const claudeCodeDefaultModelId: ClaudeCodeModelId = "claude-sonnet-4-20250514" +export const claudeCodeModels = { + "claude-sonnet-4-20250514": anthropicModels["claude-sonnet-4-20250514"], + "claude-opus-4-20250514": anthropicModels["claude-opus-4-20250514"], + "claude-3-7-sonnet-20250219": anthropicModels["claude-3-7-sonnet-20250219"], + "claude-3-5-sonnet-20241022": anthropicModels["claude-3-5-sonnet-20241022"], + "claude-3-5-haiku-20241022": anthropicModels["claude-3-5-haiku-20241022"], +} as const satisfies Record + // AWS Bedrock // https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference.html export type BedrockModelId = keyof typeof bedrockModels @@ -606,6 +623,9 @@ export const vertexModels = { cacheReadsPrice: 0.625, }, ], + thinkingConfig: { + maxBudget: 32768, + }, }, "gemini-2.5-flash-preview-04-17": { maxTokens: 65536, @@ -774,6 +794,9 @@ export const geminiModels = { cacheReadsPrice: 0.625, }, ], + thinkingConfig: { + maxBudget: 32768, + }, }, "gemini-2.5-flash-preview-05-20": { maxTokens: 65536, @@ -925,9 +948,9 @@ export const openAiNativeModels = { contextWindow: 200_000, supportsImages: true, supportsPromptCache: true, - inputPrice: 10.0, - outputPrice: 40.0, - cacheReadsPrice: 2.5, + inputPrice: 2.0, + outputPrice: 8.0, + cacheReadsPrice: 0.5, }, "o4-mini": { maxTokens: 100_000, @@ -2424,15 +2447,124 @@ export const shengSuanYunDefaultModelInfo: ModelInfo = { cacheReadsPrice: 0, } -// Dify -export type DifyModelId = string -export const difyDefaultModelId = "" // Dify doesn't have a default model, it depends on the server configuration -export const difyModels = { - "dify-default": { - maxTokens: 4096, - contextWindow: 4096, - supportsImages: false, +// SAP AI Core +export type SapAiCoreModelId = keyof typeof sapAiCoreModels +export const sapAiCoreDefaultModelId: SapAiCoreModelId = "anthropic--claude-3.5-sonnet" +export const sapAiCoreModels = { + "anthropic--claude-3.7-sonnet": { + maxTokens: 64_000, + contextWindow: 200_000, + supportsImages: true, supportsPromptCache: false, - description: "Dify API", + inputPrice: 3.0, + outputPrice: 15.0, + }, + "anthropic--claude-3.5-sonnet": { + maxTokens: 8192, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 3.0, + outputPrice: 15.0, + }, + "anthropic--claude-3-sonnet": { + maxTokens: 4096, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 3.0, + outputPrice: 15.0, + }, + "anthropic--claude-3-haiku": { + maxTokens: 4096, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 3.0, + outputPrice: 15.0, + }, + "anthropic--claude-3-opus": { + maxTokens: 4096, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 3.0, + outputPrice: 15.0, + }, + "gpt-4o": { + maxTokens: 4096, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 3.0, + outputPrice: 15.0, + }, + "gpt-4o-mini": { + maxTokens: 4096, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 3.0, + outputPrice: 15.0, + }, + "gpt-4": { + maxTokens: 4096, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 3.0, + outputPrice: 15.0, + }, + o1: { + maxTokens: 4096, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 3.0, + outputPrice: 15.0, + }, + "o3-mini": { + maxTokens: 4096, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: false, + inputPrice: 3.0, + outputPrice: 15.0, + }, + "gpt-4.1": { + maxTokens: 32_768, + contextWindow: 1_047_576, + supportsImages: true, + supportsPromptCache: true, + inputPrice: 2, + outputPrice: 8, + cacheReadsPrice: 0.5, + }, + "gpt-4.1-nano": { + maxTokens: 32_768, + contextWindow: 1_047_576, + supportsImages: true, + supportsPromptCache: true, + inputPrice: 0.1, + outputPrice: 0.4, + cacheReadsPrice: 0.025, + }, + o3: { + maxTokens: 100_000, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: true, + inputPrice: 10.0, + outputPrice: 40.0, + cacheReadsPrice: 2.5, + }, + "o4-mini": { + maxTokens: 100_000, + contextWindow: 200_000, + supportsImages: true, + supportsPromptCache: true, + inputPrice: 1.1, + outputPrice: 4.4, + cacheReadsPrice: 0.275, }, } as const satisfies Record diff --git a/src/shared/proto-conversions/cline-message.ts b/src/shared/proto-conversions/cline-message.ts index 2511c0b9..2051040c 100644 --- a/src/shared/proto-conversions/cline-message.ts +++ b/src/shared/proto-conversions/cline-message.ts @@ -89,6 +89,7 @@ function convertClineSayToProtoEnum(say: AppClineSay | undefined): ClineSay | un browser_action_result: ClineSay.BROWSER_ACTION_RESULT, mcp_server_request_started: ClineSay.MCP_SERVER_REQUEST_STARTED, mcp_server_response: ClineSay.MCP_SERVER_RESPONSE, + mcp_notification: ClineSay.MCP_NOTIFICATION, use_mcp_server: ClineSay.USE_MCP_SERVER_SAY, diff_error: ClineSay.DIFF_ERROR, deleted_api_reqs: ClineSay.DELETED_API_REQS, @@ -132,6 +133,7 @@ function convertProtoEnumToClineSay(say: ClineSay): AppClineSay | undefined { [ClineSay.BROWSER_ACTION_RESULT]: "browser_action_result", [ClineSay.MCP_SERVER_REQUEST_STARTED]: "mcp_server_request_started", [ClineSay.MCP_SERVER_RESPONSE]: "mcp_server_response", + [ClineSay.MCP_NOTIFICATION]: "mcp_notification", [ClineSay.USE_MCP_SERVER_SAY]: "use_mcp_server", [ClineSay.DIFF_ERROR]: "diff_error", [ClineSay.DELETED_API_REQS]: "deleted_api_reqs", diff --git a/src/shared/proto-conversions/models/api-configuration-conversion.ts b/src/shared/proto-conversions/models/api-configuration-conversion.ts new file mode 100644 index 00000000..595a983e --- /dev/null +++ b/src/shared/proto-conversions/models/api-configuration-conversion.ts @@ -0,0 +1,462 @@ +import { + ApiConfiguration, + ApiProvider, + BedrockModelId, + ModelInfo, + OpenAiCompatibleModelInfo as AppOpenAiCompatibleModelInfo, + LiteLLMModelInfo as AppLiteLLMModelInfo, +} from "../../api" +import { + ModelsApiConfiguration as ProtoApiConfiguration, + ApiProvider as ProtoApiProvider, + LiteLLMModelInfo, + OpenAiCompatibleModelInfo, + OpenRouterModelInfo, + ThinkingConfig, +} from "../../proto/models" + +// Convert application ThinkingConfig to proto ThinkingConfig +function convertThinkingConfigToProto(config: ModelInfo["thinkingConfig"]): ThinkingConfig | undefined { + if (!config) { + return undefined + } + + return { + maxBudget: config.maxBudget, + outputPrice: config.outputPrice, + outputPriceTiers: config.outputPriceTiers || [], // Provide empty array if undefined + } +} + +// Convert proto ThinkingConfig to application ThinkingConfig +function convertProtoToThinkingConfig(config: ThinkingConfig | undefined): ModelInfo["thinkingConfig"] | undefined { + if (!config) { + return undefined + } + + return { + maxBudget: config.maxBudget, + outputPrice: config.outputPrice, + outputPriceTiers: config.outputPriceTiers.length > 0 ? config.outputPriceTiers : undefined, + } +} + +// Convert application ModelInfo to proto OpenRouterModelInfo +function convertModelInfoToProtoOpenRouter(info: ModelInfo | undefined): OpenRouterModelInfo | undefined { + if (!info) { + return undefined + } + + return { + maxTokens: info.maxTokens, + contextWindow: info.contextWindow, + supportsImages: info.supportsImages, + supportsPromptCache: info.supportsPromptCache ?? false, + inputPrice: info.inputPrice, + outputPrice: info.outputPrice, + cacheWritesPrice: info.cacheWritesPrice, + cacheReadsPrice: info.cacheReadsPrice, + description: info.description, + thinkingConfig: convertThinkingConfigToProto(info.thinkingConfig), + supportsGlobalEndpoint: info.supportsGlobalEndpoint, + tiers: info.tiers || [], + } +} + +// Convert proto OpenRouterModelInfo to application ModelInfo +function convertProtoToModelInfo(info: OpenRouterModelInfo | undefined): ModelInfo | undefined { + if (!info) { + return undefined + } + + return { + maxTokens: info.maxTokens, + contextWindow: info.contextWindow, + supportsImages: info.supportsImages, + supportsPromptCache: info.supportsPromptCache, + inputPrice: info.inputPrice, + outputPrice: info.outputPrice, + cacheWritesPrice: info.cacheWritesPrice, + cacheReadsPrice: info.cacheReadsPrice, + description: info.description, + thinkingConfig: convertProtoToThinkingConfig(info.thinkingConfig), + supportsGlobalEndpoint: info.supportsGlobalEndpoint, + tiers: info.tiers.length > 0 ? info.tiers : undefined, + } +} + +// Convert application LiteLLMModelInfo to proto LiteLLMModelInfo +function convertLiteLLMModelInfoToProto(info: AppLiteLLMModelInfo | undefined): LiteLLMModelInfo | undefined { + if (!info) { + return undefined + } + + return { + maxTokens: info.maxTokens, + contextWindow: info.contextWindow, + supportsImages: info.supportsImages, + supportsPromptCache: info.supportsPromptCache ?? false, + inputPrice: info.inputPrice, + outputPrice: info.outputPrice, + thinkingConfig: convertThinkingConfigToProto(info.thinkingConfig), + supportsGlobalEndpoint: info.supportsGlobalEndpoint, + cacheWritesPrice: info.cacheWritesPrice, + cacheReadsPrice: info.cacheReadsPrice, + description: info.description, + tiers: info.tiers || [], + temperature: info.temperature, + } +} + +// Convert proto LiteLLMModelInfo to application LiteLLMModelInfo +function convertProtoToLiteLLMModelInfo(info: LiteLLMModelInfo | undefined): AppLiteLLMModelInfo | undefined { + if (!info) { + return undefined + } + + return { + maxTokens: info.maxTokens, + contextWindow: info.contextWindow, + supportsImages: info.supportsImages, + supportsPromptCache: info.supportsPromptCache, + inputPrice: info.inputPrice, + outputPrice: info.outputPrice, + thinkingConfig: convertProtoToThinkingConfig(info.thinkingConfig), + supportsGlobalEndpoint: info.supportsGlobalEndpoint, + cacheWritesPrice: info.cacheWritesPrice, + cacheReadsPrice: info.cacheReadsPrice, + description: info.description, + tiers: info.tiers.length > 0 ? info.tiers : undefined, + temperature: info.temperature, + } +} + +// Convert application OpenAiCompatibleModelInfo to proto OpenAiCompatibleModelInfo +function convertOpenAiCompatibleModelInfoToProto( + info: AppOpenAiCompatibleModelInfo | undefined, +): OpenAiCompatibleModelInfo | undefined { + if (!info) { + return undefined + } + + return { + maxTokens: info.maxTokens, + contextWindow: info.contextWindow, + supportsImages: info.supportsImages, + supportsPromptCache: info.supportsPromptCache ?? false, + inputPrice: info.inputPrice, + outputPrice: info.outputPrice, + thinkingConfig: convertThinkingConfigToProto(info.thinkingConfig), + supportsGlobalEndpoint: info.supportsGlobalEndpoint, + cacheWritesPrice: info.cacheWritesPrice, + cacheReadsPrice: info.cacheReadsPrice, + description: info.description, + tiers: info.tiers || [], + temperature: info.temperature, + isR1FormatRequired: info.isR1FormatRequired, + } +} + +// Convert proto OpenAiCompatibleModelInfo to application OpenAiCompatibleModelInfo +function convertProtoToOpenAiCompatibleModelInfo( + info: OpenAiCompatibleModelInfo | undefined, +): AppOpenAiCompatibleModelInfo | undefined { + if (!info) { + return undefined + } + + return { + maxTokens: info.maxTokens, + contextWindow: info.contextWindow, + supportsImages: info.supportsImages, + supportsPromptCache: info.supportsPromptCache, + inputPrice: info.inputPrice, + outputPrice: info.outputPrice, + thinkingConfig: convertProtoToThinkingConfig(info.thinkingConfig), + supportsGlobalEndpoint: info.supportsGlobalEndpoint, + cacheWritesPrice: info.cacheWritesPrice, + cacheReadsPrice: info.cacheReadsPrice, + description: info.description, + tiers: info.tiers.length > 0 ? info.tiers : undefined, + temperature: info.temperature, + isR1FormatRequired: info.isR1FormatRequired, + } +} + +// Convert application ApiProvider to proto ApiProvider +function convertApiProviderToProto(provider: string | undefined): ProtoApiProvider { + switch (provider) { + case "anthropic": + return ProtoApiProvider.ANTHROPIC + case "openrouter": + return ProtoApiProvider.OPENROUTER + case "bedrock": + return ProtoApiProvider.BEDROCK + case "vertex": + return ProtoApiProvider.VERTEX + case "openai": + return ProtoApiProvider.OPENAI + case "ollama": + return ProtoApiProvider.OLLAMA + case "lmstudio": + return ProtoApiProvider.LMSTUDIO + case "gemini": + return ProtoApiProvider.GEMINI + case "openai-native": + return ProtoApiProvider.OPENAI_NATIVE + case "requesty": + return ProtoApiProvider.REQUESTY + case "together": + return ProtoApiProvider.TOGETHER + case "deepseek": + return ProtoApiProvider.DEEPSEEK + case "qwen": + return ProtoApiProvider.QWEN + case "doubao": + return ProtoApiProvider.DOUBAO + case "mistral": + return ProtoApiProvider.MISTRAL + case "vscode-lm": + return ProtoApiProvider.VSCODE_LM + case "cline": + return ProtoApiProvider.CLINE + case "litellm": + return ProtoApiProvider.LITELLM + case "nebius": + return ProtoApiProvider.NEBIUS + case "fireworks": + return ProtoApiProvider.FIREWORKS + case "asksage": + return ProtoApiProvider.ASKSAGE + case "xai": + return ProtoApiProvider.XAI + case "sambanova": + return ProtoApiProvider.SAMBANOVA + case "cerebras": + return ProtoApiProvider.CEREBRAS + case "sapaicore": + return ProtoApiProvider.SAPAICORE + case "claude-code": + return ProtoApiProvider.CLAUDE_CODE + default: + return ProtoApiProvider.ANTHROPIC + } +} + +// Convert proto ApiProvider to application ApiProvider +function convertProtoToApiProvider(provider: ProtoApiProvider): ApiProvider { + switch (provider) { + case ProtoApiProvider.ANTHROPIC: + return "anthropic" + case ProtoApiProvider.OPENROUTER: + return "openrouter" + case ProtoApiProvider.BEDROCK: + return "bedrock" + case ProtoApiProvider.VERTEX: + return "vertex" + case ProtoApiProvider.OPENAI: + return "openai" + case ProtoApiProvider.OLLAMA: + return "ollama" + case ProtoApiProvider.LMSTUDIO: + return "lmstudio" + case ProtoApiProvider.GEMINI: + return "gemini" + case ProtoApiProvider.OPENAI_NATIVE: + return "openai-native" + case ProtoApiProvider.REQUESTY: + return "requesty" + case ProtoApiProvider.TOGETHER: + return "together" + case ProtoApiProvider.DEEPSEEK: + return "deepseek" + case ProtoApiProvider.QWEN: + return "qwen" + case ProtoApiProvider.DOUBAO: + return "doubao" + case ProtoApiProvider.MISTRAL: + return "mistral" + case ProtoApiProvider.VSCODE_LM: + return "vscode-lm" + case ProtoApiProvider.CLINE: + return "cline" + case ProtoApiProvider.LITELLM: + return "litellm" + case ProtoApiProvider.NEBIUS: + return "nebius" + case ProtoApiProvider.FIREWORKS: + return "fireworks" + case ProtoApiProvider.ASKSAGE: + return "asksage" + case ProtoApiProvider.XAI: + return "xai" + case ProtoApiProvider.SAMBANOVA: + return "sambanova" + case ProtoApiProvider.CEREBRAS: + return "cerebras" + case ProtoApiProvider.SAPAICORE: + return "sapaicore" + case ProtoApiProvider.CLAUDE_CODE: + return "claude-code" + default: + return "anthropic" + } +} + +// Converts application ApiConfiguration to proto ApiConfiguration +export function convertApiConfigurationToProto(config: ApiConfiguration): ProtoApiConfiguration { + return { + apiModelId: config.apiModelId, + apiKey: config.apiKey, + clineApiKey: config.clineApiKey, + taskId: config.taskId, + liteLlmBaseUrl: config.liteLlmBaseUrl, + liteLlmModelId: config.liteLlmModelId, + liteLlmApiKey: config.liteLlmApiKey, + liteLlmUsePromptCache: config.liteLlmUsePromptCache, + openAiHeaders: config.openAiHeaders || {}, + liteLlmModelInfo: convertLiteLLMModelInfoToProto(config.liteLlmModelInfo), + anthropicBaseUrl: config.anthropicBaseUrl, + openRouterApiKey: config.openRouterApiKey, + openRouterModelId: config.openRouterModelId, + openRouterModelInfo: convertModelInfoToProtoOpenRouter(config.openRouterModelInfo), + openRouterProviderSorting: config.openRouterProviderSorting, + awsAccessKey: config.awsAccessKey, + awsSecretKey: config.awsSecretKey, + awsSessionToken: config.awsSessionToken, + awsRegion: config.awsRegion, + awsUseCrossRegionInference: config.awsUseCrossRegionInference, + awsBedrockUsePromptCache: config.awsBedrockUsePromptCache, + awsUseProfile: config.awsUseProfile, + awsProfile: config.awsProfile, + awsBedrockEndpoint: config.awsBedrockEndpoint, + awsBedrockCustomSelected: config.awsBedrockCustomSelected, + awsBedrockCustomModelBaseId: config.awsBedrockCustomModelBaseId as string | undefined, + vertexProjectId: config.vertexProjectId, + vertexRegion: config.vertexRegion, + openAiBaseUrl: config.openAiBaseUrl, + openAiApiKey: config.openAiApiKey, + openAiModelId: config.openAiModelId, + openAiModelInfo: convertOpenAiCompatibleModelInfoToProto(config.openAiModelInfo), + ollamaModelId: config.ollamaModelId, + ollamaBaseUrl: config.ollamaBaseUrl, + ollamaApiOptionsCtxNum: config.ollamaApiOptionsCtxNum, + lmStudioModelId: config.lmStudioModelId, + lmStudioBaseUrl: config.lmStudioBaseUrl, + geminiApiKey: config.geminiApiKey, + geminiBaseUrl: config.geminiBaseUrl, + openAiNativeApiKey: config.openAiNativeApiKey, + deepSeekApiKey: config.deepSeekApiKey, + requestyApiKey: config.requestyApiKey, + requestyModelId: config.requestyModelId, + requestyModelInfo: convertModelInfoToProtoOpenRouter(config.requestyModelInfo), + togetherApiKey: config.togetherApiKey, + togetherModelId: config.togetherModelId, + fireworksApiKey: config.fireworksApiKey, + fireworksModelId: config.fireworksModelId, + fireworksModelMaxCompletionTokens: config.fireworksModelMaxCompletionTokens, + fireworksModelMaxTokens: config.fireworksModelMaxTokens, + qwenApiKey: config.qwenApiKey, + doubaoApiKey: config.doubaoApiKey, + mistralApiKey: config.mistralApiKey, + azureApiVersion: config.azureApiVersion, + vsCodeLmModelSelector: config.vsCodeLmModelSelector, + qwenApiLine: config.qwenApiLine, + nebiusApiKey: config.nebiusApiKey, + asksageApiUrl: config.asksageApiUrl, + asksageApiKey: config.asksageApiKey, + xaiApiKey: config.xaiApiKey, + thinkingBudgetTokens: config.thinkingBudgetTokens, + reasoningEffort: config.reasoningEffort, + sambanovaApiKey: config.sambanovaApiKey, + cerebrasApiKey: config.cerebrasApiKey, + requestTimeoutMs: config.requestTimeoutMs, + apiProvider: config.apiProvider ? convertApiProviderToProto(config.apiProvider) : undefined, + favoritedModelIds: config.favoritedModelIds || [], + sapAiCoreClientId: config.sapAiCoreClientId, + sapAiCoreClientSecret: config.sapAiCoreClientSecret, + sapAiResourceGroup: config.sapAiResourceGroup, + sapAiCoreTokenUrl: config.sapAiCoreTokenUrl, + sapAiCoreBaseUrl: config.sapAiCoreBaseUrl, + claudeCodePath: config.claudeCodePath, + } +} + +// Converts proto ApiConfiguration to application ApiConfiguration +export function convertProtoToApiConfiguration(protoConfig: ProtoApiConfiguration): ApiConfiguration { + return { + apiModelId: protoConfig.apiModelId, + apiKey: protoConfig.apiKey, + clineApiKey: protoConfig.clineApiKey, + taskId: protoConfig.taskId, + liteLlmBaseUrl: protoConfig.liteLlmBaseUrl, + liteLlmModelId: protoConfig.liteLlmModelId, + liteLlmApiKey: protoConfig.liteLlmApiKey, + liteLlmUsePromptCache: protoConfig.liteLlmUsePromptCache, + openAiHeaders: Object.keys(protoConfig.openAiHeaders).length > 0 ? protoConfig.openAiHeaders : undefined, + liteLlmModelInfo: convertProtoToLiteLLMModelInfo(protoConfig.liteLlmModelInfo), + anthropicBaseUrl: protoConfig.anthropicBaseUrl, + openRouterApiKey: protoConfig.openRouterApiKey, + openRouterModelId: protoConfig.openRouterModelId, + openRouterModelInfo: convertProtoToModelInfo(protoConfig.openRouterModelInfo), + openRouterProviderSorting: protoConfig.openRouterProviderSorting, + awsAccessKey: protoConfig.awsAccessKey, + awsSecretKey: protoConfig.awsSecretKey, + awsSessionToken: protoConfig.awsSessionToken, + awsRegion: protoConfig.awsRegion, + awsUseCrossRegionInference: protoConfig.awsUseCrossRegionInference, + awsBedrockUsePromptCache: protoConfig.awsBedrockUsePromptCache, + awsUseProfile: protoConfig.awsUseProfile, + awsProfile: protoConfig.awsProfile, + awsBedrockEndpoint: protoConfig.awsBedrockEndpoint, + awsBedrockCustomSelected: protoConfig.awsBedrockCustomSelected, + awsBedrockCustomModelBaseId: protoConfig.awsBedrockCustomModelBaseId as BedrockModelId | undefined, + vertexProjectId: protoConfig.vertexProjectId, + vertexRegion: protoConfig.vertexRegion, + openAiBaseUrl: protoConfig.openAiBaseUrl, + openAiApiKey: protoConfig.openAiApiKey, + openAiModelId: protoConfig.openAiModelId, + openAiModelInfo: convertProtoToOpenAiCompatibleModelInfo(protoConfig.openAiModelInfo), + ollamaModelId: protoConfig.ollamaModelId, + ollamaBaseUrl: protoConfig.ollamaBaseUrl, + ollamaApiOptionsCtxNum: protoConfig.ollamaApiOptionsCtxNum, + lmStudioModelId: protoConfig.lmStudioModelId, + lmStudioBaseUrl: protoConfig.lmStudioBaseUrl, + geminiApiKey: protoConfig.geminiApiKey, + geminiBaseUrl: protoConfig.geminiBaseUrl, + openAiNativeApiKey: protoConfig.openAiNativeApiKey, + deepSeekApiKey: protoConfig.deepSeekApiKey, + requestyApiKey: protoConfig.requestyApiKey, + requestyModelId: protoConfig.requestyModelId, + requestyModelInfo: convertProtoToModelInfo(protoConfig.requestyModelInfo), + togetherApiKey: protoConfig.togetherApiKey, + togetherModelId: protoConfig.togetherModelId, + fireworksApiKey: protoConfig.fireworksApiKey, + fireworksModelId: protoConfig.fireworksModelId, + fireworksModelMaxCompletionTokens: protoConfig.fireworksModelMaxCompletionTokens, + fireworksModelMaxTokens: protoConfig.fireworksModelMaxTokens, + qwenApiKey: protoConfig.qwenApiKey, + doubaoApiKey: protoConfig.doubaoApiKey, + mistralApiKey: protoConfig.mistralApiKey, + azureApiVersion: protoConfig.azureApiVersion, + vsCodeLmModelSelector: protoConfig.vsCodeLmModelSelector, + qwenApiLine: protoConfig.qwenApiLine, + nebiusApiKey: protoConfig.nebiusApiKey, + asksageApiUrl: protoConfig.asksageApiUrl, + asksageApiKey: protoConfig.asksageApiKey, + xaiApiKey: protoConfig.xaiApiKey, + thinkingBudgetTokens: protoConfig.thinkingBudgetTokens, + reasoningEffort: protoConfig.reasoningEffort, + sambanovaApiKey: protoConfig.sambanovaApiKey, + cerebrasApiKey: protoConfig.cerebrasApiKey, + requestTimeoutMs: protoConfig.requestTimeoutMs, + apiProvider: protoConfig.apiProvider !== undefined ? convertProtoToApiProvider(protoConfig.apiProvider) : undefined, + favoritedModelIds: protoConfig.favoritedModelIds.length > 0 ? protoConfig.favoritedModelIds : undefined, + sapAiCoreClientId: protoConfig.sapAiCoreClientId, + sapAiCoreClientSecret: protoConfig.sapAiCoreClientSecret, + sapAiResourceGroup: protoConfig.sapAiResourceGroup, + sapAiCoreTokenUrl: protoConfig.sapAiCoreTokenUrl, + sapAiCoreBaseUrl: protoConfig.sapAiCoreBaseUrl, + claudeCodePath: protoConfig.claudeCodePath, + } +} diff --git a/src/shared/proto-conversions/models/vscode-lm-models-conversion.ts b/src/shared/proto-conversions/models/vscode-lm-models-conversion.ts index 627dc6a0..815d1fe0 100644 --- a/src/shared/proto-conversions/models/vscode-lm-models-conversion.ts +++ b/src/shared/proto-conversions/models/vscode-lm-models-conversion.ts @@ -1,4 +1,4 @@ -import { VsCodeLmModel } from "../../proto/models" +import { LanguageModelChatSelector } from "../../proto/models" /** * Represents a VS Code language model in the native VS Code format @@ -13,7 +13,7 @@ export interface VsCodeNativeModel { /** * Converts VS Code native model format to protobuf format */ -export function convertVsCodeNativeModelsToProtoModels(models: VsCodeNativeModel[]): VsCodeLmModel[] { +export function convertVsCodeNativeModelsToProtoModels(models: VsCodeNativeModel[]): LanguageModelChatSelector[] { return (models || []).map((model) => ({ vendor: model.vendor || "", family: model.family || "", diff --git a/src/shared/proto-conversions/state/settings-conversion.ts b/src/shared/proto-conversions/state/settings-conversion.ts index 532e5f8e..45a0080f 100644 --- a/src/shared/proto-conversions/state/settings-conversion.ts +++ b/src/shared/proto-conversions/state/settings-conversion.ts @@ -1,4 +1,4 @@ -import { ApiConfiguration } from "@shared/api" +import { ApiConfiguration, ApiProvider, BedrockModelId } from "@shared/api" import { ChatSettings } from "@shared/ChatSettings" import { ApiConfiguration as ProtoApiConfiguration, @@ -102,6 +102,13 @@ export function convertApiConfigurationToProtoApiConfiguration(config: ApiConfig // OpenRouter specific openrouterProviderSorting: config.openRouterProviderSorting, + // SAP AI Core specific + sapAiCoreClientId: config.sapAiCoreClientId, + sapAiCoreClientSecret: config.sapAiCoreClientSecret, + sapAiCoreBaseUrl: config.sapAiCoreBaseUrl, + sapAiCoreTokenUrl: config.sapAiCoreTokenUrl, + sapAiResourceGroup: config.sapAiResourceGroup, + // Complex objects stored as JSON strings vscodeLmModelSelector: config.vsCodeLmModelSelector ? JSON.stringify(config.vsCodeLmModelSelector) : undefined, openrouterModelInfo: config.openRouterModelInfo ? JSON.stringify(config.openRouterModelInfo) : undefined, @@ -110,6 +117,9 @@ export function convertApiConfigurationToProtoApiConfiguration(config: ApiConfig litellmModelInfo: config.liteLlmModelInfo ? JSON.stringify(config.liteLlmModelInfo) : undefined, openaiHeaders: config.openAiHeaders ? JSON.stringify(config.openAiHeaders) : undefined, + // Claude Code specific + claudeCodePath: config.claudeCodePath, + // Arrays favoritedModelIds: config.favoritedModelIds || [], @@ -118,10 +128,6 @@ export function convertApiConfigurationToProtoApiConfiguration(config: ApiConfig shengsuanyunToken: config.shengSuanYunToken, shengsuanyunModelId: config.shengSuanYunModelId, shengsuanyunModelInfo: config.shengSuanYunModelInfo ? JSON.stringify(config.shengSuanYunModelInfo) : undefined, - - // Dify specific fields - difyApiKey: config.difyApiKey, - difyBaseUrl: config.difyApiKey, }) } @@ -132,7 +138,7 @@ export function convertProtoApiConfigurationToApiConfiguration(protoConfig: Prot // eslint-disable-next-line eslint-rules/no-protobuf-object-literals const config: ApiConfiguration = { // Core API fields - apiProvider: protoConfig.apiProvider as any, + apiProvider: protoConfig.apiProvider as ApiProvider, apiModelId: protoConfig.apiModelId, apiKey: protoConfig.apiKey, @@ -168,7 +174,7 @@ export function convertProtoApiConfigurationToApiConfiguration(protoConfig: Prot // AWS Bedrock fields awsBedrockCustomSelected: protoConfig.awsBedrockCustomSelected, - awsBedrockCustomModelBaseId: protoConfig.awsBedrockCustomModelBaseId as any, + awsBedrockCustomModelBaseId: protoConfig.awsBedrockCustomModelBaseId as BedrockModelId | undefined, awsAccessKey: protoConfig.awsAccessKey, awsSecretKey: protoConfig.awsSecretKey, awsSessionToken: protoConfig.awsSessionToken, @@ -218,6 +224,16 @@ export function convertProtoApiConfigurationToApiConfiguration(protoConfig: Prot // OpenRouter specific openRouterProviderSorting: protoConfig.openrouterProviderSorting, + // SAP AI Core specific + sapAiCoreClientId: protoConfig.sapAiCoreClientId, + sapAiCoreClientSecret: protoConfig.sapAiCoreClientSecret, + sapAiCoreBaseUrl: protoConfig.sapAiCoreBaseUrl, + sapAiCoreTokenUrl: protoConfig.sapAiCoreTokenUrl, + sapAiResourceGroup: protoConfig.sapAiResourceGroup, + + // Claude Code specific + claudeCodePath: protoConfig.claudeCodePath, + // Arrays favoritedModelIds: protoConfig.favoritedModelIds || [], @@ -225,10 +241,6 @@ export function convertProtoApiConfigurationToApiConfiguration(protoConfig: Prot shengSuanYunApiKey: protoConfig.shengsuanyunApiKey, shengSuanYunToken: protoConfig.shengsuanyunToken, shengSuanYunModelId: protoConfig.shengsuanyunModelId, - - // Dify specific fields - difyApiKey: protoConfig.difyApiKey, - difyBaseUrl: protoConfig.difyApiKey, } // Handle complex JSON objects diff --git a/src/shared/proto/account.ts b/src/shared/proto/account.ts index 788eaa18..e6cef138 100644 --- a/src/shared/proto/account.ts +++ b/src/shared/proto/account.ts @@ -11,7 +11,7 @@ import { Empty, EmptyRequest, String } from "./common"; export type AccountServiceDefinition = typeof AccountServiceDefinition; export const AccountServiceDefinition = { name: "AccountService", - fullName: "ClineShengsuan.AccountService", + fullName: "cline_shengsuan.AccountService", methods: { /** * Handles the user clicking the login link in the UI. diff --git a/src/shared/proto/browser.ts b/src/shared/proto/browser.ts index 37d56484..5df91386 100644 --- a/src/shared/proto/browser.ts +++ b/src/shared/proto/browser.ts @@ -677,7 +677,7 @@ export const UpdateBrowserSettingsRequest: MessageFns = { export type CheckpointsServiceDefinition = typeof CheckpointsServiceDefinition; export const CheckpointsServiceDefinition = { name: "CheckpointsService", - fullName: "ClineShengsuan.CheckpointsService", + fullName: "cline_shengsuan.CheckpointsService", methods: { checkpointDiff: { name: "checkpointDiff", diff --git a/src/shared/proto/file.ts b/src/shared/proto/file.ts index b3693f1b..92321fe0 100644 --- a/src/shared/proto/file.ts +++ b/src/shared/proto/file.ts @@ -1811,7 +1811,7 @@ export const ToggleWorkflowRequest: MessageFns = { export type FileServiceDefinition = typeof FileServiceDefinition; export const FileServiceDefinition = { name: "FileService", - fullName: "ClineShengsuan.FileService", + fullName: "cline_shengsuan.FileService", methods: { /** Copies text to clipboard */ copyToClipboard: { diff --git a/src/shared/proto/mcp.ts b/src/shared/proto/mcp.ts index ad58de6d..c07bc447 100644 --- a/src/shared/proto/mcp.ts +++ b/src/shared/proto/mcp.ts @@ -1538,7 +1538,7 @@ export const McpMarketplaceCatalog: MessageFns = { export type McpServiceDefinition = typeof McpServiceDefinition; export const McpServiceDefinition = { name: "McpService", - fullName: "ClineShengsuan.McpService", + fullName: "cline_shengsuan.McpService", methods: { toggleMcpServer: { name: "toggleMcpServer", diff --git a/src/shared/proto/models.ts b/src/shared/proto/models.ts index c3666c7f..66733901 100644 --- a/src/shared/proto/models.ts +++ b/src/shared/proto/models.ts @@ -6,19 +6,197 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; -import { EmptyRequest, Metadata, StringArray, StringRequest } from "./common"; +import { Empty, EmptyRequest, Metadata, StringArray, StringRequest } from "./common"; + +/** API Provider enumeration */ +export enum ApiProvider { + ANTHROPIC = 0, + OPENROUTER = 1, + BEDROCK = 2, + VERTEX = 3, + OPENAI = 4, + OLLAMA = 5, + LMSTUDIO = 6, + GEMINI = 7, + OPENAI_NATIVE = 8, + REQUESTY = 9, + TOGETHER = 10, + DEEPSEEK = 11, + QWEN = 12, + DOUBAO = 13, + MISTRAL = 14, + VSCODE_LM = 15, + CLINE = 16, + LITELLM = 17, + NEBIUS = 18, + FIREWORKS = 19, + ASKSAGE = 20, + XAI = 21, + SAMBANOVA = 22, + CEREBRAS = 23, + SAPAICORE = 24, + CLAUDE_CODE = 25, + UNRECOGNIZED = -1, +} + +export function apiProviderFromJSON(object: any): ApiProvider { + switch (object) { + case 0: + case "ANTHROPIC": + return ApiProvider.ANTHROPIC; + case 1: + case "OPENROUTER": + return ApiProvider.OPENROUTER; + case 2: + case "BEDROCK": + return ApiProvider.BEDROCK; + case 3: + case "VERTEX": + return ApiProvider.VERTEX; + case 4: + case "OPENAI": + return ApiProvider.OPENAI; + case 5: + case "OLLAMA": + return ApiProvider.OLLAMA; + case 6: + case "LMSTUDIO": + return ApiProvider.LMSTUDIO; + case 7: + case "GEMINI": + return ApiProvider.GEMINI; + case 8: + case "OPENAI_NATIVE": + return ApiProvider.OPENAI_NATIVE; + case 9: + case "REQUESTY": + return ApiProvider.REQUESTY; + case 10: + case "TOGETHER": + return ApiProvider.TOGETHER; + case 11: + case "DEEPSEEK": + return ApiProvider.DEEPSEEK; + case 12: + case "QWEN": + return ApiProvider.QWEN; + case 13: + case "DOUBAO": + return ApiProvider.DOUBAO; + case 14: + case "MISTRAL": + return ApiProvider.MISTRAL; + case 15: + case "VSCODE_LM": + return ApiProvider.VSCODE_LM; + case 16: + case "CLINE": + return ApiProvider.CLINE; + case 17: + case "LITELLM": + return ApiProvider.LITELLM; + case 18: + case "NEBIUS": + return ApiProvider.NEBIUS; + case 19: + case "FIREWORKS": + return ApiProvider.FIREWORKS; + case 20: + case "ASKSAGE": + return ApiProvider.ASKSAGE; + case 21: + case "XAI": + return ApiProvider.XAI; + case 22: + case "SAMBANOVA": + return ApiProvider.SAMBANOVA; + case 23: + case "CEREBRAS": + return ApiProvider.CEREBRAS; + case 24: + case "SAPAICORE": + return ApiProvider.SAPAICORE; + case 25: + case "CLAUDE_CODE": + return ApiProvider.CLAUDE_CODE; + case -1: + case "UNRECOGNIZED": + default: + return ApiProvider.UNRECOGNIZED; + } +} + +export function apiProviderToJSON(object: ApiProvider): string { + switch (object) { + case ApiProvider.ANTHROPIC: + return "ANTHROPIC"; + case ApiProvider.OPENROUTER: + return "OPENROUTER"; + case ApiProvider.BEDROCK: + return "BEDROCK"; + case ApiProvider.VERTEX: + return "VERTEX"; + case ApiProvider.OPENAI: + return "OPENAI"; + case ApiProvider.OLLAMA: + return "OLLAMA"; + case ApiProvider.LMSTUDIO: + return "LMSTUDIO"; + case ApiProvider.GEMINI: + return "GEMINI"; + case ApiProvider.OPENAI_NATIVE: + return "OPENAI_NATIVE"; + case ApiProvider.REQUESTY: + return "REQUESTY"; + case ApiProvider.TOGETHER: + return "TOGETHER"; + case ApiProvider.DEEPSEEK: + return "DEEPSEEK"; + case ApiProvider.QWEN: + return "QWEN"; + case ApiProvider.DOUBAO: + return "DOUBAO"; + case ApiProvider.MISTRAL: + return "MISTRAL"; + case ApiProvider.VSCODE_LM: + return "VSCODE_LM"; + case ApiProvider.CLINE: + return "CLINE"; + case ApiProvider.LITELLM: + return "LITELLM"; + case ApiProvider.NEBIUS: + return "NEBIUS"; + case ApiProvider.FIREWORKS: + return "FIREWORKS"; + case ApiProvider.ASKSAGE: + return "ASKSAGE"; + case ApiProvider.XAI: + return "XAI"; + case ApiProvider.SAMBANOVA: + return "SAMBANOVA"; + case ApiProvider.CEREBRAS: + return "CEREBRAS"; + case ApiProvider.SAPAICORE: + return "SAPAICORE"; + case ApiProvider.CLAUDE_CODE: + return "CLAUDE_CODE"; + case ApiProvider.UNRECOGNIZED: + default: + return "UNRECOGNIZED"; + } +} /** List of VS Code LM models */ export interface VsCodeLmModelsArray { - models: VsCodeLmModel[]; + models: LanguageModelChatSelector[]; } -/** Structure representing a VS Code LM model */ -export interface VsCodeLmModel { - vendor: string; - family: string; - version: string; - id: string; +/** Structure representing a language model chat selector */ +export interface LanguageModelChatSelector { + vendor?: string | undefined; + family?: string | undefined; + version?: string | undefined; + id?: string | undefined; } /** Price tier for tiered pricing models */ @@ -85,6 +263,130 @@ export interface OpenAiModelsRequest { apiKey: string; } +/** Request for updating API configuration */ +export interface UpdateApiConfigurationRequest { + metadata?: Metadata | undefined; + apiConfiguration?: ModelsApiConfiguration | undefined; +} + +/** Model info for OpenAI-compatible models */ +export interface OpenAiCompatibleModelInfo { + maxTokens?: number | undefined; + contextWindow?: number | undefined; + supportsImages?: boolean | undefined; + supportsPromptCache: boolean; + inputPrice?: number | undefined; + outputPrice?: number | undefined; + thinkingConfig?: ThinkingConfig | undefined; + supportsGlobalEndpoint?: boolean | undefined; + cacheWritesPrice?: number | undefined; + cacheReadsPrice?: number | undefined; + description?: string | undefined; + tiers: ModelTier[]; + temperature?: number | undefined; + isR1FormatRequired?: boolean | undefined; +} + +/** Model info for LiteLLM models */ +export interface LiteLLMModelInfo { + maxTokens?: number | undefined; + contextWindow?: number | undefined; + supportsImages?: boolean | undefined; + supportsPromptCache: boolean; + inputPrice?: number | undefined; + outputPrice?: number | undefined; + thinkingConfig?: ThinkingConfig | undefined; + supportsGlobalEndpoint?: boolean | undefined; + cacheWritesPrice?: number | undefined; + cacheReadsPrice?: number | undefined; + description?: string | undefined; + tiers: ModelTier[]; + temperature?: number | undefined; +} + +/** Main ApiConfiguration message */ +export interface ModelsApiConfiguration { + /** From ApiHandlerOptions (excluding onRetryAttempt function) */ + apiModelId?: string | undefined; + apiKey?: string | undefined; + clineApiKey?: string | undefined; + taskId?: string | undefined; + liteLlmBaseUrl?: string | undefined; + liteLlmModelId?: string | undefined; + liteLlmApiKey?: string | undefined; + liteLlmUsePromptCache?: boolean | undefined; + openAiHeaders: { [key: string]: string }; + liteLlmModelInfo?: LiteLLMModelInfo | undefined; + anthropicBaseUrl?: string | undefined; + openRouterApiKey?: string | undefined; + openRouterModelId?: string | undefined; + openRouterModelInfo?: OpenRouterModelInfo | undefined; + openRouterProviderSorting?: string | undefined; + awsAccessKey?: string | undefined; + awsSecretKey?: string | undefined; + awsSessionToken?: string | undefined; + awsRegion?: string | undefined; + awsUseCrossRegionInference?: boolean | undefined; + awsBedrockUsePromptCache?: boolean | undefined; + awsUseProfile?: boolean | undefined; + awsProfile?: string | undefined; + awsBedrockEndpoint?: string | undefined; + awsBedrockCustomSelected?: boolean | undefined; + awsBedrockCustomModelBaseId?: string | undefined; + vertexProjectId?: string | undefined; + vertexRegion?: string | undefined; + openAiBaseUrl?: string | undefined; + openAiApiKey?: string | undefined; + openAiModelId?: string | undefined; + openAiModelInfo?: OpenAiCompatibleModelInfo | undefined; + ollamaModelId?: string | undefined; + ollamaBaseUrl?: string | undefined; + ollamaApiOptionsCtxNum?: string | undefined; + lmStudioModelId?: string | undefined; + lmStudioBaseUrl?: string | undefined; + geminiApiKey?: string | undefined; + geminiBaseUrl?: string | undefined; + openAiNativeApiKey?: string | undefined; + deepSeekApiKey?: string | undefined; + requestyApiKey?: string | undefined; + requestyModelId?: string | undefined; + requestyModelInfo?: OpenRouterModelInfo | undefined; + togetherApiKey?: string | undefined; + togetherModelId?: string | undefined; + fireworksApiKey?: string | undefined; + fireworksModelId?: string | undefined; + fireworksModelMaxCompletionTokens?: number | undefined; + fireworksModelMaxTokens?: number | undefined; + qwenApiKey?: string | undefined; + doubaoApiKey?: string | undefined; + mistralApiKey?: string | undefined; + azureApiVersion?: string | undefined; + vsCodeLmModelSelector?: LanguageModelChatSelector | undefined; + qwenApiLine?: string | undefined; + nebiusApiKey?: string | undefined; + asksageApiUrl?: string | undefined; + asksageApiKey?: string | undefined; + xaiApiKey?: string | undefined; + thinkingBudgetTokens?: number | undefined; + reasoningEffort?: string | undefined; + sambanovaApiKey?: string | undefined; + cerebrasApiKey?: string | undefined; + requestTimeoutMs?: number | undefined; + apiProvider?: ApiProvider | undefined; + favoritedModelIds: string[]; + sapAiCoreClientId?: string | undefined; + sapAiCoreClientSecret?: string | undefined; + sapAiResourceGroup?: string | undefined; + sapAiCoreTokenUrl?: string | undefined; + sapAiCoreBaseUrl?: string | undefined; + claudeCodePath?: string | undefined; +} + +export interface ModelsApiConfiguration_OpenAiHeadersEntry { + key: string; + value: string; +} + export interface ShengSuanYunModelInfo { maxTokens?: number | undefined; contextWindow?: number | undefined; @@ -106,7 +408,7 @@ function createBaseVsCodeLmModelsArray(): VsCodeLmModelsArray { export const VsCodeLmModelsArray: MessageFns = { encode(message: VsCodeLmModelsArray, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.models) { - VsCodeLmModel.encode(v!, writer.uint32(10).fork()).join(); + LanguageModelChatSelector.encode(v!, writer.uint32(10).fork()).join(); } return writer; }, @@ -123,7 +425,7 @@ export const VsCodeLmModelsArray: MessageFns = { break; } - message.models.push(VsCodeLmModel.decode(reader, reader.uint32())); + message.models.push(LanguageModelChatSelector.decode(reader, reader.uint32())); continue; } } @@ -137,14 +439,16 @@ export const VsCodeLmModelsArray: MessageFns = { fromJSON(object: any): VsCodeLmModelsArray { return { - models: globalThis.Array.isArray(object?.models) ? object.models.map((e: any) => VsCodeLmModel.fromJSON(e)) : [], + models: globalThis.Array.isArray(object?.models) + ? object.models.map((e: any) => LanguageModelChatSelector.fromJSON(e)) + : [], }; }, toJSON(message: VsCodeLmModelsArray): unknown { const obj: any = {}; if (message.models?.length) { - obj.models = message.models.map((e) => VsCodeLmModel.toJSON(e)); + obj.models = message.models.map((e) => LanguageModelChatSelector.toJSON(e)); } return obj; }, @@ -154,36 +458,36 @@ export const VsCodeLmModelsArray: MessageFns = { }, fromPartial, I>>(object: I): VsCodeLmModelsArray { const message = createBaseVsCodeLmModelsArray(); - message.models = object.models?.map((e) => VsCodeLmModel.fromPartial(e)) || []; + message.models = object.models?.map((e) => LanguageModelChatSelector.fromPartial(e)) || []; return message; }, }; -function createBaseVsCodeLmModel(): VsCodeLmModel { - return { vendor: "", family: "", version: "", id: "" }; +function createBaseLanguageModelChatSelector(): LanguageModelChatSelector { + return { vendor: undefined, family: undefined, version: undefined, id: undefined }; } -export const VsCodeLmModel: MessageFns = { - encode(message: VsCodeLmModel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.vendor !== "") { +export const LanguageModelChatSelector: MessageFns = { + encode(message: LanguageModelChatSelector, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.vendor !== undefined) { writer.uint32(10).string(message.vendor); } - if (message.family !== "") { + if (message.family !== undefined) { writer.uint32(18).string(message.family); } - if (message.version !== "") { + if (message.version !== undefined) { writer.uint32(26).string(message.version); } - if (message.id !== "") { + if (message.id !== undefined) { writer.uint32(34).string(message.id); } return writer; }, - decode(input: BinaryReader | Uint8Array, length?: number): VsCodeLmModel { + decode(input: BinaryReader | Uint8Array, length?: number): LanguageModelChatSelector { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVsCodeLmModel(); + const message = createBaseLanguageModelChatSelector(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -228,41 +532,41 @@ export const VsCodeLmModel: MessageFns = { return message; }, - fromJSON(object: any): VsCodeLmModel { + fromJSON(object: any): LanguageModelChatSelector { return { - vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : "", - family: isSet(object.family) ? globalThis.String(object.family) : "", - version: isSet(object.version) ? globalThis.String(object.version) : "", - id: isSet(object.id) ? globalThis.String(object.id) : "", + vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : undefined, + family: isSet(object.family) ? globalThis.String(object.family) : undefined, + version: isSet(object.version) ? globalThis.String(object.version) : undefined, + id: isSet(object.id) ? globalThis.String(object.id) : undefined, }; }, - toJSON(message: VsCodeLmModel): unknown { + toJSON(message: LanguageModelChatSelector): unknown { const obj: any = {}; - if (message.vendor !== "") { + if (message.vendor !== undefined) { obj.vendor = message.vendor; } - if (message.family !== "") { + if (message.family !== undefined) { obj.family = message.family; } - if (message.version !== "") { + if (message.version !== undefined) { obj.version = message.version; } - if (message.id !== "") { + if (message.id !== undefined) { obj.id = message.id; } return obj; }, - create, I>>(base?: I): VsCodeLmModel { - return VsCodeLmModel.fromPartial(base ?? ({} as any)); + create, I>>(base?: I): LanguageModelChatSelector { + return LanguageModelChatSelector.fromPartial(base ?? ({} as any)); }, - fromPartial, I>>(object: I): VsCodeLmModel { - const message = createBaseVsCodeLmModel(); - message.vendor = object.vendor ?? ""; - message.family = object.family ?? ""; - message.version = object.version ?? ""; - message.id = object.id ?? ""; + fromPartial, I>>(object: I): LanguageModelChatSelector { + const message = createBaseLanguageModelChatSelector(); + message.vendor = object.vendor ?? undefined; + message.family = object.family ?? undefined; + message.version = object.version ?? undefined; + message.id = object.id ?? undefined; return message; }, }; @@ -1080,6 +1384,2078 @@ export const OpenAiModelsRequest: MessageFns = { }, }; +function createBaseUpdateApiConfigurationRequest(): UpdateApiConfigurationRequest { + return { metadata: undefined, apiConfiguration: undefined }; +} + +export const UpdateApiConfigurationRequest: MessageFns = { + encode(message: UpdateApiConfigurationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.metadata !== undefined) { + Metadata.encode(message.metadata, writer.uint32(10).fork()).join(); + } + if (message.apiConfiguration !== undefined) { + ModelsApiConfiguration.encode(message.apiConfiguration, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): UpdateApiConfigurationRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateApiConfigurationRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.metadata = Metadata.decode(reader, reader.uint32()); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.apiConfiguration = ModelsApiConfiguration.decode(reader, reader.uint32()); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): UpdateApiConfigurationRequest { + return { + metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, + apiConfiguration: isSet(object.apiConfiguration) + ? ModelsApiConfiguration.fromJSON(object.apiConfiguration) + : undefined, + }; + }, + + toJSON(message: UpdateApiConfigurationRequest): unknown { + const obj: any = {}; + if (message.metadata !== undefined) { + obj.metadata = Metadata.toJSON(message.metadata); + } + if (message.apiConfiguration !== undefined) { + obj.apiConfiguration = ModelsApiConfiguration.toJSON(message.apiConfiguration); + } + return obj; + }, + + create, I>>(base?: I): UpdateApiConfigurationRequest { + return UpdateApiConfigurationRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): UpdateApiConfigurationRequest { + const message = createBaseUpdateApiConfigurationRequest(); + message.metadata = (object.metadata !== undefined && object.metadata !== null) + ? Metadata.fromPartial(object.metadata) + : undefined; + message.apiConfiguration = (object.apiConfiguration !== undefined && object.apiConfiguration !== null) + ? ModelsApiConfiguration.fromPartial(object.apiConfiguration) + : undefined; + return message; + }, +}; + +function createBaseOpenAiCompatibleModelInfo(): OpenAiCompatibleModelInfo { + return { + maxTokens: undefined, + contextWindow: undefined, + supportsImages: undefined, + supportsPromptCache: false, + inputPrice: undefined, + outputPrice: undefined, + thinkingConfig: undefined, + supportsGlobalEndpoint: undefined, + cacheWritesPrice: undefined, + cacheReadsPrice: undefined, + description: undefined, + tiers: [], + temperature: undefined, + isR1FormatRequired: undefined, + }; +} + +export const OpenAiCompatibleModelInfo: MessageFns = { + encode(message: OpenAiCompatibleModelInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.maxTokens !== undefined) { + writer.uint32(8).int32(message.maxTokens); + } + if (message.contextWindow !== undefined) { + writer.uint32(16).int32(message.contextWindow); + } + if (message.supportsImages !== undefined) { + writer.uint32(24).bool(message.supportsImages); + } + if (message.supportsPromptCache !== false) { + writer.uint32(32).bool(message.supportsPromptCache); + } + if (message.inputPrice !== undefined) { + writer.uint32(41).double(message.inputPrice); + } + if (message.outputPrice !== undefined) { + writer.uint32(49).double(message.outputPrice); + } + if (message.thinkingConfig !== undefined) { + ThinkingConfig.encode(message.thinkingConfig, writer.uint32(58).fork()).join(); + } + if (message.supportsGlobalEndpoint !== undefined) { + writer.uint32(64).bool(message.supportsGlobalEndpoint); + } + if (message.cacheWritesPrice !== undefined) { + writer.uint32(73).double(message.cacheWritesPrice); + } + if (message.cacheReadsPrice !== undefined) { + writer.uint32(81).double(message.cacheReadsPrice); + } + if (message.description !== undefined) { + writer.uint32(90).string(message.description); + } + for (const v of message.tiers) { + ModelTier.encode(v!, writer.uint32(98).fork()).join(); + } + if (message.temperature !== undefined) { + writer.uint32(105).double(message.temperature); + } + if (message.isR1FormatRequired !== undefined) { + writer.uint32(112).bool(message.isR1FormatRequired); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): OpenAiCompatibleModelInfo { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseOpenAiCompatibleModelInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 8) { + break; + } + + message.maxTokens = reader.int32(); + continue; + } + case 2: { + if (tag !== 16) { + break; + } + + message.contextWindow = reader.int32(); + continue; + } + case 3: { + if (tag !== 24) { + break; + } + + message.supportsImages = reader.bool(); + continue; + } + case 4: { + if (tag !== 32) { + break; + } + + message.supportsPromptCache = reader.bool(); + continue; + } + case 5: { + if (tag !== 41) { + break; + } + + message.inputPrice = reader.double(); + continue; + } + case 6: { + if (tag !== 49) { + break; + } + + message.outputPrice = reader.double(); + continue; + } + case 7: { + if (tag !== 58) { + break; + } + + message.thinkingConfig = ThinkingConfig.decode(reader, reader.uint32()); + continue; + } + case 8: { + if (tag !== 64) { + break; + } + + message.supportsGlobalEndpoint = reader.bool(); + continue; + } + case 9: { + if (tag !== 73) { + break; + } + + message.cacheWritesPrice = reader.double(); + continue; + } + case 10: { + if (tag !== 81) { + break; + } + + message.cacheReadsPrice = reader.double(); + continue; + } + case 11: { + if (tag !== 90) { + break; + } + + message.description = reader.string(); + continue; + } + case 12: { + if (tag !== 98) { + break; + } + + message.tiers.push(ModelTier.decode(reader, reader.uint32())); + continue; + } + case 13: { + if (tag !== 105) { + break; + } + + message.temperature = reader.double(); + continue; + } + case 14: { + if (tag !== 112) { + break; + } + + message.isR1FormatRequired = reader.bool(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): OpenAiCompatibleModelInfo { + return { + maxTokens: isSet(object.maxTokens) ? globalThis.Number(object.maxTokens) : undefined, + contextWindow: isSet(object.contextWindow) ? globalThis.Number(object.contextWindow) : undefined, + supportsImages: isSet(object.supportsImages) ? globalThis.Boolean(object.supportsImages) : undefined, + supportsPromptCache: isSet(object.supportsPromptCache) ? globalThis.Boolean(object.supportsPromptCache) : false, + inputPrice: isSet(object.inputPrice) ? globalThis.Number(object.inputPrice) : undefined, + outputPrice: isSet(object.outputPrice) ? globalThis.Number(object.outputPrice) : undefined, + thinkingConfig: isSet(object.thinkingConfig) ? ThinkingConfig.fromJSON(object.thinkingConfig) : undefined, + supportsGlobalEndpoint: isSet(object.supportsGlobalEndpoint) + ? globalThis.Boolean(object.supportsGlobalEndpoint) + : undefined, + cacheWritesPrice: isSet(object.cacheWritesPrice) ? globalThis.Number(object.cacheWritesPrice) : undefined, + cacheReadsPrice: isSet(object.cacheReadsPrice) ? globalThis.Number(object.cacheReadsPrice) : undefined, + description: isSet(object.description) ? globalThis.String(object.description) : undefined, + tiers: globalThis.Array.isArray(object?.tiers) ? object.tiers.map((e: any) => ModelTier.fromJSON(e)) : [], + temperature: isSet(object.temperature) ? globalThis.Number(object.temperature) : undefined, + isR1FormatRequired: isSet(object.isR1FormatRequired) ? globalThis.Boolean(object.isR1FormatRequired) : undefined, + }; + }, + + toJSON(message: OpenAiCompatibleModelInfo): unknown { + const obj: any = {}; + if (message.maxTokens !== undefined) { + obj.maxTokens = Math.round(message.maxTokens); + } + if (message.contextWindow !== undefined) { + obj.contextWindow = Math.round(message.contextWindow); + } + if (message.supportsImages !== undefined) { + obj.supportsImages = message.supportsImages; + } + if (message.supportsPromptCache !== false) { + obj.supportsPromptCache = message.supportsPromptCache; + } + if (message.inputPrice !== undefined) { + obj.inputPrice = message.inputPrice; + } + if (message.outputPrice !== undefined) { + obj.outputPrice = message.outputPrice; + } + if (message.thinkingConfig !== undefined) { + obj.thinkingConfig = ThinkingConfig.toJSON(message.thinkingConfig); + } + if (message.supportsGlobalEndpoint !== undefined) { + obj.supportsGlobalEndpoint = message.supportsGlobalEndpoint; + } + if (message.cacheWritesPrice !== undefined) { + obj.cacheWritesPrice = message.cacheWritesPrice; + } + if (message.cacheReadsPrice !== undefined) { + obj.cacheReadsPrice = message.cacheReadsPrice; + } + if (message.description !== undefined) { + obj.description = message.description; + } + if (message.tiers?.length) { + obj.tiers = message.tiers.map((e) => ModelTier.toJSON(e)); + } + if (message.temperature !== undefined) { + obj.temperature = message.temperature; + } + if (message.isR1FormatRequired !== undefined) { + obj.isR1FormatRequired = message.isR1FormatRequired; + } + return obj; + }, + + create, I>>(base?: I): OpenAiCompatibleModelInfo { + return OpenAiCompatibleModelInfo.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): OpenAiCompatibleModelInfo { + const message = createBaseOpenAiCompatibleModelInfo(); + message.maxTokens = object.maxTokens ?? undefined; + message.contextWindow = object.contextWindow ?? undefined; + message.supportsImages = object.supportsImages ?? undefined; + message.supportsPromptCache = object.supportsPromptCache ?? false; + message.inputPrice = object.inputPrice ?? undefined; + message.outputPrice = object.outputPrice ?? undefined; + message.thinkingConfig = (object.thinkingConfig !== undefined && object.thinkingConfig !== null) + ? ThinkingConfig.fromPartial(object.thinkingConfig) + : undefined; + message.supportsGlobalEndpoint = object.supportsGlobalEndpoint ?? undefined; + message.cacheWritesPrice = object.cacheWritesPrice ?? undefined; + message.cacheReadsPrice = object.cacheReadsPrice ?? undefined; + message.description = object.description ?? undefined; + message.tiers = object.tiers?.map((e) => ModelTier.fromPartial(e)) || []; + message.temperature = object.temperature ?? undefined; + message.isR1FormatRequired = object.isR1FormatRequired ?? undefined; + return message; + }, +}; + +function createBaseLiteLLMModelInfo(): LiteLLMModelInfo { + return { + maxTokens: undefined, + contextWindow: undefined, + supportsImages: undefined, + supportsPromptCache: false, + inputPrice: undefined, + outputPrice: undefined, + thinkingConfig: undefined, + supportsGlobalEndpoint: undefined, + cacheWritesPrice: undefined, + cacheReadsPrice: undefined, + description: undefined, + tiers: [], + temperature: undefined, + }; +} + +export const LiteLLMModelInfo: MessageFns = { + encode(message: LiteLLMModelInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.maxTokens !== undefined) { + writer.uint32(8).int32(message.maxTokens); + } + if (message.contextWindow !== undefined) { + writer.uint32(16).int32(message.contextWindow); + } + if (message.supportsImages !== undefined) { + writer.uint32(24).bool(message.supportsImages); + } + if (message.supportsPromptCache !== false) { + writer.uint32(32).bool(message.supportsPromptCache); + } + if (message.inputPrice !== undefined) { + writer.uint32(41).double(message.inputPrice); + } + if (message.outputPrice !== undefined) { + writer.uint32(49).double(message.outputPrice); + } + if (message.thinkingConfig !== undefined) { + ThinkingConfig.encode(message.thinkingConfig, writer.uint32(58).fork()).join(); + } + if (message.supportsGlobalEndpoint !== undefined) { + writer.uint32(64).bool(message.supportsGlobalEndpoint); + } + if (message.cacheWritesPrice !== undefined) { + writer.uint32(73).double(message.cacheWritesPrice); + } + if (message.cacheReadsPrice !== undefined) { + writer.uint32(81).double(message.cacheReadsPrice); + } + if (message.description !== undefined) { + writer.uint32(90).string(message.description); + } + for (const v of message.tiers) { + ModelTier.encode(v!, writer.uint32(98).fork()).join(); + } + if (message.temperature !== undefined) { + writer.uint32(105).double(message.temperature); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): LiteLLMModelInfo { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseLiteLLMModelInfo(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 8) { + break; + } + + message.maxTokens = reader.int32(); + continue; + } + case 2: { + if (tag !== 16) { + break; + } + + message.contextWindow = reader.int32(); + continue; + } + case 3: { + if (tag !== 24) { + break; + } + + message.supportsImages = reader.bool(); + continue; + } + case 4: { + if (tag !== 32) { + break; + } + + message.supportsPromptCache = reader.bool(); + continue; + } + case 5: { + if (tag !== 41) { + break; + } + + message.inputPrice = reader.double(); + continue; + } + case 6: { + if (tag !== 49) { + break; + } + + message.outputPrice = reader.double(); + continue; + } + case 7: { + if (tag !== 58) { + break; + } + + message.thinkingConfig = ThinkingConfig.decode(reader, reader.uint32()); + continue; + } + case 8: { + if (tag !== 64) { + break; + } + + message.supportsGlobalEndpoint = reader.bool(); + continue; + } + case 9: { + if (tag !== 73) { + break; + } + + message.cacheWritesPrice = reader.double(); + continue; + } + case 10: { + if (tag !== 81) { + break; + } + + message.cacheReadsPrice = reader.double(); + continue; + } + case 11: { + if (tag !== 90) { + break; + } + + message.description = reader.string(); + continue; + } + case 12: { + if (tag !== 98) { + break; + } + + message.tiers.push(ModelTier.decode(reader, reader.uint32())); + continue; + } + case 13: { + if (tag !== 105) { + break; + } + + message.temperature = reader.double(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): LiteLLMModelInfo { + return { + maxTokens: isSet(object.maxTokens) ? globalThis.Number(object.maxTokens) : undefined, + contextWindow: isSet(object.contextWindow) ? globalThis.Number(object.contextWindow) : undefined, + supportsImages: isSet(object.supportsImages) ? globalThis.Boolean(object.supportsImages) : undefined, + supportsPromptCache: isSet(object.supportsPromptCache) ? globalThis.Boolean(object.supportsPromptCache) : false, + inputPrice: isSet(object.inputPrice) ? globalThis.Number(object.inputPrice) : undefined, + outputPrice: isSet(object.outputPrice) ? globalThis.Number(object.outputPrice) : undefined, + thinkingConfig: isSet(object.thinkingConfig) ? ThinkingConfig.fromJSON(object.thinkingConfig) : undefined, + supportsGlobalEndpoint: isSet(object.supportsGlobalEndpoint) + ? globalThis.Boolean(object.supportsGlobalEndpoint) + : undefined, + cacheWritesPrice: isSet(object.cacheWritesPrice) ? globalThis.Number(object.cacheWritesPrice) : undefined, + cacheReadsPrice: isSet(object.cacheReadsPrice) ? globalThis.Number(object.cacheReadsPrice) : undefined, + description: isSet(object.description) ? globalThis.String(object.description) : undefined, + tiers: globalThis.Array.isArray(object?.tiers) ? object.tiers.map((e: any) => ModelTier.fromJSON(e)) : [], + temperature: isSet(object.temperature) ? globalThis.Number(object.temperature) : undefined, + }; + }, + + toJSON(message: LiteLLMModelInfo): unknown { + const obj: any = {}; + if (message.maxTokens !== undefined) { + obj.maxTokens = Math.round(message.maxTokens); + } + if (message.contextWindow !== undefined) { + obj.contextWindow = Math.round(message.contextWindow); + } + if (message.supportsImages !== undefined) { + obj.supportsImages = message.supportsImages; + } + if (message.supportsPromptCache !== false) { + obj.supportsPromptCache = message.supportsPromptCache; + } + if (message.inputPrice !== undefined) { + obj.inputPrice = message.inputPrice; + } + if (message.outputPrice !== undefined) { + obj.outputPrice = message.outputPrice; + } + if (message.thinkingConfig !== undefined) { + obj.thinkingConfig = ThinkingConfig.toJSON(message.thinkingConfig); + } + if (message.supportsGlobalEndpoint !== undefined) { + obj.supportsGlobalEndpoint = message.supportsGlobalEndpoint; + } + if (message.cacheWritesPrice !== undefined) { + obj.cacheWritesPrice = message.cacheWritesPrice; + } + if (message.cacheReadsPrice !== undefined) { + obj.cacheReadsPrice = message.cacheReadsPrice; + } + if (message.description !== undefined) { + obj.description = message.description; + } + if (message.tiers?.length) { + obj.tiers = message.tiers.map((e) => ModelTier.toJSON(e)); + } + if (message.temperature !== undefined) { + obj.temperature = message.temperature; + } + return obj; + }, + + create, I>>(base?: I): LiteLLMModelInfo { + return LiteLLMModelInfo.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): LiteLLMModelInfo { + const message = createBaseLiteLLMModelInfo(); + message.maxTokens = object.maxTokens ?? undefined; + message.contextWindow = object.contextWindow ?? undefined; + message.supportsImages = object.supportsImages ?? undefined; + message.supportsPromptCache = object.supportsPromptCache ?? false; + message.inputPrice = object.inputPrice ?? undefined; + message.outputPrice = object.outputPrice ?? undefined; + message.thinkingConfig = (object.thinkingConfig !== undefined && object.thinkingConfig !== null) + ? ThinkingConfig.fromPartial(object.thinkingConfig) + : undefined; + message.supportsGlobalEndpoint = object.supportsGlobalEndpoint ?? undefined; + message.cacheWritesPrice = object.cacheWritesPrice ?? undefined; + message.cacheReadsPrice = object.cacheReadsPrice ?? undefined; + message.description = object.description ?? undefined; + message.tiers = object.tiers?.map((e) => ModelTier.fromPartial(e)) || []; + message.temperature = object.temperature ?? undefined; + return message; + }, +}; + +function createBaseModelsApiConfiguration(): ModelsApiConfiguration { + return { + apiModelId: undefined, + apiKey: undefined, + clineApiKey: undefined, + taskId: undefined, + liteLlmBaseUrl: undefined, + liteLlmModelId: undefined, + liteLlmApiKey: undefined, + liteLlmUsePromptCache: undefined, + openAiHeaders: {}, + liteLlmModelInfo: undefined, + anthropicBaseUrl: undefined, + openRouterApiKey: undefined, + openRouterModelId: undefined, + openRouterModelInfo: undefined, + openRouterProviderSorting: undefined, + awsAccessKey: undefined, + awsSecretKey: undefined, + awsSessionToken: undefined, + awsRegion: undefined, + awsUseCrossRegionInference: undefined, + awsBedrockUsePromptCache: undefined, + awsUseProfile: undefined, + awsProfile: undefined, + awsBedrockEndpoint: undefined, + awsBedrockCustomSelected: undefined, + awsBedrockCustomModelBaseId: undefined, + vertexProjectId: undefined, + vertexRegion: undefined, + openAiBaseUrl: undefined, + openAiApiKey: undefined, + openAiModelId: undefined, + openAiModelInfo: undefined, + ollamaModelId: undefined, + ollamaBaseUrl: undefined, + ollamaApiOptionsCtxNum: undefined, + lmStudioModelId: undefined, + lmStudioBaseUrl: undefined, + geminiApiKey: undefined, + geminiBaseUrl: undefined, + openAiNativeApiKey: undefined, + deepSeekApiKey: undefined, + requestyApiKey: undefined, + requestyModelId: undefined, + requestyModelInfo: undefined, + togetherApiKey: undefined, + togetherModelId: undefined, + fireworksApiKey: undefined, + fireworksModelId: undefined, + fireworksModelMaxCompletionTokens: undefined, + fireworksModelMaxTokens: undefined, + qwenApiKey: undefined, + doubaoApiKey: undefined, + mistralApiKey: undefined, + azureApiVersion: undefined, + vsCodeLmModelSelector: undefined, + qwenApiLine: undefined, + nebiusApiKey: undefined, + asksageApiUrl: undefined, + asksageApiKey: undefined, + xaiApiKey: undefined, + thinkingBudgetTokens: undefined, + reasoningEffort: undefined, + sambanovaApiKey: undefined, + cerebrasApiKey: undefined, + requestTimeoutMs: undefined, + apiProvider: undefined, + favoritedModelIds: [], + sapAiCoreClientId: undefined, + sapAiCoreClientSecret: undefined, + sapAiResourceGroup: undefined, + sapAiCoreTokenUrl: undefined, + sapAiCoreBaseUrl: undefined, + claudeCodePath: undefined, + }; +} + +export const ModelsApiConfiguration: MessageFns = { + encode(message: ModelsApiConfiguration, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.apiModelId !== undefined) { + writer.uint32(10).string(message.apiModelId); + } + if (message.apiKey !== undefined) { + writer.uint32(18).string(message.apiKey); + } + if (message.clineApiKey !== undefined) { + writer.uint32(26).string(message.clineApiKey); + } + if (message.taskId !== undefined) { + writer.uint32(34).string(message.taskId); + } + if (message.liteLlmBaseUrl !== undefined) { + writer.uint32(42).string(message.liteLlmBaseUrl); + } + if (message.liteLlmModelId !== undefined) { + writer.uint32(50).string(message.liteLlmModelId); + } + if (message.liteLlmApiKey !== undefined) { + writer.uint32(58).string(message.liteLlmApiKey); + } + if (message.liteLlmUsePromptCache !== undefined) { + writer.uint32(64).bool(message.liteLlmUsePromptCache); + } + Object.entries(message.openAiHeaders).forEach(([key, value]) => { + ModelsApiConfiguration_OpenAiHeadersEntry.encode({ key: key as any, value }, writer.uint32(74).fork()).join(); + }); + if (message.liteLlmModelInfo !== undefined) { + LiteLLMModelInfo.encode(message.liteLlmModelInfo, writer.uint32(82).fork()).join(); + } + if (message.anthropicBaseUrl !== undefined) { + writer.uint32(90).string(message.anthropicBaseUrl); + } + if (message.openRouterApiKey !== undefined) { + writer.uint32(98).string(message.openRouterApiKey); + } + if (message.openRouterModelId !== undefined) { + writer.uint32(106).string(message.openRouterModelId); + } + if (message.openRouterModelInfo !== undefined) { + OpenRouterModelInfo.encode(message.openRouterModelInfo, writer.uint32(114).fork()).join(); + } + if (message.openRouterProviderSorting !== undefined) { + writer.uint32(122).string(message.openRouterProviderSorting); + } + if (message.awsAccessKey !== undefined) { + writer.uint32(130).string(message.awsAccessKey); + } + if (message.awsSecretKey !== undefined) { + writer.uint32(138).string(message.awsSecretKey); + } + if (message.awsSessionToken !== undefined) { + writer.uint32(146).string(message.awsSessionToken); + } + if (message.awsRegion !== undefined) { + writer.uint32(154).string(message.awsRegion); + } + if (message.awsUseCrossRegionInference !== undefined) { + writer.uint32(160).bool(message.awsUseCrossRegionInference); + } + if (message.awsBedrockUsePromptCache !== undefined) { + writer.uint32(168).bool(message.awsBedrockUsePromptCache); + } + if (message.awsUseProfile !== undefined) { + writer.uint32(176).bool(message.awsUseProfile); + } + if (message.awsProfile !== undefined) { + writer.uint32(186).string(message.awsProfile); + } + if (message.awsBedrockEndpoint !== undefined) { + writer.uint32(194).string(message.awsBedrockEndpoint); + } + if (message.awsBedrockCustomSelected !== undefined) { + writer.uint32(200).bool(message.awsBedrockCustomSelected); + } + if (message.awsBedrockCustomModelBaseId !== undefined) { + writer.uint32(210).string(message.awsBedrockCustomModelBaseId); + } + if (message.vertexProjectId !== undefined) { + writer.uint32(218).string(message.vertexProjectId); + } + if (message.vertexRegion !== undefined) { + writer.uint32(226).string(message.vertexRegion); + } + if (message.openAiBaseUrl !== undefined) { + writer.uint32(234).string(message.openAiBaseUrl); + } + if (message.openAiApiKey !== undefined) { + writer.uint32(242).string(message.openAiApiKey); + } + if (message.openAiModelId !== undefined) { + writer.uint32(250).string(message.openAiModelId); + } + if (message.openAiModelInfo !== undefined) { + OpenAiCompatibleModelInfo.encode(message.openAiModelInfo, writer.uint32(258).fork()).join(); + } + if (message.ollamaModelId !== undefined) { + writer.uint32(266).string(message.ollamaModelId); + } + if (message.ollamaBaseUrl !== undefined) { + writer.uint32(274).string(message.ollamaBaseUrl); + } + if (message.ollamaApiOptionsCtxNum !== undefined) { + writer.uint32(282).string(message.ollamaApiOptionsCtxNum); + } + if (message.lmStudioModelId !== undefined) { + writer.uint32(290).string(message.lmStudioModelId); + } + if (message.lmStudioBaseUrl !== undefined) { + writer.uint32(298).string(message.lmStudioBaseUrl); + } + if (message.geminiApiKey !== undefined) { + writer.uint32(306).string(message.geminiApiKey); + } + if (message.geminiBaseUrl !== undefined) { + writer.uint32(314).string(message.geminiBaseUrl); + } + if (message.openAiNativeApiKey !== undefined) { + writer.uint32(322).string(message.openAiNativeApiKey); + } + if (message.deepSeekApiKey !== undefined) { + writer.uint32(330).string(message.deepSeekApiKey); + } + if (message.requestyApiKey !== undefined) { + writer.uint32(338).string(message.requestyApiKey); + } + if (message.requestyModelId !== undefined) { + writer.uint32(346).string(message.requestyModelId); + } + if (message.requestyModelInfo !== undefined) { + OpenRouterModelInfo.encode(message.requestyModelInfo, writer.uint32(354).fork()).join(); + } + if (message.togetherApiKey !== undefined) { + writer.uint32(362).string(message.togetherApiKey); + } + if (message.togetherModelId !== undefined) { + writer.uint32(370).string(message.togetherModelId); + } + if (message.fireworksApiKey !== undefined) { + writer.uint32(378).string(message.fireworksApiKey); + } + if (message.fireworksModelId !== undefined) { + writer.uint32(386).string(message.fireworksModelId); + } + if (message.fireworksModelMaxCompletionTokens !== undefined) { + writer.uint32(392).int32(message.fireworksModelMaxCompletionTokens); + } + if (message.fireworksModelMaxTokens !== undefined) { + writer.uint32(400).int32(message.fireworksModelMaxTokens); + } + if (message.qwenApiKey !== undefined) { + writer.uint32(410).string(message.qwenApiKey); + } + if (message.doubaoApiKey !== undefined) { + writer.uint32(418).string(message.doubaoApiKey); + } + if (message.mistralApiKey !== undefined) { + writer.uint32(426).string(message.mistralApiKey); + } + if (message.azureApiVersion !== undefined) { + writer.uint32(434).string(message.azureApiVersion); + } + if (message.vsCodeLmModelSelector !== undefined) { + LanguageModelChatSelector.encode(message.vsCodeLmModelSelector, writer.uint32(442).fork()).join(); + } + if (message.qwenApiLine !== undefined) { + writer.uint32(450).string(message.qwenApiLine); + } + if (message.nebiusApiKey !== undefined) { + writer.uint32(458).string(message.nebiusApiKey); + } + if (message.asksageApiUrl !== undefined) { + writer.uint32(466).string(message.asksageApiUrl); + } + if (message.asksageApiKey !== undefined) { + writer.uint32(474).string(message.asksageApiKey); + } + if (message.xaiApiKey !== undefined) { + writer.uint32(482).string(message.xaiApiKey); + } + if (message.thinkingBudgetTokens !== undefined) { + writer.uint32(488).int32(message.thinkingBudgetTokens); + } + if (message.reasoningEffort !== undefined) { + writer.uint32(498).string(message.reasoningEffort); + } + if (message.sambanovaApiKey !== undefined) { + writer.uint32(506).string(message.sambanovaApiKey); + } + if (message.cerebrasApiKey !== undefined) { + writer.uint32(514).string(message.cerebrasApiKey); + } + if (message.requestTimeoutMs !== undefined) { + writer.uint32(520).int32(message.requestTimeoutMs); + } + if (message.apiProvider !== undefined) { + writer.uint32(528).int32(message.apiProvider); + } + for (const v of message.favoritedModelIds) { + writer.uint32(538).string(v!); + } + if (message.sapAiCoreClientId !== undefined) { + writer.uint32(546).string(message.sapAiCoreClientId); + } + if (message.sapAiCoreClientSecret !== undefined) { + writer.uint32(554).string(message.sapAiCoreClientSecret); + } + if (message.sapAiResourceGroup !== undefined) { + writer.uint32(562).string(message.sapAiResourceGroup); + } + if (message.sapAiCoreTokenUrl !== undefined) { + writer.uint32(570).string(message.sapAiCoreTokenUrl); + } + if (message.sapAiCoreBaseUrl !== undefined) { + writer.uint32(578).string(message.sapAiCoreBaseUrl); + } + if (message.claudeCodePath !== undefined) { + writer.uint32(586).string(message.claudeCodePath); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ModelsApiConfiguration { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModelsApiConfiguration(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.apiModelId = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.apiKey = reader.string(); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.clineApiKey = reader.string(); + continue; + } + case 4: { + if (tag !== 34) { + break; + } + + message.taskId = reader.string(); + continue; + } + case 5: { + if (tag !== 42) { + break; + } + + message.liteLlmBaseUrl = reader.string(); + continue; + } + case 6: { + if (tag !== 50) { + break; + } + + message.liteLlmModelId = reader.string(); + continue; + } + case 7: { + if (tag !== 58) { + break; + } + + message.liteLlmApiKey = reader.string(); + continue; + } + case 8: { + if (tag !== 64) { + break; + } + + message.liteLlmUsePromptCache = reader.bool(); + continue; + } + case 9: { + if (tag !== 74) { + break; + } + + const entry9 = ModelsApiConfiguration_OpenAiHeadersEntry.decode(reader, reader.uint32()); + if (entry9.value !== undefined) { + message.openAiHeaders[entry9.key] = entry9.value; + } + continue; + } + case 10: { + if (tag !== 82) { + break; + } + + message.liteLlmModelInfo = LiteLLMModelInfo.decode(reader, reader.uint32()); + continue; + } + case 11: { + if (tag !== 90) { + break; + } + + message.anthropicBaseUrl = reader.string(); + continue; + } + case 12: { + if (tag !== 98) { + break; + } + + message.openRouterApiKey = reader.string(); + continue; + } + case 13: { + if (tag !== 106) { + break; + } + + message.openRouterModelId = reader.string(); + continue; + } + case 14: { + if (tag !== 114) { + break; + } + + message.openRouterModelInfo = OpenRouterModelInfo.decode(reader, reader.uint32()); + continue; + } + case 15: { + if (tag !== 122) { + break; + } + + message.openRouterProviderSorting = reader.string(); + continue; + } + case 16: { + if (tag !== 130) { + break; + } + + message.awsAccessKey = reader.string(); + continue; + } + case 17: { + if (tag !== 138) { + break; + } + + message.awsSecretKey = reader.string(); + continue; + } + case 18: { + if (tag !== 146) { + break; + } + + message.awsSessionToken = reader.string(); + continue; + } + case 19: { + if (tag !== 154) { + break; + } + + message.awsRegion = reader.string(); + continue; + } + case 20: { + if (tag !== 160) { + break; + } + + message.awsUseCrossRegionInference = reader.bool(); + continue; + } + case 21: { + if (tag !== 168) { + break; + } + + message.awsBedrockUsePromptCache = reader.bool(); + continue; + } + case 22: { + if (tag !== 176) { + break; + } + + message.awsUseProfile = reader.bool(); + continue; + } + case 23: { + if (tag !== 186) { + break; + } + + message.awsProfile = reader.string(); + continue; + } + case 24: { + if (tag !== 194) { + break; + } + + message.awsBedrockEndpoint = reader.string(); + continue; + } + case 25: { + if (tag !== 200) { + break; + } + + message.awsBedrockCustomSelected = reader.bool(); + continue; + } + case 26: { + if (tag !== 210) { + break; + } + + message.awsBedrockCustomModelBaseId = reader.string(); + continue; + } + case 27: { + if (tag !== 218) { + break; + } + + message.vertexProjectId = reader.string(); + continue; + } + case 28: { + if (tag !== 226) { + break; + } + + message.vertexRegion = reader.string(); + continue; + } + case 29: { + if (tag !== 234) { + break; + } + + message.openAiBaseUrl = reader.string(); + continue; + } + case 30: { + if (tag !== 242) { + break; + } + + message.openAiApiKey = reader.string(); + continue; + } + case 31: { + if (tag !== 250) { + break; + } + + message.openAiModelId = reader.string(); + continue; + } + case 32: { + if (tag !== 258) { + break; + } + + message.openAiModelInfo = OpenAiCompatibleModelInfo.decode(reader, reader.uint32()); + continue; + } + case 33: { + if (tag !== 266) { + break; + } + + message.ollamaModelId = reader.string(); + continue; + } + case 34: { + if (tag !== 274) { + break; + } + + message.ollamaBaseUrl = reader.string(); + continue; + } + case 35: { + if (tag !== 282) { + break; + } + + message.ollamaApiOptionsCtxNum = reader.string(); + continue; + } + case 36: { + if (tag !== 290) { + break; + } + + message.lmStudioModelId = reader.string(); + continue; + } + case 37: { + if (tag !== 298) { + break; + } + + message.lmStudioBaseUrl = reader.string(); + continue; + } + case 38: { + if (tag !== 306) { + break; + } + + message.geminiApiKey = reader.string(); + continue; + } + case 39: { + if (tag !== 314) { + break; + } + + message.geminiBaseUrl = reader.string(); + continue; + } + case 40: { + if (tag !== 322) { + break; + } + + message.openAiNativeApiKey = reader.string(); + continue; + } + case 41: { + if (tag !== 330) { + break; + } + + message.deepSeekApiKey = reader.string(); + continue; + } + case 42: { + if (tag !== 338) { + break; + } + + message.requestyApiKey = reader.string(); + continue; + } + case 43: { + if (tag !== 346) { + break; + } + + message.requestyModelId = reader.string(); + continue; + } + case 44: { + if (tag !== 354) { + break; + } + + message.requestyModelInfo = OpenRouterModelInfo.decode(reader, reader.uint32()); + continue; + } + case 45: { + if (tag !== 362) { + break; + } + + message.togetherApiKey = reader.string(); + continue; + } + case 46: { + if (tag !== 370) { + break; + } + + message.togetherModelId = reader.string(); + continue; + } + case 47: { + if (tag !== 378) { + break; + } + + message.fireworksApiKey = reader.string(); + continue; + } + case 48: { + if (tag !== 386) { + break; + } + + message.fireworksModelId = reader.string(); + continue; + } + case 49: { + if (tag !== 392) { + break; + } + + message.fireworksModelMaxCompletionTokens = reader.int32(); + continue; + } + case 50: { + if (tag !== 400) { + break; + } + + message.fireworksModelMaxTokens = reader.int32(); + continue; + } + case 51: { + if (tag !== 410) { + break; + } + + message.qwenApiKey = reader.string(); + continue; + } + case 52: { + if (tag !== 418) { + break; + } + + message.doubaoApiKey = reader.string(); + continue; + } + case 53: { + if (tag !== 426) { + break; + } + + message.mistralApiKey = reader.string(); + continue; + } + case 54: { + if (tag !== 434) { + break; + } + + message.azureApiVersion = reader.string(); + continue; + } + case 55: { + if (tag !== 442) { + break; + } + + message.vsCodeLmModelSelector = LanguageModelChatSelector.decode(reader, reader.uint32()); + continue; + } + case 56: { + if (tag !== 450) { + break; + } + + message.qwenApiLine = reader.string(); + continue; + } + case 57: { + if (tag !== 458) { + break; + } + + message.nebiusApiKey = reader.string(); + continue; + } + case 58: { + if (tag !== 466) { + break; + } + + message.asksageApiUrl = reader.string(); + continue; + } + case 59: { + if (tag !== 474) { + break; + } + + message.asksageApiKey = reader.string(); + continue; + } + case 60: { + if (tag !== 482) { + break; + } + + message.xaiApiKey = reader.string(); + continue; + } + case 61: { + if (tag !== 488) { + break; + } + + message.thinkingBudgetTokens = reader.int32(); + continue; + } + case 62: { + if (tag !== 498) { + break; + } + + message.reasoningEffort = reader.string(); + continue; + } + case 63: { + if (tag !== 506) { + break; + } + + message.sambanovaApiKey = reader.string(); + continue; + } + case 64: { + if (tag !== 514) { + break; + } + + message.cerebrasApiKey = reader.string(); + continue; + } + case 65: { + if (tag !== 520) { + break; + } + + message.requestTimeoutMs = reader.int32(); + continue; + } + case 66: { + if (tag !== 528) { + break; + } + + message.apiProvider = reader.int32() as any; + continue; + } + case 67: { + if (tag !== 538) { + break; + } + + message.favoritedModelIds.push(reader.string()); + continue; + } + case 68: { + if (tag !== 546) { + break; + } + + message.sapAiCoreClientId = reader.string(); + continue; + } + case 69: { + if (tag !== 554) { + break; + } + + message.sapAiCoreClientSecret = reader.string(); + continue; + } + case 70: { + if (tag !== 562) { + break; + } + + message.sapAiResourceGroup = reader.string(); + continue; + } + case 71: { + if (tag !== 570) { + break; + } + + message.sapAiCoreTokenUrl = reader.string(); + continue; + } + case 72: { + if (tag !== 578) { + break; + } + + message.sapAiCoreBaseUrl = reader.string(); + continue; + } + case 73: { + if (tag !== 586) { + break; + } + + message.claudeCodePath = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ModelsApiConfiguration { + return { + apiModelId: isSet(object.apiModelId) ? globalThis.String(object.apiModelId) : undefined, + apiKey: isSet(object.apiKey) ? globalThis.String(object.apiKey) : undefined, + clineApiKey: isSet(object.clineApiKey) ? globalThis.String(object.clineApiKey) : undefined, + taskId: isSet(object.taskId) ? globalThis.String(object.taskId) : undefined, + liteLlmBaseUrl: isSet(object.liteLlmBaseUrl) ? globalThis.String(object.liteLlmBaseUrl) : undefined, + liteLlmModelId: isSet(object.liteLlmModelId) ? globalThis.String(object.liteLlmModelId) : undefined, + liteLlmApiKey: isSet(object.liteLlmApiKey) ? globalThis.String(object.liteLlmApiKey) : undefined, + liteLlmUsePromptCache: isSet(object.liteLlmUsePromptCache) + ? globalThis.Boolean(object.liteLlmUsePromptCache) + : undefined, + openAiHeaders: isObject(object.openAiHeaders) + ? Object.entries(object.openAiHeaders).reduce<{ [key: string]: string }>((acc, [key, value]) => { + acc[key] = String(value); + return acc; + }, {}) + : {}, + liteLlmModelInfo: isSet(object.liteLlmModelInfo) ? LiteLLMModelInfo.fromJSON(object.liteLlmModelInfo) : undefined, + anthropicBaseUrl: isSet(object.anthropicBaseUrl) ? globalThis.String(object.anthropicBaseUrl) : undefined, + openRouterApiKey: isSet(object.openRouterApiKey) ? globalThis.String(object.openRouterApiKey) : undefined, + openRouterModelId: isSet(object.openRouterModelId) ? globalThis.String(object.openRouterModelId) : undefined, + openRouterModelInfo: isSet(object.openRouterModelInfo) + ? OpenRouterModelInfo.fromJSON(object.openRouterModelInfo) + : undefined, + openRouterProviderSorting: isSet(object.openRouterProviderSorting) + ? globalThis.String(object.openRouterProviderSorting) + : undefined, + awsAccessKey: isSet(object.awsAccessKey) ? globalThis.String(object.awsAccessKey) : undefined, + awsSecretKey: isSet(object.awsSecretKey) ? globalThis.String(object.awsSecretKey) : undefined, + awsSessionToken: isSet(object.awsSessionToken) ? globalThis.String(object.awsSessionToken) : undefined, + awsRegion: isSet(object.awsRegion) ? globalThis.String(object.awsRegion) : undefined, + awsUseCrossRegionInference: isSet(object.awsUseCrossRegionInference) + ? globalThis.Boolean(object.awsUseCrossRegionInference) + : undefined, + awsBedrockUsePromptCache: isSet(object.awsBedrockUsePromptCache) + ? globalThis.Boolean(object.awsBedrockUsePromptCache) + : undefined, + awsUseProfile: isSet(object.awsUseProfile) ? globalThis.Boolean(object.awsUseProfile) : undefined, + awsProfile: isSet(object.awsProfile) ? globalThis.String(object.awsProfile) : undefined, + awsBedrockEndpoint: isSet(object.awsBedrockEndpoint) ? globalThis.String(object.awsBedrockEndpoint) : undefined, + awsBedrockCustomSelected: isSet(object.awsBedrockCustomSelected) + ? globalThis.Boolean(object.awsBedrockCustomSelected) + : undefined, + awsBedrockCustomModelBaseId: isSet(object.awsBedrockCustomModelBaseId) + ? globalThis.String(object.awsBedrockCustomModelBaseId) + : undefined, + vertexProjectId: isSet(object.vertexProjectId) ? globalThis.String(object.vertexProjectId) : undefined, + vertexRegion: isSet(object.vertexRegion) ? globalThis.String(object.vertexRegion) : undefined, + openAiBaseUrl: isSet(object.openAiBaseUrl) ? globalThis.String(object.openAiBaseUrl) : undefined, + openAiApiKey: isSet(object.openAiApiKey) ? globalThis.String(object.openAiApiKey) : undefined, + openAiModelId: isSet(object.openAiModelId) ? globalThis.String(object.openAiModelId) : undefined, + openAiModelInfo: isSet(object.openAiModelInfo) + ? OpenAiCompatibleModelInfo.fromJSON(object.openAiModelInfo) + : undefined, + ollamaModelId: isSet(object.ollamaModelId) ? globalThis.String(object.ollamaModelId) : undefined, + ollamaBaseUrl: isSet(object.ollamaBaseUrl) ? globalThis.String(object.ollamaBaseUrl) : undefined, + ollamaApiOptionsCtxNum: isSet(object.ollamaApiOptionsCtxNum) + ? globalThis.String(object.ollamaApiOptionsCtxNum) + : undefined, + lmStudioModelId: isSet(object.lmStudioModelId) ? globalThis.String(object.lmStudioModelId) : undefined, + lmStudioBaseUrl: isSet(object.lmStudioBaseUrl) ? globalThis.String(object.lmStudioBaseUrl) : undefined, + geminiApiKey: isSet(object.geminiApiKey) ? globalThis.String(object.geminiApiKey) : undefined, + geminiBaseUrl: isSet(object.geminiBaseUrl) ? globalThis.String(object.geminiBaseUrl) : undefined, + openAiNativeApiKey: isSet(object.openAiNativeApiKey) ? globalThis.String(object.openAiNativeApiKey) : undefined, + deepSeekApiKey: isSet(object.deepSeekApiKey) ? globalThis.String(object.deepSeekApiKey) : undefined, + requestyApiKey: isSet(object.requestyApiKey) ? globalThis.String(object.requestyApiKey) : undefined, + requestyModelId: isSet(object.requestyModelId) ? globalThis.String(object.requestyModelId) : undefined, + requestyModelInfo: isSet(object.requestyModelInfo) + ? OpenRouterModelInfo.fromJSON(object.requestyModelInfo) + : undefined, + togetherApiKey: isSet(object.togetherApiKey) ? globalThis.String(object.togetherApiKey) : undefined, + togetherModelId: isSet(object.togetherModelId) ? globalThis.String(object.togetherModelId) : undefined, + fireworksApiKey: isSet(object.fireworksApiKey) ? globalThis.String(object.fireworksApiKey) : undefined, + fireworksModelId: isSet(object.fireworksModelId) ? globalThis.String(object.fireworksModelId) : undefined, + fireworksModelMaxCompletionTokens: isSet(object.fireworksModelMaxCompletionTokens) + ? globalThis.Number(object.fireworksModelMaxCompletionTokens) + : undefined, + fireworksModelMaxTokens: isSet(object.fireworksModelMaxTokens) + ? globalThis.Number(object.fireworksModelMaxTokens) + : undefined, + qwenApiKey: isSet(object.qwenApiKey) ? globalThis.String(object.qwenApiKey) : undefined, + doubaoApiKey: isSet(object.doubaoApiKey) ? globalThis.String(object.doubaoApiKey) : undefined, + mistralApiKey: isSet(object.mistralApiKey) ? globalThis.String(object.mistralApiKey) : undefined, + azureApiVersion: isSet(object.azureApiVersion) ? globalThis.String(object.azureApiVersion) : undefined, + vsCodeLmModelSelector: isSet(object.vsCodeLmModelSelector) + ? LanguageModelChatSelector.fromJSON(object.vsCodeLmModelSelector) + : undefined, + qwenApiLine: isSet(object.qwenApiLine) ? globalThis.String(object.qwenApiLine) : undefined, + nebiusApiKey: isSet(object.nebiusApiKey) ? globalThis.String(object.nebiusApiKey) : undefined, + asksageApiUrl: isSet(object.asksageApiUrl) ? globalThis.String(object.asksageApiUrl) : undefined, + asksageApiKey: isSet(object.asksageApiKey) ? globalThis.String(object.asksageApiKey) : undefined, + xaiApiKey: isSet(object.xaiApiKey) ? globalThis.String(object.xaiApiKey) : undefined, + thinkingBudgetTokens: isSet(object.thinkingBudgetTokens) + ? globalThis.Number(object.thinkingBudgetTokens) + : undefined, + reasoningEffort: isSet(object.reasoningEffort) ? globalThis.String(object.reasoningEffort) : undefined, + sambanovaApiKey: isSet(object.sambanovaApiKey) ? globalThis.String(object.sambanovaApiKey) : undefined, + cerebrasApiKey: isSet(object.cerebrasApiKey) ? globalThis.String(object.cerebrasApiKey) : undefined, + requestTimeoutMs: isSet(object.requestTimeoutMs) ? globalThis.Number(object.requestTimeoutMs) : undefined, + apiProvider: isSet(object.apiProvider) ? apiProviderFromJSON(object.apiProvider) : undefined, + favoritedModelIds: globalThis.Array.isArray(object?.favoritedModelIds) + ? object.favoritedModelIds.map((e: any) => globalThis.String(e)) + : [], + sapAiCoreClientId: isSet(object.sapAiCoreClientId) ? globalThis.String(object.sapAiCoreClientId) : undefined, + sapAiCoreClientSecret: isSet(object.sapAiCoreClientSecret) + ? globalThis.String(object.sapAiCoreClientSecret) + : undefined, + sapAiResourceGroup: isSet(object.sapAiResourceGroup) ? globalThis.String(object.sapAiResourceGroup) : undefined, + sapAiCoreTokenUrl: isSet(object.sapAiCoreTokenUrl) ? globalThis.String(object.sapAiCoreTokenUrl) : undefined, + sapAiCoreBaseUrl: isSet(object.sapAiCoreBaseUrl) ? globalThis.String(object.sapAiCoreBaseUrl) : undefined, + claudeCodePath: isSet(object.claudeCodePath) ? globalThis.String(object.claudeCodePath) : undefined, + }; + }, + + toJSON(message: ModelsApiConfiguration): unknown { + const obj: any = {}; + if (message.apiModelId !== undefined) { + obj.apiModelId = message.apiModelId; + } + if (message.apiKey !== undefined) { + obj.apiKey = message.apiKey; + } + if (message.clineApiKey !== undefined) { + obj.clineApiKey = message.clineApiKey; + } + if (message.taskId !== undefined) { + obj.taskId = message.taskId; + } + if (message.liteLlmBaseUrl !== undefined) { + obj.liteLlmBaseUrl = message.liteLlmBaseUrl; + } + if (message.liteLlmModelId !== undefined) { + obj.liteLlmModelId = message.liteLlmModelId; + } + if (message.liteLlmApiKey !== undefined) { + obj.liteLlmApiKey = message.liteLlmApiKey; + } + if (message.liteLlmUsePromptCache !== undefined) { + obj.liteLlmUsePromptCache = message.liteLlmUsePromptCache; + } + if (message.openAiHeaders) { + const entries = Object.entries(message.openAiHeaders); + if (entries.length > 0) { + obj.openAiHeaders = {}; + entries.forEach(([k, v]) => { + obj.openAiHeaders[k] = v; + }); + } + } + if (message.liteLlmModelInfo !== undefined) { + obj.liteLlmModelInfo = LiteLLMModelInfo.toJSON(message.liteLlmModelInfo); + } + if (message.anthropicBaseUrl !== undefined) { + obj.anthropicBaseUrl = message.anthropicBaseUrl; + } + if (message.openRouterApiKey !== undefined) { + obj.openRouterApiKey = message.openRouterApiKey; + } + if (message.openRouterModelId !== undefined) { + obj.openRouterModelId = message.openRouterModelId; + } + if (message.openRouterModelInfo !== undefined) { + obj.openRouterModelInfo = OpenRouterModelInfo.toJSON(message.openRouterModelInfo); + } + if (message.openRouterProviderSorting !== undefined) { + obj.openRouterProviderSorting = message.openRouterProviderSorting; + } + if (message.awsAccessKey !== undefined) { + obj.awsAccessKey = message.awsAccessKey; + } + if (message.awsSecretKey !== undefined) { + obj.awsSecretKey = message.awsSecretKey; + } + if (message.awsSessionToken !== undefined) { + obj.awsSessionToken = message.awsSessionToken; + } + if (message.awsRegion !== undefined) { + obj.awsRegion = message.awsRegion; + } + if (message.awsUseCrossRegionInference !== undefined) { + obj.awsUseCrossRegionInference = message.awsUseCrossRegionInference; + } + if (message.awsBedrockUsePromptCache !== undefined) { + obj.awsBedrockUsePromptCache = message.awsBedrockUsePromptCache; + } + if (message.awsUseProfile !== undefined) { + obj.awsUseProfile = message.awsUseProfile; + } + if (message.awsProfile !== undefined) { + obj.awsProfile = message.awsProfile; + } + if (message.awsBedrockEndpoint !== undefined) { + obj.awsBedrockEndpoint = message.awsBedrockEndpoint; + } + if (message.awsBedrockCustomSelected !== undefined) { + obj.awsBedrockCustomSelected = message.awsBedrockCustomSelected; + } + if (message.awsBedrockCustomModelBaseId !== undefined) { + obj.awsBedrockCustomModelBaseId = message.awsBedrockCustomModelBaseId; + } + if (message.vertexProjectId !== undefined) { + obj.vertexProjectId = message.vertexProjectId; + } + if (message.vertexRegion !== undefined) { + obj.vertexRegion = message.vertexRegion; + } + if (message.openAiBaseUrl !== undefined) { + obj.openAiBaseUrl = message.openAiBaseUrl; + } + if (message.openAiApiKey !== undefined) { + obj.openAiApiKey = message.openAiApiKey; + } + if (message.openAiModelId !== undefined) { + obj.openAiModelId = message.openAiModelId; + } + if (message.openAiModelInfo !== undefined) { + obj.openAiModelInfo = OpenAiCompatibleModelInfo.toJSON(message.openAiModelInfo); + } + if (message.ollamaModelId !== undefined) { + obj.ollamaModelId = message.ollamaModelId; + } + if (message.ollamaBaseUrl !== undefined) { + obj.ollamaBaseUrl = message.ollamaBaseUrl; + } + if (message.ollamaApiOptionsCtxNum !== undefined) { + obj.ollamaApiOptionsCtxNum = message.ollamaApiOptionsCtxNum; + } + if (message.lmStudioModelId !== undefined) { + obj.lmStudioModelId = message.lmStudioModelId; + } + if (message.lmStudioBaseUrl !== undefined) { + obj.lmStudioBaseUrl = message.lmStudioBaseUrl; + } + if (message.geminiApiKey !== undefined) { + obj.geminiApiKey = message.geminiApiKey; + } + if (message.geminiBaseUrl !== undefined) { + obj.geminiBaseUrl = message.geminiBaseUrl; + } + if (message.openAiNativeApiKey !== undefined) { + obj.openAiNativeApiKey = message.openAiNativeApiKey; + } + if (message.deepSeekApiKey !== undefined) { + obj.deepSeekApiKey = message.deepSeekApiKey; + } + if (message.requestyApiKey !== undefined) { + obj.requestyApiKey = message.requestyApiKey; + } + if (message.requestyModelId !== undefined) { + obj.requestyModelId = message.requestyModelId; + } + if (message.requestyModelInfo !== undefined) { + obj.requestyModelInfo = OpenRouterModelInfo.toJSON(message.requestyModelInfo); + } + if (message.togetherApiKey !== undefined) { + obj.togetherApiKey = message.togetherApiKey; + } + if (message.togetherModelId !== undefined) { + obj.togetherModelId = message.togetherModelId; + } + if (message.fireworksApiKey !== undefined) { + obj.fireworksApiKey = message.fireworksApiKey; + } + if (message.fireworksModelId !== undefined) { + obj.fireworksModelId = message.fireworksModelId; + } + if (message.fireworksModelMaxCompletionTokens !== undefined) { + obj.fireworksModelMaxCompletionTokens = Math.round(message.fireworksModelMaxCompletionTokens); + } + if (message.fireworksModelMaxTokens !== undefined) { + obj.fireworksModelMaxTokens = Math.round(message.fireworksModelMaxTokens); + } + if (message.qwenApiKey !== undefined) { + obj.qwenApiKey = message.qwenApiKey; + } + if (message.doubaoApiKey !== undefined) { + obj.doubaoApiKey = message.doubaoApiKey; + } + if (message.mistralApiKey !== undefined) { + obj.mistralApiKey = message.mistralApiKey; + } + if (message.azureApiVersion !== undefined) { + obj.azureApiVersion = message.azureApiVersion; + } + if (message.vsCodeLmModelSelector !== undefined) { + obj.vsCodeLmModelSelector = LanguageModelChatSelector.toJSON(message.vsCodeLmModelSelector); + } + if (message.qwenApiLine !== undefined) { + obj.qwenApiLine = message.qwenApiLine; + } + if (message.nebiusApiKey !== undefined) { + obj.nebiusApiKey = message.nebiusApiKey; + } + if (message.asksageApiUrl !== undefined) { + obj.asksageApiUrl = message.asksageApiUrl; + } + if (message.asksageApiKey !== undefined) { + obj.asksageApiKey = message.asksageApiKey; + } + if (message.xaiApiKey !== undefined) { + obj.xaiApiKey = message.xaiApiKey; + } + if (message.thinkingBudgetTokens !== undefined) { + obj.thinkingBudgetTokens = Math.round(message.thinkingBudgetTokens); + } + if (message.reasoningEffort !== undefined) { + obj.reasoningEffort = message.reasoningEffort; + } + if (message.sambanovaApiKey !== undefined) { + obj.sambanovaApiKey = message.sambanovaApiKey; + } + if (message.cerebrasApiKey !== undefined) { + obj.cerebrasApiKey = message.cerebrasApiKey; + } + if (message.requestTimeoutMs !== undefined) { + obj.requestTimeoutMs = Math.round(message.requestTimeoutMs); + } + if (message.apiProvider !== undefined) { + obj.apiProvider = apiProviderToJSON(message.apiProvider); + } + if (message.favoritedModelIds?.length) { + obj.favoritedModelIds = message.favoritedModelIds; + } + if (message.sapAiCoreClientId !== undefined) { + obj.sapAiCoreClientId = message.sapAiCoreClientId; + } + if (message.sapAiCoreClientSecret !== undefined) { + obj.sapAiCoreClientSecret = message.sapAiCoreClientSecret; + } + if (message.sapAiResourceGroup !== undefined) { + obj.sapAiResourceGroup = message.sapAiResourceGroup; + } + if (message.sapAiCoreTokenUrl !== undefined) { + obj.sapAiCoreTokenUrl = message.sapAiCoreTokenUrl; + } + if (message.sapAiCoreBaseUrl !== undefined) { + obj.sapAiCoreBaseUrl = message.sapAiCoreBaseUrl; + } + if (message.claudeCodePath !== undefined) { + obj.claudeCodePath = message.claudeCodePath; + } + return obj; + }, + + create, I>>(base?: I): ModelsApiConfiguration { + return ModelsApiConfiguration.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ModelsApiConfiguration { + const message = createBaseModelsApiConfiguration(); + message.apiModelId = object.apiModelId ?? undefined; + message.apiKey = object.apiKey ?? undefined; + message.clineApiKey = object.clineApiKey ?? undefined; + message.taskId = object.taskId ?? undefined; + message.liteLlmBaseUrl = object.liteLlmBaseUrl ?? undefined; + message.liteLlmModelId = object.liteLlmModelId ?? undefined; + message.liteLlmApiKey = object.liteLlmApiKey ?? undefined; + message.liteLlmUsePromptCache = object.liteLlmUsePromptCache ?? undefined; + message.openAiHeaders = Object.entries(object.openAiHeaders ?? {}).reduce<{ [key: string]: string }>( + (acc, [key, value]) => { + if (value !== undefined) { + acc[key] = globalThis.String(value); + } + return acc; + }, + {}, + ); + message.liteLlmModelInfo = (object.liteLlmModelInfo !== undefined && object.liteLlmModelInfo !== null) + ? LiteLLMModelInfo.fromPartial(object.liteLlmModelInfo) + : undefined; + message.anthropicBaseUrl = object.anthropicBaseUrl ?? undefined; + message.openRouterApiKey = object.openRouterApiKey ?? undefined; + message.openRouterModelId = object.openRouterModelId ?? undefined; + message.openRouterModelInfo = (object.openRouterModelInfo !== undefined && object.openRouterModelInfo !== null) + ? OpenRouterModelInfo.fromPartial(object.openRouterModelInfo) + : undefined; + message.openRouterProviderSorting = object.openRouterProviderSorting ?? undefined; + message.awsAccessKey = object.awsAccessKey ?? undefined; + message.awsSecretKey = object.awsSecretKey ?? undefined; + message.awsSessionToken = object.awsSessionToken ?? undefined; + message.awsRegion = object.awsRegion ?? undefined; + message.awsUseCrossRegionInference = object.awsUseCrossRegionInference ?? undefined; + message.awsBedrockUsePromptCache = object.awsBedrockUsePromptCache ?? undefined; + message.awsUseProfile = object.awsUseProfile ?? undefined; + message.awsProfile = object.awsProfile ?? undefined; + message.awsBedrockEndpoint = object.awsBedrockEndpoint ?? undefined; + message.awsBedrockCustomSelected = object.awsBedrockCustomSelected ?? undefined; + message.awsBedrockCustomModelBaseId = object.awsBedrockCustomModelBaseId ?? undefined; + message.vertexProjectId = object.vertexProjectId ?? undefined; + message.vertexRegion = object.vertexRegion ?? undefined; + message.openAiBaseUrl = object.openAiBaseUrl ?? undefined; + message.openAiApiKey = object.openAiApiKey ?? undefined; + message.openAiModelId = object.openAiModelId ?? undefined; + message.openAiModelInfo = (object.openAiModelInfo !== undefined && object.openAiModelInfo !== null) + ? OpenAiCompatibleModelInfo.fromPartial(object.openAiModelInfo) + : undefined; + message.ollamaModelId = object.ollamaModelId ?? undefined; + message.ollamaBaseUrl = object.ollamaBaseUrl ?? undefined; + message.ollamaApiOptionsCtxNum = object.ollamaApiOptionsCtxNum ?? undefined; + message.lmStudioModelId = object.lmStudioModelId ?? undefined; + message.lmStudioBaseUrl = object.lmStudioBaseUrl ?? undefined; + message.geminiApiKey = object.geminiApiKey ?? undefined; + message.geminiBaseUrl = object.geminiBaseUrl ?? undefined; + message.openAiNativeApiKey = object.openAiNativeApiKey ?? undefined; + message.deepSeekApiKey = object.deepSeekApiKey ?? undefined; + message.requestyApiKey = object.requestyApiKey ?? undefined; + message.requestyModelId = object.requestyModelId ?? undefined; + message.requestyModelInfo = (object.requestyModelInfo !== undefined && object.requestyModelInfo !== null) + ? OpenRouterModelInfo.fromPartial(object.requestyModelInfo) + : undefined; + message.togetherApiKey = object.togetherApiKey ?? undefined; + message.togetherModelId = object.togetherModelId ?? undefined; + message.fireworksApiKey = object.fireworksApiKey ?? undefined; + message.fireworksModelId = object.fireworksModelId ?? undefined; + message.fireworksModelMaxCompletionTokens = object.fireworksModelMaxCompletionTokens ?? undefined; + message.fireworksModelMaxTokens = object.fireworksModelMaxTokens ?? undefined; + message.qwenApiKey = object.qwenApiKey ?? undefined; + message.doubaoApiKey = object.doubaoApiKey ?? undefined; + message.mistralApiKey = object.mistralApiKey ?? undefined; + message.azureApiVersion = object.azureApiVersion ?? undefined; + message.vsCodeLmModelSelector = + (object.vsCodeLmModelSelector !== undefined && object.vsCodeLmModelSelector !== null) + ? LanguageModelChatSelector.fromPartial(object.vsCodeLmModelSelector) + : undefined; + message.qwenApiLine = object.qwenApiLine ?? undefined; + message.nebiusApiKey = object.nebiusApiKey ?? undefined; + message.asksageApiUrl = object.asksageApiUrl ?? undefined; + message.asksageApiKey = object.asksageApiKey ?? undefined; + message.xaiApiKey = object.xaiApiKey ?? undefined; + message.thinkingBudgetTokens = object.thinkingBudgetTokens ?? undefined; + message.reasoningEffort = object.reasoningEffort ?? undefined; + message.sambanovaApiKey = object.sambanovaApiKey ?? undefined; + message.cerebrasApiKey = object.cerebrasApiKey ?? undefined; + message.requestTimeoutMs = object.requestTimeoutMs ?? undefined; + message.apiProvider = object.apiProvider ?? undefined; + message.favoritedModelIds = object.favoritedModelIds?.map((e) => e) || []; + message.sapAiCoreClientId = object.sapAiCoreClientId ?? undefined; + message.sapAiCoreClientSecret = object.sapAiCoreClientSecret ?? undefined; + message.sapAiResourceGroup = object.sapAiResourceGroup ?? undefined; + message.sapAiCoreTokenUrl = object.sapAiCoreTokenUrl ?? undefined; + message.sapAiCoreBaseUrl = object.sapAiCoreBaseUrl ?? undefined; + message.claudeCodePath = object.claudeCodePath ?? undefined; + return message; + }, +}; + +function createBaseModelsApiConfiguration_OpenAiHeadersEntry(): ModelsApiConfiguration_OpenAiHeadersEntry { + return { key: "", value: "" }; +} + +export const ModelsApiConfiguration_OpenAiHeadersEntry: MessageFns = { + encode(message: ModelsApiConfiguration_OpenAiHeadersEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== "") { + writer.uint32(18).string(message.value); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ModelsApiConfiguration_OpenAiHeadersEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseModelsApiConfiguration_OpenAiHeadersEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.key = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.value = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ModelsApiConfiguration_OpenAiHeadersEntry { + return { + key: isSet(object.key) ? globalThis.String(object.key) : "", + value: isSet(object.value) ? globalThis.String(object.value) : "", + }; + }, + + toJSON(message: ModelsApiConfiguration_OpenAiHeadersEntry): unknown { + const obj: any = {}; + if (message.key !== "") { + obj.key = message.key; + } + if (message.value !== "") { + obj.value = message.value; + } + return obj; + }, + + create, I>>( + base?: I, + ): ModelsApiConfiguration_OpenAiHeadersEntry { + return ModelsApiConfiguration_OpenAiHeadersEntry.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): ModelsApiConfiguration_OpenAiHeadersEntry { + const message = createBaseModelsApiConfiguration_OpenAiHeadersEntry(); + message.key = object.key ?? ""; + message.value = object.value ?? ""; + return message; + }, +}; + function createBaseShengSuanYunModelInfo(): ShengSuanYunModelInfo { return { maxTokens: undefined, @@ -1320,7 +3696,7 @@ export const ShengSuanYunModelInfo: MessageFns = { export type ModelsServiceDefinition = typeof ModelsServiceDefinition; export const ModelsServiceDefinition = { name: "ModelsService", - fullName: "ClineShengsuan.ModelsService", + fullName: "cline_shengsuan.ModelsService", methods: { /** Fetches available models from Ollama */ getOllamaModels: { @@ -1394,6 +3770,15 @@ export const ModelsServiceDefinition = { responseStream: true, options: {}, }, + /** Updates API configuration */ + updateApiConfigurationProto: { + name: "updateApiConfigurationProto", + requestType: UpdateApiConfigurationRequest, + requestStream: false, + responseType: Empty, + responseStream: false, + options: {}, + }, }, } as const; diff --git a/src/shared/proto/slash.ts b/src/shared/proto/slash.ts index d060ae13..346e8091 100644 --- a/src/shared/proto/slash.ts +++ b/src/shared/proto/slash.ts @@ -11,7 +11,7 @@ import { Empty, StringRequest } from "./common"; export type SlashServiceDefinition = typeof SlashServiceDefinition; export const SlashServiceDefinition = { name: "SlashService", - fullName: "ClineShengsuan.SlashService", + fullName: "cline_shengsuan.SlashService", methods: { /** Sends button click message */ reportBug: { diff --git a/src/shared/proto/state.ts b/src/shared/proto/state.ts index c54e4ba9..a37f913d 100644 --- a/src/shared/proto/state.ts +++ b/src/shared/proto/state.ts @@ -6,7 +6,7 @@ /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; -import { Empty, EmptyRequest, Int64, Int64Request, Metadata, StringRequest } from "./common"; +import { BooleanRequest, Empty, EmptyRequest, Int64, Int64Request, Metadata, StringRequest } from "./common"; export enum PlanActMode { PLAN = 0, @@ -45,6 +45,23 @@ export interface State { stateJson: string; } +export interface TerminalProfiles { + profiles: TerminalProfile[]; +} + +export interface TerminalProfile { + id: string; + name: string; + path?: string | undefined; + description?: string | undefined; +} + +export interface TerminalProfileUpdateResponse { + closedCount: number; + busyTerminalsCount: number; + hasBusyTerminals: boolean; +} + export interface TogglePlanActModeRequest { metadata?: Metadata | undefined; chatSettings?: ChatSettings | undefined; @@ -63,7 +80,11 @@ export interface ChatContent { files: string[]; } -/** Message for auto approval settings */ +export interface ResetStateRequest { + metadata?: Metadata | undefined; + global?: boolean | undefined; +} + export interface AutoApprovalSettingsRequest { metadata?: Metadata | undefined; version: number; @@ -89,7 +110,6 @@ export interface AutoApprovalSettingsRequest_Actions { export interface UpdateSettingsRequest { metadata?: Metadata | undefined; apiConfiguration?: ApiConfiguration | undefined; - customInstructionsSetting?: string | undefined; telemetrySetting?: string | undefined; planActSeparateModelsSetting?: boolean | undefined; enableCheckpointsSetting?: boolean | undefined; @@ -98,6 +118,8 @@ export interface UpdateSettingsRequest { shellIntegrationTimeout?: number | undefined; terminalReuseEnabled?: boolean | undefined; mcpResponsesCollapsed?: boolean | undefined; + mcpRichDisplayEnabled?: boolean | undefined; + terminalOutputLineLimit?: number | undefined; } /** Complete API Configuration message */ @@ -232,9 +254,16 @@ export interface ApiConfiguration { shengsuanyunToken?: | string | undefined; - /** Dify */ - difyApiKey?: string | undefined; - difyBaseUrl?: string | undefined; + /** SAP AI Core specific */ + sapAiCoreClientId?: string | undefined; + sapAiCoreClientSecret?: string | undefined; + sapAiCoreBaseUrl?: string | undefined; + sapAiCoreTokenUrl?: string | undefined; + sapAiResourceGroup?: + | string + | undefined; + /** Claude Code specific */ + claudeCodePath?: string | undefined; } function createBaseState(): State { @@ -295,6 +324,270 @@ export const State: MessageFns = { }, }; +function createBaseTerminalProfiles(): TerminalProfiles { + return { profiles: [] }; +} + +export const TerminalProfiles: MessageFns = { + encode(message: TerminalProfiles, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + for (const v of message.profiles) { + TerminalProfile.encode(v!, writer.uint32(10).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TerminalProfiles { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTerminalProfiles(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.profiles.push(TerminalProfile.decode(reader, reader.uint32())); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TerminalProfiles { + return { + profiles: globalThis.Array.isArray(object?.profiles) + ? object.profiles.map((e: any) => TerminalProfile.fromJSON(e)) + : [], + }; + }, + + toJSON(message: TerminalProfiles): unknown { + const obj: any = {}; + if (message.profiles?.length) { + obj.profiles = message.profiles.map((e) => TerminalProfile.toJSON(e)); + } + return obj; + }, + + create, I>>(base?: I): TerminalProfiles { + return TerminalProfiles.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TerminalProfiles { + const message = createBaseTerminalProfiles(); + message.profiles = object.profiles?.map((e) => TerminalProfile.fromPartial(e)) || []; + return message; + }, +}; + +function createBaseTerminalProfile(): TerminalProfile { + return { id: "", name: "", path: undefined, description: undefined }; +} + +export const TerminalProfile: MessageFns = { + encode(message: TerminalProfile, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.id !== "") { + writer.uint32(10).string(message.id); + } + if (message.name !== "") { + writer.uint32(18).string(message.name); + } + if (message.path !== undefined) { + writer.uint32(26).string(message.path); + } + if (message.description !== undefined) { + writer.uint32(34).string(message.description); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TerminalProfile { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTerminalProfile(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.id = reader.string(); + continue; + } + case 2: { + if (tag !== 18) { + break; + } + + message.name = reader.string(); + continue; + } + case 3: { + if (tag !== 26) { + break; + } + + message.path = reader.string(); + continue; + } + case 4: { + if (tag !== 34) { + break; + } + + message.description = reader.string(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TerminalProfile { + return { + id: isSet(object.id) ? globalThis.String(object.id) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + path: isSet(object.path) ? globalThis.String(object.path) : undefined, + description: isSet(object.description) ? globalThis.String(object.description) : undefined, + }; + }, + + toJSON(message: TerminalProfile): unknown { + const obj: any = {}; + if (message.id !== "") { + obj.id = message.id; + } + if (message.name !== "") { + obj.name = message.name; + } + if (message.path !== undefined) { + obj.path = message.path; + } + if (message.description !== undefined) { + obj.description = message.description; + } + return obj; + }, + + create, I>>(base?: I): TerminalProfile { + return TerminalProfile.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): TerminalProfile { + const message = createBaseTerminalProfile(); + message.id = object.id ?? ""; + message.name = object.name ?? ""; + message.path = object.path ?? undefined; + message.description = object.description ?? undefined; + return message; + }, +}; + +function createBaseTerminalProfileUpdateResponse(): TerminalProfileUpdateResponse { + return { closedCount: 0, busyTerminalsCount: 0, hasBusyTerminals: false }; +} + +export const TerminalProfileUpdateResponse: MessageFns = { + encode(message: TerminalProfileUpdateResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.closedCount !== 0) { + writer.uint32(8).int32(message.closedCount); + } + if (message.busyTerminalsCount !== 0) { + writer.uint32(16).int32(message.busyTerminalsCount); + } + if (message.hasBusyTerminals !== false) { + writer.uint32(24).bool(message.hasBusyTerminals); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): TerminalProfileUpdateResponse { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseTerminalProfileUpdateResponse(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 8) { + break; + } + + message.closedCount = reader.int32(); + continue; + } + case 2: { + if (tag !== 16) { + break; + } + + message.busyTerminalsCount = reader.int32(); + continue; + } + case 3: { + if (tag !== 24) { + break; + } + + message.hasBusyTerminals = reader.bool(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): TerminalProfileUpdateResponse { + return { + closedCount: isSet(object.closedCount) ? globalThis.Number(object.closedCount) : 0, + busyTerminalsCount: isSet(object.busyTerminalsCount) ? globalThis.Number(object.busyTerminalsCount) : 0, + hasBusyTerminals: isSet(object.hasBusyTerminals) ? globalThis.Boolean(object.hasBusyTerminals) : false, + }; + }, + + toJSON(message: TerminalProfileUpdateResponse): unknown { + const obj: any = {}; + if (message.closedCount !== 0) { + obj.closedCount = Math.round(message.closedCount); + } + if (message.busyTerminalsCount !== 0) { + obj.busyTerminalsCount = Math.round(message.busyTerminalsCount); + } + if (message.hasBusyTerminals !== false) { + obj.hasBusyTerminals = message.hasBusyTerminals; + } + return obj; + }, + + create, I>>(base?: I): TerminalProfileUpdateResponse { + return TerminalProfileUpdateResponse.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>( + object: I, + ): TerminalProfileUpdateResponse { + const message = createBaseTerminalProfileUpdateResponse(); + message.closedCount = object.closedCount ?? 0; + message.busyTerminalsCount = object.busyTerminalsCount ?? 0; + message.hasBusyTerminals = object.hasBusyTerminals ?? false; + return message; + }, +}; + function createBaseTogglePlanActModeRequest(): TogglePlanActModeRequest { return { metadata: undefined, chatSettings: undefined, chatContent: undefined }; } @@ -579,6 +872,84 @@ export const ChatContent: MessageFns = { }, }; +function createBaseResetStateRequest(): ResetStateRequest { + return { metadata: undefined, global: undefined }; +} + +export const ResetStateRequest: MessageFns = { + encode(message: ResetStateRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { + if (message.metadata !== undefined) { + Metadata.encode(message.metadata, writer.uint32(10).fork()).join(); + } + if (message.global !== undefined) { + writer.uint32(16).bool(message.global); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): ResetStateRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseResetStateRequest(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.metadata = Metadata.decode(reader, reader.uint32()); + continue; + } + case 2: { + if (tag !== 16) { + break; + } + + message.global = reader.bool(); + continue; + } + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); + } + return message; + }, + + fromJSON(object: any): ResetStateRequest { + return { + metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, + global: isSet(object.global) ? globalThis.Boolean(object.global) : undefined, + }; + }, + + toJSON(message: ResetStateRequest): unknown { + const obj: any = {}; + if (message.metadata !== undefined) { + obj.metadata = Metadata.toJSON(message.metadata); + } + if (message.global !== undefined) { + obj.global = message.global; + } + return obj; + }, + + create, I>>(base?: I): ResetStateRequest { + return ResetStateRequest.fromPartial(base ?? ({} as any)); + }, + fromPartial, I>>(object: I): ResetStateRequest { + const message = createBaseResetStateRequest(); + message.metadata = (object.metadata !== undefined && object.metadata !== null) + ? Metadata.fromPartial(object.metadata) + : undefined; + message.global = object.global ?? undefined; + return message; + }, +}; + function createBaseAutoApprovalSettingsRequest(): AutoApprovalSettingsRequest { return { metadata: undefined, @@ -938,7 +1309,6 @@ function createBaseUpdateSettingsRequest(): UpdateSettingsRequest { return { metadata: undefined, apiConfiguration: undefined, - customInstructionsSetting: undefined, telemetrySetting: undefined, planActSeparateModelsSetting: undefined, enableCheckpointsSetting: undefined, @@ -947,6 +1317,8 @@ function createBaseUpdateSettingsRequest(): UpdateSettingsRequest { shellIntegrationTimeout: undefined, terminalReuseEnabled: undefined, mcpResponsesCollapsed: undefined, + mcpRichDisplayEnabled: undefined, + terminalOutputLineLimit: undefined, }; } @@ -958,32 +1330,35 @@ export const UpdateSettingsRequest: MessageFns = { if (message.apiConfiguration !== undefined) { ApiConfiguration.encode(message.apiConfiguration, writer.uint32(18).fork()).join(); } - if (message.customInstructionsSetting !== undefined) { - writer.uint32(26).string(message.customInstructionsSetting); - } if (message.telemetrySetting !== undefined) { - writer.uint32(34).string(message.telemetrySetting); + writer.uint32(26).string(message.telemetrySetting); } if (message.planActSeparateModelsSetting !== undefined) { - writer.uint32(40).bool(message.planActSeparateModelsSetting); + writer.uint32(32).bool(message.planActSeparateModelsSetting); } if (message.enableCheckpointsSetting !== undefined) { - writer.uint32(48).bool(message.enableCheckpointsSetting); + writer.uint32(40).bool(message.enableCheckpointsSetting); } if (message.mcpMarketplaceEnabled !== undefined) { - writer.uint32(56).bool(message.mcpMarketplaceEnabled); + writer.uint32(48).bool(message.mcpMarketplaceEnabled); } if (message.chatSettings !== undefined) { - ChatSettings.encode(message.chatSettings, writer.uint32(66).fork()).join(); + ChatSettings.encode(message.chatSettings, writer.uint32(58).fork()).join(); } if (message.shellIntegrationTimeout !== undefined) { - writer.uint32(72).int64(message.shellIntegrationTimeout); + writer.uint32(64).int64(message.shellIntegrationTimeout); } if (message.terminalReuseEnabled !== undefined) { - writer.uint32(80).bool(message.terminalReuseEnabled); + writer.uint32(72).bool(message.terminalReuseEnabled); } if (message.mcpResponsesCollapsed !== undefined) { - writer.uint32(88).bool(message.mcpResponsesCollapsed); + writer.uint32(80).bool(message.mcpResponsesCollapsed); + } + if (message.mcpRichDisplayEnabled !== undefined) { + writer.uint32(88).bool(message.mcpRichDisplayEnabled); + } + if (message.terminalOutputLineLimit !== undefined) { + writer.uint32(96).int64(message.terminalOutputLineLimit); } return writer; }, @@ -1016,15 +1391,15 @@ export const UpdateSettingsRequest: MessageFns = { break; } - message.customInstructionsSetting = reader.string(); + message.telemetrySetting = reader.string(); continue; } case 4: { - if (tag !== 34) { + if (tag !== 32) { break; } - message.telemetrySetting = reader.string(); + message.planActSeparateModelsSetting = reader.bool(); continue; } case 5: { @@ -1032,7 +1407,7 @@ export const UpdateSettingsRequest: MessageFns = { break; } - message.planActSeparateModelsSetting = reader.bool(); + message.enableCheckpointsSetting = reader.bool(); continue; } case 6: { @@ -1040,31 +1415,31 @@ export const UpdateSettingsRequest: MessageFns = { break; } - message.enableCheckpointsSetting = reader.bool(); - continue; - } - case 7: { - if (tag !== 56) { - break; - } - message.mcpMarketplaceEnabled = reader.bool(); continue; } - case 8: { - if (tag !== 66) { + case 7: { + if (tag !== 58) { break; } message.chatSettings = ChatSettings.decode(reader, reader.uint32()); continue; } + case 8: { + if (tag !== 64) { + break; + } + + message.shellIntegrationTimeout = longToNumber(reader.int64()); + continue; + } case 9: { if (tag !== 72) { break; } - message.shellIntegrationTimeout = longToNumber(reader.int64()); + message.terminalReuseEnabled = reader.bool(); continue; } case 10: { @@ -1072,7 +1447,7 @@ export const UpdateSettingsRequest: MessageFns = { break; } - message.terminalReuseEnabled = reader.bool(); + message.mcpResponsesCollapsed = reader.bool(); continue; } case 11: { @@ -1080,7 +1455,15 @@ export const UpdateSettingsRequest: MessageFns = { break; } - message.mcpResponsesCollapsed = reader.bool(); + message.mcpRichDisplayEnabled = reader.bool(); + continue; + } + case 12: { + if (tag !== 96) { + break; + } + + message.terminalOutputLineLimit = longToNumber(reader.int64()); continue; } } @@ -1096,9 +1479,6 @@ export const UpdateSettingsRequest: MessageFns = { return { metadata: isSet(object.metadata) ? Metadata.fromJSON(object.metadata) : undefined, apiConfiguration: isSet(object.apiConfiguration) ? ApiConfiguration.fromJSON(object.apiConfiguration) : undefined, - customInstructionsSetting: isSet(object.customInstructionsSetting) - ? globalThis.String(object.customInstructionsSetting) - : undefined, telemetrySetting: isSet(object.telemetrySetting) ? globalThis.String(object.telemetrySetting) : undefined, planActSeparateModelsSetting: isSet(object.planActSeparateModelsSetting) ? globalThis.Boolean(object.planActSeparateModelsSetting) @@ -1119,6 +1499,12 @@ export const UpdateSettingsRequest: MessageFns = { mcpResponsesCollapsed: isSet(object.mcpResponsesCollapsed) ? globalThis.Boolean(object.mcpResponsesCollapsed) : undefined, + mcpRichDisplayEnabled: isSet(object.mcpRichDisplayEnabled) + ? globalThis.Boolean(object.mcpRichDisplayEnabled) + : undefined, + terminalOutputLineLimit: isSet(object.terminalOutputLineLimit) + ? globalThis.Number(object.terminalOutputLineLimit) + : undefined, }; }, @@ -1130,9 +1516,6 @@ export const UpdateSettingsRequest: MessageFns = { if (message.apiConfiguration !== undefined) { obj.apiConfiguration = ApiConfiguration.toJSON(message.apiConfiguration); } - if (message.customInstructionsSetting !== undefined) { - obj.customInstructionsSetting = message.customInstructionsSetting; - } if (message.telemetrySetting !== undefined) { obj.telemetrySetting = message.telemetrySetting; } @@ -1157,6 +1540,12 @@ export const UpdateSettingsRequest: MessageFns = { if (message.mcpResponsesCollapsed !== undefined) { obj.mcpResponsesCollapsed = message.mcpResponsesCollapsed; } + if (message.mcpRichDisplayEnabled !== undefined) { + obj.mcpRichDisplayEnabled = message.mcpRichDisplayEnabled; + } + if (message.terminalOutputLineLimit !== undefined) { + obj.terminalOutputLineLimit = Math.round(message.terminalOutputLineLimit); + } return obj; }, @@ -1171,7 +1560,6 @@ export const UpdateSettingsRequest: MessageFns = { message.apiConfiguration = (object.apiConfiguration !== undefined && object.apiConfiguration !== null) ? ApiConfiguration.fromPartial(object.apiConfiguration) : undefined; - message.customInstructionsSetting = object.customInstructionsSetting ?? undefined; message.telemetrySetting = object.telemetrySetting ?? undefined; message.planActSeparateModelsSetting = object.planActSeparateModelsSetting ?? undefined; message.enableCheckpointsSetting = object.enableCheckpointsSetting ?? undefined; @@ -1182,6 +1570,8 @@ export const UpdateSettingsRequest: MessageFns = { message.shellIntegrationTimeout = object.shellIntegrationTimeout ?? undefined; message.terminalReuseEnabled = object.terminalReuseEnabled ?? undefined; message.mcpResponsesCollapsed = object.mcpResponsesCollapsed ?? undefined; + message.mcpRichDisplayEnabled = object.mcpRichDisplayEnabled ?? undefined; + message.terminalOutputLineLimit = object.terminalOutputLineLimit ?? undefined; return message; }, }; @@ -1263,8 +1653,12 @@ function createBaseApiConfiguration(): ApiConfiguration { shengsuanyunModelId: undefined, shengsuanyunModelInfo: undefined, shengsuanyunToken: undefined, - difyApiKey: undefined, - difyBaseUrl: undefined, + sapAiCoreClientId: undefined, + sapAiCoreClientSecret: undefined, + sapAiCoreBaseUrl: undefined, + sapAiCoreTokenUrl: undefined, + sapAiResourceGroup: undefined, + claudeCodePath: undefined, }; } @@ -1495,11 +1889,23 @@ export const ApiConfiguration: MessageFns = { if (message.shengsuanyunToken !== undefined) { writer.uint32(602).string(message.shengsuanyunToken); } - if (message.difyApiKey !== undefined) { - writer.uint32(610).string(message.difyApiKey); + if (message.sapAiCoreClientId !== undefined) { + writer.uint32(610).string(message.sapAiCoreClientId); } - if (message.difyBaseUrl !== undefined) { - writer.uint32(618).string(message.difyBaseUrl); + if (message.sapAiCoreClientSecret !== undefined) { + writer.uint32(618).string(message.sapAiCoreClientSecret); + } + if (message.sapAiCoreBaseUrl !== undefined) { + writer.uint32(626).string(message.sapAiCoreBaseUrl); + } + if (message.sapAiCoreTokenUrl !== undefined) { + writer.uint32(634).string(message.sapAiCoreTokenUrl); + } + if (message.sapAiResourceGroup !== undefined) { + writer.uint32(642).string(message.sapAiResourceGroup); + } + if (message.claudeCodePath !== undefined) { + writer.uint32(650).string(message.claudeCodePath); } return writer; }, @@ -2116,7 +2522,7 @@ export const ApiConfiguration: MessageFns = { break; } - message.difyApiKey = reader.string(); + message.sapAiCoreClientId = reader.string(); continue; } case 77: { @@ -2124,7 +2530,39 @@ export const ApiConfiguration: MessageFns = { break; } - message.difyBaseUrl = reader.string(); + message.sapAiCoreClientSecret = reader.string(); + continue; + } + case 78: { + if (tag !== 626) { + break; + } + + message.sapAiCoreBaseUrl = reader.string(); + continue; + } + case 79: { + if (tag !== 634) { + break; + } + + message.sapAiCoreTokenUrl = reader.string(); + continue; + } + case 80: { + if (tag !== 642) { + break; + } + + message.sapAiResourceGroup = reader.string(); + continue; + } + case 81: { + if (tag !== 650) { + break; + } + + message.claudeCodePath = reader.string(); continue; } } @@ -2243,8 +2681,14 @@ export const ApiConfiguration: MessageFns = { ? globalThis.String(object.shengsuanyunModelInfo) : undefined, shengsuanyunToken: isSet(object.shengsuanyunToken) ? globalThis.String(object.shengsuanyunToken) : undefined, - difyApiKey: isSet(object.difyApiKey) ? globalThis.String(object.difyApiKey) : undefined, - difyBaseUrl: isSet(object.difyBaseUrl) ? globalThis.String(object.difyBaseUrl) : undefined, + sapAiCoreClientId: isSet(object.sapAiCoreClientId) ? globalThis.String(object.sapAiCoreClientId) : undefined, + sapAiCoreClientSecret: isSet(object.sapAiCoreClientSecret) + ? globalThis.String(object.sapAiCoreClientSecret) + : undefined, + sapAiCoreBaseUrl: isSet(object.sapAiCoreBaseUrl) ? globalThis.String(object.sapAiCoreBaseUrl) : undefined, + sapAiCoreTokenUrl: isSet(object.sapAiCoreTokenUrl) ? globalThis.String(object.sapAiCoreTokenUrl) : undefined, + sapAiResourceGroup: isSet(object.sapAiResourceGroup) ? globalThis.String(object.sapAiResourceGroup) : undefined, + claudeCodePath: isSet(object.claudeCodePath) ? globalThis.String(object.claudeCodePath) : undefined, }; }, @@ -2475,11 +2919,23 @@ export const ApiConfiguration: MessageFns = { if (message.shengsuanyunToken !== undefined) { obj.shengsuanyunToken = message.shengsuanyunToken; } - if (message.difyApiKey !== undefined) { - obj.difyApiKey = message.difyApiKey; + if (message.sapAiCoreClientId !== undefined) { + obj.sapAiCoreClientId = message.sapAiCoreClientId; } - if (message.difyBaseUrl !== undefined) { - obj.difyBaseUrl = message.difyBaseUrl; + if (message.sapAiCoreClientSecret !== undefined) { + obj.sapAiCoreClientSecret = message.sapAiCoreClientSecret; + } + if (message.sapAiCoreBaseUrl !== undefined) { + obj.sapAiCoreBaseUrl = message.sapAiCoreBaseUrl; + } + if (message.sapAiCoreTokenUrl !== undefined) { + obj.sapAiCoreTokenUrl = message.sapAiCoreTokenUrl; + } + if (message.sapAiResourceGroup !== undefined) { + obj.sapAiResourceGroup = message.sapAiResourceGroup; + } + if (message.claudeCodePath !== undefined) { + obj.claudeCodePath = message.claudeCodePath; } return obj; }, @@ -2564,8 +3020,12 @@ export const ApiConfiguration: MessageFns = { message.shengsuanyunModelId = object.shengsuanyunModelId ?? undefined; message.shengsuanyunModelInfo = object.shengsuanyunModelInfo ?? undefined; message.shengsuanyunToken = object.shengsuanyunToken ?? undefined; - message.difyApiKey = object.difyApiKey ?? undefined; - message.difyBaseUrl = object.difyBaseUrl ?? undefined; + message.sapAiCoreClientId = object.sapAiCoreClientId ?? undefined; + message.sapAiCoreClientSecret = object.sapAiCoreClientSecret ?? undefined; + message.sapAiCoreBaseUrl = object.sapAiCoreBaseUrl ?? undefined; + message.sapAiCoreTokenUrl = object.sapAiCoreTokenUrl ?? undefined; + message.sapAiResourceGroup = object.sapAiResourceGroup ?? undefined; + message.claudeCodePath = object.claudeCodePath ?? undefined; return message; }, }; @@ -2573,7 +3033,7 @@ export const ApiConfiguration: MessageFns = { export type StateServiceDefinition = typeof StateServiceDefinition; export const StateServiceDefinition = { name: "StateService", - fullName: "ClineShengsuan.StateService", + fullName: "cline_shengsuan.StateService", methods: { getLatestState: { name: "getLatestState", @@ -2583,6 +3043,38 @@ export const StateServiceDefinition = { responseStream: false, options: {}, }, + updateTerminalConnectionTimeout: { + name: "updateTerminalConnectionTimeout", + requestType: Int64Request, + requestStream: false, + responseType: Int64, + responseStream: false, + options: {}, + }, + updateTerminalReuseEnabled: { + name: "updateTerminalReuseEnabled", + requestType: BooleanRequest, + requestStream: false, + responseType: Empty, + responseStream: false, + options: {}, + }, + updateDefaultTerminalProfile: { + name: "updateDefaultTerminalProfile", + requestType: StringRequest, + requestStream: false, + responseType: TerminalProfileUpdateResponse, + responseStream: false, + options: {}, + }, + getAvailableTerminalProfiles: { + name: "getAvailableTerminalProfiles", + requestType: EmptyRequest, + requestStream: false, + responseType: TerminalProfiles, + responseStream: false, + options: {}, + }, subscribeToState: { name: "subscribeToState", requestType: EmptyRequest, @@ -2601,7 +3093,7 @@ export const StateServiceDefinition = { }, resetState: { name: "resetState", - requestType: EmptyRequest, + requestType: ResetStateRequest, requestStream: false, responseType: Empty, responseStream: false, @@ -2615,14 +3107,6 @@ export const StateServiceDefinition = { responseStream: false, options: {}, }, - updateTerminalConnectionTimeout: { - name: "updateTerminalConnectionTimeout", - requestType: Int64Request, - requestStream: false, - responseType: Int64, - responseStream: false, - options: {}, - }, updateAutoApprovalSettings: { name: "updateAutoApprovalSettings", requestType: AutoApprovalSettingsRequest, diff --git a/src/shared/proto/task.ts b/src/shared/proto/task.ts index 6eebd253..af08b96c 100644 --- a/src/shared/proto/task.ts +++ b/src/shared/proto/task.ts @@ -1227,7 +1227,7 @@ export const ExecuteQuickWinRequest: MessageFns = { export type TaskServiceDefinition = typeof TaskServiceDefinition; export const TaskServiceDefinition = { name: "TaskService", - fullName: "ClineShengsuan.TaskService", + fullName: "cline_shengsuan.TaskService", methods: { /** Cancels the currently running task */ cancelTask: { diff --git a/src/shared/proto/ui.ts b/src/shared/proto/ui.ts index 4d1a4f81..3101c4f7 100644 --- a/src/shared/proto/ui.ts +++ b/src/shared/proto/ui.ts @@ -215,13 +215,14 @@ export enum ClineSay { BROWSER_ACTION_RESULT = 16, MCP_SERVER_REQUEST_STARTED = 17, MCP_SERVER_RESPONSE = 18, - USE_MCP_SERVER_SAY = 19, - DIFF_ERROR = 20, - DELETED_API_REQS = 21, - CLINEIGNORE_ERROR = 22, - CHECKPOINT_CREATED = 23, - LOAD_MCP_DOCUMENTATION = 24, - INFO = 25, + MCP_NOTIFICATION = 19, + USE_MCP_SERVER_SAY = 20, + DIFF_ERROR = 21, + DELETED_API_REQS = 22, + CLINEIGNORE_ERROR = 23, + CHECKPOINT_CREATED = 24, + LOAD_MCP_DOCUMENTATION = 25, + INFO = 26, UNRECOGNIZED = -1, } @@ -285,24 +286,27 @@ export function clineSayFromJSON(object: any): ClineSay { case "MCP_SERVER_RESPONSE": return ClineSay.MCP_SERVER_RESPONSE; case 19: + case "MCP_NOTIFICATION": + return ClineSay.MCP_NOTIFICATION; + case 20: case "USE_MCP_SERVER_SAY": return ClineSay.USE_MCP_SERVER_SAY; - case 20: + case 21: case "DIFF_ERROR": return ClineSay.DIFF_ERROR; - case 21: + case 22: case "DELETED_API_REQS": return ClineSay.DELETED_API_REQS; - case 22: + case 23: case "CLINEIGNORE_ERROR": return ClineSay.CLINEIGNORE_ERROR; - case 23: + case 24: case "CHECKPOINT_CREATED": return ClineSay.CHECKPOINT_CREATED; - case 24: + case 25: case "LOAD_MCP_DOCUMENTATION": return ClineSay.LOAD_MCP_DOCUMENTATION; - case 25: + case 26: case "INFO": return ClineSay.INFO; case -1: @@ -352,6 +356,8 @@ export function clineSayToJSON(object: ClineSay): string { return "MCP_SERVER_REQUEST_STARTED"; case ClineSay.MCP_SERVER_RESPONSE: return "MCP_SERVER_RESPONSE"; + case ClineSay.MCP_NOTIFICATION: + return "MCP_NOTIFICATION"; case ClineSay.USE_MCP_SERVER_SAY: return "USE_MCP_SERVER_SAY"; case ClineSay.DIFF_ERROR: @@ -2340,7 +2346,7 @@ export const ClineMessage: MessageFns = { export type UiServiceDefinition = typeof UiServiceDefinition; export const UiServiceDefinition = { name: "UiService", - fullName: "ClineShengsuan.UiService", + fullName: "cline_shengsuan.UiService", methods: { /** Scrolls to a specific settings section in the settings view */ scrollToSettings: { @@ -2450,6 +2456,24 @@ export const UiServiceDefinition = { responseStream: true, options: {}, }, + /** Subscribe to focus chat input events with client ID */ + subscribeToFocusChatInput: { + name: "subscribeToFocusChatInput", + requestType: StringRequest, + requestStream: false, + responseType: Empty, + responseStream: true, + options: {}, + }, + /** Subscribe to webview visibility change events */ + subscribeToDidBecomeVisible: { + name: "subscribeToDidBecomeVisible", + requestType: EmptyRequest, + requestStream: false, + responseType: Empty, + responseStream: true, + options: {}, + }, }, } as const; diff --git a/src/shared/proto/web.ts b/src/shared/proto/web.ts index 9780d5fb..56e0e772 100644 --- a/src/shared/proto/web.ts +++ b/src/shared/proto/web.ts @@ -241,7 +241,7 @@ export const OpenGraphData: MessageFns = { export type WebServiceDefinition = typeof WebServiceDefinition; export const WebServiceDefinition = { name: "WebService", - fullName: "ClineShengsuan.WebService", + fullName: "cline_shengsuan.WebService", methods: { checkIsImageUrl: { name: "checkIsImageUrl", diff --git a/src/standalone/host-bridge-client-manager.ts b/src/standalone/host-bridge-client-manager.ts new file mode 100644 index 00000000..d10636d1 --- /dev/null +++ b/src/standalone/host-bridge-client-manager.ts @@ -0,0 +1,26 @@ +import { Channel, createChannel } from "nice-grpc" +import { UriServiceClientImpl, WatchServiceClientImpl } from "@generated/standalone/host-bridge-clients" +import { UriServiceClientInterface, WatchServiceClientInterface } from "@generated/hosts/host-bridge-client-types" +import { HostBridgeClientProvider } from "@/hosts/host-bridge-client" + +/** + * Singleton class to hold the gRPC clients for the host bridge. The clients should be re-used to avoid + * creating a new TCP connection every time a rpc is made. + */ +export class ExternalHostBridgeClientManager implements HostBridgeClientProvider { + private channel: Channel + UriServiceClient: UriServiceClientInterface + WatchServiceClient: WatchServiceClientInterface + + constructor() { + const address = process.env.HOST_BRIDGE_ADDRESS || "localhost:50052" + this.channel = createChannel(address) + + this.UriServiceClient = new UriServiceClientImpl(this.channel) + this.WatchServiceClient = new WatchServiceClientImpl(this.channel) + } + + public close(): void { + this.channel.close() + } +} diff --git a/src/standalone/standalone.ts b/src/standalone/standalone.ts index 4f33db7b..b9e1cf85 100644 --- a/src/standalone/standalone.ts +++ b/src/standalone/standalone.ts @@ -5,14 +5,16 @@ import * as health from "grpc-health-check" import { activate } from "../extension" import { Controller } from "../core/controller" import { extensionContext, outputChannel, postMessage } from "./vscode-context" -import { packageDefinition, proto, log, camelToSnakeCase, snakeToCamelCase } from "./utils" +import { getPackageDefinition, log } from "./utils" import { GrpcHandler, GrpcStreamingResponseHandler } from "./grpc-types" -import { addServices } from "./server-setup" +import { addProtobusServices } from "@generated/standalone/server-setup" import { StreamingResponseHandler } from "@/core/controller/grpc-handler" +import { initializeHostBridgeClient, StreamingCallbacks, UriServiceClient, WatchServiceClient } from "@/hosts/host-bridge-client" +import { ExternalHostBridgeClientManager } from "./host-bridge-client-manager" -function main() { +async function main() { log("Starting service...") - + initializeHostBridgeClient(new ExternalHostBridgeClientManager()) activate(extensionContext) const controller = new Controller(extensionContext, outputChannel, postMessage) const server = new grpc.Server() @@ -22,10 +24,10 @@ function main() { healthImpl.addToServer(server) // Add all the handlers for the ProtoBus services to the server. - addServices(server, proto, controller, wrapHandler, wrapStreamingResponseHandler) + addProtobusServices(server, controller, wrapHandler, wrapStreamingResponseHandler) // Set up reflection. - const reflection = new ReflectionService(packageDefinition) + const reflection = new ReflectionService(getPackageDefinition()) reflection.addToServer(server) // Start the server. @@ -58,10 +60,8 @@ function wrapHandler( return async (call: grpc.ServerUnaryCall, callback: grpc.sendUnaryData) => { try { log(`gRPC request: ${call.getPath()}`) - const result = await handler(controller, snakeToCamelCase(call.request)) - // The grpc-js serializer expects the proto message to be in the same - // case as the proto file. This is a work around until we find a solution. - callback(null, camelToSnakeCase(result)) + const result = await handler(controller, call.request) + callback(null, result) } catch (err: any) { log(`gRPC handler error: ${call.getPath()}\n${err.stack}`) callback({ @@ -83,9 +83,7 @@ function wrapStreamingResponseHandler( const responseHandler: StreamingResponseHandler = (response, isLast, sequenceNumber) => { try { - // The grpc-js serializer expects the proto message to be in the same - // case as the proto file. This is a work around until we find a solution. - call.write(camelToSnakeCase(response)) // Use a bound version of call.write to maintain proper 'this' context + call.write(response) // Use a bound version of call.write to maintain proper 'this' context if (isLast === true) { log(`Closing stream for ${requestId}`) @@ -96,7 +94,7 @@ function wrapStreamingResponseHandler( return Promise.reject(error) } } - await handler(controller, snakeToCamelCase(call.request), responseHandler, requestId) + await handler(controller, call.request, responseHandler, requestId) } catch (err: any) { log(`gRPC handler error: ${call.getPath()}\n${err.stack}`) call.destroy({ diff --git a/src/standalone/utils.ts b/src/standalone/utils.ts index 451ae9af..c6a74568 100644 --- a/src/standalone/utils.ts +++ b/src/standalone/utils.ts @@ -1,65 +1,43 @@ import * as fs from "fs" -import * as grpc from "@grpc/grpc-js" import * as protoLoader from "@grpc/proto-loader" import * as health from "grpc-health-check" +import { StreamingCallbacks } from "@hosts/host-bridge-client" const log = (...args: unknown[]) => { const timestamp = new Date().toISOString() console.log(`[${timestamp}]`, "#bot.cline.server.ts", ...args) } -// Load service definitions. -const descriptorSet = fs.readFileSync("proto/descriptor_set.pb") -const clineDef = protoLoader.loadFileDescriptorSetFromBuffer(descriptorSet) -const healthDef = protoLoader.loadSync(health.protoPath) -const packageDefinition = { ...clineDef, ...healthDef } -const proto = grpc.loadPackageDefinition(packageDefinition) as unknown - -// Helper function to convert camelCase to snake_case -function camelToSnakeCase(obj: any): any { - if (obj === null || typeof obj !== "object") { - return obj - } - - if (Array.isArray(obj)) { - return obj.map(camelToSnakeCase) - } - - return Object.keys(obj).reduce((acc: any, key: string) => { - // Convert key from camelCase to snake_case - const snakeKey = key - .replace(/([A-Z])/g, "_$1") - .replace(/^_+/, "") - .toLowerCase() - - // Convert value recursively if it's an object - const value = obj[key] - acc[snakeKey] = camelToSnakeCase(value) - - return acc - }, {}) +function getPackageDefinition() { + // Load service definitions. + const descriptorSet = fs.readFileSync("proto/descriptor_set.pb") + const clineDef = protoLoader.loadFileDescriptorSetFromBuffer(descriptorSet) + const healthDef = protoLoader.loadSync(health.protoPath) + const packageDefinition = { ...clineDef, ...healthDef } + return packageDefinition } -// Helper function to convert snake_case to camelCase -function snakeToCamelCase(obj: any): any { - if (obj === null || typeof obj !== "object") { - return obj +/** + * Converts an AsyncIterable to a callback-based API + * @param stream The AsyncIterable stream to process + * @param callbacks The callbacks to invoke for stream events + */ +async function asyncIteratorToCallbacks(stream: AsyncIterable, callbacks: StreamingCallbacks): Promise { + try { + // Process each item in the stream + for await (const response of stream) { + callbacks.onResponse && callbacks.onResponse(response) + } + // Stream completed successfully + callbacks.onComplete && callbacks.onComplete() + } catch (err) { + const error = err instanceof Error ? err : new Error(String(err)) + if (callbacks.onError) { + callbacks.onError(error) + } else { + log(`Host bridge RPC error: ${error}`) + } } - - if (Array.isArray(obj)) { - return obj.map(snakeToCamelCase) - } - - return Object.keys(obj).reduce((acc: any, key: string) => { - // Convert key from snake_case to camelCase - const camelKey = key.replace(/_([a-z0-9])/g, (_, char) => char.toUpperCase()) - - // Convert value recursively if it's an object - const value = obj[key] - acc[camelKey] = snakeToCamelCase(value) - - return acc - }, {}) } -export { packageDefinition, proto, log, camelToSnakeCase, snakeToCamelCase } +export { getPackageDefinition, log, asyncIteratorToCallbacks } diff --git a/src/standalone/vscode-context.ts b/src/standalone/vscode-context.ts index e33c9f5d..dd2a9445 100644 --- a/src/standalone/vscode-context.ts +++ b/src/standalone/vscode-context.ts @@ -1,23 +1,28 @@ import { URI } from "vscode-uri" -import path from "path" -import { mkdirSync } from "fs" +import { mkdirSync, readFileSync } from "fs" +import path, { join } from "path" import type { Extension, ExtensionContext } from "vscode" -import { ExtensionKind, ExtensionMode, LanguageModelAccessInformation } from "vscode" +import { ExtensionKind, ExtensionMode } from "vscode" +import { log } from "./utils" import { outputChannel, postMessage } from "./vscode-context-stubs" import { EventEmitter } from "./vscode-context-utils" import { EnvironmentVariableCollection, MementoStore, readJson, SecretStore } from "./vscode-context-utils" -import { log } from "./utils" +import type { LanguageModelAccessInformation } from "vscode" if (!process.env.CLINE_DIR) { console.warn("Environment variable CLINE_DIR was not set.") process.exit(1) } + +const VERSION = getPackageVersion() +log("Running standalone cline ", VERSION) + const DATA_DIR = path.join(process.env.CLINE_DIR, "data") mkdirSync(DATA_DIR, { recursive: true }) log("Using settings dir:", DATA_DIR) -const EXTENSION_DIR = path.join(process.env.CLINE_DIR, "core") +const EXTENSION_DIR = path.join(process.env.CLINE_DIR, "core", VERSION, "extension") const EXTENSION_MODE = process.env.IS_DEV === "true" ? ExtensionMode.Development : ExtensionMode.Production const extension: Extension = { @@ -61,13 +66,16 @@ const extensionContext: ExtensionContext = { // Mock implementation for languageModelAccessInformation required by newer VSCode versions languageModelAccessInformation: { - endpoint: "", - authenticationMethod: "none", - modelFamily: "none", - features: [], + // Create an event emitter for onDidChange onDidChange: new EventEmitter().event, - canSendRequest: () => false, - } as unknown as LanguageModelAccessInformation, + // Simple implementation that always returns true + canSendRequest: () => true, + } as LanguageModelAccessInformation, +} + +function getPackageVersion(): string { + const packageJson = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf8")) + return packageJson.version } console.log("Finished loading vscode context...") diff --git a/src/utils/model-utils.ts b/src/utils/model-utils.ts new file mode 100644 index 00000000..2f74afa4 --- /dev/null +++ b/src/utils/model-utils.ts @@ -0,0 +1,7 @@ +import { ApiHandler } from "@api/index" + +export function isClaude4ModelFamily(api: ApiHandler): boolean { + const model = api.getModel() + const modelId = model.id + return modelId.includes("sonnet-4") || modelId.includes("opus-4") +} diff --git a/src/utils/shell.ts b/src/utils/shell.ts index 22a916f0..4b27fd44 100644 --- a/src/utils/shell.ts +++ b/src/utils/shell.ts @@ -179,7 +179,113 @@ function getShellFromEnv(): string | null { } // ----------------------------------------------------- -// 4) Publicly Exposed Shell Getter +// 4) Terminal Profile Interface and Utilities +// ----------------------------------------------------- + +import { TerminalProfile } from "../shared/proto/state" + +/** Gets available terminal profiles for the current platform */ +export function getAvailableTerminalProfiles(): TerminalProfile[] { + const profiles: TerminalProfile[] = [ + { + id: "default", + name: "Default", + description: "Use VSCode's default terminal configuration", + }, + ] + + if (process.platform === "win32") { + // Windows terminal profiles + profiles.push( + { + id: "powershell-7", + name: "PowerShell 7", + path: SHELL_PATHS.POWERSHELL_7, + description: "PowerShell 7 (pwsh.exe)", + }, + { + id: "powershell-legacy", + name: "Windows PowerShell", + path: SHELL_PATHS.POWERSHELL_LEGACY, + description: "Windows PowerShell 5.x", + }, + { + id: "cmd", + name: "Command Prompt", + path: SHELL_PATHS.CMD, + description: "Command Prompt (cmd.exe)", + }, + { + id: "wsl-bash", + name: "WSL Bash", + path: SHELL_PATHS.WSL_BASH, + description: "Windows Subsystem for Linux Bash", + }, + ) + } else if (process.platform === "darwin") { + // macOS terminal profiles + profiles.push( + { + id: "zsh", + name: "zsh", + path: SHELL_PATHS.ZSH, + description: "Z shell (default on macOS)", + }, + { + id: "bash", + name: "bash", + path: SHELL_PATHS.BASH, + description: "Bourne Again Shell", + }, + ) + } else if (process.platform === "linux") { + // Linux terminal profiles + profiles.push( + { + id: "bash", + name: "bash", + path: SHELL_PATHS.BASH, + description: "Bourne Again Shell (default on most Linux)", + }, + { + id: "zsh", + name: "zsh", + path: SHELL_PATHS.ZSH, + description: "Z shell", + }, + { + id: "dash", + name: "dash", + path: SHELL_PATHS.DASH, + description: "Debian Almquist Shell", + }, + ) + } + + return profiles +} + +/** Gets the shell path for a specific terminal profile */ +export function getShellForProfile(profileId: string): string { + // If it's the default profile, use the existing getShell() logic + if (profileId === "default") { + return getShell() + } + + // Find the profile + const profiles = getAvailableTerminalProfiles() + const profile = profiles.find((p) => p.id === profileId) + + if (profile?.path) { + return profile.path + } + + // Fallback to default shell if profile not found + return getShell() +} + +// ----------------------------------------------------- +// 5) Publicly Exposed Shell Getter // ----------------------------------------------------- export function getShell(): string { diff --git a/standalone/runtime-files/package.json b/standalone/runtime-files/package.json index db152b21..2bc275a8 100644 --- a/standalone/runtime-files/package.json +++ b/standalone/runtime-files/package.json @@ -1,6 +1,6 @@ { "name": "cline-standalone", - "version": "1.0.0", + "version": "0.0.1", "main": "standalone.js", "dependencies": { "@grpc/grpc-js": "^1.13.3", diff --git a/tsconfig.json b/tsconfig.json index 97dc410f..49cbfbd3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,11 +24,13 @@ "@/*": ["src/*"], "@api/*": ["src/api/*"], "@core/*": ["src/core/*"], + "@generated/*": ["src/generated/*"], + "@hosts/*": ["src/hosts/*"], "@integrations/*": ["src/integrations/*"], + "@packages/*": ["src/packages/*"], "@services/*": ["src/services/*"], "@shared/*": ["src/shared/*"], - "@utils/*": ["src/utils/*"], - "@packages/*": ["src/packages/*"] + "@utils/*": ["src/utils/*"] } }, "include": ["src/**/*", "scripts/**/*"], diff --git a/webview-ui/.eslintrc.json b/webview-ui/.eslintrc.json index d0601bb2..bf275f66 100644 --- a/webview-ui/.eslintrc.json +++ b/webview-ui/.eslintrc.json @@ -27,7 +27,14 @@ "prefer-const": "off", "no-extra-semi": "off", "eslint-rules/no-protobuf-object-literals": "error", - "eslint-rules/no-grpc-client-object-literals": "error" + "eslint-rules/no-grpc-client-object-literals": "error", + "no-restricted-syntax": [ + "error", + { + "selector": "VariableDeclarator[id.type=\"ObjectPattern\"][init.object.name=\"process\"][init.property.name=\"env\"]", + "message": "Use process.env.VARIABLE_NAME directly instead of destructuring" + } + ] }, "ignorePatterns": ["build"] } diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 5fce6074..8e686e93 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -1,6 +1,8 @@ import { VSCodeBadge, VSCodeButton, VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react" import deepEqual from "fast-deep-equal" import React, { memo, MouseEvent, useCallback, useEffect, useMemo, useRef, useState } from "react" +import styled from "styled-components" +import { useEvent, useSize } from "react-use" import CreditLimitError from "@/components/chat/CreditLimitError" import { OptionsButtons } from "@/components/chat/OptionsButtons" @@ -9,6 +11,8 @@ import { CheckmarkControl } from "@/components/common/CheckmarkControl" import CodeBlock, { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock" import MarkdownBlock from "@/components/common/MarkdownBlock" import SuccessButton from "@/components/common/SuccessButton" +import { WithCopyButton } from "@/components/common/CopyButton" +import Thumbnails from "@/components/common/Thumbnails" import McpResponseDisplay from "@/components/mcp/chat-display/McpResponseDisplay" import McpResourceRow from "@/components/mcp/configuration/tabs/installed/server-row/McpResourceRow" import McpToolRow from "@/components/mcp/configuration/tabs/installed/server-row/McpToolRow" @@ -28,76 +32,19 @@ import { } from "@shared/ExtensionMessage" import { COMMAND_OUTPUT_STRING, COMMAND_REQ_APP_STRING } from "@shared/combineCommandSequences" import { Int64Request, StringRequest } from "@shared/proto/common" -import { useEvent, useSize } from "react-use" -import styled from "styled-components" -import { CheckpointControls } from "../common/CheckpointControls" + import CodeAccordian, { cleanPathPrefix } from "../common/CodeAccordian" +import { CheckpointControls } from "../common/CheckpointControls" import NewTaskPreview from "./NewTaskPreview" -import QuoteButton from "./QuoteButton" import ReportBugPreview from "./ReportBugPreview" import UserMessage from "./UserMessage" - -interface CopyButtonProps { - textToCopy: string | undefined -} +import QuoteButton from "./QuoteButton" const normalColor = "var(--vscode-foreground)" const errorColor = "var(--vscode-errorForeground)" const successColor = "var(--vscode-charts-green)" const cancelledColor = "var(--vscode-descriptionForeground)" -const CopyButtonStyled = styled(VSCodeButton)` - position: absolute; - bottom: 2px; - right: 2px; - z-index: 1; - opacity: 0; -` - -interface WithCopyButtonProps { - children: React.ReactNode - textToCopy?: string - style?: React.CSSProperties - ref?: React.Ref - onMouseUp?: (event: MouseEvent) => void -} - -const StyledContainer = styled.div` - position: relative; - - &:hover ${CopyButtonStyled} { - opacity: 1; - } -` - -const WithCopyButton = React.forwardRef( - ({ children, textToCopy, style, onMouseUp, ...props }, ref) => { - const [copied, setCopied] = useState(false) - - const handleCopy = () => { - if (!textToCopy) return - - navigator.clipboard.writeText(textToCopy).then(() => { - setCopied(true) - setTimeout(() => { - setCopied(false) - }, 1500) - }) - } - - return ( - - {children} - {textToCopy && ( - - - - )} - - ) - }, -) - const ChatRowContainer = styled.div` padding: 10px 6px 10px 15px; position: relative; @@ -1052,9 +999,43 @@ export const ChatRowContent = ({ return null // we should never see this message type case "mcp_server_response": return + case "mcp_notification": + return ( +
+ +
+ MCP Notification: + {message.text} +
+
+ ) case "text": return ( - + {quoteButtonState.visible && ( + void onFocusChange?: (isFocused: boolean) => void + isTaskView: boolean } interface GitCommit { @@ -266,6 +269,7 @@ const ChatTextArea = forwardRef( shouldDisableFilesAndImages, onHeightChange, onFocusChange, + isTaskView, }, ref, ) => { @@ -962,12 +966,20 @@ const ChatTextArea = forwardRef( ) // Separate the API config submission logic - const submitApiConfig = useCallback(() => { + const submitApiConfig = useCallback(async () => { const apiValidationResult = validateApiConfiguration(apiConfiguration) const modelIdValidationResult = validateModelId(apiConfiguration, openRouterModels) - if (!apiValidationResult && !modelIdValidationResult) { - vscode.postMessage({ type: "apiConfiguration", apiConfiguration }) + if (!apiValidationResult && !modelIdValidationResult && apiConfiguration) { + try { + await ModelsServiceClient.updateApiConfigurationProto( + UpdateApiConfigurationRequest.create({ + apiConfiguration: convertApiConfigurationToProto(apiConfiguration), + }), + ) + } catch (error) { + console.error("Failed to update API configuration:", error) + } } else { StateServiceClient.getLatestState(EmptyRequest.create()) .then(() => { @@ -1005,6 +1017,9 @@ const ChatTextArea = forwardRef( ) // Focus the textarea after mode toggle with slight delay setTimeout(() => { + if (isTaskView) { + setInputValue("") + } textAreaRef.current?.focus() }, 100) }, changeModeDelay) @@ -1566,7 +1581,7 @@ const ChatTextArea = forwardRef( /> {!inputValue && selectedImages.length === 0 && selectedFiles.length === 0 && (
- 输入 @ 添加上下文, / 输入命令 & 调用工作流 + 输入 @ 添加上下文, / 输入命令 & 调用工作流, 按住 shift 键拖入文件或图片
)} {(selectedImages.length > 0 || selectedFiles.length > 0) && ( diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 4ddbedc2..a074de2b 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -95,7 +95,14 @@ export const MAX_IMAGES_AND_FILES_PER_MESSAGE = 20 const QUICK_WINS_HISTORY_THRESHOLD = 300 const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryView }: ChatViewProps) => { - const { version, clineMessages: messages, taskHistory, apiConfiguration, telemetrySetting } = useExtensionState() + const { + version, + clineMessages: messages, + taskHistory, + apiConfiguration, + telemetrySetting, + navigateToChat, + } = useExtensionState() const shouldShowQuickWins = false // !taskHistory || taskHistory.length < QUICK_WINS_HISTORY_THRESHOLD //const task = messages.length > 0 ? (messages[0].say === "task" ? messages[0] : undefined) : undefined) : undefined const task = useMemo(() => messages.at(0), [messages]) // leaving this less safe version here since if the first message is not a task, then the extension is in a bad state and needs to be debugged (see Cline.abort) @@ -125,8 +132,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie const [selectedImages, setSelectedImages] = useState([]) const [selectedFiles, setSelectedFiles] = useState([]) - // we need to hold on to the ask because useEffect > lastMessage will always let us know when an ask comes in and handle it, but by the time handleMessage is called, the last message might not be the ask anymore (it could be a say that followed) - const [clineAsk, setClineAsk] = useState(undefined) const [enableButtons, setEnableButtons] = useState(false) const [primaryButtonText, setPrimaryButtonText] = useState("Approve") const [secondaryButtonText, setSecondaryButtonText] = useState("Reject") @@ -139,6 +144,14 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie const [isAtBottom, setIsAtBottom] = useState(false) const [pendingScrollToMessage, setPendingScrollToMessage] = useState(null) + // UI layout depends on the last 2 messages + // (since it relies on the content of these messages, we are deep comparing. i.e. the button state after hitting button sets enableButtons to false, and this effect otherwise would have to true again even if messages didn't change + const lastMessage = useMemo(() => messages.at(-1), [messages]) + const secondLastMessage = useMemo(() => messages.at(-2), [messages]) + + // Derive clineAsk directly from lastMessage to avoid race conditions + const clineAsk = useMemo(() => (lastMessage?.type === "ask" ? lastMessage.ask : undefined), [lastMessage]) + useEffect(() => { const handleCopy = async (e: ClipboardEvent) => { const targetElement = e.target as HTMLElement | null @@ -225,11 +238,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie document.removeEventListener("copy", handleCopy) } }, []) - - // UI layout depends on the last 2 messages - // (since it relies on the content of these messages, we are deep comparing. i.e. the button state after hitting button sets enableButtons to false, and this effect otherwise would have to true again even if messages didn't change - const lastMessage = useMemo(() => messages.at(-1), [messages]) - const secondLastMessage = useMemo(() => messages.at(-2), [messages]) useDeepCompareEffect(() => { // if last message is an ask, show user ask UI // if user finished a task, then start a new task with a new conversation history since in this moment that the extension is waiting for user response, the user could close the extension and the conversation history would be lost. @@ -241,42 +249,36 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie switch (lastMessage.ask) { case "api_req_failed": setSendingDisabled(true) - setClineAsk("api_req_failed") setEnableButtons(true) setPrimaryButtonText("重试") setSecondaryButtonText("开始新任务") break case "mistake_limit_reached": setSendingDisabled(false) - setClineAsk("mistake_limit_reached") setEnableButtons(true) setPrimaryButtonText("总是继续") setSecondaryButtonText("开始新任务") break case "auto_approval_max_req_reached": setSendingDisabled(true) - setClineAsk("auto_approval_max_req_reached") setEnableButtons(true) setPrimaryButtonText("继续") setSecondaryButtonText("开始新任务") break case "followup": setSendingDisabled(isPartial) - setClineAsk("followup") setEnableButtons(false) // setPrimaryButtonText(undefined) // setSecondaryButtonText(undefined) break case "plan_mode_respond": setSendingDisabled(isPartial) - setClineAsk("plan_mode_respond") setEnableButtons(false) // setPrimaryButtonText(undefined) // setSecondaryButtonText(undefined) break case "tool": setSendingDisabled(isPartial) - setClineAsk("tool") setEnableButtons(!isPartial) const tool = JSON.parse(lastMessage.text || "{}") as ClineSayTool switch (tool.tool) { @@ -293,28 +295,24 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break case "browser_action_launch": setSendingDisabled(isPartial) - setClineAsk("browser_action_launch") setEnableButtons(!isPartial) setPrimaryButtonText("批准") setSecondaryButtonText("拒绝") break case "command": setSendingDisabled(isPartial) - setClineAsk("command") setEnableButtons(!isPartial) setPrimaryButtonText("执行") setSecondaryButtonText("拒绝") break case "command_output": setSendingDisabled(false) - setClineAsk("command_output") setEnableButtons(true) setPrimaryButtonText("运行中处理") setSecondaryButtonText(undefined) break case "use_mcp_server": setSendingDisabled(isPartial) - setClineAsk("use_mcp_server") setEnableButtons(!isPartial) setPrimaryButtonText("批准") setSecondaryButtonText("拒绝") @@ -322,14 +320,12 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie case "completion_result": // extension waiting for feedback. but we can just present a new task button setSendingDisabled(isPartial) - setClineAsk("completion_result") setEnableButtons(!isPartial) setPrimaryButtonText("开始新任务") setSecondaryButtonText(undefined) break case "resume_task": setSendingDisabled(false) - setClineAsk("resume_task") setEnableButtons(true) setPrimaryButtonText("重启任务") setSecondaryButtonText(undefined) @@ -337,7 +333,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break case "resume_completed_task": setSendingDisabled(false) - setClineAsk("resume_completed_task") setEnableButtons(true) setPrimaryButtonText("开始新任务") setSecondaryButtonText(undefined) @@ -345,21 +340,18 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break case "new_task": setSendingDisabled(isPartial) - setClineAsk("new_task") setEnableButtons(!isPartial) setPrimaryButtonText("带上下文开始新任务") setSecondaryButtonText(undefined) break case "condense": setSendingDisabled(isPartial) - setClineAsk("condense") setEnableButtons(!isPartial) setPrimaryButtonText("Condense Conversation") setSecondaryButtonText(undefined) break case "report_bug": setSendingDisabled(isPartial) - setClineAsk("report_bug") setEnableButtons(!isPartial) setPrimaryButtonText("Report GitHub issue") setSecondaryButtonText(undefined) @@ -376,7 +368,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie setSendingDisabled(true) setSelectedImages([]) setSelectedFiles([]) - setClineAsk(undefined) setEnableButtons(false) } break @@ -412,7 +403,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie useEffect(() => { if (messages.length === 0) { setSendingDisabled(false) - setClineAsk(undefined) setEnableButtons(false) setPrimaryButtonText("批准") setSecondaryButtonText("拒绝") @@ -497,7 +487,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie setSendingDisabled(true) setSelectedImages([]) setSelectedFiles([]) - setClineAsk(undefined) setEnableButtons(false) // setPrimaryButtonText(undefined) // setSecondaryButtonText(undefined) @@ -577,7 +566,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break } setSendingDisabled(true) - setClineAsk(undefined) setEnableButtons(false) // setPrimaryButtonText(undefined) // setSecondaryButtonText(undefined) @@ -630,7 +618,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break } setSendingDisabled(true) - setClineAsk(undefined) setEnableButtons(false) // setPrimaryButtonText(undefined) // setSecondaryButtonText(undefined) @@ -688,32 +675,21 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie const shouldDisableFilesAndImages = selectedImages.length + selectedFiles.length >= MAX_IMAGES_AND_FILES_PER_MESSAGE - const handleMessage = useCallback( - (e: MessageEvent) => { - const message: ExtensionMessage = e.data - switch (message.type) { - case "action": - switch (message.action!) { - case "didBecomeVisible": - if (!isHidden && !sendingDisabled && !enableButtons) { - textAreaRef.current?.focus() - } - break - case "focusChatInput": - textAreaRef.current?.focus() - if (isHidden) { - window.dispatchEvent(new CustomEvent("chatButtonClicked")) - } - break - } - break + // Listen for local focusChatInput event + useEffect(() => { + const handleFocusChatInput = () => { + if (isHidden) { + navigateToChat() } - // textAreaRef.current is not explicitly required here since react guarantees that ref will be stable across re-renders, and we're not using its value but its reference. - }, - [isHidden, sendingDisabled, enableButtons, handleSendMessage, handlePrimaryButtonClick, handleSecondaryButtonClick], - ) + textAreaRef.current?.focus() + } - useEvent("message", handleMessage) + window.addEventListener("focusChatInput", handleFocusChatInput) + + return () => { + window.removeEventListener("focusChatInput", handleFocusChatInput) + } + }, [isHidden]) // Set up addToInput subscription useEffect(() => { @@ -1289,6 +1265,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie scrollToBottomAuto() } }} + isTaskView={!!task} />
) diff --git a/webview-ui/src/components/chat/auto-approve-menu/AutoApproveMenuItem.tsx b/webview-ui/src/components/chat/auto-approve-menu/AutoApproveMenuItem.tsx index 52a8a274..ef6acbd0 100644 --- a/webview-ui/src/components/chat/auto-approve-menu/AutoApproveMenuItem.tsx +++ b/webview-ui/src/components/chat/auto-approve-menu/AutoApproveMenuItem.tsx @@ -94,25 +94,27 @@ const AutoApproveMenuItem = ({
+ {onToggleFavorite && !condensed && ( + + { + e.stopPropagation() + if (action.id === "enableAll") return + await onToggleFavorite?.(action.id) + }} + /> + + )} {showIcon && } {condensed ? action.shortName : action.label}
- {onToggleFavorite && !condensed && ( - - { - e.stopPropagation() - if (action.id === "enableAll") return - await onToggleFavorite?.(action.id) - }} - /> - - )}
diff --git a/webview-ui/src/components/chat/task-header/TaskHeader.tsx b/webview-ui/src/components/chat/task-header/TaskHeader.tsx index 9a0f0b2e..79c3c9cb 100644 --- a/webview-ui/src/components/chat/task-header/TaskHeader.tsx +++ b/webview-ui/src/components/chat/task-header/TaskHeader.tsx @@ -16,7 +16,7 @@ import DeleteTaskButton from "./buttons/DeleteTaskButton" import CopyTaskButton from "./buttons/CopyTaskButton" import OpenDiskTaskHistoryButton from "./buttons/OpenDiskTaskHistoryButton" -const { IS_DEV } = process.env +const IS_DEV = process.env.IS_DEV interface TaskHeaderProps { task: ClineMessage @@ -286,7 +286,11 @@ const TaskHeader: React.FC = ({ ${totalCost?.toFixed(4)}
)} - +
diff --git a/webview-ui/src/components/chat/task-header/buttons/DeleteTaskButton.tsx b/webview-ui/src/components/chat/task-header/buttons/DeleteTaskButton.tsx index 59a4f513..d296af25 100644 --- a/webview-ui/src/components/chat/task-header/buttons/DeleteTaskButton.tsx +++ b/webview-ui/src/components/chat/task-header/buttons/DeleteTaskButton.tsx @@ -11,6 +11,7 @@ const DeleteTaskButton: React.FC<{ taskId && TaskServiceClient.deleteTasksWithIds(StringArrayRequest.create({ value: [taskId] }))} + aria-label="Delete task" style={{ padding: "0px 0px" }}>
(null) - const tooltipRef = useRef(null) const { onRelinquishControl } = useExtensionState() + // Debounce + const closeMenuTimeoutRef = useRef(null) + const scheduleCloseRestore = useCallback(() => { + if (closeMenuTimeoutRef.current) { + clearTimeout(closeMenuTimeoutRef.current) + } + closeMenuTimeoutRef.current = setTimeout(() => { + setShowRestoreConfirm(false) + }, 350) + }, []) + + const cancelCloseRestore = useCallback(() => { + if (closeMenuTimeoutRef.current) { + clearTimeout(closeMenuTimeoutRef.current) + closeMenuTimeoutRef.current = null + } + }, []) + + // Debounce cleanup + useEffect(() => { + return () => { + if (closeMenuTimeoutRef.current) { + clearTimeout(closeMenuTimeoutRef.current) + closeMenuTimeoutRef.current = null + } + } + }, [showRestoreConfirm]) + + // Clear "Restore Files" button when checkpoint is no longer checked out + useEffect(() => { + if (!isCheckpointCheckedOut && restoreWorkspaceDisabled) { + setRestoreWorkspaceDisabled(false) + } + }, [isCheckpointCheckedOut, restoreWorkspaceDisabled]) + const { refs, floatingStyles, update, placement } = useFloating({ placement: "bottom-end", middleware: [ @@ -112,38 +144,27 @@ export const CheckmarkControl = ({ messageTs, isCheckpointCheckedOut }: Checkmar } const handleMouseEnter = () => { - setHasMouseEntered(true) + cancelCloseRestore() } const handleMouseLeave = () => { - if (hasMouseEntered) { - setShowRestoreConfirm(false) - setHasMouseEntered(false) - } + scheduleCloseRestore() } - const handleControlsMouseLeave = (e: React.MouseEvent) => { - const tooltipElement = tooltipRef.current + const handleControlsMouseEnter = () => { + cancelCloseRestore() + } - if (tooltipElement && showRestoreConfirm) { - const tooltipRect = tooltipElement.getBoundingClientRect() - - if ( - e.clientY >= tooltipRect.top && - e.clientY <= tooltipRect.bottom && - e.clientX >= tooltipRect.left && - e.clientX <= tooltipRect.right - ) { - return - } - } - - setShowRestoreConfirm(false) - setHasMouseEntered(false) + const handleControlsMouseLeave = () => { + scheduleCloseRestore() } return ( - + @@ -313,9 +334,9 @@ const CustomButton = styled.button<{ disabled?: boolean; isActive?: boolean; $is props.isActive || props.disabled ? "none" : `linear-gradient(to right, ${props.$isCheckedOut ? "var(--vscode-textLink-foreground)" : "var(--vscode-descriptionForeground)"} 50%, transparent 50%), - linear-gradient(to bottom, ${props.$isCheckedOut ? "var(--vscode-textLink-foreground)" : "var(--vscode-descriptionForeground)"} 50%, transparent 50%), - linear-gradient(to right, ${props.$isCheckedOut ? "var(--vscode-textLink-foreground)" : "var(--vscode-descriptionForeground)"} 50%, transparent 50%), - linear-gradient(to bottom, ${props.$isCheckedOut ? "var(--vscode-textLink-foreground)" : "var(--vscode-descriptionForeground)"} 50%, transparent 50%)`}; + linear-gradient(to bottom, ${props.$isCheckedOut ? "var(--vscode-textLink-foreground)" : "var(--vscode-descriptionForeground)"} 50%, transparent 50%), + linear-gradient(to right, ${props.$isCheckedOut ? "var(--vscode-textLink-foreground)" : "var(--vscode-descriptionForeground)"} 50%, transparent 50%), + linear-gradient(to bottom, ${props.$isCheckedOut ? "var(--vscode-textLink-foreground)" : "var(--vscode-descriptionForeground)"} 50%, transparent 50%)`}; background-size: ${(props) => (props.isActive || props.disabled ? "auto" : `4px 1px, 1px 4px, 4px 1px, 1px 4px`)}; background-repeat: repeat-x, repeat-y, repeat-x, repeat-y; background-position: diff --git a/webview-ui/src/components/common/CopyButton.tsx b/webview-ui/src/components/common/CopyButton.tsx new file mode 100644 index 00000000..ddacd515 --- /dev/null +++ b/webview-ui/src/components/common/CopyButton.tsx @@ -0,0 +1,138 @@ +import React, { useState, useRef, forwardRef } from "react" +import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" +import styled from "styled-components" + +// ======== Interfaces ======== + +interface CopyButtonProps { + textToCopy?: string + onCopy?: () => string | void | null + className?: string + ariaLabel?: string +} + +interface WithCopyButtonProps { + children: React.ReactNode + textToCopy?: string + onCopy?: () => string | void | null + position?: "top-right" | "bottom-right" + style?: React.CSSProperties + className?: string + onMouseUp?: (event: React.MouseEvent) => void + ariaLabel?: string +} + +// ======== Styled Components ======== + +const StyledButton = styled(VSCodeButton)` + z-index: 1; +` + +// Unified container component +const ContentContainer = styled.div` + position: relative; +` + +// Unified button container with flexible positioning +const ButtonContainer = styled.div<{ $position?: "top-right" | "bottom-right" }>` + position: absolute; + ${(props) => { + switch (props.$position) { + case "bottom-right": + return "bottom: 2px; right: 2px;" + case "top-right": + default: + return "top: 5px; right: 5px;" + } + }} + z-index: 1; + opacity: 0; + + ${ContentContainer}:hover & { + opacity: 1; + } +` + +// ======== Component Implementations ======== + +/** + * Base copy button component with clipboard functionality + */ +export const CopyButton: React.FC = ({ textToCopy, onCopy, className = "", ariaLabel }) => { + const [copied, setCopied] = useState(false) + + const handleCopy = () => { + if (!textToCopy && !onCopy) return + + let textToCopyFinal = textToCopy + + if (onCopy) { + const result = onCopy() + if (typeof result === "string") { + textToCopyFinal = result + } + } + + if (textToCopyFinal) { + navigator.clipboard + .writeText(textToCopyFinal) + .then(() => { + setCopied(true) + setTimeout(() => setCopied(false), 1500) + }) + .catch((err) => console.error("Copy failed", err)) + } + } + + return ( + + + + ) +} + +/** + * Container component that wraps content with a copy button + */ +export const WithCopyButton = forwardRef( + ( + { + children, + textToCopy, + onCopy, + position = "top-right", + style, + className, + onMouseUp, + ariaLabel, // Destructure ariaLabel + ...props + }, + ref, + ) => { + return ( + + {children} + {(textToCopy || onCopy) && ( + + + + )} + + ) + }, +) + +// Default export for convenience if needed, though named exports are preferred for clarity +const CopyButtonComponents = { + CopyButton, + WithCopyButton, +} +export default CopyButtonComponents diff --git a/webview-ui/src/components/common/MarkdownBlock.tsx b/webview-ui/src/components/common/MarkdownBlock.tsx index 8117c454..88468182 100644 --- a/webview-ui/src/components/common/MarkdownBlock.tsx +++ b/webview-ui/src/components/common/MarkdownBlock.tsx @@ -1,17 +1,18 @@ -import { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock" -import MermaidBlock from "@/components/common/MermaidBlock" -import { useExtensionState } from "@/context/ExtensionStateContext" -import { StateServiceClient } from "@/services/grpc-client" -import { PlanActMode, TogglePlanActModeRequest } from "@shared/proto/state" -import type { ComponentProps } from "react" import React, { memo, useEffect, useRef, useState } from "react" +import type { ComponentProps } from "react" import { useRemark } from "react-remark" import rehypeHighlight, { Options } from "rehype-highlight" import rehypeKatex from "rehype-katex" import remarkMath from "remark-math" import styled from "styled-components" -import type { Node } from "unist" import { visit } from "unist-util-visit" +import type { Node } from "unist" +import { useExtensionState } from "@/context/ExtensionStateContext" +import CodeBlock, { CODE_BLOCK_BG_COLOR } from "@/components/common/CodeBlock" +import MermaidBlock from "@/components/common/MermaidBlock" +import { WithCopyButton } from "./CopyButton" +import { StateServiceClient } from "@/services/grpc-client" +import { PlanActMode, TogglePlanActModeRequest } from "@shared/proto/state" // Styled component for Act Mode text with more specific styling const ActModeHighlight: React.FC = () => ( @@ -178,24 +179,6 @@ const remarkPreventBoldFilenames = () => { } } -import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" - -const CopyButton = styled(VSCodeButton)` - position: absolute; - top: 5px; - right: 5px; - z-index: 1; - opacity: 0; -` - -const CodeBlockContainer = styled.div` - position: relative; - - &:hover ${CopyButton} { - opacity: 1; - } -` - const StyledMarkdown = styled.div` pre { background-color: ${CODE_BLOCK_BG_COLOR}; @@ -337,7 +320,6 @@ const PreWithCopyButton = ({ ...preProps }: { theme: Record } & React.HTMLAttributes) => { const preRef = useRef(null) - const [copied, setCopied] = useState(false) const handleCopy = () => { if (preRef.current) { @@ -345,22 +327,19 @@ const PreWithCopyButton = ({ const textToCopy = codeElement ? codeElement.textContent : preRef.current.textContent if (!textToCopy) return - navigator.clipboard.writeText(textToCopy).then(() => { - setCopied(true) - setTimeout(() => setCopied(false), 1500) - }) + return textToCopy } + return null } + const styledPreProps = theme ? { ...preProps, theme } : preProps + return ( - - - - - + + {children} - + ) } diff --git a/webview-ui/src/components/history/HistoryPreview.tsx b/webview-ui/src/components/history/HistoryPreview.tsx index 40a2b20c..906c8ab5 100644 --- a/webview-ui/src/components/history/HistoryPreview.tsx +++ b/webview-ui/src/components/history/HistoryPreview.tsx @@ -39,66 +39,19 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { } return ( -
- - +
+ className="flex items-center gap-2 mx-5 my-2 cursor-pointer select-none text-[var(--vscode-descriptionForeground)] hover:opacity-80 transition-all duration-200 rounded-lg px-2 py-1 hover:bg-[var(--vscode-toolbar-hoverBackground)]" + onClick={toggleExpanded}> - - - 近期任务 - + className={`codicon codicon-chevron-${isExpanded ? "down" : "right"} scale-90 transition-transform duration-200`} + /> + + Recent Tasks
{isExpanded && ( -
+
{taskHistory.filter((item) => item.ts && item.task).length > 0 ? ( <> {taskHistory @@ -107,61 +60,58 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { .map((item) => (
handleHistorySelect(item.id)}> -
-
- + {/* Subtle gradient overlay for extra depth */} +
+ + {item.isFavorited && ( +
+ +
+ )} + +
+
+ {formatDate(item.ts, "zh-CN")}
- {item.isFavorited && ( -
- -
- )}
+ className="text-[var(--vscode-descriptionForeground)] mb-2 line-clamp-3 whitespace-pre-wrap break-words" + style={{ fontSize: "var(--vscode-font-size)" }}> {item.task}
-
+ +
Tokens: ↑{formatLargeNumber(item.tokensIn || 0)} ↓ {formatLargeNumber(item.tokensOut || 0)} {!!item.cacheWrites && ( <> - {" • "} + + • + 缓存: +{formatLargeNumber(item.cacheWrites || 0)} →{" "} {formatLargeNumber(item.cacheReads || 0)} @@ -170,7 +120,12 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { )} {!!item.totalCost && ( <> - {" • "} + + • + API 费用: ${item.totalCost?.toFixed(4)} )} @@ -178,35 +133,27 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
))} -
- +
) : (
最近没有任务
diff --git a/webview-ui/src/components/mcp/chat-display/McpResponseDisplay.tsx b/webview-ui/src/components/mcp/chat-display/McpResponseDisplay.tsx index 755451b0..05885e17 100644 --- a/webview-ui/src/components/mcp/chat-display/McpResponseDisplay.tsx +++ b/webview-ui/src/components/mcp/chat-display/McpResponseDisplay.tsx @@ -117,36 +117,19 @@ interface UrlMatch { } const McpResponseDisplay: React.FC = ({ responseText }) => { - const { mcpResponsesCollapsed } = useExtensionState() // Get setting from context + const { mcpResponsesCollapsed, mcpRichDisplayEnabled } = useExtensionState() // Get setting from context const [isExpanded, setIsExpanded] = useState(!mcpResponsesCollapsed) // Initialize with context setting const [isLoading, setIsLoading] = useState(false) // Initial loading state for rich content const [displayMode, setDisplayMode] = useState<"rich" | "plain">(() => { - // Get saved preference from localStorage, default to 'rich' - const savedMode = localStorage.getItem("mcpDisplayMode") - return savedMode === "plain" ? "plain" : "rich" + // Initialize directly from the global setting. + return mcpRichDisplayEnabled ? "rich" : "plain" }) const [urlMatches, setUrlMatches] = useState([]) const [error, setError] = useState(null) - // Add a counter state for forcing re-renders to make toggling run smoother - const [forceUpdateCounter, setForceUpdateCounter] = useState(0) const toggleDisplayMode = useCallback(() => { - const newMode = displayMode === "rich" ? "plain" : "rich" - // Force an immediate re-render - setForceUpdateCounter((prev) => prev + 1) - // Update display mode and save preference - setDisplayMode(newMode) - localStorage.setItem("mcpDisplayMode", newMode) - // If switching to plain mode, cancel any ongoing processing - if (newMode === "plain") { - console.log("Switching to plain mode - cancelling URL processing") - setUrlMatches([]) // Clear any existing matches when switching to plain mode - } else { - // If switching to rich mode, the useEffect will re-run and fetch data - console.log("Switching to rich mode - will start URL processing") - setUrlMatches([]) - } - }, [displayMode]) + setDisplayMode((prevMode) => (prevMode === "rich" ? "plain" : "rich")) + }, []) const toggleExpand = useCallback(() => { setIsExpanded((prev) => !prev) @@ -155,14 +138,16 @@ const McpResponseDisplay: React.FC = ({ responseText }) // Effect to update isExpanded if mcpResponsesCollapsed changes from context useEffect(() => { setIsExpanded(!mcpResponsesCollapsed) - }, []) + }, [mcpResponsesCollapsed]) // Find all URLs in the text and determine if they're images useEffect(() => { // Skip all processing if in plain mode if (!isExpanded || displayMode === "plain") { setIsLoading(false) - setUrlMatches([]) // Clear any existing matches when in plain mode + if (urlMatches.length > 0) { + setUrlMatches([]) // Clear any existing matches when in plain mode + } return } @@ -280,7 +265,7 @@ const McpResponseDisplay: React.FC = ({ responseText }) processingCanceled = true console.log("Cleaning up URL processing") } - }, [responseText, displayMode, forceUpdateCounter, isExpanded]) + }, [responseText, displayMode, isExpanded]) // Function to render content based on display mode const renderContent = () => { diff --git a/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx b/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx index 2a6900b4..8f38a29e 100644 --- a/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx +++ b/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx @@ -2,6 +2,7 @@ import { LINKS } from "@/constants" import { useExtensionState } from "@/context/ExtensionStateContext" import { McpServiceClient } from "@/services/grpc-client" import { convertProtoMcpServersToMcpServers } from "@shared/proto-conversions/mcp/mcp-server-conversion" +import { McpServers } from "@shared/proto/mcp" import { EmptyRequest } from "@shared/proto/common" import { AddRemoteMcpServerRequest } from "@shared/proto/mcp" import { VSCodeButton, VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react" @@ -40,7 +41,7 @@ const AddRemoteServerForm = ({ onServerAdded }: { onServerAdded: () => void }) = setShowConnectingMessage(true) try { - const servers = await McpServiceClient.addRemoteMcpServer( + const servers: McpServers = await McpServiceClient.addRemoteMcpServer( AddRemoteMcpServerRequest.create({ serverName: serverName.trim(), serverUrl: serverUrl.trim(), @@ -49,7 +50,7 @@ const AddRemoteServerForm = ({ onServerAdded }: { onServerAdded: () => void }) = setIsSubmitting(false) - const mcpServers = convertProtoMcpServersToMcpServers(servers) + const mcpServers = convertProtoMcpServersToMcpServers(servers.mcpServers) setMcpServers(mcpServers) setServerName("") diff --git a/webview-ui/src/components/mcp/configuration/tabs/marketplace/McpMarketplaceView.tsx b/webview-ui/src/components/mcp/configuration/tabs/marketplace/McpMarketplaceView.tsx index e46673c1..90f8142e 100644 --- a/webview-ui/src/components/mcp/configuration/tabs/marketplace/McpMarketplaceView.tsx +++ b/webview-ui/src/components/mcp/configuration/tabs/marketplace/McpMarketplaceView.tsx @@ -20,7 +20,7 @@ const McpMarketplaceView = () => { const [isRefreshing, setIsRefreshing] = useState(false) const [searchQuery, setSearchQuery] = useState("") const [selectedCategory, setSelectedCategory] = useState(null) - const [sortBy, setSortBy] = useState<"newest" | "stars" | "name" | "downloadCount">("downloadCount") + const [sortBy, setSortBy] = useState<"newest" | "stars" | "name" | "downloadCount">("newest") const items = mcpMarketplaceCatalog?.items || [] diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index efd162ec..9e788217 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -16,6 +16,8 @@ import { bedrockModels, cerebrasDefaultModelId, cerebrasModels, + claudeCodeDefaultModelId, + claudeCodeModels, deepSeekDefaultModelId, deepSeekModels, doubaoDefaultModelId, @@ -48,9 +50,12 @@ import { xaiModels, shengSuanYunDefaultModelId, shengSuanYunDefaultModelInfo, + sapAiCoreDefaultModelId, + sapAiCoreModels, } from "@shared/api" import { EmptyRequest, StringRequest } from "@shared/proto/common" -import { OpenAiModelsRequest } from "@shared/proto/models" +import { OpenAiModelsRequest, UpdateApiConfigurationRequest } from "@shared/proto/models" +import { convertApiConfigurationToProto } from "@shared/proto-conversions/models/api-configuration-conversion" import { VSCodeButton, VSCodeCheckbox, @@ -73,6 +78,7 @@ import OpenRouterModelPicker, { ModelDescriptionMarkdown, OPENROUTER_MODEL_PICKE import RequestyModelPicker from "./RequestyModelPicker" import ThinkingBudgetSlider from "./ThinkingBudgetSlider" import ShengSuanYunModelPicker from "./ShengSuanYunModelPicker" +import { ExtensionMessage } from "@shared/ExtensionMessage" interface ApiOptionsProps { showModelOptions: boolean @@ -122,7 +128,14 @@ const OpenRouterBalanceDisplay = ({ apiKey }: { apiKey: string }) => { const SUPPORTED_THINKING_MODELS: Record = { anthropic: ["claude-3-7-sonnet-20250219", "claude-sonnet-4-20250514", "claude-opus-4-20250514"], - vertex: ["claude-3-7-sonnet@20250219", "claude-sonnet-4@20250514", "claude-opus-4@20250514"], + vertex: [ + "claude-3-7-sonnet@20250219", + "claude-sonnet-4@20250514", + "claude-opus-4@20250514", + "gemini-2.5-flash-preview-05-20", + "gemini-2.5-flash-preview-04-17", + "gemini-2.5-pro-preview-06-05", + ], qwen: [ "qwen3-235b-a22b", "qwen3-32b", @@ -135,6 +148,7 @@ const SUPPORTED_THINKING_MODELS: Record = { "qwen-plus-latest", "qwen-turbo-latest", ], + gemini: ["gemini-2.5-flash-preview-05-20", "gemini-2.5-flash-preview-04-17", "gemini-2.5-pro-preview-06-05"], } // This is necessary to ensure dropdown opens downward, important for when this is used in popup @@ -196,12 +210,19 @@ const ApiOptions = ({ if (saveImmediately && field === "apiProvider") { // Use apiConfiguration from the full extensionState context to send the most complete data const currentFullApiConfig = extensionState.apiConfiguration - vscode.postMessage({ - type: "apiConfiguration", - apiConfiguration: { - ...currentFullApiConfig, // Send the most complete config available - apiProvider: newValue, // Override with the new provider - }, + + // Convert to proto format and send via gRPC + const updatedConfig = { + ...currentFullApiConfig, + apiProvider: newValue, + } + const protoConfig = convertApiConfigurationToProto(updatedConfig) + ModelsServiceClient.updateApiConfigurationProto( + UpdateApiConfigurationRequest.create({ + apiConfiguration: protoConfig, + }), + ).catch((error) => { + console.error("Failed to update API configuration:", error) }) } } @@ -342,6 +363,7 @@ const ApiOptions = ({ Cline OpenRouter Anthropic + Claude Code Amazon Bedrock OpenAI 兼容接口 GCP Vertex AI @@ -360,10 +382,10 @@ const ApiOptions = ({ LiteLLM Nebius AI Studio AskSage - Dify xAI SambaNova Cerebras + SAP AI Core @@ -463,6 +485,27 @@ const ApiOptions = ({
)} + {selectedProvider === "claude-code" && ( +
+ + +

+ Path to the Claude Code CLI. +

+
+ )} + {selectedProvider === "openai-native" && (
)}

- - {/* Add Thinking Budget Slider specifically for gemini-2.5-flash-preview-04-17 */} - {selectedProvider === "gemini" && selectedModelId === "gemini-2.5-flash-preview-04-17" && ( - - )}
)} @@ -1925,36 +1959,7 @@ const ApiOptions = ({

)} - {selectedProvider === "dify" && ( -
- - Dify API 密钥 - - - Dify 基础 URL - - -

- API 密钥和基础 URL 存储在本地,仅用于从此扩展发出 API 请求。 -

-
- )} {selectedProvider === "nebius" && (
)} + {selectedProvider === "sapaicore" && ( +
+ + AI Core Client Id + + {apiConfiguration?.sapAiCoreClientId && ( +

+ Client Id is set. To change it, please re-enter the value. +

+ )} + + AI Core Client Secret + + {apiConfiguration?.sapAiCoreClientSecret && ( +

+ Client Secret is set. To change it, please re-enter the value. +

+ )} + + AI Core Base URL + + + AI Core Auth URL + + + AI Core Resource Group + +

+ These credentials are stored locally and only used to make API requests from this extension. + + You can find more information about SAP AI Core API access here. + +

+
+ )} + {apiErrorMessage && (

模型 {selectedProvider === "anthropic" && createDropdown(anthropicModels)} + {selectedProvider === "claude-code" && createDropdown(claudeCodeModels)} {selectedProvider === "vertex" && createDropdown(apiConfiguration?.vertexRegion === "global" ? vertexGlobalModels : vertexModels)} {selectedProvider === "gemini" && createDropdown(geminiModels)} @@ -2242,6 +2313,7 @@ const ApiOptions = ({ {selectedProvider === "sambanova" && createDropdown(sambanovaModels)} {selectedProvider === "cerebras" && createDropdown(cerebrasModels)} {selectedProvider === "nebius" && createDropdown(nebiusModels)} + {selectedProvider === "sapaicore" && createDropdown(sapAiCoreModels)} {SUPPORTED_THINKING_MODELS[selectedProvider]?.includes(selectedModelId) && ( @@ -2582,6 +2654,8 @@ export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration): switch (provider) { case "anthropic": return getProviderData(anthropicModels, anthropicDefaultModelId) + case "claude-code": + return getProviderData(claudeCodeModels, claudeCodeDefaultModelId) case "bedrock": if (apiConfiguration?.awsBedrockCustomSelected) { const baseModelId = apiConfiguration.awsBedrockCustomModelBaseId @@ -2624,10 +2698,17 @@ export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration): selectedModelInfo: apiConfiguration?.requestyModelInfo || requestyDefaultModelInfo, } case "cline": + const openRouterModelId = apiConfiguration?.openRouterModelId || openRouterDefaultModelId + const openRouterModelInfo = apiConfiguration?.openRouterModelInfo || openRouterDefaultModelInfo return { selectedProvider: provider, - selectedModelId: apiConfiguration?.openRouterModelId || openRouterDefaultModelId, - selectedModelInfo: apiConfiguration?.openRouterModelInfo || openRouterDefaultModelInfo, + selectedModelId: openRouterModelId, + // TODO: remove this once we have a better way to handle free models on Cline + // Free grok 3 promotion + selectedModelInfo: + openRouterModelId === "x-ai/grok-3" + ? { ...openRouterModelInfo, inputPrice: 0, outputPrice: 0 } + : openRouterModelInfo, } case "openai": return { @@ -2664,12 +2745,6 @@ export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration): selectedModelId: apiConfiguration?.liteLlmModelId || "", selectedModelInfo: apiConfiguration?.liteLlmModelInfo || liteLlmModelInfoSaneDefaults, } - case "dify": - return { - selectedProvider: provider, - selectedModelId: "", - selectedModelInfo: openAiModelInfoSaneDefaults, - } case "xai": return getProviderData(xaiModels, xaiDefaultModelId) case "nebius": @@ -2684,6 +2759,8 @@ export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration): } case "cerebras": return getProviderData(cerebrasModels, cerebrasDefaultModelId) + case "sapaicore": + return getProviderData(sapAiCoreModels, sapAiCoreDefaultModelId) default: return getProviderData(anthropicModels, anthropicDefaultModelId) } diff --git a/webview-ui/src/components/settings/FeatureSettingsSection.tsx b/webview-ui/src/components/settings/FeatureSettingsSection.tsx index 8c6a668e..5d947979 100644 --- a/webview-ui/src/components/settings/FeatureSettingsSection.tsx +++ b/webview-ui/src/components/settings/FeatureSettingsSection.tsx @@ -9,6 +9,8 @@ const FeatureSettingsSection = () => { setEnableCheckpointsSetting, mcpMarketplaceEnabled, setMcpMarketplaceEnabled, + mcpRichDisplayEnabled, + setMcpRichDisplayEnabled, mcpResponsesCollapsed, setMcpResponsesCollapsed, chatSettings, @@ -41,6 +43,19 @@ const FeatureSettingsSection = () => {

启用 MCP 市场选项卡以发现和安装 MCP 服务器。

+
+ { + const checked = e.target.checked === true + setMcpRichDisplayEnabled(checked) + }}> + Enable Rich MCP Display + +

+ Enables rich formatting for MCP responses. When disabled, responses will be shown in plain text. +

+
{ const { apiConfiguration, version, - customInstructions, - setCustomInstructions, openRouterModels, telemetrySetting, setTelemetrySetting, @@ -128,10 +126,16 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { setEnableCheckpointsSetting, mcpMarketplaceEnabled, setMcpMarketplaceEnabled, + mcpRichDisplayEnabled, + setMcpRichDisplayEnabled, shellIntegrationTimeout, setShellIntegrationTimeout, + terminalOutputLineLimit, + setTerminalOutputLineLimit, terminalReuseEnabled, setTerminalReuseEnabled, + defaultTerminalProfile, + setDefaultTerminalProfile, mcpResponsesCollapsed, setMcpResponsesCollapsed, setApiConfiguration, @@ -140,15 +144,17 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { // Store the original state to detect changes const originalState = useRef({ apiConfiguration, - customInstructions, telemetrySetting, planActSeparateModelsSetting, enableCheckpointsSetting, mcpMarketplaceEnabled, + mcpRichDisplayEnabled, mcpResponsesCollapsed, chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + terminalOutputLineLimit, + defaultTerminalProfile, }) const [apiErrorMessage, setApiErrorMessage] = useState(undefined) const [modelIdErrorMessage, setModelIdErrorMessage] = useState(undefined) @@ -163,10 +169,6 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { if (!apiValidationResult && !modelIdValidationResult) { // vscode.postMessage({ type: "apiConfiguration", apiConfiguration }) // vscode.postMessage({ - // type: "customInstructions", - // text: customInstructions, - // }) - // vscode.postMessage({ // type: "telemetrySetting", // text: telemetrySetting, // }) @@ -184,10 +186,10 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { await StateServiceClient.updateSettings( UpdateSettingsRequest.create({ planActSeparateModelsSetting, - customInstructionsSetting: customInstructions, telemetrySetting, enableCheckpointsSetting, mcpMarketplaceEnabled, + mcpRichDisplayEnabled, shellIntegrationTimeout, terminalReuseEnabled, mcpResponsesCollapsed, @@ -195,8 +197,32 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { ? convertApiConfigurationToProtoApiConfiguration(apiConfigurationToSubmit) : undefined, chatSettings: chatSettings ? convertChatSettingsToProtoChatSettings(chatSettings) : undefined, + terminalOutputLineLimit, }), ) + + // Update default terminal profile if it has changed + if (defaultTerminalProfile !== originalState.current.defaultTerminalProfile) { + await StateServiceClient.updateDefaultTerminalProfile({ + value: defaultTerminalProfile || "default", + } as StringRequest) + } + + // Update the original state to reflect the saved changes + originalState.current = { + apiConfiguration, + telemetrySetting, + planActSeparateModelsSetting, + enableCheckpointsSetting, + mcpMarketplaceEnabled, + mcpRichDisplayEnabled, + mcpResponsesCollapsed, + chatSettings, + shellIntegrationTimeout, + terminalReuseEnabled, + terminalOutputLineLimit, + defaultTerminalProfile, + } } catch (error) { console.error("Failed to update settings:", error) } @@ -215,28 +241,33 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { useEffect(() => { const hasChanges = JSON.stringify(apiConfiguration) !== JSON.stringify(originalState.current.apiConfiguration) || - customInstructions !== originalState.current.customInstructions || telemetrySetting !== originalState.current.telemetrySetting || planActSeparateModelsSetting !== originalState.current.planActSeparateModelsSetting || enableCheckpointsSetting !== originalState.current.enableCheckpointsSetting || mcpMarketplaceEnabled !== originalState.current.mcpMarketplaceEnabled || + mcpRichDisplayEnabled !== originalState.current.mcpRichDisplayEnabled || + JSON.stringify(chatSettings) !== JSON.stringify(originalState.current.chatSettings) || mcpResponsesCollapsed !== originalState.current.mcpResponsesCollapsed || JSON.stringify(chatSettings) !== JSON.stringify(originalState.current.chatSettings) || shellIntegrationTimeout !== originalState.current.shellIntegrationTimeout || - terminalReuseEnabled !== originalState.current.terminalReuseEnabled + terminalOutputLineLimit !== originalState.current.terminalOutputLineLimit || + terminalReuseEnabled !== originalState.current.terminalReuseEnabled || + defaultTerminalProfile !== originalState.current.defaultTerminalProfile setHasUnsavedChanges(hasChanges) }, [ apiConfiguration, - customInstructions, telemetrySetting, planActSeparateModelsSetting, enableCheckpointsSetting, mcpMarketplaceEnabled, + mcpRichDisplayEnabled, mcpResponsesCollapsed, chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + terminalOutputLineLimit, + defaultTerminalProfile, ]) // Handle cancel button click @@ -246,7 +277,6 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { setIsUnsavedChangesDialogOpen(true) pendingAction.current = () => { // Reset all tracked state to original values - setCustomInstructions(originalState.current.customInstructions) setTelemetrySetting(originalState.current.telemetrySetting) setPlanActSeparateModelsSetting(originalState.current.planActSeparateModelsSetting) setChatSettings(originalState.current.chatSettings) @@ -267,13 +297,26 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { : false, ) } + if (typeof setMcpRichDisplayEnabled === "function") { + setMcpRichDisplayEnabled( + typeof originalState.current.mcpRichDisplayEnabled === "boolean" + ? originalState.current.mcpRichDisplayEnabled + : true, + ) + } // Reset terminal settings if (typeof setShellIntegrationTimeout === "function") { setShellIntegrationTimeout(originalState.current.shellIntegrationTimeout) } + if (typeof setTerminalOutputLineLimit === "function") { + setTerminalOutputLineLimit(originalState.current.terminalOutputLineLimit) + } if (typeof setTerminalReuseEnabled === "function") { setTerminalReuseEnabled(originalState.current.terminalReuseEnabled ?? true) } + if (typeof setDefaultTerminalProfile === "function") { + setDefaultTerminalProfile(originalState.current.defaultTerminalProfile ?? "default") + } if (typeof setMcpResponsesCollapsed === "function") { setMcpResponsesCollapsed(originalState.current.mcpResponsesCollapsed ?? false) } @@ -287,13 +330,13 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { }, [ hasUnsavedChanges, onDone, - setCustomInstructions, setTelemetrySetting, setPlanActSeparateModelsSetting, setChatSettings, setApiConfiguration, setEnableCheckpointsSetting, setMcpMarketplaceEnabled, + setMcpRichDisplayEnabled, setMcpResponsesCollapsed, ]) @@ -363,9 +406,13 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { useEvent("message", handleMessage) - const handleResetState = async () => { + const handleResetState = async (resetGlobalState?: boolean) => { try { - await StateServiceClient.resetState(EmptyRequest.create({})) + await StateServiceClient.resetState( + ResetStateRequest.create({ + global: resetGlobalState, + }), + ) } catch (error) { console.error("Failed to reset state:", error) } @@ -583,23 +630,6 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { 在计划和行动模式之间切换时,将保留先前模式中使用的API和模型。这可能会很有帮助,例如,当使用强大的推理模型为便宜的编码模型架构计划时,以便进行执行。

- -
- setCustomInstructions(e.target?.value ?? "")}> - 自定义提示词 - -

- 这些指令被添加到每个请求发送的系统提示的末尾。 -

-
)} @@ -680,10 +710,16 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { {renderSectionHeader("debug")}
handleResetState()} className="mt-[5px] w-auto" style={{ backgroundColor: "var(--vscode-errorForeground)", color: "black" }}> - 重置 + 重置工作区状态 + + handleResetState(true)} + className="mt-[5px] w-auto" + style={{ backgroundColor: "var(--vscode-errorForeground)", color: "black" }}> + 重置全局状态

这将重置扩展中的所有全局状态和秘密存储。 diff --git a/webview-ui/src/components/settings/TerminalOutputLineLimitSlider.tsx b/webview-ui/src/components/settings/TerminalOutputLineLimitSlider.tsx new file mode 100644 index 00000000..4215409b --- /dev/null +++ b/webview-ui/src/components/settings/TerminalOutputLineLimitSlider.tsx @@ -0,0 +1,38 @@ +import React from "react" +import { useExtensionState } from "@/context/ExtensionStateContext" + +const TerminalOutputLineLimitSlider: React.FC = () => { + const { terminalOutputLineLimit, setTerminalOutputLineLimit } = useExtensionState() + + const handleSliderChange = (event: React.ChangeEvent) => { + const value = parseInt(event.target.value, 10) + setTerminalOutputLineLimit(value) + } + + return ( +

+ +
+ + {terminalOutputLineLimit ?? 500} +
+

+ Maximum number of lines to include in terminal output when executing commands. When exceeded, lines will be + removed from the middle, saving tokens. +

+
+ ) +} + +export default TerminalOutputLineLimitSlider diff --git a/webview-ui/src/components/settings/TerminalSettingsSection.tsx b/webview-ui/src/components/settings/TerminalSettingsSection.tsx index 6df5fdbe..15cb5121 100644 --- a/webview-ui/src/components/settings/TerminalSettingsSection.tsx +++ b/webview-ui/src/components/settings/TerminalSettingsSection.tsx @@ -1,12 +1,22 @@ -import React, { useState } from "react" -import { VSCodeTextField, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react" +import React, { useState, useEffect } from "react" +import { VSCodeTextField, VSCodeCheckbox, VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react" import { useExtensionState } from "@/context/ExtensionStateContext" -import { StateServiceClient } from "@/services/grpc-client" +import TerminalOutputLineLimitSlider from "./TerminalOutputLineLimitSlider" +import { StateServiceClient } from "../../services/grpc-client" import { Int64, Int64Request } from "@shared/proto/common" export const TerminalSettingsSection: React.FC = () => { - const { shellIntegrationTimeout, setShellIntegrationTimeout, terminalReuseEnabled, setTerminalReuseEnabled } = - useExtensionState() + const { + shellIntegrationTimeout, + setShellIntegrationTimeout, + terminalReuseEnabled, + setTerminalReuseEnabled, + defaultTerminalProfile, + setDefaultTerminalProfile, + availableTerminalProfiles, + platform, + } = useExtensionState() + const [inputValue, setInputValue] = useState((shellIntegrationTimeout / 1000).toString()) const [inputError, setInputError] = useState(null) @@ -23,12 +33,10 @@ export const TerminalSettingsSection: React.FC = () => { } setInputError(null) - const timeout = Math.round(seconds * 1000) // Convert to milliseconds + const timeout = Math.round(seconds * 1000) - // Update local state setShellIntegrationTimeout(timeout) - // Send to extension using gRPC StateServiceClient.updateTerminalConnectionTimeout({ value: timeout, } as Int64Request) @@ -42,7 +50,6 @@ export const TerminalSettingsSection: React.FC = () => { } const handleInputBlur = () => { - // If there was an error, reset the input to the current valid value if (inputError) { setInputValue((shellIntegrationTimeout / 1000).toString()) setInputError(null) @@ -52,16 +59,44 @@ export const TerminalSettingsSection: React.FC = () => { const handleTerminalReuseChange = (event: Event) => { const target = event.target as HTMLInputElement const checked = target.checked - - // Update local state setTerminalReuseEnabled(checked) - - // TODO: Send to extension using gRPC when the backend is ready - // For now, we'll just update the local state + StateServiceClient.updateTerminalReuseEnabled({ value: checked } as any).catch((error) => { + console.error("Failed to update terminal reuse enabled:", error) + }) } + // Use any to avoid type conflicts between Event and FormEvent + const handleDefaultTerminalProfileChange = (event: any) => { + const target = event.target as HTMLSelectElement + const profileId = target.value + // Only update the local state, let the Save button handle the backend update + setDefaultTerminalProfile(profileId) + } + + const profilesToShow = availableTerminalProfiles + return (
+
+ + + {profilesToShow.map((profile) => ( + + {profile.name} + + ))} + +

+ Select the default terminal Cline will use. 'Default' uses your VSCode global setting. +

+
+
@@ -95,6 +130,7 @@ export const TerminalSettingsSection: React.FC = () => { 启用后,Cline 将重用不在当前工作目录中的现有终端窗口。如果您在执行终端命令后遇到任务锁定问题,请禁用此功能。

+
) } diff --git a/webview-ui/src/components/welcome/WelcomeView.tsx b/webview-ui/src/components/welcome/WelcomeView.tsx index f106d8a7..5b1a69f0 100644 --- a/webview-ui/src/components/welcome/WelcomeView.tsx +++ b/webview-ui/src/components/welcome/WelcomeView.tsx @@ -5,7 +5,10 @@ import { validateApiConfiguration } from "@/utils/validate" import { vscode } from "@/utils/vscode" import ApiOptions from "@/components/settings/ApiOptions" import ClineLogoWhite from "@/assets/ClineLogoWhite" -import { AccountServiceClient } from "@/services/grpc-client" +import { AccountServiceClient, ModelsServiceClient } from "@/services/grpc-client" +import { EmptyRequest } from "@shared/proto/common" +import { UpdateApiConfigurationRequest } from "@shared/proto/models" +import { convertApiConfigurationToProto } from "@shared/proto-conversions/models/api-configuration-conversion" const WelcomeView = memo(() => { const { apiConfiguration } = useExtensionState() @@ -18,8 +21,18 @@ const WelcomeView = memo(() => { vscode.postMessage({ type: "accountLoginClickedSSY" }) } - const handleSubmit = () => { - vscode.postMessage({ type: "apiConfiguration", apiConfiguration }) + const handleSubmit = async () => { + if (apiConfiguration) { + try { + await ModelsServiceClient.updateApiConfigurationProto( + UpdateApiConfigurationRequest.create({ + apiConfiguration: convertApiConfigurationToProto(apiConfiguration), + }), + ) + } catch (error) { + console.error("Failed to update API configuration:", error) + } + } } useEffect(() => { diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index cf4ea501..95743fea 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -7,10 +7,12 @@ import { FileServiceClient, McpServiceClient, } from "../services/grpc-client" -import { EmptyRequest } from "@shared/proto/common" +import { EmptyRequest, StringRequest } from "@shared/proto/common" import { UpdateSettingsRequest } from "@shared/proto/state" import { WebviewProviderType as WebviewProviderTypeEnum, WebviewProviderTypeRequest } from "@shared/proto/ui" +import { TerminalProfile } from "@shared/proto/state" import { convertProtoToClineMessage } from "@shared/proto-conversions/cline-message" +import { convertProtoMcpServersToMcpServers } from "@shared/proto-conversions/mcp/mcp-server-conversion" import { DEFAULT_AUTO_APPROVAL_SETTINGS } from "@shared/AutoApprovalSettings" import { DEFAULT_BROWSER_SETTINGS } from "@shared/BrowserSettings" import { ChatSettings, DEFAULT_CHAT_SETTINGS } from "@shared/ChatSettings" @@ -28,9 +30,7 @@ import { shengSuanYunDefaultModelInfo, } from "../../../src/shared/api" import { McpMarketplaceCatalog, McpServer, McpViewTab } from "../../../src/shared/mcp" -import { convertProtoMcpServersToMcpServers } from "@shared/proto-conversions/mcp/mcp-server-conversion" import { convertTextMateToHljs } from "../utils/textMateToHljs" -import { vscode } from "../utils/vscode" import { OpenRouterCompatibleModelInfo } from "@shared/proto/models" interface ExtensionStateContextType extends ExtensionState { @@ -45,6 +45,7 @@ interface ExtensionStateContextType extends ExtensionState { mcpMarketplaceCatalog: McpMarketplaceCatalog filePaths: string[] totalTasksSize: number | null + availableTerminalProfiles: TerminalProfile[] // View state showMcp: boolean @@ -56,16 +57,18 @@ interface ExtensionStateContextType extends ExtensionState { // Setters setApiConfiguration: (config: ApiConfiguration) => void - setCustomInstructions: (value?: string) => void setTelemetrySetting: (value: TelemetrySetting) => void setShowAnnouncement: (value: boolean) => void setShouldShowAnnouncement: (value: boolean) => void setPlanActSeparateModelsSetting: (value: boolean) => void setEnableCheckpointsSetting: (value: boolean) => void setMcpMarketplaceEnabled: (value: boolean) => void + setMcpRichDisplayEnabled: (value: boolean) => void setMcpResponsesCollapsed: (value: boolean) => void setShellIntegrationTimeout: (value: number) => void setTerminalReuseEnabled: (value: boolean) => void + setTerminalOutputLineLimit: (value: number) => void + setDefaultTerminalProfile: (value: string) => void setChatSettings: (value: ChatSettings) => void setMcpServers: (value: McpServer[]) => void setGlobalClineRulesToggles: (toggles: Record) => void @@ -76,6 +79,7 @@ interface ExtensionStateContextType extends ExtensionState { setGlobalWorkflowToggles: (toggles: Record) => void setMcpMarketplaceCatalog: (value: McpMarketplaceCatalog) => void setTotalTasksSize: (value: number | null) => void + setAvailableTerminalProfiles: (profiles: TerminalProfile[]) => void // Setter for profiles // Refresh functions refreshOpenRouterModels: () => void @@ -185,14 +189,17 @@ export const ExtensionStateContextProvider: React.FC<{ distinctId: "", planActSeparateModelsSetting: true, enableCheckpointsSetting: true, + mcpRichDisplayEnabled: true, globalClineRulesToggles: {}, localClineRulesToggles: {}, localCursorRulesToggles: {}, localWindsurfRulesToggles: {}, localWorkflowToggles: {}, globalWorkflowToggles: {}, - shellIntegrationTimeout: 4000, // default timeout for shell integration - terminalReuseEnabled: true, // default to enabled for backward compatibility + shellIntegrationTimeout: 4000, + terminalReuseEnabled: true, + terminalOutputLineLimit: 500, + defaultTerminalProfile: "default", isNewUser: false, mcpResponsesCollapsed: false, // Default value (expanded), will be overwritten by extension state }) @@ -204,6 +211,7 @@ export const ExtensionStateContextProvider: React.FC<{ [openRouterDefaultModelId]: openRouterDefaultModelInfo, }) const [totalTasksSize, setTotalTasksSize] = useState(null) + const [availableTerminalProfiles, setAvailableTerminalProfiles] = useState([]) const [openAiModels, setOpenAiModels] = useState([]) const [requestyModels, setRequestyModels] = useState>({ @@ -245,6 +253,9 @@ export const ExtensionStateContextProvider: React.FC<{ // References to store subscription cancellation functions const stateSubscriptionRef = useRef<(() => void) | null>(null) + + // Reference for focusChatInput subscription + const focusChatInputUnsubscribeRef = useRef<(() => void) | null>(null) const mcpButtonUnsubscribeRef = useRef<(() => void) | null>(null) const historyButtonClickedSubscriptionRef = useRef<(() => void) | null>(null) const chatButtonUnsubscribeRef = useRef<(() => void) | null>(null) @@ -268,6 +279,7 @@ export const ExtensionStateContextProvider: React.FC<{ } }, []) const mcpServersSubscriptionRef = useRef<(() => void) | null>(null) + const didBecomeVisibleUnsubscribeRef = useRef<(() => void) | null>(null) // Subscribe to state updates and UI events using the gRPC streaming API useEffect(() => { @@ -321,6 +333,7 @@ export const ExtensionStateContextProvider: React.FC<{ config.xaiApiKey, config.sambanovaApiKey, config.shengSuanYunApiKey, + config.sapAiCoreClientId, ].some((key) => key !== undefined) : false @@ -398,6 +411,18 @@ export const ExtensionStateContextProvider: React.FC<{ onComplete: () => {}, }) + // Subscribe to didBecomeVisible events + didBecomeVisibleUnsubscribeRef.current = UiServiceClient.subscribeToDidBecomeVisible(EmptyRequest.create({}), { + onResponse: () => { + console.log("[DEBUG] Received didBecomeVisible event from gRPC stream") + window.dispatchEvent(new CustomEvent("focusChatInput")) + }, + onError: (error) => { + console.error("Error in didBecomeVisible subscription:", error) + }, + onComplete: () => {}, + }) + // Subscribe to MCP servers updates mcpServersSubscriptionRef.current = McpServiceClient.subscribeToMcpServers(EmptyRequest.create(), { onResponse: (response) => { @@ -555,6 +580,15 @@ export const ExtensionStateContextProvider: React.FC<{ }, }) + // Fetch available terminal profiles on launch + StateServiceClient.getAvailableTerminalProfiles(EmptyRequest.create({})) + .then((response) => { + setAvailableTerminalProfiles(response.profiles) + }) + .catch((error) => { + console.error("Failed to fetch available terminal profiles:", error) + }) + // Subscribe to relinquish control events relinquishControlUnsubscribeRef.current = UiServiceClient.subscribeToRelinquishControl(EmptyRequest.create({}), { onResponse: () => { @@ -567,6 +601,24 @@ export const ExtensionStateContextProvider: React.FC<{ onComplete: () => {}, }) + // Subscribe to focus chat input events + const clientId = (window as any).clineClientId + if (clientId) { + const request = StringRequest.create({ value: clientId }) + focusChatInputUnsubscribeRef.current = UiServiceClient.subscribeToFocusChatInput(request, { + onResponse: () => { + // Dispatch a local DOM event within this webview only + window.dispatchEvent(new CustomEvent("focusChatInput")) + }, + onError: (error: Error) => { + console.error("Error in focusChatInput subscription:", error) + }, + onComplete: () => {}, + }) + } else { + console.error("Client ID not found in window object") + } + // Clean up subscriptions when component unmounts return () => { if (stateSubscriptionRef.current) { @@ -617,11 +669,18 @@ export const ExtensionStateContextProvider: React.FC<{ relinquishControlUnsubscribeRef.current() relinquishControlUnsubscribeRef.current = null } - + if (focusChatInputUnsubscribeRef.current) { + focusChatInputUnsubscribeRef.current() + focusChatInputUnsubscribeRef.current = null + } if (mcpServersSubscriptionRef.current) { mcpServersSubscriptionRef.current() mcpServersSubscriptionRef.current = null } + if (didBecomeVisibleUnsubscribeRef.current) { + didBecomeVisibleUnsubscribeRef.current() + didBecomeVisibleUnsubscribeRef.current = null + } } }, []) @@ -650,6 +709,7 @@ export const ExtensionStateContextProvider: React.FC<{ mcpMarketplaceCatalog, filePaths, totalTasksSize, + availableTerminalProfiles, showMcp, mcpTab, showSettings, @@ -681,11 +741,6 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, apiConfiguration: value, })), - setCustomInstructions: (value) => - setState((prevState) => ({ - ...prevState, - customInstructions: value, - })), setTelemetrySetting: (value) => setState((prevState) => ({ ...prevState, @@ -706,6 +761,11 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, mcpMarketplaceEnabled: value, })), + setMcpRichDisplayEnabled: (value) => + setState((prevState) => ({ + ...prevState, + mcpRichDisplayEnabled: value, + })), setMcpResponsesCollapsed: (value) => { setState((prevState) => ({ ...prevState, @@ -728,8 +788,19 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, terminalReuseEnabled: value, })), + setTerminalOutputLineLimit: (value) => + setState((prevState) => ({ + ...prevState, + terminalOutputLineLimit: value, + })), + setDefaultTerminalProfile: (value) => + setState((prevState) => ({ + ...prevState, + defaultTerminalProfile: value, + })), setMcpServers: (mcpServers: McpServer[]) => setMcpServers(mcpServers), setMcpMarketplaceCatalog: (catalog: McpMarketplaceCatalog) => setMcpMarketplaceCatalog(catalog), + setAvailableTerminalProfiles, setShowMcp, closeMcpView, setChatSettings: async (value) => { @@ -737,7 +808,6 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, chatSettings: value, })) - try { // Import the conversion functions const { convertApiConfigurationToProtoApiConfiguration } = await import( @@ -753,11 +823,11 @@ export const ExtensionStateContextProvider: React.FC<{ apiConfiguration: state.apiConfiguration ? convertApiConfigurationToProtoApiConfiguration(state.apiConfiguration) : undefined, - customInstructionsSetting: state.customInstructions, telemetrySetting: state.telemetrySetting, planActSeparateModelsSetting: state.planActSeparateModelsSetting, enableCheckpointsSetting: state.enableCheckpointsSetting, mcpMarketplaceEnabled: state.mcpMarketplaceEnabled, + mcpRichDisplayEnabled: state.mcpRichDisplayEnabled, mcpResponsesCollapsed: state.mcpResponsesCollapsed, }), ) diff --git a/webview-ui/src/utils/validate.ts b/webview-ui/src/utils/validate.ts index 9189bc92..d28c662a 100644 --- a/webview-ui/src/utils/validate.ts +++ b/webview-ui/src/utils/validate.ts @@ -118,9 +118,18 @@ export function validateApiConfiguration(apiConfiguration?: ApiConfiguration): s return "您必须提供有效的API密钥或选择其他提供者。" } break - case "dify": - if (!apiConfiguration.difyApiKey || !apiConfiguration.difyBaseUrl) { - return "您必须同时提供有效的 API 密钥和基本 URL。" + case "sapaicore": + if (!apiConfiguration.sapAiCoreBaseUrl) { + return "You must provide a valid Base URL key or choose a different provider." + } + if (!apiConfiguration.sapAiCoreClientId) { + return "You must provide a valid Client Id or choose a different provider." + } + if (!apiConfiguration.sapAiCoreClientSecret) { + return "You must provide a valid Client Secret or choose a different provider." + } + if (!apiConfiguration.sapAiCoreTokenUrl) { + return "You must provide a valid Auth URL or choose a different provider." } break }