From c7e8c7da3eb5e95e861cc9b3005657a5dd1b3a55 Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Mon, 9 Jun 2025 13:40:49 -0700 Subject: [PATCH 01/76] Fix failing GitHub action on Windows (#4107) * Use cache builtin to actions/setup-node@4 * Update test.yml npm ci --verbose * Update test.yml * Install local packages on windows * formatting --- .github/workflows/test.yml | 6 ++++++ 1 file changed, 6 insertions(+) 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: | From aaa03a37a4f7bde632ae50bda6577a0ce0dbccd7 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Mon, 9 Jun 2025 15:01:50 -0700 Subject: [PATCH 02/76] Add free grok model (#4115) * Add free grok model * Create khaki-cheetahs-tickle.md * Only change pricing for cline not openrouter provider * Fixes * cost to 0 for x-ai provider --------- Co-authored-by: Cline Evaluation --- .changeset/khaki-cheetahs-tickle.md | 5 +++++ src/api/providers/cline.ts | 12 +++++++++++- webview-ui/src/components/settings/ApiOptions.tsx | 11 +++++++++-- .../components/settings/OpenRouterModelPicker.tsx | 6 +++--- 4 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 .changeset/khaki-cheetahs-tickle.md diff --git a/.changeset/khaki-cheetahs-tickle.md b/.changeset/khaki-cheetahs-tickle.md new file mode 100644 index 00000000..5729ccc7 --- /dev/null +++ b/.changeset/khaki-cheetahs-tickle.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Add free grok model diff --git a/src/api/providers/cline.ts b/src/api/providers/cline.ts index 4c0413df..1dd8a9e1 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 } diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 41b1439a..13584785 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -2569,10 +2569,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-beta" + ? { ...openRouterModelInfo, inputPrice: 0, outputPrice: 0 } + : openRouterModelInfo, } case "openai": return { diff --git a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx index 205657f7..e47e609f 100644 --- a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx +++ b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx @@ -52,9 +52,9 @@ const featuredModels = [ label: "Trending", }, { - id: "openai/gpt-4.1", - description: "1M context window, blazing fast", - label: "New", + id: "x-ai/grok-3-beta", + description: "Latest flagship model from xAI, free for now!", + label: "Free", }, ] From 983d14bdcd7ef12f1febbb7b6230bf5cdb143a9e Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Mon, 9 Jun 2025 16:00:08 -0700 Subject: [PATCH 03/76] Revert #4097 until we have a better solution (#4123) --- src/core/task/index.ts | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/core/task/index.ts b/src/core/task/index.ts index 917075f4..eaa2d081 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -166,7 +166,6 @@ export class Task { checkpointTrackerErrorMessage?: string conversationHistoryDeletedRange?: [number, number] isInitialized = false - private initTaskPromise?: Promise isAwaitingPlanResponse = false didRespondToPlanAskBySwitchingMode = false @@ -298,9 +297,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 @@ -389,10 +388,6 @@ export class Task { } 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) // Find the last message before messageIndex that has a lastCheckpointHash const lastHashIndex = findLastIndex(this.clineMessages.slice(0, messageIndex), (m) => m.lastCheckpointHash !== undefined) @@ -527,10 +522,6 @@ export class Task { } async presentMultifileDiff(messageTs: number, seeNewChangesSinceLastTaskCompletion: boolean) { - if (this.initTaskPromise && !this.isInitialized) { - await this.initTaskPromise - } - const relinquishButton = () => { sendRelinquishControlEvent() } @@ -660,10 +651,6 @@ export class Task { } async doesLatestTaskCompletionHaveNewChanges() { - if (this.initTaskPromise && !this.isInitialized) { - await this.initTaskPromise - } - if (!this.enableCheckpoints) { return false } @@ -1214,10 +1201,6 @@ export class Task { // Checkpoints async saveCheckpoint(isAttemptCompletionMessage: boolean = false) { - if (this.initTaskPromise && !this.isInitialized) { - await this.initTaskPromise - } - if (!this.enableCheckpoints) { // If checkpoints are disabled, do nothing. return From 335086ef3650544a37e1d3cbb4c5c17c2ee8a1b0 Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Mon, 9 Jun 2025 16:01:27 -0700 Subject: [PATCH 04/76] diff edit evals (#4112) * base * multi parallel * function registry * nit * basic prompt * support data 1 * types * types * input format * path name * use helpers * logs * claude4 prompt * handling * evals history * verbose * prints * var * cli base * cli inputs * sqlite * v3 diff apply * thinking tokens * more metrics * nit * new structure * print --- evals/.gitignore | 5 +- evals/cli/package-lock.json | 15 +- evals/cli/package.json | 2 +- evals/cli/src/commands/runDiffEval.ts | 74 ++ evals/cli/src/index.ts | 30 + evals/diff_editing/ClineWrapper.ts | 269 ++++ evals/diff_editing/TestRunner.ts | 375 ++++++ .../diff_editing/diff-apply/diff-06-06-25.ts | 729 +++++++++++ evals/diff_editing/helpers.ts | 25 + .../parse-assistant-message-06-06-25.ts | 1163 +++++++++++++++++ .../prompts/basicSystemPrompt-06-06-25.ts | 615 +++++++++ .../prompts/claude4SystemPrompt-06-06-25.ts | 640 +++++++++ evals/diff_editing/types.ts | 84 ++ 13 files changed, 4017 insertions(+), 9 deletions(-) create mode 100644 evals/cli/src/commands/runDiffEval.ts create mode 100644 evals/diff_editing/ClineWrapper.ts create mode 100644 evals/diff_editing/TestRunner.ts create mode 100644 evals/diff_editing/diff-apply/diff-06-06-25.ts create mode 100644 evals/diff_editing/helpers.ts create mode 100644 evals/diff_editing/parsing/parse-assistant-message-06-06-25.ts create mode 100644 evals/diff_editing/prompts/basicSystemPrompt-06-06-25.ts create mode 100644 evals/diff_editing/prompts/claude4SystemPrompt-06-06-25.ts create mode 100644 evals/diff_editing/types.ts 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..10c83546 --- /dev/null +++ b/evals/cli/src/commands/runDiffEval.ts @@ -0,0 +1,74 @@ +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 +} + +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.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..f0021725 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,35 @@ 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("-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..5f365e9d --- /dev/null +++ b/evals/diff_editing/ClineWrapper.ts @@ -0,0 +1,269 @@ +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 { 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 = { + 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, + } = input + + const requiredParams = { + apiKey, + 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, + }, + } + + const openRouterHandler = new OpenRouterHandler(options) + + // Get the output of streaming output of this llm call + let streamResult: StreamResult + try { + 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..8bab5ef6 --- /dev/null +++ b/evals/diff_editing/TestRunner.ts @@ -0,0 +1,375 @@ +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 + + constructor() { + this.apiKey = process.env.OPENROUTER_API_KEY! + if (!this.apiKey) { + throw new Error("OPENROUTER_API_KEY environment variable not set") + } + } + + /** + * 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 { + 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, + } + + 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("-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), + } + + try { + const startTime = Date.now() + + const runner = new NodeTestRunner() + 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.`) + 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..955fce95 --- /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" = "v2", +): 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..db7dfc10 --- /dev/null +++ b/evals/diff_editing/types.ts @@ -0,0 +1,84 @@ +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 +} + +export interface TestCase { + test_id: string + messages: InputMessage[] + file_contents: string + file_path: string + system_prompt_details: SystemPromptDetails +} + +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 +} + +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 +} From 889ffcade9bf6dc8fe627343756d92c5b4e0b525 Mon Sep 17 00:00:00 2001 From: watany <76135106+watany-dev@users.noreply.github.com> Date: Tue, 10 Jun 2025 08:13:51 +0900 Subject: [PATCH 05/76] fix(bedrock): remove Anthropic-Bedrock SDK (#3800) * fix(bedrock): remove Anthropic-Bedrock SDK * changeset * update * revert * Update src/api/providers/bedrock.ts Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com> * fix * revert * fix testing * fix additionalModelResponseFields.thinkingResponse * fixed! * remove log --------- Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com> --- .changeset/neat-guests-itch.md | 5 + src/api/providers/__tests__/bedrock.test.ts | 449 +++++++++++++ src/api/providers/bedrock.ts | 701 ++++++++++++-------- 3 files changed, 877 insertions(+), 278 deletions(-) create mode 100644 .changeset/neat-guests-itch.md diff --git a/.changeset/neat-guests-itch.md b/.changeset/neat-guests-itch.md new file mode 100644 index 00000000..3d21c943 --- /dev/null +++ b/.changeset/neat-guests-itch.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +fix(bedrock): remove Anthropic-Bedrock SDK diff --git a/src/api/providers/__tests__/bedrock.test.ts b/src/api/providers/__tests__/bedrock.test.ts index 9de25412..defc1972 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,412 @@ describe("AwsBedrockHandler", () => { process.env["AWS_PROFILE"]!.should.equal(preAWSProfile) }) }) + + describe("executeConverseStream", () => { + let handler: AwsBedrockHandler + 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, + } + + 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) + }) + }) + }) }) diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index f70a3323..1052cb74 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,28 @@ 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 + }> + } + } +} + // https://docs.anthropic.com/en/api/claude-on-amazon-bedrock export class AwsBedrockHandler implements ApiHandler { private options: ApiHandlerOptions @@ -46,146 +67,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 } { @@ -276,22 +159,6 @@ 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. @@ -536,126 +403,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 any + 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 any + + // 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 +723,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 any).type}`) return null }) - .filter(Boolean) // Remove any null items + .filter((item): item is ContentBlock => item !== null) + + content = processedContent } // Return formatted message @@ -722,4 +742,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 any)) + } 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 any, // Type assertion needed for AWS SDK compatibility + ] + } + + 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) + } } From 28bc4327b4a3bb04c24c0c245ac24e613a4894df Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 16:31:39 -0700 Subject: [PATCH 06/76] v3.17.12 Release Notes v3.17.12 Release Notes --- .changeset/blue-cobras-allow.md | 5 ----- .changeset/eight-otters-grow.md | 5 ----- .changeset/eleven-monkeys-watch.md | 5 ----- .changeset/giant-cycles-divide.md | 5 ----- .changeset/heavy-bananas-shave.md | 5 ----- .changeset/honest-boats-fix.md | 5 ----- .changeset/khaki-cheetahs-tickle.md | 5 ----- .changeset/purple-islands-move.md | 5 +++++ .changeset/quick-rocks-guess.md | 5 ----- .changeset/rare-ducks-give.md | 5 ----- .changeset/six-rice-end.md | 5 ----- .changeset/smart-ladybugs-give.md | 5 ----- CHANGELOG.md | 9 +++++++++ package-lock.json | 4 ++-- package.json | 2 +- src/api/providers/cline.ts | 5 ++++- src/api/providers/openrouter.ts | 5 ++++- src/core/controller/models/refreshOpenRouterModels.ts | 5 +++++ webview-ui/src/components/settings/ApiOptions.tsx | 2 +- .../src/components/settings/OpenRouterModelPicker.tsx | 2 +- 20 files changed, 32 insertions(+), 62 deletions(-) delete mode 100644 .changeset/blue-cobras-allow.md delete mode 100644 .changeset/eight-otters-grow.md delete mode 100644 .changeset/eleven-monkeys-watch.md delete mode 100644 .changeset/giant-cycles-divide.md delete mode 100644 .changeset/heavy-bananas-shave.md delete mode 100644 .changeset/honest-boats-fix.md delete mode 100644 .changeset/khaki-cheetahs-tickle.md create mode 100644 .changeset/purple-islands-move.md delete mode 100644 .changeset/quick-rocks-guess.md delete mode 100644 .changeset/rare-ducks-give.md delete mode 100644 .changeset/six-rice-end.md delete mode 100644 .changeset/smart-ladybugs-give.md 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/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/khaki-cheetahs-tickle.md b/.changeset/khaki-cheetahs-tickle.md deleted file mode 100644 index 5729ccc7..00000000 --- a/.changeset/khaki-cheetahs-tickle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Add free grok model diff --git a/.changeset/purple-islands-move.md b/.changeset/purple-islands-move.md new file mode 100644 index 00000000..e0670629 --- /dev/null +++ b/.changeset/purple-islands-move.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Remove ‘-beta’ from grok model id 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/CHANGELOG.md b/CHANGELOG.md index d2588772..c7b2593d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [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/package-lock.json b/package-lock.json index f3037683..0fc7cb26 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "3.17.11", + "version": "3.17.12", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "3.17.11", + "version": "3.17.12", "license": "Apache-2.0", "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.12.4", diff --git a/package.json b/package.json index a5f781a6..cd0f57e1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.11", + "version": "3.17.12", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" diff --git a/src/api/providers/cline.ts b/src/api/providers/cline.ts index 1dd8a9e1..2214f645 100644 --- a/src/api/providers/cline.ts +++ b/src/api/providers/cline.ts @@ -134,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/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/core/controller/models/refreshOpenRouterModels.ts b/src/core/controller/models/refreshOpenRouterModels.ts index 80f84e0e..bf15d409 100644 --- a/src/core/controller/models/refreshOpenRouterModels.ts +++ b/src/core/controller/models/refreshOpenRouterModels.ts @@ -117,6 +117,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/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 13584785..148b8468 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -2577,7 +2577,7 @@ export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration): // 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-beta" + openRouterModelId === "x-ai/grok-3" ? { ...openRouterModelInfo, inputPrice: 0, outputPrice: 0 } : openRouterModelInfo, } diff --git a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx index e47e609f..6de83deb 100644 --- a/webview-ui/src/components/settings/OpenRouterModelPicker.tsx +++ b/webview-ui/src/components/settings/OpenRouterModelPicker.tsx @@ -52,7 +52,7 @@ const featuredModels = [ label: "Trending", }, { - id: "x-ai/grok-3-beta", + id: "x-ai/grok-3", description: "Latest flagship model from xAI, free for now!", label: "Free", }, From e9c73770042934a5a2c76033648fb2b0b03a8f88 Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Mon, 9 Jun 2025 19:33:42 -0700 Subject: [PATCH 07/76] Update build scripts to include extension files in the standalone zip. (#4122) Update the standalone vscontext with the extension directory. --- scripts/package-standalone.mjs | 22 ++++++++++++++++++++-- src/standalone/vscode-context.ts | 17 +++++++++++++---- standalone/runtime-files/package.json | 2 +- 3 files changed, 34 insertions(+), 7 deletions(-) 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/standalone/vscode-context.ts b/src/standalone/vscode-context.ts index 2f0acbe6..8549d695 100644 --- a/src/standalone/vscode-context.ts +++ b/src/standalone/vscode-context.ts @@ -1,22 +1,26 @@ 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 } from "vscode" +import { log } from "./utils" import { outputChannel, postMessage } from "./vscode-context-stubs" import { EnvironmentVariableCollection, MementoStore, readJson, SecretStore } from "./vscode-context-utils" -import { log } from "./utils" 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 = { @@ -59,6 +63,11 @@ const extensionContext: ExtensionContext = { workspaceState: new MementoStore(path.join(DATA_DIR, "workspaceState.json")), } +function getPackageVersion(): string { + const packageJson = JSON.parse(readFileSync(join(__dirname, "package.json"), "utf8")) + return packageJson.version +} + console.log("Finished loading vscode context...") export { extensionContext, outputChannel, postMessage } 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", From 02f016c1fd0866a5f8731e9fa531f49861ccee3b Mon Sep 17 00:00:00 2001 From: Dennise Bartlett Date: Mon, 9 Jun 2025 23:03:51 -0700 Subject: [PATCH 08/76] Update Publish workflow to use Tag (#4132) --- .github/workflows/publish.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) 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 From 78be287e67678d56b82c9b86d02fdb79b1777559 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 10 Jun 2025 09:35:35 -0700 Subject: [PATCH 09/76] migrate plan/act state to workspace storage (#4130) --- src/core/controller/index.ts | 80 +++--- src/core/controller/ui/initializeWebview.ts | 4 +- src/core/storage/state-keys.ts | 58 +++-- src/core/storage/state.ts | 254 +++++++++++++------- src/core/task/index.ts | 6 +- src/extension.ts | 4 + src/services/test/TestServer.ts | 10 +- 7 files changed, 250 insertions(+), 166 deletions(-) diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 66468848..75724714 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -114,7 +114,7 @@ export class Controller { try { await storeSecret(this.context, "clineApiKey", undefined) await updateGlobalState(this.context, "userInfo", undefined) - await updateGlobalState(this.context, "apiProvider", "openrouter") + await updateWorkspaceState(this.context, "apiProvider", "openrouter") await this.postStateToWebview() vscode.window.showInformationMessage("Successfully logged out of Cline") } catch (error) { @@ -297,9 +297,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": @@ -309,16 +309,16 @@ 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 "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, @@ -326,34 +326,34 @@ 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 } @@ -365,9 +365,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": @@ -377,38 +377,38 @@ export class Controller { case "qwen": case "deepseek": case "xai": - await updateGlobalState(this.context, "apiModelId", newModelId) + await updateWorkspaceState(this.context, "apiModelId", newModelId) 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, "previousModeModelId", apiConfiguration.liteLlmModelId) + await updateWorkspaceState(this.context, "previousModeModelInfo", apiConfiguration.liteLlmModelInfo) 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 } @@ -419,7 +419,7 @@ export class Controller { } } - await updateGlobalState(this.context, "chatSettings", chatSettings) + await updateWorkspaceState(this.context, "chatSettings", chatSettings) await this.postStateToWebview() if (this.task) { @@ -510,7 +510,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) @@ -669,7 +669,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) { 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/storage/state-keys.ts b/src/core/storage/state-keys.ts index 5a4b20bb..520bf8da 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -24,16 +24,12 @@ export type SecretKey = | "cerebrasApiKey" export type GlobalStateKey = - | "apiProvider" - | "apiModelId" | "awsRegion" | "awsUseCrossRegionInference" | "awsBedrockUsePromptCache" | "awsBedrockEndpoint" | "awsProfile" | "awsUseProfile" - | "awsBedrockCustomSelected" - | "awsBedrockCustomModelBaseId" | "vertexProjectId" | "vertexRegion" | "lastShownAnnouncementId" @@ -43,7 +39,6 @@ export type GlobalStateKey = | "openAiModelId" | "openAiModelInfo" | "openAiHeaders" - | "ollamaModelId" | "ollamaBaseUrl" | "ollamaApiOptionsCtxNum" | "lmStudioModelId" @@ -51,40 +46,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,4 +70,35 @@ export type GlobalStateKey = | "terminalReuseEnabled" | "isNewUser" -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" diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index f1de5186..4f6f5cda 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -51,6 +51,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") @@ -77,8 +128,6 @@ async function migrateEnableCheckpointsSetting(enableCheckpointsSettingRaw: bool export async function getAllExtensionState(context: vscode.ExtensionContext) { const [ isNewUser, - storedApiProvider, - apiModelId, apiKey, openRouterApiKey, clineApiKey, @@ -91,19 +140,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 +154,29 @@ 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, cerebrasApiKey, nebiusApiKey, @@ -169,8 +192,6 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { terminalReuseEnabled, ] = 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, @@ -183,19 +204,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, @@ -203,49 +218,29 @@ 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, "cerebrasApiKey") as Promise, getSecret(context, "nebiusApiKey") as Promise, @@ -261,6 +256,68 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "terminalReuseEnabled") 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, + ] = 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, + ]) + let apiProvider: ApiProvider if (storedApiProvider) { apiProvider = storedApiProvider @@ -275,8 +332,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 @@ -463,37 +518,68 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a cerebrasApiKey, nebiusApiKey, favoritedModelIds, + fireworksApiKey, + fireworksModelId, + fireworksModelMaxCompletionTokens, + fireworksModelMaxTokens, } = 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) + + // 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) @@ -502,30 +588,12 @@ 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) } export async function resetExtensionState(context: vscode.ExtensionContext) { diff --git a/src/core/task/index.ts b/src/core/task/index.ts index eaa2d081..0a1b00c8 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -105,7 +105,7 @@ 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" @@ -3713,7 +3713,7 @@ export class Task { const clineVersion = vscode.extensions.getExtension("saoudrizwan.claude-dev")?.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({ @@ -4227,7 +4227,7 @@ export class Task { } // 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) diff --git a/src/extension.ts b/src/extension.ts index 278d9c6a..1f82d5b2 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -22,6 +22,7 @@ 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 } from "./core/storage/state" /* Built using https://github.com/microsoft/vscode-webview-ui-toolkit @@ -44,6 +45,9 @@ export async function activate(context: vscode.ExtensionContext) { Logger.initialize(outputChannel) Logger.log("Cline extension activated") + // Migrate global storage values to workspace storage (one-time cleanup) + await migratePlanActGlobalToWorkspaceStorage(context) + // Version checking for autoupdate notification const currentVersion = context.extension.packageJSON.version const previousVersion = context.globalState.get("clineVersion") diff --git a/src/services/test/TestServer.ts b/src/services/test/TestServer.ts index 0938d03a..54155858 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() From 980bddb4553a21d414f32e2d14fd89809710e63b Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Tue, 10 Jun 2025 11:46:39 -0700 Subject: [PATCH 10/76] Add prompt caching indicator to grok 3 (#4139) * Add prompt caching indicator to grok 3 * Create seven-insects-shop.md --- .changeset/seven-insects-shop.md | 5 +++++ src/core/controller/models/refreshOpenRouterModels.ts | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/seven-insects-shop.md diff --git a/.changeset/seven-insects-shop.md b/.changeset/seven-insects-shop.md new file mode 100644 index 00000000..a535acd5 --- /dev/null +++ b/.changeset/seven-insects-shop.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Add prompt caching indicator to grok 3 diff --git a/src/core/controller/models/refreshOpenRouterModels.ts b/src/core/controller/models/refreshOpenRouterModels.ts index bf15d409..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) From 1e06cf0667ebd4350ac0566bc7ba17ef31669d28 Mon Sep 17 00:00:00 2001 From: Ara Date: Wed, 11 Jun 2025 01:29:56 +0530 Subject: [PATCH 11/76] Update pricing for O3 family models (#4143) --- .changeset/angry-terms-mate.md | 5 +++++ src/shared/api.ts | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/angry-terms-mate.md diff --git a/.changeset/angry-terms-mate.md b/.changeset/angry-terms-mate.md new file mode 100644 index 00000000..439a7f11 --- /dev/null +++ b/.changeset/angry-terms-mate.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +updating o3 model pricing diff --git a/src/shared/api.ts b/src/shared/api.ts index 01840442..4af457fb 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -917,9 +917,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, From 0ae2dc3134c3addf5e3fa8029c40022425c18e37 Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Tue, 10 Jun 2025 13:12:10 -0700 Subject: [PATCH 12/76] Sorting mcp marketplace by newest by default (#4141) * sorting mcp marketplace by newest by default * sorting mcp marketplace by newest by default --------- Co-authored-by: Cline Evaluation --- .changeset/calm-snails-hammer.md | 5 +++++ .../configuration/tabs/marketplace/McpMarketplaceView.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/calm-snails-hammer.md diff --git a/.changeset/calm-snails-hammer.md b/.changeset/calm-snails-hammer.md new file mode 100644 index 00000000..9cf80462 --- /dev/null +++ b/.changeset/calm-snails-hammer.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Sorting mcp marketplace by newest listings by default 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 efeed8eb..26a539bc 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 || [] From 494ce333ce12c0b085c96622ae6fb1dacb05c024 Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Tue, 10 Jun 2025 13:56:04 -0700 Subject: [PATCH 13/76] Initial work for adding host bridge client for external hosts (#4144) * Add a host bridge client that uses the appropriate underlying client (vscode or external grpc service) Add placeholders for the external clients. Move the hosts directory under src, add an alias in tsconfig.json for @hosts * Update package.json --- .gitignore | 8 +++---- package.json | 2 +- proto/build-proto.js | 23 ++++++++++++++----- src/core/controller/file/getRelativePaths.ts | 2 +- .../external/client/host-bridge-client.ts | 23 +++++++++++++++++++ src/hosts/host-bridge-client.ts | 8 +++++++ .../vscode/client}/host-grpc-client-base.ts | 2 +- .../hosts}/vscode/host-grpc-handler.ts | 2 +- .../hosts}/vscode/host-grpc-service.ts | 0 {hosts => src/hosts}/vscode/uri/file.ts | 4 ++-- {hosts => src/hosts}/vscode/uri/joinPath.ts | 2 +- {hosts => src/hosts}/vscode/uri/parse.ts | 4 ++-- .../hosts}/vscode/watch/subscribeToFile.ts | 2 +- src/services/mcp/McpHub.ts | 2 +- tsconfig.json | 1 + 15 files changed, 64 insertions(+), 21 deletions(-) create mode 100644 src/hosts/external/client/host-bridge-client.ts create mode 100644 src/hosts/host-bridge-client.ts rename src/{standalone/services => hosts/vscode/client}/host-grpc-client-base.ts (97%) rename {hosts => src/hosts}/vscode/host-grpc-handler.ts (98%) rename {hosts => src/hosts}/vscode/host-grpc-service.ts (100%) rename {hosts => src/hosts}/vscode/uri/file.ts (78%) rename {hosts => src/hosts}/vscode/uri/joinPath.ts (91%) rename {hosts => src/hosts}/vscode/uri/parse.ts (79%) rename {hosts => src/hosts}/vscode/watch/subscribeToFile.ts (99%) diff --git a/.gitignore b/.gitignore index 4c42dc52..204b6750 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,8 @@ src/shared/proto/host/*.ts 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/client/host-grpc-client.ts +src/hosts/vscode/host-grpc-service-config.ts diff --git a/package.json b/package.json index cd0f57e1..553ff474 100644 --- a/package.json +++ b/package.json @@ -331,7 +331,7 @@ "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", + "postprotos": "prettier src/shared/proto src/core/controller src/hosts/ webview-ui/src/services src/standalone/server-setup.ts --write --log-level silent", "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", diff --git a/proto/build-proto.js b/proto/build-proto.js index 0e51d1ee..7275ecd8 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -21,6 +21,17 @@ const tsProtoPlugin = 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", + + "outputIndex=true", // output an index file for each package which exports all protos in the package. + "outputServices=generic-definitions", + + "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 @@ -47,7 +58,9 @@ 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...")) @@ -81,9 +94,7 @@ async function main() { `--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", + `--ts_proto_opt=${TS_PROTO_OPTIONS.join(",")} `, ...protoFiles, ].join(" ") try { @@ -592,7 +603,7 @@ export interface HostServiceHandlerConfig { export const hostServiceHandlers: Record = {${serviceConfigs.join(",")} };` - const configPath = path.join(ROOT_DIR, "hosts", "vscode", "host-grpc-service-config.ts") + const configPath = path.join(ROOT_DIR, "src", "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}`)) @@ -637,7 +648,7 @@ export { ${serviceExports.join(",\n\t")} }` - const configPath = path.join(ROOT_DIR, "src", "standalone", "services", "host-grpc-client.ts") + const configPath = path.join(ROOT_DIR, "src", "hosts", "vscode", "client", "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}`)) 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/hosts/external/client/host-bridge-client.ts b/src/hosts/external/client/host-bridge-client.ts new file mode 100644 index 00000000..2a9f2daf --- /dev/null +++ b/src/hosts/external/client/host-bridge-client.ts @@ -0,0 +1,23 @@ +import { StringRequest } from "@/shared/proto/common" +import { Uri } from "@/shared/proto/host/uri" +import { FileChangeEvent_ChangeType, SubscribeToFileRequest } from "@/shared/proto/host/watch" + +const UriServiceClient = { + parse: function (_: StringRequest): Uri { + throw Error("Unimplemented") + }, +} +const WatchServiceClient = { + subscribeToFile: function ( + _r: SubscribeToFileRequest, + _h: { + onResponse?: (response: { type: FileChangeEvent_ChangeType }) => void | Promise + onError?: (error: any) => void + onComplete?: () => void + }, + ) { + throw Error("Unimplemented") + }, +} + +export { UriServiceClient, WatchServiceClient } diff --git a/src/hosts/host-bridge-client.ts b/src/hosts/host-bridge-client.ts new file mode 100644 index 00000000..e802e518 --- /dev/null +++ b/src/hosts/host-bridge-client.ts @@ -0,0 +1,8 @@ +import * as VscodeClient from "./vscode/client/host-grpc-client" +import * as ExternalClient from "./external/client/host-bridge-client" + +const isHostBridgeExternal = process.env.HOST_BRIDGE_ADDRESS !== undefined && process.env.HOST_BRIDGE_ADDRESS !== "vscode" +const Client = isHostBridgeExternal ? ExternalClient : VscodeClient + +export const UriServiceClient = Client.UriServiceClient +export const WatchServiceClient = Client.WatchServiceClient diff --git a/src/standalone/services/host-grpc-client-base.ts b/src/hosts/vscode/client/host-grpc-client-base.ts similarity index 97% rename from src/standalone/services/host-grpc-client-base.ts rename to src/hosts/vscode/client/host-grpc-client-base.ts index 8e693a94..4141008d 100644 --- a/src/standalone/services/host-grpc-client-base.ts +++ b/src/hosts/vscode/client/host-grpc-client-base.ts @@ -1,5 +1,5 @@ import { v4 as uuidv4 } from "uuid" -import { GrpcHandler, StreamingCallbacks } from "../../../hosts/vscode/host-grpc-handler" +import { GrpcHandler, StreamingCallbacks } from "../host-grpc-handler" // Generic type for any protobuf service definition export type ProtoService = { diff --git a/hosts/vscode/host-grpc-handler.ts b/src/hosts/vscode/host-grpc-handler.ts similarity index 98% rename from hosts/vscode/host-grpc-handler.ts rename to src/hosts/vscode/host-grpc-handler.ts index c90bba62..7e781a42 100644 --- a/hosts/vscode/host-grpc-handler.ts +++ b/src/hosts/vscode/host-grpc-handler.ts @@ -1,6 +1,6 @@ import { v4 as uuidv4 } from "uuid" import { hostServiceHandlers } from "./host-grpc-service-config" -import { GrpcRequestRegistry } from "../../src/core/controller/grpc-request-registry" +import { GrpcRequestRegistry } from "@core/controller/grpc-request-registry" /** * Type definition for a streaming response handler 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/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index dbfdb8f6..29808a34 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -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 { diff --git a/tsconfig.json b/tsconfig.json index 97dc410f..38ffa65a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,6 +24,7 @@ "@/*": ["src/*"], "@api/*": ["src/api/*"], "@core/*": ["src/core/*"], + "@hosts/*": ["src/hosts/*"], "@integrations/*": ["src/integrations/*"], "@services/*": ["src/services/*"], "@shared/*": ["src/shared/*"], From cdfffb8464270986f8dfff20d8d3369b312f4813 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 10 Jun 2025 17:04:54 -0700 Subject: [PATCH 14/76] Spruce up HistoryPreview (#4101) * spruce it up * fix start positioning and spacing * change vertical spacing --- .../src/components/history/HistoryPreview.tsx | 179 ++++++------------ 1 file changed, 63 insertions(+), 116 deletions(-) diff --git a/webview-ui/src/components/history/HistoryPreview.tsx b/webview-ui/src/components/history/HistoryPreview.tsx index 581ec5f4..baabc17b 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}> - - - Recent Tasks - + 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)}
- {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 && ( <> - {" • "} + + • + Cache: +{formatLargeNumber(item.cacheWrites || 0)} →{" "} {formatLargeNumber(item.cacheReads || 0)} @@ -170,7 +120,12 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => { )} {!!item.totalCost && ( <> - {" • "} + + • + API Cost: ${item.totalCost?.toFixed(4)} )} @@ -178,35 +133,27 @@ const HistoryPreview = ({ showHistoryView }: HistoryPreviewProps) => {
))} -
- +
) : (
No recent tasks
From 336eb46547fefefc1b028caa18f6611f54681000 Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Tue, 10 Jun 2025 17:11:06 -0700 Subject: [PATCH 15/76] replay evals (#4140) --- evals/cli/src/commands/runDiffEval.ts | 5 +++ evals/cli/src/index.ts | 1 + evals/diff_editing/ClineWrapper.ts | 32 ++++++++++++------- evals/diff_editing/TestRunner.ts | 28 ++++++++++++---- .../diff_editing/diff-apply/diff-06-06-25.ts | 2 +- evals/diff_editing/types.ts | 6 +++- 6 files changed, 55 insertions(+), 19 deletions(-) diff --git a/evals/cli/src/commands/runDiffEval.ts b/evals/cli/src/commands/runDiffEval.ts index 10c83546..886cf455 100644 --- a/evals/cli/src/commands/runDiffEval.ts +++ b/evals/cli/src/commands/runDiffEval.ts @@ -13,6 +13,7 @@ interface RunDiffEvalOptions { verbose: boolean testPath: string outputPath: string + replay: boolean } export async function runDiffEvalHandler(options: RunDiffEvalOptions) { @@ -50,6 +51,10 @@ export async function runDiffEvalHandler(options: RunDiffEvalOptions) { args.push("--parallel") } + if (options.replay) { + args.push("--replay") + } + if (options.verbose) { args.push("--verbose") } diff --git a/evals/cli/src/index.ts b/evals/cli/src/index.ts index f0021725..2b3f6240 100644 --- a/evals/cli/src/index.ts +++ b/evals/cli/src/index.ts @@ -91,6 +91,7 @@ program .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 { diff --git a/evals/diff_editing/ClineWrapper.ts b/evals/diff_editing/ClineWrapper.ts index 5f365e9d..d11256d1 100644 --- a/evals/diff_editing/ClineWrapper.ts +++ b/evals/diff_editing/ClineWrapper.ts @@ -8,7 +8,7 @@ import { parseAssistantMessageV3, AssistantMessageContent, } from "./parsing/parse-assistant-message-06-06-25" // "../../src/core/assistant-message" -import { constructNewFileContentV2 } from "./diff-apply/diff-06-06-25" +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[] @@ -21,6 +21,7 @@ const parsingFunctions: Record = { } const diffEditingFunctions: Record = { + constructNewFileContentV1: constructNewFileContentV1, constructNewFileContentV2: constructNewFileContentV2, constructNewFileContentV3: constructNewFileContentV3, // position invariant diff } @@ -114,10 +115,10 @@ export async function runSingleEvaluation(input: TestInput): Promise parsingFunction, diffEditFunction, thinkingBudgetTokens, + originalDiffEditToolCallMessage, } = input const requiredParams = { - apiKey, systemPrompt, messages, modelId, @@ -163,17 +164,26 @@ export async function runSingleEvaluation(input: TestInput): Promise }, } - const openRouterHandler = new OpenRouterHandler(options) - // Get the output of streaming output of this llm call let streamResult: StreamResult - try { - streamResult = await processStream(openRouterHandler, systemPrompt, messages) - } catch (error: any) { - return { - success: false, - error: "llm_stream_error", - errorString: error.message || error.toString(), + 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(), + } } } diff --git a/evals/diff_editing/TestRunner.ts b/evals/diff_editing/TestRunner.ts index 8bab5ef6..4788104a 100644 --- a/evals/diff_editing/TestRunner.ts +++ b/evals/diff_editing/TestRunner.ts @@ -22,12 +22,14 @@ const systemPromptGeneratorLookup: Record = { type TestResultSet = { [test_id: string]: (TestResult & { test_id?: string })[] } class NodeTestRunner { - private apiKey: string + private apiKey: string | undefined - constructor() { - this.apiKey = process.env.OPENROUTER_API_KEY! - if (!this.apiKey) { - throw new Error("OPENROUTER_API_KEY environment variable not set") + 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.") + } } } @@ -125,6 +127,14 @@ class NodeTestRunner { * 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 @@ -138,6 +148,7 @@ class NodeTestRunner { 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) @@ -320,6 +331,7 @@ async function main() { .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) @@ -336,12 +348,13 @@ async function main() { 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() + const runner = new NodeTestRunner(testConfig.replay) const testCases = runner.loadTestCases(testPath) const processedTestCases: ProcessedTestCase[] = testCases.map((tc) => ({ @@ -351,6 +364,9 @@ async function main() { 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 diff --git a/evals/diff_editing/diff-apply/diff-06-06-25.ts b/evals/diff_editing/diff-apply/diff-06-06-25.ts index 955fce95..6a74917a 100644 --- a/evals/diff_editing/diff-apply/diff-06-06-25.ts +++ b/evals/diff_editing/diff-apply/diff-06-06-25.ts @@ -211,7 +211,7 @@ export async function constructNewFileContent( diffContent: string, originalContent: string, isFinal: boolean, - version: "v1" | "v2" = "v2", + version: "v1" | "v2" = "v1", ): Promise { const constructor = constructNewFileContentVersionMapping[version] if (!constructor) { diff --git a/evals/diff_editing/types.ts b/evals/diff_editing/types.ts index db7dfc10..89325678 100644 --- a/evals/diff_editing/types.ts +++ b/evals/diff_editing/types.ts @@ -13,6 +13,7 @@ export interface ProcessedTestCase { file_contents: string file_path: string system_prompt_details: SystemPromptDetails + original_diff_edit_tool_call_message: string } export interface TestCase { @@ -21,6 +22,7 @@ export interface TestCase { file_contents: string file_path: string system_prompt_details: SystemPromptDetails + original_diff_edit_tool_call_message: string } export interface TestConfig { @@ -30,6 +32,7 @@ export interface TestConfig { parsing_function: string diff_edit_function: string thinking_tokens_budget: number + replay: boolean } export interface SystemPromptDetails { @@ -72,7 +75,7 @@ export interface ExtractedToolCall { } export interface TestInput { - apiKey: string + apiKey?: string systemPrompt: string messages: Anthropic.Messages.MessageParam[] modelId: string @@ -81,4 +84,5 @@ export interface TestInput { parsingFunction: string diffEditFunction: string thinkingBudgetTokens: number + originalDiffEditToolCallMessage?: string } From 59a68c8d7adef6afb59990008d66d5bd74d30558 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Tue, 10 Jun 2025 18:28:01 -0700 Subject: [PATCH 16/76] migrate focusChatInput protobus (#3986) * migrate focusChatInput * move subscription in with the others * changed grpc method; fixed a bug where keybinding doesn't show chatview if in another tab --------- Co-authored-by: Elephant Lumps --- .changeset/famous-papayas-repair.md | 5 ++ proto/ui.proto | 3 + .../ui/subscribeToFocusChatInput.ts | 62 +++++++++++++++++++ src/core/webview/index.ts | 23 +++++++ src/extension.ts | 8 +-- src/shared/ExtensionMessage.ts | 2 +- webview-ui/src/components/chat/ChatView.tsx | 31 +++++++--- .../src/context/ExtensionStateContext.tsx | 31 ++++++++-- 8 files changed, 149 insertions(+), 16 deletions(-) create mode 100644 .changeset/famous-papayas-repair.md create mode 100644 src/core/controller/ui/subscribeToFocusChatInput.ts diff --git a/.changeset/famous-papayas-repair.md b/.changeset/famous-papayas-repair.md new file mode 100644 index 00000000..76f91aef --- /dev/null +++ b/.changeset/famous-papayas-repair.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Migrate focusChatInput message to protobus diff --git a/proto/ui.proto b/proto/ui.proto index dab46739..64e7de78 100644 --- a/proto/ui.proto +++ b/proto/ui.proto @@ -255,4 +255,7 @@ 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); } 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/webview/index.ts b/src/core/webview/index.ts index 71bb30fa..015bb76c 100644 --- a/src/core/webview/index.ts +++ b/src/core/webview/index.ts @@ -9,6 +9,7 @@ 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" /* https://github.com/microsoft/vscode-webview-ui-toolkit-samples/blob/main/default/weather-webview/src/providers/WeatherViewProvider.ts @@ -19,9 +20,11 @@ export class WebviewProvider implements vscode.WebviewViewProvider { public static readonly sideBarId = "claude-dev.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 = "claude-dev.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 +32,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 +59,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 { @@ -245,6 +262,9 @@ export class WebviewProvider implements vscode.WebviewViewProvider { @@ -358,6 +378,9 @@ export class WebviewProvider implements vscode.WebviewViewProvider { ${reactRefresh} diff --git a/src/extension.ts b/src/extension.ts index 1f82d5b2..0a1708da 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -24,6 +24,7 @@ import { sendHistoryButtonClickedEvent } from "./core/controller/ui/subscribeToH import { sendAccountButtonClickedEvent } from "./core/controller/ui/subscribeToAccountButtonClicked" import { migratePlanActGlobalToWorkspaceStorage } from "./core/storage/state" +import { sendFocusChatInputEvent } from "./core/controller/ui/subscribeToFocusChatInput" /* Built using https://github.com/microsoft/vscode-webview-ui-toolkit @@ -589,10 +590,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( diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index eabe5a19..492b830b 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -25,7 +25,7 @@ export interface ExtensionMessage { | "userCreditsPayments" | "grpc_response" // New type for gRPC responses text?: string - action?: "didBecomeVisible" | "accountLogoutClicked" | "focusChatInput" + action?: "didBecomeVisible" | "accountLogoutClicked" state?: ExtensionState images?: string[] files?: string[] diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index eab437a8..9675423b 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) @@ -699,12 +706,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie textAreaRef.current?.focus() } break - case "focusChatInput": - textAreaRef.current?.focus() - if (isHidden) { - window.dispatchEvent(new CustomEvent("chatButtonClicked")) - } - break } break } @@ -715,6 +716,22 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie useEvent("message", handleMessage) + // Listen for local focusChatInput event + useEffect(() => { + const handleFocusChatInput = () => { + if (isHidden) { + navigateToChat() + } + textAreaRef.current?.focus() + } + + window.addEventListener("focusChatInput", handleFocusChatInput) + + return () => { + window.removeEventListener("focusChatInput", handleFocusChatInput) + } + }, [isHidden]) + // Set up addToInput subscription useEffect(() => { const cleanup = UiServiceClient.subscribeToAddToInput(EmptyRequest.create({}), { diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index bb892694..50410ca4 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -7,10 +7,11 @@ 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 { 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" @@ -26,9 +27,7 @@ import { requestyDefaultModelInfo, } 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 { @@ -231,6 +230,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) @@ -552,6 +554,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) { @@ -602,7 +622,10 @@ 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 From e35428a7b9c55fc922834897331ae2099d610737 Mon Sep 17 00:00:00 2001 From: watany <76135106+watany-dev@users.noreply.github.com> Date: Wed, 11 Jun 2025 15:49:45 +0900 Subject: [PATCH 17/76] refactor(bedrock): remove the as any and use proper type (#4127) * v3.17.12 Release Notes * changeset version bump * Updating CHANGELOG.md format * Update CHANGELOG.md for version 3.17.12 * changelog language * changelog language * attribution --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions Co-authored-by: Cline Evaluation * fix typing --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions Co-authored-by: Cline Evaluation --- src/api/providers/bedrock.ts | 65 +++++++++++++++++-- .../state/settings-conversion.ts | 6 +- 2 files changed, 62 insertions(+), 9 deletions(-) diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index 1052cb74..f6197764 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -35,6 +35,59 @@ interface ExtendedMetadata { } } +// 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 @@ -107,7 +160,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 @@ -461,7 +514,7 @@ export class AwsBedrockHandler implements ApiHandler { // Handle content block start - check if Bedrock uses Anthropic SDK format if (chunk.contentBlockStart) { - const blockStart = chunk.contentBlockStart as any + const blockStart = chunk.contentBlockStart as ContentBlockStart const blockIndex = chunk.contentBlockStart.contentBlockIndex // Check for thinking block in various possible formats @@ -497,7 +550,7 @@ export class AwsBedrockHandler implements ApiHandler { // Check if this is a thinking block const blockType = blockTypes.get(blockIndex) - const delta = chunk.contentBlockDelta.delta as any + const delta = chunk.contentBlockDelta.delta as ContentBlockDelta["delta"] // Handle thinking delta (Anthropic SDK format) if (delta?.type === "thinking_delta" || delta?.thinking) { @@ -727,7 +780,7 @@ export class AwsBedrockHandler implements ApiHandler { } // Log unsupported content types for debugging - console.warn(`Unsupported content type: ${(item as any).type}`) + console.warn(`Unsupported content type: ${(item as ContentItem).type}`) return null }) .filter((item): item is ContentBlock => item !== null) @@ -771,7 +824,7 @@ export class AwsBedrockHandler implements ApiHandler { 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)) + imageData = new Uint8Array(Buffer.from(item.source.data as Buffer | Uint8Array)) } else { throw new Error("Unsupported image data format") } @@ -817,7 +870,7 @@ export class AwsBedrockHandler implements ApiHandler { cachePoint: { type: "default", }, - } as any, // Type assertion needed for AWS SDK compatibility + } as CachePointContentBlock, // Properly typed cache point for AWS SDK ] } diff --git a/src/shared/proto-conversions/state/settings-conversion.ts b/src/shared/proto-conversions/state/settings-conversion.ts index 41d17be2..c460081f 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, @@ -122,7 +122,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, @@ -158,7 +158,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, From 099f0ec401b059dcb7169fd3fe72cd9395b476a1 Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Wed, 11 Jun 2025 01:24:42 -0700 Subject: [PATCH 18/76] fix the settings for terminal timeout (#4153) * base * changeset --- .changeset/real-clouds-act.md | 5 ++++ proto/state.proto | 1 - .../state/updateTerminalConnectionTimeout.ts | 27 ------------------- .../settings/TerminalSettingsSection.tsx | 14 ---------- 4 files changed, 5 insertions(+), 42 deletions(-) create mode 100644 .changeset/real-clouds-act.md delete mode 100644 src/core/controller/state/updateTerminalConnectionTimeout.ts diff --git a/.changeset/real-clouds-act.md b/.changeset/real-clouds-act.md new file mode 100644 index 00000000..0bc6af81 --- /dev/null +++ b/.changeset/real-clouds-act.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +fix menu for setting terminal timeout diff --git a/proto/state.proto b/proto/state.proto index 486efb7e..48b427ab 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -11,7 +11,6 @@ service StateService { rpc toggleFavoriteModel(StringRequest) returns (Empty); rpc resetState(EmptyRequest) returns (Empty); rpc togglePlanActMode(TogglePlanActModeRequest) returns (Empty); - rpc updateTerminalConnectionTimeout(Int64Request) returns (Int64); rpc updateAutoApprovalSettings(AutoApprovalSettingsRequest) returns (Empty); rpc updateSettings(UpdateSettingsRequest) returns (Empty); } diff --git a/src/core/controller/state/updateTerminalConnectionTimeout.ts b/src/core/controller/state/updateTerminalConnectionTimeout.ts deleted file mode 100644 index e3e549b1..00000000 --- a/src/core/controller/state/updateTerminalConnectionTimeout.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Controller } from ".." -import { Int64, Int64Request } from "../../../shared/proto/common" -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 - - 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 - } -} diff --git a/webview-ui/src/components/settings/TerminalSettingsSection.tsx b/webview-ui/src/components/settings/TerminalSettingsSection.tsx index eaff9173..1ff264b3 100644 --- a/webview-ui/src/components/settings/TerminalSettingsSection.tsx +++ b/webview-ui/src/components/settings/TerminalSettingsSection.tsx @@ -1,8 +1,6 @@ import React, { useState } from "react" import { VSCodeTextField, VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react" import { useExtensionState } from "@/context/ExtensionStateContext" -import { StateServiceClient } from "@/services/grpc-client" -import { Int64, Int64Request } from "@shared/proto/common" export const TerminalSettingsSection: React.FC = () => { const { shellIntegrationTimeout, setShellIntegrationTimeout, terminalReuseEnabled, setTerminalReuseEnabled } = @@ -27,18 +25,6 @@ export const TerminalSettingsSection: React.FC = () => { // Update local state setShellIntegrationTimeout(timeout) - - // Send to extension using gRPC - StateServiceClient.updateTerminalConnectionTimeout({ - value: timeout, - } as Int64Request) - .then((response: Int64) => { - setShellIntegrationTimeout(response.value) - setInputValue((response.value / 1000).toString()) - }) - .catch((error) => { - console.error("Failed to update terminal connection timeout:", error) - }) } const handleInputBlur = () => { From ddca8411a6831498182f576ef970e407a39caf9f Mon Sep 17 00:00:00 2001 From: Ara Date: Wed, 11 Jun 2025 14:20:54 +0530 Subject: [PATCH 19/76] Supporting Notifications MCP with Cline (#4129) * Adding real time client * Adding real time client * Adding real time client * first commit * Adding thinking Slider for Gemini models --------- Co-authored-by: Cline Evaluation --- .changeset/sour-poets-smile.md | 5 + .vscode/tasks.json | 40 ++++- proto/ui.proto | 15 +- src/core/task/index.ts | 22 +++ src/services/mcp/McpHub.ts | 137 ++++++++++++++++++ src/shared/ExtensionMessage.ts | 1 + src/shared/proto-conversions/cline-message.ts | 2 + webview-ui/src/components/chat/ChatRow.tsx | 30 ++++ 8 files changed, 243 insertions(+), 9 deletions(-) create mode 100644 .changeset/sour-poets-smile.md diff --git a/.changeset/sour-poets-smile.md b/.changeset/sour-poets-smile.md new file mode 100644 index 00000000..1fac657f --- /dev/null +++ b/.changeset/sour-poets-smile.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Supporting Notifications MCP with Cline 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/proto/ui.proto b/proto/ui.proto index 64e7de78..216ac1db 100644 --- a/proto/ui.proto +++ b/proto/ui.proto @@ -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 diff --git a/src/core/task/index.ts b/src/core/task/index.ts index 0a1b00c8..f071bea7 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -233,6 +233,12 @@ export class Task { 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 @@ -1196,6 +1202,9 @@ export class Task { 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 @@ -3323,8 +3332,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 = diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index 29808a34..68069730 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -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, @@ -321,6 +332,100 @@ 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(), + }) + } + + // Also show as VS Code notification for now (can be removed later if desired) + switch (level) { + case "error": + vscode.window.showErrorMessage(`MCP ${name}: ${message}`) + break + case "warning": + vscode.window.showWarningMessage(`MCP ${name}: ${message}`) + break + default: + vscode.window.showInformationMessage(`MCP ${name}: ${message}`) + } + + // 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) @@ -949,6 +1054,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/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index 492b830b..f3de2b97 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -163,6 +163,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/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/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index a718c07a..2a47d806 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -1054,6 +1054,36 @@ 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 ( From f16c70e200369678cdc5d3baf8ca72e52d458884 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Wed, 11 Jun 2025 12:31:38 -0700 Subject: [PATCH 20/76] extract isClaude4ModelFamily helper (#4121) --- src/core/task/index.ts | 51 ++++++++++++++++------------------------ src/utils/model-utils.ts | 7 ++++++ 2 files changed, 27 insertions(+), 31 deletions(-) create mode 100644 src/utils/model-utils.ts diff --git a/src/core/task/index.ts b/src/core/task/index.ts index f071bea7..b74569f1 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -113,6 +113,7 @@ 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" export const USE_EXPERIMENTAL_CLAUDE4_FEATURES = false @@ -1629,12 +1630,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(() => { @@ -1648,8 +1643,8 @@ 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() @@ -1930,7 +1925,6 @@ export class Task { // Get final list of replacements const allReplacements = this.streamingJsonReplacer.getSuccessfullyParsedItems() - // console.log(`Total replacements applied: ${allReplacements.length}`) // Cleanup this.streamingJsonReplacer = undefined @@ -1960,7 +1954,6 @@ export class Task { if (this.didCompleteReadingStream) { this.userMessageContentReady = true } - // console.log("no more content blocks to stream! this shouldn't happen?") this.presentAssistantMessageLocked = false return //throw new Error("No more content blocks to stream! This shouldn't happen...") // remove and just return after testing @@ -2096,11 +2089,11 @@ export class Task { 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({ type: "text", @@ -2186,7 +2179,7 @@ export class Task { } } - const handleError = async (action: string, error: Error, isClaude4ModelFamily: boolean = false) => { + const handleError = async (action: string, error: Error, isClaude4Model: boolean = false) => { if (this.abandoned) { console.log("Ignoring error since task was abandoned (i.e. from task cancellation after resetting)") return @@ -2197,7 +2190,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 @@ -2275,9 +2268,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) { + if (isClaude4Model && USE_EXPERIMENTAL_CLAUDE4_FEATURES && currentFullJson) { console.log("[EDIT] Streaming JSON replacement") const streamingResult = await this.handleStreamingJsonReplacement( block, @@ -2669,7 +2662,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" @@ -2695,10 +2688,7 @@ export class Task { } else { if (!relDirPath) { this.consecutiveMistakeCount++ - pushToolResult( - await this.sayAndCreateMissingParamError("list_files", "path"), - isClaude4ModelFamily, - ) + pushToolResult(await this.sayAndCreateMissingParamError("list_files", "path"), isClaude4Model) await this.saveCheckpoint() break } @@ -2749,12 +2739,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 } @@ -2842,7 +2832,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 @@ -2872,7 +2862,7 @@ export class Task { this.consecutiveMistakeCount++ pushToolResult( await this.sayAndCreateMissingParamError("search_files", "path"), - isClaude4ModelFamily, + isClaude4Model, ) await this.saveCheckpoint() break @@ -2881,7 +2871,7 @@ export class Task { this.consecutiveMistakeCount++ pushToolResult( await this.sayAndCreateMissingParamError("search_files", "regex"), - isClaude4ModelFamily, + isClaude4Model, ) await this.saveCheckpoint() break @@ -2932,12 +2922,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 } @@ -4525,9 +4515,8 @@ 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) { + const isClaude4Model = isClaude4ModelFamily(this.api) + if (isClaude4Model && USE_EXPERIMENTAL_CLAUDE4_FEATURES) { this.assistantMessageContent = parseAssistantMessageV3(assistantMessage) } else { this.assistantMessageContent = parseAssistantMessageV2(assistantMessage) 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") +} From 9733ef791e2e4d97593c1f86ba0f08f7de8763b7 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Wed, 11 Jun 2025 12:32:24 -0700 Subject: [PATCH 21/76] migrate apiConfiguration protobus (#4072) * migrate apiConfiguration * fix type issue --------- Co-authored-by: Elephant Lumps --- proto/models.proto | 159 ++++++- src/core/controller/index.ts | 10 +- .../models/updateApiConfigurationProto.ts | 43 ++ src/shared/WebviewMessage.ts | 1 - .../models/api-configuration-conversion.ts | 442 ++++++++++++++++++ .../models/vscode-lm-models-conversion.ts | 4 +- .../src/components/chat/ChatTextArea.tsx | 18 +- .../src/components/settings/ApiOptions.tsx | 22 +- .../src/components/welcome/WelcomeView.tsx | 18 +- 9 files changed, 684 insertions(+), 33 deletions(-) create mode 100644 src/core/controller/models/updateApiConfigurationProto.ts create mode 100644 src/shared/proto-conversions/models/api-configuration-conversion.ts diff --git a/proto/models.proto b/proto/models.proto index 706eb047..98f23dc5 100644 --- a/proto/models.proto +++ b/proto/models.proto @@ -22,19 +22,21 @@ service ModelsService { rpc refreshRequestyModels(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 @@ -86,3 +88,146 @@ message OpenAiModelsRequest { string baseUrl = 2; string apiKey = 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; +} + +// 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; + + // From ApiConfiguration (additional fields) + optional ApiProvider api_provider = 66; + repeated string favorited_model_ids = 67; +} diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 75724714..7969f718 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -204,15 +204,7 @@ export class Controller { await this.setUserInfo(message.user || 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 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/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 7c09e903..05927302 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" 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..db3526cd --- /dev/null +++ b/src/shared/proto-conversions/models/api-configuration-conversion.ts @@ -0,0 +1,442 @@ +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 + 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" + 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 || [], + } +} + +// 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, + } +} 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/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index 6cb38e63..780c6eec 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -6,7 +6,7 @@ import Thumbnails from "@/components/common/Thumbnails" import Tooltip from "@/components/common/Tooltip" import ApiOptions, { normalizeApiConfiguration } from "@/components/settings/ApiOptions" import { useExtensionState } from "@/context/ExtensionStateContext" -import { FileServiceClient, StateServiceClient } from "@/services/grpc-client" +import { FileServiceClient, StateServiceClient, ModelsServiceClient } from "@/services/grpc-client" import { ContextMenuOptionType, getContextMenuOptions, @@ -34,6 +34,8 @@ import { mentionRegex, mentionRegexGlobal } from "@shared/context-mentions" import { ExtensionMessage } from "@shared/ExtensionMessage" import { EmptyRequest, StringRequest } from "@shared/proto/common" import { FileSearchRequest, RelativePathsRequest } from "@shared/proto/file" +import { UpdateApiConfigurationRequest } from "@shared/proto/models" +import { convertApiConfigurationToProto } from "@shared/proto-conversions/models/api-configuration-conversion" import { PlanActMode, TogglePlanActModeRequest } from "@shared/proto/state" import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import React, { forwardRef, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react" @@ -962,12 +964,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(() => { diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 148b8468..18fda47b 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -48,7 +48,8 @@ import { xaiModels, } 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, @@ -192,12 +193,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) }) } } diff --git a/webview-ui/src/components/welcome/WelcomeView.tsx b/webview-ui/src/components/welcome/WelcomeView.tsx index 782b32f5..f9875777 100644 --- a/webview-ui/src/components/welcome/WelcomeView.tsx +++ b/webview-ui/src/components/welcome/WelcomeView.tsx @@ -5,8 +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() @@ -21,8 +23,18 @@ const WelcomeView = memo(() => { ) } - 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(() => { From 542ec2bd4ac4407481a382bb793f44c16d85d6ad Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Wed, 11 Jun 2025 12:46:10 -0700 Subject: [PATCH 22/76] migrate and remove custom instructions (#4158) --- proto/state.proto | 17 +++-- src/core/controller/index.ts | 12 ---- src/core/controller/state/updateSettings.ts | 5 -- src/core/prompts/model_prompts/claude4.ts | 4 -- src/core/prompts/system.ts | 4 -- src/core/storage/state-keys.ts | 1 - src/core/storage/state.ts | 51 ++++++++++++++- src/core/task/index.ts | 7 +- src/exports/README.md | 7 -- src/exports/__tests__/cline-api.test.ts | 64 ------------------- src/exports/cline.d.ts | 12 ---- src/exports/index.ts | 9 --- src/extension.ts | 5 +- src/shared/ExtensionMessage.ts | 1 - src/shared/WebviewMessage.ts | 1 - .../src/components/settings/SettingsView.tsx | 30 --------- .../src/context/ExtensionStateContext.tsx | 7 -- 17 files changed, 61 insertions(+), 176 deletions(-) diff --git a/proto/state.proto b/proto/state.proto index 48b427ab..001fde28 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -69,15 +69,14 @@ 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; } // Complete API Configuration message diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 7969f718..df75f31e 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -130,7 +130,6 @@ 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, @@ -172,7 +171,6 @@ export class Controller { shellIntegrationTimeout, terminalReuseEnabled ?? true, enableCheckpointsSetting ?? true, - customInstructions, task, images, files, @@ -460,14 +458,6 @@ export class Controller { } } - 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() { @@ -949,7 +939,6 @@ export class Controller { const { apiConfiguration, lastShownAnnouncementId, - customInstructions, taskHistory, autoApprovalSettings, browserSettings, @@ -981,7 +970,6 @@ 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, diff --git a/src/core/controller/state/updateSettings.ts b/src/core/controller/state/updateSettings.ts index 5ebb666b..368e6e29 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) 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/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 520bf8da..8fc408e7 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -33,7 +33,6 @@ export type GlobalStateKey = | "vertexProjectId" | "vertexRegion" | "lastShownAnnouncementId" - | "customInstructions" | "taskHistory" | "openAiBaseUrl" | "openAiModelId" diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index 4f6f5cda..8920d24f 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 @@ -125,6 +128,51 @@ 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, @@ -161,7 +209,6 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { azureApiVersion, openRouterProviderSorting, lastShownAnnouncementId, - customInstructions, taskHistory, autoApprovalSettings, browserSettings, @@ -225,7 +272,6 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "azureApiVersion") 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, @@ -425,7 +471,6 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { }, isNewUser: isNewUser ?? true, lastShownAnnouncementId, - customInstructions, taskHistory, autoApprovalSettings: autoApprovalSettings || DEFAULT_AUTO_APPROVAL_SETTINGS, // default value can be 0 or empty string globalClineRulesToggles: globalClineRulesToggles || {}, diff --git a/src/core/task/index.ts b/src/core/task/index.ts index b74569f1..9be2a176 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -145,7 +145,6 @@ export class Task { browserSession: BrowserSession contextManager: ContextManager private didEditFile: boolean = false - customInstructions?: string autoApprovalSettings: AutoApprovalSettings browserSettings: BrowserSettings chatSettings: ChatSettings @@ -205,7 +204,6 @@ export class Task { shellIntegrationTimeout: number, terminalReuseEnabled: boolean, enableCheckpointsSetting: boolean, - customInstructions?: string, task?: string, images?: string[], files?: string[], @@ -228,7 +226,6 @@ export class Task { 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 @@ -1646,7 +1643,6 @@ export class Task { 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 = @@ -1674,7 +1670,6 @@ export class Task { } if ( - settingsCustomInstructions || globalClineRulesFileInstructions || localClineRulesFileInstructions || localCursorRulesFileInstructions || @@ -1685,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, @@ -1694,6 +1688,7 @@ export class Task { clineIgnoreInstructions, preferredLanguageInstructions, ) + console.log("[INSTRUCTIONS] User instructions:", userInstructions) systemPrompt += userInstructions } const contextManagementMetadata = await this.contextManager.getNewContextMessagesAndMetadata( diff --git a/src/exports/README.md b/src/exports/README.md index 40f909a2..d2b74e50 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 0a1708da..c07e658f 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -22,7 +22,7 @@ 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 } from "./core/storage/state" +import { migratePlanActGlobalToWorkspaceStorage, migrateCustomInstructionsToGlobalRules } from "./core/storage/state" import { sendFocusChatInputEvent } from "./core/controller/ui/subscribeToFocusChatInput" /* @@ -49,6 +49,9 @@ export async function activate(context: vscode.ExtensionContext) { // 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) + // Version checking for autoupdate notification const currentVersion = context.extension.packageJSON.version const previousVersion = context.globalState.get("clineVersion") diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index f3de2b97..ba4cc1fd 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -81,7 +81,6 @@ export interface ExtensionState { checkpointTrackerErrorMessage?: string clineMessages: ClineMessage[] currentTaskItem?: HistoryItem - customInstructions?: string mcpMarketplaceEnabled?: boolean planActSeparateModelsSetting: boolean enableCheckpointsSetting?: boolean diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 05927302..2216e9c5 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -45,7 +45,6 @@ export interface WebviewMessage { mcpMarketplaceEnabled?: boolean mcpResponsesCollapsed?: boolean telemetrySetting?: TelemetrySetting - customInstructionsSetting?: string mentionsRequestId?: string query?: string // For toggleFavoriteModel diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 5bb4f837..cdf2fa80 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -115,8 +115,6 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { const { apiConfiguration, version, - customInstructions, - setCustomInstructions, openRouterModels, telemetrySetting, setTelemetrySetting, @@ -140,7 +138,6 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { // Store the original state to detect changes const originalState = useRef({ apiConfiguration, - customInstructions, telemetrySetting, planActSeparateModelsSetting, enableCheckpointsSetting, @@ -163,10 +160,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,7 +177,6 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { await StateServiceClient.updateSettings( UpdateSettingsRequest.create({ planActSeparateModelsSetting, - customInstructionsSetting: customInstructions, telemetrySetting, enableCheckpointsSetting, mcpMarketplaceEnabled, @@ -215,7 +207,6 @@ 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 || @@ -228,7 +219,6 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { setHasUnsavedChanges(hasChanges) }, [ apiConfiguration, - customInstructions, telemetrySetting, planActSeparateModelsSetting, enableCheckpointsSetting, @@ -246,7 +236,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) @@ -287,7 +276,6 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { }, [ hasUnsavedChanges, onDone, - setCustomInstructions, setTelemetrySetting, setPlanActSeparateModelsSetting, setChatSettings, @@ -585,24 +573,6 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { architect a plan for a cheaper coding model to act on.

- -
- setCustomInstructions(e.target?.value ?? "")}> - Custom Instructions - -

- These instructions are added to the end of the system prompt sent with every - request. -

-
)} diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 50410ca4..b07365cf 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -52,7 +52,6 @@ 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 @@ -688,11 +687,6 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, apiConfiguration: value, })), - setCustomInstructions: (value) => - setState((prevState) => ({ - ...prevState, - customInstructions: value, - })), setTelemetrySetting: (value) => setState((prevState) => ({ ...prevState, @@ -760,7 +754,6 @@ export const ExtensionStateContextProvider: React.FC<{ apiConfiguration: state.apiConfiguration ? convertApiConfigurationToProtoApiConfiguration(state.apiConfiguration) : undefined, - customInstructionsSetting: state.customInstructions, telemetrySetting: state.telemetrySetting, planActSeparateModelsSetting: state.planActSeparateModelsSetting, enableCheckpointsSetting: state.enableCheckpointsSetting, From 79edbf9a92a69c9d2d7ecd8135f8d3ee156f4629 Mon Sep 17 00:00:00 2001 From: Ara Date: Thu, 12 Jun 2025 01:59:24 +0530 Subject: [PATCH 23/76] Remove redundant MCP notifications (#4170) Co-authored-by: Cline Evaluation --- src/services/mcp/McpHub.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index 68069730..07b83e37 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -384,18 +384,6 @@ export class McpHub { }) } - // Also show as VS Code notification for now (can be removed later if desired) - switch (level) { - case "error": - vscode.window.showErrorMessage(`MCP ${name}: ${message}`) - break - case "warning": - vscode.window.showWarningMessage(`MCP ${name}: ${message}`) - break - default: - vscode.window.showInformationMessage(`MCP ${name}: ${message}`) - } - // Forward to webview if available if (this.postMessageToWebview) { await this.postMessageToWebview({ From a9238b425b9ed7f38bd24962fe97b02cb204a692 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Wed, 11 Jun 2025 13:37:03 -0700 Subject: [PATCH 24/76] Update PR Template (#4175) * update pr template * change wording --- .github/pull_request_template.md | 50 ++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1e263c9b..06b5ad39 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,10 +1,46 @@ + + +**For community contributors, before submitting this PR, please ensure you have:** + +- [ ] **Opened an issue** to discuss your proposed changes with the community +- [ ] **Received approval** from a core Cline contributor to proceed with the implementation +- [ ] **Linked the issue below** in the "Related Issue" section + +**Exceptions:** Small bug fixes, typo corrections, minor wording improvements, or simple type fixes that don't change functionality may be submitted directly. + +**Why this requirement?** We deeply appreciate all community contributions - they are the core reason we're able to operate successfully and keep innovating! We welcome community input and want to make it as easy as possible for people to submit quality work. This process helps our core maintainers review new ideas faster and saves contributor time by ensuring you have the go-ahead before spending time on implementation. + +--- + +### Related Issue + + +**Issue:** #XXXX + ### Description - + ### Test Procedure - + ### Type of Change @@ -29,7 +65,15 @@ ### Screenshots - + ### Additional Notes From 5272788f8cc480ea54e9d716cff61662a6af207a Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Wed, 11 Jun 2025 15:05:55 -0700 Subject: [PATCH 25/76] During cleanup remove generated files that have been moved to a different location. (#4152) --- proto/build-proto.js | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/proto/build-proto.js b/proto/build-proto.js index 7275ecd8..13705cbd 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -15,6 +15,7 @@ const protoc = path.join(require.resolve("grpc-tools"), "../bin/protoc") const __filename = fileURLToPath(import.meta.url) const SCRIPT_DIR = path.dirname(__filename) const ROOT_DIR = path.resolve(SCRIPT_DIR, "..") +const TS_OUT_DIR = path.join(ROOT_DIR, "src", "shared", "proto") const isWindows = process.platform === "win32" const tsProtoPlugin = isWindows @@ -68,18 +69,9 @@ 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)) - } + await cleanup() // Check for missing proto files for services in serviceNameMap await ensureProtoFilesExist() @@ -654,6 +646,35 @@ export { console.log(chalk.green(`Generated host gRPC client at ${configPath}`)) } +async function cleanup() { + // 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)) + } + + // Clean up generated files that were moved. + 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")) +} + +/** + * 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 function checkAppleSiliconCompatibility() { // Only run check on macOS From 9f605a1f6c925092cf6c2d2898af8f5342364c42 Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Wed, 11 Jun 2025 15:58:24 -0700 Subject: [PATCH 26/76] Add a verbose flag to build-protos.js (#4171) Reduce the amount of logging unless the flag is set. --- proto/build-proto.js | 71 +++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 31 deletions(-) diff --git a/proto/build-proto.js b/proto/build-proto.js index 13705cbd..c5b96946 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -71,14 +71,15 @@ async function main() { // Create output directories if they don't exist await fs.mkdir(TS_OUT_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 = [ @@ -90,7 +91,7 @@ async function main() { ...protoFiles, ].join(" ") try { - console.log(chalk.cyan(`Generating TypeScript code for:\n${protoFiles.join("\n")}...`)) + log_verbose(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) @@ -108,15 +109,15 @@ async function main() { ...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() @@ -124,6 +125,8 @@ async function main() { await generateHostServiceConfig() await generateGrpcClientConfig() await generateHostGrpcClientConfig() + + console.log(chalk.bold.blue("Finished Protocol Buffer code generation.")) } /** @@ -131,7 +134,7 @@ 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 = [] @@ -168,7 +171,7 @@ export { 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}`)) + log_verbose(chalk.green(`Generated gRPC client at ${configPath}`)) } /** @@ -178,7 +181,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() @@ -230,7 +233,7 @@ 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 }) @@ -240,7 +243,7 @@ async function generateMethodRegistrations() { try { await fs.access(serviceDir) } catch (error) { - console.log(chalk.cyan(`Creating directory ${serviceDir} for new service`)) + log_verbose(chalk.cyan(`Creating directory ${serviceDir} for new service`)) await fs.mkdir(serviceDir, { recursive: true }) } @@ -251,7 +254,7 @@ async function generateMethodRegistrations() { 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 }) @@ -304,7 +307,7 @@ export function registerAllMethods(): void { // Write the methods.ts file await fs.writeFile(registryFile, methodsContent) - console.log(chalk.green(`Generated ${registryFile}`)) + log_verbose(chalk.green(`Generated ${registryFile}`)) // Generate index.ts file const capitalizedServiceName = serviceName.charAt(0).toUpperCase() + serviceName.slice(1) @@ -333,10 +336,10 @@ registerAllMethods()` // Write the index.ts file await fs.writeFile(indexFile, indexContent) - console.log(chalk.green(`Generated ${indexFile}`)) + log_verbose(chalk.green(`Generated ${indexFile}`)) } - console.log(chalk.green("Method registration files generated successfully.")) + log_verbose(chalk.green("Method registration files generated successfully.")) } /** @@ -344,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 = [] @@ -385,7 +388,7 @@ export const serviceHandlers: Record = {${serviceC 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}`)) + log_verbose(chalk.green(`Generated service configuration at ${configPath}`)) } /** @@ -393,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 }) @@ -402,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., "cline.ModelsService" -> "ModelsService") const serviceClassName = fullServiceName.split(".").pop() @@ -435,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}`)) } } } @@ -444,7 +447,7 @@ 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") }) @@ -454,7 +457,7 @@ async function generateHostMethodRegistrations() { try { await fs.access(serviceDir) } catch (error) { - console.log(chalk.cyan(`Creating directory ${serviceDir} for new host service`)) + log_verbose(chalk.cyan(`Creating directory ${serviceDir} for new host service`)) await fs.mkdir(serviceDir, { recursive: true }) } @@ -465,7 +468,7 @@ async function generateHostMethodRegistrations() { 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 }) @@ -518,7 +521,7 @@ export function registerAllMethods(): void { // Write the methods.ts file await fs.writeFile(registryFile, methodsContent) - console.log(chalk.green(`Generated ${registryFile}`)) + log_verbose(chalk.green(`Generated ${registryFile}`)) // Generate index.ts file const capitalizedServiceName = serviceName.charAt(0).toUpperCase() + serviceName.slice(1) @@ -547,17 +550,17 @@ registerAllMethods()` // Write the index.ts file await fs.writeFile(indexFile, indexContent) - console.log(chalk.green(`Generated ${indexFile}`)) + 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 = [] @@ -598,21 +601,21 @@ export const hostServiceHandlers: Record = {${ const configPath = path.join(ROOT_DIR, "src", "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}`)) + log_verbose(chalk.green(`Generated host service configuration at ${configPath}`)) } /** * Generate a gRPC client configuration file for host services */ async function generateHostGrpcClientConfig() { - console.log(chalk.cyan("Generating host gRPC client configuration...")) + log_verbose(chalk.cyan("Generating host gRPC client configuration...")) const serviceImports = [] const serviceClientCreations = [] const serviceExports = [] // Process each service in the hostServiceNameMap - for (const [dirName, fullServiceName] of Object.entries(hostServiceNameMap)) { + for (const [dirName, _fullServiceName] of Object.entries(hostServiceNameMap)) { const capitalizedName = dirName.charAt(0).toUpperCase() + dirName.slice(1) // Add import statement @@ -643,12 +646,12 @@ export { const configPath = path.join(ROOT_DIR, "src", "hosts", "vscode", "client", "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}`)) + log_verbose(chalk.green(`Generated host gRPC client at ${configPath}`)) } async function cleanup() { // Clean up existing generated files - console.log(chalk.cyan("Cleaning up existing generated TypeScript 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)) @@ -705,6 +708,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) From 2a0d60f642809f83c37d25049fb9806162b9910e Mon Sep 17 00:00:00 2001 From: Ara Date: Thu, 12 Jun 2025 08:14:18 +0530 Subject: [PATCH 27/76] Adding Thinking UX for Gemini (#4137) --- .changeset/wet-rice-hunt.md | 5 +++ package-lock.json | 17 ++++---- package.json | 2 +- src/api/providers/gemini.ts | 41 +++++++++++++++++-- src/api/transform/stream.ts | 1 + src/shared/api.ts | 6 +++ .../src/components/settings/ApiOptions.tsx | 19 ++++----- 7 files changed, 69 insertions(+), 22 deletions(-) create mode 100644 .changeset/wet-rice-hunt.md diff --git a/.changeset/wet-rice-hunt.md b/.changeset/wet-rice-hunt.md new file mode 100644 index 00000000..b8f53156 --- /dev/null +++ b/.changeset/wet-rice-hunt.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Adding Thinking UX for Gemini diff --git a/package-lock.json b/package-lock.json index 0fc7cb26..7716eed7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@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", @@ -5498,9 +5498,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", @@ -5510,6 +5510,9 @@ }, "engines": { "node": ">=18.0.0" + }, + "peerDependencies": { + "@modelcontextprotocol/sdk": "^1.11.0" } }, "node_modules/@grpc/grpc-js": { @@ -31182,9 +31185,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", diff --git a/package.json b/package.json index 553ff474..bc6b6f89 100644 --- a/package.json +++ b/package.json @@ -404,7 +404,7 @@ "@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", diff --git a/src/api/providers/gemini.ts b/src/api/providers/gemini.ts index bfecbea4..ed0db827 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, 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/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/shared/api.ts b/src/shared/api.ts index 4af457fb..4de499fb 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -598,6 +598,9 @@ export const vertexModels = { cacheReadsPrice: 0.625, }, ], + thinkingConfig: { + maxBudget: 32768, + }, }, "gemini-2.5-flash-preview-04-17": { maxTokens: 65536, @@ -766,6 +769,9 @@ export const geminiModels = { cacheReadsPrice: 0.625, }, ], + thinkingConfig: { + maxBudget: 32768, + }, }, "gemini-2.5-flash-preview-05-20": { maxTokens: 65536, diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 18fda47b..6cfb211b 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -119,7 +119,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", @@ -132,6 +139,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 @@ -1057,15 +1065,6 @@ const ApiOptions = ({ )}

- - {/* Add Thinking Budget Slider specifically for gemini-2.5-flash-preview-04-17 */} - {selectedProvider === "gemini" && selectedModelId === "gemini-2.5-flash-preview-04-17" && ( - - )}
)} From 95ad8d879b0595530317b38095366dc398249cbf Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Wed, 11 Jun 2025 20:15:27 -0700 Subject: [PATCH 28/76] change text (#4185) * change text * changeset --- .changeset/gold-pillows-greet.md | 5 +++++ webview-ui/src/components/chat/ChatTextArea.tsx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/gold-pillows-greet.md diff --git a/.changeset/gold-pillows-greet.md b/.changeset/gold-pillows-greet.md new file mode 100644 index 00000000..66707480 --- /dev/null +++ b/.changeset/gold-pillows-greet.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +change text field input diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index 780c6eec..78f377ed 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -1576,7 +1576,7 @@ const ChatTextArea = forwardRef( /> {!inputValue && selectedImages.length === 0 && selectedFiles.length === 0 && (
- Type @ for context, / for slash commands & workflows + Type @ for context, / for slash commands & workflows, hold shift to drag in files/images
)} {(selectedImages.length > 0 || selectedFiles.length > 0) && ( From 8b4e8ce37f7f282c7ba81cd1755fe1294098dc54 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 22:20:14 -0700 Subject: [PATCH 29/76] v3.17.13 Release Notes v3.17.13 Release Notes --- .changeset/angry-terms-mate.md | 5 ----- .changeset/calm-snails-hammer.md | 5 ----- .changeset/famous-papayas-repair.md | 5 ----- .changeset/gold-pillows-greet.md | 5 ----- .changeset/neat-guests-itch.md | 5 ----- .changeset/purple-islands-move.md | 5 ----- .changeset/real-clouds-act.md | 5 ----- .changeset/seven-insects-shop.md | 5 ----- .changeset/sour-poets-smile.md | 5 ----- .changeset/wet-rice-hunt.md | 5 ----- CHANGELOG.md | 12 ++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 13 files changed, 15 insertions(+), 53 deletions(-) delete mode 100644 .changeset/angry-terms-mate.md delete mode 100644 .changeset/calm-snails-hammer.md delete mode 100644 .changeset/famous-papayas-repair.md delete mode 100644 .changeset/gold-pillows-greet.md delete mode 100644 .changeset/neat-guests-itch.md delete mode 100644 .changeset/purple-islands-move.md delete mode 100644 .changeset/real-clouds-act.md delete mode 100644 .changeset/seven-insects-shop.md delete mode 100644 .changeset/sour-poets-smile.md delete mode 100644 .changeset/wet-rice-hunt.md diff --git a/.changeset/angry-terms-mate.md b/.changeset/angry-terms-mate.md deleted file mode 100644 index 439a7f11..00000000 --- a/.changeset/angry-terms-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -updating o3 model pricing diff --git a/.changeset/calm-snails-hammer.md b/.changeset/calm-snails-hammer.md deleted file mode 100644 index 9cf80462..00000000 --- a/.changeset/calm-snails-hammer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Sorting mcp marketplace by newest listings by default diff --git a/.changeset/famous-papayas-repair.md b/.changeset/famous-papayas-repair.md deleted file mode 100644 index 76f91aef..00000000 --- a/.changeset/famous-papayas-repair.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Migrate focusChatInput message to protobus diff --git a/.changeset/gold-pillows-greet.md b/.changeset/gold-pillows-greet.md deleted file mode 100644 index 66707480..00000000 --- a/.changeset/gold-pillows-greet.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -change text field input diff --git a/.changeset/neat-guests-itch.md b/.changeset/neat-guests-itch.md deleted file mode 100644 index 3d21c943..00000000 --- a/.changeset/neat-guests-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -fix(bedrock): remove Anthropic-Bedrock SDK diff --git a/.changeset/purple-islands-move.md b/.changeset/purple-islands-move.md deleted file mode 100644 index e0670629..00000000 --- a/.changeset/purple-islands-move.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Remove ‘-beta’ from grok model id diff --git a/.changeset/real-clouds-act.md b/.changeset/real-clouds-act.md deleted file mode 100644 index 0bc6af81..00000000 --- a/.changeset/real-clouds-act.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -fix menu for setting terminal timeout diff --git a/.changeset/seven-insects-shop.md b/.changeset/seven-insects-shop.md deleted file mode 100644 index a535acd5..00000000 --- a/.changeset/seven-insects-shop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Add prompt caching indicator to grok 3 diff --git a/.changeset/sour-poets-smile.md b/.changeset/sour-poets-smile.md deleted file mode 100644 index 1fac657f..00000000 --- a/.changeset/sour-poets-smile.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Supporting Notifications MCP with Cline diff --git a/.changeset/wet-rice-hunt.md b/.changeset/wet-rice-hunt.md deleted file mode 100644 index b8f53156..00000000 --- a/.changeset/wet-rice-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Adding Thinking UX for Gemini diff --git a/CHANGELOG.md b/CHANGELOG.md index c7b2593d..fd9aa04c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [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 diff --git a/package-lock.json b/package-lock.json index 7716eed7..96e81d5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "3.17.12", + "version": "3.17.13", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "3.17.12", + "version": "3.17.13", "license": "Apache-2.0", "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.12.4", diff --git a/package.json b/package.json index bc6b6f89..979fcb61 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.12", + "version": "3.17.13", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From 741b1edf7358698ca468606e07759d72e0ad22ef Mon Sep 17 00:00:00 2001 From: Hanzen Shou Date: Thu, 12 Jun 2025 10:50:59 -0700 Subject: [PATCH 30/76] Refactor copy buttons (#3456) * refactor: moved copy logic to CopyButtonComponents.tsx * refactor: simplified copy button components * clean: format & cleanup code * clean: removed comments * fix: fixed aria labels * clean: removed old comments * clean: reduced deltas * clean: deleted comment in ChatRow.tsx * updates * changeset --------- Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com> --- .changeset/shiny-taxis-suffer.md | 5 + webview-ui/src/components/chat/ChatRow.tsx | 78 ++-------- .../src/components/common/CopyButton.tsx | 138 ++++++++++++++++++ .../src/components/common/MarkdownBlock.tsx | 51 ++----- 4 files changed, 174 insertions(+), 98 deletions(-) create mode 100644 .changeset/shiny-taxis-suffer.md create mode 100644 webview-ui/src/components/common/CopyButton.tsx diff --git a/.changeset/shiny-taxis-suffer.md b/.changeset/shiny-taxis-suffer.md new file mode 100644 index 00000000..66429eb6 --- /dev/null +++ b/.changeset/shiny-taxis-suffer.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +update the copy button functionality diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 2a47d806..65f62efa 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; @@ -1086,7 +1033,11 @@ export const ChatRowContent = ({ ) case "text": return ( - + {quoteButtonState.visible && ( + 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} - + ) } From 5e55a7a095509cab8f65fe871dd4357b61276907 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Thu, 12 Jun 2025 11:33:44 -0700 Subject: [PATCH 31/76] return files if targeted directory is hidden (#4176) --- .changeset/beige-turtles-jump.md | 5 ++ src/services/glob/list-files.ts | 86 +++++++++++++++++++++----------- 2 files changed, 61 insertions(+), 30 deletions(-) create mode 100644 .changeset/beige-turtles-jump.md diff --git a/.changeset/beige-turtles-jump.md b/.changeset/beige-turtles-jump.md new file mode 100644 index 00000000..2107ca8a --- /dev/null +++ b/.changeset/beige-turtles-jump.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Fix list_files tool to return files if the targeted directory is a hidden directory 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] From 227c7195f65a5a8556959c30dc4029685978e693 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Thu, 12 Jun 2025 11:34:20 -0700 Subject: [PATCH 32/76] move saveClineMessagesAndUpdateHistory out to a separate state utilities file (#4190) --- src/core/task/index.ts | 236 ++++++++++++++++++++++++--------- src/core/task/message-state.ts | 66 +++++++++ 2 files changed, 238 insertions(+), 64 deletions(-) create mode 100644 src/core/task/message-state.ts diff --git a/src/core/task/index.ts b/src/core/task/index.ts index 9be2a176..c1b70da3 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -114,6 +114,7 @@ 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 { saveClineMessagesAndUpdateHistory } from "./message-state" export const USE_EXPERIMENTAL_CLAUDE4_FEATURES = false @@ -343,52 +344,28 @@ export class Task { 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() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) } 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) - } + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) } async restoreCheckpoint(messageTs: number, restoreType: ClineCheckpointRestore, offset?: number) { @@ -515,9 +492,15 @@ export class Task { }) } - await this.saveClineMessagesAndUpdateHistory() - - sendRelinquishControlEvent() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) this.cancelTask() // the task is already cancelled by the provider beforehand, but we need to re-init to get the updated messages } else { @@ -790,7 +773,15 @@ export class Task { // lastMessage.ts = askTs lastMessage.text = text lastMessage.partial = false - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) // await this.postStateToWebview() const protoMessage = convertClineMessageToProto(lastMessage) await sendPartialMessageEvent(protoMessage) @@ -898,7 +889,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 saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) // await this.postStateToWebview() const protoMessage = convertClineMessageToProto(lastMessage) await sendPartialMessageEvent(protoMessage) // more performant than an entire postStateToWebview @@ -947,8 +946,15 @@ export class Task { const lastMessage = this.clineMessages.at(-1) if (lastMessage?.partial && lastMessage.type === type && (lastMessage.ask === askOrSay || lastMessage.say === askOrSay)) { this.clineMessages.pop() - await this.saveClineMessagesAndUpdateHistory() - await this.postStateToWebview() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) } } @@ -1232,7 +1238,15 @@ export class Task { const lastCheckpointMessage = findLast(this.clineMessages, (m) => m.say === "checkpoint_created") if (lastCheckpointMessage) { lastCheckpointMessage.lastCheckpointHash = commitHash - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) } }) // silently fails for now @@ -1264,7 +1278,15 @@ export class Task { ) if (lastCompletionResultMessage) { lastCompletionResultMessage.lastCheckpointHash = commitHash - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) } } else { console.error("Checkpoint tracker does not exist and could not be initialized for attempt completion") @@ -1702,7 +1724,15 @@ 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 saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) // saves task history item which we use to keep track of conversation history deleted range } let stream = this.api.createMessage(systemPrompt, contextManagementMetadata.truncatedConversationHistory) @@ -1727,7 +1757,15 @@ export class Task { this.conversationHistoryDeletedRange, "quarter", // Force aggressive truncation ) - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( Date.now(), await ensureTaskDirectoryExists(this.getContext(), this.taskId), @@ -1741,7 +1779,15 @@ export class Task { this.conversationHistoryDeletedRange, "quarter", // Force aggressive truncation ) - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( Date.now(), await ensureTaskDirectoryExists(this.getContext(), this.taskId), @@ -3505,8 +3551,15 @@ export class Task { ...sharedMessage, selected: text, } satisfies ClineAskQuestion) - await this.saveClineMessagesAndUpdateHistory() - telemetryService.captureOptionSelected(this.taskId, options.length, "act") + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) } } else { // Option not selected, send user feedback @@ -3638,7 +3691,15 @@ export class Task { this.conversationHistoryDeletedRange, keepStrategy, ) - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( Date.now(), await ensureTaskDirectoryExists(this.getContext(), this.taskId), @@ -3939,8 +4000,15 @@ export class Task { ...sharedMessage, selected: text, } satisfies ClinePlanModeResponse) - await this.saveClineMessagesAndUpdateHistory() - telemetryService.captureOptionSelected(this.taskId, options.length, "plan") + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) } } else { // Option not selected, send user feedback @@ -4042,7 +4110,15 @@ export class Task { ) { lastCompletionResultMessage.text += COMPLETION_RESULT_CHANGES_FLAG } - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) } try { @@ -4377,7 +4453,15 @@ export class Task { this.clineMessages[lastApiReqIndex].text = JSON.stringify({ request: userContent.map((block) => formatContentBlockToMarkdown(block)).join("\n\n"), } satisfies ClineApiReqInfo) - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) await this.postStateToWebview() try { @@ -4448,7 +4532,15 @@ 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 saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) telemetryService.captureConversationTurnEvent( this.taskId, @@ -4574,7 +4666,15 @@ export class Task { totalCost = apiStreamUsage.totalCost } updateApiReqMsg() - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) await this.postStateToWebview() }) } @@ -4598,7 +4698,15 @@ export class Task { } updateApiReqMsg() - await this.saveClineMessagesAndUpdateHistory() + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) await this.postStateToWebview() // now add to apiconversationhistory diff --git a/src/core/task/message-state.ts b/src/core/task/message-state.ts new file mode 100644 index 00000000..92d4f01d --- /dev/null +++ b/src/core/task/message-state.ts @@ -0,0 +1,66 @@ +import { combineApiRequests } from "@/shared/combineApiRequests" +import { ensureTaskDirectoryExists, 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" + +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 + +// need to call getContext() from the task object when passing in context +export async function saveClineMessagesAndUpdateHistory( + context: vscode.ExtensionContext, + taskId: string, + clineMessages: ClineMessage[], + taskIsFavorited: boolean, + conversationHistoryDeletedRange: [number, number] | undefined, + checkpointTracker: CheckpointTracker | undefined, + updateTaskHistory: (historyItem: HistoryItem) => Promise, +) { + try { + await saveClineMessages(context, taskId, clineMessages) + + // combined as they are in ChatView + const apiMetrics = getApiMetrics(combineApiRequests(combineCommandSequences(clineMessages.slice(1)))) + const taskMessage = clineMessages[0] // first message is always the task say + const lastRelevantMessage = + clineMessages[ + findLastIndex( + clineMessages, + (message) => !(message.ask === "resume_task" || message.ask === "resume_completed_task"), + ) + ] + const taskDir = await ensureTaskDirectoryExists(context, 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 updateTaskHistory({ + id: 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 checkpointTracker?.getShadowGitConfigWorkTree(), + cwdOnTaskInitialization: cwd, + conversationHistoryDeletedRange: conversationHistoryDeletedRange, + isFavorited: taskIsFavorited, + }) + } catch (error) { + console.error("Failed to save cline messages:", error) + } +} From a4bf34f73b18dd63003a9a396095dff36b0dc3bf Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Thu, 12 Jun 2025 12:49:36 -0700 Subject: [PATCH 33/76] Generate grpc-js services and clients (#4199) * Generate clientImpls and services for grpc-js. Generate grpc-js services and clients (as opposed to the generic service definition) The grpc-js clients are needed to connet to external gRPC services, ie the host bridge. Switch the standalone gRPC service to use the grpc-js service defintions, these have the correct serialize/deserialize methods and fix the camel/snake case issue. * Formatting --- .gitignore | 1 + proto/build-proto.js | 62 ++++++++++++++++--------------- scripts/generate-server-setup.mjs | 9 ++--- src/standalone/standalone.ts | 18 ++++----- src/standalone/utils.ts | 62 ++++--------------------------- 5 files changed, 53 insertions(+), 99 deletions(-) diff --git a/.gitignore b/.gitignore index 204b6750..5d1536e1 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ coverage *evals.env # Generated proto files +src/generated/ src/core/controller/*/methods.ts src/core/controller/*/index.ts src/core/controller/grpc-service-config.ts diff --git a/proto/build-proto.js b/proto/build-proto.js index c5b96946..99ee4739 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -10,25 +10,24 @@ 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 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", - "outputIndex=true", // output an index file for each package which exports all protos in the package. - "outputServices=generic-definitions", - "useOptionals=messages", // Message fields are optional, scalars are not. "useDate=false", // Timestamp fields will not be automatically converted to Date. ] @@ -70,7 +69,9 @@ async function main() { checkAppleSiliconCompatibility() // Create output directories if they don't exist - await fs.mkdir(TS_OUT_DIR, { recursive: true }) + for (const dir of [TS_OUT_DIR, GRPC_JS_OUT_DIR, DESCRIPTOR_OUT_DIR]) { + await fs.mkdir(dir, { recursive: true }) + } await cleanup() @@ -81,28 +82,12 @@ async function main() { 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=${TS_PROTO_OPTIONS.join(",")} `, - ...protoFiles, - ].join(" ") - try { - log_verbose(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, ["outputServices=generic-definitions", ...TS_PROTO_OPTIONS]) + tsProtoc(GRPC_JS_OUT_DIR, protoFiles, ["outputServices=grpc-js", ...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", @@ -129,6 +114,25 @@ async function main() { 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 tsProtocCommand = [ + PROTOC, + `--proto_path="${SCRIPT_DIR}"`, + `--plugin=protoc-gen-ts_proto="${TS_PROTO_PLUGIN}"`, + `--ts_proto_out="${outDir}"`, + `--ts_proto_opt=${protoOptions.join(",")} `, + ...protoFiles, + ].join(" ") + try { + log_verbose(chalk.cyan(`Generating TypeScript code in ${outDir} 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) + } +} + /** * Generate a gRPC client configuration file for the webview * This eliminates the need for manual imports and client creation in grpc-client.ts @@ -141,7 +145,7 @@ async function generateGrpcClientConfig() { 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 diff --git a/scripts/generate-server-setup.mjs b/scripts/generate-server-setup.mjs index 1b6b4841..c3f54fe8 100644 --- a/scripts/generate-server-setup.mjs +++ b/scripts/generate-server-setup.mjs @@ -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.cline.${name}.service, {`) + handlerSetup.push(` server.addService(cline.${name}Service, {`) for (const [rpcName, rpc] of Object.entries(def.service)) { imports.push(`import { ${rpcName} } from "../core/controller/${dir}/${rpcName}"`) - const requestType = "proto.cline." + rpc.requestType.type.name + const requestType = "cline." + 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.cline." + rpc.responseType.type.name + const responseType = "cline." + 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 { cline } from "../generated/grpc-js" import { Controller } from "../core/controller" import { GrpcHandlerWrapper, GrpcStreamingResponseHandlerWrapper } from "./grpc-types" ${imports} export function addServices( server: grpc.Server, - proto: any, controller: Controller, wrapper: GrpcHandlerWrapper, wrapStreamingResponse: GrpcStreamingResponseHandlerWrapper, diff --git a/src/standalone/standalone.ts b/src/standalone/standalone.ts index 4f33db7b..383d136d 100644 --- a/src/standalone/standalone.ts +++ b/src/standalone/standalone.ts @@ -5,7 +5,7 @@ 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 { StreamingResponseHandler } from "@/core/controller/grpc-handler" @@ -22,10 +22,10 @@ function main() { healthImpl.addToServer(server) // Add all the handlers for the ProtoBus services to the server. - addServices(server, proto, controller, wrapHandler, wrapStreamingResponseHandler) + addServices(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 +58,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 +81,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 +92,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..0c17ee79 100644 --- a/src/standalone/utils.ts +++ b/src/standalone/utils.ts @@ -8,58 +8,12 @@ const log = (...args: unknown[]) => { 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 - } - - 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 } From 0fade12e8ef64bfe4b4bbe4a4edac1c37cc4c5aa Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Thu, 12 Jun 2025 13:28:39 -0700 Subject: [PATCH 34/76] Format files before commit (#4155) Instead of doing a prettier check in the pre-commit, just format the staged changes. Use the package lint-stage to handle only formatting staged changes. --- .husky/pre-commit | 8 +- package-lock.json | 802 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 6 + 3 files changed, 799 insertions(+), 17 deletions(-) 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/package-lock.json b/package-lock.json index 96e81d5e..bf13a511 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,6 +101,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", @@ -13616,6 +13617,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", @@ -13767,6 +13810,13 @@ "color-support": "bin.js" } }, + "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", @@ -14214,9 +14264,9 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -14939,6 +14989,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", @@ -15597,6 +15660,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", @@ -16924,6 +16994,19 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-east-asian-width": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-folder-size": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/get-folder-size/-/get-folder-size-5.0.0.tgz", @@ -19173,18 +19256,156 @@ "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", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "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", @@ -19380,6 +19601,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.2.4", "resolved": "https://registry.npmjs.org/long/-/long-5.2.4.tgz", @@ -20771,6 +21166,19 @@ "node": ">=6" } }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/mimic-response": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", @@ -21157,6 +21565,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", @@ -23731,6 +24152,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", @@ -24455,6 +24883,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", @@ -24748,6 +25219,16 @@ "safe-buffer": "~5.1.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", @@ -26568,15 +27049,16 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz", - "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", "dev": true, + "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" } }, "node_modules/yargs": { @@ -37046,6 +37528,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", @@ -37156,6 +37667,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", @@ -37435,9 +37952,9 @@ "integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==" }, "debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", "requires": { "ms": "^2.1.3" } @@ -37914,6 +38431,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", @@ -38394,6 +38917,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", @@ -39311,6 +39840,12 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, + "get-east-asian-width": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "dev": true + }, "get-folder-size": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/get-folder-size/-/get-folder-size-5.0.0.tgz", @@ -40832,17 +41367,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", @@ -40993,6 +41616,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.2.4", "resolved": "https://registry.npmjs.org/long/-/long-5.2.4.tgz", @@ -41912,6 +42640,12 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, + "mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true + }, "mimic-response": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-4.0.0.tgz", @@ -42177,6 +42911,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", @@ -43963,6 +44703,12 @@ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" }, + "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", @@ -44487,6 +45233,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", @@ -44693,6 +45463,12 @@ "safe-buffer": "~5.1.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", @@ -45932,9 +46708,9 @@ "dev": true }, "yaml": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz", - "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz", + "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index 979fcb61..dd031da8 100644 --- a/package.json +++ b/package.json @@ -358,6 +358,11 @@ "docs:rename-file": "cd docs && mintlify rename", "report-issue": "node scripts/report-issue.js" }, + "lint-staged": { + "*": [ + "prettier --write --ignore-unknown --log-level=log" + ] + }, "devDependencies": { "@changesets/cli": "^2.27.12", "@types/chai": "^5.0.1", @@ -384,6 +389,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", From 10a223f27d522f26515513a309701dfc05378a69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Vali=C3=B1a=20Lema?= Date: Fri, 13 Jun 2025 17:21:24 +0200 Subject: [PATCH 35/76] Terminal profile setting (#4079) * feat: Added a configurable default terminal profile setting * chore: format * refactor: migrate terminal profiles to gRPC and remove legacy message handling - rename AvailableTerminalProfilesResponse to TerminalProfiles in proto - remove duplicate TerminalProfile type from terminal_types.ts - update all imports to use TerminalProfile from proto/state - remove legacy availableTerminalProfiles message handling from ExtensionStateContext - clean up ExtensionMessage type by removing unused availableTerminalProfiles - translate Spanish comment to English in TerminalSettingsSection - update server-side getAvailableTerminalProfiles to use new proto type * chore: lint * fix: merge main * fix: resolve errors * chore: notify terminal profile settings * chore: merge main * feat: improve default terminal profile changes * fix: update changes on save --- .changeset/nice-trees-ring.md | 5 + proto/state.proto | 24 +++- src/core/controller/index.ts | 5 + .../state/getAvailableTerminalProfiles.ts | 19 +++ .../state/updateDefaultTerminalProfile.ts | 50 ++++++++ .../state/updateTerminalConnectionTimeout.ts | 18 +++ .../state/updateTerminalReuseEnabled.ts | 18 +++ src/core/storage/state-keys.ts | 1 + src/core/storage/state.ts | 3 + src/core/task/index.ts | 6 +- src/integrations/terminal/TerminalManager.ts | 113 +++++++++++++++++- src/integrations/terminal/TerminalRegistry.ts | 17 ++- src/shared/ExtensionMessage.ts | 1 + src/shared/WebviewMessage.ts | 1 + src/utils/shell.ts | 108 ++++++++++++++++- .../src/components/settings/SettingsView.tsx | 33 ++++- .../settings/TerminalSettingsSection.tsx | 72 +++++++++-- .../src/context/ExtensionStateContext.tsx | 26 +++- 18 files changed, 492 insertions(+), 28 deletions(-) create mode 100644 .changeset/nice-trees-ring.md create mode 100644 src/core/controller/state/getAvailableTerminalProfiles.ts create mode 100644 src/core/controller/state/updateDefaultTerminalProfile.ts create mode 100644 src/core/controller/state/updateTerminalConnectionTimeout.ts create mode 100644 src/core/controller/state/updateTerminalReuseEnabled.ts diff --git a/.changeset/nice-trees-ring.md b/.changeset/nice-trees-ring.md new file mode 100644 index 00000000..c1554a89 --- /dev/null +++ b/.changeset/nice-trees-ring.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Added a configurable default terminal profile setting diff --git a/proto/state.proto b/proto/state.proto index 001fde28..fe5b916d 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -7,6 +7,10 @@ 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); @@ -19,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; @@ -42,10 +63,8 @@ message ChatContent { repeated string files = 3; } -// Message for auto approval settings message AutoApprovalSettingsRequest { Metadata metadata = 1; - message Actions { bool read_files = 1; bool read_files_externally = 2; @@ -56,7 +75,6 @@ message AutoApprovalSettingsRequest { bool use_browser = 7; bool use_mcp = 8; } - int32 version = 2; bool enabled = 3; Actions actions = 4; diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index df75f31e..bcb3a399 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -135,6 +135,7 @@ export class Controller { chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + defaultTerminalProfile, enableCheckpointsSetting, isNewUser, taskHistory, @@ -170,6 +171,7 @@ export class Controller { chatSettings, shellIntegrationTimeout, terminalReuseEnabled ?? true, + defaultTerminalProfile ?? "default", enableCheckpointsSetting ?? true, task, images, @@ -220,6 +222,7 @@ export class Controller { await this.postStateToWebview() break } + case "clearAllTaskHistory": { const answer = await vscode.window.showWarningMessage( "What would you like to delete?", @@ -952,6 +955,7 @@ export class Controller { globalWorkflowToggles, shellIntegrationTimeout, terminalReuseEnabled, + defaultTerminalProfile, isNewUser, mcpResponsesCollapsed, } = await getAllExtensionState(this.context) @@ -997,6 +1001,7 @@ export class Controller { globalWorkflowToggles: globalWorkflowToggles || {}, shellIntegrationTimeout, terminalReuseEnabled, + defaultTerminalProfile, isNewUser, mcpResponsesCollapsed, } diff --git a/src/core/controller/state/getAvailableTerminalProfiles.ts b/src/core/controller/state/getAvailableTerminalProfiles.ts new file mode 100644 index 00000000..302dfb44 --- /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.EmptyRequest, +): Promise { + const profiles = getTerminalProfilesFromShell() + + return proto.cline.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/updateDefaultTerminalProfile.ts b/src/core/controller/state/updateDefaultTerminalProfile.ts new file mode 100644 index 00000000..daf88c12 --- /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.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.TerminalProfileUpdateResponse.create({ + closedCount, + busyTerminalsCount: busyTerminals.length, + hasBusyTerminals: busyTerminals.length > 0, + }) +} diff --git a/src/core/controller/state/updateTerminalConnectionTimeout.ts b/src/core/controller/state/updateTerminalConnectionTimeout.ts new file mode 100644 index 00000000..acd8b68f --- /dev/null +++ b/src/core/controller/state/updateTerminalConnectionTimeout.ts @@ -0,0 +1,18 @@ +import { Controller } from "../index" +import * as proto from "@/shared/proto" +import { updateGlobalState } from "../../storage/state" + +export async function updateTerminalConnectionTimeout( + controller: Controller, + request: proto.cline.Int64Request, +): Promise { + const timeoutValue = request.value + + // 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.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..3934e285 --- /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.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.Empty.create({}) +} diff --git a/src/core/storage/state-keys.ts b/src/core/storage/state-keys.ts index 8fc408e7..7513e4e5 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -67,6 +67,7 @@ export type GlobalStateKey = | "shellIntegrationTimeout" | "mcpResponsesCollapsed" | "terminalReuseEnabled" + | "defaultTerminalProfile" | "isNewUser" export type LocalStateKey = diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index 8920d24f..48855746 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -237,6 +237,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { mcpResponsesCollapsedRaw, globalWorkflowToggles, terminalReuseEnabled, + defaultTerminalProfile, ] = await Promise.all([ getGlobalState(context, "isNewUser") as Promise, getSecret(context, "apiKey") as Promise, @@ -300,6 +301,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "mcpResponsesCollapsed") as Promise, getGlobalState(context, "globalWorkflowToggles") as Promise, getGlobalState(context, "terminalReuseEnabled") as Promise, + getGlobalState(context, "defaultTerminalProfile") as Promise, ]) const localClineRulesToggles = (await getWorkspaceState(context, "localClineRulesToggles")) as ClineRulesToggles @@ -496,6 +498,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { enableCheckpointsSetting: enableCheckpointsSetting, shellIntegrationTimeout: shellIntegrationTimeout || 4000, terminalReuseEnabled: terminalReuseEnabled ?? true, + defaultTerminalProfile: defaultTerminalProfile ?? "default", globalWorkflowToggles: globalWorkflowToggles || {}, } } diff --git a/src/core/task/index.ts b/src/core/task/index.ts index c1b70da3..7b0a7813 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -113,7 +113,7 @@ 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 { isClaude4ModelFamily } from "@utils/model-utils" import { saveClineMessagesAndUpdateHistory } from "./message-state" export const USE_EXPERIMENTAL_CLAUDE4_FEATURES = false @@ -141,7 +141,7 @@ export class Task { readonly taskId: string private taskIsFavorited?: boolean api: ApiHandler - private terminalManager: TerminalManager + terminalManager: TerminalManager private urlContentFetcher: UrlContentFetcher browserSession: BrowserSession contextManager: ContextManager @@ -204,6 +204,7 @@ export class Task { chatSettings: ChatSettings, shellIntegrationTimeout: number, terminalReuseEnabled: boolean, + defaultTerminalProfile: string, enableCheckpointsSetting: boolean, task?: string, images?: string[], @@ -223,6 +224,7 @@ export class Task { this.terminalManager = new TerminalManager() this.terminalManager.setShellIntegrationTimeout(shellIntegrationTimeout) this.terminalManager.setTerminalReuseEnabled(terminalReuseEnabled ?? true) + this.terminalManager.setDefaultTerminalProfile(defaultTerminalProfile) this.urlContentFetcher = new UrlContentFetcher(context) this.browserSession = new BrowserSession(context, browserSettings) this.contextManager = new ContextManager() diff --git a/src/integrations/terminal/TerminalManager.ts b/src/integrations/terminal/TerminalManager.ts index df2b4ba9..2f9dbc58 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,7 @@ export class TerminalManager { private disposables: vscode.Disposable[] = [] private shellIntegrationTimeout: number = 4000 private terminalReuseEnabled: boolean = true + private defaultTerminalProfile: string = "default" constructor() { let disposable: vscode.Disposable | undefined @@ -218,12 +220,18 @@ 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) const matchingTerminal = terminals.find((t) => { if (t.busy) { 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) { return false @@ -237,7 +245,7 @@ export class TerminalManager { // 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) => { @@ -275,8 +283,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 +326,103 @@ export class TerminalManager { setTerminalReuseEnabled(enabled: boolean): void { this.terminalReuseEnabled = enabled } + + 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/TerminalRegistry.ts b/src/integrations/terminal/TerminalRegistry.ts index 9a1f72d6..680ce233 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: "Cline", 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/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index ba4cc1fd..0dabf635 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -90,6 +90,7 @@ export interface ExtensionState { telemetrySetting: TelemetrySetting shellIntegrationTimeout: number terminalReuseEnabled?: boolean + defaultTerminalProfile?: string uriScheme?: string userInfo?: { displayName: string | null diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 2216e9c5..baf407c7 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -69,6 +69,7 @@ export interface WebviewMessage { offset?: number shellIntegrationTimeout?: number terminalReuseEnabled?: boolean + defaultTerminalProfile?: string } export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "messageResponse" 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/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index cdf2fa80..e1989dd1 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -6,7 +6,7 @@ import { cn } from "@/utils/cn" import { validateApiConfiguration, validateModelId } from "@/utils/validate" import { vscode } from "@/utils/vscode" import { ExtensionMessage } from "@shared/ExtensionMessage" -import { EmptyRequest } from "@shared/proto/common" +import { EmptyRequest, StringRequest } from "@shared/proto/common" import { PlanActMode, TogglePlanActModeRequest, UpdateSettingsRequest } from "@shared/proto/state" import { VSCodeButton, VSCodeCheckbox, VSCodeLink, VSCodeTextArea } from "@vscode/webview-ui-toolkit/react" import { CheckCheck, FlaskConical, Info, LucideIcon, Settings, SquareMousePointer, SquareTerminal, Webhook } from "lucide-react" @@ -130,6 +130,8 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { setShellIntegrationTimeout, terminalReuseEnabled, setTerminalReuseEnabled, + defaultTerminalProfile, + setDefaultTerminalProfile, mcpResponsesCollapsed, setMcpResponsesCollapsed, setApiConfiguration, @@ -146,6 +148,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + defaultTerminalProfile, }) const [apiErrorMessage, setApiErrorMessage] = useState(undefined) const [modelIdErrorMessage, setModelIdErrorMessage] = useState(undefined) @@ -189,6 +192,27 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { chatSettings: chatSettings ? convertChatSettingsToProtoChatSettings(chatSettings) : undefined, }), ) + + // 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, + mcpResponsesCollapsed, + chatSettings, + shellIntegrationTimeout, + terminalReuseEnabled, + defaultTerminalProfile, + } } catch (error) { console.error("Failed to update settings:", error) } @@ -214,7 +238,8 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { mcpResponsesCollapsed !== originalState.current.mcpResponsesCollapsed || JSON.stringify(chatSettings) !== JSON.stringify(originalState.current.chatSettings) || shellIntegrationTimeout !== originalState.current.shellIntegrationTimeout || - terminalReuseEnabled !== originalState.current.terminalReuseEnabled + terminalReuseEnabled !== originalState.current.terminalReuseEnabled || + defaultTerminalProfile !== originalState.current.defaultTerminalProfile setHasUnsavedChanges(hasChanges) }, [ @@ -227,6 +252,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + defaultTerminalProfile, ]) // Handle cancel button click @@ -263,6 +289,9 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { 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) } diff --git a/webview-ui/src/components/settings/TerminalSettingsSection.tsx b/webview-ui/src/components/settings/TerminalSettingsSection.tsx index 1ff264b3..fa58cf2f 100644 --- a/webview-ui/src/components/settings/TerminalSettingsSection.tsx +++ b/webview-ui/src/components/settings/TerminalSettingsSection.tsx @@ -1,10 +1,21 @@ -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 { 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) @@ -21,14 +32,23 @@ 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) + + StateServiceClient.updateTerminalConnectionTimeout({ + value: timeout, + } as Int64Request) + .then((response: Int64) => { + setShellIntegrationTimeout(response.value) + setInputValue((response.value / 1000).toString()) + }) + .catch((error) => { + console.error("Failed to update terminal connection timeout:", error) + }) } const handleInputBlur = () => { - // If there was an error, reset the input to the current valid value if (inputError) { setInputValue((shellIntegrationTimeout / 1000).toString()) setInputError(null) @@ -38,16 +58,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. +

+
+
+
+ { + 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. +

+
{ setEnableCheckpointsSetting, mcpMarketplaceEnabled, setMcpMarketplaceEnabled, + mcpRichDisplayEnabled, + setMcpRichDisplayEnabled, shellIntegrationTimeout, setShellIntegrationTimeout, terminalReuseEnabled, @@ -144,6 +146,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { planActSeparateModelsSetting, enableCheckpointsSetting, mcpMarketplaceEnabled, + mcpRichDisplayEnabled, mcpResponsesCollapsed, chatSettings, shellIntegrationTimeout, @@ -183,6 +186,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { telemetrySetting, enableCheckpointsSetting, mcpMarketplaceEnabled, + mcpRichDisplayEnabled, shellIntegrationTimeout, terminalReuseEnabled, mcpResponsesCollapsed, @@ -235,6 +239,8 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { 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 || @@ -248,6 +254,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { planActSeparateModelsSetting, enableCheckpointsSetting, mcpMarketplaceEnabled, + mcpRichDisplayEnabled, mcpResponsesCollapsed, chatSettings, shellIntegrationTimeout, @@ -282,6 +289,13 @@ 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) @@ -311,6 +325,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { setApiConfiguration, setEnableCheckpointsSetting, setMcpMarketplaceEnabled, + setMcpRichDisplayEnabled, setMcpResponsesCollapsed, ]) diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 04a5b845..631b9d2a 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -60,6 +60,7 @@ interface ExtensionStateContextType extends ExtensionState { 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 @@ -184,6 +185,7 @@ export const ExtensionStateContextProvider: React.FC<{ distinctId: "", planActSeparateModelsSetting: true, enableCheckpointsSetting: true, + mcpRichDisplayEnabled: true, globalClineRulesToggles: {}, localClineRulesToggles: {}, localCursorRulesToggles: {}, @@ -723,6 +725,11 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, mcpMarketplaceEnabled: value, })), + setMcpRichDisplayEnabled: (value) => + setState((prevState) => ({ + ...prevState, + mcpRichDisplayEnabled: value, + })), setMcpResponsesCollapsed: (value) => { setState((prevState) => ({ ...prevState, @@ -760,7 +767,6 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, chatSettings: value, })) - try { // Import the conversion functions const { convertApiConfigurationToProtoApiConfiguration } = await import( @@ -780,6 +786,7 @@ export const ExtensionStateContextProvider: React.FC<{ planActSeparateModelsSetting: state.planActSeparateModelsSetting, enableCheckpointsSetting: state.enableCheckpointsSetting, mcpMarketplaceEnabled: state.mcpMarketplaceEnabled, + mcpRichDisplayEnabled: state.mcpRichDisplayEnabled, mcpResponsesCollapsed: state.mcpResponsesCollapsed, }), ) From 6a11c78288b68541808347541851d3d60dfbf0c6 Mon Sep 17 00:00:00 2001 From: watany <76135106+watany-dev@users.noreply.github.com> Date: Sat, 14 Jun 2025 03:53:58 +0900 Subject: [PATCH 39/76] chore(bedrock): remove @anthropic-ai/bedrock-sdk (#4162) * remove @anthropic-ai/bedrock-sdk * changeset --- .changeset/fuzzy-queens-double.md | 5 + package-lock.json | 10662 ++++++---------------------- package.json | 4 +- 3 files changed, 2143 insertions(+), 8528 deletions(-) create mode 100644 .changeset/fuzzy-queens-double.md diff --git a/.changeset/fuzzy-queens-double.md b/.changeset/fuzzy-queens-double.md new file mode 100644 index 00000000..bff22719 --- /dev/null +++ b/.changeset/fuzzy-queens-double.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +chore(bedrock): remove @anthropic-ai/bedrock-sdk diff --git a/package-lock.json b/package-lock.json index 5abc6804..a5c5a008 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,10 @@ "version": "3.17.13", "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", @@ -141,25 +141,6 @@ "eslint": ">=8.0.0" } }, - "node_modules/@anthropic-ai/bedrock-sdk": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/@anthropic-ai/bedrock-sdk/-/bedrock-sdk-0.12.4.tgz", - "integrity": "sha512-kraOgWWyVO/Wef3wYbpws77pCZubg/hCzXQ7RGrLRJsRpbTIT+ms+MigGu/0b1qn3o5WuIrumlT3Qtu3esHpzw==", - "license": "MIT", - "dependencies": { - "@anthropic-ai/sdk": ">=0.36 <1", - "@aws-crypto/sha256-js": "^4.0.0", - "@aws-sdk/client-bedrock-runtime": "^3.423.0", - "@aws-sdk/credential-providers": "^3.341.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", @@ -319,55 +300,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", @@ -388,29 +320,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==", - "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==", - "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", @@ -452,15 +361,25 @@ "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "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", @@ -475,88 +394,6 @@ "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "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==", - "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==", @@ -567,7 +404,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==", @@ -579,7 +416,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==", @@ -592,7 +429,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==", @@ -605,435 +442,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/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "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/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/core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.5.1.tgz", - "integrity": "sha512-xSw7bZEFKwOKrm/iv8e2BLt2ur98YZdrRD6nII8ditQeUsY2Q1JmIQ0rpILOhaLKYxxG2ivnoOpokzr9qLyDWA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^4.0.8", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", "@smithy/util-stream": "^4.2.2", "@smithy/util-utf8": "^4.0.0", - "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" + "@types/uuid": "^9.0.1", + "tslib": "^2.6.2", + "uuid": "^9.0.1" }, "engines": { "node": ">=18.0.0" @@ -1053,263 +520,55 @@ "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/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/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==", + "node_modules/@aws-sdk/client-cognito-identity": { + "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": { - "@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-endpoint": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.9.tgz", - "integrity": "sha512-AjDgX4UjORLltD/LZCBQTwjQqEfyrx/GeDTHcYLzIgf87pIT70tMWnN87NQpJru1K4ITirY2htSOxNECZJCBOg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.5.1", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@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/shared-ini-file-loader": "^4.0.4", + "@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-middleware": "^4.0.4", - "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-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.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", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/middleware-serde": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz", - "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==", - "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-stack": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz", - "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==", - "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/node-config-provider": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz", - "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==", - "license": "Apache-2.0", - "dependencies": { - "@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/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/property-provider": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz", - "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==", - "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/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/querystring-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz", - "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==", - "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/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/shared-ini-file-loader": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz", - "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==", - "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/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" }, @@ -1317,16 +576,156 @@ "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==", + "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", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@aws-sdk/client-sso": { + "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": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-endpoint": "^4.1.9", + "@aws-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@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.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-sso/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/core": { + "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.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" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/core/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/credential-provider-cognito-identity": { + "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": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-cognito-identity/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/credential-provider-env": { + "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": { + "node": ">=18.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-env/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/credential-provider-http": { + "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" @@ -1335,1518 +734,324 @@ "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/url-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz", - "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^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/@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-middleware": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz", - "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==", - "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/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-stream": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.2.tgz", - "integrity": "sha512-aI+GLi7MJoVxg24/3J1ipwLoYzgkB4kUfogZfnslcYlynj3xsQ0e7vk4TnTro9hhsS5PvX1mwmkRqqHQjwcU7w==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-hex-encoding": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@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/@smithy/util-utf8": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", - "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/client-bedrock-runtime/node_modules/tslib": { + "node_modules/@aws-sdk/credential-provider-http/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-cognito-identity": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.623.0.tgz", - "integrity": "sha512-kGYnTzXTMGdjko5+GZ1PvWvfXA7quiOp5iMo5gbh5b55pzIdc918MHN0pvaqplVGWYlaFJF4YzxUT5Nbxd7Xeg==", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/client-sso-oidc": "3.623.0", - "@aws-sdk/client-sts": "3.623.0", - "@aws-sdk/core": "3.623.0", - "@aws-sdk/credential-provider-node": "3.623.0", - "@aws-sdk/middleware-host-header": "3.620.0", - "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.620.0", - "@aws-sdk/middleware-user-agent": "3.620.0", - "@aws-sdk/region-config-resolver": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@aws-sdk/util-user-agent-browser": "3.609.0", - "@aws-sdk/util-user-agent-node": "3.614.0", - "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.3.2", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/hash-node": "^3.0.3", - "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.5", - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.14", - "@smithy/util-defaults-mode-node": "^3.0.14", - "@smithy/util-endpoints": "^2.0.5", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.0.3", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.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==", - "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==", - "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==", - "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==", - "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": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "dependencies": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "dependencies": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "dependencies": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-cognito-identity/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/client-sso": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.623.0.tgz", - "integrity": "sha512-oEACriysQMnHIVcNp7TD6D1nzgiHfYK0tmMBMbUxgoFuCBkW9g9QYvspHN+S9KgoePfMEXHuPUe9mtG9AH9XeA==", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.623.0", - "@aws-sdk/middleware-host-header": "3.620.0", - "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.620.0", - "@aws-sdk/middleware-user-agent": "3.620.0", - "@aws-sdk/region-config-resolver": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@aws-sdk/util-user-agent-browser": "3.609.0", - "@aws-sdk/util-user-agent-node": "3.614.0", - "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.3.2", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/hash-node": "^3.0.3", - "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.5", - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.14", - "@smithy/util-defaults-mode-node": "^3.0.14", - "@smithy/util-endpoints": "^2.0.5", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.0.3", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.623.0.tgz", - "integrity": "sha512-lMFEXCa6ES/FGV7hpyrppT1PiAkqQb51AbG0zVU3TIgI2IO4XX02uzMUXImRSRqRpGymRCbJCaCs9LtKvS/37Q==", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.623.0", - "@aws-sdk/credential-provider-node": "3.623.0", - "@aws-sdk/middleware-host-header": "3.620.0", - "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.620.0", - "@aws-sdk/middleware-user-agent": "3.620.0", - "@aws-sdk/region-config-resolver": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@aws-sdk/util-user-agent-browser": "3.609.0", - "@aws-sdk/util-user-agent-node": "3.614.0", - "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.3.2", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/hash-node": "^3.0.3", - "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.5", - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.14", - "@smithy/util-defaults-mode-node": "^3.0.14", - "@smithy/util-endpoints": "^2.0.5", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.0.3", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-sts": "^3.623.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/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==", - "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-oidc/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==", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/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==", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/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==", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/node_modules/@smithy/fetch-http-handler": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "dependencies": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/node_modules/@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "dependencies": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/node_modules/@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "dependencies": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso-oidc/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "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==", - "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==", - "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==", - "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==", - "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": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "dependencies": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "dependencies": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "dependencies": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sso/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/client-sts": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.623.0.tgz", - "integrity": "sha512-iJNdx76SOw0YjHAUv8aj3HXzSu3TKI7qSGuR+OGATwA/kpJZDd+4+WYBdGtr8YK+hPrGGqhfecuCkEg805O5iA==", - "dependencies": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/client-sso-oidc": "3.623.0", - "@aws-sdk/core": "3.623.0", - "@aws-sdk/credential-provider-node": "3.623.0", - "@aws-sdk/middleware-host-header": "3.620.0", - "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.620.0", - "@aws-sdk/middleware-user-agent": "3.620.0", - "@aws-sdk/region-config-resolver": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@aws-sdk/util-user-agent-browser": "3.609.0", - "@aws-sdk/util-user-agent-node": "3.614.0", - "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.3.2", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/hash-node": "^3.0.3", - "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.5", - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.14", - "@smithy/util-defaults-mode-node": "^3.0.14", - "@smithy/util-endpoints": "^2.0.5", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.0.3", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/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==", - "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-sts/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==", - "dependencies": { - "@aws-sdk/types": "^3.222.0", - "@smithy/util-utf8": "^2.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/client-sts/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==", - "dependencies": { - "@smithy/is-array-buffer": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/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==", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/fetch-http-handler": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "dependencies": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/client-sts/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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "dependencies": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "dependencies": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/client-sts/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/core": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.623.0.tgz", - "integrity": "sha512-8Toq3X6trX/67obSdh4K0MFQY4f132bEbr1i0YPDWk/O3KdBt12mLC/sW3aVRnlIs110XMuX9yrWWqJ8fDW10g==", - "dependencies": { - "@smithy/core": "^2.3.2", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/signature-v4": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/util-middleware": "^3.0.3", - "fast-xml-parser": "4.4.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/signature-v4": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.1.0.tgz", - "integrity": "sha512-aRryp2XNZeRcOtuJoxjydO6QTaVhxx/vjaR+gx7ZjaFgrgPRyZ3HCTbfwqYj6ZWEBHkCSUfcaymKPURaByukag==", - "dependencies": { - "@smithy/is-array-buffer": "^3.0.0", - "@smithy/protocol-http": "^4.1.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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/core/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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/core/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.623.0.tgz", - "integrity": "sha512-sXU2KtWpFzIzE4iffSIUbl4mgbeN1Rta6BnuKtS3rrVrryku9akAxY//pulbsIsYfXRzOwZzULsa+cxQN00lrw==", - "dependencies": { - "@aws-sdk/client-cognito-identity": "3.623.0", - "@aws-sdk/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-cognito-identity/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.620.1", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.620.1.tgz", - "integrity": "sha512-ExuILJ2qLW5ZO+rgkNRj0xiAipKT16Rk77buvPP8csR7kkCflT/gXTyzRe/uzIiETTxM7tr8xuO9MP/DQXqkfg==", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-env/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.622.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.622.0.tgz", - "integrity": "sha512-VUHbr24Oll1RK3WR8XLUugLpgK9ZuxEm/NVeVqyFts1Ck9gsKpRg1x4eH7L7tW3SJ4TDEQNMbD7/7J+eoL2svg==", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/property-provider": "^3.1.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/fetch-http-handler": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "dependencies": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "dependencies": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "dependencies": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.623.0.tgz", - "integrity": "sha512-kvXA1SwGneqGzFwRZNpESitnmaENHGFFuuTvgGwtMe7mzXWuA/LkXdbiHmdyAzOo0iByKTCD8uetuwh3CXy4Pw==", + "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/credential-provider-env": "3.620.1", - "@aws-sdk/credential-provider-http": "3.622.0", - "@aws-sdk/credential-provider-process": "3.620.1", - "@aws-sdk/credential-provider-sso": "3.623.0", - "@aws-sdk/credential-provider-web-identity": "3.621.0", - "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.2.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.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": ">=16.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-sts": "^3.623.0" + "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-provider-ini/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "node_modules/@aws-sdk/credential-provider-ini/node_modules/@aws-sdk/nested-clients": { + "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.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.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": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@aws-sdk/credential-provider-ini/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/credential-provider-node": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.623.0.tgz", - "integrity": "sha512-qDwCOkhbu5PfaQHyuQ+h57HEx3+eFhKdtIw7aISziWkGdFrMe07yIBd7TJqGe4nxXnRF1pfkg05xeOlMId997g==", + "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.620.1", - "@aws-sdk/credential-provider-http": "3.622.0", - "@aws-sdk/credential-provider-ini": "3.623.0", - "@aws-sdk/credential-provider-process": "3.620.1", - "@aws-sdk/credential-provider-sso": "3.623.0", - "@aws-sdk/credential-provider-web-identity": "3.621.0", - "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.2.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.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" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-node/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@aws-sdk/credential-provider-node/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/credential-provider-process": { - "version": "3.620.1", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.620.1.tgz", - "integrity": "sha512-hWqFMidqLAkaV9G460+1at6qa9vySbjQKKc04p59OT7lZ5cO5VH5S4aI05e+m4j364MBROjjk2ugNvfNf/8ILg==", + "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/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.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" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-process/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@aws-sdk/credential-provider-process/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/credential-provider-sso": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.623.0.tgz", - "integrity": "sha512-70LZhUb3l7cttEsg4A0S4Jq3qrCT/v5Jfyl8F7w1YZJt5zr3oPPcvDJxo/UYckFz4G4/5BhGa99jK8wMlNE9QA==", + "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.623.0", - "@aws-sdk/token-providers": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.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" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/credential-provider-sso/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@aws-sdk/credential-provider-sso/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/credential-provider-web-identity": { - "version": "3.621.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.621.0.tgz", - "integrity": "sha512-w7ASSyfNvcx7+bYGep3VBgC3K6vEdLmlpjT7nSIHxxQf+WSdvy+HynwJosrpZax0sK5q0D1Jpn/5q+r5lwwW6w==", + "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/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.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": ">=16.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-sts": "^3.621.0" + "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/@aws-sdk/nested-clients": { + "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.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.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": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@aws-sdk/credential-provider-web-identity/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/credential-providers": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.623.0.tgz", - "integrity": "sha512-abtlH1hkVWAkzuOX79Q47l0ztWOV2Q7l7J4JwQgzEQm7+zCk5iUAiwqKyDzr+ByCyo4I3IWFjy+e1gBdL7rXQQ==", + "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.623.0", - "@aws-sdk/client-sso": "3.623.0", - "@aws-sdk/client-sts": "3.623.0", - "@aws-sdk/credential-provider-cognito-identity": "3.623.0", - "@aws-sdk/credential-provider-env": "3.620.1", - "@aws-sdk/credential-provider-http": "3.622.0", - "@aws-sdk/credential-provider-ini": "3.623.0", - "@aws-sdk/credential-provider-node": "3.623.0", - "@aws-sdk/credential-provider-process": "3.620.1", - "@aws-sdk/credential-provider-sso": "3.623.0", - "@aws-sdk/credential-provider-web-identity": "3.621.0", - "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.2.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.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": ">=16.0.0" + "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/credential-providers/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "node_modules/@aws-sdk/credential-providers/node_modules/@aws-sdk/nested-clients": { + "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.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.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": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@aws-sdk/credential-providers/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/eventstream-handler-node": { "version": "3.821.0", @@ -2863,31 +1068,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", @@ -2909,44 +1089,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", @@ -2954,296 +1096,6 @@ "license": "0BSD" }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.620.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.620.0.tgz", - "integrity": "sha512-VMtPEZwqYrII/oUkffYsNWY9PZ9xpNJpMgmyU0rlDQ25O1c0Hk3fJmZRe6pEkAJ0omD7kLrqGl1DUjQVxpd/Rg==", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-host-header/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/middleware-logger": { - "version": "3.609.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz", - "integrity": "sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ==", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-logger/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.620.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.620.0.tgz", - "integrity": "sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w==", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-recursion-detection/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.620.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.620.0.tgz", - "integrity": "sha512-bvS6etn+KsuL32ubY5D3xNof1qkenpbJXf/ugGXbg0n98DvDFQ/F+SMLxHgbnER5dsKYchNnhmtI6/FC3HFu/A==", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/middleware-user-agent/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "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/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/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==", @@ -3258,7 +1110,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==", @@ -3272,7 +1130,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==", @@ -3287,16 +1151,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" @@ -3305,7 +1175,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==", @@ -3322,7 +1198,86 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/types": { + "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", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@aws-sdk/token-providers": { + "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/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-sdk/nested-clients": { + "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.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.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/token-providers/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/types": { "version": "3.821.0", "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.821.0.tgz", "integrity": "sha512-Znroqdai1a90TlxGaJ+FK1lwC0fHpo97Xjsp5UKGR5JODYm7f9+/fF17ebO1KdoBr/Rm0UIFiF5VmI8ts9F1eA==", @@ -3335,7 +1290,13 @@ "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/util-endpoints": { + "node_modules/@aws-sdk/types/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-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==", @@ -3350,739 +1311,12 @@ "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/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "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/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/core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.5.1.tgz", - "integrity": "sha512-xSw7bZEFKwOKrm/iv8e2BLt2ur98YZdrRD6nII8ditQeUsY2Q1JmIQ0rpILOhaLKYxxG2ivnoOpokzr9qLyDWA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/middleware-serde": "^4.0.8", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-stream": "^4.2.2", - "@smithy/util-utf8": "^4.0.0", - "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": "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/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-endpoint": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.9.tgz", - "integrity": "sha512-AjDgX4UjORLltD/LZCBQTwjQqEfyrx/GeDTHcYLzIgf87pIT70tMWnN87NQpJru1K4ITirY2htSOxNECZJCBOg==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-middleware": "^4.0.4", - "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/middleware-serde": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz", - "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==", - "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-stack": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz", - "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==", - "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/node-config-provider": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz", - "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==", - "license": "Apache-2.0", - "dependencies": { - "@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/nested-clients/node_modules/@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/property-provider": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz", - "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==", - "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/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/querystring-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz", - "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==", - "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/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/shared-ini-file-loader": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz", - "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==", - "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/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/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/url-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz", - "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/querystring-parser": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/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-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-middleware": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz", - "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==", - "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/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-stream": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.2.tgz", - "integrity": "sha512-aI+GLi7MJoVxg24/3J1ipwLoYzgkB4kUfogZfnslcYlynj3xsQ0e7vk4TnTro9hhsS5PvX1mwmkRqqHQjwcU7w==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-hex-encoding": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@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/@smithy/util-utf8": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", - "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", - "license": "Apache-2.0", - "dependencies": { - "@smithy/util-buffer-from": "^4.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@aws-sdk/nested-clients/node_modules/tslib": { + "node_modules/@aws-sdk/util-endpoints/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.614.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.614.0.tgz", - "integrity": "sha512-vDCeMXvic/LU0KFIUjpC3RiSTIkkvESsEfbVHiHH0YINfl8HnEqR5rj+L8+phsCeVg2+LmYwYxd5NRz4PHxt5g==", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/types": "^3.3.0", - "@smithy/util-config-provider": "^3.0.0", - "@smithy/util-middleware": "^3.0.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/region-config-resolver/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/token-providers": { - "version": "3.614.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.614.0.tgz", - "integrity": "sha512-okItqyY6L9IHdxqs+Z116y5/nda7rHxLvROxtAJdLavWTYDydxrZstImNgGWTeVdmc0xX2gJCI77UYUTQWnhRw==", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - }, - "peerDependencies": { - "@aws-sdk/client-sso-oidc": "^3.614.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/token-providers/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/types": { - "version": "3.609.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.609.0.tgz", - "integrity": "sha512-+Tqnh9w0h2LcrUsdXyT1F8mNhXz+tVYBtP19LpeEGntmvHwa2XzvLUCWpoIAIVsHp5+HdB2X9Sn0KAtmbFXc2Q==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/types/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/types/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@aws-sdk/util-endpoints": { - "version": "3.614.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.614.0.tgz", - "integrity": "sha512-wK2cdrXHH4oz4IomV/yrGkftU9A+ITB6nFL+rxxyO78is2ifHJpFdV4aqk4LSkXYPi6CXWNru/Dqc7yiKXgJPw==", - "dependencies": { - "@aws-sdk/types": "3.609.0", - "@smithy/types": "^3.3.0", - "@smithy/util-endpoints": "^2.0.5", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/util-endpoints/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@aws-sdk/util-endpoints/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, "node_modules/@aws-sdk/util-locate-window": { "version": "3.568.0", "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.568.0.tgz", @@ -4100,44 +1334,37 @@ "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.609.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.609.0.tgz", - "integrity": "sha512-fojPU+mNahzQ0YHYBsx0ZIhmMA96H+ZIZ665ObU9tl+SGdbLneVZVikGve+NmHTQwHzwkFsZYYnVKAkreJLAtA==", + "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.609.0", - "@smithy/types": "^3.3.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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/@aws-sdk/util-user-agent-browser/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-user-agent-node": { - "version": "3.614.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.614.0.tgz", - "integrity": "sha512-15ElZT88peoHnq5TEoEtZwoXTXRxNrk60TZNdpl/TUBJ5oNJ9Dqb5Z4ryb8ofN6nm9aFf59GVAerFDz8iUoHBA==", + "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/types": "3.609.0", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/types": "^3.3.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": { - "node": ">=16.0.0" + "node": ">=18.0.0" }, "peerDependencies": { "aws-crt": ">=1.0.0" @@ -4148,34 +1375,30 @@ } } }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "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/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": { + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, - "node_modules/@aws-sdk/util-user-agent-node/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "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==", - "dependencies": { - "tslib": "^2.3.1" - } - }, - "node_modules/@aws-sdk/util-utf8-browser/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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==", + "license": "0BSD" }, "node_modules/@babel/code-frame": { "version": "7.27.1", @@ -9111,156 +6334,93 @@ "license": "(Unlicense OR Apache-2.0)" }, "node_modules/@smithy/abort-controller": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.1.tgz", - "integrity": "sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", + "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", + "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/abort-controller/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/abort-controller/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/config-resolver": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.5.tgz", - "integrity": "sha512-SkW5LxfkSI1bUC74OtfBbdz+grQXYiPYolyu8VfpLIjEoN/sHVBlLeGXMQ1vX4ejkgfv6sxVbQJ32yF2cl1veA==", + "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": "^3.1.4", - "@smithy/types": "^3.3.0", - "@smithy/util-config-provider": "^3.0.0", - "@smithy/util-middleware": "^3.0.3", + "@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": ">=16.0.0" - } - }, - "node_modules/@smithy/config-resolver/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/config-resolver/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/core": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.3.2.tgz", - "integrity": "sha512-in5wwt6chDBcUv1Lw1+QzZxN9fBffi+qOixfb65yK4sDuKG7zAUO9HAFqmVzsZM3N+3tTyvZjtnDXePpvp007Q==", + "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-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/util-middleware": "^3.0.3", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-stream": "^4.2.2", + "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/core/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/core/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/core/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/core/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/credential-provider-imds": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.0.tgz", - "integrity": "sha512-0SCIzgd8LYZ9EJxUjLXBmEKSZR/P/w6l7Rz/pab9culE/RWuqelAKGJvn5qUOl8BgX8Yj5HWM50A5hiB/RzsgA==", + "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": "^3.1.4", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", + "@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": ">=16.0.0" - } - }, - "node_modules/@smithy/credential-provider-imds/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/credential-provider-imds/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-codec": { "version": "4.0.4", @@ -9277,30 +6437,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", @@ -9321,18 +6457,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", @@ -9352,107 +6476,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==", - "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==", - "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==" - }, - "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==", - "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==" - }, - "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==", - "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==", - "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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/eventstream-serde-node/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, "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", @@ -9467,7 +6496,403 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/eventstream-serde-universal/node_modules/@smithy/types": { + "node_modules/@smithy/eventstream-serde-universal/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/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/fetch-http-handler/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/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/@smithy/hash-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/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/@smithy/invalid-dependency/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/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/is-array-buffer/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/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/@smithy/middleware-content-length/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/middleware-endpoint": { + "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.3", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/shared-ini-file-loader": "^4.0.4", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-middleware": "^4.0.4", + "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", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@smithy/middleware-retry": { + "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.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" + }, + "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", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@smithy/middleware-serde": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz", + "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==", + "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/@smithy/middleware-serde/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/middleware-stack": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz", + "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.1", + "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", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/@smithy/node-config-provider": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz", + "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==", + "license": "Apache-2.0", + "dependencies": { + "@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/@smithy/node-config-provider/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/node-http-handler": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", + "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/querystring-builder": "^4.0.4", + "@smithy/types": "^4.3.1", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@smithy/node-http-handler/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/property-provider": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz", + "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.1", + "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", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "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/protocol-http/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/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/querystring-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==", + "license": "0BSD" + }, + "node_modules/@smithy/querystring-parser": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz", + "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.1", + "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", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "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/@smithy/shared-ini-file-loader": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz", + "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/types": "^4.3.1", + "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", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "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/@smithy/signature-v4/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/smithy-client": { + "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/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": ">=18.0.0" + } + }, + "node_modules/@smithy/smithy-client/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/types": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.3.1.tgz", "integrity": "sha512-UqKOQBL2x6+HWl3P+3QqFD4ncKq0I8Nuz9QItGv5WuKuMHuuwlhvqcZCoXGfc+P1QmfJE7VieykoYYmrOoFJxA==", @@ -9479,1311 +6904,309 @@ "node": ">=18.0.0" } }, - "node_modules/@smithy/eventstream-serde-universal/node_modules/tslib": { + "node_modules/@smithy/types/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/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==", - "dependencies": { - "@smithy/protocol-http": "^3.3.0", - "@smithy/querystring-builder": "^2.2.0", - "@smithy/types": "^2.12.0", - "@smithy/util-base64": "^2.3.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@smithy/fetch-http-handler/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/hash-node": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.3.tgz", - "integrity": "sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw==", - "dependencies": { - "@smithy/types": "^3.3.0", - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/hash-node/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/hash-node/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/invalid-dependency": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz", - "integrity": "sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@smithy/invalid-dependency/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/invalid-dependency/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/is-array-buffer/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/middleware-content-length": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.5.tgz", - "integrity": "sha512-ILEzC2eyxx6ncej3zZSwMpB5RJ0zuqH7eMptxC4KN3f+v9bqT8ohssKbhNR78k/2tWW+KS5Spw+tbPF4Ejyqvw==", - "dependencies": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-content-length/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-content-length/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-content-length/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/middleware-endpoint": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.0.tgz", - "integrity": "sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw==", - "dependencies": { - "@smithy/middleware-serde": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-middleware": "^3.0.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-endpoint/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-endpoint/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/middleware-retry": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.14.tgz", - "integrity": "sha512-7ZaWZJOjUxa5hgmuMspyt8v/zVsh0GXYuF7OvCmdcbVa/xbnKQoYC+uYKunAqRGTkxjOyuOCw9rmFUFOqqC0eQ==", - "dependencies": { - "@smithy/node-config-provider": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/service-error-classification": "^3.0.3", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.0.3", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-retry/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-retry/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/middleware-serde": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", - "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-serde/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-serde/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/middleware-stack": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", - "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-stack/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/middleware-stack/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/node-config-provider": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.4.tgz", - "integrity": "sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ==", - "dependencies": { - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-config-provider/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-config-provider/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/node-http-handler": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.4.tgz", - "integrity": "sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg==", - "dependencies": { - "@smithy/abort-controller": "^3.1.1", - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-http-handler/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-http-handler/node_modules/@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "dependencies": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-http-handler/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-http-handler/node_modules/@smithy/util-uri-escape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-3.0.0.tgz", - "integrity": "sha512-LqR7qYLgZTD7nWLBecUi4aqolw8Mhza9ArpNEQ881MJJIU2sE5iHCK6TdyqqzcDLy0OPe10IY4T8ctVdtynubg==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/node-http-handler/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/property-provider": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", - "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/property-provider/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/property-provider/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "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==", - "dependencies": { - "@smithy/types": "^2.12.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/protocol-http/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "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==", - "dependencies": { - "@smithy/types": "^2.12.0", - "@smithy/util-uri-escape": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/querystring-builder/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/querystring-parser": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", - "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/querystring-parser/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/querystring-parser/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/service-error-classification": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz", - "integrity": "sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==", - "dependencies": { - "@smithy/types": "^3.3.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/service-error-classification/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/service-error-classification/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "node_modules/@smithy/shared-ini-file-loader": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.4.tgz", - "integrity": "sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/shared-ini-file-loader/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/shared-ini-file-loader/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "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==", - "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", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/signature-v4/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/signature-v4/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "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==", - "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", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "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==", - "dependencies": { - "@smithy/util-buffer-from": "^2.2.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/smithy-client/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, - "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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/@smithy/types/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - }, "node_modules/@smithy/url-parser": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", - "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", - "dependencies": { - "@smithy/querystring-parser": "^3.0.3", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@smithy/url-parser/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz", + "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==", + "license": "Apache-2.0", "dependencies": { + "@smithy/querystring-parser": "^4.0.4", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/url-parser/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-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==", - "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==", - "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==", - "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": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-body-length-browser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz", - "integrity": "sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==", + "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/@smithy/util-body-length-browser/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-body-length-node": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz", - "integrity": "sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==", + "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": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-body-length-node/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-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==", + "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": "^3.0.0", + "@smithy/is-array-buffer": "^4.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-buffer-from/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-config-provider": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz", - "integrity": "sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==", + "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": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-config-provider/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-defaults-mode-browser": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.14.tgz", - "integrity": "sha512-0iwTgKKmAIf+vFLV8fji21Jb2px11ktKVxbX6LIDPAUJyWQqGqBVfwba7xwa1f2FZUoolYQgLvxQEpJycXuQ5w==", + "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": "^3.1.3", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.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" }, "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-browser/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-defaults-mode-browser/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-defaults-mode-node": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.14.tgz", - "integrity": "sha512-e9uQarJKfXApkTMMruIdxHprhcXivH1flYCe8JRDTzkkLx8dA3V5J8GZlST9yfDiRWkJpZJlUXGN9Rc9Ade3OQ==", + "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": "^3.0.5", - "@smithy/credential-provider-imds": "^3.2.0", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/property-provider": "^3.1.3", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.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" }, "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "dependencies": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-defaults-mode-node/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-defaults-mode-node/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-endpoints": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.5.tgz", - "integrity": "sha512-ReQP0BWihIE68OAblC/WQmDD40Gx+QY1Ez8mTdFMXpmjfxSyz2fVQu3A4zXRfQU9sZXtewk3GmhfOHswvX+eNg==", + "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": "^3.1.4", - "@smithy/types": "^3.3.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-endpoints/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-endpoints/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-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==", + "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": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-hex-encoding/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-middleware": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", - "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz", + "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==", + "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-middleware/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-middleware/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-retry": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.3.tgz", - "integrity": "sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==", + "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": "^3.0.3", - "@smithy/types": "^3.3.0", + "@smithy/service-error-classification": "^4.0.5", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-retry/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-retry/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.3.tgz", - "integrity": "sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.2.tgz", + "integrity": "sha512-aI+GLi7MJoVxg24/3J1ipwLoYzgkB4kUfogZfnslcYlynj3xsQ0e7vk4TnTro9hhsS5PvX1mwmkRqqHQjwcU7w==", + "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-hex-encoding": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", + "@smithy/fetch-http-handler": "^5.0.4", + "@smithy/node-http-handler": "^4.0.6", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-stream/node_modules/@smithy/fetch-http-handler": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "dependencies": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "node_modules/@smithy/util-stream/node_modules/@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "dependencies": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-stream/node_modules/@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "dependencies": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-stream/node_modules/@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-stream/node_modules/@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "dependencies": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@smithy/util-stream/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==", - "dependencies": { - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-stream/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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==", + "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": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-uri-escape/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-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==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", + "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", + "license": "Apache-2.0", "dependencies": { - "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-buffer-from": "^4.0.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@smithy/util-utf8/node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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/@socket.io/component-emitter": { "version": "3.1.2", @@ -26045,7 +22468,8 @@ "node_modules/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 }, "node_modules/turndown": { "version": "7.2.0", @@ -27436,24 +23860,6 @@ } }, "dependencies": { - "@anthropic-ai/bedrock-sdk": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/@anthropic-ai/bedrock-sdk/-/bedrock-sdk-0.12.4.tgz", - "integrity": "sha512-kraOgWWyVO/Wef3wYbpws77pCZubg/hCzXQ7RGrLRJsRpbTIT+ms+MigGu/0b1qn3o5WuIrumlT3Qtu3esHpzw==", - "requires": { - "@anthropic-ai/sdk": ">=0.36 <1", - "@aws-crypto/sha256-js": "^4.0.0", - "@aws-sdk/client-bedrock-runtime": "^3.423.0", - "@aws-sdk/credential-providers": "^3.341.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", @@ -27593,42 +23999,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", @@ -27650,26 +24020,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", @@ -27704,13 +24054,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": { @@ -27729,37 +24086,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", @@ -27767,21 +24157,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", @@ -27792,391 +24182,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/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "requires": { - "@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/core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.5.1.tgz", - "integrity": "sha512-xSw7bZEFKwOKrm/iv8e2BLt2ur98YZdrRD6nII8ditQeUsY2Q1JmIQ0rpILOhaLKYxxG2ivnoOpokzr9qLyDWA==", - "requires": { - "@smithy/middleware-serde": "^4.0.8", - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-body-length-browser": "^4.0.0", - "@smithy/util-middleware": "^4.0.4", - "@smithy/util-stream": "^4.2.2", - "@smithy/util-utf8": "^4.0.0", - "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", @@ -28187,368 +24192,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-endpoint": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.9.tgz", - "integrity": "sha512-AjDgX4UjORLltD/LZCBQTwjQqEfyrx/GeDTHcYLzIgf87pIT70tMWnN87NQpJru1K4ITirY2htSOxNECZJCBOg==", - "requires": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-middleware": "^4.0.4", - "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/middleware-serde": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz", - "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/middleware-stack": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz", - "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/node-config-provider": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz", - "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==", - "requires": { - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "requires": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/property-provider": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz", - "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==", - "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/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/querystring-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz", - "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==", - "requires": { - "@smithy/types": "^4.3.1", - "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/shared-ini-file-loader": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz", - "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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/url-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz", - "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==", - "requires": { - "@smithy/querystring-parser": "^4.0.4", - "@smithy/types": "^4.3.1", - "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-middleware": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz", - "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "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-stream": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.2.tgz", - "integrity": "sha512-aI+GLi7MJoVxg24/3J1ipwLoYzgkB4kUfogZfnslcYlynj3xsQ0e7vk4TnTro9hhsS5PvX1mwmkRqqHQjwcU7w==", - "requires": { - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-hex-encoding": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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" - } - }, - "@smithy/util-utf8": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", - "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -28557,1097 +24200,481 @@ } }, "@aws-sdk/client-cognito-identity": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cognito-identity/-/client-cognito-identity-3.623.0.tgz", - "integrity": "sha512-kGYnTzXTMGdjko5+GZ1PvWvfXA7quiOp5iMo5gbh5b55pzIdc918MHN0pvaqplVGWYlaFJF4YzxUT5Nbxd7Xeg==", + "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/client-sso-oidc": "3.623.0", - "@aws-sdk/client-sts": "3.623.0", - "@aws-sdk/core": "3.623.0", - "@aws-sdk/credential-provider-node": "3.623.0", - "@aws-sdk/middleware-host-header": "3.620.0", - "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.620.0", - "@aws-sdk/middleware-user-agent": "3.620.0", - "@aws-sdk/region-config-resolver": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@aws-sdk/util-user-agent-browser": "3.609.0", - "@aws-sdk/util-user-agent-node": "3.614.0", - "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.3.2", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/hash-node": "^3.0.3", - "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.5", - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.14", - "@smithy/util-defaults-mode-node": "^3.0.14", - "@smithy/util-endpoints": "^2.0.5", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.0.3", - "@smithy/util-utf8": "^3.0.0", + "@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.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": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "requires": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.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": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "requires": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "requires": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "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" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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-sso": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.623.0.tgz", - "integrity": "sha512-oEACriysQMnHIVcNp7TD6D1nzgiHfYK0tmMBMbUxgoFuCBkW9g9QYvspHN+S9KgoePfMEXHuPUe9mtG9AH9XeA==", + "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.623.0", - "@aws-sdk/middleware-host-header": "3.620.0", - "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.620.0", - "@aws-sdk/middleware-user-agent": "3.620.0", - "@aws-sdk/region-config-resolver": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@aws-sdk/util-user-agent-browser": "3.609.0", - "@aws-sdk/util-user-agent-node": "3.614.0", - "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.3.2", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/hash-node": "^3.0.3", - "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.5", - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.14", - "@smithy/util-defaults-mode-node": "^3.0.14", - "@smithy/util-endpoints": "^2.0.5", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.0.3", - "@smithy/util-utf8": "^3.0.0", + "@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.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": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "requires": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.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": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "requires": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "requires": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "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" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - } - } - }, - "@aws-sdk/client-sso-oidc": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso-oidc/-/client-sso-oidc-3.623.0.tgz", - "integrity": "sha512-lMFEXCa6ES/FGV7hpyrppT1PiAkqQb51AbG0zVU3TIgI2IO4XX02uzMUXImRSRqRpGymRCbJCaCs9LtKvS/37Q==", - "requires": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.623.0", - "@aws-sdk/credential-provider-node": "3.623.0", - "@aws-sdk/middleware-host-header": "3.620.0", - "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.620.0", - "@aws-sdk/middleware-user-agent": "3.620.0", - "@aws-sdk/region-config-resolver": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@aws-sdk/util-user-agent-browser": "3.609.0", - "@aws-sdk/util-user-agent-node": "3.614.0", - "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.3.2", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/hash-node": "^3.0.3", - "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.5", - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.14", - "@smithy/util-defaults-mode-node": "^3.0.14", - "@smithy/util-endpoints": "^2.0.5", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.0.3", - "@smithy/util-utf8": "^3.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": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "requires": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.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": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "requires": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "requires": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "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" - } - }, - "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - } - } - }, - "@aws-sdk/client-sts": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.623.0.tgz", - "integrity": "sha512-iJNdx76SOw0YjHAUv8aj3HXzSu3TKI7qSGuR+OGATwA/kpJZDd+4+WYBdGtr8YK+hPrGGqhfecuCkEg805O5iA==", - "requires": { - "@aws-crypto/sha256-browser": "5.2.0", - "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/client-sso-oidc": "3.623.0", - "@aws-sdk/core": "3.623.0", - "@aws-sdk/credential-provider-node": "3.623.0", - "@aws-sdk/middleware-host-header": "3.620.0", - "@aws-sdk/middleware-logger": "3.609.0", - "@aws-sdk/middleware-recursion-detection": "3.620.0", - "@aws-sdk/middleware-user-agent": "3.620.0", - "@aws-sdk/region-config-resolver": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@aws-sdk/util-user-agent-browser": "3.609.0", - "@aws-sdk/util-user-agent-node": "3.614.0", - "@smithy/config-resolver": "^3.0.5", - "@smithy/core": "^2.3.2", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/hash-node": "^3.0.3", - "@smithy/invalid-dependency": "^3.0.3", - "@smithy/middleware-content-length": "^3.0.5", - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-body-length-browser": "^3.0.0", - "@smithy/util-body-length-node": "^3.0.0", - "@smithy/util-defaults-mode-browser": "^3.0.14", - "@smithy/util-defaults-mode-node": "^3.0.14", - "@smithy/util-endpoints": "^2.0.5", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.0.3", - "@smithy/util-utf8": "^3.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": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "requires": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.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": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "requires": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "requires": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "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" - } - }, - "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/core": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.623.0.tgz", - "integrity": "sha512-8Toq3X6trX/67obSdh4K0MFQY4f132bEbr1i0YPDWk/O3KdBt12mLC/sW3aVRnlIs110XMuX9yrWWqJ8fDW10g==", + "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": { - "@smithy/core": "^2.3.2", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/signature-v4": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/util-middleware": "^3.0.3", + "@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/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/signature-v4": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-4.1.0.tgz", - "integrity": "sha512-aRryp2XNZeRcOtuJoxjydO6QTaVhxx/vjaR+gx7ZjaFgrgPRyZ3HCTbfwqYj6ZWEBHkCSUfcaymKPURaByukag==", - "requires": { - "@smithy/is-array-buffer": "^3.0.0", - "@smithy/protocol-http": "^4.1.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", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "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" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/credential-provider-cognito-identity": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-cognito-identity/-/credential-provider-cognito-identity-3.623.0.tgz", - "integrity": "sha512-sXU2KtWpFzIzE4iffSIUbl4mgbeN1Rta6BnuKtS3rrVrryku9akAxY//pulbsIsYfXRzOwZzULsa+cxQN00lrw==", + "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.623.0", - "@aws-sdk/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/credential-provider-env": { - "version": "3.620.1", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.620.1.tgz", - "integrity": "sha512-ExuILJ2qLW5ZO+rgkNRj0xiAipKT16Rk77buvPP8csR7kkCflT/gXTyzRe/uzIiETTxM7tr8xuO9MP/DQXqkfg==", + "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/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/credential-provider-http": { - "version": "3.622.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.622.0.tgz", - "integrity": "sha512-VUHbr24Oll1RK3WR8XLUugLpgK9ZuxEm/NVeVqyFts1Ck9gsKpRg1x4eH7L7tW3SJ4TDEQNMbD7/7J+eoL2svg==", + "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/types": "3.609.0", - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/property-provider": "^3.1.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", + "@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": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "requires": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "requires": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "requires": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "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" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/credential-provider-ini": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.623.0.tgz", - "integrity": "sha512-kvXA1SwGneqGzFwRZNpESitnmaENHGFFuuTvgGwtMe7mzXWuA/LkXdbiHmdyAzOo0iByKTCD8uetuwh3CXy4Pw==", + "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/credential-provider-env": "3.620.1", - "@aws-sdk/credential-provider-http": "3.622.0", - "@aws-sdk/credential-provider-process": "3.620.1", - "@aws-sdk/credential-provider-sso": "3.623.0", - "@aws-sdk/credential-provider-web-identity": "3.621.0", - "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.2.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.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": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "@aws-sdk/nested-clients": { + "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.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.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" } }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/credential-provider-node": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.623.0.tgz", - "integrity": "sha512-qDwCOkhbu5PfaQHyuQ+h57HEx3+eFhKdtIw7aISziWkGdFrMe07yIBd7TJqGe4nxXnRF1pfkg05xeOlMId997g==", + "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.620.1", - "@aws-sdk/credential-provider-http": "3.622.0", - "@aws-sdk/credential-provider-ini": "3.623.0", - "@aws-sdk/credential-provider-process": "3.620.1", - "@aws-sdk/credential-provider-sso": "3.623.0", - "@aws-sdk/credential-provider-web-identity": "3.621.0", - "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.2.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/credential-provider-process": { - "version": "3.620.1", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.620.1.tgz", - "integrity": "sha512-hWqFMidqLAkaV9G460+1at6qa9vySbjQKKc04p59OT7lZ5cO5VH5S4aI05e+m4j364MBROjjk2ugNvfNf/8ILg==", + "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/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/credential-provider-sso": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.623.0.tgz", - "integrity": "sha512-70LZhUb3l7cttEsg4A0S4Jq3qrCT/v5Jfyl8F7w1YZJt5zr3oPPcvDJxo/UYckFz4G4/5BhGa99jK8wMlNE9QA==", + "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.623.0", - "@aws-sdk/token-providers": "3.614.0", - "@aws-sdk/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/credential-provider-web-identity": { - "version": "3.621.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.621.0.tgz", - "integrity": "sha512-w7ASSyfNvcx7+bYGep3VBgC3K6vEdLmlpjT7nSIHxxQf+WSdvy+HynwJosrpZax0sK5q0D1Jpn/5q+r5lwwW6w==", + "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/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.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": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "@aws-sdk/nested-clients": { + "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.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.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" } }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/credential-providers": { - "version": "3.623.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-providers/-/credential-providers-3.623.0.tgz", - "integrity": "sha512-abtlH1hkVWAkzuOX79Q47l0ztWOV2Q7l7J4JwQgzEQm7+zCk5iUAiwqKyDzr+ByCyo4I3IWFjy+e1gBdL7rXQQ==", + "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.623.0", - "@aws-sdk/client-sso": "3.623.0", - "@aws-sdk/client-sts": "3.623.0", - "@aws-sdk/credential-provider-cognito-identity": "3.623.0", - "@aws-sdk/credential-provider-env": "3.620.1", - "@aws-sdk/credential-provider-http": "3.622.0", - "@aws-sdk/credential-provider-ini": "3.623.0", - "@aws-sdk/credential-provider-node": "3.623.0", - "@aws-sdk/credential-provider-process": "3.620.1", - "@aws-sdk/credential-provider-sso": "3.623.0", - "@aws-sdk/credential-provider-web-identity": "3.621.0", - "@aws-sdk/types": "3.609.0", - "@smithy/credential-provider-imds": "^3.2.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.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": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", + "@aws-sdk/nested-clients": { + "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.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.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" } }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, @@ -29662,23 +24689,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", @@ -29697,32 +24707,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", @@ -29731,760 +24715,158 @@ } }, "@aws-sdk/middleware-host-header": { - "version": "3.620.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.620.0.tgz", - "integrity": "sha512-VMtPEZwqYrII/oUkffYsNWY9PZ9xpNJpMgmyU0rlDQ25O1c0Hk3fJmZRe6pEkAJ0omD7kLrqGl1DUjQVxpd/Rg==", + "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.609.0", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.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": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/middleware-logger": { - "version": "3.609.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.609.0.tgz", - "integrity": "sha512-S62U2dy4jMDhDFDK5gZ4VxFdWzCtLzwbYyFZx2uvPYTECkepLUfzLic2BHg2Qvtu4QjX+oGE3P/7fwaGIsGNuQ==", + "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.609.0", - "@smithy/types": "^3.3.0", + "@aws-sdk/types": "3.821.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/middleware-recursion-detection": { - "version": "3.620.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.620.0.tgz", - "integrity": "sha512-nh91S7aGK3e/o1ck64sA/CyoFw+gAYj2BDOnoNa6ouyCrVJED96ZXWbhye/fz9SgmNUZR2g7GdVpiLpMKZoI5w==", + "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.609.0", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.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": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/middleware-user-agent": { - "version": "3.620.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.620.0.tgz", - "integrity": "sha512-bvS6etn+KsuL32ubY5D3xNof1qkenpbJXf/ugGXbg0n98DvDFQ/F+SMLxHgbnER5dsKYchNnhmtI6/FC3HFu/A==", + "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/types": "3.609.0", - "@aws-sdk/util-endpoints": "3.614.0", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", + "@aws-sdk/core": "3.826.0", + "@aws-sdk/types": "3.821.0", + "@aws-sdk/util-endpoints": "3.821.0", + "@smithy/core": "^3.5.3", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "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": { + "@aws-sdk/region-config-resolver": { "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==", + "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-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-config-provider": "^4.0.0", "@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==", + "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/token-providers": { + "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/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-sdk/nested-clients": { + "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/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/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-crypto/sha256-browser": "5.2.0", + "@aws-crypto/sha256-js": "5.2.0", + "@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", - "@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/abort-controller": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", - "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", - "requires": { - "@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/core": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.5.1.tgz", - "integrity": "sha512-xSw7bZEFKwOKrm/iv8e2BLt2ur98YZdrRD6nII8ditQeUsY2Q1JmIQ0rpILOhaLKYxxG2ivnoOpokzr9qLyDWA==", - "requires": { + "@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-middleware": "^4.0.4", - "@smithy/util-stream": "^4.2.2", - "@smithy/util-utf8": "^4.0.0", - "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": "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-endpoint": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.9.tgz", - "integrity": "sha512-AjDgX4UjORLltD/LZCBQTwjQqEfyrx/GeDTHcYLzIgf87pIT70tMWnN87NQpJru1K4ITirY2htSOxNECZJCBOg==", - "requires": { - "@smithy/core": "^3.5.1", - "@smithy/middleware-serde": "^4.0.8", - "@smithy/node-config-provider": "^4.1.3", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", - "@smithy/url-parser": "^4.0.4", - "@smithy/util-middleware": "^4.0.4", - "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-body-length-node": "^4.0.0", + "@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", - "tslib": "^2.6.2", - "uuid": "^9.0.1" - } - }, - "@smithy/middleware-serde": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz", - "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==", - "requires": { - "@smithy/protocol-http": "^5.1.2", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/middleware-stack": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz", - "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/node-config-provider": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz", - "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==", - "requires": { - "@smithy/property-provider": "^4.0.4", - "@smithy/shared-ini-file-loader": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/node-http-handler": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", - "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", - "requires": { - "@smithy/abort-controller": "^4.0.4", - "@smithy/protocol-http": "^5.1.2", - "@smithy/querystring-builder": "^4.0.4", - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@smithy/property-provider": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz", - "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==", - "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/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/querystring-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz", - "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==", - "requires": { - "@smithy/types": "^4.3.1", - "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/shared-ini-file-loader": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz", - "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==", - "requires": { - "@smithy/types": "^4.3.1", - "tslib": "^2.6.2" - } - }, - "@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/url-parser": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz", - "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==", - "requires": { - "@smithy/querystring-parser": "^4.0.4", - "@smithy/types": "^4.3.1", - "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-middleware": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz", - "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==", - "requires": { - "@smithy/types": "^4.3.1", - "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-stream": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.2.tgz", - "integrity": "sha512-aI+GLi7MJoVxg24/3J1ipwLoYzgkB4kUfogZfnslcYlynj3xsQ0e7vk4TnTro9hhsS5PvX1mwmkRqqHQjwcU7w==", - "requires": { - "@smithy/fetch-http-handler": "^5.0.4", - "@smithy/node-http-handler": "^4.0.6", - "@smithy/types": "^4.3.1", - "@smithy/util-base64": "^4.0.0", - "@smithy/util-buffer-from": "^4.0.0", - "@smithy/util-hex-encoding": "^4.0.0", - "@smithy/util-utf8": "^4.0.0", - "tslib": "^2.6.2" - } - }, - "@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" - } - }, - "@smithy/util-utf8": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", - "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", - "requires": { - "@smithy/util-buffer-from": "^4.0.0", - "tslib": "^2.6.2" - } - }, "tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -30492,108 +24874,37 @@ } } }, - "@aws-sdk/region-config-resolver": { - "version": "3.614.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.614.0.tgz", - "integrity": "sha512-vDCeMXvic/LU0KFIUjpC3RiSTIkkvESsEfbVHiHH0YINfl8HnEqR5rj+L8+phsCeVg2+LmYwYxd5NRz4PHxt5g==", - "requires": { - "@aws-sdk/types": "3.609.0", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/types": "^3.3.0", - "@smithy/util-config-provider": "^3.0.0", - "@smithy/util-middleware": "^3.0.3", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - } - } - }, - "@aws-sdk/token-providers": { - "version": "3.614.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.614.0.tgz", - "integrity": "sha512-okItqyY6L9IHdxqs+Z116y5/nda7rHxLvROxtAJdLavWTYDydxrZstImNgGWTeVdmc0xX2gJCI77UYUTQWnhRw==", - "requires": { - "@aws-sdk/types": "3.609.0", - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - }, - "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - } - } - }, "@aws-sdk/types": { - "version": "3.609.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.609.0.tgz", - "integrity": "sha512-+Tqnh9w0h2LcrUsdXyT1F8mNhXz+tVYBtP19LpeEGntmvHwa2XzvLUCWpoIAIVsHp5+HdB2X9Sn0KAtmbFXc2Q==", + "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": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/util-endpoints": { - "version": "3.614.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.614.0.tgz", - "integrity": "sha512-wK2cdrXHH4oz4IomV/yrGkftU9A+ITB6nFL+rxxyO78is2ifHJpFdV4aqk4LSkXYPi6CXWNru/Dqc7yiKXgJPw==", + "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.609.0", - "@smithy/types": "^3.3.0", - "@smithy/util-endpoints": "^2.0.5", + "@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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, @@ -30613,69 +24924,55 @@ } }, "@aws-sdk/util-user-agent-browser": { - "version": "3.609.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.609.0.tgz", - "integrity": "sha512-fojPU+mNahzQ0YHYBsx0ZIhmMA96H+ZIZ665ObU9tl+SGdbLneVZVikGve+NmHTQwHzwkFsZYYnVKAkreJLAtA==", + "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.609.0", - "@smithy/types": "^3.3.0", + "@aws-sdk/types": "3.821.0", + "@smithy/types": "^4.3.1", "bowser": "^2.11.0", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@aws-sdk/util-user-agent-node": { - "version": "3.614.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.614.0.tgz", - "integrity": "sha512-15ElZT88peoHnq5TEoEtZwoXTXRxNrk60TZNdpl/TUBJ5oNJ9Dqb5Z4ryb8ofN6nm9aFf59GVAerFDz8iUoHBA==", + "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/types": "3.609.0", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/types": "^3.3.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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, - "@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": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, @@ -34223,132 +28520,79 @@ "dev": true }, "@smithy/abort-controller": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-3.1.1.tgz", - "integrity": "sha512-MBJBiidoe+0cTFhyxT8g+9g7CeVccLM0IOKKUMCNQ1CNMJ/eIfoo0RTfVrXOONEI1UCN1W+zkiHSbzUNE9dZtQ==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.0.4.tgz", + "integrity": "sha512-gJnEjZMvigPDQWHrW3oPrFhQtkrgqBkyjj3pCIdF3A5M6vsZODG93KNlfJprv6bp4245bdT32fsHK4kkH3KYDA==", "requires": { - "@smithy/types": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/config-resolver": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-3.0.5.tgz", - "integrity": "sha512-SkW5LxfkSI1bUC74OtfBbdz+grQXYiPYolyu8VfpLIjEoN/sHVBlLeGXMQ1vX4ejkgfv6sxVbQJ32yF2cl1veA==", + "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": "^3.1.4", - "@smithy/types": "^3.3.0", - "@smithy/util-config-provider": "^3.0.0", - "@smithy/util-middleware": "^3.0.3", + "@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" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/core": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-2.3.2.tgz", - "integrity": "sha512-in5wwt6chDBcUv1Lw1+QzZxN9fBffi+qOixfb65yK4sDuKG7zAUO9HAFqmVzsZM3N+3tTyvZjtnDXePpvp007Q==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.5.3.tgz", + "integrity": "sha512-xa5byV9fEguZNofCclv6v9ra0FYh5FATQW/da7FQUVTic94DfrN/NvmKZjrMyzbpqfot9ZjBaO8U1UeTbmSLuA==", "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-retry": "^3.0.14", - "@smithy/middleware-serde": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/util-middleware": "^3.0.3", + "@smithy/middleware-serde": "^4.0.8", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-body-length-browser": "^4.0.0", + "@smithy/util-middleware": "^4.0.4", + "@smithy/util-stream": "^4.2.2", + "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/credential-provider-imds": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-3.2.0.tgz", - "integrity": "sha512-0SCIzgd8LYZ9EJxUjLXBmEKSZR/P/w6l7Rz/pab9culE/RWuqelAKGJvn5qUOl8BgX8Yj5HWM50A5hiB/RzsgA==", + "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": "^3.1.4", - "@smithy/property-provider": "^3.1.3", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", + "@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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, @@ -34363,22 +28607,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", @@ -34396,14 +28624,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", @@ -34420,14 +28640,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", @@ -34435,86 +28647,6 @@ } } }, - "@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.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - } - } - }, "@smithy/eventstream-serde-universal": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-4.0.4.tgz", @@ -34525,14 +28657,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", @@ -34541,1117 +28665,602 @@ } }, "@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": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/hash-node": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-3.0.3.tgz", - "integrity": "sha512-2ctBXpPMG+B3BtWSGNnKELJ7SH9e4TNefJS0cd2eSkOOROeBnnVBnAy9LtJ8tY4vUEoe55N4CNPxzbWvR39iBw==", + "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": "^3.3.0", - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/invalid-dependency": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-3.0.3.tgz", - "integrity": "sha512-ID1eL/zpDULmHJbflb864k72/SNOZCADRc9i7Exq3RUNJw6raWUSlFEQ+3PX3EYs++bTxZB2dE9mEHTQLv61tw==", + "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": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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" }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/middleware-content-length": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-3.0.5.tgz", - "integrity": "sha512-ILEzC2eyxx6ncej3zZSwMpB5RJ0zuqH7eMptxC4KN3f+v9bqT8ohssKbhNR78k/2tWW+KS5Spw+tbPF4Ejyqvw==", + "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": "^4.1.0", - "@smithy/types": "^3.3.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/middleware-endpoint": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-3.1.0.tgz", - "integrity": "sha512-5y5aiKCEwg9TDPB4yFE7H6tYvGFf1OJHNczeY10/EFF8Ir8jZbNntQJxMWNfeQjC1mxPsaQ6mR9cvQbf+0YeMw==", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.1.11.tgz", + "integrity": "sha512-zDogwtRLzKl58lVS8wPcARevFZNBOOqnmzWWxVe9XiaXU2CADFjvJ9XfNibgkOWs08sxLuSr81NrpY4mgp9OwQ==", "requires": { - "@smithy/middleware-serde": "^3.0.3", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.0", - "@smithy/url-parser": "^3.0.3", - "@smithy/util-middleware": "^3.0.3", + "@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", + "@smithy/types": "^4.3.1", + "@smithy/url-parser": "^4.0.4", + "@smithy/util-middleware": "^4.0.4", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/middleware-retry": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-3.0.14.tgz", - "integrity": "sha512-7ZaWZJOjUxa5hgmuMspyt8v/zVsh0GXYuF7OvCmdcbVa/xbnKQoYC+uYKunAqRGTkxjOyuOCw9rmFUFOqqC0eQ==", + "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": "^3.1.4", - "@smithy/protocol-http": "^4.1.0", - "@smithy/service-error-classification": "^3.0.3", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.0", - "@smithy/util-middleware": "^3.0.3", - "@smithy/util-retry": "^3.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": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/middleware-serde": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-3.0.3.tgz", - "integrity": "sha512-puUbyJQBcg9eSErFXjKNiGILJGtiqmuuNKEYNYfUD57fUl4i9+mfmThtQhvFXU0hCVG0iEJhvQUipUf+/SsFdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.0.8.tgz", + "integrity": "sha512-iSSl7HJoJaGyMIoNn2B7czghOVwJ9nD7TMvLhMWeSB5vt0TnEYyRRqPJu/TqW76WScaNvYYB8nRoiBHR9S1Ddw==", "requires": { - "@smithy/types": "^3.3.0", + "@smithy/protocol-http": "^5.1.2", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/middleware-stack": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-3.0.3.tgz", - "integrity": "sha512-r4klY9nFudB0r9UdSMaGSyjyQK5adUyPnQN/ZM6M75phTxOdnc/AhpvGD1fQUvgmqjQEBGCwpnPbDm8pH5PapA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.0.4.tgz", + "integrity": "sha512-kagK5ggDrBUCCzI93ft6DjteNSfY8Ulr83UtySog/h09lTIOAJ/xUSObutanlPT0nhoHAkpmW9V5K8oPyLh+QA==", "requires": { - "@smithy/types": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/node-config-provider": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-3.1.4.tgz", - "integrity": "sha512-YvnElQy8HR4vDcAjoy7Xkx9YT8xZP4cBXcbJSgm/kxmiQu08DwUwj8rkGnyoJTpfl/3xYHH+d8zE+eHqoDCSdQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.1.3.tgz", + "integrity": "sha512-HGHQr2s59qaU1lrVH6MbLlmOBxadtzTsoO4c+bF5asdgVik3I8o7JIOzoeqWc5MjVa+vD36/LWE0iXKpNqooRw==", "requires": { - "@smithy/property-provider": "^3.1.3", - "@smithy/shared-ini-file-loader": "^3.1.4", - "@smithy/types": "^3.3.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": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/node-http-handler": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-3.1.4.tgz", - "integrity": "sha512-+UmxgixgOr/yLsUxcEKGH0fMNVteJFGkmRltYFHnBMlogyFdpzn2CwqWmxOrfJELhV34v0WSlaqG1UtE1uXlJg==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.0.6.tgz", + "integrity": "sha512-NqbmSz7AW2rvw4kXhKGrYTiJVDHnMsFnX4i+/FzcZAfbOBauPYs2ekuECkSbtqaxETLLTu9Rl/ex6+I2BKErPA==", "requires": { - "@smithy/abort-controller": "^3.1.1", - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", + "@smithy/abort-controller": "^4.0.4", + "@smithy/protocol-http": "^5.1.2", + "@smithy/querystring-builder": "^4.0.4", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "requires": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "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" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/property-provider": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-3.1.3.tgz", - "integrity": "sha512-zahyOVR9Q4PEoguJ/NrFP4O7SMAfYO1HLhB18M+q+Z4KFd4V2obiMnlVoUFzFLSPeVt1POyNWneHHrZaTMoc/g==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.0.4.tgz", + "integrity": "sha512-qHJ2sSgu4FqF4U/5UUp4DhXNmdTrgmoAai6oQiM+c5RZ/sbDwJ12qxB1M6FnP+Tn/ggkPZf9ccn4jqKSINaquw==", "requires": { - "@smithy/types": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/querystring-parser": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-3.0.3.tgz", - "integrity": "sha512-zahM1lQv2YjmznnfQsWbYojFe55l0SLG/988brlLv1i8z3dubloLF+75ATRsqPBboUXsW6I9CPGE5rQgLfY0vQ==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.0.4.tgz", + "integrity": "sha512-6yZf53i/qB8gRHH/l2ZwUG5xgkPgQF15/KxH0DdXMDHjesA9MeZje/853ifkSY0x4m5S+dfDZ+c4x439PF0M2w==", "requires": { - "@smithy/types": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/service-error-classification": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-3.0.3.tgz", - "integrity": "sha512-Jn39sSl8cim/VlkLsUhRFq/dKDnRUFlfRkvhOJaUbLBXUsLRLNf9WaxDv/z9BjuQ3A6k/qE8af1lsqcwm7+DaQ==", + "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": "^3.3.0" - }, - "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" - } + "@smithy/types": "^4.3.1" } }, "@smithy/shared-ini-file-loader": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-3.1.4.tgz", - "integrity": "sha512-qMxS4hBGB8FY2GQqshcRUy1K6k8aBWP5vwm8qKkCT3A9K2dawUwOIJfqh9Yste/Bl0J2lzosVyrXDj68kLcHXQ==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.0.4.tgz", + "integrity": "sha512-63X0260LoFBjrHifPDs+nM9tV0VMkOTl4JRMYNuKh/f5PauSjowTfvF3LogfkWdcPoxsA9UjqEOgjeYIbhb7Nw==", "requires": { - "@smithy/types": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "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" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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" }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/url-parser": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-3.0.3.tgz", - "integrity": "sha512-pw3VtZtX2rg+s6HMs6/+u9+hu6oY6U7IohGhVNnjbgKy86wcIsSZwgHrFR+t67Uyxvp4Xz3p3kGXXIpTNisq8A==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.0.4.tgz", + "integrity": "sha512-eMkc144MuN7B0TDA4U2fKs+BqczVbk3W+qIvcoCY6D1JY3hnAdCuhCZODC+GAeaxj0p6Jroz4+XMUn3PCxQQeQ==", "requires": { - "@smithy/querystring-parser": "^3.0.3", - "@smithy/types": "^3.3.0", + "@smithy/querystring-parser": "^4.0.4", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/util-body-length-browser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-3.0.0.tgz", - "integrity": "sha512-cbjJs2A1mLYmqmyVl80uoLTJhAcfzMOyPgjwAYusWKMdLeNtzmMz9YxNl3/jRLoxSS3wkqkf0jwNdtXWtyEBaQ==", + "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" }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/util-body-length-node": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-3.0.0.tgz", - "integrity": "sha512-Tj7pZ4bUloNUP6PzwhN7K386tmSmEET9QtQg0TgdNOnxhZvCssHji+oZTUIuzxECRfG8rdm2PMw2WCFs6eIYkA==", + "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" }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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==", + "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": "^3.0.0", + "@smithy/is-array-buffer": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/util-config-provider": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-3.0.0.tgz", - "integrity": "sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==", + "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" }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/util-defaults-mode-browser": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-3.0.14.tgz", - "integrity": "sha512-0iwTgKKmAIf+vFLV8fji21Jb2px11ktKVxbX6LIDPAUJyWQqGqBVfwba7xwa1f2FZUoolYQgLvxQEpJycXuQ5w==", + "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": "^3.1.3", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.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": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/util-defaults-mode-node": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-3.0.14.tgz", - "integrity": "sha512-e9uQarJKfXApkTMMruIdxHprhcXivH1flYCe8JRDTzkkLx8dA3V5J8GZlST9yfDiRWkJpZJlUXGN9Rc9Ade3OQ==", + "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": "^3.0.5", - "@smithy/credential-provider-imds": "^3.2.0", - "@smithy/node-config-provider": "^3.1.4", - "@smithy/property-provider": "^3.1.3", - "@smithy/smithy-client": "^3.1.12", - "@smithy/types": "^3.3.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": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/smithy-client": { - "version": "3.1.12", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-3.1.12.tgz", - "integrity": "sha512-wtm8JtsycthkHy1YA4zjIh2thJgIQ9vGkoR639DBx5lLlLNU0v4GARpQZkr2WjXue74nZ7MiTSWfVrLkyD8RkA==", - "requires": { - "@smithy/middleware-endpoint": "^3.1.0", - "@smithy/middleware-stack": "^3.0.3", - "@smithy/protocol-http": "^4.1.0", - "@smithy/types": "^3.3.0", - "@smithy/util-stream": "^3.1.3", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/util-endpoints": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-2.0.5.tgz", - "integrity": "sha512-ReQP0BWihIE68OAblC/WQmDD40Gx+QY1Ez8mTdFMXpmjfxSyz2fVQu3A4zXRfQU9sZXtewk3GmhfOHswvX+eNg==", + "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": "^3.1.4", - "@smithy/types": "^3.3.0", + "@smithy/node-config-provider": "^4.1.3", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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==", + "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" }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/util-middleware": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-3.0.3.tgz", - "integrity": "sha512-l+StyYYK/eO3DlVPbU+4Bi06Jjal+PFLSMmlWM1BEwyLxZ3aKkf1ROnoIakfaA7mC6uw3ny7JBkau4Yc+5zfWw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.0.4.tgz", + "integrity": "sha512-9MLKmkBmf4PRb0ONJikCbCwORACcil6gUWojwARCClT7RmLzF04hUR4WdRprIXal7XVyrddadYNfp2eF3nrvtQ==", "requires": { - "@smithy/types": "^3.3.0", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/util-retry": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-3.0.3.tgz", - "integrity": "sha512-AFw+hjpbtVApzpNDhbjNG5NA3kyoMs7vx0gsgmlJF4s+yz1Zlepde7J58zpIRIsdjc+emhpAITxA88qLkPF26w==", + "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": "^3.0.3", - "@smithy/types": "^3.3.0", + "@smithy/service-error-classification": "^4.0.5", + "@smithy/types": "^4.3.1", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@smithy/util-stream": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-3.1.3.tgz", - "integrity": "sha512-FIv/bRhIlAxC0U7xM1BCnF2aDRPq0UaelqBHkM2lsCp26mcBbgI0tCVTv+jGdsQLUmAMybua/bjDsSu8RQHbmw==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.2.2.tgz", + "integrity": "sha512-aI+GLi7MJoVxg24/3J1ipwLoYzgkB4kUfogZfnslcYlynj3xsQ0e7vk4TnTro9hhsS5PvX1mwmkRqqHQjwcU7w==", "requires": { - "@smithy/fetch-http-handler": "^3.2.4", - "@smithy/node-http-handler": "^3.1.4", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-hex-encoding": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", + "@smithy/fetch-http-handler": "^5.0.4", + "@smithy/node-http-handler": "^4.0.6", + "@smithy/types": "^4.3.1", + "@smithy/util-base64": "^4.0.0", + "@smithy/util-buffer-from": "^4.0.0", + "@smithy/util-hex-encoding": "^4.0.0", + "@smithy/util-utf8": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { - "@smithy/fetch-http-handler": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-3.2.4.tgz", - "integrity": "sha512-kBprh5Gs5h7ug4nBWZi1FZthdqSM+T7zMmsZxx0IBvWUn7dK3diz2SHn7Bs4dQGFDk8plDv375gzenDoNwrXjg==", - "requires": { - "@smithy/protocol-http": "^4.1.0", - "@smithy/querystring-builder": "^3.0.3", - "@smithy/types": "^3.3.0", - "@smithy/util-base64": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/protocol-http": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-4.1.0.tgz", - "integrity": "sha512-dPVoHYQ2wcHooGXg3LQisa1hH0e4y0pAddPMeeUPipI1tEOqL6A4N0/G7abeq+K8wrwSgjk4C0wnD1XZpJm5aA==", - "requires": { - "@smithy/types": "^3.3.0", - "tslib": "^2.6.2" - } - }, - "@smithy/querystring-builder": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-3.0.3.tgz", - "integrity": "sha512-vyWckeUeesFKzCDaRwWLUA1Xym9McaA6XpFfAK5qI9DKJ4M33ooQGqvM4J+LalH4u/Dq9nFiC8U6Qn1qi0+9zw==", - "requires": { - "@smithy/types": "^3.3.0", - "@smithy/util-uri-escape": "^3.0.0", - "tslib": "^2.6.2" - } - }, - "@smithy/types": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.3.0.tgz", - "integrity": "sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA==", - "requires": { - "tslib": "^2.6.2" - } - }, - "@smithy/util-base64": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-3.0.0.tgz", - "integrity": "sha512-Kxvoh5Qtt0CDsfajiZOCpJxgtPHXOKwmM+Zy4waD43UoEMA+qPxxa98aE/7ZhdnBFZFXMOiBR5xbcaMhLtznQQ==", - "requires": { - "@smithy/util-buffer-from": "^3.0.0", - "@smithy/util-utf8": "^3.0.0", - "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" - } - }, "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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" }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, "@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==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-4.0.0.tgz", + "integrity": "sha512-b+zebfKCfRdgNJDknHCob3O7FpeYQN6ZG6YLExMcasDHsCXlsXCEuiPZeLnJLpwa5dvPetGlnGCiMHuLwGvFow==", "requires": { - "@smithy/util-buffer-from": "^3.0.0", + "@smithy/util-buffer-from": "^4.0.0", "tslib": "^2.6.2" }, "dependencies": { "tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" } } }, @@ -46135,7 +39744,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 633457de..0be7eaed 100644 --- a/package.json +++ b/package.json @@ -404,10 +404,10 @@ "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", From ec26a912bc0bffb93037b24cf226c5b2ec2e3711 Mon Sep 17 00:00:00 2001 From: Derek Gaston Date: Fri, 13 Jun 2025 16:55:24 -0400 Subject: [PATCH 40/76] Increase the number of retries for Bedrock. Refs #213 (#4114) * Increase the number of retries for Bedrock. Refs #213 * bump --------- Co-authored-by: 0xtoshii <94262432+0xToshii@users.noreply.github.com> --- src/api/providers/bedrock.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index f6197764..9be8ea35 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -96,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() From a6c33afb11240e3742e1e190cd925a9175e19646 Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:28:31 -0700 Subject: [PATCH 41/76] add terminal setting to allow users to constrain terminal output (#4150) * base * grpc * grpc * base 3 * settings stuff * changeset * nit * format * smol --- .changeset/clean-beers-clean.md | 5 +++ proto/state.proto | 1 + src/core/controller/index.ts | 4 ++ src/core/controller/state/updateSettings.ts | 5 +++ src/core/storage/state-keys.ts | 1 + src/core/storage/state.ts | 3 ++ src/core/task/index.ts | 8 ++-- src/integrations/terminal/TerminalManager.ts | 15 ++++++++ src/shared/ExtensionMessage.ts | 1 + .../src/components/settings/SettingsView.tsx | 11 ++++++ .../TerminalOutputLineLimitSlider.tsx | 38 +++++++++++++++++++ .../settings/TerminalSettingsSection.tsx | 2 + .../src/context/ExtensionStateContext.tsx | 7 ++++ 13 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 .changeset/clean-beers-clean.md create mode 100644 webview-ui/src/components/settings/TerminalOutputLineLimitSlider.tsx diff --git a/.changeset/clean-beers-clean.md b/.changeset/clean-beers-clean.md new file mode 100644 index 00000000..57ff8f78 --- /dev/null +++ b/.changeset/clean-beers-clean.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +add ability to constrain size of terminal output diff --git a/proto/state.proto b/proto/state.proto index fd350ec1..e0b64458 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -96,6 +96,7 @@ message UpdateSettingsRequest { 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 diff --git a/src/core/controller/index.ts b/src/core/controller/index.ts index 994f9ef0..1f7c1052 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -135,6 +135,7 @@ export class Controller { chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + terminalOutputLineLimit, defaultTerminalProfile, enableCheckpointsSetting, isNewUser, @@ -171,6 +172,7 @@ export class Controller { chatSettings, shellIntegrationTimeout, terminalReuseEnabled ?? true, + terminalOutputLineLimit ?? 500, defaultTerminalProfile ?? "default", enableCheckpointsSetting ?? true, task, @@ -959,6 +961,7 @@ export class Controller { defaultTerminalProfile, isNewUser, mcpResponsesCollapsed, + terminalOutputLineLimit, } = await getAllExtensionState(this.context) const localClineRulesToggles = @@ -1006,6 +1009,7 @@ export class Controller { defaultTerminalProfile, isNewUser, mcpResponsesCollapsed, + terminalOutputLineLimit, } } diff --git a/src/core/controller/state/updateSettings.ts b/src/core/controller/state/updateSettings.ts index 4cf120ee..925a3baa 100644 --- a/src/core/controller/state/updateSettings.ts +++ b/src/core/controller/state/updateSettings.ts @@ -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/storage/state-keys.ts b/src/core/storage/state-keys.ts index 510426a5..afefa89d 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -69,6 +69,7 @@ export type GlobalStateKey = | "terminalReuseEnabled" | "defaultTerminalProfile" | "isNewUser" + | "terminalOutputLineLimit" | "mcpRichDisplayEnabled" export type LocalStateKey = diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index 5b3bd70c..be2a7bbc 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -238,6 +238,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { mcpResponsesCollapsedRaw, globalWorkflowToggles, terminalReuseEnabled, + terminalOutputLineLimit, defaultTerminalProfile, ] = await Promise.all([ getGlobalState(context, "isNewUser") as Promise, @@ -303,6 +304,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "mcpResponsesCollapsed") as Promise, getGlobalState(context, "globalWorkflowToggles") as Promise, getGlobalState(context, "terminalReuseEnabled") as Promise, + getGlobalState(context, "terminalOutputLineLimit") as Promise, getGlobalState(context, "defaultTerminalProfile") as Promise, ]) @@ -501,6 +503,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { enableCheckpointsSetting: enableCheckpointsSetting, shellIntegrationTimeout: shellIntegrationTimeout || 4000, terminalReuseEnabled: terminalReuseEnabled ?? true, + terminalOutputLineLimit: terminalOutputLineLimit ?? 500, defaultTerminalProfile: defaultTerminalProfile ?? "default", globalWorkflowToggles: globalWorkflowToggles || {}, } diff --git a/src/core/task/index.ts b/src/core/task/index.ts index 7b0a7813..afccc7bf 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -204,6 +204,7 @@ export class Task { chatSettings: ChatSettings, shellIntegrationTimeout: number, terminalReuseEnabled: boolean, + terminalOutputLineLimit: number, defaultTerminalProfile: string, enableCheckpointsSetting: boolean, task?: string, @@ -224,6 +225,7 @@ 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) @@ -1477,9 +1479,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) @@ -1521,7 +1523,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) diff --git a/src/integrations/terminal/TerminalManager.ts b/src/integrations/terminal/TerminalManager.ts index 2f9dbc58..1a7d65ea 100644 --- a/src/integrations/terminal/TerminalManager.ts +++ b/src/integrations/terminal/TerminalManager.ts @@ -96,6 +96,7 @@ export class TerminalManager { private disposables: vscode.Disposable[] = [] private shellIntegrationTimeout: number = 4000 private terminalReuseEnabled: boolean = true + private terminalOutputLineLimit: number = 500 private defaultTerminalProfile: string = "default" constructor() { @@ -327,6 +328,20 @@ export class TerminalManager { 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) { diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index fecad9b4..b402bb66 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -91,6 +91,7 @@ export interface ExtensionState { telemetrySetting: TelemetrySetting shellIntegrationTimeout: number terminalReuseEnabled?: boolean + terminalOutputLineLimit: number defaultTerminalProfile?: string uriScheme?: string userInfo?: { diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 137ee1b6..d57a9315 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -130,6 +130,8 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { setMcpRichDisplayEnabled, shellIntegrationTimeout, setShellIntegrationTimeout, + terminalOutputLineLimit, + setTerminalOutputLineLimit, terminalReuseEnabled, setTerminalReuseEnabled, defaultTerminalProfile, @@ -151,6 +153,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + terminalOutputLineLimit, defaultTerminalProfile, }) const [apiErrorMessage, setApiErrorMessage] = useState(undefined) @@ -194,6 +197,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { ? convertApiConfigurationToProtoApiConfiguration(apiConfigurationToSubmit) : undefined, chatSettings: chatSettings ? convertChatSettingsToProtoChatSettings(chatSettings) : undefined, + terminalOutputLineLimit, }), ) @@ -211,10 +215,12 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { planActSeparateModelsSetting, enableCheckpointsSetting, mcpMarketplaceEnabled, + mcpRichDisplayEnabled, mcpResponsesCollapsed, chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + terminalOutputLineLimit, defaultTerminalProfile, } } catch (error) { @@ -244,6 +250,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { mcpResponsesCollapsed !== originalState.current.mcpResponsesCollapsed || JSON.stringify(chatSettings) !== JSON.stringify(originalState.current.chatSettings) || shellIntegrationTimeout !== originalState.current.shellIntegrationTimeout || + terminalOutputLineLimit !== originalState.current.terminalOutputLineLimit || terminalReuseEnabled !== originalState.current.terminalReuseEnabled || defaultTerminalProfile !== originalState.current.defaultTerminalProfile @@ -259,6 +266,7 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { chatSettings, shellIntegrationTimeout, terminalReuseEnabled, + terminalOutputLineLimit, defaultTerminalProfile, ]) @@ -300,6 +308,9 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { 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) } 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 fa58cf2f..2faa3825 100644 --- a/webview-ui/src/components/settings/TerminalSettingsSection.tsx +++ b/webview-ui/src/components/settings/TerminalSettingsSection.tsx @@ -1,6 +1,7 @@ import React, { useState, useEffect } from "react" import { VSCodeTextField, VSCodeCheckbox, VSCodeDropdown, VSCodeOption } from "@vscode/webview-ui-toolkit/react" import { useExtensionState } from "@/context/ExtensionStateContext" +import TerminalOutputLineLimitSlider from "./TerminalOutputLineLimitSlider" import { StateServiceClient } from "../../services/grpc-client" import { Int64, Int64Request } from "@shared/proto/common" @@ -133,6 +134,7 @@ export const TerminalSettingsSection: React.FC = () => { this if you experience issues with task lockout after a terminal command.

+
) } diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 631b9d2a..6143c95d 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -64,6 +64,7 @@ interface ExtensionStateContextType extends ExtensionState { 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 @@ -194,6 +195,7 @@ export const ExtensionStateContextProvider: React.FC<{ globalWorkflowToggles: {}, shellIntegrationTimeout: 4000, terminalReuseEnabled: true, + terminalOutputLineLimit: 500, defaultTerminalProfile: "default", isNewUser: false, mcpResponsesCollapsed: false, // Default value (expanded), will be overwritten by extension state @@ -752,6 +754,11 @@ export const ExtensionStateContextProvider: React.FC<{ ...prevState, terminalReuseEnabled: value, })), + setTerminalOutputLineLimit: (value) => + setState((prevState) => ({ + ...prevState, + terminalOutputLineLimit: value, + })), setDefaultTerminalProfile: (value) => setState((prevState) => ({ ...prevState, From b0de6390f42521aaf2980df9e2cc18a2d77507ed Mon Sep 17 00:00:00 2001 From: Ara Date: Sat, 14 Jun 2025 14:27:46 +0530 Subject: [PATCH 42/76] Fix MCP Schema support (#4166) Co-authored-by: Cline Evaluation --- src/services/mcp/schemas.ts | 74 ++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 26 deletions(-) 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, }), ]) From c3326973c7bafa8af5c7e1ee45d3694063b3bf08 Mon Sep 17 00:00:00 2001 From: schardosin Date: Sat, 14 Jun 2025 20:37:34 -0400 Subject: [PATCH 43/76] SAP AI Core as a Provider (#3980) * added changes over a the latest from upstream * cleanup some comments * fixed message mispelling and variable naming convention * added changeset for addition of SAP AI Core provider * fixed mispelled expires_at * added sapAiCoreClientId to hasKey * retrigger tests * removed bedrock-format.ts, added smal function for message formatting in sapaicore, removed models lazy loading, simplifying the code * reverted src/core/webview/index.ts to upstream version, once all the tailored implementation for sapaicore were removed * removed duplicated and not used interfaces * removed the deployments logic from ApiOptions.tsx, now it loads the list of models available only * removed references for deployments once it is not in use anymore * removed unused sapConfig from WebviewMessage and ExtensionMessage * moved previous state variable according to the request' * removed supportsComputerUse from sapaicore sonnet * added grpc fields and updated conversion methods for sap ai core --- .changeset/wet-emus-breathe.md | 5 + proto/state.proto | 7 + src/api/index.ts | 3 + src/api/providers/sapaicore.ts | 540 ++++++++++++++++++ src/core/controller/index.ts | 26 + src/core/storage/state-keys.ts | 14 + src/core/storage/state.ts | 50 ++ src/shared/api.ts | 129 +++++ .../state/settings-conversion.ts | 14 + .../src/components/settings/ApiOptions.tsx | 72 +++ .../src/context/ExtensionStateContext.tsx | 1 + webview-ui/src/utils/validate.ts | 14 + 12 files changed, 875 insertions(+) create mode 100644 .changeset/wet-emus-breathe.md create mode 100644 src/api/providers/sapaicore.ts diff --git a/.changeset/wet-emus-breathe.md b/.changeset/wet-emus-breathe.md new file mode 100644 index 00000000..575cb096 --- /dev/null +++ b/.changeset/wet-emus-breathe.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +Add SAP AI Core as a provider for Cline diff --git a/proto/state.proto b/proto/state.proto index e0b64458..86dcc287 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -205,4 +205,11 @@ message ApiConfiguration { // Favorited model IDs repeated string favorited_model_ids = 71; + + // SAP AI Core specific + optional string sap_ai_core_client_id = 72; + optional string sap_ai_core_client_secret = 73; + optional string sap_ai_core_base_url = 74; + optional string sap_ai_core_token_url = 75; + optional string sap_ai_resource_group = 76; } diff --git a/src/api/index.ts b/src/api/index.ts index 7c2f6c68..420805bf 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -25,6 +25,7 @@ import { AskSageHandler } from "./providers/asksage" import { XAIHandler } from "./providers/xai" import { SambanovaHandler } from "./providers/sambanova" import { CerebrasHandler } from "./providers/cerebras" +import { SapAiCoreHandler } from "./providers/sapaicore" export interface ApiHandler { createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream @@ -87,6 +88,8 @@ export function buildApiHandler(configuration: ApiConfiguration): ApiHandler { return new SambanovaHandler(options) case "cerebras": return new CerebrasHandler(options) + case "sapaicore": + return new SapAiCoreHandler(options) default: return new AnthropicHandler(options) } 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/core/controller/index.ts b/src/core/controller/index.ts index 1f7c1052..186709a8 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -285,6 +285,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) @@ -350,6 +356,23 @@ export class Controller { 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 } // Restore the model used in previous mode @@ -405,6 +428,9 @@ export class Controller { await updateWorkspaceState(this.context, "requestyModelId", newModelId) await updateWorkspaceState(this.context, "requestyModelInfo", newModelInfo) break + case "sapaicore": + await updateWorkspaceState(this.context, "apiModelId", newModelId) + break } if (this.task) { diff --git a/src/core/storage/state-keys.ts b/src/core/storage/state-keys.ts index afefa89d..92f60220 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -22,6 +22,8 @@ export type SecretKey = | "nebiusApiKey" | "sambanovaApiKey" | "cerebrasApiKey" + | "sapAiCoreClientId" + | "sapAiCoreClientSecret" export type GlobalStateKey = | "awsRegion" @@ -71,6 +73,12 @@ export type GlobalStateKey = | "isNewUser" | "terminalOutputLineLimit" | "mcpRichDisplayEnabled" + | "sapAiCoreTokenUrl" + | "sapAiCoreBaseUrl" + | "sapAiResourceGroup" + | "sapAiCoreClientId" + | "sapAiCoreClientSecret" + | "sapAiCoreModelId" export type LocalStateKey = | "localClineRulesToggles" @@ -104,3 +112,9 @@ export type LocalStateKey = | "previousModeReasoningEffort" | "previousModeAwsBedrockCustomSelected" | "previousModeAwsBedrockCustomModelBaseId" + | "previousModeSapAiCoreClientId" + | "previousModeSapAiCoreClientSecret" + | "previousModeSapAiCoreBaseUrl" + | "previousModeSapAiCoreTokenUrl" + | "previousModeSapAiCoreResourceGroup" + | "previousModeSapAiCoreModelId" diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index be2a7bbc..a750e8a2 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -240,6 +240,12 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { terminalReuseEnabled, terminalOutputLineLimit, defaultTerminalProfile, + sapAiCoreClientId, + sapAiCoreClientSecret, + sapAiCoreBaseUrl, + sapAiCoreTokenUrl, + sapAiResourceGroup, + sapAiCoreModelId, ] = await Promise.all([ getGlobalState(context, "isNewUser") as Promise, getSecret(context, "apiKey") as Promise, @@ -306,6 +312,12 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { getGlobalState(context, "terminalReuseEnabled") 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, ]) const localClineRulesToggles = (await getWorkspaceState(context, "localClineRulesToggles")) as ClineRulesToggles @@ -339,6 +351,12 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { previousModeReasoningEffort, previousModeAwsBedrockCustomSelected, previousModeAwsBedrockCustomModelBaseId, + previousModeSapAiCoreClientId, + previousModeSapAiCoreClientSecret, + previousModeSapAiCoreBaseUrl, + previousModeSapAiCoreTokenUrl, + previousModeSapAiCoreResourceGroup, + previousModeSapAiCoreModelId, ] = await Promise.all([ getWorkspaceState(context, "chatSettings") as Promise, getWorkspaceState(context, "apiProvider") as Promise, @@ -368,6 +386,12 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { 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 @@ -474,6 +498,12 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { nebiusApiKey, favoritedModelIds, requestTimeoutMs, + sapAiCoreClientId, + sapAiCoreClientSecret, + sapAiCoreBaseUrl, + sapAiCoreTokenUrl, + sapAiResourceGroup, + sapAiCoreModelId, }, isNewUser: isNewUser ?? true, lastShownAnnouncementId, @@ -495,6 +525,12 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { previousModeReasoningEffort, previousModeAwsBedrockCustomSelected, previousModeAwsBedrockCustomModelBaseId, + previousModeSapAiCoreClientId, + previousModeSapAiCoreClientSecret, + previousModeSapAiCoreBaseUrl, + previousModeSapAiCoreTokenUrl, + previousModeSapAiCoreResourceGroup, + previousModeSapAiCoreModelId, mcpMarketplaceEnabled: mcpMarketplaceEnabled, mcpRichDisplayEnabled: mcpRichDisplayEnabled ?? true, mcpResponsesCollapsed: mcpResponsesCollapsed, @@ -576,6 +612,12 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a fireworksModelId, fireworksModelMaxCompletionTokens, fireworksModelMaxTokens, + sapAiCoreClientId, + sapAiCoreClientSecret, + sapAiCoreBaseUrl, + sapAiCoreTokenUrl, + sapAiResourceGroup, + sapAiCoreModelId, } = apiConfiguration // Workspace state updates await updateWorkspaceState(context, "apiProvider", apiProvider) @@ -624,6 +666,12 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a 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) // Secret updates await storeSecret(context, "apiKey", apiKey) @@ -648,6 +696,8 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a await storeSecret(context, "sambanovaApiKey", sambanovaApiKey) await storeSecret(context, "cerebrasApiKey", cerebrasApiKey) await storeSecret(context, "nebiusApiKey", nebiusApiKey) + await storeSecret(context, "sapAiCoreClientId", sapAiCoreClientId) + await storeSecret(context, "sapAiCoreClientSecret", sapAiCoreClientSecret) } export async function resetExtensionState(context: vscode.ExtensionContext) { diff --git a/src/shared/api.ts b/src/shared/api.ts index 4de499fb..d24f4d51 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -25,6 +25,7 @@ export type ApiProvider = | "xai" | "sambanova" | "cerebras" + | "sapaicore" export interface ApiHandlerOptions { apiModelId?: string @@ -92,6 +93,12 @@ export interface ApiHandlerOptions { sambanovaApiKey?: string cerebrasApiKey?: string requestTimeoutMs?: number + sapAiCoreClientId?: string + sapAiCoreClientSecret?: string + sapAiResourceGroup?: string + sapAiCoreTokenUrl?: string + sapAiCoreBaseUrl?: string + sapAiCoreModelId?: string onRetryAttempt?: (attempt: number, maxRetries: number, delay: number, error: any) => void } @@ -2407,3 +2414,125 @@ export const requestyDefaultModelInfo: ModelInfo = { cacheReadsPrice: 0.3, description: "Anthropic's most intelligent model. Highest level of intelligence and capability.", } + +// 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, + 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/state/settings-conversion.ts b/src/shared/proto-conversions/state/settings-conversion.ts index c460081f..89189e6e 100644 --- a/src/shared/proto-conversions/state/settings-conversion.ts +++ b/src/shared/proto-conversions/state/settings-conversion.ts @@ -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, @@ -208,6 +215,13 @@ 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, + // Arrays favoritedModelIds: protoConfig.favoritedModelIds || [], } diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 6cfb211b..a62da04a 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -46,6 +46,8 @@ import { vertexModels, xaiDefaultModelId, xaiModels, + sapAiCoreDefaultModelId, + sapAiCoreModels, } from "@shared/api" import { EmptyRequest, StringRequest } from "@shared/proto/common" import { OpenAiModelsRequest, UpdateApiConfigurationRequest } from "@shared/proto/models" @@ -70,6 +72,7 @@ import OllamaModelPicker from "./OllamaModelPicker" import OpenRouterModelPicker, { ModelDescriptionMarkdown, OPENROUTER_MODEL_PICKER_Z_INDEX } from "./OpenRouterModelPicker" import RequestyModelPicker from "./RequestyModelPicker" import ThinkingBudgetSlider from "./ThinkingBudgetSlider" +import { ExtensionMessage } from "@shared/ExtensionMessage" interface ApiOptionsProps { showModelOptions: boolean @@ -374,6 +377,7 @@ const ApiOptions = ({ xAI SambaNova Cerebras + SAP AI Core @@ -2081,6 +2085,71 @@ const ApiOptions = ({
)} + {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 && (

{SUPPORTED_THINKING_MODELS[selectedProvider]?.includes(selectedModelId) && ( @@ -2631,6 +2701,8 @@ export function normalizeApiConfiguration(apiConfiguration?: ApiConfiguration): return getProviderData(sambanovaModels, sambanovaDefaultModelId) case "cerebras": return getProviderData(cerebrasModels, cerebrasDefaultModelId) + case "sapaicore": + return getProviderData(sapAiCoreModels, sapAiCoreDefaultModelId) default: return getProviderData(anthropicModels, anthropicDefaultModelId) } diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 6143c95d..404ebcff 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -317,6 +317,7 @@ export const ExtensionStateContextProvider: React.FC<{ config.asksageApiKey, config.xaiApiKey, config.sambanovaApiKey, + config.sapAiCoreClientId, ].some((key) => key !== undefined) : false diff --git a/webview-ui/src/utils/validate.ts b/webview-ui/src/utils/validate.ts index ecfcbec1..79686eae 100644 --- a/webview-ui/src/utils/validate.ts +++ b/webview-ui/src/utils/validate.ts @@ -113,6 +113,20 @@ export function validateApiConfiguration(apiConfiguration?: ApiConfiguration): s return "You must provide a valid API key or choose a different provider." } break + 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 } } return undefined From 5d4594e82eb556693890605618ef4ef7c354e56c Mon Sep 17 00:00:00 2001 From: Dennise Bartlett Date: Sat, 14 Jun 2025 23:14:51 -0700 Subject: [PATCH 44/76] Update developer reset to allow for resetting workspace settings. (#4229) * Update developer reset to allow for resetting workspace settings. * Add Changeset * Add Metadata field to ResetStateRequest --- .changeset/grumpy-cars-report.md | 5 +++++ proto/state.proto | 7 ++++++- src/core/controller/state/resetState.ts | 18 +++++++++++------ src/core/storage/state.ts | 9 ++++++++- .../src/components/settings/SettingsView.tsx | 20 ++++++++++++++----- 5 files changed, 46 insertions(+), 13 deletions(-) create mode 100644 .changeset/grumpy-cars-report.md diff --git a/.changeset/grumpy-cars-report.md b/.changeset/grumpy-cars-report.md new file mode 100644 index 00000000..50fa4b17 --- /dev/null +++ b/.changeset/grumpy-cars-report.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Update developer reset to allow for resetting workspace settings. diff --git a/proto/state.proto b/proto/state.proto index 86dcc287..2b5d8cbb 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -13,7 +13,7 @@ service StateService { 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 updateAutoApprovalSettings(AutoApprovalSettingsRequest) returns (Empty); rpc updateSettings(UpdateSettingsRequest) returns (Empty); @@ -63,6 +63,11 @@ message ChatContent { repeated string files = 3; } +message ResetStateRequest { + Metadata metadata = 1; + optional bool global = 2; +} + message AutoApprovalSettingsRequest { Metadata metadata = 1; message Actions { diff --git a/src/core/controller/state/resetState.ts b/src/core/controller/state/resetState.ts index e799fb72..2ac9849b 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("Resetting state...") - await resetExtensionState(controller.context) + if (request.global) { + vscode.window.showInformationMessage("Resetting global state...") + await resetGlobalState(controller.context) + } else { + vscode.window.showInformationMessage("Resetting workspace state...") + await resetWorkspaceState(controller.context) + } if (controller.task) { controller.task.abortTask() diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index a750e8a2..ee0e4c04 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -700,7 +700,14 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a 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) } diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index d57a9315..baf94370 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -7,7 +7,7 @@ import { validateApiConfiguration, validateModelId } from "@/utils/validate" import { vscode } from "@/utils/vscode" import { ExtensionMessage } from "@shared/ExtensionMessage" import { EmptyRequest, StringRequest } from "@shared/proto/common" -import { PlanActMode, TogglePlanActModeRequest, UpdateSettingsRequest } from "@shared/proto/state" +import { PlanActMode, ResetStateRequest, TogglePlanActModeRequest, UpdateSettingsRequest } from "@shared/proto/state" import { VSCodeButton, VSCodeCheckbox, VSCodeLink, VSCodeTextArea } from "@vscode/webview-ui-toolkit/react" import { CheckCheck, FlaskConical, Info, LucideIcon, Settings, SquareMousePointer, SquareTerminal, Webhook } from "lucide-react" import { memo, useCallback, useEffect, useRef, useState } from "react" @@ -406,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) } @@ -709,10 +713,16 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => { {renderSectionHeader("debug")}

handleResetState()} className="mt-[5px] w-auto" style={{ backgroundColor: "var(--vscode-errorForeground)", color: "black" }}> - Reset State + Reset Workspace State + + handleResetState(true)} + className="mt-[5px] w-auto" + style={{ backgroundColor: "var(--vscode-errorForeground)", color: "black" }}> + Reset Global State

This will reset all global state and secret storage in the extension. From 5a66cb7819b7d823b8f57a41a38d7bbe043ec17b Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Sun, 15 Jun 2025 10:15:32 -0700 Subject: [PATCH 45/76] catch error more broadly (#4235) --- .../context/context-management/context-error-handling.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 } From 31de5053f32dcca59db2070c019adc45f0e31c62 Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Sun, 15 Jun 2025 11:48:04 -0700 Subject: [PATCH 46/76] Fix: Checkmark control menu improvements (#4218) * Better debounce on checkmark control menu * Fix issue where Restore Files button was disabled after first use --- .changeset/tiny-olives-tease.md | 5 ++ .../components/common/CheckmarkControl.tsx | 85 ++++++++++++------- 2 files changed, 58 insertions(+), 32 deletions(-) create mode 100644 .changeset/tiny-olives-tease.md diff --git a/.changeset/tiny-olives-tease.md b/.changeset/tiny-olives-tease.md new file mode 100644 index 00000000..b0834e61 --- /dev/null +++ b/.changeset/tiny-olives-tease.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Better debounce on checkmark control menu diff --git a/webview-ui/src/components/common/CheckmarkControl.tsx b/webview-ui/src/components/common/CheckmarkControl.tsx index adc35cc2..f2bc242d 100644 --- a/webview-ui/src/components/common/CheckmarkControl.tsx +++ b/webview-ui/src/components/common/CheckmarkControl.tsx @@ -5,7 +5,7 @@ import { CheckpointRestoreRequest } from "@shared/proto/checkpoints" import { Int64Request } from "@shared/proto/common" import { ClineCheckpointRestore } from "@shared/WebviewMessage" import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" -import { useEffect, useRef, useState } from "react" +import { useCallback, useEffect, useRef, useState } from "react" import { createPortal } from "react-dom" import styled from "styled-components" import { useExtensionState } from "@/context/ExtensionStateContext" @@ -21,11 +21,43 @@ export const CheckmarkControl = ({ messageTs, isCheckpointCheckedOut }: Checkmar const [restoreWorkspaceDisabled, setRestoreWorkspaceDisabled] = useState(false) const [restoreBothDisabled, setRestoreBothDisabled] = useState(false) const [showRestoreConfirm, setShowRestoreConfirm] = useState(false) - const [hasMouseEntered, setHasMouseEntered] = useState(false) - const containerRef = useRef(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 ( - + @@ -318,9 +339,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: From a9dfc5d0b6fe8464cce092585ef67ffee0ca3562 Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Sun, 15 Jun 2025 13:49:47 -0700 Subject: [PATCH 47/76] fix sap provider (#4240) * fix * proto nit --- proto/models.proto | 8 ++++++-- .../models/api-configuration-conversion.ts | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/proto/models.proto b/proto/models.proto index 739803f7..6a8540ba 100644 --- a/proto/models.proto +++ b/proto/models.proto @@ -121,6 +121,7 @@ enum ApiProvider { XAI = 21; SAMBANOVA = 22; CEREBRAS = 23; + SAPAICORE = 24; } // Model info for OpenAI-compatible models @@ -226,8 +227,11 @@ message ModelsApiConfiguration { optional string sambanova_api_key = 63; optional string cerebras_api_key = 64; optional int32 request_timeout_ms = 65; - - // From ApiConfiguration (additional fields) 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; } diff --git a/src/shared/proto-conversions/models/api-configuration-conversion.ts b/src/shared/proto-conversions/models/api-configuration-conversion.ts index db3526cd..c8b79a3b 100644 --- a/src/shared/proto-conversions/models/api-configuration-conversion.ts +++ b/src/shared/proto-conversions/models/api-configuration-conversion.ts @@ -234,6 +234,8 @@ function convertApiProviderToProto(provider: string | undefined): ProtoApiProvid return ProtoApiProvider.SAMBANOVA case "cerebras": return ProtoApiProvider.CEREBRAS + case "sapaicore": + return ProtoApiProvider.SAPAICORE default: return ProtoApiProvider.ANTHROPIC } @@ -290,6 +292,8 @@ function convertProtoToApiProvider(provider: ProtoApiProvider): ApiProvider { return "sambanova" case ProtoApiProvider.CEREBRAS: return "cerebras" + case ProtoApiProvider.SAPAICORE: + return "sapaicore" default: return "anthropic" } @@ -365,6 +369,11 @@ export function convertApiConfigurationToProto(config: ApiConfiguration): ProtoA 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, } } @@ -438,5 +447,10 @@ export function convertProtoToApiConfiguration(protoConfig: ProtoApiConfiguratio 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, } } From ddbe3f47bd793f3a885931f9d116e48c5bbf672b Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Sun, 15 Jun 2025 22:22:10 -0700 Subject: [PATCH 48/76] Add fixes for the grpc handler and client for the host bridge service (#4221) * Fix error handling for unary handler in the host bridge grpc handler for vscode. The unary request handler was return a struct like {message: ..., error: ..., requestId: ...} But the caller was only looking at the message field, not the error. Simplify the unary handler and just return the response message or throw if there was an error. The caller already has the request id, it doesn't need it to be returned from handler. * Update comments * Return early from cancelRequest if request wasn't cancelled to reduce indent level/complexity. * Fix bug in cancelRequest in the host bridge grpc handler where cancel message is never sent to the client. When a request is cancelled it is removed from the registery. The cancel handler was cancelling the request, and then trying to retrieve it again to get the stream handler, but it was already removed from the active request, so the cancel message was never sent to the client. Fix this by retrieving the stream handler first, and then cancelling the request. --- package.json | 2 +- src/core/controller/grpc-request-registry.ts | 20 +- .../vscode/client/host-grpc-client-base.ts | 14 +- src/hosts/vscode/host-grpc-handler.ts | 173 ++++++++---------- 4 files changed, 93 insertions(+), 116 deletions(-) diff --git a/package.json b/package.json index 0be7eaed..e10044d5 100644 --- a/package.json +++ b/package.json @@ -331,7 +331,7 @@ "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 src/hosts/ webview-ui/src/services src/standalone/server-setup.ts --write --log-level silent", + "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", 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/hosts/vscode/client/host-grpc-client-base.ts b/src/hosts/vscode/client/host-grpc-client-base.ts index 4141008d..326cbb2a 100644 --- a/src/hosts/vscode/client/host-grpc-client-base.ts +++ b/src/hosts/vscode/client/host-grpc-client-base.ts @@ -33,10 +33,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 +76,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 +84,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 +98,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 index 7e781a42..06cbd80d 100644 --- a/src/hosts/vscode/host-grpc-handler.ts +++ b/src/hosts/vscode/host-grpc-handler.ts @@ -1,5 +1,4 @@ -import { v4 as uuidv4 } from "uuid" -import { hostServiceHandlers } from "./host-grpc-service-config" +import { HostServiceHandlerConfig, hostServiceHandlers } from "./host-grpc-service-config" import { GrpcRequestRegistry } from "@core/controller/grpc-request-registry" /** @@ -20,13 +19,13 @@ export interface StreamingCallbacks { } /** - * Handles gRPC requests from the webview + * Handles gRPC requests for the host bridge. */ export class GrpcHandler { constructor() {} /** - * Handle a gRPC request from the webview + * Handle a gRPC request for the host bridge. * @param service The service name * @param method The method name * @param message The request message @@ -37,90 +36,71 @@ export class GrpcHandler { async handleRequest( service: string, method: string, - message: any, + request: any, requestId: string, streamingCallbacks?: StreamingCallbacks, - ): Promise< - | { - message?: any - error?: string - request_id: string - } - | (() => void) - > { + ): Promise void)> { + if (!streamingCallbacks) { + return this.handleUnaryRequest(service, method, request) + } + // If streaming callbacks are provided, handle as a streaming request - if (streamingCallbacks) { - let completionCalled = false + 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}`) + // Create a response handler that will call the client's callbacks + const responseHandler: StreamingResponseHandler = async (response, isLast = false, sequenceNumber) => { try { - await this.handleStreamingRequest(service, method, message, requestId) + // 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))) } } - - // Return a function to cancel the stream - return () => { - console.log(`[DEBUG] Cancelling streaming request: ${requestId}`) - this.cancelRequest(requestId) - } } - // Handle as a unary request + // 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 { - // 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, - } + await this.handleStreamingRequest(service, method, request, requestId) } catch (error) { - return { - error: error instanceof Error ? error.message : String(error), - request_id: requestId, + 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 } /** @@ -129,27 +109,25 @@ export class GrpcHandler { * @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}`) + const requestInfo = requestRegistry.getRequestInfo(requestId) + if (!requestInfo) { + return false } - return cancelled + 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 } /** @@ -160,11 +138,7 @@ export class GrpcHandler { * @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}`) - } + const serviceConfig = this.getServiceHandlerConfig(service) // Check if the service supports streaming if (!serviceConfig.streamingHandler) { @@ -186,6 +160,13 @@ export class GrpcHandler { // 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] + } } /** From 54a7fed77bd46d24aa9c7f6938d7da11f5f7f3f3 Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Mon, 16 Jun 2025 11:57:41 -0700 Subject: [PATCH 49/76] Exclune clinerules from checkpoints (#4236) --- .changeset/fast-ducks-raise.md | 5 +++++ src/integrations/checkpoints/CheckpointExclusions.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/fast-ducks-raise.md diff --git a/.changeset/fast-ducks-raise.md b/.changeset/fast-ducks-raise.md new file mode 100644 index 00000000..aa4136fe --- /dev/null +++ b/.changeset/fast-ducks-raise.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Exclude clinerules from checkpoints 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/", From e8e8eac8201c54a13548dca5fc3a5d392112805b Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Mon, 16 Jun 2025 12:48:02 -0700 Subject: [PATCH 50/76] Feat: Reduce diff edit errors when restoring tasks w/o checkpoints (#4232) * Added file context warnings to reduce diff edit errors when resuming a task after it has been restored * changeset * Prompt tweak --- .changeset/hot-vans-hang.md | 5 + .../context-tracking/FileContextTracker.ts | 167 ++++++++++++++++-- src/core/prompts/responses.ts | 16 +- src/core/task/index.ts | 26 +++ src/extension.ts | 4 + 5 files changed, 203 insertions(+), 15 deletions(-) create mode 100644 .changeset/hot-vans-hang.md diff --git a/.changeset/hot-vans-hang.md b/.changeset/hot-vans-hang.md new file mode 100644 index 00000000..8922920e --- /dev/null +++ b/.changeset/hot-vans-hang.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Added file context warnings to reduce diff edit errors when resuming a task after it has been restored 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/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/task/index.ts b/src/core/task/index.ts index afccc7bf..419640bc 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -454,6 +454,18 @@ export class Task { const deletedMessages = this.clineMessages.slice(messageIndex + 1) const deletedApiReqsMetrics = getApiMetrics(combineApiRequests(combineCommandSequences(deletedMessages))) + // 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 = this.clineMessages.slice(0, messageIndex + 1) await this.overwriteClineMessages(newClineMessages) // calls saveClineMessages which saves historyItem @@ -1131,12 +1143,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 !== "") { @@ -1167,6 +1184,15 @@ export class Task { } } + // 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.overwriteApiConversationHistory(modifiedApiConversationHistory) await this.initiateTaskLoop(newUserContent) } diff --git a/src/extension.ts b/src/extension.ts index c07e658f..a6204c27 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -25,6 +25,7 @@ import { sendAccountButtonClickedEvent } from "./core/controller/ui/subscribeToA import { migratePlanActGlobalToWorkspaceStorage, migrateCustomInstructionsToGlobalRules } from "./core/storage/state" import { sendFocusChatInputEvent } from "./core/controller/ui/subscribeToFocusChatInput" +import { FileContextTracker } from "./core/context/context-tracking/FileContextTracker" /* Built using https://github.com/microsoft/vscode-webview-ui-toolkit @@ -52,6 +53,9 @@ export async function activate(context: vscode.ExtensionContext) { // 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") From 97838fe349c970877924f3975629c54f6e90dadd Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Mon, 16 Jun 2025 15:15:35 -0700 Subject: [PATCH 51/76] Generate promise-based TS clients with nice-grpc. (#4259) Add a manager class to hold all the instances of the clients. They need to be reused, unlike the vscode clients which are just static method calls. Move the generated file src/standalone/server-setup.ts into src/generated/ directory. Add the host bridge address env var to the vscode launch.json In build-proto.js: path.join will normalize slashes in file paths, so use path.join(x, "a/b/c") instead of path.join(x, "a", "b", "c"). --- .gitignore | 5 +- .vscode/launch.json | 5 +- package-lock.json | 100 ++++++++++++++++++ package.json | 1 + proto/build-proto.js | 44 ++++---- scripts/generate-server-setup.mjs | 17 +-- .../external/client/host-bridge-client.ts | 23 ---- src/hosts/host-bridge-client.ts | 3 +- src/standalone/host-bridge-client-manager.ts | 51 +++++++++ src/standalone/standalone.ts | 8 +- tsconfig.json | 5 +- 11 files changed, 199 insertions(+), 63 deletions(-) delete mode 100644 src/hosts/external/client/host-bridge-client.ts create mode 100644 src/standalone/host-bridge-client-manager.ts diff --git a/.gitignore b/.gitignore index 5d1536e1..6a8cdf5e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,8 +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 @@ -31,8 +32,6 @@ src/shared/proto/*.ts src/shared/proto/host/*.ts # Webview webview-ui/src/services/grpc-client.ts -# Standalone -src/standalone/server-setup.ts # Host bridge src/hosts/vscode/*/methods.ts src/hosts/vscode/*/index.ts 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/package-lock.json b/package-lock.json index a5c5a008..9d4c9feb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,6 +53,7 @@ "jschardet": "^3.1.4", "mammoth": "^1.8.0", "monaco-vscode-textmate-theme-converter": "^0.1.7", + "nice-grpc": "^2.1.12", "ollama": "^0.5.13", "open": "^10.1.2", "open-graph-scraper": "^6.9.0", @@ -3755,6 +3756,16 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, "node_modules/@jsep-plugin/assignment": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", @@ -8693,6 +8704,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", @@ -18229,6 +18246,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", @@ -22350,6 +22400,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", @@ -26655,6 +26711,11 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==" + }, "@jsep-plugin/assignment": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz", @@ -30368,6 +30429,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", @@ -36789,6 +36855,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", @@ -39662,6 +39757,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", diff --git a/package.json b/package.json index e10044d5..69483576 100644 --- a/package.json +++ b/package.json @@ -448,6 +448,7 @@ "jschardet": "^3.1.4", "mammoth": "^1.8.0", "monaco-vscode-textmate-theme-converter": "^0.1.7", + "nice-grpc": "^2.1.12", "ollama": "^0.5.13", "open": "^10.1.2", "open-graph-scraper": "^6.9.0", diff --git a/proto/build-proto.js b/proto/build-proto.js index 99ee4739..4f6fec7c 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -15,18 +15,17 @@ const PROTOC = path.join(require.resolve("grpc-tools"), "../bin/protoc") 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 DESCRIPTOR_OUT_DIR = path.join(ROOT_DIR, "dist-standalone", "proto") +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 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_PLUGIN = require.resolve("ts-proto/protoc-gen-ts_proto") + (isWindows ? ".cmd" : "") 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. @@ -49,7 +48,7 @@ const serviceNameMap = { ui: "cline.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 @@ -58,9 +57,7 @@ const hostServiceNameMap = { watch: "host.WatchService", // Add new host services here } -const hostServiceDirs = Object.keys(hostServiceNameMap).map((serviceKey) => - path.join(ROOT_DIR, "src", "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...")) @@ -69,7 +66,7 @@ async function main() { checkAppleSiliconCompatibility() // Create output directories if they don't exist - for (const dir of [TS_OUT_DIR, GRPC_JS_OUT_DIR, DESCRIPTOR_OUT_DIR]) { + for (const dir of [TS_OUT_DIR, GRPC_JS_OUT_DIR, NICE_JS_OUT_DIR, DESCRIPTOR_OUT_DIR]) { await fs.mkdir(dir, { recursive: true }) } @@ -82,8 +79,11 @@ async function main() { const protoFiles = await globby("**/*.proto", { cwd: SCRIPT_DIR, realpath: true }) console.log(chalk.cyan(`Processing ${protoFiles.length} proto files from`), SCRIPT_DIR) - tsProtoc(TS_OUT_DIR, protoFiles, ["outputServices=generic-definitions", ...TS_PROTO_OPTIONS]) - tsProtoc(GRPC_JS_OUT_DIR, protoFiles, ["outputServices=grpc-js", ...TS_PROTO_OPTIONS]) + 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 descriptorFile = path.join(DESCRIPTOR_OUT_DIR, "descriptor_set.pb") const descriptorProtocCommand = [ @@ -116,17 +116,18 @@ async function main() { async function tsProtoc(outDir, protoFiles, protoOptions) { // Build the protoc command with proper path handling for cross-platform - const tsProtocCommand = [ + 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, + ...protoFiles.map((s) => `"${s}"`), ].join(" ") try { log_verbose(chalk.cyan(`Generating TypeScript code in ${outDir} for:\n${protoFiles.join("\n")}...`)) - execSync(tsProtocCommand, { stdio: "inherit" }) + log_verbose(command) + execSync(command, { stdio: "inherit" }) } catch (error) { console.error(chalk.red("Error generating TypeScript for proto files:"), error) process.exit(1) @@ -662,10 +663,13 @@ async function cleanup() { } // Clean up generated files that were moved. - 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 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 }) } /** diff --git a/scripts/generate-server-setup.mjs b/scripts/generate-server-setup.mjs index c3f54fe8..e5d936a1 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. @@ -31,7 +31,7 @@ function generateHandlersAndExports() { handlerSetup.push(` // ${domain} Service`) handlerSetup.push(` server.addService(cline.${name}Service, {`) for (const [rpcName, rpc] of Object.entries(def.service)) { - imports.push(`import { ${rpcName} } from "../core/controller/${dir}/${rpcName}"`) + imports.push(`import { ${rpcName} } from "@core/controller/${dir}/${rpcName}"`) const requestType = "cline." + rpc.requestType.type.name if (rpc.requestStream) { throw new Error("Request streaming is not supported") @@ -60,12 +60,12 @@ 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 { cline } from "../generated/grpc-js" -import { Controller } from "../core/controller" -import { GrpcHandlerWrapper, GrpcStreamingResponseHandlerWrapper } from "./grpc-types" +import { cline } 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, controller: Controller, wrapper: GrpcHandlerWrapper, @@ -75,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/src/hosts/external/client/host-bridge-client.ts b/src/hosts/external/client/host-bridge-client.ts deleted file mode 100644 index 2a9f2daf..00000000 --- a/src/hosts/external/client/host-bridge-client.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { StringRequest } from "@/shared/proto/common" -import { Uri } from "@/shared/proto/host/uri" -import { FileChangeEvent_ChangeType, SubscribeToFileRequest } from "@/shared/proto/host/watch" - -const UriServiceClient = { - parse: function (_: StringRequest): Uri { - throw Error("Unimplemented") - }, -} -const WatchServiceClient = { - subscribeToFile: function ( - _r: SubscribeToFileRequest, - _h: { - onResponse?: (response: { type: FileChangeEvent_ChangeType }) => void | Promise - onError?: (error: any) => void - onComplete?: () => void - }, - ) { - throw Error("Unimplemented") - }, -} - -export { UriServiceClient, WatchServiceClient } diff --git a/src/hosts/host-bridge-client.ts b/src/hosts/host-bridge-client.ts index e802e518..fe53d0e7 100644 --- a/src/hosts/host-bridge-client.ts +++ b/src/hosts/host-bridge-client.ts @@ -1,6 +1,5 @@ import * as VscodeClient from "./vscode/client/host-grpc-client" -import * as ExternalClient from "./external/client/host-bridge-client" - +import * as ExternalClient from "@/standalone/host-bridge-client-manager" const isHostBridgeExternal = process.env.HOST_BRIDGE_ADDRESS !== undefined && process.env.HOST_BRIDGE_ADDRESS !== "vscode" const Client = isHostBridgeExternal ? ExternalClient : VscodeClient diff --git a/src/standalone/host-bridge-client-manager.ts b/src/standalone/host-bridge-client-manager.ts new file mode 100644 index 00000000..e0df1d7b --- /dev/null +++ b/src/standalone/host-bridge-client-manager.ts @@ -0,0 +1,51 @@ +import { Channel, createChannel, createClient } from "nice-grpc" +import * as host from "@generated/nice-grpc/index.host" + +/** + * 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. + */ +class HostBridgeClientManager { + private static instance: HostBridgeClientManager | null + private channel: Channel + uriClient: host.UriServiceClient + //watchClient: host.WatchServiceClient + + private constructor() { + const address = process.env.HOST_BRIDGE_ADDRESS || "localhost:50052" + this.channel = createChannel(address) + this.uriClient = createClient(host.UriServiceDefinition, this.channel) + //this.watchClient = + } + + public static getInstance(): HostBridgeClientManager { + if (!HostBridgeClientManager.instance) { + HostBridgeClientManager.instance = new HostBridgeClientManager() + } + return HostBridgeClientManager.instance + } + + public close(): void { + this.channel.close() + HostBridgeClientManager.instance = null + } +} + +// TODO(sjf) Replace this with nice-grpc client. +const StubWatchServiceClient = { + subscribeToFile: function ( + _r: host.SubscribeToFileRequest, + _h: { + onResponse?: (response: { type: host.FileChangeEvent_ChangeType }) => void | Promise + onError?: (error: any) => void + onComplete?: () => void + }, + ) { + throw Error("Unimplemented") + }, +} + +const clientManager = HostBridgeClientManager.getInstance() + +export const UriServiceClient = clientManager.uriClient +export const WatchServiceClient = StubWatchServiceClient diff --git a/src/standalone/standalone.ts b/src/standalone/standalone.ts index 383d136d..fa376a2f 100644 --- a/src/standalone/standalone.ts +++ b/src/standalone/standalone.ts @@ -7,10 +7,12 @@ import { Controller } from "../core/controller" import { extensionContext, outputChannel, postMessage } from "./vscode-context" 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 { UriServiceClient } from "@/hosts/host-bridge-client" +import { StringRequest } from "@/shared/proto/common" -function main() { +async function main() { log("Starting service...") activate(extensionContext) @@ -22,7 +24,7 @@ function main() { healthImpl.addToServer(server) // Add all the handlers for the ProtoBus services to the server. - addServices(server, controller, wrapHandler, wrapStreamingResponseHandler) + addProtobusServices(server, controller, wrapHandler, wrapStreamingResponseHandler) // Set up reflection. const reflection = new ReflectionService(getPackageDefinition()) diff --git a/tsconfig.json b/tsconfig.json index 38ffa65a..49cbfbd3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,12 +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/**/*"], From 7172eb194d6b188f5550db229bccbca3e73c6ae8 Mon Sep 17 00:00:00 2001 From: Ara Date: Tue, 17 Jun 2025 06:02:21 +0530 Subject: [PATCH 52/76] Fixing terminal Blocked issue (#4217) Co-authored-by: Cline Evaluation --- src/integrations/terminal/TerminalManager.ts | 22 ++- src/integrations/terminal/TerminalProcess.ts | 181 ++++++++++++++++++- 2 files changed, 197 insertions(+), 6 deletions(-) diff --git a/src/integrations/terminal/TerminalManager.ts b/src/integrations/terminal/TerminalManager.ts index 1a7d65ea..7b203ec9 100644 --- a/src/integrations/terminal/TerminalManager.ts +++ b/src/integrations/terminal/TerminalManager.ts @@ -156,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 }) @@ -225,8 +229,12 @@ export class TerminalManager { 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 @@ -235,11 +243,15 @@ export class TerminalManager { } 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 } @@ -255,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)) { 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") From 189b91ca36c591d1f009fa9add08d771ce8aa92b Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Mon, 16 Jun 2025 23:05:56 -0700 Subject: [PATCH 53/76] Fix: clineMessages not storing all checkpoints commitHashes (#4225) * Fixed issue where checkpoint commitHash was not being saved to every clineMessage in state, added handling in case checkpointTracker was not initialized (resumed tasks) * changeset * prettier --- .changeset/sour-peaches-float.md | 5 +++ src/core/task/index.ts | 63 ++++++++++++++++++++++++-------- 2 files changed, 52 insertions(+), 16 deletions(-) create mode 100644 .changeset/sour-peaches-float.md diff --git a/.changeset/sour-peaches-float.md b/.changeset/sour-peaches-float.md new file mode 100644 index 00000000..a638be1d --- /dev/null +++ b/.changeset/sour-peaches-float.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Fix where clineMessages were not saving checkpoint commitHash on some messages diff --git a/src/core/task/index.ts b/src/core/task/index.ts index 419640bc..cc075b0f 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -429,6 +429,18 @@ export class Task { vscode.window.showErrorMessage("Failed to restore offsetcheckpoint: " + 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 } @@ -1262,23 +1274,43 @@ export class Task { 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 saveClineMessagesAndUpdateHistory( - this.getContext(), + // Initialize checkpoint tracker if it doesn't exist + if (!this.checkpointTracker && !this.checkpointTrackerErrorMessage) { + try { + this.checkpointTracker = await CheckpointTracker.create( this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, + 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.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 lastCheckpointMessage = findLast(this.clineMessages, (m) => m.say === "checkpoint_created") + if (lastCheckpointMessage) { + lastCheckpointMessage.lastCheckpointHash = commitHash + await saveClineMessagesAndUpdateHistory( + this.getContext(), + this.taskId, + this.clineMessages, + this.taskIsFavorited ?? false, + this.conversationHistoryDeletedRange, + this.checkpointTracker, + this.updateTaskHistory, + ) + } + } + } // silently fails for now // } else { @@ -1740,7 +1772,6 @@ export class Task { clineIgnoreInstructions, preferredLanguageInstructions, ) - console.log("[INSTRUCTIONS] User instructions:", userInstructions) systemPrompt += userInstructions } const contextManagementMetadata = await this.contextManager.getNewContextMessagesAndMetadata( @@ -4442,8 +4473,8 @@ export class Task { // 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 + await this.say("checkpoint_created") // Now this is conditional const lastCheckpointMessage = findLast(this.clineMessages, (m) => m.say === "checkpoint_created") if (lastCheckpointMessage) { lastCheckpointMessage.lastCheckpointHash = commitHash From d8e29263df8b94dbc383680795f0d9293dac37e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Barreiro?= <52393857+BarreiroT@users.noreply.github.com> Date: Tue, 17 Jun 2025 08:44:52 -0700 Subject: [PATCH 54/76] fix: Clear the input when the user changes mode within a task (#4242) * Clear the input when the user changes mode within a task * Add changeset * rename prop --- .changeset/mighty-pillows-pretend.md | 5 +++++ webview-ui/src/components/chat/ChatTextArea.tsx | 5 +++++ webview-ui/src/components/chat/ChatView.tsx | 1 + 3 files changed, 11 insertions(+) create mode 100644 .changeset/mighty-pillows-pretend.md diff --git a/.changeset/mighty-pillows-pretend.md b/.changeset/mighty-pillows-pretend.md new file mode 100644 index 00000000..e3f0bdd0 --- /dev/null +++ b/.changeset/mighty-pillows-pretend.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Clear the chat input when the user changes mode within a task diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index 78f377ed..7fe9a345 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -81,6 +81,7 @@ interface ChatTextAreaProps { shouldDisableFilesAndImages: boolean onHeightChange?: (height: number) => void onFocusChange?: (isFocused: boolean) => void + isTaskView: boolean } interface GitCommit { @@ -268,6 +269,7 @@ const ChatTextArea = forwardRef( shouldDisableFilesAndImages, onHeightChange, onFocusChange, + isTaskView, }, ref, ) => { @@ -1015,6 +1017,9 @@ const ChatTextArea = forwardRef( ) // Focus the textarea after mode toggle with slight delay setTimeout(() => { + if (isTaskView) { + setInputValue("") + } textAreaRef.current?.focus() }, 100) }, changeModeDelay) diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 9675423b..3702d535 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -1306,6 +1306,7 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie scrollToBottomAuto() } }} + isTaskView={!!task} />

) From 689afc62ebc634617a2f8970507690381f7bcc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Barreiro?= <52393857+BarreiroT@users.noreply.github.com> Date: Tue, 17 Jun 2025 12:21:07 -0700 Subject: [PATCH 55/76] feat: Integrate Claude Code (#4111) * Integrate Claude Code * Add changeset * handle exits gracefully, select models and update the path * limit the claude-code models and update message * expose the claudeCodePath in the apiConfiguration and proto * remove log * Update proto settings and properly map the provider --- .changeset/stupid-eyes-perform.md | 5 + proto/models.proto | 2 + proto/state.proto | 3 + src/api/index.ts | 3 + src/api/providers/claude-code.ts | 165 ++++++++++++++++++ src/core/storage/state-keys.ts | 1 + src/core/storage/state.ts | 5 + src/integrations/claude-code/run.ts | 45 +++++ src/integrations/claude-code/types.ts | 52 ++++++ src/shared/api.ts | 13 ++ .../models/api-configuration-conversion.ts | 6 + .../state/settings-conversion.ts | 6 + .../src/components/settings/ApiOptions.tsx | 27 +++ 13 files changed, 333 insertions(+) create mode 100644 .changeset/stupid-eyes-perform.md create mode 100644 src/api/providers/claude-code.ts create mode 100644 src/integrations/claude-code/run.ts create mode 100644 src/integrations/claude-code/types.ts diff --git a/.changeset/stupid-eyes-perform.md b/.changeset/stupid-eyes-perform.md new file mode 100644 index 00000000..e207ddf9 --- /dev/null +++ b/.changeset/stupid-eyes-perform.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Integrate Claude Code diff --git a/proto/models.proto b/proto/models.proto index 6a8540ba..508326b8 100644 --- a/proto/models.proto +++ b/proto/models.proto @@ -122,6 +122,7 @@ enum ApiProvider { SAMBANOVA = 22; CEREBRAS = 23; SAPAICORE = 24; + CLAUDE_CODE = 25; } // Model info for OpenAI-compatible models @@ -234,4 +235,5 @@ message ModelsApiConfiguration { 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; } diff --git a/proto/state.proto b/proto/state.proto index 2b5d8cbb..7729a72d 100644 --- a/proto/state.proto +++ b/proto/state.proto @@ -217,4 +217,7 @@ message ApiConfiguration { optional string sap_ai_core_base_url = 74; optional string sap_ai_core_token_url = 75; optional string sap_ai_resource_group = 76; + + // Claude Code specific + optional string claude_code_path = 77; } diff --git a/src/api/index.ts b/src/api/index.ts index 420805bf..1aab6308 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -26,6 +26,7 @@ import { XAIHandler } from "./providers/xai" import { SambanovaHandler } from "./providers/sambanova" import { CerebrasHandler } from "./providers/cerebras" import { SapAiCoreHandler } from "./providers/sapaicore" +import { ClaudeCodeHandler } from "./providers/claude-code" export interface ApiHandler { createMessage(systemPrompt: string, messages: Anthropic.Messages.MessageParam[]): ApiStream @@ -90,6 +91,8 @@ export function buildApiHandler(configuration: ApiConfiguration): ApiHandler { 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/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/core/storage/state-keys.ts b/src/core/storage/state-keys.ts index 92f60220..0835c673 100644 --- a/src/core/storage/state-keys.ts +++ b/src/core/storage/state-keys.ts @@ -79,6 +79,7 @@ export type GlobalStateKey = | "sapAiCoreClientId" | "sapAiCoreClientSecret" | "sapAiCoreModelId" + | "claudeCodePath" export type LocalStateKey = | "localClineRulesToggles" diff --git a/src/core/storage/state.ts b/src/core/storage/state.ts index ee0e4c04..5c889671 100644 --- a/src/core/storage/state.ts +++ b/src/core/storage/state.ts @@ -246,6 +246,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { sapAiCoreTokenUrl, sapAiResourceGroup, sapAiCoreModelId, + claudeCodePath, ] = await Promise.all([ getGlobalState(context, "isNewUser") as Promise, getSecret(context, "apiKey") as Promise, @@ -318,6 +319,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { 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 @@ -437,6 +439,7 @@ export async function getAllExtensionState(context: vscode.ExtensionContext) { apiKey, openRouterApiKey, clineApiKey, + claudeCodePath, awsAccessKey, awsSecretKey, awsSessionToken, @@ -618,6 +621,7 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a sapAiCoreTokenUrl, sapAiResourceGroup, sapAiCoreModelId, + claudeCodePath, } = apiConfiguration // Workspace state updates await updateWorkspaceState(context, "apiProvider", apiProvider) @@ -672,6 +676,7 @@ export async function updateApiConfiguration(context: vscode.ExtensionContext, a 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) 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/shared/api.ts b/src/shared/api.ts index d24f4d51..0ad5848c 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" @@ -54,6 +55,7 @@ export interface ApiHandlerOptions { awsBedrockEndpoint?: string awsBedrockCustomSelected?: boolean awsBedrockCustomModelBaseId?: BedrockModelId + claudeCodePath?: string vertexProjectId?: string vertexRegion?: string openAiBaseUrl?: string @@ -224,6 +226,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 diff --git a/src/shared/proto-conversions/models/api-configuration-conversion.ts b/src/shared/proto-conversions/models/api-configuration-conversion.ts index c8b79a3b..595a983e 100644 --- a/src/shared/proto-conversions/models/api-configuration-conversion.ts +++ b/src/shared/proto-conversions/models/api-configuration-conversion.ts @@ -236,6 +236,8 @@ function convertApiProviderToProto(provider: string | undefined): ProtoApiProvid return ProtoApiProvider.CEREBRAS case "sapaicore": return ProtoApiProvider.SAPAICORE + case "claude-code": + return ProtoApiProvider.CLAUDE_CODE default: return ProtoApiProvider.ANTHROPIC } @@ -294,6 +296,8 @@ function convertProtoToApiProvider(provider: ProtoApiProvider): ApiProvider { return "cerebras" case ProtoApiProvider.SAPAICORE: return "sapaicore" + case ProtoApiProvider.CLAUDE_CODE: + return "claude-code" default: return "anthropic" } @@ -374,6 +378,7 @@ export function convertApiConfigurationToProto(config: ApiConfiguration): ProtoA sapAiResourceGroup: config.sapAiResourceGroup, sapAiCoreTokenUrl: config.sapAiCoreTokenUrl, sapAiCoreBaseUrl: config.sapAiCoreBaseUrl, + claudeCodePath: config.claudeCodePath, } } @@ -452,5 +457,6 @@ export function convertProtoToApiConfiguration(protoConfig: ProtoApiConfiguratio sapAiResourceGroup: protoConfig.sapAiResourceGroup, sapAiCoreTokenUrl: protoConfig.sapAiCoreTokenUrl, sapAiCoreBaseUrl: protoConfig.sapAiCoreBaseUrl, + claudeCodePath: protoConfig.claudeCodePath, } } diff --git a/src/shared/proto-conversions/state/settings-conversion.ts b/src/shared/proto-conversions/state/settings-conversion.ts index 89189e6e..b2bfa191 100644 --- a/src/shared/proto-conversions/state/settings-conversion.ts +++ b/src/shared/proto-conversions/state/settings-conversion.ts @@ -117,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 || [], }) @@ -222,6 +225,9 @@ export function convertProtoApiConfigurationToApiConfiguration(protoConfig: Prot sapAiCoreTokenUrl: protoConfig.sapAiCoreTokenUrl, sapAiResourceGroup: protoConfig.sapAiResourceGroup, + // Claude Code specific + claudeCodePath: protoConfig.claudeCodePath, + // Arrays favoritedModelIds: protoConfig.favoritedModelIds || [], } diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index a62da04a..9a51e076 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, @@ -356,6 +358,7 @@ const ApiOptions = ({ Cline OpenRouter Anthropic + Claude Code Amazon Bedrock OpenAI Compatible GCP Vertex AI @@ -473,6 +476,27 @@ const ApiOptions = ({
)} + {selectedProvider === "claude-code" && ( +
+ + +

+ Path to the Claude Code CLI. +

+
+ )} + {selectedProvider === "openai-native" && (
Model {selectedProvider === "anthropic" && createDropdown(anthropicModels)} + {selectedProvider === "claude-code" && createDropdown(claudeCodeModels)} {selectedProvider === "vertex" && createDropdown(apiConfiguration?.vertexRegion === "global" ? vertexGlobalModels : vertexModels)} {selectedProvider === "gemini" && createDropdown(geminiModels)} @@ -2604,6 +2629,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 From 60d9bd46c5b2710a76f0d774f450dffce7e98bc2 Mon Sep 17 00:00:00 2001 From: canvrno <46584286+canvrno@users.noreply.github.com> Date: Tue, 17 Jun 2025 12:55:58 -0700 Subject: [PATCH 56/76] Fix: Race condition leading to task restoration, checkpoints issues (#4226) * Fixed race condition where clineAsk was undefined, leading to task restoration and other downstream issues * changeset --- .changeset/shiny-snakes-compete.md | 5 +++ webview-ui/src/components/chat/ChatView.tsx | 36 +++++---------------- 2 files changed, 13 insertions(+), 28 deletions(-) create mode 100644 .changeset/shiny-snakes-compete.md diff --git a/.changeset/shiny-snakes-compete.md b/.changeset/shiny-snakes-compete.md new file mode 100644 index 00000000..0bb4585c --- /dev/null +++ b/.changeset/shiny-snakes-compete.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Fixed race condition where clineAsk was undefined, leading to task restoration and other downstream issues diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 3702d535..3ee5ddd8 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -132,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") @@ -146,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 @@ -232,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. @@ -248,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("Retry") setSecondaryButtonText("Start New Task") break case "mistake_limit_reached": setSendingDisabled(false) - setClineAsk("mistake_limit_reached") setEnableButtons(true) setPrimaryButtonText("Proceed Anyways") setSecondaryButtonText("Start New Task") break case "auto_approval_max_req_reached": setSendingDisabled(true) - setClineAsk("auto_approval_max_req_reached") setEnableButtons(true) setPrimaryButtonText("Proceed") setSecondaryButtonText("Start New Task") 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) { @@ -300,28 +295,24 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break case "browser_action_launch": setSendingDisabled(isPartial) - setClineAsk("browser_action_launch") setEnableButtons(!isPartial) setPrimaryButtonText("Approve") setSecondaryButtonText("Reject") break case "command": setSendingDisabled(isPartial) - setClineAsk("command") setEnableButtons(!isPartial) setPrimaryButtonText("Run Command") setSecondaryButtonText("Reject") break case "command_output": setSendingDisabled(false) - setClineAsk("command_output") setEnableButtons(true) setPrimaryButtonText("Proceed While Running") setSecondaryButtonText(undefined) break case "use_mcp_server": setSendingDisabled(isPartial) - setClineAsk("use_mcp_server") setEnableButtons(!isPartial) setPrimaryButtonText("Approve") setSecondaryButtonText("Reject") @@ -329,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("Start New Task") setSecondaryButtonText(undefined) break case "resume_task": setSendingDisabled(false) - setClineAsk("resume_task") setEnableButtons(true) setPrimaryButtonText("Resume Task") setSecondaryButtonText(undefined) @@ -344,7 +333,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break case "resume_completed_task": setSendingDisabled(false) - setClineAsk("resume_completed_task") setEnableButtons(true) setPrimaryButtonText("Start New Task") setSecondaryButtonText(undefined) @@ -352,21 +340,18 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break case "new_task": setSendingDisabled(isPartial) - setClineAsk("new_task") setEnableButtons(!isPartial) setPrimaryButtonText("Start New Task with Context") 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) @@ -383,7 +368,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie setSendingDisabled(true) setSelectedImages([]) setSelectedFiles([]) - setClineAsk(undefined) setEnableButtons(false) } break @@ -419,7 +403,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie useEffect(() => { if (messages.length === 0) { setSendingDisabled(false) - setClineAsk(undefined) setEnableButtons(false) setPrimaryButtonText("Approve") setSecondaryButtonText("Reject") @@ -504,7 +487,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie setSendingDisabled(true) setSelectedImages([]) setSelectedFiles([]) - setClineAsk(undefined) setEnableButtons(false) // setPrimaryButtonText(undefined) // setSecondaryButtonText(undefined) @@ -584,7 +566,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break } setSendingDisabled(true) - setClineAsk(undefined) setEnableButtons(false) // setPrimaryButtonText(undefined) // setSecondaryButtonText(undefined) @@ -637,7 +618,6 @@ const ChatView = ({ isHidden, showAnnouncement, hideAnnouncement, showHistoryVie break } setSendingDisabled(true) - setClineAsk(undefined) setEnableButtons(false) // setPrimaryButtonText(undefined) // setSecondaryButtonText(undefined) From 1adf19a87317a5aedc94978ce9bab45efe498515 Mon Sep 17 00:00:00 2001 From: Ramesh Date: Tue, 17 Jun 2025 18:07:48 -0500 Subject: [PATCH 57/76] update star alignment (#3935) --- .../auto-approve-menu/AutoApproveMenuItem.tsx | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) 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 5a0361d0..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,27 +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) - }} - /> - - )}
From 8d133d9031b9cfadd17f13824377d4fce665fb8d Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Wed, 18 Jun 2025 01:14:28 +0200 Subject: [PATCH 58/76] supporting legacy search and replace blocks too (#4264) * supporting legacy search and replace blocks too * changeset * Handle legacy search/replace chars for first/last partial lines * error recovery + fixing * throwing error if malformed search block - previously this would cause entire file to be deleted * Update cyan-books-cry.md * fixing broken test --------- Co-authored-by: Cline Evaluation Co-authored-by: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> --- .changeset/cyan-books-cry.md | 6 +++ src/core/assistant-message/diff.test.ts | 66 +++++++++++++++++++------ src/core/assistant-message/diff.ts | 39 ++++++++++----- 3 files changed, 84 insertions(+), 27 deletions(-) create mode 100644 .changeset/cyan-books-cry.md diff --git a/.changeset/cyan-books-cry.md b/.changeset/cyan-books-cry.md new file mode 100644 index 00000000..078d690c --- /dev/null +++ b/.changeset/cyan-books-cry.md @@ -0,0 +1,6 @@ +--- +"claude-dev": patch +--- + +Fixes a search and replace edge case bug where Cline would previously delete the whole file +Making the search and replace algorithm more lenient to support models that prefer to use the <<<<<< and >>>>> format instead of ----- and +++++ 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 From c294b86524a924258596f1d3467bdf5a74cd5095 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 16:37:25 -0700 Subject: [PATCH 59/76] v3.17.14 Release Notes v3.17.14 Release Notes --- .changeset/beige-turtles-jump.md | 5 ----- .changeset/clean-beers-clean.md | 5 ----- .changeset/cyan-books-cry.md | 6 ------ .changeset/fast-ducks-raise.md | 5 ----- .changeset/fuzzy-queens-double.md | 5 ----- .changeset/grumpy-cars-report.md | 5 ----- .changeset/hot-vans-hang.md | 5 ----- .changeset/mighty-pillows-pretend.md | 5 ----- .changeset/nice-trees-ring.md | 5 ----- .changeset/shiny-snakes-compete.md | 5 ----- .changeset/shiny-taxis-suffer.md | 5 ----- .changeset/sour-peaches-float.md | 5 ----- .changeset/stupid-eyes-perform.md | 5 ----- .changeset/tiny-olives-tease.md | 5 ----- .changeset/wet-emus-breathe.md | 5 ----- .changeset/wild-cycles-cough.md | 5 ----- CHANGELOG.md | 17 +++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 19 files changed, 20 insertions(+), 84 deletions(-) delete mode 100644 .changeset/beige-turtles-jump.md delete mode 100644 .changeset/clean-beers-clean.md delete mode 100644 .changeset/cyan-books-cry.md delete mode 100644 .changeset/fast-ducks-raise.md delete mode 100644 .changeset/fuzzy-queens-double.md delete mode 100644 .changeset/grumpy-cars-report.md delete mode 100644 .changeset/hot-vans-hang.md delete mode 100644 .changeset/mighty-pillows-pretend.md delete mode 100644 .changeset/nice-trees-ring.md delete mode 100644 .changeset/shiny-snakes-compete.md delete mode 100644 .changeset/shiny-taxis-suffer.md delete mode 100644 .changeset/sour-peaches-float.md delete mode 100644 .changeset/stupid-eyes-perform.md delete mode 100644 .changeset/tiny-olives-tease.md delete mode 100644 .changeset/wet-emus-breathe.md delete mode 100644 .changeset/wild-cycles-cough.md diff --git a/.changeset/beige-turtles-jump.md b/.changeset/beige-turtles-jump.md deleted file mode 100644 index 2107ca8a..00000000 --- a/.changeset/beige-turtles-jump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Fix list_files tool to return files if the targeted directory is a hidden directory diff --git a/.changeset/clean-beers-clean.md b/.changeset/clean-beers-clean.md deleted file mode 100644 index 57ff8f78..00000000 --- a/.changeset/clean-beers-clean.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -add ability to constrain size of terminal output diff --git a/.changeset/cyan-books-cry.md b/.changeset/cyan-books-cry.md deleted file mode 100644 index 078d690c..00000000 --- a/.changeset/cyan-books-cry.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"claude-dev": patch ---- - -Fixes a search and replace edge case bug where Cline would previously delete the whole file -Making the search and replace algorithm more lenient to support models that prefer to use the <<<<<< and >>>>> format instead of ----- and +++++ diff --git a/.changeset/fast-ducks-raise.md b/.changeset/fast-ducks-raise.md deleted file mode 100644 index aa4136fe..00000000 --- a/.changeset/fast-ducks-raise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Exclude clinerules from checkpoints diff --git a/.changeset/fuzzy-queens-double.md b/.changeset/fuzzy-queens-double.md deleted file mode 100644 index bff22719..00000000 --- a/.changeset/fuzzy-queens-double.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -chore(bedrock): remove @anthropic-ai/bedrock-sdk diff --git a/.changeset/grumpy-cars-report.md b/.changeset/grumpy-cars-report.md deleted file mode 100644 index 50fa4b17..00000000 --- a/.changeset/grumpy-cars-report.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Update developer reset to allow for resetting workspace settings. diff --git a/.changeset/hot-vans-hang.md b/.changeset/hot-vans-hang.md deleted file mode 100644 index 8922920e..00000000 --- a/.changeset/hot-vans-hang.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Added file context warnings to reduce diff edit errors when resuming a task after it has been restored diff --git a/.changeset/mighty-pillows-pretend.md b/.changeset/mighty-pillows-pretend.md deleted file mode 100644 index e3f0bdd0..00000000 --- a/.changeset/mighty-pillows-pretend.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Clear the chat input when the user changes mode within a task diff --git a/.changeset/nice-trees-ring.md b/.changeset/nice-trees-ring.md deleted file mode 100644 index c1554a89..00000000 --- a/.changeset/nice-trees-ring.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Added a configurable default terminal profile setting diff --git a/.changeset/shiny-snakes-compete.md b/.changeset/shiny-snakes-compete.md deleted file mode 100644 index 0bb4585c..00000000 --- a/.changeset/shiny-snakes-compete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fixed race condition where clineAsk was undefined, leading to task restoration and other downstream issues diff --git a/.changeset/shiny-taxis-suffer.md b/.changeset/shiny-taxis-suffer.md deleted file mode 100644 index 66429eb6..00000000 --- a/.changeset/shiny-taxis-suffer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -update the copy button functionality diff --git a/.changeset/sour-peaches-float.md b/.changeset/sour-peaches-float.md deleted file mode 100644 index a638be1d..00000000 --- a/.changeset/sour-peaches-float.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Fix where clineMessages were not saving checkpoint commitHash on some messages diff --git a/.changeset/stupid-eyes-perform.md b/.changeset/stupid-eyes-perform.md deleted file mode 100644 index e207ddf9..00000000 --- a/.changeset/stupid-eyes-perform.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Integrate Claude Code diff --git a/.changeset/tiny-olives-tease.md b/.changeset/tiny-olives-tease.md deleted file mode 100644 index b0834e61..00000000 --- a/.changeset/tiny-olives-tease.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": patch ---- - -Better debounce on checkmark control menu diff --git a/.changeset/wet-emus-breathe.md b/.changeset/wet-emus-breathe.md deleted file mode 100644 index 575cb096..00000000 --- a/.changeset/wet-emus-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Add SAP AI Core as a provider for Cline diff --git a/.changeset/wild-cycles-cough.md b/.changeset/wild-cycles-cough.md deleted file mode 100644 index 70edf220..00000000 --- a/.changeset/wild-cycles-cough.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"claude-dev": minor ---- - -Adding MCP Rich Display settings in cline's settings page, to enable users to change it in a persistent manner diff --git a/CHANGELOG.md b/CHANGELOG.md index fd9aa04c..216fbd6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # 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 diff --git a/package-lock.json b/package-lock.json index 9d4c9feb..6cf624b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "3.17.13", + "version": "3.17.14", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "3.17.13", + "version": "3.17.14", "license": "Apache-2.0", "dependencies": { "@anthropic-ai/sdk": "^0.37.0", diff --git a/package.json b/package.json index 69483576..67d78d68 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Cline", "description": "Autonomous coding agent right in your IDE, capable of creating/editing files, running commands, using the browser, and more with your permission every step of the way.", - "version": "3.17.13", + "version": "3.17.14", "icon": "assets/icons/icon.png", "engines": { "vscode": "^1.84.0" From c39a74048a96c42ed467a937b63afc3c2f3ab4e4 Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Tue, 17 Jun 2025 17:25:29 -0700 Subject: [PATCH 60/76] Fix windows build (#4270) --- proto/build-proto.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proto/build-proto.js b/proto/build-proto.js index 4f6fec7c..283164e7 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -21,7 +21,10 @@ 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 TS_PROTO_PLUGIN = require.resolve("ts-proto/protoc-gen-ts_proto") + (isWindows ? ".cmd" : "") +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", From 1fc796020d744ba2c3e6ef3f1905a620238cd78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Wed, 18 Jun 2025 12:11:45 +0530 Subject: [PATCH 61/76] remove the MCP notification pop up (#4251) * remove the MCP notification pop up * Update src/services/mcp/McpHub.ts --------- Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com> --- src/services/mcp/McpHub.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index 07b83e37..60144185 100644 --- a/src/services/mcp/McpHub.ts +++ b/src/services/mcp/McpHub.ts @@ -153,7 +153,6 @@ export class McpHub { const settings = await this.readAndValidateMcpSettingsFile() if (settings) { try { - vscode.window.showInformationMessage("Updating MCP servers...") await this.updateServerConnections(settings.mcpServers) vscode.window.showInformationMessage("MCP servers updated") } catch (error) { From c5eccfe5d61982e3a399a27e5144c49303addc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Barreiro?= <52393857+BarreiroT@users.noreply.github.com> Date: Tue, 17 Jun 2025 23:42:24 -0700 Subject: [PATCH 62/76] fix: Prevent reading env variables from the users environment (#4243) * Do not destructure env variables * Add changeset * Do not set IS_DEV to true in tests * Do not define values if it is not a production build * Add eslint rule to prevent destructuring process.env --- .changeset/lazy-cherries-search.md | 5 +++++ .eslintrc.json | 9 ++++++++- esbuild.js | 8 +++++--- scripts/build-tests.js | 1 - src/extension.ts | 3 ++- webview-ui/.eslintrc.json | 9 ++++++++- .../src/components/chat/task-header/TaskHeader.tsx | 2 +- webview-ui/src/components/settings/SettingsView.tsx | 2 +- 8 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 .changeset/lazy-cherries-search.md 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/.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/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/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/src/extension.ts b/src/extension.ts index a6204c27..5f3c2127 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -639,7 +639,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/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/task-header/TaskHeader.tsx b/webview-ui/src/components/chat/task-header/TaskHeader.tsx index 5e4a213f..0fd784b1 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 diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index baf94370..8b9566c1 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -23,7 +23,7 @@ import SectionHeader from "./SectionHeader" import TerminalSettingsSection from "./TerminalSettingsSection" import { convertApiConfigurationToProtoApiConfiguration } from "@shared/proto-conversions/state/settings-conversion" import { convertChatSettingsToProtoChatSettings } from "@shared/proto-conversions/state/chat-settings-conversion" -const { IS_DEV } = process.env +const IS_DEV = process.env.IS_DEV // Styles for the tab system const settingsTabsContainer = "flex flex-1 overflow-hidden [&.narrow_.tab-label]:hidden" From cecf7304e1c16c73c46d3074edbb8ea6b0610114 Mon Sep 17 00:00:00 2001 From: watany <76135106+watany-dev@users.noreply.github.com> Date: Wed, 18 Jun 2025 15:43:17 +0900 Subject: [PATCH 63/76] fix(bedrock): remove custom Model encode (#4209) * fix(bedrock): without any encoding * fallback for custom model * changeset * Update src/api/providers/bedrock.ts --------- Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com> --- .changeset/pretty-bikes-tickle.md | 5 + src/api/providers/__tests__/bedrock.test.ts | 151 ++++++++++++++++---- src/api/providers/bedrock.ts | 20 ++- 3 files changed, 143 insertions(+), 33 deletions(-) create mode 100644 .changeset/pretty-bikes-tickle.md 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/src/api/providers/__tests__/bedrock.test.ts b/src/api/providers/__tests__/bedrock.test.ts index defc1972..a9d76bb9 100644 --- a/src/api/providers/__tests__/bedrock.test.ts +++ b/src/api/providers/__tests__/bedrock.test.ts @@ -184,34 +184,35 @@ describe("AwsBedrockHandler", () => { }) }) + 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 - 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, - } beforeEach(() => { handler = new AwsBedrockHandler(mockOptions) @@ -591,4 +592,102 @@ describe("AwsBedrockHandler", () => { }) }) }) + + 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 9be8ea35..4a9002d8 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -133,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], } } @@ -214,12 +223,9 @@ export class AwsBedrockHandler implements ApiHandler { /** * 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) { From b92a280f5112ecef25ad602340eb6a1df24856a2 Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 18 Jun 2025 16:44:04 +1000 Subject: [PATCH 64/76] fix: respect selected litellm model IDs for plan & act (#4193) --- .changeset/chatty-turkeys-wait.md | 5 +++++ src/core/controller/index.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/chatty-turkeys-wait.md 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/src/core/controller/index.ts b/src/core/controller/index.ts index 186709a8..8c4e6a85 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -421,8 +421,8 @@ export class Controller { await updateWorkspaceState(this.context, "lmStudioModelId", newModelId) break case "litellm": - await updateWorkspaceState(this.context, "previousModeModelId", apiConfiguration.liteLlmModelId) - await updateWorkspaceState(this.context, "previousModeModelInfo", apiConfiguration.liteLlmModelInfo) + await updateWorkspaceState(this.context, "liteLlmModelId", newModelId) + await updateWorkspaceState(this.context, "liteLlmModelInfo", newModelInfo) break case "requesty": await updateWorkspaceState(this.context, "requestyModelId", newModelId) From 6dd0bbdd799657efb3c004a28127d53768c6c2b5 Mon Sep 17 00:00:00 2001 From: Toshii <94262432+0xToshii@users.noreply.github.com> Date: Tue, 17 Jun 2025 23:45:05 -0700 Subject: [PATCH 65/76] env (#4260) --- src/services/mcp/McpHub.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/mcp/McpHub.ts b/src/services/mcp/McpHub.ts index 60144185..83a4b374 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" @@ -215,8 +215,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", }) From b62f61fbc610ced5f4857f4a9529e2a9079d7bf3 Mon Sep 17 00:00:00 2001 From: Yukio Nozawa Date: Wed, 18 Jun 2025 16:31:28 +0900 Subject: [PATCH 66/76] Fix: Make some of the buttons on the task header accessible to screen readers (#4246) * Fix: The button which closes the currently displayed task is is now accessible with screen readers * Fix: The button which deletes the currently displayed task is now accessible with screen readers * Create changeset --- .changeset/thirty-donkeys-whisper.md | 5 +++++ webview-ui/src/components/chat/task-header/TaskHeader.tsx | 6 +++++- .../chat/task-header/buttons/DeleteTaskButton.tsx | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/thirty-donkeys-whisper.md 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/webview-ui/src/components/chat/task-header/TaskHeader.tsx b/webview-ui/src/components/chat/task-header/TaskHeader.tsx index 0fd784b1..e74550a3 100644 --- a/webview-ui/src/components/chat/task-header/TaskHeader.tsx +++ b/webview-ui/src/components/chat/task-header/TaskHeader.tsx @@ -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" }}>
Date: Wed, 18 Jun 2025 10:34:20 -0700 Subject: [PATCH 67/76] Migrate cline messages to message state handler (#4237) * move apiConversationHistory to MessageStateHandler * move clineMessages state to MessageStateManager class * remove unused imports * remove redundant line --- src/api/retry.ts | 2 +- src/core/controller/index.ts | 2 +- src/core/task/index.ts | 540 +++++++++++++-------------------- src/core/task/message-state.ts | 167 +++++++--- 4 files changed, 335 insertions(+), 376 deletions(-) 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/core/controller/index.ts b/src/core/controller/index.ts index 8c4e6a85..f6032534 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -1007,7 +1007,7 @@ export class Controller { 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 || [], + clineMessages: this.task?.messageStateHandler.getClineMessages() || [], taskHistory: (taskHistory || []) .filter((item) => item.ts && item.task) .sort((a, b) => b.ts - a.ts) diff --git a/src/core/task/index.ts b/src/core/task/index.ts index cc075b0f..9b1cfdda 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -1,7 +1,6 @@ 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" @@ -90,8 +89,6 @@ import { getSavedApiConversationHistory, getSavedClineMessages, GlobalFileNames, - saveApiConversationHistory, - saveClineMessages, } from "@core/storage/disk" import { getGlobalClineRules, @@ -111,10 +108,9 @@ 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 { saveClineMessagesAndUpdateHistory } from "./message-state" +import { MessageStateHandler } from "./message-state" export const USE_EXPERIMENTAL_CLAUDE4_FEATURES = false @@ -149,8 +145,6 @@ export class Task { autoApprovalSettings: AutoApprovalSettings browserSettings: BrowserSettings chatSettings: ChatSettings - apiConversationHistory: Anthropic.MessageParam[] = [] - clineMessages: ClineMessage[] = [] private clineIgnoreController: ClineIgnoreController private askResponse?: ClineAskResponse private askResponseText?: string @@ -188,6 +182,7 @@ export class Task { private didCompleteReadingStream = false private didAutomaticallyRetryFailedApiRequest = false private enableCheckpoints: boolean + messageStateHandler: MessageStateHandler constructor( context: vscode.ExtensionContext, @@ -253,6 +248,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) @@ -261,13 +264,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 @@ -277,10 +279,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), ) @@ -331,56 +335,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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) - } - - private async overwriteClineMessages(newMessages: ClineMessage[]) { - this.clineMessages = newMessages - await saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) - } - async restoreCheckpoint(messageTs: number, restoreType: ClineCheckpointRestore, offset?: number) { - 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 } @@ -404,6 +368,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:", errorMessage) @@ -450,11 +415,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( @@ -463,7 +426,8 @@ 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))) // Detect files edited after this message timestamp for file context warning @@ -478,8 +442,8 @@ export class Task { } } - const newClineMessages = this.clineMessages.slice(0, messageIndex + 1) - await this.overwriteClineMessages(newClineMessages) // calls saveClineMessages which saves historyItem + const newClineMessages = clineMessages.slice(0, messageIndex + 1) + await this.messageStateHandler.overwriteClineMessages(newClineMessages) // calls saveClineMessages which saves historyItem await this.say( "deleted_api_reqs", @@ -511,7 +475,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 @@ -520,15 +486,7 @@ export class Task { }) } - await saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + 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 { @@ -547,8 +505,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() @@ -569,6 +528,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:", errorMessage) @@ -593,7 +553,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 @@ -602,9 +562,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 @@ -670,8 +630,9 @@ export class Task { 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 @@ -689,6 +650,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:", errorMessage) @@ -697,7 +659,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 @@ -708,9 +673,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 @@ -750,14 +715,18 @@ export class Task { } 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() @@ -771,7 +740,7 @@ export class Task { // this.askResponseImages = undefined askTs = Date.now() this.lastMessageTs = askTs - await this.addToClineMessages({ + await this.messageStateHandler.addToClineMessages({ ts: askTs, type: "ask", ask: type, @@ -799,17 +768,10 @@ export class Task { askTs = lastMessage.ts this.lastMessageTs = askTs // lastMessage.ts = askTs - lastMessage.text = text - lastMessage.partial = false - await saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await this.messageStateHandler.updateClineMessage(lastMessageIndex, { + text, + partial: false, + }) // await this.postStateToWebview() const protoMessage = convertClineMessageToProto(lastMessage) await sendPartialMessageEvent(protoMessage) @@ -821,7 +783,7 @@ export class Task { this.askResponseFiles = undefined askTs = Date.now() this.lastMessageTs = askTs - await this.addToClineMessages({ + await this.messageStateHandler.addToClineMessages({ ts: askTs, type: "ask", ask: type, @@ -839,7 +801,7 @@ export class Task { this.askResponseFiles = undefined askTs = Date.now() this.lastMessageTs = askTs - await this.addToClineMessages({ + await this.messageStateHandler.addToClineMessages({ ts: askTs, type: "ask", ask: type, @@ -878,7 +840,7 @@ export class Task { } 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) { @@ -894,7 +856,7 @@ export class Task { // this is a new partial message, so add it with partial state const sayTs = Date.now() this.lastMessageTs = sayTs - await this.addToClineMessages({ + await this.messageStateHandler.addToClineMessages({ ts: sayTs, type: "say", say: type, @@ -917,15 +879,7 @@ export class Task { lastMessage.partial = false // instead of streaming partialMessage events, we do a save and post like normal to persist to disk - await saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() // await this.postStateToWebview() const protoMessage = convertClineMessageToProto(lastMessage) await sendPartialMessageEvent(protoMessage) // more performant than an entire postStateToWebview @@ -933,7 +887,7 @@ export class Task { // this is a new partial=false message, so add it like normal const sayTs = Date.now() this.lastMessageTs = sayTs - await this.addToClineMessages({ + await this.messageStateHandler.addToClineMessages({ ts: sayTs, type: "say", say: type, @@ -948,7 +902,7 @@ export class Task { // this is a new non-partial message, so add it like normal const sayTs = Date.now() this.lastMessageTs = sayTs - await this.addToClineMessages({ + await this.messageStateHandler.addToClineMessages({ ts: sayTs, type: "say", say: type, @@ -971,18 +925,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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + this.messageStateHandler.setClineMessages(clineMessages.slice(0, -1)) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() } } @@ -997,8 +944,8 @@ 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() @@ -1043,41 +990,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 @@ -1205,7 +1154,7 @@ export class Task { }) } - await this.overwriteApiConversationHistory(modifiedApiConversationHistory) + await this.messageStateHandler.overwriteApiConversationHistory(modifiedApiConversationHistory) await this.initiateTaskLoop(newUserContent) } @@ -1261,7 +1210,7 @@ export class Task { 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 } @@ -1269,7 +1218,7 @@ 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 } @@ -1296,18 +1245,14 @@ export class Task { const commitHash = await this.checkpointTracker.commit() if (commitHash) { await this.say("checkpoint_created") - const lastCheckpointMessage = findLast(this.clineMessages, (m) => m.say === "checkpoint_created") - if (lastCheckpointMessage) { - lastCheckpointMessage.lastCheckpointHash = commitHash - await saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + 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 @@ -1323,6 +1268,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) @@ -1335,20 +1281,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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() } } else { console.error("Checkpoint tracker does not exist and could not be initialized for attempt completion") @@ -1775,8 +1713,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, @@ -1785,15 +1723,8 @@ export class Task { if (contextManagementMetadata.updatedConversationHistoryDeletedRange) { this.conversationHistoryDeletedRange = contextManagementMetadata.conversationHistoryDeletedRange - await saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) // 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) @@ -1814,19 +1745,11 @@ export class Task { if (isAnthropic && isAnthropicContextWindowError && !this.didAutomaticallyRetryFailedApiRequest) { this.conversationHistoryDeletedRange = this.contextManager.getNextTruncationRange( - this.apiConversationHistory, + this.messageStateHandler.getApiConversationHistory(), this.conversationHistoryDeletedRange, "quarter", // Force aggressive truncation ) - await saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( Date.now(), await ensureTaskDirectoryExists(this.getContext(), this.taskId), @@ -1836,19 +1759,11 @@ export class Task { } else if (isOpenRouter && !this.didAutomaticallyRetryFailedApiRequest) { if (isOpenRouterContextWindowError) { this.conversationHistoryDeletedRange = this.contextManager.getNextTruncationRange( - this.apiConversationHistory, + this.messageStateHandler.getApiConversationHistory(), this.conversationHistoryDeletedRange, "quarter", // Force aggressive truncation ) - await saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( Date.now(), await ensureTaskDirectoryExists(this.getContext(), this.taskId), @@ -1864,7 +1779,7 @@ export class Task { if (isOpenRouterContextWindowError || isAnthropicContextWindowError) { const truncatedConversationHistory = this.contextManager.getTruncatedMessages( - this.apiConversationHistory, + this.messageStateHandler.getApiConversationHistory(), this.conversationHistoryDeletedRange, ) @@ -1879,16 +1794,22 @@ export class Task { const errorMessage = this.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. } @@ -3606,21 +3527,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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() } } else { // Option not selected, send user feedback @@ -3741,26 +3657,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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.contextManager.triggerApplyStandardContextTruncationNoticeChange( Date.now(), await ensureTaskDirectoryExists(this.getContext(), this.taskId), @@ -4055,21 +3963,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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() } } else { // Option not selected, send user feedback @@ -4163,27 +4066,30 @@ 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 && 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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) } 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 @@ -4438,10 +4344,10 @@ export class Task { } // 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 @@ -4475,9 +4381,14 @@ export class Task { if (isFirstRequest && this.enableCheckpoints && this.checkpointTracker) { const commitHash = await this.checkpointTracker.commit() // Actual commit await this.say("checkpoint_created") // Now this is conditional - const lastCheckpointMessage = findLast(this.clineMessages, (m) => m.say === "checkpoint_created") - if (lastCheckpointMessage) { - lastCheckpointMessage.lastCheckpointHash = commitHash + 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. @@ -4502,7 +4413,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, }) @@ -4510,19 +4421,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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + 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 { @@ -4535,28 +4439,31 @@ export class Task { // 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 || "{}") + const updateApiReqMsg = async (cancelReason?: ClineApiReqCancelReason, streamingFailedMessage?: string) => { + const clineMessages = this.messageStateHandler.getClineMessages() + const currentApiReqInfo: ClineApiReqInfo = JSON.parse(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) + await this.messageStateHandler.updateClineMessage(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) => { @@ -4565,7 +4472,7 @@ export class Task { } // 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 @@ -4575,7 +4482,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: [ { @@ -4592,16 +4499,8 @@ 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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await updateApiReqMsg(cancelReason, streamingFailedMessage) + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() telemetryService.captureConversationTurnEvent( this.taskId, @@ -4726,16 +4625,8 @@ export class Task { cacheReadTokens += apiStreamUsage.cacheReadTokens ?? 0 totalCost = apiStreamUsage.totalCost } - updateApiReqMsg() - await saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await updateApiReqMsg() + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.postStateToWebview() }) } @@ -4758,16 +4649,8 @@ 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 saveClineMessagesAndUpdateHistory( - this.getContext(), - this.taskId, - this.clineMessages, - this.taskIsFavorited ?? false, - this.conversationHistoryDeletedRange, - this.checkpointTracker, - this.updateTaskHistory, - ) + await updateApiReqMsg() + await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.postStateToWebview() // now add to apiconversationhistory @@ -4782,7 +4665,7 @@ export class Task { true, ) - await this.addToApiConversationHistory({ + await this.messageStateHandler.addToApiConversationHistory({ role: "assistant", content: [{ type: "text", text: assistantMessage }], }) @@ -4817,7 +4700,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: [ { @@ -5081,7 +4964,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 index 92d4f01d..75fb2282 100644 --- a/src/core/task/message-state.ts +++ b/src/core/task/message-state.ts @@ -1,5 +1,5 @@ import { combineApiRequests } from "@/shared/combineApiRequests" -import { ensureTaskDirectoryExists, saveClineMessages } from "../storage/disk" +import { ensureTaskDirectoryExists, saveApiConversationHistory, saveClineMessages } from "../storage/disk" import * as vscode from "vscode" import { ClineMessage } from "@/shared/ExtensionMessage" import { getApiMetrics } from "@/shared/getApiMetrics" @@ -10,57 +10,132 @@ 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 -// need to call getContext() from the task object when passing in context -export async function saveClineMessagesAndUpdateHistory( - context: vscode.ExtensionContext, - taskId: string, - clineMessages: ClineMessage[], - taskIsFavorited: boolean, - conversationHistoryDeletedRange: [number, number] | undefined, - checkpointTracker: CheckpointTracker | undefined, - updateTaskHistory: (historyItem: HistoryItem) => Promise, -) { - try { - await saveClineMessages(context, taskId, clineMessages) +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 - // combined as they are in ChatView - const apiMetrics = getApiMetrics(combineApiRequests(combineCommandSequences(clineMessages.slice(1)))) - const taskMessage = clineMessages[0] // first message is always the task say - const lastRelevantMessage = - clineMessages[ - findLastIndex( - clineMessages, - (message) => !(message.ask === "resume_task" || message.ask === "resume_completed_task"), - ) - ] - const taskDir = await ensureTaskDirectoryExists(context, taskId) - let taskDirSize = 0 + 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 { - // getFolderSize.loose silently ignores errors - // returns # of bytes, size/1000/1000 = MB - taskDirSize = await getFolderSize.loose(taskDir) + 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 get task directory size:", taskDir, error) + console.error("Failed to save cline messages:", error) } - await updateTaskHistory({ - id: 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 checkpointTracker?.getShadowGitConfigWorkTree(), - cwdOnTaskInitialization: cwd, - conversationHistoryDeletedRange: conversationHistoryDeletedRange, - isFavorited: 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() } } From d2cdf7ce18c0f12f3b867d94f27843b76dbd4afe Mon Sep 17 00:00:00 2001 From: Ara Date: Wed, 18 Jun 2025 23:07:04 +0530 Subject: [PATCH 68/76] Fixing the context window jump issue for gemini family of models (#4266) --- src/api/providers/gemini.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/providers/gemini.ts b/src/api/providers/gemini.ts index ed0db827..db7cc2a6 100644 --- a/src/api/providers/gemini.ts +++ b/src/api/providers/gemini.ts @@ -185,7 +185,7 @@ export class GeminiHandler implements ApiHandler { }) yield { type: "usage", - inputTokens: promptTokens, + inputTokens: promptTokens - cacheReadTokens, outputTokens, thoughtsTokenCount, cacheReadTokens, From a4a7caff01ce37231c601d2cb9daf2000b3a38e7 Mon Sep 17 00:00:00 2001 From: wangyijing130 Date: Thu, 19 Jun 2025 02:31:59 +0800 Subject: [PATCH 69/76] Fix the error when submitting remote service form (#3579) * Fix the error when submitting remote service form Fix the exception caused by data structure errors when submitting remote service forms. * fix for Prettier * typing --------- Co-authored-by: wangyj20 Co-authored-by: Toshii <94262432+0xToshii@users.noreply.github.com> --- .../configuration/tabs/add-server/AddRemoteServerForm.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 c5342826..7e95d767 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("") From bf5e2785c3670901cc5a4adbadd690c05d30df97 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Wed, 18 Jun 2025 12:36:01 -0700 Subject: [PATCH 70/76] Reorganize task state and refactor out small functions (#4267) * move apiConversationHistory to MessageStateHandler * move clineMessages state to MessageStateManager class * remove unused imports * reorganize task class state variables and refactor out utility functions in recursivelyMakeClineRequests * move task ephemeral state to state class (#4273) --- .../checkpoints/checkpointRestore.ts | 2 +- src/core/controller/index.ts | 14 +- src/core/task/TaskState.ts | 57 ++ src/core/task/index.ts | 652 +++++++++--------- src/core/task/utils.ts | 70 ++ 5 files changed, 461 insertions(+), 334 deletions(-) create mode 100644 src/core/task/TaskState.ts create mode 100644 src/core/task/utils.ts 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/index.ts b/src/core/controller/index.ts index f6032534..b7fa62a3 100644 --- a/src/core/controller/index.ts +++ b/src/core/controller/index.ts @@ -445,8 +445,8 @@ export class Controller { 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", @@ -471,9 +471,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, }, @@ -482,7 +482,7 @@ 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 @@ -1006,7 +1006,7 @@ export class Controller { apiConfiguration, uriScheme: vscode.env.uriScheme, currentTaskItem: this.task?.taskId ? (taskHistory || []).find((item) => item.id === this.task?.taskId) : undefined, - checkpointTrackerErrorMessage: this.task?.checkpointTrackerErrorMessage, + checkpointTrackerErrorMessage: this.task?.taskState.checkpointTrackerErrorMessage, clineMessages: this.task?.messageStateHandler.getClineMessages() || [], taskHistory: (taskHistory || []) .filter((item) => item.ts && item.task) 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 9b1cfdda..b9fc2b0c 100644 --- a/src/core/task/index.ts +++ b/src/core/task/index.ts @@ -6,7 +6,6 @@ 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" @@ -111,6 +110,9 @@ import { processFilesIntoText } from "@integrations/misc/extract-text" 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 @@ -121,68 +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 - terminalManager: TerminalManager - private urlContentFetcher: UrlContentFetcher - browserSession: BrowserSession - contextManager: ContextManager - private didEditFile: boolean = false + // User chat state autoApprovalSettings: AutoApprovalSettings browserSettings: BrowserSettings chatSettings: ChatSettings - 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 - conversationHistoryDeletedRange?: [number, number] - isInitialized = false - 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 + // Message and conversation state messageStateHandler: MessageStateHandler + conversationHistoryDeletedRange?: [number, number] constructor( context: vscode.ExtensionContext, @@ -207,6 +190,7 @@ export class Task { files?: string[], historyItem?: HistoryItem, ) { + this.taskState = new TaskState() this.context = context this.mcpHub = mcpHub this.workspaceTracker = workspaceTracker @@ -361,7 +345,7 @@ export class Task { break } - if (!this.checkpointTracker && !this.checkpointTrackerErrorMessage) { + if (!this.checkpointTracker && !this.taskState.checkpointTrackerErrorMessage) { try { this.checkpointTracker = await CheckpointTracker.create( this.taskId, @@ -372,7 +356,7 @@ 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 + this.taskState.checkpointTrackerErrorMessage = errorMessage await this.postStateToWebview() vscode.window.showErrorMessage(errorMessage) didWorkspaceRestoreFail = true @@ -521,7 +505,7 @@ 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, @@ -532,7 +516,7 @@ 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 + this.taskState.checkpointTrackerErrorMessage = errorMessage await this.postStateToWebview() vscode.window.showErrorMessage(errorMessage) relinquishButton() @@ -643,7 +627,7 @@ 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, @@ -710,7 +694,7 @@ 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 @@ -739,7 +723,7 @@ export class Task { // this.askResponseText = undefined // this.askResponseImages = undefined askTs = Date.now() - this.lastMessageTs = askTs + this.taskState.lastMessageTs = askTs await this.messageStateHandler.addToClineMessages({ ts: askTs, type: "ask", @@ -754,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: @@ -766,7 +750,7 @@ 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 await this.messageStateHandler.updateClineMessage(lastMessageIndex, { text, @@ -777,12 +761,12 @@ export class Task { 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 + this.taskState.lastMessageTs = askTs await this.messageStateHandler.addToClineMessages({ ts: askTs, type: "ask", @@ -795,12 +779,12 @@ 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 + this.taskState.lastMessageTs = askTs await this.messageStateHandler.addToClineMessages({ ts: askTs, type: "ask", @@ -810,32 +794,34 @@ 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") } @@ -855,7 +841,7 @@ export class Task { } else { // this is a new partial message, so add it with partial state const sayTs = Date.now() - this.lastMessageTs = sayTs + this.taskState.lastMessageTs = sayTs await this.messageStateHandler.addToClineMessages({ ts: sayTs, type: "say", @@ -871,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 @@ -886,7 +872,7 @@ export class Task { } else { // this is a new partial=false message, so add it like normal const sayTs = Date.now() - this.lastMessageTs = sayTs + this.taskState.lastMessageTs = sayTs await this.messageStateHandler.addToClineMessages({ ts: sayTs, type: "say", @@ -901,7 +887,7 @@ export class Task { } else { // this is a new non-partial message, so add it like normal const sayTs = Date.now() - this.lastMessageTs = sayTs + this.taskState.lastMessageTs = sayTs await this.messageStateHandler.addToClineMessages({ ts: sayTs, type: "say", @@ -951,7 +937,7 @@ export class Task { await this.say("text", task, images, files) - this.isInitialized = true + this.taskState.isInitialized = true let imageBlocks: Anthropic.ImageBlockParam[] = formatResponse.imageBlocks(images) @@ -1038,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 @@ -1161,7 +1147,7 @@ export class Task { 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 @@ -1184,13 +1170,13 @@ 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() @@ -1224,7 +1210,7 @@ export class Task { } // Initialize checkpoint tracker if it doesn't exist - if (!this.checkpointTracker && !this.checkpointTrackerErrorMessage) { + if (!this.checkpointTracker && !this.taskState.checkpointTrackerErrorMessage) { try { this.checkpointTracker = await CheckpointTracker.create( this.taskId, @@ -1234,7 +1220,7 @@ 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 + this.taskState.checkpointTrackerErrorMessage = errorMessage await this.postStateToWebview() return } @@ -1617,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 */ @@ -1733,17 +1711,17 @@ 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.messageStateHandler.getApiConversationHistory(), this.conversationHistoryDeletedRange, @@ -1755,8 +1733,8 @@ export class Task { 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.messageStateHandler.getApiConversationHistory(), @@ -1772,7 +1750,7 @@ 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. @@ -1787,11 +1765,11 @@ 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( @@ -1840,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) } @@ -1858,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) @@ -1908,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) @@ -1941,17 +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() + 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) @@ -1961,31 +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 } - 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 @@ -2086,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.`, }) @@ -2103,9 +2081,9 @@ 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), }) @@ -2118,26 +2096,26 @@ export class Task { 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. @@ -2151,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) } } @@ -2175,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 @@ -2193,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, isClaude4Model: boolean = false) => { - if (this.abandoned) { + if (this.taskState.abandoned) { console.log("Ignoring error since task was abandoned (i.e. from task cancellation after resetting)") return } @@ -2294,7 +2263,6 @@ export class Task { const isClaude4Model = isClaude4ModelFamily(this.api) // Going through claude family of models if (isClaude4Model && USE_EXPERIMENTAL_CLAUDE4_FEATURES && currentFullJson) { - console.log("[EDIT] Streaming JSON replacement") const streamingResult = await this.handleStreamingJsonReplacement( block, relPath, @@ -2402,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. @@ -2460,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 @@ -2469,6 +2437,8 @@ export class Task { // If auto-approval is enabled but this tool wasn't auto-approved, send notification showNotificationForApprovalIfAutoApprovalEnabled( `Cline wants to ${fileExists ? "edit" : "create"} ${path.basename(relPath)}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "tool") @@ -2497,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, @@ -2539,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") @@ -2617,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 @@ -2631,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, @@ -2641,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 wants to read ${path.basename(absolutePath)}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "tool") const didApprove = await askApproval("tool", completeMessage) @@ -2710,12 +2682,12 @@ export class Task { break } else { if (!relDirPath) { - this.consecutiveMistakeCount++ + 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) @@ -2735,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 wants to view directory ${path.basename(absolutePath)}/`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "tool") const didApprove = await askApproval("tool", completeMessage) @@ -2795,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( @@ -2817,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 wants to view source code definitions in ${path.basename(absolutePath)}/`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) this.removeLastPartialMessageIfExistsWithType("say", "tool") const didApprove = await askApproval("tool", completeMessage) @@ -2882,7 +2858,7 @@ export class Task { break } else { if (!relDirPath) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult( await this.sayAndCreateMissingParamError("search_files", "path"), isClaude4Model, @@ -2891,7 +2867,7 @@ export class Task { break } if (!regex) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult( await this.sayAndCreateMissingParamError("search_files", "regex"), isClaude4Model, @@ -2899,7 +2875,7 @@ export class Task { await this.saveCheckpoint() break } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 const absolutePath = path.resolve(cwd, relDirPath) const results = await regexSearchFiles( @@ -2918,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) @@ -2964,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() @@ -3010,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) @@ -3050,7 +3030,7 @@ export class Task { } else { if (action === "click") { if (!coordinate) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ pushToolResult( await this.sayAndCreateMissingParamError("browser_action", "coordinate"), ) @@ -3061,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({ @@ -3157,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")) { @@ -3202,11 +3182,13 @@ 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 wants to execute a command: ${command}`, + this.autoApprovalSettings.enabled, + this.autoApprovalSettings.enableNotifications, ) // this.removeLastPartialMessageIfExistsWithType("say", "command") const didApprove = await askApproval( @@ -3237,7 +3219,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) @@ -3279,13 +3261,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 @@ -3301,7 +3283,7 @@ export class Task { try { parsedArguments = JSON.parse(mcp_arguments) } catch (error) { - this.consecutiveMistakeCount++ + this.taskState.consecutiveMistakeCount++ await this.say( "error", `Cline tried to use ${tool_name} with an invalid JSON argument. Retrying...`, @@ -3315,7 +3297,7 @@ export class Task { break } } - this.consecutiveMistakeCount = 0 + this.taskState.consecutiveMistakeCount = 0 const completeMessage = JSON.stringify({ type: "use_mcp_tool", serverName: server_name, @@ -3330,10 +3312,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) @@ -3429,18 +3413,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, @@ -3450,10 +3434,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) @@ -3500,12 +3486,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({ @@ -3569,12 +3555,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({ @@ -3623,12 +3609,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({ @@ -3706,37 +3692,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({ @@ -3847,13 +3833,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, @@ -3862,7 +3848,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, @@ -3871,7 +3857,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) { @@ -3929,12 +3919,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({ @@ -3946,13 +3936,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") { @@ -3992,7 +3982,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.]` + @@ -4040,7 +4030,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) @@ -4079,6 +4069,7 @@ export class Task { : undefined if ( lastCompletionResultMessage && + lastCompletionResultMessageIndex !== -1 && hasNewChanges && !lastCompletionResultMessage.text?.endsWith(COMPLETION_RESULT_CHANGES_FLAG) ) { @@ -4131,11 +4122,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({ @@ -4165,7 +4156,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 @@ -4209,11 +4200,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) { @@ -4221,7 +4212,7 @@ export class Task { } if (fileContentString) { - this.userMessageContent.push({ + this.taskState.userMessageContent.push({ type: "text", text: fileContentString, }) @@ -4244,20 +4235,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() @@ -4266,13 +4257,13 @@ 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") } @@ -4284,7 +4275,7 @@ export class Task { } catch {} } - if (this.consecutiveMistakeCount >= 3) { + if (this.taskState.consecutiveMistakeCount >= 3) { if (this.autoApprovalSettings.enabled && this.autoApprovalSettings.enableNotifications) { showSystemNotification({ subtitle: "Error", @@ -4322,12 +4313,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({ @@ -4340,7 +4331,7 @@ 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 @@ -4359,7 +4350,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), @@ -4372,7 +4368,7 @@ 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 } } @@ -4393,7 +4389,12 @@ export class Task { // 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. @@ -4436,36 +4437,6 @@ 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 = async (cancelReason?: ClineApiReqCancelReason, streamingFailedMessage?: string) => { - const clineMessages = this.messageStateHandler.getClineMessages() - const currentApiReqInfo: ClineApiReqInfo = JSON.parse(clineMessages[lastApiReqIndex].text || "{}") - delete currentApiReqInfo.retryStatus // Clear retry status when request is finalized - - await this.messageStateHandler.updateClineMessage(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 @@ -4499,7 +4470,18 @@ export class Task { }) // update api_req_started to have cancelled and cost, so that we can display the cost of the partial stream - await updateApiReqMsg(cancelReason, streamingFailedMessage) + await updateApiReqMsg({ + messageStateHandler: this.messageStateHandler, + lastApiReqIndex, + inputTokens, + outputTokens, + cacheWriteTokens, + cacheReadTokens, + totalCost, + api: this.api, + cancelReason, + streamingFailedMessage, + }) await this.messageStateHandler.saveClineMessagesAndUpdateHistory() telemetryService.captureConversationTurnEvent( @@ -4511,26 +4493,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) { @@ -4550,7 +4532,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 @@ -4561,32 +4543,32 @@ export class Task { } assistantMessage += chunk.text // parse raw assistant message into content blocks - const prevLength = this.assistantMessageContent.length + const prevLength = this.taskState.assistantMessageContent.length const isClaude4Model = isClaude4ModelFamily(this.api) if (isClaude4Model && USE_EXPERIMENTAL_CLAUDE4_FEATURES) { - this.assistantMessageContent = parseAssistantMessageV3(assistantMessage) + 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 @@ -4595,7 +4577,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 @@ -4603,15 +4585,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 @@ -4625,22 +4607,31 @@ export class Task { cacheReadTokens += apiStreamUsage.cacheReadTokens ?? 0 totalCost = apiStreamUsage.totalCost } - await updateApiReqMsg() + 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 }) @@ -4649,7 +4640,16 @@ 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 } - await updateApiReqMsg() + await updateApiReqMsg({ + messageStateHandler: this.messageStateHandler, + lastApiReqIndex, + inputTokens, + outputTokens, + cacheWriteTokens, + cacheReadTokens, + api: this.api, + totalCost, + }) await this.messageStateHandler.saveClineMessagesAndUpdateHistory() await this.postStateToWebview() @@ -4678,21 +4678,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 @@ -4828,7 +4828,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 } @@ -4860,7 +4860,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 = "" 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), + }) +} From 30344befe915b263bb34db217135f9911629da03 Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Wed, 18 Jun 2025 12:39:52 -0700 Subject: [PATCH 71/76] Add a script to generate type safe clients for the host bridge (#4269) * Generate client interfaces and impls. Use the interfaces for the vscode and external clients * Use interfaces --- package.json | 2 +- scripts/generate-host-bridge-client.mjs | 192 +++++++++++++++++++ src/hosts/host-bridge-client.ts | 5 +- src/standalone/host-bridge-client-manager.ts | 8 +- src/standalone/utils.ts | 27 ++- 5 files changed, 227 insertions(+), 7 deletions(-) create mode 100755 scripts/generate-host-bridge-client.mjs diff --git a/package.json b/package.json index 67d78d68..ec636207 100644 --- a/package.json +++ b/package.json @@ -330,7 +330,7 @@ "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", + "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", diff --git a/scripts/generate-host-bridge-client.mjs b/scripts/generate-host-bridge-client.mjs new file mode 100755 index 00000000..ba2e9a54 --- /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)) { + if (def && !("service" in def)) { + addTypeNameToFqn(name, `proto.cline.${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/vscode/host-grpc-handler" + +${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/vscode/host-grpc-handler" +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/src/hosts/host-bridge-client.ts b/src/hosts/host-bridge-client.ts index fe53d0e7..bb70df2d 100644 --- a/src/hosts/host-bridge-client.ts +++ b/src/hosts/host-bridge-client.ts @@ -1,7 +1,8 @@ +import { UriServiceClientInterface, WatchServiceClientInterface } from "@/generated/hosts/host-bridge-client-types" import * as VscodeClient from "./vscode/client/host-grpc-client" import * as ExternalClient from "@/standalone/host-bridge-client-manager" const isHostBridgeExternal = process.env.HOST_BRIDGE_ADDRESS !== undefined && process.env.HOST_BRIDGE_ADDRESS !== "vscode" const Client = isHostBridgeExternal ? ExternalClient : VscodeClient -export const UriServiceClient = Client.UriServiceClient -export const WatchServiceClient = Client.WatchServiceClient +export const UriServiceClient: UriServiceClientInterface = Client.UriServiceClient +export const WatchServiceClient: WatchServiceClientInterface = Client.WatchServiceClient diff --git a/src/standalone/host-bridge-client-manager.ts b/src/standalone/host-bridge-client-manager.ts index e0df1d7b..2670b910 100644 --- a/src/standalone/host-bridge-client-manager.ts +++ b/src/standalone/host-bridge-client-manager.ts @@ -1,5 +1,7 @@ import { Channel, createChannel, createClient } from "nice-grpc" import * as host from "@generated/nice-grpc/index.host" +import { UriServiceClientInterface, WatchServiceClientInterface } from "@/generated/hosts/host-bridge-client-types" +import { FileChangeEvent } from "@/shared/proto/index.host" /** * Singleton class to hold the gRPC clients for the host bridge. The clients should be re-used to avoid @@ -36,7 +38,7 @@ const StubWatchServiceClient = { subscribeToFile: function ( _r: host.SubscribeToFileRequest, _h: { - onResponse?: (response: { type: host.FileChangeEvent_ChangeType }) => void | Promise + onResponse?: (response: FileChangeEvent) => void | Promise onError?: (error: any) => void onComplete?: () => void }, @@ -47,5 +49,5 @@ const StubWatchServiceClient = { const clientManager = HostBridgeClientManager.getInstance() -export const UriServiceClient = clientManager.uriClient -export const WatchServiceClient = StubWatchServiceClient +export const UriServiceClient: UriServiceClientInterface = clientManager.uriClient +export const WatchServiceClient: WatchServiceClientInterface = StubWatchServiceClient diff --git a/src/standalone/utils.ts b/src/standalone/utils.ts index 0c17ee79..9b3ca68b 100644 --- a/src/standalone/utils.ts +++ b/src/standalone/utils.ts @@ -2,6 +2,7 @@ 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/vscode/host-grpc-handler" const log = (...args: unknown[]) => { const timestamp = new Date().toISOString() @@ -16,4 +17,28 @@ function getPackageDefinition() { const packageDefinition = { ...clineDef, ...healthDef } return packageDefinition } -export { getPackageDefinition, log } + +/** + * 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}`) + } + } +} + +export { getPackageDefinition, log, asyncIteratorToCallbacks } From 3550486d4b9e3f5dd9f234d3198333e3fea83d2b Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Wed, 18 Jun 2025 13:51:00 -0700 Subject: [PATCH 72/76] Move StreamingHandlers type into a common location (#4293) This type is used by all host bridge clients, move it out of the vscode directory. --- scripts/generate-host-bridge-client.mjs | 4 ++-- src/hosts/host-bridge-client.ts | 9 +++++++++ src/hosts/vscode/client/host-grpc-client-base.ts | 3 ++- src/hosts/vscode/host-grpc-handler.ts | 10 +--------- src/standalone/standalone.ts | 2 -- src/standalone/utils.ts | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/generate-host-bridge-client.mjs b/scripts/generate-host-bridge-client.mjs index ba2e9a54..9d7760f4 100755 --- a/scripts/generate-host-bridge-client.mjs +++ b/scripts/generate-host-bridge-client.mjs @@ -71,7 +71,7 @@ async function generateInterfacesFile(hostServices) { 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/vscode/host-grpc-handler" +import { StreamingCallbacks } from "@hosts/host-bridge-client" ${clientInterfaces.join("\n\n")} ` @@ -128,7 +128,7 @@ async function generateImplementationFile(hostServices) { // 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/vscode/host-grpc-handler" +import { StreamingCallbacks } from "@hosts/host-bridge-client" import * as proto from "@shared/proto/index" import { Channel, createClient } from "nice-grpc" diff --git a/src/hosts/host-bridge-client.ts b/src/hosts/host-bridge-client.ts index bb70df2d..530a2ab7 100644 --- a/src/hosts/host-bridge-client.ts +++ b/src/hosts/host-bridge-client.ts @@ -6,3 +6,12 @@ const Client = isHostBridgeExternal ? ExternalClient : VscodeClient export const UriServiceClient: UriServiceClientInterface = Client.UriServiceClient export const WatchServiceClient: WatchServiceClientInterface = Client.WatchServiceClient + +/** + * Callback interface for streaming requests + */ +export interface StreamingCallbacks { + onResponse: (response: T) => void + onError?: (error: Error) => void + onComplete?: () => void +} diff --git a/src/hosts/vscode/client/host-grpc-client-base.ts b/src/hosts/vscode/client/host-grpc-client-base.ts index 326cbb2a..14db3a83 100644 --- a/src/hosts/vscode/client/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 "../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 = { diff --git a/src/hosts/vscode/host-grpc-handler.ts b/src/hosts/vscode/host-grpc-handler.ts index 06cbd80d..b76e6f3a 100644 --- a/src/hosts/vscode/host-grpc-handler.ts +++ b/src/hosts/vscode/host-grpc-handler.ts @@ -1,3 +1,4 @@ +import { StreamingCallbacks } from "@hosts/host-bridge-client" import { HostServiceHandlerConfig, hostServiceHandlers } from "./host-grpc-service-config" import { GrpcRequestRegistry } from "@core/controller/grpc-request-registry" @@ -9,15 +10,6 @@ export type StreamingResponseHandler = (response: any, isLast?: boolean, sequenc // 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 for the host bridge. */ diff --git a/src/standalone/standalone.ts b/src/standalone/standalone.ts index fa376a2f..d2a1adb2 100644 --- a/src/standalone/standalone.ts +++ b/src/standalone/standalone.ts @@ -9,8 +9,6 @@ import { getPackageDefinition, log } from "./utils" import { GrpcHandler, GrpcStreamingResponseHandler } from "./grpc-types" import { addProtobusServices } from "@/generated/standalone/server-setup" import { StreamingResponseHandler } from "@/core/controller/grpc-handler" -import { UriServiceClient } from "@/hosts/host-bridge-client" -import { StringRequest } from "@/shared/proto/common" async function main() { log("Starting service...") diff --git a/src/standalone/utils.ts b/src/standalone/utils.ts index 9b3ca68b..e9636ee0 100644 --- a/src/standalone/utils.ts +++ b/src/standalone/utils.ts @@ -2,7 +2,7 @@ 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/vscode/host-grpc-handler" +import { StreamingCallbacks } from "@hosts/host-bridge-client" const log = (...args: unknown[]) => { const timestamp = new Date().toISOString() From 72471f5677e396e04a76e2efcfdf56ccdf6ab070 Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Wed, 18 Jun 2025 14:44:06 -0700 Subject: [PATCH 73/76] In build-protos, create the directories while writing the files. (#4296) * In build-protos, create the directories while writing the files. * Update proto/build-proto.js Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Update proto/build-proto.js Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Update proto/build-proto.js Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * . --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- proto/build-proto.js | 65 +++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 37 deletions(-) diff --git a/proto/build-proto.js b/proto/build-proto.js index 283164e7..d388b9f6 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -177,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) - log_verbose(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}`)) } /** @@ -248,17 +248,7 @@ async function generateMethodRegistrations() { const streamingMethodsMap = await parseProtoForStreamingMethods(protoFiles, SCRIPT_DIR) for (const serviceDir of serviceDirs) { - try { - await fs.access(serviceDir) - } catch (error) { - log_verbose(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) || [] @@ -314,7 +304,8 @@ export function registerAllMethods(): void { methodsContent += `}` // Write the methods.ts file - await fs.writeFile(registryFile, methodsContent) + const registryFile = path.join(serviceDir, "methods.ts") + await writeFileWithMkdirs(registryFile, methodsContent) log_verbose(chalk.green(`Generated ${registryFile}`)) // Generate index.ts file @@ -343,7 +334,8 @@ export const isStreamingMethod = ${serviceName}Service.isStreamingMethod registerAllMethods()` // Write the index.ts file - await fs.writeFile(indexFile, indexContent) + const indexFile = path.join(serviceDir, "index.ts") + await writeFileWithMkdirs(indexFile, indexContent) log_verbose(chalk.green(`Generated ${indexFile}`)) } @@ -394,8 +386,8 @@ 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) + 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}`)) } @@ -462,17 +454,7 @@ async function generateHostMethodRegistrations() { const streamingMethodsMap = await parseProtoForStreamingMethods(hostProtoFiles, path.join(SCRIPT_DIR, "host")) for (const serviceDir of hostServiceDirs) { - try { - await fs.access(serviceDir) - } catch (error) { - log_verbose(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) || [] @@ -528,7 +510,8 @@ export function registerAllMethods(): void { methodsContent += `}` // Write the methods.ts file - await fs.writeFile(registryFile, methodsContent) + const registryFile = path.join(serviceDir, "methods.ts") + await writeFileWithMkdirs(registryFile, methodsContent) log_verbose(chalk.green(`Generated ${registryFile}`)) // Generate index.ts file @@ -557,7 +540,8 @@ export const isStreamingMethod = ${serviceName}Service.isStreamingMethod registerAllMethods()` // Write the index.ts file - await fs.writeFile(indexFile, indexContent) + const indexFile = path.join(serviceDir, "index.ts") + await writeFileWithMkdirs(indexFile, indexContent) log_verbose(chalk.green(`Generated ${indexFile}`)) } @@ -606,10 +590,9 @@ export interface HostServiceHandlerConfig { export const hostServiceHandlers: Record = {${serviceConfigs.join(",")} };` - const configPath = path.join(ROOT_DIR, "src", "hosts", "vscode", "host-grpc-service-config.ts") - await fs.mkdir(path.dirname(configPath), { recursive: true }) - await fs.writeFile(configPath, content) - log_verbose(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}`)) } /** @@ -651,10 +634,9 @@ export { ${serviceExports.join(",\n\t")} }` - const configPath = path.join(ROOT_DIR, "src", "hosts", "vscode", "client", "host-grpc-client.ts") - await fs.mkdir(path.dirname(configPath), { recursive: true }) - await fs.writeFile(configPath, content) - log_verbose(chalk.green(`Generated host gRPC client at ${configPath}`)) + const filePath = path.join(ROOT_DIR, "src/hosts/vscode/client/host-grpc-client.ts") + await writeFileWithMkdirs(filePath, content) + log_verbose(chalk.green(`Generated host gRPC client at ${filePath}`)) } async function cleanup() { @@ -664,6 +646,7 @@ async function cleanup() { 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/standalone/services/host-grpc-client.ts"), { force: true }) @@ -675,6 +658,14 @@ async function cleanup() { 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. */ From bb6d02df83749d67ff8bb602fc1a3de86222bca5 Mon Sep 17 00:00:00 2001 From: celestial-vault <58194240+celestial-vault@users.noreply.github.com> Date: Wed, 18 Jun 2025 14:46:41 -0700 Subject: [PATCH 74/76] Migrate didBecomeVisible protobus (#3996) * migrate chatButtonClicked * changeset * send targeted event to the controller * prettier * migrate didBecomeVisible * changeset * fix proto linter issue * add back event listener --------- Co-authored-by: Elephant Lumps --- .changeset/curvy-bulldogs-jog.md | 5 ++ proto/ui.proto | 3 + .../ui/subscribeToDidBecomeVisible.ts | 63 +++++++++++++++++++ src/core/webview/index.ts | 15 ++--- src/shared/ExtensionMessage.ts | 2 +- webview-ui/src/components/chat/ChatView.tsx | 21 ------- .../src/context/ExtensionStateContext.tsx | 17 +++++ 7 files changed, 94 insertions(+), 32 deletions(-) create mode 100644 .changeset/curvy-bulldogs-jog.md create mode 100644 src/core/controller/ui/subscribeToDidBecomeVisible.ts 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/proto/ui.proto b/proto/ui.proto index 83e5c247..8bdc1db1 100644 --- a/proto/ui.proto +++ b/proto/ui.proto @@ -259,4 +259,7 @@ service UiService { // 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/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/webview/index.ts b/src/core/webview/index.ts index 015bb76c..cea1cd84 100644 --- a/src/core/webview/index.ts +++ b/src/core/webview/index.ts @@ -10,6 +10,7 @@ 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 @@ -113,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, @@ -127,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, diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index b402bb66..c75e80e0 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -25,7 +25,7 @@ export interface ExtensionMessage { | "userCreditsPayments" | "grpc_response" // New type for gRPC responses text?: string - action?: "didBecomeVisible" | "accountLogoutClicked" + action?: "accountLogoutClicked" state?: ExtensionState images?: string[] files?: string[] diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 3ee5ddd8..4aa6b9b3 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -675,27 +675,6 @@ 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 - } - break - } - // 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], - ) - - useEvent("message", handleMessage) - // Listen for local focusChatInput event useEffect(() => { const handleFocusChatInput = () => { diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 404ebcff..be3fef15 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -265,6 +265,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(() => { @@ -395,6 +396,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) => { @@ -649,6 +662,10 @@ export const ExtensionStateContextProvider: React.FC<{ mcpServersSubscriptionRef.current() mcpServersSubscriptionRef.current = null } + if (didBecomeVisibleUnsubscribeRef.current) { + didBecomeVisibleUnsubscribeRef.current() + didBecomeVisibleUnsubscribeRef.current = null + } } }, []) From febe795af4a3c779c31e8e3f9e0aedba8f307250 Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Wed, 18 Jun 2025 15:38:46 -0700 Subject: [PATCH 75/76] Use the generated client impls for the external host bridge. (#4298) * . * Remove unused imports --- .gitignore | 1 - proto/build-proto.js | 35 +++++---------- src/extension.ts | 5 +++ src/hosts/host-bridge-client.ts | 37 +++++++++++---- src/standalone/host-bridge-client-manager.ts | 47 +++++--------------- src/standalone/standalone.ts | 6 ++- src/standalone/utils.ts | 1 - 7 files changed, 59 insertions(+), 73 deletions(-) diff --git a/.gitignore b/.gitignore index 6a8cdf5e..f38409b5 100644 --- a/.gitignore +++ b/.gitignore @@ -35,5 +35,4 @@ webview-ui/src/services/grpc-client.ts # Host bridge src/hosts/vscode/*/methods.ts src/hosts/vscode/*/index.ts -src/hosts/vscode/client/host-grpc-client.ts src/hosts/vscode/host-grpc-service-config.ts diff --git a/proto/build-proto.js b/proto/build-proto.js index d388b9f6..adadd99f 100755 --- a/proto/build-proto.js +++ b/proto/build-proto.js @@ -600,41 +600,27 @@ export const hostServiceHandlers: Record = {${ */ async function generateHostGrpcClientConfig() { log_verbose(chalk.cyan("Generating host gRPC client configuration...")) - - const serviceImports = [] - const serviceClientCreations = [] - const serviceExports = [] + 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 filePath = path.join(ROOT_DIR, "src/hosts/vscode/client/host-grpc-client.ts") + 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}`)) } @@ -649,6 +635,7 @@ async function cleanup() { 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")) diff --git a/src/extension.ts b/src/extension.ts index 5f3c2127..42ca8f91 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -26,6 +26,9 @@ import { migratePlanActGlobalToWorkspaceStorage, migrateCustomInstructionsToGlob 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 @@ -47,6 +50,8 @@ 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) diff --git a/src/hosts/host-bridge-client.ts b/src/hosts/host-bridge-client.ts index 530a2ab7..1fb240e6 100644 --- a/src/hosts/host-bridge-client.ts +++ b/src/hosts/host-bridge-client.ts @@ -1,11 +1,4 @@ -import { UriServiceClientInterface, WatchServiceClientInterface } from "@/generated/hosts/host-bridge-client-types" -import * as VscodeClient from "./vscode/client/host-grpc-client" -import * as ExternalClient from "@/standalone/host-bridge-client-manager" -const isHostBridgeExternal = process.env.HOST_BRIDGE_ADDRESS !== undefined && process.env.HOST_BRIDGE_ADDRESS !== "vscode" -const Client = isHostBridgeExternal ? ExternalClient : VscodeClient - -export const UriServiceClient: UriServiceClientInterface = Client.UriServiceClient -export const WatchServiceClient: WatchServiceClientInterface = Client.WatchServiceClient +import { UriServiceClientInterface, WatchServiceClientInterface } from "@generated/hosts/host-bridge-client-types" /** * Callback interface for streaming requests @@ -15,3 +8,31 @@ export interface StreamingCallbacks { 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/host-bridge-client-manager.ts b/src/standalone/host-bridge-client-manager.ts index 2670b910..d10636d1 100644 --- a/src/standalone/host-bridge-client-manager.ts +++ b/src/standalone/host-bridge-client-manager.ts @@ -1,53 +1,26 @@ -import { Channel, createChannel, createClient } from "nice-grpc" -import * as host from "@generated/nice-grpc/index.host" -import { UriServiceClientInterface, WatchServiceClientInterface } from "@/generated/hosts/host-bridge-client-types" -import { FileChangeEvent } from "@/shared/proto/index.host" +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. */ -class HostBridgeClientManager { - private static instance: HostBridgeClientManager | null +export class ExternalHostBridgeClientManager implements HostBridgeClientProvider { private channel: Channel - uriClient: host.UriServiceClient - //watchClient: host.WatchServiceClient + UriServiceClient: UriServiceClientInterface + WatchServiceClient: WatchServiceClientInterface - private constructor() { + constructor() { const address = process.env.HOST_BRIDGE_ADDRESS || "localhost:50052" this.channel = createChannel(address) - this.uriClient = createClient(host.UriServiceDefinition, this.channel) - //this.watchClient = - } - public static getInstance(): HostBridgeClientManager { - if (!HostBridgeClientManager.instance) { - HostBridgeClientManager.instance = new HostBridgeClientManager() - } - return HostBridgeClientManager.instance + this.UriServiceClient = new UriServiceClientImpl(this.channel) + this.WatchServiceClient = new WatchServiceClientImpl(this.channel) } public close(): void { this.channel.close() - HostBridgeClientManager.instance = null } } - -// TODO(sjf) Replace this with nice-grpc client. -const StubWatchServiceClient = { - subscribeToFile: function ( - _r: host.SubscribeToFileRequest, - _h: { - onResponse?: (response: FileChangeEvent) => void | Promise - onError?: (error: any) => void - onComplete?: () => void - }, - ) { - throw Error("Unimplemented") - }, -} - -const clientManager = HostBridgeClientManager.getInstance() - -export const UriServiceClient: UriServiceClientInterface = clientManager.uriClient -export const WatchServiceClient: WatchServiceClientInterface = StubWatchServiceClient diff --git a/src/standalone/standalone.ts b/src/standalone/standalone.ts index d2a1adb2..b9e1cf85 100644 --- a/src/standalone/standalone.ts +++ b/src/standalone/standalone.ts @@ -7,12 +7,14 @@ import { Controller } from "../core/controller" import { extensionContext, outputChannel, postMessage } from "./vscode-context" import { getPackageDefinition, log } from "./utils" import { GrpcHandler, GrpcStreamingResponseHandler } from "./grpc-types" -import { addProtobusServices } from "@/generated/standalone/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" async function main() { log("Starting service...") - + initializeHostBridgeClient(new ExternalHostBridgeClientManager()) activate(extensionContext) const controller = new Controller(extensionContext, outputChannel, postMessage) const server = new grpc.Server() diff --git a/src/standalone/utils.ts b/src/standalone/utils.ts index e9636ee0..c6a74568 100644 --- a/src/standalone/utils.ts +++ b/src/standalone/utils.ts @@ -1,5 +1,4 @@ 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" From d92de5464522a3ac071cddd6ff9f61d3f59814ca Mon Sep 17 00:00:00 2001 From: Sarah Fortune Date: Wed, 18 Jun 2025 16:33:34 -0700 Subject: [PATCH 76/76] Update get-vscode-usages script to exclude types, only count methods (#4299) --- scripts/get-vscode-usages.sh | 1 + 1 file changed, 1 insertion(+) 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)