diff --git a/.github/scripts/overwrite_changeset_changelog.py b/.github/scripts/overwrite_changeset_changelog.py deleted file mode 100644 index fcec082d60..0000000000 --- a/.github/scripts/overwrite_changeset_changelog.py +++ /dev/null @@ -1,82 +0,0 @@ -""" -This script updates a specific version's release notes section in CHANGELOG.md with new content -or reformats existing content. - -The script: -1. Takes a version number, changelog path, and optionally new content as input from environment variables -2. Finds the section in the changelog for the specified version -3. Either: - a) Replaces the content with new content if provided, or - b) Reformats existing content by: - - Removing the first two lines of the changeset format - - Ensuring version numbers are wrapped in square brackets -4. Writes the updated changelog back to the file - -Environment Variables: - CHANGELOG_PATH: Path to the changelog file (defaults to 'CHANGELOG.md') - VERSION: The version number to update/format - PREV_VERSION: The previous version number (used to locate section boundaries) - NEW_CONTENT: Optional new content to insert for this version -""" - -#!/usr/bin/env python3 - -import os - -CHANGELOG_PATH = os.environ.get("CHANGELOG_PATH", "CHANGELOG.md") -VERSION = os.environ["VERSION"] -PREV_VERSION = os.environ.get("PREV_VERSION", "") -NEW_CONTENT = os.environ.get("NEW_CONTENT", "") - - -def overwrite_changelog_section(changelog_text: str, new_content: str): - # Find the section for the specified version - version_pattern = f"## {VERSION}\n" - prev_version_pattern = f"## [{PREV_VERSION}]\n" - print(f"latest version: {VERSION}") - print(f"prev_version: {PREV_VERSION}") - - notes_start_index = changelog_text.find(version_pattern) + len(version_pattern) - notes_end_index = ( - changelog_text.find(prev_version_pattern, notes_start_index) - if PREV_VERSION and prev_version_pattern in changelog_text - else len(changelog_text) - ) - - if new_content: - return ( - changelog_text[:notes_start_index] - + f"{new_content}\n" - + changelog_text[notes_end_index:] - ) - else: - changeset_lines = changelog_text[notes_start_index:notes_end_index].split("\n") - # Remove the first two lines from the regular changeset format, ex: \n### Patch Changes - parsed_lines = "\n".join(changeset_lines[2:]) - updated_changelog = ( - changelog_text[:notes_start_index] - + parsed_lines - + changelog_text[notes_end_index:] - ) - updated_changelog = updated_changelog.replace( - f"## {VERSION}", f"## [{VERSION}]" - ) - return updated_changelog - - -with open(CHANGELOG_PATH, "r") as f: - changelog_content = f.read() - -new_changelog = overwrite_changelog_section(changelog_content, NEW_CONTENT) -print( - "----------------------------------------------------------------------------------" -) -print(new_changelog) -print( - "----------------------------------------------------------------------------------" -) -# Write back to CHANGELOG.md -with open(CHANGELOG_PATH, "w") as f: - f.write(new_changelog) - -print(f"{CHANGELOG_PATH} updated successfully!") diff --git a/.github/workflows/code-qa.yml b/.github/workflows/code-qa.yml index 1a001921d3..0fbd581fe7 100644 --- a/.github/workflows/code-qa.yml +++ b/.github/workflows/code-qa.yml @@ -13,27 +13,6 @@ env: PNPM_VERSION: 10.8.1 jobs: - compile: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Install pnpm - uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - cache: 'pnpm' - - name: Install dependencies - run: pnpm install - - name: Check types - run: pnpm check-types - - name: Lint - run: pnpm lint - check-translations: runs-on: ubuntu-latest steps: @@ -72,11 +51,8 @@ jobs: - name: Run knip checks run: pnpm knip - test-extension: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest] + compile: + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 @@ -91,11 +67,12 @@ jobs: cache: 'pnpm' - name: Install dependencies run: pnpm install - - name: Run unit tests - working-directory: src - run: pnpm test + - name: Lint + run: pnpm lint + - name: Check types + run: pnpm check-types - test-webview: + platform-unit-test: runs-on: ${{ matrix.os }} strategy: matrix: @@ -115,16 +92,8 @@ jobs: - name: Install dependencies run: pnpm install - name: Run unit tests - working-directory: webview-ui run: pnpm test - unit-test: - needs: [test-extension, test-webview] - runs-on: ubuntu-latest - steps: - - name: NO-OP - run: echo "All unit tests passed." - check-openrouter-api-key: runs-on: ubuntu-latest outputs: @@ -164,3 +133,10 @@ jobs: - name: Run integration tests working-directory: apps/vscode-e2e run: xvfb-run -a pnpm test:ci + + unit-test: + needs: [platform-unit-test] # [platform-unit-test, integration-test] + runs-on: ubuntu-latest + steps: + - name: NO-OP + run: echo "All tests passed." diff --git a/.husky/pre-commit b/.husky/pre-commit index a7b784fcb9..a0e3a53df5 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -16,14 +16,6 @@ else fi fi -$pnpm_cmd --filter roo-cline generate-types - -if [ -n "$(git diff --name-only src/exports/roo-code.d.ts)" ]; then - echo "Error: There are unstaged changes to roo-code.d.ts after running 'pnpm --filter roo-cline generate-types'." - echo "Please review and stage the changes before committing." - exit 1 -fi - # Detect if running on Windows and use npx.cmd, otherwise use npx. if [ "$OS" = "Windows_NT" ]; then npx_cmd="npx.cmd" diff --git a/apps/vscode-e2e/package.json b/apps/vscode-e2e/package.json index 92278b3fa1..33768c1795 100644 --- a/apps/vscode-e2e/package.json +++ b/apps/vscode-e2e/package.json @@ -3,16 +3,16 @@ "private": true, "scripts": { "lint": "eslint src --ext=ts --max-warnings=0", - "check-types": "tsc --noEmit", + "check-types": "tsc -p tsconfig.esm.json --noEmit", "format": "prettier --write src", - "test:ci": "pnpm --filter roo-cline build:development && pnpm test:run", + "test:ci": "pnpm -w bundle && pnpm --filter @roo-code/vscode-webview build && pnpm test:run", "test:run": "rimraf out && tsc -p tsconfig.json && npx dotenvx run -f .env.local -- node ./out/runTest.js", "clean": "rimraf out .turbo" }, "devDependencies": { "@roo-code/config-eslint": "workspace:^", "@roo-code/config-typescript": "workspace:^", - "@roo-code/types": "^1.12.0", + "@roo-code/types": "workspace:^", "@types/mocha": "^10.0.10", "@types/node": "^22.14.1", "@types/vscode": "^1.95.0", diff --git a/apps/vscode-e2e/src/suite/extension.test.ts b/apps/vscode-e2e/src/suite/extension.test.ts index 54544a2627..3283dfcc56 100644 --- a/apps/vscode-e2e/src/suite/extension.test.ts +++ b/apps/vscode-e2e/src/suite/extension.test.ts @@ -1,8 +1,6 @@ import * as assert from "assert" import * as vscode from "vscode" -import { Package } from "@roo-code/types" - suite("Roo Code Extension", () => { test("Commands should be registered", async () => { const expectedCommands = [ @@ -36,12 +34,10 @@ suite("Roo Code Extension", () => { "terminalExplainCommand", ] - const commands = new Set( - (await vscode.commands.getCommands(true)).filter((cmd) => cmd.startsWith(Package.name)), - ) + const commands = new Set((await vscode.commands.getCommands(true)).filter((cmd) => cmd.startsWith("roo-cline"))) for (const command of expectedCommands) { - assert.ok(commands.has(`${Package.name}.${command}`), `Command ${command} should be registered`) + assert.ok(commands.has(`roo-cline.${command}`), `Command ${command} should be registered`) } }) }) diff --git a/apps/vscode-e2e/src/suite/index.ts b/apps/vscode-e2e/src/suite/index.ts index 009b7d2777..b6f0fa9bed 100644 --- a/apps/vscode-e2e/src/suite/index.ts +++ b/apps/vscode-e2e/src/suite/index.ts @@ -3,16 +3,12 @@ import Mocha from "mocha" import { glob } from "glob" import * as vscode from "vscode" -import { type RooCodeAPI, Package } from "@roo-code/types" +import type { RooCodeAPI } from "@roo-code/types" import { waitFor } from "./utils" -declare global { - let api: RooCodeAPI -} - export async function run() { - const extension = vscode.extensions.getExtension(`${Package.publisher}.${Package.name}`) + const extension = vscode.extensions.getExtension("RooVeterinaryInc.roo-cline") if (!extension) { throw new Error("Extension not found") @@ -23,13 +19,12 @@ export async function run() { await api.setConfiguration({ apiProvider: "openrouter" as const, openRouterApiKey: process.env.OPENROUTER_API_KEY!, - openRouterModelId: "google/gemini-2.0-flash-001", + openRouterModelId: "openai/gpt-4.1", }) - await vscode.commands.executeCommand(`${Package.name}.SidebarProvider.focus`) + await vscode.commands.executeCommand("roo-cline.SidebarProvider.focus") await waitFor(() => api.isReady()) - // @ts-expect-error - Expose the API to the tests. globalThis.api = api // Add all the tests to the runner. diff --git a/apps/vscode-e2e/src/suite/modes.test.ts b/apps/vscode-e2e/src/suite/modes.test.ts index f022f344a7..edc93d4c9d 100644 --- a/apps/vscode-e2e/src/suite/modes.test.ts +++ b/apps/vscode-e2e/src/suite/modes.test.ts @@ -1,23 +1,17 @@ import * as assert from "assert" -import type { RooCodeAPI, ClineMessage } from "@roo-code/types" +import type { ClineMessage } from "@roo-code/types" import { waitUntilCompleted } from "./utils" suite("Roo Code Modes", () => { test("Should handle switching modes correctly", async () => { - // @ts-expect-error - Expose the API to the tests. - const api = globalThis.api as RooCodeAPI - - /** - * Switch modes. - */ + const api = globalThis.api const switchModesPrompt = "For each mode (Architect, Ask, Debug) respond with the mode name and what it specializes in after switching to that mode." const messages: ClineMessage[] = [] - const modeSwitches: string[] = [] api.on("taskModeSwitched", (_taskId, mode) => { diff --git a/apps/vscode-e2e/src/suite/subtasks.test.ts b/apps/vscode-e2e/src/suite/subtasks.test.ts index 00de623f34..adf1b2be89 100644 --- a/apps/vscode-e2e/src/suite/subtasks.test.ts +++ b/apps/vscode-e2e/src/suite/subtasks.test.ts @@ -1,13 +1,12 @@ import * as assert from "assert" -import type { RooCodeAPI, ClineMessage } from "@roo-code/types" +import type { ClineMessage } from "@roo-code/types" import { sleep, waitFor, waitUntilCompleted } from "./utils" suite.skip("Roo Code Subtasks", () => { test("Should handle subtask cancellation and resumption correctly", async () => { - // @ts-expect-error - Expose the API to the tests. - const api = globalThis.api as RooCodeAPI + const api = globalThis.api const messages: Record = {} @@ -49,7 +48,7 @@ suite.skip("Roo Code Subtasks", () => { // The parent task should not have resumed yet, so we shouldn't see // "Parent task resumed". assert.ok( - messages[parentTaskId].find(({ type, text }) => type === "say" && text === "Parent task resumed") === + messages[parentTaskId]?.find(({ type, text }) => type === "say" && text === "Parent task resumed") === undefined, "Parent task should not have resumed after subtask cancellation", ) @@ -63,7 +62,7 @@ suite.skip("Roo Code Subtasks", () => { // The parent task should still not have resumed. assert.ok( - messages[parentTaskId].find(({ type, text }) => type === "say" && text === "Parent task resumed") === + messages[parentTaskId]?.find(({ type, text }) => type === "say" && text === "Parent task resumed") === undefined, "Parent task should not have resumed after subtask cancellation", ) diff --git a/apps/vscode-e2e/src/suite/task.test.ts b/apps/vscode-e2e/src/suite/task.test.ts index 96fb51fe53..e97c3b4f1e 100644 --- a/apps/vscode-e2e/src/suite/task.test.ts +++ b/apps/vscode-e2e/src/suite/task.test.ts @@ -1,13 +1,12 @@ import * as assert from "assert" -import type { RooCodeAPI, ClineMessage } from "@roo-code/types" +import type { ClineMessage } from "@roo-code/types" import { waitUntilCompleted } from "./utils" suite("Roo Code Task", () => { test("Should handle prompt and response correctly", async () => { - // @ts-expect-error - Expose the API to the tests. - const api = globalThis.api as RooCodeAPI + const api = globalThis.api const messages: ClineMessage[] = [] diff --git a/apps/vscode-e2e/src/types/global.d.ts b/apps/vscode-e2e/src/types/global.d.ts new file mode 100644 index 0000000000..c2b11bf335 --- /dev/null +++ b/apps/vscode-e2e/src/types/global.d.ts @@ -0,0 +1,8 @@ +import type { RooCodeAPI } from "@roo-code/types" + +declare global { + // eslint-disable-next-line no-var + var api: RooCodeAPI +} + +export {} diff --git a/apps/vscode-e2e/tsconfig.esm.json b/apps/vscode-e2e/tsconfig.esm.json new file mode 100644 index 0000000000..e2f212fab9 --- /dev/null +++ b/apps/vscode-e2e/tsconfig.esm.json @@ -0,0 +1,8 @@ +{ + "extends": "@roo-code/config-typescript/base.json", + "compilerOptions": { + "outDir": "out" + }, + "include": ["src"], + "exclude": ["node_modules"] +} diff --git a/apps/vscode-e2e/tsconfig.json b/apps/vscode-e2e/tsconfig.json index 4439b32b39..c991819bbb 100644 --- a/apps/vscode-e2e/tsconfig.json +++ b/apps/vscode-e2e/tsconfig.json @@ -11,6 +11,6 @@ "useUnknownInCatchVariables": false, "outDir": "out" }, - "include": ["src", "../src/exports/roo-code.d.ts"], + "include": ["src"], "exclude": [".vscode-test", "**/node_modules/**", "out"] } diff --git a/apps/vscode-nightly/esbuild.mjs b/apps/vscode-nightly/esbuild.mjs index 0ca286e69e..ccc999e78b 100644 --- a/apps/vscode-nightly/esbuild.mjs +++ b/apps/vscode-nightly/esbuild.mjs @@ -9,16 +9,17 @@ const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) async function main() { + const name = "extension-nightly" const production = process.argv.includes("--production") const minify = production const sourcemap = !production const overrideJson = JSON.parse(fs.readFileSync(path.join(__dirname, "package.nightly.json"), "utf8")) - console.log(`[main] name: ${overrideJson.name}`) - console.log(`[main] version: ${overrideJson.version}`) + console.log(`[${name}] name: ${overrideJson.name}`) + console.log(`[${name}] version: ${overrideJson.version}`) const gitSha = getGitSha() - console.log(`[main] gitSha: ${gitSha}`) + console.log(`[${name}] gitSha: ${gitSha}`) /** * @type {import('esbuild').BuildOptions} @@ -43,12 +44,22 @@ async function main() { const buildDir = path.join(__dirname, "build") const distDir = path.join(buildDir, "dist") + console.log(`[${name}] srcDir: ${srcDir}`) + console.log(`[${name}] buildDir: ${buildDir}`) + console.log(`[${name}] distDir: ${distDir}`) + + // Clean build directory before starting new build + if (fs.existsSync(buildDir)) { + console.log(`[${name}] Cleaning build directory: ${buildDir}`) + fs.rmSync(buildDir, { recursive: true, force: true }) + } + /** * @type {import('esbuild').Plugin[]} */ const plugins = [ { - name: "copy-files", + name: "copyPaths", setup(build) { build.onEnd(() => { copyPaths( @@ -69,7 +80,7 @@ async function main() { }, }, { - name: "generate-package-json", + name: "generatePackageJson", setup(build) { build.onEnd(() => { const packageJson = JSON.parse(fs.readFileSync(path.join(srcDir, "package.json"), "utf8")) @@ -81,7 +92,7 @@ async function main() { }) fs.writeFileSync(path.join(buildDir, "package.json"), JSON.stringify(generatedPackageJson, null, 2)) - console.log(`[generate-package-json] Generated package.json`) + console.log(`[generatePackageJson] Generated package.json`) let count = 0 @@ -92,7 +103,7 @@ async function main() { } }) - console.log(`[copy-src] Copied ${count} package.nls*.json files to ${buildDir}`) + console.log(`[generatePackageJson] Copied ${count} package.nls*.json files to ${buildDir}`) const nlsPkg = JSON.parse(fs.readFileSync(path.join(srcDir, "package.nls.json"), "utf8")) @@ -105,18 +116,18 @@ async function main() { JSON.stringify({ ...nlsPkg, ...nlsNightlyPkg }, null, 2), ) - console.log(`[copy-src] Generated package.nls.json`) + console.log(`[generatePackageJson] Generated package.nls.json`) }) }, }, { - name: "copy-wasms", + name: "copyWasms", setup(build) { build.onEnd(() => copyWasms(srcDir, distDir)) }, }, { - name: "copy-locales", + name: "copyLocales", setup(build) { build.onEnd(() => copyLocales(srcDir, distDir)) }, diff --git a/apps/vscode-nightly/package.json b/apps/vscode-nightly/package.json index 8413d1455b..56872a2aeb 100644 --- a/apps/vscode-nightly/package.json +++ b/apps/vscode-nightly/package.json @@ -4,9 +4,8 @@ "private": true, "packageManager": "pnpm@10.8.1", "scripts": { - "bundle": "pnpm clean && pnpm --filter @roo-code/build build && node esbuild.mjs", - "build": "pnpm bundle --production && pnpm --filter @roo-code/vscode-webview build --mode nightly", - "vsix": "pnpm build && cd build && mkdirp ../../../bin && npx vsce package --no-dependencies --out ../../../bin", + "bundle:nightly": "node esbuild.mjs", + "vsix:nightly": "cd build && mkdirp ../../../bin && npx vsce package --no-dependencies --out ../../../bin", "clean": "rimraf build .turbo" }, "devDependencies": { diff --git a/e2e/src/suite/condensing.test.ts b/e2e/src/suite/condensing.test.ts deleted file mode 100644 index 0d5e796349..0000000000 --- a/e2e/src/suite/condensing.test.ts +++ /dev/null @@ -1,243 +0,0 @@ -import { suite, test, before, after } from "mocha" -import * as assert from "assert" -import { type RooCodeAPI } from "@roo-code/types" -import { waitFor, sleep } from "./utils" // Assuming utils.ts is in the same directory or path is adjusted - -// Define an interface for globalThis that includes the 'api' property -interface GlobalWithApi extends NodeJS.Global { - api: RooCodeAPI -} - -// Cast globalThis to our new interface -const g = globalThis as unknown as GlobalWithApi - -// Define a minimal interface for task messages for type safety in callbacks -interface TestTaskMessage { - role: string - content: string | unknown // Content can be complex - isSummary?: boolean - // Allow other properties - [key: string]: unknown -} - -suite("Context Condensing Integration Tests", () => { - let initialConfig: ReturnType - - before(async () => { - // Ensure API is ready before starting tests - await waitFor(() => g.api && g.api.isReady()) - initialConfig = g.api.getConfiguration() - }) - - after(async () => { - // Restore initial configuration after tests - if (initialConfig) { - // Type issue: RooCodeSettings might not include new props. - // This will cause a type error if initialConfig contains new props not in RooCodeSettings. - // For now, we assume initialConfig is a valid RooCodeSettings or types need update. - await g.api.setConfiguration(initialConfig) - } - }) - - suite("Settings Persistence", () => { - test("should persist condensingApiConfigId when set", async () => { - const testConfigId = "test-condensing-api-config" - // @ts-expect-error - Argument of type '{ condensingApiConfigId: string; }' is not assignable to parameter of type 'RooCodeSettings'. - await g.api.setConfiguration({ condensingApiConfigId: testConfigId }) - await sleep(100) - const updatedConfig = g.api.getConfiguration() - assert.strictEqual( - // @ts-expect-error - Property 'condensingApiConfigId' does not exist on type 'RooCodeSettings'. - updatedConfig.condensingApiConfigId, - testConfigId, - "condensingApiConfigId did not persist", - ) - }) - - test("should persist customCondensingPrompt when set", async () => { - const testPrompt = "This is a custom condensing prompt for testing." - // @ts-expect-error - Argument of type '{ customCondensingPrompt: string; }' is not assignable to parameter of type 'RooCodeSettings'. - await g.api.setConfiguration({ customCondensingPrompt: testPrompt }) - await sleep(100) - const updatedConfig = g.api.getConfiguration() - assert.strictEqual( - // @ts-expect-error - Property 'customCondensingPrompt' does not exist on type 'RooCodeSettings'. - updatedConfig.customCondensingPrompt, - testPrompt, - "customCondensingPrompt did not persist", - ) - }) - - test("should clear customCondensingPrompt when set to empty string", async () => { - const initialPrompt = "A prompt to be cleared." - // @ts-expect-error - Argument of type '{ customCondensingPrompt: string; }' is not assignable to parameter of type 'RooCodeSettings'. - await g.api.setConfiguration({ customCondensingPrompt: initialPrompt }) - await sleep(100) - let updatedConfig = g.api.getConfiguration() - // @ts-expect-error - Property 'customCondensingPrompt' does not exist on type 'RooCodeSettings'. - assert.strictEqual(updatedConfig.customCondensingPrompt, initialPrompt, "Initial prompt was not set") - - // @ts-expect-error - Argument of type '{ customCondensingPrompt: string; }' is not assignable to parameter of type 'RooCodeSettings'. - await g.api.setConfiguration({ customCondensingPrompt: "" }) - await sleep(100) - updatedConfig = g.api.getConfiguration() - // @ts-expect-error - Property 'customCondensingPrompt' does not exist on type 'RooCodeSettings'. - assert.strictEqual(updatedConfig.customCondensingPrompt, "", "customCondensingPrompt was not cleared") - }) - - test("should clear customCondensingPrompt when set to undefined", async () => { - const initialPrompt = "Another prompt to be cleared." - // @ts-expect-error - Argument of type '{ customCondensingPrompt: string; }' is not assignable to parameter of type 'RooCodeSettings'. - await g.api.setConfiguration({ customCondensingPrompt: initialPrompt }) - await sleep(100) - let updatedConfig = g.api.getConfiguration() - assert.strictEqual( - // @ts-expect-error - Property 'customCondensingPrompt' does not exist on type 'RooCodeSettings'. - updatedConfig.customCondensingPrompt, - initialPrompt, - "Initial prompt for undefined test was not set", - ) - - // @ts-expect-error - Argument of type '{ customCondensingPrompt: undefined; }' is not assignable to parameter of type 'RooCodeSettings'. - await g.api.setConfiguration({ customCondensingPrompt: undefined }) - await sleep(100) - updatedConfig = g.api.getConfiguration() - // @ts-expect-error - Property 'customCondensingPrompt' does not exist on type 'RooCodeSettings'. - const currentPrompt = updatedConfig.customCondensingPrompt - assert.ok( - currentPrompt === "" || currentPrompt === undefined || currentPrompt === null, - "customCondensingPrompt was not cleared by undefined", - ) - }) - }) - - suite("Message Handling (Conceptual - Covered by Settings Persistence)", () => { - test.skip("should correctly update backend state from webview messages", () => { - assert.ok(true, "Skipping direct webview message test, covered by settings persistence.") - }) - }) - - suite("API Configuration Resolution and Prompt Customization", () => { - let taskId: string | undefined - - beforeEach(async () => { - // @ts-expect-error - Property 'tasks' does not exist on type 'RooCodeAPI'. - const taskResponse = await g.api.tasks.createTask({ - initialMessage: "This is the first message for a new task.", - }) - taskId = taskResponse.taskId - assert.ok(taskId, "Task ID should be created") - await sleep(500) - }) - - afterEach(async () => { - if (taskId) { - taskId = undefined - } - // This directive was unused, meaning setConfiguration(initialConfig) is fine. - await g.api.setConfiguration(initialConfig) - await sleep(100) - }) - - test("should trigger condensation with default settings", async function () { - this.timeout(60000) - assert.ok(taskId, "Task ID must be defined for this test") - - for (let i = 0; i < 5; i++) { - // @ts-expect-error - Property 'tasks' does not exist on type 'RooCodeAPI'. - await g.api.tasks.sendMessage({ - taskId: taskId!, - message: `This is message number ${i + 2} in the conversation.`, - messageType: "user", - }) - await sleep(2000) - } - - // @ts-expect-error - Property 'tasks' does not exist on type 'RooCodeAPI'. - const task = await g.api.tasks.getTask(taskId!) - assert.ok(task, "Task should be retrievable") - const hasSummary = task.messages.some((msg: TestTaskMessage) => msg.isSummary === true) - console.log( - `Task messages for default settings test (taskId: ${taskId}):`, - JSON.stringify(task.messages, null, 2), - ) - console.log(`Has summary (default settings): ${hasSummary}`) - assert.ok( - true, - "Condensation process completed with default settings (actual summary check is complex for e2e).", - ) - }) - - test("should trigger condensation with custom condensing API config", async function () { - this.timeout(60000) - assert.ok(taskId, "Task ID must be defined for this test") - - const customCondensingConfigId = "condensing-test-provider" - // This directive was unused. The error is on the property itself. - await g.api.setConfiguration({ - // @ts-expect-error - condensingApiConfigId is not a known property in RooCodeSettings. - condensingApiConfigId: customCondensingConfigId, - }) - await sleep(100) - - for (let i = 0; i < 5; i++) { - // @ts-expect-error - Property 'tasks' does not exist on type 'RooCodeAPI'. - await g.api.tasks.sendMessage({ - taskId: taskId!, - message: `Message ${i + 2} with custom API config.`, - messageType: "user", - }) - await sleep(2000) - } - // @ts-expect-error - Property 'tasks' does not exist on type 'RooCodeAPI'. - const task = await g.api.tasks.getTask(taskId!) - assert.ok(task, "Task should be retrievable with custom API config") - const hasSummary = task.messages.some((msg: TestTaskMessage) => msg.isSummary === true) - console.log( - `Task messages for custom API config test (taskId: ${taskId}):`, - JSON.stringify(task.messages, null, 2), - ) - console.log(`Has summary (custom API config): ${hasSummary}`) - assert.ok( - true, - "Condensation process completed with custom API config (specific handler verification is complex for e2e).", - ) - }) - - test("should trigger condensation with custom condensing prompt", async function () { - this.timeout(60000) - assert.ok(taskId, "Task ID must be defined for this test") - - const customPrompt = "E2E Test: Summarize this conversation very briefly." - // @ts-expect-error - Argument of type '{ customCondensingPrompt: string; }' is not assignable to parameter of type 'RooCodeSettings'. - await g.api.setConfiguration({ customCondensingPrompt: customPrompt }) - await sleep(100) - - for (let i = 0; i < 5; i++) { - // @ts-expect-error - Property 'tasks' does not exist on type 'RooCodeAPI'. - await g.api.tasks.sendMessage({ - taskId: taskId!, - message: `Message ${i + 2} with custom prompt.`, - messageType: "user", - }) - await sleep(2000) - } - - // @ts-expect-error - Property 'tasks' does not exist on type 'RooCodeAPI'. - const task = await g.api.tasks.getTask(taskId!) - assert.ok(task, "Task should be retrievable with custom prompt") - const summaryMessage = task.messages.find((msg: TestTaskMessage) => msg.isSummary === true) - console.log( - `Task messages for custom prompt test (taskId: ${taskId}):`, - JSON.stringify(task.messages, null, 2), - ) - if (summaryMessage) { - console.log("Summary content with custom prompt:", summaryMessage.content) - } - assert.ok( - true, - "Condensation process completed with custom prompt (prompt content verification is complex for e2e).", - ) - }) - }) -}) diff --git a/knip.json b/knip.json index ac26aa5339..aefa19ad9c 100644 --- a/knip.json +++ b/knip.json @@ -12,8 +12,8 @@ "bin/**", "apps/vscode-e2e/**", "evals/**", + "src/extension/**", "src/activate/**", - "src/exports/**", "src/workers/**", "src/schemas/ipc.ts", "src/extension.ts", diff --git a/package.json b/package.json index e488cc4987..4580be5ce3 100644 --- a/package.json +++ b/package.json @@ -13,14 +13,13 @@ "check-types": "turbo check-types --log-order grouped --output-logs new-only", "test": "turbo test --log-order grouped --output-logs new-only", "format": "turbo format --log-order grouped --output-logs new-only", + "bundle": "turbo bundle --log-order grouped --output-logs new-only", + "bundle:nightly": "turbo bundle:nightly --log-order grouped --output-logs new-only", + "build": "turbo vsix --log-order grouped --output-logs new-only", + "build:nightly": "turbo vsix:nightly --log-order grouped --output-logs new-only", "clean": "turbo clean --log-order grouped --output-logs new-only && rimraf dist out bin .vite-port .turbo", - "build": "pnpm --filter roo-cline vsix", - "compile": "pnpm --filter roo-cline bundle", - "vsix": "pnpm --filter roo-cline vsix", - "build:nightly": "pnpm --filter @roo-code/vscode-nightly vsix", - "generate-types": "pnpm --filter roo-cline generate-types", "changeset:version": "cp CHANGELOG.md src/CHANGELOG.md && changeset version && cp -vf src/CHANGELOG.md .", - "knip": "pnpm --filter @roo-code/build build && knip --include files", + "knip": "knip --include files", "update-contributors": "node scripts/update-contributors.js" }, "devDependencies": { diff --git a/packages/build/src/esbuild.ts b/packages/build/src/esbuild.ts index 898b7417a7..e91275447d 100644 --- a/packages/build/src/esbuild.ts +++ b/packages/build/src/esbuild.ts @@ -3,13 +3,56 @@ import * as path from "path" import { ViewsContainer, Views, Menus, Configuration, contributesSchema } from "./types.js" +function copyDir(srcDir: string, dstDir: string, count: number): number { + const entries = fs.readdirSync(srcDir, { withFileTypes: true }) + + for (const entry of entries) { + const srcPath = path.join(srcDir, entry.name) + const dstPath = path.join(dstDir, entry.name) + + if (entry.isDirectory()) { + fs.mkdirSync(dstPath, { recursive: true }) + count = copyDir(srcPath, dstPath, count) + } else { + count = count + 1 + fs.copyFileSync(srcPath, dstPath) + } + } + + return count +} + +function rmDir(dirPath: string, maxRetries: number = 3): void { + for (let attempt = 1; attempt <= maxRetries; attempt++) { + try { + fs.rmSync(dirPath, { recursive: true, force: true }) + return + } catch (error) { + const isLastAttempt = attempt === maxRetries + const isEnotemptyError = error instanceof Error && "code" in error && (error.code === 'ENOTEMPTY' || error.code === 'EBUSY') + + if (isLastAttempt || !isEnotemptyError) { + throw error // Re-throw if it's the last attempt or not a locking error. + } + + // Wait with exponential backoff before retrying. + const delay = Math.min(100 * Math.pow(2, attempt - 1), 1000) // Cap at 1s. + console.warn(`[rmDir] Attempt ${attempt} failed for ${dirPath}, retrying in ${delay}ms...`) + + // Synchronous sleep for simplicity in build scripts. + const start = Date.now() + while (Date.now() - start < delay) { /* Busy wait */ } + } + } +} + export function copyPaths(copyPaths: [string, string][], srcDir: string, dstDir: string) { copyPaths.forEach(([srcRelPath, dstRelPath]) => { const stats = fs.lstatSync(path.join(srcDir, srcRelPath)) if (stats.isDirectory()) { if (fs.existsSync(path.join(dstDir, dstRelPath))) { - fs.rmSync(path.join(dstDir, dstRelPath), { recursive: true }) + rmDir(path.join(dstDir, dstRelPath)) } fs.mkdirSync(path.join(dstDir, dstRelPath), { recursive: true }) @@ -23,25 +66,6 @@ export function copyPaths(copyPaths: [string, string][], srcDir: string, dstDir: }) } -export function copyDir(srcDir: string, dstDir: string, count: number): number { - const entries = fs.readdirSync(srcDir, { withFileTypes: true }) - - for (const entry of entries) { - const srcPath = path.join(srcDir, entry.name) - const dstPath = path.join(dstDir, entry.name) - - if (entry.isDirectory()) { - fs.mkdirSync(dstPath, { recursive: true }) - count = copyDir(srcPath, dstPath, count) - } else { - count = count + 1 - fs.copyFileSync(srcPath, dstPath) - } - } - - return count -} - export function copyWasms(srcDir: string, distDir: string): void { const nodeModulesDir = path.join(srcDir, "node_modules") diff --git a/packages/build/src/index.ts b/packages/build/src/index.ts index bcb4e2d039..edbc994a2d 100644 --- a/packages/build/src/index.ts +++ b/packages/build/src/index.ts @@ -1,2 +1,2 @@ export { getGitSha } from "./git.js" -export { copyPaths, copyDir, copyWasms, copyLocales, setupLocaleWatcher, generatePackageJson } from "./esbuild.js" +export { copyPaths, copyWasms, copyLocales, setupLocaleWatcher, generatePackageJson } from "./esbuild.js" diff --git a/src/exports/README.md b/packages/types/README.md similarity index 75% rename from src/exports/README.md rename to packages/types/README.md index ee79b160bb..c8fee89bcc 100644 --- a/src/exports/README.md +++ b/packages/types/README.md @@ -1,15 +1,16 @@ # Roo Code API -The Roo Code extension exposes an API that can be used by other extensions. To use this API in your extension: +The Roo Code extension exposes an API that can be used by other extensions. +To use this API in your extension: -1. Copy `src/extension-api/roo-code.d.ts` to your extension's source directory. -2. Include `roo-code.d.ts` in your extension's compilation. -3. Get access to the API with the following code: +1. Install `@roo-code/types` with npm, pnpm, or yarn. +2. Import the `RooCodeAPI` type. +3. Load the extension API. ```typescript -import { RooCodeAPI, Package } from "path/to/roo-code" +import { RooCodeAPI } from "@roo-code/types" -const extension = vscode.extensions.getExtension(`${Package.publisher}.${Package.name}`) +const extension = vscode.extensions.getExtension("RooVeterinaryInc.roo-cline") if (!extension?.isActive) { throw new Error("Extension is not activated") diff --git a/packages/types/eslint.config.mjs b/packages/types/eslint.config.mjs new file mode 100644 index 0000000000..694bf73664 --- /dev/null +++ b/packages/types/eslint.config.mjs @@ -0,0 +1,4 @@ +import { config } from "@roo-code/config-eslint/base" + +/** @type {import("eslint").Linter.Config} */ +export default [...config] diff --git a/packages/types/package.json b/packages/types/package.json new file mode 100644 index 0000000000..3cacff9f61 --- /dev/null +++ b/packages/types/package.json @@ -0,0 +1,37 @@ +{ + "name": "@roo-code/types", + "description": "Roo Code foundational types and schemas.", + "private": true, + "type": "module", + "main": "./dist/index.cjs", + "exports": { + ".": { + "types": "./src/index.ts", + "import": "./src/index.ts", + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } + } + }, + "files": [ + "dist" + ], + "scripts": { + "lint": "eslint src --ext=ts --max-warnings=0", + "check-types": "tsc --noEmit", + "test": "vitest --globals --run", + "build": "tsup", + "clean": "rimraf dist .turbo" + }, + "dependencies": { + "zod": "^3.24.2" + }, + "devDependencies": { + "@roo-code/config-eslint": "workspace:^", + "@roo-code/config-typescript": "workspace:^", + "@types/node": "^22.15.20", + "tsup": "^8.3.5", + "vitest": "^3.1.3" + } +} diff --git a/packages/types/src/__tests__/index.test.ts b/packages/types/src/__tests__/index.test.ts new file mode 100644 index 0000000000..c3df37fa97 --- /dev/null +++ b/packages/types/src/__tests__/index.test.ts @@ -0,0 +1,17 @@ +// npx vitest run src/__tests__/index.test.ts + +import { GLOBAL_STATE_KEYS } from "../index.js" + +describe("GLOBAL_STATE_KEYS", () => { + it("should contain provider settings keys", () => { + expect(GLOBAL_STATE_KEYS).toContain("autoApprovalEnabled") + }) + + it("should contain provider settings keys", () => { + expect(GLOBAL_STATE_KEYS).toContain("anthropicBaseUrl") + }) + + it("should not contain secret state keys", () => { + expect(GLOBAL_STATE_KEYS).not.toContain("openRouterApiKey") + }) +}) diff --git a/src/exports/interface.ts b/packages/types/src/api.ts similarity index 83% rename from src/exports/interface.ts rename to packages/types/src/api.ts index d8423511da..c098111e6c 100644 --- a/src/exports/interface.ts +++ b/packages/types/src/api.ts @@ -1,59 +1,37 @@ -import { EventEmitter } from "events" -import { Socket } from "node:net" - -/** - * Types - */ +import type { EventEmitter } from "events" +import type { Socket } from "net" import type { - GlobalSettings, - ProviderName, - ProviderSettings, + RooCodeSettings, ProviderSettingsEntry, - ClineMessage, - TokenUsage, - RooCodeEvents, - IpcMessage, - TaskCommand, - TaskEvent, -} from "./types" - -export type { - GlobalSettings, - ProviderName, ProviderSettings, - ProviderSettingsEntry, ClineMessage, TokenUsage, - RooCodeEvents, - IpcMessage, + ToolUsage, + ToolName, TaskCommand, TaskEvent, + IpcMessage, +} from "./index.js" +import { IpcMessageType } from "./index.js" + +// TODO: Make sure this matches `RooCodeEvents` from `@roo-code/types`. +export interface RooCodeAPIEvents { + message: [data: { taskId: string; action: "created" | "updated"; message: ClineMessage }] + taskCreated: [taskId: string] + taskStarted: [taskId: string] + taskModeSwitched: [taskId: string, mode: string] + taskPaused: [taskId: string] + taskUnpaused: [taskId: string] + taskAskResponded: [taskId: string] + taskAborted: [taskId: string] + taskSpawned: [parentTaskId: string, childTaskId: string] + taskCompleted: [taskId: string, tokenUsage: TokenUsage, toolUsage: ToolUsage] + taskTokenUsageUpdated: [taskId: string, tokenUsage: TokenUsage] + taskToolFailed: [taskId: string, toolName: ToolName, error: string] } -/** - * Enums - */ - -import { RooCodeEventName, IpcOrigin, IpcMessageType } from "../schemas" - -export { RooCodeEventName, IpcOrigin, IpcMessageType } - -/** - * Constants - */ - -import { providerNames, Package } from "../schemas" - -export { providerNames, Package } - -/** - * RooCodeAPI - */ - -export type RooCodeSettings = GlobalSettings & ProviderSettings - -export interface RooCodeAPI extends EventEmitter { +export interface RooCodeAPI extends EventEmitter { /** * Starts a new task with an optional initial message and images. * @param task Optional initial task message. @@ -71,84 +49,70 @@ export interface RooCodeAPI extends EventEmitter { images?: string[] newTab?: boolean }): Promise - /** * Resumes a task with the given ID. * @param taskId The ID of the task to resume. * @throws Error if the task is not found in the task history. */ resumeTask(taskId: string): Promise - /** * Checks if a task with the given ID is in the task history. * @param taskId The ID of the task to check. * @returns True if the task is in the task history, false otherwise. */ isTaskInHistory(taskId: string): Promise - /** * Returns the current task stack. * @returns An array of task IDs. */ getCurrentTaskStack(): string[] - /** * Clears the current task. */ clearCurrentTask(lastMessage?: string): Promise - /** * Cancels the current task. */ cancelCurrentTask(): Promise - /** * Sends a message to the current task. * @param message Optional message to send. * @param images Optional array of image data URIs (e.g., "data:image/webp;base64,..."). */ sendMessage(message?: string, images?: string[]): Promise - /** * Simulates pressing the primary button in the chat interface. */ pressPrimaryButton(): Promise - /** * Simulates pressing the secondary button in the chat interface. */ pressSecondaryButton(): Promise - /** * Returns true if the API is ready to use. */ isReady(): boolean - /** * Returns the current configuration. * @returns The current configuration. */ getConfiguration(): RooCodeSettings - /** * Sets the configuration for the current task. * @param values An object containing key-value pairs to set. */ setConfiguration(values: RooCodeSettings): Promise - /** * Returns a list of all configured profile names * @returns Array of profile names */ getProfiles(): string[] - /** * Returns the profile entry for a given name * @param name The name of the profile * @returns The profile entry, or undefined if the profile does not exist */ getProfileEntry(name: string): ProviderSettingsEntry | undefined - /** * Creates a new API configuration profile * @param name The name of the profile @@ -158,7 +122,6 @@ export interface RooCodeAPI extends EventEmitter { * @throws Error if the profile already exists */ createProfile(name: string, profile?: ProviderSettings, activate?: boolean): Promise - /** * Updates an existing API configuration profile * @param name The name of the profile @@ -168,7 +131,6 @@ export interface RooCodeAPI extends EventEmitter { * @throws Error if the profile does not exist */ updateProfile(name: string, profile: ProviderSettings, activate?: boolean): Promise - /** * Creates a new API configuration profile or updates an existing one * @param name The name of the profile @@ -177,20 +139,17 @@ export interface RooCodeAPI extends EventEmitter { * @returns The ID of the upserted profile */ upsertProfile(name: string, profile: ProviderSettings, activate?: boolean): Promise - /** * Deletes a profile by name * @param name The name of the profile to delete * @throws Error if the profile does not exist */ deleteProfile(name: string): Promise - /** * Returns the name of the currently active profile * @returns The profile name, or undefined if no profile is active */ getActiveProfile(): string | undefined - /** * Changes the active API configuration profile * @param name The name of the profile to activate @@ -199,10 +158,6 @@ export interface RooCodeAPI extends EventEmitter { setActiveProfile(name: string): Promise } -/** - * RooCodeIpcServer - */ - export type IpcServerEvents = { [IpcMessageType.Connect]: [clientId: string] [IpcMessageType.Disconnect]: [clientId: string] @@ -212,12 +167,8 @@ export type IpcServerEvents = { export interface RooCodeIpcServer extends EventEmitter { listen(): void - broadcast(message: IpcMessage): void - send(client: string | Socket, message: IpcMessage): void - get socketPath(): string - get isListening(): boolean } diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts new file mode 100644 index 0000000000..b3656fb63a --- /dev/null +++ b/packages/types/src/index.ts @@ -0,0 +1,2 @@ +export * from "./types.js" +export * from "./api.js" diff --git a/src/schemas/index.ts b/packages/types/src/types.ts similarity index 94% rename from src/schemas/index.ts rename to packages/types/src/types.ts index 4fb893ae1f..0bb2f71de2 100644 --- a/src/schemas/index.ts +++ b/packages/types/src/types.ts @@ -1,30 +1,16 @@ -// Updates to this file will automatically propgate to src/exports/types.ts -// via a pre-commit hook. If you want to update the types before committing you -// can run `pnpm generate-types`. - import { z } from "zod" -import { Equals, Keys, AssertEqual } from "../utils/type-fu" - /** - * Extension + * TS */ -import { publisher, name, version } from "../package.json" - -// These ENV variables can be defined by ESBuild when building the extension -// in order to override the values in package.json. This allows us to build -// different extension variants with the same package.json file. -// The build process still needs to emit a modified package.json for consumption -// by VSCode, but that build artifact is not used during the transpile step of -// the build, so we still need this override mechanism. -export const Package = { - publisher, - name: process.env.PKG_NAME || name, - version: process.env.PKG_VERSION || version, - outputChannel: process.env.PKG_OUTPUT_CHANNEL || "Roo-Code", - sha: process.env.PKG_SHA, -} as const +export type Keys = keyof T + +export type Values = T[keyof T] + +export type Equals = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? true : false + +export type AssertEqual = T /** * CodeAction @@ -244,7 +230,7 @@ export const codebaseIndexModelsSchema = z.object({ export type CodebaseIndexModels = z.infer export const codebaseIndexProviderSchema = z.object({ - codeIndexOpenAiKey: z.string().optional(), + codeIndexOpenAiKey: z.string().optional(), codeIndexQdrantApiKey: z.string().optional(), }) @@ -661,7 +647,7 @@ export const providerSettingsSchema = z.object({ ...groqSchema.shape, ...chutesSchema.shape, ...litellmSchema.shape, - ...codebaseIndexProviderSchema.shape + ...codebaseIndexProviderSchema.shape, }) export type ProviderSettings = z.infer @@ -1356,28 +1342,3 @@ export const ipcMessageSchema = z.discriminatedUnion("type", [ ]) export type IpcMessage = z.infer - -/** - * TypeDefinition - */ - -export type TypeDefinition = { - schema: z.ZodTypeAny - identifier: string -} - -export const typeDefinitions: TypeDefinition[] = [ - { schema: globalSettingsSchema, identifier: "GlobalSettings" }, - { schema: providerNamesSchema, identifier: "ProviderName" }, - { schema: providerSettingsSchema, identifier: "ProviderSettings" }, - { schema: providerSettingsEntrySchema, identifier: "ProviderSettingsEntry" }, - { schema: clineMessageSchema, identifier: "ClineMessage" }, - { schema: tokenUsageSchema, identifier: "TokenUsage" }, - { schema: rooCodeEventsSchema, identifier: "RooCodeEvents" }, - { schema: ipcMessageSchema, identifier: "IpcMessage" }, - { schema: taskCommandSchema, identifier: "TaskCommand" }, - { schema: taskEventSchema, identifier: "TaskEvent" }, -] - -// Also export as default for ESM compatibility. -export default { typeDefinitions } diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json new file mode 100644 index 0000000000..a66434e570 --- /dev/null +++ b/packages/types/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@roo-code/config-typescript/base.json", + "compilerOptions": { + "types": ["vitest/globals"], + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["node_modules"] +} diff --git a/packages/types/tsup.config.ts b/packages/types/tsup.config.ts new file mode 100644 index 0000000000..9c96eb1901 --- /dev/null +++ b/packages/types/tsup.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from "tsup" + +export default defineConfig({ + entry: ["src/index.ts"], + format: ["cjs", "esm"], + dts: true, + clean: false, + splitting: false, + sourcemap: true, + outDir: "dist", +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1cc1b60fe6..d7fc259cab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,8 +63,8 @@ importers: specifier: workspace:^ version: link:../../packages/config-typescript '@roo-code/types': - specifier: ^1.12.0 - version: 1.12.0 + specifier: workspace:^ + version: link:../../packages/types '@types/mocha': specifier: ^10.0.10 version: 10.0.10 @@ -153,6 +153,28 @@ importers: packages/config-typescript: {} + packages/types: + dependencies: + zod: + specifier: ^3.24.2 + version: 3.24.4 + devDependencies: + '@roo-code/config-eslint': + specifier: workspace:^ + version: link:../config-eslint + '@roo-code/config-typescript': + specifier: workspace:^ + version: link:../config-typescript + '@types/node': + specifier: ^22.15.20 + version: 22.15.20 + tsup: + specifier: ^8.3.5 + version: 8.5.0(jiti@2.4.2)(postcss@8.5.3)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.8.0) + vitest: + specifier: ^3.1.3 + version: 3.1.3(@types/debug@4.1.12)(@types/node@22.15.20)(jiti@2.4.2)(jsdom@20.0.3)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) + src: dependencies: '@anthropic-ai/bedrock-sdk': @@ -166,22 +188,25 @@ importers: version: 0.7.0 '@aws-sdk/client-bedrock-runtime': specifier: ^3.779.0 - version: 3.808.0 + version: 3.817.0 '@aws-sdk/credential-providers': specifier: ^3.806.0 - version: 3.808.0 + version: 3.817.0 '@google/genai': specifier: ^0.13.0 version: 0.13.0 '@mistralai/mistralai': specifier: ^1.3.6 - version: 1.6.0(zod@3.24.4) + version: 1.6.1(zod@3.24.4) '@modelcontextprotocol/sdk': specifier: ^1.9.0 - version: 1.11.2 + version: 1.12.0 '@qdrant/js-client-rest': specifier: ^1.14.0 version: 1.14.0(typescript@5.8.3) + '@roo-code/types': + specifier: workspace:^ + version: link:../packages/types '@types/lodash.debounce': specifier: ^4.0.9 version: 4.0.9 @@ -259,10 +284,10 @@ importers: version: 12.0.0 openai: specifier: ^4.78.1 - version: 4.98.0(ws@8.18.2)(zod@3.24.4) + version: 4.103.0(ws@8.18.2)(zod@3.24.4) os-name: specifier: ^6.0.0 - version: 6.0.0 + version: 6.1.0 p-limit: specifier: ^6.2.0 version: 6.2.0 @@ -277,7 +302,7 @@ importers: version: 4.1.0 posthog-node: specifier: ^4.7.0 - version: 4.17.1 + version: 4.17.2 pretty-bytes: specifier: ^6.1.1 version: 6.1.1 @@ -383,7 +408,7 @@ importers: version: 10.0.10 '@types/node': specifier: 20.x - version: 20.17.47 + version: 20.17.50 '@types/node-cache': specifier: ^4.1.3 version: 4.2.5 @@ -422,7 +447,7 @@ importers: version: 11.0.2 jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0) + version: 29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0) jest-simple-dot-reporter: specifier: ^1.0.5 version: 1.0.5 @@ -434,7 +459,7 @@ importers: version: 14.0.4 npm-run-all2: specifier: ^8.0.1 - version: 8.0.1 + version: 8.0.3 ovsx: specifier: 0.10.2 version: 0.10.2 @@ -443,10 +468,10 @@ importers: version: 6.0.1 ts-jest: specifier: ^29.2.5 - version: 29.3.3(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(esbuild@0.25.4)(jest@29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0))(typescript@5.8.3) + version: 29.3.3(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(esbuild@0.25.4)(jest@29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0))(typescript@5.8.3) tsup: specifier: ^8.4.0 - version: 8.4.0(jiti@2.4.2)(postcss@8.5.3)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.8.0) + version: 8.5.0(jiti@2.4.2)(postcss@8.5.3)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.8.0) tsx: specifier: ^4.19.3 version: 4.19.4 @@ -455,7 +480,7 @@ importers: version: 5.8.3 vitest: specifier: ^3.1.3 - version: 3.1.3(@types/debug@4.1.12)(@types/node@20.17.47)(jiti@2.4.2)(jsdom@20.0.3)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) + version: 3.1.3(@types/debug@4.1.12)(@types/node@20.17.50)(jiti@2.4.2)(jsdom@20.0.3)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) zod-to-ts: specifier: ^1.2.0 version: 1.2.0(typescript@5.8.3)(zod@3.24.4) @@ -504,6 +529,9 @@ importers: '@radix-ui/react-tooltip': specifier: ^1.1.8 version: 1.2.6(@types/react-dom@18.3.7(@types/react@18.3.21))(@types/react@18.3.21)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@roo-code/types': + specifier: workspace:^ + version: link:../packages/types '@tailwindcss/vite': specifier: ^4.0.0 version: 4.1.6(vite@6.3.5(@types/node@18.19.100)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0)) @@ -766,56 +794,56 @@ packages: '@aws-crypto/util@5.2.0': resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==} - '@aws-sdk/client-bedrock-runtime@3.808.0': - resolution: {integrity: sha512-OzjqAlevqurwAPiBGO++90pvpJCyjK6UrQH2av7oTwAwWYpY/wqVCGjch/pkme6G2+o76FjPvUKxfEcBu+5pKQ==} + '@aws-sdk/client-bedrock-runtime@3.817.0': + resolution: {integrity: sha512-fG3QAjIEq7P0a134E2P8r4qw/V6rL0X5voUPIcXte1oNKUXUjNXJb21N/NGmcDLCUVWvYXb24dD0YXyQ2kwZdA==} engines: {node: '>=18.0.0'} - '@aws-sdk/client-cognito-identity@3.808.0': - resolution: {integrity: sha512-M9pdFQ+Efl1O4No6R7uMEOkidKVUiNsmN13EyzuIOGech9g+RF+LgDn3n8+PuC7EIgndQVe6sQ6w39sPQdBkww==} + '@aws-sdk/client-cognito-identity@3.817.0': + resolution: {integrity: sha512-MNGwOJDQU0jpvsLLPSuPQDhPtDzFTc/k7rLmiKoPrIlgb3Y8pSF4crpJ+ZH3+xod2NWyyOVMEMQeMaKFFdMaKw==} engines: {node: '>=18.0.0'} - '@aws-sdk/client-sso@3.808.0': - resolution: {integrity: sha512-NxGomD0x9q30LPOXf4x7haOm6l2BJdLEzpiC/bPEXUkf2+4XudMQumMA/hDfErY5hCE19mFAouoO465m3Gl3JQ==} + '@aws-sdk/client-sso@3.817.0': + resolution: {integrity: sha512-fCh5rUHmWmWDvw70NNoWpE5+BRdtNi45kDnIoeoszqVg7UKF79SlG+qYooUT52HKCgDNHqgbWaXxMOSqd2I/OQ==} engines: {node: '>=18.0.0'} - '@aws-sdk/core@3.808.0': - resolution: {integrity: sha512-+nTmxJVIPtAarGq9Fd/uU2qU/Ngfb9EntT0/kwXdKKMI0wU9fQNWi10xSTVeqOtzWERbQpOJgBAdta+v3W7cng==} + '@aws-sdk/core@3.816.0': + resolution: {integrity: sha512-Lx50wjtyarzKpMFV6V+gjbSZDgsA/71iyifbClGUSiNPoIQ4OCV0KVOmAAj7mQRVvGJqUMWKVM+WzK79CjbjWA==} engines: {node: '>=18.0.0'} - '@aws-sdk/credential-provider-cognito-identity@3.808.0': - resolution: {integrity: sha512-AbsD/qHyQmyZ+CqJNOaGlnwZaXu8HfndfEiLsIJU/dIf9Wbt7ZtsHSAI/x78awxGohDneMZ6c5vuaRGYL7Z04g==} + '@aws-sdk/credential-provider-cognito-identity@3.817.0': + resolution: {integrity: sha512-+dzgWGmdmMNDdeSF+VvONN+hwqoGKX5A6Z3+siMO4CIoKWN7u5nDOx/JLjTGdVQji3522pJjJ+o9veQJNWOMRg==} engines: {node: '>=18.0.0'} - '@aws-sdk/credential-provider-env@3.808.0': - resolution: {integrity: sha512-snPRQnwG9PV4kYHQimo1tenf7P974RcdxkHUThzWSxPEV7HpjxTFYNWGlKbOKBhL4AcgeCVeiZ/j+zveF2lEPA==} + '@aws-sdk/credential-provider-env@3.816.0': + resolution: {integrity: sha512-wUJZwRLe+SxPxRV9AENYBLrJZRrNIo+fva7ZzejsC83iz7hdfq6Rv6B/aHEdPwG/nQC4+q7UUvcRPlomyrpsBA==} engines: {node: '>=18.0.0'} - '@aws-sdk/credential-provider-http@3.808.0': - resolution: {integrity: sha512-gNXjlx3BIUeX7QpVqxbjBxG6zm45lC39QvUIo92WzEJd2OTPcR8TU0OTTsgq/lpn2FrKcISj5qXvhWykd41+CA==} + '@aws-sdk/credential-provider-http@3.816.0': + resolution: {integrity: sha512-gcWGzMQ7yRIF+ljTkR8Vzp7727UY6cmeaPrFQrvcFB8PhOqWpf7g0JsgOf5BSaP8CkkSQcTQHc0C5ZYAzUFwPg==} engines: {node: '>=18.0.0'} - '@aws-sdk/credential-provider-ini@3.808.0': - resolution: {integrity: sha512-Y53CW0pCvFQQEvtVFwExCCMbTg+6NOl8b3YOuZVzPmVmDoW7M1JIn9IScesqoGERXL3VoXny6nYTsZj+vfpp7Q==} + '@aws-sdk/credential-provider-ini@3.817.0': + resolution: {integrity: sha512-kyEwbQyuXE+phWVzloMdkFv6qM6NOon+asMXY5W0fhDKwBz9zQLObDRWBrvQX9lmqq8BbDL1sCfZjOh82Y+RFw==} engines: {node: '>=18.0.0'} - '@aws-sdk/credential-provider-node@3.808.0': - resolution: {integrity: sha512-lASHlXJ6U5Cpnt9Gs+mWaaSmWcEibr1AFGhp+5UNvfyd+UU2Oiwgbo7rYXygmaVDGkbfXEiTkgYtoNOBSddnWQ==} + '@aws-sdk/credential-provider-node@3.817.0': + resolution: {integrity: sha512-b5mz7av0Lhavs1Bz3Zb+jrs0Pki93+8XNctnVO0drBW98x1fM4AR38cWvGbM/w9F9Q0/WEH3TinkmrMPrP4T/w==} engines: {node: '>=18.0.0'} - '@aws-sdk/credential-provider-process@3.808.0': - resolution: {integrity: sha512-ZLqp+xsQUatoo8pMozcfLwf/pwfXeIk0w3n0Lo/rWBgT3RcdECmmPCRcnkYBqxHQyE66aS9HiJezZUwMYPqh6w==} + '@aws-sdk/credential-provider-process@3.816.0': + resolution: {integrity: sha512-9Tm+AxMoV2Izvl5b9tyMQRbBwaex8JP06HN7ZeCXgC5sAsSN+o8dsThnEhf8jKN+uBpT6CLWKN1TXuUMrAmW1A==} engines: {node: '>=18.0.0'} - '@aws-sdk/credential-provider-sso@3.808.0': - resolution: {integrity: sha512-gWZByAokHX+aps1+syIW/hbKUBrjE2RpPRd/RGQvrBbVVgwsJzsHKsW0zy1B6mgARPG6IahmSUMjNkBCVsiAgw==} + '@aws-sdk/credential-provider-sso@3.817.0': + resolution: {integrity: sha512-gFUAW3VmGvdnueK1bh6TOcRX+j99Xm0men1+gz3cA4RE+rZGNy1Qjj8YHlv0hPwI9OnTPZquvPzA5fkviGREWg==} engines: {node: '>=18.0.0'} - '@aws-sdk/credential-provider-web-identity@3.808.0': - resolution: {integrity: sha512-SsGa1Gfa05aJM/qYOtHmfg0OKKW6Fl6kyMCcai63jWDVDYy0QSHcesnqRayJolISkdsVK6bqoWoFcPxiopcFcg==} + '@aws-sdk/credential-provider-web-identity@3.817.0': + resolution: {integrity: sha512-A2kgkS9g6NY0OMT2f2EdXHpL17Ym81NhbGnQ8bRXPqESIi7TFypFD2U6osB2VnsFv+MhwM+Ke4PKXSmLun22/A==} engines: {node: '>=18.0.0'} - '@aws-sdk/credential-providers@3.808.0': - resolution: {integrity: sha512-JJvY/gcet+tFw7dGifhTMJ2jfLXCJBR2Tu2rY/ePi+HVUrR//TnWmcm8qGvT1nWiCQ7w9NEhMlJgqKEIM/MkVQ==} + '@aws-sdk/credential-providers@3.817.0': + resolution: {integrity: sha512-i6Q2MyktWHG4YG+EmLlnXTgNVjW9/yeNHSKzF55GTho5fjqfU+t9beJfuMWclanRCifamm3N5e5OCm52rVDdTQ==} engines: {node: '>=18.0.0'} '@aws-sdk/eventstream-handler-node@3.804.0': @@ -838,20 +866,20 @@ packages: resolution: {integrity: sha512-zqHOrvLRdsUdN/ehYfZ9Tf8svhbiLLz5VaWUz22YndFv6m9qaAcijkpAOlKexsv3nLBMJdSdJ6GUTAeIy3BZzw==} engines: {node: '>=18.0.0'} - '@aws-sdk/middleware-user-agent@3.808.0': - resolution: {integrity: sha512-VckV6l5cf/rL3EtgzSHVTTD4mI0gd8UxDDWbKJsxbQ2bpNPDQG2L1wWGLaolTSzjEJ5f3ijDwQrNDbY9l85Mmg==} + '@aws-sdk/middleware-user-agent@3.816.0': + resolution: {integrity: sha512-bHRSlWZ0xDsFR8E2FwDb//0Ff6wMkVx4O+UKsfyNlAbtqCiiHRt5ANNfKPafr95cN2CCxLxiPvFTFVblQM5TsQ==} engines: {node: '>=18.0.0'} - '@aws-sdk/nested-clients@3.808.0': - resolution: {integrity: sha512-NparPojwoBul7XPCasy4psFMJbw7Ys4bz8lVB93ljEUD4VV7mM7zwK27Uhz20B8mBFGmFEoAprPsVymJcK9Vcw==} + '@aws-sdk/nested-clients@3.817.0': + resolution: {integrity: sha512-vQ2E06A48STJFssueJQgxYD8lh1iGJoLJnHdshRDWOQb8gy1wVQR+a7MkPGhGR6lGoS0SCnF/Qp6CZhnwLsqsQ==} engines: {node: '>=18.0.0'} '@aws-sdk/region-config-resolver@3.808.0': resolution: {integrity: sha512-9x2QWfphkARZY5OGkl9dJxZlSlYM2l5inFeo2bKntGuwg4A4YUe5h7d5yJ6sZbam9h43eBrkOdumx03DAkQF9A==} engines: {node: '>=18.0.0'} - '@aws-sdk/token-providers@3.808.0': - resolution: {integrity: sha512-PsfKanHmnyO7FxowXqxbLQ+QjURCdSGxyhUiSdZbfvlvme/wqaMyIoMV/i4jppndksoSdPbW2kZXjzOqhQF+ew==} + '@aws-sdk/token-providers@3.817.0': + resolution: {integrity: sha512-CYN4/UO0VaqyHf46ogZzNrVX7jI3/CfiuktwKlwtpKA6hjf2+ivfgHSKzPpgPBcSEfiibA/26EeLuMnB6cpSrQ==} engines: {node: '>=18.0.0'} '@aws-sdk/types@3.804.0': @@ -869,8 +897,8 @@ packages: '@aws-sdk/util-user-agent-browser@3.804.0': resolution: {integrity: sha512-KfW6T6nQHHM/vZBBdGn6fMyG/MgX5lq82TDdX4HRQRRuHKLgBWGpKXqqvBwqIaCdXwWHgDrg2VQups6GqOWW2A==} - '@aws-sdk/util-user-agent-node@3.808.0': - resolution: {integrity: sha512-5UmB6u7RBSinXZAVP2iDgqyeVA/odO2SLEcrXaeTCw8ICXEoqF0K+GL36T4iDbzCBOAIugOZ6OcQX5vH3ck5UA==} + '@aws-sdk/util-user-agent-node@3.816.0': + resolution: {integrity: sha512-Q6dxmuj4hL7pudhrneWEQ7yVHIQRBFr0wqKLF1opwOi1cIePuoEbPyJ2jkel6PDEv1YMfvsAKaRshp6eNA8VHg==} engines: {node: '>=18.0.0'} peerDependencies: aws-crt: '>=1.0.0' @@ -1579,16 +1607,16 @@ packages: '@microsoft/fast-web-utilities@5.4.1': resolution: {integrity: sha512-ReWYncndjV3c8D8iq9tp7NcFNc1vbVHvcBFPME2nNFKNbS1XCesYZGlIlf3ot5EmuOXPlrzUHOWzQ2vFpIkqDg==} - '@mistralai/mistralai@1.6.0': - resolution: {integrity: sha512-PQwGV3+n7FbE7Dp3Vnd8DAa3ffx6WuVV966Gfmf4QvzwcO3Mvxpz0SnJ/PjaZcsCwApBCZpNyQzvarAKEQLKeQ==} + '@mistralai/mistralai@1.6.1': + resolution: {integrity: sha512-NFAMamNFSAaLT4YhDrqEjhJALJXSheZdA5jXT6gG5ICCJRk9+WQx7vRQO1sIZNIRP+xpPyROpa7X6ZcufiucIA==} peerDependencies: zod: '>= 3' '@mixmark-io/domino@2.2.0': resolution: {integrity: sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw==} - '@modelcontextprotocol/sdk@1.11.2': - resolution: {integrity: sha512-H9vwztj5OAqHg9GockCQC06k1natgcxWQSRpQcPJf6i5+MWBzfKkRtxGbjQf0X2ihii0ffLZCRGbYV2f2bjNCQ==} + '@modelcontextprotocol/sdk@1.12.0': + resolution: {integrity: sha512-m//7RlINx1F3sz3KqwY1WWzVgTcYX52HYk4bJ1hkBXV3zccAEth+jRvG8DBRrdaQuRsPAJOx2MH3zaHNCKL7Zg==} engines: {node: '>=18'} '@mswjs/interceptors@0.38.6': @@ -1635,8 +1663,8 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@puppeteer/browsers@2.10.4': - resolution: {integrity: sha512-9DxbZx+XGMNdjBynIs4BRSz+M3iRDeB7qRcAr6UORFLphCIM2x3DXgOucvADiifcqCE4XePFUKcnaAMyGbrDlQ==} + '@puppeteer/browsers@2.10.5': + resolution: {integrity: sha512-eifa0o+i8dERnngJwKrfp3dEq7ia5XFyoqB17S4gK8GhsQE4/P8nxOfQSE0zQHxzzLo/cmF+7+ywEQ7wK7Fb+w==} engines: {node: '>=18'} hasBin: true @@ -2190,9 +2218,6 @@ packages: cpu: [x64] os: [win32] - '@roo-code/types@1.12.0': - resolution: {integrity: sha512-djdZ4lzsiOc+umX357JvcSwRlAMm05P+8DU58IFyZERmEh8wkm4TglDuaaRVGtQSHw9YGFikqfruLtZSEb7zJQ==} - '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} @@ -2237,66 +2262,66 @@ packages: resolution: {integrity: sha512-wRlta7GuLWpTqtFfGo+nZyOO1vEvewdNR1R4rTxpC8XU6vG/NDyrFBhwLZsqg1NUoR1noVaXJPC/7ZK47QCySw==} engines: {node: '>=14.0.0'} - '@smithy/abort-controller@4.0.2': - resolution: {integrity: sha512-Sl/78VDtgqKxN2+1qduaVE140XF+Xg+TafkncspwM4jFP/LHr76ZHmIY/y3V1M0mMLNk+Je6IGbzxy23RSToMw==} + '@smithy/abort-controller@4.0.3': + resolution: {integrity: sha512-AqXFf6DXnuRBXy4SoK/n1mfgHaKaq36bmkphmD1KO0nHq6xK/g9KHSW4HEsPQUBCGdIEfuJifGHwxFXPIFay9Q==} engines: {node: '>=18.0.0'} - '@smithy/config-resolver@4.1.2': - resolution: {integrity: sha512-7r6mZGwb5LmLJ+zPtkLoznf2EtwEuSWdtid10pjGl/7HefCE4mueOkrfki8JCUm99W6UfP47/r3tbxx9CfBN5A==} + '@smithy/config-resolver@4.1.3': + resolution: {integrity: sha512-N5e7ofiyYDmHxnPnqF8L4KtsbSDwyxFRfDK9bp1d9OyPO4ytRLd0/XxCqi5xVaaqB65v4woW8uey6jND6zxzxQ==} engines: {node: '>=18.0.0'} - '@smithy/core@3.3.3': - resolution: {integrity: sha512-CiJNc0b/WdnttAfQ6uMkxPQ3Z8hG/ba8wF89x9KtBBLDdZk6CX52K4F8hbe94uNbc8LDUuZFtbqfdhM3T21naw==} + '@smithy/core@3.4.0': + resolution: {integrity: sha512-dDYISQo7k0Ml/rXlFIjkTmTcQze/LxhtIRAEmZ6HJ/EI0inVxVEVnrUXJ7jPx6ZP0GHUhFm40iQcCgS5apXIXA==} engines: {node: '>=18.0.0'} - '@smithy/credential-provider-imds@4.0.4': - resolution: {integrity: sha512-jN6M6zaGVyB8FmNGG+xOPQB4N89M1x97MMdMnm1ESjljLS3Qju/IegQizKujaNcy2vXAvrz0en8bobe6E55FEA==} + '@smithy/credential-provider-imds@4.0.5': + resolution: {integrity: sha512-saEAGwrIlkb9XxX/m5S5hOtzjoJPEK6Qw2f9pYTbIsMPOFyGSXBBTw95WbOyru8A1vIS2jVCCU1Qhz50QWG3IA==} engines: {node: '>=18.0.0'} '@smithy/eventstream-codec@2.2.0': resolution: {integrity: sha512-8janZoJw85nJmQZc4L8TuePp2pk1nxLgkxIR0TUjKJ5Dkj5oelB9WtiSSGXCQvNsJl0VSTvK/2ueMXxvpa9GVw==} - '@smithy/eventstream-codec@4.0.2': - resolution: {integrity: sha512-p+f2kLSK7ZrXVfskU/f5dzksKTewZk8pJLPvER3aFHPt76C2MxD9vNatSfLzzQSQB4FNO96RK4PSXfhD1TTeMQ==} + '@smithy/eventstream-codec@4.0.3': + resolution: {integrity: sha512-V22KIPXZsE2mc4zEgYGANM/7UbL9jWlOACEolyGyMuTY+jjHJ2PQ0FdopOTS1CS7u6PlAkALmypkv2oQ4aftcg==} engines: {node: '>=18.0.0'} - '@smithy/eventstream-serde-browser@4.0.2': - resolution: {integrity: sha512-CepZCDs2xgVUtH7ZZ7oDdZFH8e6Y2zOv8iiX6RhndH69nlojCALSKK+OXwZUgOtUZEUaZ5e1hULVCHYbCn7pug==} + '@smithy/eventstream-serde-browser@4.0.3': + resolution: {integrity: sha512-oe1d/tfCGVZBMX8O6HApaM4G+fF9JNdyLP7tWXt00epuL/kLOdp/4o9VqheLFeJaXgao+9IaBgs/q/oM48hxzg==} engines: {node: '>=18.0.0'} - '@smithy/eventstream-serde-config-resolver@4.1.0': - resolution: {integrity: sha512-1PI+WPZ5TWXrfj3CIoKyUycYynYJgZjuQo8U+sphneOtjsgrttYybdqESFReQrdWJ+LKt6NEdbYzmmfDBmjX2A==} + '@smithy/eventstream-serde-config-resolver@4.1.1': + resolution: {integrity: sha512-XXCPGjRNwpFWHKQJMKIjGLfFKYULYckFnxGcWmBC2mBf3NsrvUKgqHax4NCqc0TfbDAimPDHOc6HOKtzsXK9Gw==} engines: {node: '>=18.0.0'} '@smithy/eventstream-serde-node@2.2.0': resolution: {integrity: sha512-zpQMtJVqCUMn+pCSFcl9K/RPNtQE0NuMh8sKpCdEHafhwRsjP50Oq/4kMmvxSRy6d8Jslqd8BLvDngrUtmN9iA==} engines: {node: '>=14.0.0'} - '@smithy/eventstream-serde-node@4.0.2': - resolution: {integrity: sha512-C5bJ/C6x9ENPMx2cFOirspnF9ZsBVnBMtP6BdPl/qYSuUawdGQ34Lq0dMcf42QTjUZgWGbUIZnz6+zLxJlb9aw==} + '@smithy/eventstream-serde-node@4.0.3': + resolution: {integrity: sha512-HOEbRmm9TrikCoFrypYu0J/gC4Lsk8gl5LtOz1G3laD2Jy44+ht2Pd2E9qjNQfhMJIzKDZ/gbuUH0s0v4kWQ0A==} engines: {node: '>=18.0.0'} '@smithy/eventstream-serde-universal@2.2.0': resolution: {integrity: sha512-pvoe/vvJY0mOpuF84BEtyZoYfbehiFj8KKWk1ds2AT0mTLYFVs+7sBJZmioOFdBXKd48lfrx1vumdPdmGlCLxA==} engines: {node: '>=14.0.0'} - '@smithy/eventstream-serde-universal@4.0.2': - resolution: {integrity: sha512-St8h9JqzvnbB52FtckiHPN4U/cnXcarMniXRXTKn0r4b4XesZOGiAyUdj1aXbqqn1icSqBlzzUsCl6nPB018ng==} + '@smithy/eventstream-serde-universal@4.0.3': + resolution: {integrity: sha512-ShOP512CZrYI9n+h64PJ84udzoNHUQtPddyh1j175KNTKsSnMEDNscOWJWyEoLQiuhWWw51lSa+k6ea9ZGXcRg==} engines: {node: '>=18.0.0'} '@smithy/fetch-http-handler@2.5.0': resolution: {integrity: sha512-BOWEBeppWhLn/no/JxUL/ghTfANTjT7kg3Ww2rPqTUY9R4yHPXxJ9JhMe3Z03LN3aPwiwlpDIUcVw1xDyHqEhw==} - '@smithy/fetch-http-handler@5.0.2': - resolution: {integrity: sha512-+9Dz8sakS9pe7f2cBocpJXdeVjMopUDLgZs1yWeu7h++WqSbjUYv/JAJwKwXw1HV6gq1jyWjxuyn24E2GhoEcQ==} + '@smithy/fetch-http-handler@5.0.3': + resolution: {integrity: sha512-yBZwavI31roqTndNI7ONHqesfH01JmjJK6L3uUpZAhyAmr86LN5QiPzfyZGIxQmed8VEK2NRSQT3/JX5V1njfQ==} engines: {node: '>=18.0.0'} - '@smithy/hash-node@4.0.2': - resolution: {integrity: sha512-VnTpYPnRUE7yVhWozFdlxcYknv9UN7CeOqSrMH+V877v4oqtVYuoqhIhtSjmGPvYrYnAkaM61sLMKHvxL138yg==} + '@smithy/hash-node@4.0.3': + resolution: {integrity: sha512-W5Uhy6v/aYrgtjh9y0YP332gIQcwccQ+EcfWhllL0B9rPae42JngTTUpb8W6wuxaNFzqps4xq5klHckSSOy5fw==} engines: {node: '>=18.0.0'} - '@smithy/invalid-dependency@4.0.2': - resolution: {integrity: sha512-GatB4+2DTpgWPday+mnUkoumP54u/MDM/5u44KF9hIu8jF0uafZtQLcdfIKkIcUNuF/fBojpLEHZS/56JqPeXQ==} + '@smithy/invalid-dependency@4.0.3': + resolution: {integrity: sha512-1Bo8Ur1ZGqxvwTqBmv6DZEn0rXtwJGeqiiO2/JFcCtz3nBakOqeXbJBElXJMMzd0ghe8+eB6Dkw98nMYctgizg==} engines: {node: '>=18.0.0'} '@smithy/is-array-buffer@2.2.0': @@ -2311,112 +2336,112 @@ packages: resolution: {integrity: sha512-saYhF8ZZNoJDTvJBEWgeBccCg+yvp1CX+ed12yORU3NilJScfc6gfch2oVb4QgxZrGUx3/ZJlb+c/dJbyupxlw==} engines: {node: '>=18.0.0'} - '@smithy/middleware-content-length@4.0.2': - resolution: {integrity: sha512-hAfEXm1zU+ELvucxqQ7I8SszwQ4znWMbNv6PLMndN83JJN41EPuS93AIyh2N+gJ6x8QFhzSO6b7q2e6oClDI8A==} + '@smithy/middleware-content-length@4.0.3': + resolution: {integrity: sha512-NE/Zph4BP5u16bzYq2csq9qD0T6UBLeg4AuNrwNJ7Gv9uLYaGEgelZUOdRndGdMGcUfSGvNlXGb2aA2hPCwJ6g==} engines: {node: '>=18.0.0'} '@smithy/middleware-endpoint@2.5.1': resolution: {integrity: sha512-1/8kFp6Fl4OsSIVTWHnNjLnTL8IqpIb/D3sTSczrKFnrE9VMNWxnrRKNvpUHOJ6zpGD5f62TPm7+17ilTJpiCQ==} engines: {node: '>=14.0.0'} - '@smithy/middleware-endpoint@4.1.6': - resolution: {integrity: sha512-Zdieg07c3ua3ap5ungdcyNnY1OsxmsXXtKDTk28+/YbwIPju0Z1ZX9X5AnkjmDE3+AbqgvhtC/ZuCMSr6VSfPw==} + '@smithy/middleware-endpoint@4.1.7': + resolution: {integrity: sha512-KDzM7Iajo6K7eIWNNtukykRT4eWwlHjCEsULZUaSfi/SRSBK8BPRqG5FsVfp58lUxcvre8GT8AIPIqndA0ERKw==} engines: {node: '>=18.0.0'} - '@smithy/middleware-retry@4.1.7': - resolution: {integrity: sha512-lFIFUJ0E/4I0UaIDY5usNUzNKAghhxO0lDH4TZktXMmE+e4ActD9F154Si0Unc01aCPzcwd+NcOwQw6AfXXRRQ==} + '@smithy/middleware-retry@4.1.8': + resolution: {integrity: sha512-e2OtQgFzzlSG0uCjcJmi02QuFSRTrpT11Eh2EcqqDFy7DYriteHZJkkf+4AsxsrGDugAtPFcWBz1aq06sSX5fQ==} engines: {node: '>=18.0.0'} '@smithy/middleware-serde@2.3.0': resolution: {integrity: sha512-sIADe7ojwqTyvEQBe1nc/GXB9wdHhi9UwyX0lTyttmUWDJLP655ZYE1WngnNyXREme8I27KCaUhyhZWRXL0q7Q==} engines: {node: '>=14.0.0'} - '@smithy/middleware-serde@4.0.5': - resolution: {integrity: sha512-yREC3q/HXqQigq29xX3hiy6tFi+kjPKXoYUQmwQdgPORLbQ0n6V2Z/Iw9Nnlu66da9fM/WhDtGvYvqwecrCljQ==} + '@smithy/middleware-serde@4.0.6': + resolution: {integrity: sha512-YECyl7uNII+jCr/9qEmCu8xYL79cU0fqjo0qxpcVIU18dAPHam/iYwcknAu4Jiyw1uN+sAx7/SMf/Kmef/Jjsg==} engines: {node: '>=18.0.0'} '@smithy/middleware-stack@2.2.0': resolution: {integrity: sha512-Qntc3jrtwwrsAC+X8wms8zhrTr0sFXnyEGhZd9sLtsJ/6gGQKFzNB+wWbOcpJd7BR8ThNCoKt76BuQahfMvpeA==} engines: {node: '>=14.0.0'} - '@smithy/middleware-stack@4.0.2': - resolution: {integrity: sha512-eSPVcuJJGVYrFYu2hEq8g8WWdJav3sdrI4o2c6z/rjnYDd3xH9j9E7deZQCzFn4QvGPouLngH3dQ+QVTxv5bOQ==} + '@smithy/middleware-stack@4.0.3': + resolution: {integrity: sha512-baeV7t4jQfQtFxBADFmnhmqBmqR38dNU5cvEgHcMK/Kp3D3bEI0CouoX2Sr/rGuntR+Eg0IjXdxnGGTc6SbIkw==} engines: {node: '>=18.0.0'} '@smithy/node-config-provider@2.3.0': resolution: {integrity: sha512-0elK5/03a1JPWMDPaS726Iw6LpQg80gFut1tNpPfxFuChEEklo2yL823V94SpTZTxmKlXFtFgsP55uh3dErnIg==} engines: {node: '>=14.0.0'} - '@smithy/node-config-provider@4.1.1': - resolution: {integrity: sha512-1slS5jf5icHETwl5hxEVBj+mh6B+LbVW4yRINsGtUKH+nxM5Pw2H59+qf+JqYFCHp9jssG4vX81f5WKnjMN3Vw==} + '@smithy/node-config-provider@4.1.2': + resolution: {integrity: sha512-SUvNup8iU1v7fmM8XPk+27m36udmGCfSz+VZP5Gb0aJ3Ne0X28K/25gnsrg3X1rWlhcnhzNUUysKW/Ied46ivQ==} engines: {node: '>=18.0.0'} '@smithy/node-http-handler@2.5.0': resolution: {integrity: sha512-mVGyPBzkkGQsPoxQUbxlEfRjrj6FPyA3u3u2VXGr9hT8wilsoQdZdvKpMBFMB8Crfhv5dNkKHIW0Yyuc7eABqA==} engines: {node: '>=14.0.0'} - '@smithy/node-http-handler@4.0.4': - resolution: {integrity: sha512-/mdqabuAT3o/ihBGjL94PUbTSPSRJ0eeVTdgADzow0wRJ0rN4A27EOrtlK56MYiO1fDvlO3jVTCxQtQmK9dZ1g==} + '@smithy/node-http-handler@4.0.5': + resolution: {integrity: sha512-T7QglZC1vS7SPT44/1qSIAQEx5bFKb3LfO6zw/o4Xzt1eC5HNoH1TkS4lMYA9cWFbacUhx4hRl/blLun4EOCkg==} engines: {node: '>=18.0.0'} '@smithy/property-provider@2.2.0': resolution: {integrity: sha512-+xiil2lFhtTRzXkx8F053AV46QnIw6e7MV8od5Mi68E1ICOjCeCHw2XfLnDEUHnT9WGUIkwcqavXjfwuJbGlpg==} engines: {node: '>=14.0.0'} - '@smithy/property-provider@4.0.2': - resolution: {integrity: sha512-wNRoQC1uISOuNc2s4hkOYwYllmiyrvVXWMtq+TysNRVQaHm4yoafYQyjN/goYZS+QbYlPIbb/QRjaUZMuzwQ7A==} + '@smithy/property-provider@4.0.3': + resolution: {integrity: sha512-Wcn17QNdawJZcZZPBuMuzyBENVi1AXl4TdE0jvzo4vWX2x5df/oMlmr/9M5XAAC6+yae4kWZlOYIsNsgDrMU9A==} engines: {node: '>=18.0.0'} '@smithy/protocol-http@3.3.0': resolution: {integrity: sha512-Xy5XK1AFWW2nlY/biWZXu6/krgbaf2dg0q492D8M5qthsnU2H+UgFeZLbM76FnH7s6RO/xhQRkj+T6KBO3JzgQ==} engines: {node: '>=14.0.0'} - '@smithy/protocol-http@5.1.0': - resolution: {integrity: sha512-KxAOL1nUNw2JTYrtviRRjEnykIDhxc84qMBzxvu1MUfQfHTuBlCG7PA6EdVwqpJjH7glw7FqQoFxUJSyBQgu7g==} + '@smithy/protocol-http@5.1.1': + resolution: {integrity: sha512-Vsay2mzq05DwNi9jK01yCFtfvu9HimmgC7a4HTs7lhX12Sx8aWsH0mfz6q/02yspSp+lOB+Q2HJwi4IV2GKz7A==} engines: {node: '>=18.0.0'} '@smithy/querystring-builder@2.2.0': resolution: {integrity: sha512-L1kSeviUWL+emq3CUVSgdogoM/D9QMFaqxL/dd0X7PCNWmPXqt+ExtrBjqT0V7HLN03Vs9SuiLrG3zy3JGnE5A==} engines: {node: '>=14.0.0'} - '@smithy/querystring-builder@4.0.2': - resolution: {integrity: sha512-NTOs0FwHw1vimmQM4ebh+wFQvOwkEf/kQL6bSM1Lock+Bv4I89B3hGYoUEPkmvYPkDKyp5UdXJYu+PoTQ3T31Q==} + '@smithy/querystring-builder@4.0.3': + resolution: {integrity: sha512-UUzIWMVfPmDZcOutk2/r1vURZqavvQW0OHvgsyNV0cKupChvqg+/NKPRMaMEe+i8tP96IthMFeZOZWpV+E4RAw==} engines: {node: '>=18.0.0'} '@smithy/querystring-parser@2.2.0': resolution: {integrity: sha512-BvHCDrKfbG5Yhbpj4vsbuPV2GgcpHiAkLeIlcA1LtfpMz3jrqizP1+OguSNSj1MwBHEiN+jwNisXLGdajGDQJA==} engines: {node: '>=14.0.0'} - '@smithy/querystring-parser@4.0.2': - resolution: {integrity: sha512-v6w8wnmZcVXjfVLjxw8qF7OwESD9wnpjp0Dqry/Pod0/5vcEA3qxCr+BhbOHlxS8O+29eLpT3aagxXGwIoEk7Q==} + '@smithy/querystring-parser@4.0.3': + resolution: {integrity: sha512-K5M4ZJQpFCblOJ5Oyw7diICpFg1qhhR47m2/5Ef1PhGE19RaIZf50tjYFrxa6usqcuXyTiFPGo4d1geZdH4YcQ==} engines: {node: '>=18.0.0'} - '@smithy/service-error-classification@4.0.3': - resolution: {integrity: sha512-FTbcajmltovWMjj3tksDQdD23b2w6gH+A0DYA1Yz3iSpjDj8fmkwy62UnXcWMy4d5YoMoSyLFHMfkEVEzbiN8Q==} + '@smithy/service-error-classification@4.0.4': + resolution: {integrity: sha512-W5ScbQ1bTzgH91kNEE2CvOzM4gXlDOqdow4m8vMFSIXCel2scbHwjflpVNnC60Y3F1m5i7w2gQg9lSnR+JsJAA==} engines: {node: '>=18.0.0'} '@smithy/shared-ini-file-loader@2.4.0': resolution: {integrity: sha512-WyujUJL8e1B6Z4PBfAqC/aGY1+C7T0w20Gih3yrvJSk97gpiVfB+y7c46T4Nunk+ZngLq0rOIdeVeIklk0R3OA==} engines: {node: '>=14.0.0'} - '@smithy/shared-ini-file-loader@4.0.2': - resolution: {integrity: sha512-J9/gTWBGVuFZ01oVA6vdb4DAjf1XbDhK6sLsu3OS9qmLrS6KB5ygpeHiM3miIbj1qgSJ96GYszXFWv6ErJ8QEw==} + '@smithy/shared-ini-file-loader@4.0.3': + resolution: {integrity: sha512-vHwlrqhZGIoLwaH8vvIjpHnloShqdJ7SUPNM2EQtEox+yEDFTVQ7E+DLZ+6OhnYEgFUwPByJyz6UZaOu2tny6A==} engines: {node: '>=18.0.0'} '@smithy/signature-v4@3.1.2': resolution: {integrity: sha512-3BcPylEsYtD0esM4Hoyml/+s7WP2LFhcM3J2AGdcL2vx9O60TtfpDOL72gjb4lU8NeRPeKAwR77YNyyGvMbuEA==} engines: {node: '>=16.0.0'} - '@smithy/signature-v4@5.1.0': - resolution: {integrity: sha512-4t5WX60sL3zGJF/CtZsUQTs3UrZEDO2P7pEaElrekbLqkWPYkgqNW1oeiNYC6xXifBnT9dVBOnNQRvOE9riU9w==} + '@smithy/signature-v4@5.1.1': + resolution: {integrity: sha512-zy8Repr5zvT0ja+Tf5wjV/Ba6vRrhdiDcp/ww6cvqYbSEudIkziDe3uppNRlFoCViyJXdPnLcwyZdDLA4CHzSg==} engines: {node: '>=18.0.0'} '@smithy/smithy-client@2.5.1': resolution: {integrity: sha512-jrbSQrYCho0yDaaf92qWgd+7nAeap5LtHTI51KXqmpIFCceKU3K9+vIVTUH72bOJngBMqa4kyu1VJhRcSrk/CQ==} engines: {node: '>=14.0.0'} - '@smithy/smithy-client@4.2.6': - resolution: {integrity: sha512-WEqP0wQ1N/lVS4pwNK1Vk+0i6QIr66cq/xbu1dVy1tM0A0qYwAYyz0JhbquzM5pMa8s89lyDBtoGKxo7iG74GA==} + '@smithy/smithy-client@4.3.0': + resolution: {integrity: sha512-DNsRA38pN6tYHUjebmwD9e4KcgqTLldYQb2gC6K+oxXYdCTxPn6wV9+FvOa6wrU2FQEnGJoi+3GULzOTKck/tg==} engines: {node: '>=18.0.0'} '@smithy/types@2.12.0': @@ -2427,15 +2452,15 @@ packages: resolution: {integrity: sha512-bNwBYYmN8Eh9RyjS1p2gW6MIhSO2rl7X9QeLM8iTdcGRP+eDiIWDt66c9IysCc22gefKszZv+ubV9qZc7hdESg==} engines: {node: '>=16.0.0'} - '@smithy/types@4.2.0': - resolution: {integrity: sha512-7eMk09zQKCO+E/ivsjQv+fDlOupcFUCSC/L2YUPgwhvowVGWbPQHjEFcmjt7QQ4ra5lyowS92SV53Zc6XD4+fg==} + '@smithy/types@4.3.0': + resolution: {integrity: sha512-+1iaIQHthDh9yaLhRzaoQxRk+l9xlk+JjMFxGRhNLz+m9vKOkjNeU8QuB4w3xvzHyVR/BVlp/4AXDHjoRIkfgQ==} engines: {node: '>=18.0.0'} '@smithy/url-parser@2.2.0': resolution: {integrity: sha512-hoA4zm61q1mNTpksiSWp2nEl1dt3j726HdRhiNgVJQMj7mLp7dprtF57mOB6JvEk/x9d2bsuL5hlqZbBuHQylQ==} - '@smithy/url-parser@4.0.2': - resolution: {integrity: sha512-Bm8n3j2ScqnT+kJaClSVCMeiSenK6jVAzZCNewsYWuZtnBehEz4r2qP0riZySZVfzB+03XZHJeqfmJDkeeSLiQ==} + '@smithy/url-parser@4.0.3': + resolution: {integrity: sha512-n5/DnosDu/tweOqUUNtUbu7eRIR4J/Wz9nL7V5kFYQQVb8VYdj7a4G5NJHCw6o21ul7CvZoJkOpdTnsQDLT0tQ==} engines: {node: '>=18.0.0'} '@smithy/util-base64@2.3.0': @@ -2470,16 +2495,16 @@ packages: resolution: {integrity: sha512-L1RBVzLyfE8OXH+1hsJ8p+acNUSirQnWQ6/EgpchV88G6zGBTDPdXiiExei6Z1wR2RxYvxY/XLw6AMNCCt8H3w==} engines: {node: '>=18.0.0'} - '@smithy/util-defaults-mode-browser@4.0.14': - resolution: {integrity: sha512-l7QnMX8VcDOH6n/fBRu4zqguSlOBZxFzWqp58dXFSARFBjNlmEDk5G/z4T7BMGr+rI0Pg8MkhmMUfEtHFgpy2g==} + '@smithy/util-defaults-mode-browser@4.0.15': + resolution: {integrity: sha512-bJJ/B8owQbHAflatSq92f9OcV8858DJBQF1Y3GRjB8psLyUjbISywszYPFw16beREHO/C3I3taW4VGH+tOuwrQ==} engines: {node: '>=18.0.0'} - '@smithy/util-defaults-mode-node@4.0.14': - resolution: {integrity: sha512-Ujs1gsWDo3m/T63VWBTBmHLTD2UlU6J6FEokLCEp7OZQv45jcjLHoxTwgWsi8ULpsYozvH4MTWkRP+bhwr0vDg==} + '@smithy/util-defaults-mode-node@4.0.15': + resolution: {integrity: sha512-8CUrEW2Ni5q+NmYkj8wsgkfqoP7l4ZquptFbq92yQE66xevc4SxqP2zH6tMtN158kgBqBDsZ+qlrRwXWOjCR8A==} engines: {node: '>=18.0.0'} - '@smithy/util-endpoints@3.0.4': - resolution: {integrity: sha512-VfFATC1bmZLV2858B/O1NpMcL32wYo8DPPhHxYxDCodDl3f3mSZ5oJheW1IF91A0EeAADz2WsakM/hGGPGNKLg==} + '@smithy/util-endpoints@3.0.5': + resolution: {integrity: sha512-PjDpqLk24/vAl340tmtCA++Q01GRRNH9cwL9qh46NspAX9S+IQVcK+GOzPt0GLJ6KYGyn8uOgo2kvJhiThclJw==} engines: {node: '>=18.0.0'} '@smithy/util-hex-encoding@2.2.0': @@ -2502,20 +2527,20 @@ packages: resolution: {integrity: sha512-dWpyc1e1R6VoXrwLoLDd57U1z6CwNSdkM69Ie4+6uYh2GC7Vg51Qtan7ITzczuVpqezdDTKJGJB95fFvvjU/ow==} engines: {node: '>=16.0.0'} - '@smithy/util-middleware@4.0.2': - resolution: {integrity: sha512-6GDamTGLuBQVAEuQ4yDQ+ti/YINf/MEmIegrEeg7DdB/sld8BX1lqt9RRuIcABOhAGTA50bRbPzErez7SlDtDQ==} + '@smithy/util-middleware@4.0.3': + resolution: {integrity: sha512-iIsC6qZXxkD7V3BzTw3b1uK8RVC1M8WvwNxK1PKrH9FnxntCd30CSunXjL/8iJBE8Z0J14r2P69njwIpRG4FBQ==} engines: {node: '>=18.0.0'} - '@smithy/util-retry@4.0.3': - resolution: {integrity: sha512-DPuYjZQDXmKr/sNvy9Spu8R/ESa2e22wXZzSAY6NkjOLj6spbIje/Aq8rT97iUMdDj0qHMRIe+bTxvlU74d9Ng==} + '@smithy/util-retry@4.0.4': + resolution: {integrity: sha512-Aoqr9W2jDYGrI6OxljN8VmLDQIGO4VdMAUKMf9RGqLG8hn6or+K41NEy1Y5dtum9q8F7e0obYAuKl2mt/GnpZg==} engines: {node: '>=18.0.0'} '@smithy/util-stream@2.2.0': resolution: {integrity: sha512-17faEXbYWIRst1aU9SvPZyMdWmqIrduZjVOqCPMIsWFNxs5yQQgFrJL6b2SdiCzyW9mJoDjFtgi53xx7EH+BXA==} engines: {node: '>=14.0.0'} - '@smithy/util-stream@4.2.0': - resolution: {integrity: sha512-Vj1TtwWnuWqdgQI6YTUF5hQ/0jmFiOYsc51CSMgj7QfyO+RF4EnT2HNjoviNlOOmgzgvf3f5yno+EiC4vrnaWQ==} + '@smithy/util-stream@4.2.1': + resolution: {integrity: sha512-W3IR0x5DY6iVtjj5p902oNhD+Bz7vs5S+p6tppbPa509rV9BdeXZjGuRSCtVEad9FA0Mba+tNUtUmtnSI1nwUw==} engines: {node: '>=18.0.0'} '@smithy/util-uri-escape@2.2.0': @@ -3032,8 +3057,8 @@ packages: '@types/node@18.19.100': resolution: {integrity: sha512-ojmMP8SZBKprc3qGrGk8Ujpo80AXkrP7G2tOT4VWr5jlr5DHjsJF+emXJz+Wm0glmy4Js62oKMdZZ6B9Y+tEcA==} - '@types/node@20.17.47': - resolution: {integrity: sha512-3dLX0Upo1v7RvUimvxLeXqwrfyKxUINk0EAM83swP2mlSUcwV73sZy8XhNz8bcZ3VbsfQyC/y6jRdL5tgCNpDQ==} + '@types/node@20.17.50': + resolution: {integrity: sha512-Mxiq0ULv/zo1OzOhwPqOA13I81CV/W3nvd3ChtQZRT5Cwz3cr0FKo/wMSsbTqL3EXpaBAEQhva2B8ByRkOIh9A==} '@types/node@22.15.20': resolution: {integrity: sha512-A6BohGFRGHAscJsTslDCA9JG7qSJr/DWUvrvY8yi9IgnGtMxCyat7vvQ//MFa0DnLsyuS3wYTpLdw4Hf+Q5JXw==} @@ -4611,8 +4636,8 @@ packages: eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - eventsource-parser@3.0.1: - resolution: {integrity: sha512-VARTJ9CYeuQYb0pZEPbzi740OWFgpHe7AYJ2WFZVnUDUQp5Dk2yJUgF36YsZ81cOyxT0QxmXD2EQpapAouzWVA==} + eventsource-parser@3.0.2: + resolution: {integrity: sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA==} engines: {node: '>=18.0.0'} eventsource@3.0.7: @@ -4766,6 +4791,9 @@ packages: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} + fix-dts-default-cjs-exports@1.0.1: + resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} + flat-cache@4.0.1: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} @@ -6466,8 +6494,8 @@ packages: resolution: {integrity: sha512-TZKxPvItzai9kN9H/TkmCtx/ZN/hvr3vUycjlfmH0ootY9yFBzNOpiXAdIn1Iteqsvk4lQn6B5PTrt+n6h8k/w==} engines: {node: ^18.17.0 || >=20.5.0} - npm-run-all2@8.0.1: - resolution: {integrity: sha512-jkhE0AsELQeCtScrcJ/7mSIdk+ZsnWjvKk3KwE96HZ6+OFVB74XhxQtHT1W6kdUfn92fRnBb29Mz82j9bV2XEQ==} + npm-run-all2@8.0.3: + resolution: {integrity: sha512-0mAycidMUMThrLt8AT3LGtOMgfLaMg6/4oUKHTKMU0jDSIsdKBsKp98H8zBFcJylQC4CtOB140UUFbOlFyE9gA==} engines: {node: ^20.5.0 || >=22.0.0, npm: '>= 10'} hasBin: true @@ -6561,8 +6589,8 @@ packages: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} - openai@4.98.0: - resolution: {integrity: sha512-TmDKur1WjxxMPQAtLG5sgBSCJmX7ynTsGmewKzoDwl1fRxtbLOsiR0FA/AOAAtYUmP6azal+MYQuOENfdU+7yg==} + openai@4.103.0: + resolution: {integrity: sha512-eWcz9kdurkGOFDtd5ySS5y251H2uBgq9+1a2lTBnjMMzlexJ40Am5t6Mu76SSE87VvitPa0dkIAp75F+dZVC0g==} hasBin: true peerDependencies: ws: ^8.18.0 @@ -6584,8 +6612,8 @@ packages: resolution: {integrity: sha512-weP+BZ8MVNnlCm8c0Qdc1WSWq4Qn7I+9CJGm7Qali6g44e/PUzbjNqJX5NJ9ljlNMosfJvg1fKEGILklK9cwnw==} engines: {node: '>=18'} - os-name@6.0.0: - resolution: {integrity: sha512-bv608E0UX86atYi2GMGjDe0vF/X1TJjemNS8oEW6z22YW1Rc3QykSYoGfkQbX0zZX9H0ZB6CQP/3GTf1I5hURg==} + os-name@6.1.0: + resolution: {integrity: sha512-zBd1G8HkewNd2A8oQ8c6BN/f/c9EId7rSUueOLGu28govmUctXmM+3765GwsByv9nYUdrLqHphXlYIc86saYsg==} engines: {node: '>=18'} os-tmpdir@1.0.2: @@ -6852,8 +6880,8 @@ packages: rrweb-snapshot: optional: true - posthog-node@4.17.1: - resolution: {integrity: sha512-cVlQPOwOPjakUnrueKRCQe1m2Ku+XzKaOos7Tn/zDZkkZFeBT/byP7tbNf7LiwhaBRWFBRowZZb/MsTtSRaorg==} + posthog-node@4.17.2: + resolution: {integrity: sha512-bFmwOTk4QdYavopeHVXtyFGQ9vyLMVaNWkWocwjix+0n6sQgv7Zq5nYjYulz7ThmK18zsvNJ337ahuMLv3ulow==} engines: {node: '>=15.0.0'} preact@10.26.6: @@ -7738,8 +7766,8 @@ packages: tar-fs@2.1.2: resolution: {integrity: sha512-EsaAXwxmx8UB7FRKqeozqEPop69DXcmYwTQwXvyAPF352HJsPdkVhvTaDPYqfNgruveJIJy3TA2l+2zj8LJIJA==} - tar-fs@3.0.8: - resolution: {integrity: sha512-ZoROL70jptorGAlgAYiLoBLItEKw/fUxg9BSYK/dF/GAGYFJOJJJMvjPAKDJraCXFwadD456FCuvLWgfhMsPwg==} + tar-fs@3.0.9: + resolution: {integrity: sha512-XF4w9Xp+ZQgifKakjZYmFdkLoSWd34VGKcsTCwlNWM7QG3ZbaxnTsaBwnjFZqHRf/rROxaR8rXnbtwdvaDI+lA==} tar-stream@2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} @@ -7919,8 +7947,8 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - tsup@8.4.0: - resolution: {integrity: sha512-b+eZbPCjz10fRryaAA7C8xlIHnf8VnsaRqydheLIqwG/Mcpfk8Z5zp3HayX7GaTygkigHl5cBUs+IhcySiIexQ==} + tsup@8.5.0: + resolution: {integrity: sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -8475,8 +8503,8 @@ packages: wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - windows-release@6.0.1: - resolution: {integrity: sha512-MS3BzG8QK33dAyqwxfYJCJ03arkwKaddUOvvnnlFdXLudflsQF6I8yAxrLBeQk4yO8wjdH/+ax0YzxJEDrOftg==} + windows-release@6.1.0: + resolution: {integrity: sha512-1lOb3qdzw6OFmOzoY0nauhLG72TpWtb5qgYPiSh/62rjc1XidBSDio2qw0pwHh17VINF217ebIkZJdFLZFn9SA==} engines: {node: '>=18'} word-wrap@1.2.5: @@ -8659,8 +8687,8 @@ snapshots: dependencies: '@anthropic-ai/sdk': 0.37.0 '@aws-crypto/sha256-js': 4.0.0 - '@aws-sdk/client-bedrock-runtime': 3.808.0 - '@aws-sdk/credential-providers': 3.808.0 + '@aws-sdk/client-bedrock-runtime': 3.817.0 + '@aws-sdk/credential-providers': 3.817.0 '@smithy/eventstream-serde-node': 2.2.0 '@smithy/fetch-http-handler': 2.5.0 '@smithy/protocol-http': 3.3.0 @@ -8748,51 +8776,51 @@ snapshots: '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 - '@aws-sdk/client-bedrock-runtime@3.808.0': + '@aws-sdk/client-bedrock-runtime@3.817.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.808.0 - '@aws-sdk/credential-provider-node': 3.808.0 + '@aws-sdk/core': 3.816.0 + '@aws-sdk/credential-provider-node': 3.817.0 '@aws-sdk/eventstream-handler-node': 3.804.0 '@aws-sdk/middleware-eventstream': 3.804.0 '@aws-sdk/middleware-host-header': 3.804.0 '@aws-sdk/middleware-logger': 3.804.0 '@aws-sdk/middleware-recursion-detection': 3.804.0 - '@aws-sdk/middleware-user-agent': 3.808.0 + '@aws-sdk/middleware-user-agent': 3.816.0 '@aws-sdk/region-config-resolver': 3.808.0 '@aws-sdk/types': 3.804.0 '@aws-sdk/util-endpoints': 3.808.0 '@aws-sdk/util-user-agent-browser': 3.804.0 - '@aws-sdk/util-user-agent-node': 3.808.0 - '@smithy/config-resolver': 4.1.2 - '@smithy/core': 3.3.3 - '@smithy/eventstream-serde-browser': 4.0.2 - '@smithy/eventstream-serde-config-resolver': 4.1.0 - '@smithy/eventstream-serde-node': 4.0.2 - '@smithy/fetch-http-handler': 5.0.2 - '@smithy/hash-node': 4.0.2 - '@smithy/invalid-dependency': 4.0.2 - '@smithy/middleware-content-length': 4.0.2 - '@smithy/middleware-endpoint': 4.1.6 - '@smithy/middleware-retry': 4.1.7 - '@smithy/middleware-serde': 4.0.5 - '@smithy/middleware-stack': 4.0.2 - '@smithy/node-config-provider': 4.1.1 - '@smithy/node-http-handler': 4.0.4 - '@smithy/protocol-http': 5.1.0 - '@smithy/smithy-client': 4.2.6 - '@smithy/types': 4.2.0 - '@smithy/url-parser': 4.0.2 + '@aws-sdk/util-user-agent-node': 3.816.0 + '@smithy/config-resolver': 4.1.3 + '@smithy/core': 3.4.0 + '@smithy/eventstream-serde-browser': 4.0.3 + '@smithy/eventstream-serde-config-resolver': 4.1.1 + '@smithy/eventstream-serde-node': 4.0.3 + '@smithy/fetch-http-handler': 5.0.3 + '@smithy/hash-node': 4.0.3 + '@smithy/invalid-dependency': 4.0.3 + '@smithy/middleware-content-length': 4.0.3 + '@smithy/middleware-endpoint': 4.1.7 + '@smithy/middleware-retry': 4.1.8 + '@smithy/middleware-serde': 4.0.6 + '@smithy/middleware-stack': 4.0.3 + '@smithy/node-config-provider': 4.1.2 + '@smithy/node-http-handler': 4.0.5 + '@smithy/protocol-http': 5.1.1 + '@smithy/smithy-client': 4.3.0 + '@smithy/types': 4.3.0 + '@smithy/url-parser': 4.0.3 '@smithy/util-base64': 4.0.0 '@smithy/util-body-length-browser': 4.0.0 '@smithy/util-body-length-node': 4.0.0 - '@smithy/util-defaults-mode-browser': 4.0.14 - '@smithy/util-defaults-mode-node': 4.0.14 - '@smithy/util-endpoints': 3.0.4 - '@smithy/util-middleware': 4.0.2 - '@smithy/util-retry': 4.0.3 - '@smithy/util-stream': 4.2.0 + '@smithy/util-defaults-mode-browser': 4.0.15 + '@smithy/util-defaults-mode-node': 4.0.15 + '@smithy/util-endpoints': 3.0.5 + '@smithy/util-middleware': 4.0.3 + '@smithy/util-retry': 4.0.4 + '@smithy/util-stream': 4.2.1 '@smithy/util-utf8': 4.0.0 '@types/uuid': 9.0.8 tslib: 2.8.1 @@ -8800,226 +8828,226 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-cognito-identity@3.808.0': + '@aws-sdk/client-cognito-identity@3.817.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.808.0 - '@aws-sdk/credential-provider-node': 3.808.0 + '@aws-sdk/core': 3.816.0 + '@aws-sdk/credential-provider-node': 3.817.0 '@aws-sdk/middleware-host-header': 3.804.0 '@aws-sdk/middleware-logger': 3.804.0 '@aws-sdk/middleware-recursion-detection': 3.804.0 - '@aws-sdk/middleware-user-agent': 3.808.0 + '@aws-sdk/middleware-user-agent': 3.816.0 '@aws-sdk/region-config-resolver': 3.808.0 '@aws-sdk/types': 3.804.0 '@aws-sdk/util-endpoints': 3.808.0 '@aws-sdk/util-user-agent-browser': 3.804.0 - '@aws-sdk/util-user-agent-node': 3.808.0 - '@smithy/config-resolver': 4.1.2 - '@smithy/core': 3.3.3 - '@smithy/fetch-http-handler': 5.0.2 - '@smithy/hash-node': 4.0.2 - '@smithy/invalid-dependency': 4.0.2 - '@smithy/middleware-content-length': 4.0.2 - '@smithy/middleware-endpoint': 4.1.6 - '@smithy/middleware-retry': 4.1.7 - '@smithy/middleware-serde': 4.0.5 - '@smithy/middleware-stack': 4.0.2 - '@smithy/node-config-provider': 4.1.1 - '@smithy/node-http-handler': 4.0.4 - '@smithy/protocol-http': 5.1.0 - '@smithy/smithy-client': 4.2.6 - '@smithy/types': 4.2.0 - '@smithy/url-parser': 4.0.2 + '@aws-sdk/util-user-agent-node': 3.816.0 + '@smithy/config-resolver': 4.1.3 + '@smithy/core': 3.4.0 + '@smithy/fetch-http-handler': 5.0.3 + '@smithy/hash-node': 4.0.3 + '@smithy/invalid-dependency': 4.0.3 + '@smithy/middleware-content-length': 4.0.3 + '@smithy/middleware-endpoint': 4.1.7 + '@smithy/middleware-retry': 4.1.8 + '@smithy/middleware-serde': 4.0.6 + '@smithy/middleware-stack': 4.0.3 + '@smithy/node-config-provider': 4.1.2 + '@smithy/node-http-handler': 4.0.5 + '@smithy/protocol-http': 5.1.1 + '@smithy/smithy-client': 4.3.0 + '@smithy/types': 4.3.0 + '@smithy/url-parser': 4.0.3 '@smithy/util-base64': 4.0.0 '@smithy/util-body-length-browser': 4.0.0 '@smithy/util-body-length-node': 4.0.0 - '@smithy/util-defaults-mode-browser': 4.0.14 - '@smithy/util-defaults-mode-node': 4.0.14 - '@smithy/util-endpoints': 3.0.4 - '@smithy/util-middleware': 4.0.2 - '@smithy/util-retry': 4.0.3 + '@smithy/util-defaults-mode-browser': 4.0.15 + '@smithy/util-defaults-mode-node': 4.0.15 + '@smithy/util-endpoints': 3.0.5 + '@smithy/util-middleware': 4.0.3 + '@smithy/util-retry': 4.0.4 '@smithy/util-utf8': 4.0.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sso@3.808.0': + '@aws-sdk/client-sso@3.817.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.808.0 + '@aws-sdk/core': 3.816.0 '@aws-sdk/middleware-host-header': 3.804.0 '@aws-sdk/middleware-logger': 3.804.0 '@aws-sdk/middleware-recursion-detection': 3.804.0 - '@aws-sdk/middleware-user-agent': 3.808.0 + '@aws-sdk/middleware-user-agent': 3.816.0 '@aws-sdk/region-config-resolver': 3.808.0 '@aws-sdk/types': 3.804.0 '@aws-sdk/util-endpoints': 3.808.0 '@aws-sdk/util-user-agent-browser': 3.804.0 - '@aws-sdk/util-user-agent-node': 3.808.0 - '@smithy/config-resolver': 4.1.2 - '@smithy/core': 3.3.3 - '@smithy/fetch-http-handler': 5.0.2 - '@smithy/hash-node': 4.0.2 - '@smithy/invalid-dependency': 4.0.2 - '@smithy/middleware-content-length': 4.0.2 - '@smithy/middleware-endpoint': 4.1.6 - '@smithy/middleware-retry': 4.1.7 - '@smithy/middleware-serde': 4.0.5 - '@smithy/middleware-stack': 4.0.2 - '@smithy/node-config-provider': 4.1.1 - '@smithy/node-http-handler': 4.0.4 - '@smithy/protocol-http': 5.1.0 - '@smithy/smithy-client': 4.2.6 - '@smithy/types': 4.2.0 - '@smithy/url-parser': 4.0.2 + '@aws-sdk/util-user-agent-node': 3.816.0 + '@smithy/config-resolver': 4.1.3 + '@smithy/core': 3.4.0 + '@smithy/fetch-http-handler': 5.0.3 + '@smithy/hash-node': 4.0.3 + '@smithy/invalid-dependency': 4.0.3 + '@smithy/middleware-content-length': 4.0.3 + '@smithy/middleware-endpoint': 4.1.7 + '@smithy/middleware-retry': 4.1.8 + '@smithy/middleware-serde': 4.0.6 + '@smithy/middleware-stack': 4.0.3 + '@smithy/node-config-provider': 4.1.2 + '@smithy/node-http-handler': 4.0.5 + '@smithy/protocol-http': 5.1.1 + '@smithy/smithy-client': 4.3.0 + '@smithy/types': 4.3.0 + '@smithy/url-parser': 4.0.3 '@smithy/util-base64': 4.0.0 '@smithy/util-body-length-browser': 4.0.0 '@smithy/util-body-length-node': 4.0.0 - '@smithy/util-defaults-mode-browser': 4.0.14 - '@smithy/util-defaults-mode-node': 4.0.14 - '@smithy/util-endpoints': 3.0.4 - '@smithy/util-middleware': 4.0.2 - '@smithy/util-retry': 4.0.3 + '@smithy/util-defaults-mode-browser': 4.0.15 + '@smithy/util-defaults-mode-node': 4.0.15 + '@smithy/util-endpoints': 3.0.5 + '@smithy/util-middleware': 4.0.3 + '@smithy/util-retry': 4.0.4 '@smithy/util-utf8': 4.0.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/core@3.808.0': + '@aws-sdk/core@3.816.0': dependencies: '@aws-sdk/types': 3.804.0 - '@smithy/core': 3.3.3 - '@smithy/node-config-provider': 4.1.1 - '@smithy/property-provider': 4.0.2 - '@smithy/protocol-http': 5.1.0 - '@smithy/signature-v4': 5.1.0 - '@smithy/smithy-client': 4.2.6 - '@smithy/types': 4.2.0 - '@smithy/util-middleware': 4.0.2 + '@smithy/core': 3.4.0 + '@smithy/node-config-provider': 4.1.2 + '@smithy/property-provider': 4.0.3 + '@smithy/protocol-http': 5.1.1 + '@smithy/signature-v4': 5.1.1 + '@smithy/smithy-client': 4.3.0 + '@smithy/types': 4.3.0 + '@smithy/util-middleware': 4.0.3 fast-xml-parser: 4.4.1 tslib: 2.8.1 - '@aws-sdk/credential-provider-cognito-identity@3.808.0': + '@aws-sdk/credential-provider-cognito-identity@3.817.0': dependencies: - '@aws-sdk/client-cognito-identity': 3.808.0 + '@aws-sdk/client-cognito-identity': 3.817.0 '@aws-sdk/types': 3.804.0 - '@smithy/property-provider': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/property-provider': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/credential-provider-env@3.808.0': + '@aws-sdk/credential-provider-env@3.816.0': dependencies: - '@aws-sdk/core': 3.808.0 + '@aws-sdk/core': 3.816.0 '@aws-sdk/types': 3.804.0 - '@smithy/property-provider': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/property-provider': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 - '@aws-sdk/credential-provider-http@3.808.0': + '@aws-sdk/credential-provider-http@3.816.0': dependencies: - '@aws-sdk/core': 3.808.0 + '@aws-sdk/core': 3.816.0 '@aws-sdk/types': 3.804.0 - '@smithy/fetch-http-handler': 5.0.2 - '@smithy/node-http-handler': 4.0.4 - '@smithy/property-provider': 4.0.2 - '@smithy/protocol-http': 5.1.0 - '@smithy/smithy-client': 4.2.6 - '@smithy/types': 4.2.0 - '@smithy/util-stream': 4.2.0 + '@smithy/fetch-http-handler': 5.0.3 + '@smithy/node-http-handler': 4.0.5 + '@smithy/property-provider': 4.0.3 + '@smithy/protocol-http': 5.1.1 + '@smithy/smithy-client': 4.3.0 + '@smithy/types': 4.3.0 + '@smithy/util-stream': 4.2.1 tslib: 2.8.1 - '@aws-sdk/credential-provider-ini@3.808.0': + '@aws-sdk/credential-provider-ini@3.817.0': dependencies: - '@aws-sdk/core': 3.808.0 - '@aws-sdk/credential-provider-env': 3.808.0 - '@aws-sdk/credential-provider-http': 3.808.0 - '@aws-sdk/credential-provider-process': 3.808.0 - '@aws-sdk/credential-provider-sso': 3.808.0 - '@aws-sdk/credential-provider-web-identity': 3.808.0 - '@aws-sdk/nested-clients': 3.808.0 + '@aws-sdk/core': 3.816.0 + '@aws-sdk/credential-provider-env': 3.816.0 + '@aws-sdk/credential-provider-http': 3.816.0 + '@aws-sdk/credential-provider-process': 3.816.0 + '@aws-sdk/credential-provider-sso': 3.817.0 + '@aws-sdk/credential-provider-web-identity': 3.817.0 + '@aws-sdk/nested-clients': 3.817.0 '@aws-sdk/types': 3.804.0 - '@smithy/credential-provider-imds': 4.0.4 - '@smithy/property-provider': 4.0.2 - '@smithy/shared-ini-file-loader': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/credential-provider-imds': 4.0.5 + '@smithy/property-provider': 4.0.3 + '@smithy/shared-ini-file-loader': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/credential-provider-node@3.808.0': + '@aws-sdk/credential-provider-node@3.817.0': dependencies: - '@aws-sdk/credential-provider-env': 3.808.0 - '@aws-sdk/credential-provider-http': 3.808.0 - '@aws-sdk/credential-provider-ini': 3.808.0 - '@aws-sdk/credential-provider-process': 3.808.0 - '@aws-sdk/credential-provider-sso': 3.808.0 - '@aws-sdk/credential-provider-web-identity': 3.808.0 + '@aws-sdk/credential-provider-env': 3.816.0 + '@aws-sdk/credential-provider-http': 3.816.0 + '@aws-sdk/credential-provider-ini': 3.817.0 + '@aws-sdk/credential-provider-process': 3.816.0 + '@aws-sdk/credential-provider-sso': 3.817.0 + '@aws-sdk/credential-provider-web-identity': 3.817.0 '@aws-sdk/types': 3.804.0 - '@smithy/credential-provider-imds': 4.0.4 - '@smithy/property-provider': 4.0.2 - '@smithy/shared-ini-file-loader': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/credential-provider-imds': 4.0.5 + '@smithy/property-provider': 4.0.3 + '@smithy/shared-ini-file-loader': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/credential-provider-process@3.808.0': + '@aws-sdk/credential-provider-process@3.816.0': dependencies: - '@aws-sdk/core': 3.808.0 + '@aws-sdk/core': 3.816.0 '@aws-sdk/types': 3.804.0 - '@smithy/property-provider': 4.0.2 - '@smithy/shared-ini-file-loader': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/property-provider': 4.0.3 + '@smithy/shared-ini-file-loader': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 - '@aws-sdk/credential-provider-sso@3.808.0': + '@aws-sdk/credential-provider-sso@3.817.0': dependencies: - '@aws-sdk/client-sso': 3.808.0 - '@aws-sdk/core': 3.808.0 - '@aws-sdk/token-providers': 3.808.0 + '@aws-sdk/client-sso': 3.817.0 + '@aws-sdk/core': 3.816.0 + '@aws-sdk/token-providers': 3.817.0 '@aws-sdk/types': 3.804.0 - '@smithy/property-provider': 4.0.2 - '@smithy/shared-ini-file-loader': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/property-provider': 4.0.3 + '@smithy/shared-ini-file-loader': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/credential-provider-web-identity@3.808.0': + '@aws-sdk/credential-provider-web-identity@3.817.0': dependencies: - '@aws-sdk/core': 3.808.0 - '@aws-sdk/nested-clients': 3.808.0 + '@aws-sdk/core': 3.816.0 + '@aws-sdk/nested-clients': 3.817.0 '@aws-sdk/types': 3.804.0 - '@smithy/property-provider': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/property-provider': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/credential-providers@3.808.0': - dependencies: - '@aws-sdk/client-cognito-identity': 3.808.0 - '@aws-sdk/core': 3.808.0 - '@aws-sdk/credential-provider-cognito-identity': 3.808.0 - '@aws-sdk/credential-provider-env': 3.808.0 - '@aws-sdk/credential-provider-http': 3.808.0 - '@aws-sdk/credential-provider-ini': 3.808.0 - '@aws-sdk/credential-provider-node': 3.808.0 - '@aws-sdk/credential-provider-process': 3.808.0 - '@aws-sdk/credential-provider-sso': 3.808.0 - '@aws-sdk/credential-provider-web-identity': 3.808.0 - '@aws-sdk/nested-clients': 3.808.0 + '@aws-sdk/credential-providers@3.817.0': + dependencies: + '@aws-sdk/client-cognito-identity': 3.817.0 + '@aws-sdk/core': 3.816.0 + '@aws-sdk/credential-provider-cognito-identity': 3.817.0 + '@aws-sdk/credential-provider-env': 3.816.0 + '@aws-sdk/credential-provider-http': 3.816.0 + '@aws-sdk/credential-provider-ini': 3.817.0 + '@aws-sdk/credential-provider-node': 3.817.0 + '@aws-sdk/credential-provider-process': 3.816.0 + '@aws-sdk/credential-provider-sso': 3.817.0 + '@aws-sdk/credential-provider-web-identity': 3.817.0 + '@aws-sdk/nested-clients': 3.817.0 '@aws-sdk/types': 3.804.0 - '@smithy/config-resolver': 4.1.2 - '@smithy/core': 3.3.3 - '@smithy/credential-provider-imds': 4.0.4 - '@smithy/node-config-provider': 4.1.1 - '@smithy/property-provider': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/config-resolver': 4.1.3 + '@smithy/core': 3.4.0 + '@smithy/credential-provider-imds': 4.0.5 + '@smithy/node-config-provider': 4.1.2 + '@smithy/property-provider': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt @@ -9027,85 +9055,85 @@ snapshots: '@aws-sdk/eventstream-handler-node@3.804.0': dependencies: '@aws-sdk/types': 3.804.0 - '@smithy/eventstream-codec': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/eventstream-codec': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@aws-sdk/middleware-eventstream@3.804.0': dependencies: '@aws-sdk/types': 3.804.0 - '@smithy/protocol-http': 5.1.0 - '@smithy/types': 4.2.0 + '@smithy/protocol-http': 5.1.1 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@aws-sdk/middleware-host-header@3.804.0': dependencies: '@aws-sdk/types': 3.804.0 - '@smithy/protocol-http': 5.1.0 - '@smithy/types': 4.2.0 + '@smithy/protocol-http': 5.1.1 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@aws-sdk/middleware-logger@3.804.0': dependencies: '@aws-sdk/types': 3.804.0 - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@aws-sdk/middleware-recursion-detection@3.804.0': dependencies: '@aws-sdk/types': 3.804.0 - '@smithy/protocol-http': 5.1.0 - '@smithy/types': 4.2.0 + '@smithy/protocol-http': 5.1.1 + '@smithy/types': 4.3.0 tslib: 2.8.1 - '@aws-sdk/middleware-user-agent@3.808.0': + '@aws-sdk/middleware-user-agent@3.816.0': dependencies: - '@aws-sdk/core': 3.808.0 + '@aws-sdk/core': 3.816.0 '@aws-sdk/types': 3.804.0 '@aws-sdk/util-endpoints': 3.808.0 - '@smithy/core': 3.3.3 - '@smithy/protocol-http': 5.1.0 - '@smithy/types': 4.2.0 + '@smithy/core': 3.4.0 + '@smithy/protocol-http': 5.1.1 + '@smithy/types': 4.3.0 tslib: 2.8.1 - '@aws-sdk/nested-clients@3.808.0': + '@aws-sdk/nested-clients@3.817.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.808.0 + '@aws-sdk/core': 3.816.0 '@aws-sdk/middleware-host-header': 3.804.0 '@aws-sdk/middleware-logger': 3.804.0 '@aws-sdk/middleware-recursion-detection': 3.804.0 - '@aws-sdk/middleware-user-agent': 3.808.0 + '@aws-sdk/middleware-user-agent': 3.816.0 '@aws-sdk/region-config-resolver': 3.808.0 '@aws-sdk/types': 3.804.0 '@aws-sdk/util-endpoints': 3.808.0 '@aws-sdk/util-user-agent-browser': 3.804.0 - '@aws-sdk/util-user-agent-node': 3.808.0 - '@smithy/config-resolver': 4.1.2 - '@smithy/core': 3.3.3 - '@smithy/fetch-http-handler': 5.0.2 - '@smithy/hash-node': 4.0.2 - '@smithy/invalid-dependency': 4.0.2 - '@smithy/middleware-content-length': 4.0.2 - '@smithy/middleware-endpoint': 4.1.6 - '@smithy/middleware-retry': 4.1.7 - '@smithy/middleware-serde': 4.0.5 - '@smithy/middleware-stack': 4.0.2 - '@smithy/node-config-provider': 4.1.1 - '@smithy/node-http-handler': 4.0.4 - '@smithy/protocol-http': 5.1.0 - '@smithy/smithy-client': 4.2.6 - '@smithy/types': 4.2.0 - '@smithy/url-parser': 4.0.2 + '@aws-sdk/util-user-agent-node': 3.816.0 + '@smithy/config-resolver': 4.1.3 + '@smithy/core': 3.4.0 + '@smithy/fetch-http-handler': 5.0.3 + '@smithy/hash-node': 4.0.3 + '@smithy/invalid-dependency': 4.0.3 + '@smithy/middleware-content-length': 4.0.3 + '@smithy/middleware-endpoint': 4.1.7 + '@smithy/middleware-retry': 4.1.8 + '@smithy/middleware-serde': 4.0.6 + '@smithy/middleware-stack': 4.0.3 + '@smithy/node-config-provider': 4.1.2 + '@smithy/node-http-handler': 4.0.5 + '@smithy/protocol-http': 5.1.1 + '@smithy/smithy-client': 4.3.0 + '@smithy/types': 4.3.0 + '@smithy/url-parser': 4.0.3 '@smithy/util-base64': 4.0.0 '@smithy/util-body-length-browser': 4.0.0 '@smithy/util-body-length-node': 4.0.0 - '@smithy/util-defaults-mode-browser': 4.0.14 - '@smithy/util-defaults-mode-node': 4.0.14 - '@smithy/util-endpoints': 3.0.4 - '@smithy/util-middleware': 4.0.2 - '@smithy/util-retry': 4.0.3 + '@smithy/util-defaults-mode-browser': 4.0.15 + '@smithy/util-defaults-mode-node': 4.0.15 + '@smithy/util-endpoints': 3.0.5 + '@smithy/util-middleware': 4.0.3 + '@smithy/util-retry': 4.0.4 '@smithy/util-utf8': 4.0.0 tslib: 2.8.1 transitivePeerDependencies: @@ -9114,33 +9142,34 @@ snapshots: '@aws-sdk/region-config-resolver@3.808.0': dependencies: '@aws-sdk/types': 3.804.0 - '@smithy/node-config-provider': 4.1.1 - '@smithy/types': 4.2.0 + '@smithy/node-config-provider': 4.1.2 + '@smithy/types': 4.3.0 '@smithy/util-config-provider': 4.0.0 - '@smithy/util-middleware': 4.0.2 + '@smithy/util-middleware': 4.0.3 tslib: 2.8.1 - '@aws-sdk/token-providers@3.808.0': + '@aws-sdk/token-providers@3.817.0': dependencies: - '@aws-sdk/nested-clients': 3.808.0 + '@aws-sdk/core': 3.816.0 + '@aws-sdk/nested-clients': 3.817.0 '@aws-sdk/types': 3.804.0 - '@smithy/property-provider': 4.0.2 - '@smithy/shared-ini-file-loader': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/property-provider': 4.0.3 + '@smithy/shared-ini-file-loader': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt '@aws-sdk/types@3.804.0': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@aws-sdk/util-endpoints@3.808.0': dependencies: '@aws-sdk/types': 3.804.0 - '@smithy/types': 4.2.0 - '@smithy/util-endpoints': 3.0.4 + '@smithy/types': 4.3.0 + '@smithy/util-endpoints': 3.0.5 tslib: 2.8.1 '@aws-sdk/util-locate-window@3.804.0': @@ -9150,16 +9179,16 @@ snapshots: '@aws-sdk/util-user-agent-browser@3.804.0': dependencies: '@aws-sdk/types': 3.804.0 - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 bowser: 2.11.0 tslib: 2.8.1 - '@aws-sdk/util-user-agent-node@3.808.0': + '@aws-sdk/util-user-agent-node@3.816.0': dependencies: - '@aws-sdk/middleware-user-agent': 3.808.0 + '@aws-sdk/middleware-user-agent': 3.816.0 '@aws-sdk/types': 3.804.0 - '@smithy/node-config-provider': 4.1.1 - '@smithy/types': 4.2.0 + '@smithy/node-config-provider': 4.1.2 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@aws-sdk/util-utf8-browser@3.259.0': @@ -10079,15 +10108,16 @@ snapshots: dependencies: exenv-es6: 1.1.1 - '@mistralai/mistralai@1.6.0(zod@3.24.4)': + '@mistralai/mistralai@1.6.1(zod@3.24.4)': dependencies: zod: 3.24.4 zod-to-json-schema: 3.24.5(zod@3.24.4) '@mixmark-io/domino@2.2.0': {} - '@modelcontextprotocol/sdk@1.11.2': + '@modelcontextprotocol/sdk@1.12.0': dependencies: + ajv: 6.12.6 content-type: 1.0.5 cors: 2.8.5 cross-spawn: 7.0.6 @@ -10146,14 +10176,14 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@puppeteer/browsers@2.10.4': + '@puppeteer/browsers@2.10.5': dependencies: debug: 4.4.1(supports-color@8.1.1) extract-zip: 2.0.1 progress: 2.0.3 proxy-agent: 6.5.0 semver: 7.7.2 - tar-fs: 3.0.8 + tar-fs: 3.0.9 yargs: 17.7.2 transitivePeerDependencies: - bare-buffer @@ -10166,7 +10196,7 @@ snapshots: progress: 2.0.3 proxy-agent: 6.5.0 semver: 7.7.2 - tar-fs: 3.0.8 + tar-fs: 3.0.9 unbzip2-stream: 1.4.3 yargs: 17.7.2 transitivePeerDependencies: @@ -10689,10 +10719,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.40.2': optional: true - '@roo-code/types@1.12.0': - dependencies: - zod: 3.24.4 - '@sec-ant/readable-stream@0.4.1': {} '@sevinf/maybe@0.5.0': {} @@ -10747,36 +10773,36 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/abort-controller@4.0.2': + '@smithy/abort-controller@4.0.3': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 - '@smithy/config-resolver@4.1.2': + '@smithy/config-resolver@4.1.3': dependencies: - '@smithy/node-config-provider': 4.1.1 - '@smithy/types': 4.2.0 + '@smithy/node-config-provider': 4.1.2 + '@smithy/types': 4.3.0 '@smithy/util-config-provider': 4.0.0 - '@smithy/util-middleware': 4.0.2 + '@smithy/util-middleware': 4.0.3 tslib: 2.8.1 - '@smithy/core@3.3.3': + '@smithy/core@3.4.0': dependencies: - '@smithy/middleware-serde': 4.0.5 - '@smithy/protocol-http': 5.1.0 - '@smithy/types': 4.2.0 + '@smithy/middleware-serde': 4.0.6 + '@smithy/protocol-http': 5.1.1 + '@smithy/types': 4.3.0 '@smithy/util-body-length-browser': 4.0.0 - '@smithy/util-middleware': 4.0.2 - '@smithy/util-stream': 4.2.0 + '@smithy/util-middleware': 4.0.3 + '@smithy/util-stream': 4.2.1 '@smithy/util-utf8': 4.0.0 tslib: 2.8.1 - '@smithy/credential-provider-imds@4.0.4': + '@smithy/credential-provider-imds@4.0.5': dependencies: - '@smithy/node-config-provider': 4.1.1 - '@smithy/property-provider': 4.0.2 - '@smithy/types': 4.2.0 - '@smithy/url-parser': 4.0.2 + '@smithy/node-config-provider': 4.1.2 + '@smithy/property-provider': 4.0.3 + '@smithy/types': 4.3.0 + '@smithy/url-parser': 4.0.3 tslib: 2.8.1 '@smithy/eventstream-codec@2.2.0': @@ -10786,22 +10812,22 @@ snapshots: '@smithy/util-hex-encoding': 2.2.0 tslib: 2.8.1 - '@smithy/eventstream-codec@4.0.2': + '@smithy/eventstream-codec@4.0.3': dependencies: '@aws-crypto/crc32': 5.2.0 - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 '@smithy/util-hex-encoding': 4.0.0 tslib: 2.8.1 - '@smithy/eventstream-serde-browser@4.0.2': + '@smithy/eventstream-serde-browser@4.0.3': dependencies: - '@smithy/eventstream-serde-universal': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/eventstream-serde-universal': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 - '@smithy/eventstream-serde-config-resolver@4.1.0': + '@smithy/eventstream-serde-config-resolver@4.1.1': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/eventstream-serde-node@2.2.0': @@ -10810,10 +10836,10 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/eventstream-serde-node@4.0.2': + '@smithy/eventstream-serde-node@4.0.3': dependencies: - '@smithy/eventstream-serde-universal': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/eventstream-serde-universal': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/eventstream-serde-universal@2.2.0': @@ -10822,10 +10848,10 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/eventstream-serde-universal@4.0.2': + '@smithy/eventstream-serde-universal@4.0.3': dependencies: - '@smithy/eventstream-codec': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/eventstream-codec': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/fetch-http-handler@2.5.0': @@ -10836,24 +10862,24 @@ snapshots: '@smithy/util-base64': 2.3.0 tslib: 2.8.1 - '@smithy/fetch-http-handler@5.0.2': + '@smithy/fetch-http-handler@5.0.3': dependencies: - '@smithy/protocol-http': 5.1.0 - '@smithy/querystring-builder': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/protocol-http': 5.1.1 + '@smithy/querystring-builder': 4.0.3 + '@smithy/types': 4.3.0 '@smithy/util-base64': 4.0.0 tslib: 2.8.1 - '@smithy/hash-node@4.0.2': + '@smithy/hash-node@4.0.3': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 '@smithy/util-buffer-from': 4.0.0 '@smithy/util-utf8': 4.0.0 tslib: 2.8.1 - '@smithy/invalid-dependency@4.0.2': + '@smithy/invalid-dependency@4.0.3': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/is-array-buffer@2.2.0': @@ -10868,10 +10894,10 @@ snapshots: dependencies: tslib: 2.8.1 - '@smithy/middleware-content-length@4.0.2': + '@smithy/middleware-content-length@4.0.3': dependencies: - '@smithy/protocol-http': 5.1.0 - '@smithy/types': 4.2.0 + '@smithy/protocol-http': 5.1.1 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/middleware-endpoint@2.5.1': @@ -10884,26 +10910,26 @@ snapshots: '@smithy/util-middleware': 2.2.0 tslib: 2.8.1 - '@smithy/middleware-endpoint@4.1.6': + '@smithy/middleware-endpoint@4.1.7': dependencies: - '@smithy/core': 3.3.3 - '@smithy/middleware-serde': 4.0.5 - '@smithy/node-config-provider': 4.1.1 - '@smithy/shared-ini-file-loader': 4.0.2 - '@smithy/types': 4.2.0 - '@smithy/url-parser': 4.0.2 - '@smithy/util-middleware': 4.0.2 + '@smithy/core': 3.4.0 + '@smithy/middleware-serde': 4.0.6 + '@smithy/node-config-provider': 4.1.2 + '@smithy/shared-ini-file-loader': 4.0.3 + '@smithy/types': 4.3.0 + '@smithy/url-parser': 4.0.3 + '@smithy/util-middleware': 4.0.3 tslib: 2.8.1 - '@smithy/middleware-retry@4.1.7': + '@smithy/middleware-retry@4.1.8': dependencies: - '@smithy/node-config-provider': 4.1.1 - '@smithy/protocol-http': 5.1.0 - '@smithy/service-error-classification': 4.0.3 - '@smithy/smithy-client': 4.2.6 - '@smithy/types': 4.2.0 - '@smithy/util-middleware': 4.0.2 - '@smithy/util-retry': 4.0.3 + '@smithy/node-config-provider': 4.1.2 + '@smithy/protocol-http': 5.1.1 + '@smithy/service-error-classification': 4.0.4 + '@smithy/smithy-client': 4.3.0 + '@smithy/types': 4.3.0 + '@smithy/util-middleware': 4.0.3 + '@smithy/util-retry': 4.0.4 tslib: 2.8.1 uuid: 9.0.1 @@ -10912,10 +10938,10 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/middleware-serde@4.0.5': + '@smithy/middleware-serde@4.0.6': dependencies: - '@smithy/protocol-http': 5.1.0 - '@smithy/types': 4.2.0 + '@smithy/protocol-http': 5.1.1 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/middleware-stack@2.2.0': @@ -10923,9 +10949,9 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/middleware-stack@4.0.2': + '@smithy/middleware-stack@4.0.3': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/node-config-provider@2.3.0': @@ -10935,11 +10961,11 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/node-config-provider@4.1.1': + '@smithy/node-config-provider@4.1.2': dependencies: - '@smithy/property-provider': 4.0.2 - '@smithy/shared-ini-file-loader': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/property-provider': 4.0.3 + '@smithy/shared-ini-file-loader': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/node-http-handler@2.5.0': @@ -10950,12 +10976,12 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/node-http-handler@4.0.4': + '@smithy/node-http-handler@4.0.5': dependencies: - '@smithy/abort-controller': 4.0.2 - '@smithy/protocol-http': 5.1.0 - '@smithy/querystring-builder': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/abort-controller': 4.0.3 + '@smithy/protocol-http': 5.1.1 + '@smithy/querystring-builder': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/property-provider@2.2.0': @@ -10963,9 +10989,9 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/property-provider@4.0.2': + '@smithy/property-provider@4.0.3': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/protocol-http@3.3.0': @@ -10973,9 +10999,9 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/protocol-http@5.1.0': + '@smithy/protocol-http@5.1.1': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/querystring-builder@2.2.0': @@ -10984,9 +11010,9 @@ snapshots: '@smithy/util-uri-escape': 2.2.0 tslib: 2.8.1 - '@smithy/querystring-builder@4.0.2': + '@smithy/querystring-builder@4.0.3': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 '@smithy/util-uri-escape': 4.0.0 tslib: 2.8.1 @@ -10995,23 +11021,23 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/querystring-parser@4.0.2': + '@smithy/querystring-parser@4.0.3': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 - '@smithy/service-error-classification@4.0.3': + '@smithy/service-error-classification@4.0.4': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 '@smithy/shared-ini-file-loader@2.4.0': dependencies: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/shared-ini-file-loader@4.0.2': + '@smithy/shared-ini-file-loader@4.0.3': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/signature-v4@3.1.2': @@ -11024,13 +11050,13 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.8.1 - '@smithy/signature-v4@5.1.0': + '@smithy/signature-v4@5.1.1': dependencies: '@smithy/is-array-buffer': 4.0.0 - '@smithy/protocol-http': 5.1.0 - '@smithy/types': 4.2.0 + '@smithy/protocol-http': 5.1.1 + '@smithy/types': 4.3.0 '@smithy/util-hex-encoding': 4.0.0 - '@smithy/util-middleware': 4.0.2 + '@smithy/util-middleware': 4.0.3 '@smithy/util-uri-escape': 4.0.0 '@smithy/util-utf8': 4.0.0 tslib: 2.8.1 @@ -11044,14 +11070,14 @@ snapshots: '@smithy/util-stream': 2.2.0 tslib: 2.8.1 - '@smithy/smithy-client@4.2.6': + '@smithy/smithy-client@4.3.0': dependencies: - '@smithy/core': 3.3.3 - '@smithy/middleware-endpoint': 4.1.6 - '@smithy/middleware-stack': 4.0.2 - '@smithy/protocol-http': 5.1.0 - '@smithy/types': 4.2.0 - '@smithy/util-stream': 4.2.0 + '@smithy/core': 3.4.0 + '@smithy/middleware-endpoint': 4.1.7 + '@smithy/middleware-stack': 4.0.3 + '@smithy/protocol-http': 5.1.1 + '@smithy/types': 4.3.0 + '@smithy/util-stream': 4.2.1 tslib: 2.8.1 '@smithy/types@2.12.0': @@ -11062,7 +11088,7 @@ snapshots: dependencies: tslib: 2.8.1 - '@smithy/types@4.2.0': + '@smithy/types@4.3.0': dependencies: tslib: 2.8.1 @@ -11072,10 +11098,10 @@ snapshots: '@smithy/types': 2.12.0 tslib: 2.8.1 - '@smithy/url-parser@4.0.2': + '@smithy/url-parser@4.0.3': dependencies: - '@smithy/querystring-parser': 4.0.2 - '@smithy/types': 4.2.0 + '@smithy/querystring-parser': 4.0.3 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/util-base64@2.3.0': @@ -11117,28 +11143,28 @@ snapshots: dependencies: tslib: 2.8.1 - '@smithy/util-defaults-mode-browser@4.0.14': + '@smithy/util-defaults-mode-browser@4.0.15': dependencies: - '@smithy/property-provider': 4.0.2 - '@smithy/smithy-client': 4.2.6 - '@smithy/types': 4.2.0 + '@smithy/property-provider': 4.0.3 + '@smithy/smithy-client': 4.3.0 + '@smithy/types': 4.3.0 bowser: 2.11.0 tslib: 2.8.1 - '@smithy/util-defaults-mode-node@4.0.14': + '@smithy/util-defaults-mode-node@4.0.15': dependencies: - '@smithy/config-resolver': 4.1.2 - '@smithy/credential-provider-imds': 4.0.4 - '@smithy/node-config-provider': 4.1.1 - '@smithy/property-provider': 4.0.2 - '@smithy/smithy-client': 4.2.6 - '@smithy/types': 4.2.0 + '@smithy/config-resolver': 4.1.3 + '@smithy/credential-provider-imds': 4.0.5 + '@smithy/node-config-provider': 4.1.2 + '@smithy/property-provider': 4.0.3 + '@smithy/smithy-client': 4.3.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 - '@smithy/util-endpoints@3.0.4': + '@smithy/util-endpoints@3.0.5': dependencies: - '@smithy/node-config-provider': 4.1.1 - '@smithy/types': 4.2.0 + '@smithy/node-config-provider': 4.1.2 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/util-hex-encoding@2.2.0': @@ -11163,15 +11189,15 @@ snapshots: '@smithy/types': 3.7.2 tslib: 2.8.1 - '@smithy/util-middleware@4.0.2': + '@smithy/util-middleware@4.0.3': dependencies: - '@smithy/types': 4.2.0 + '@smithy/types': 4.3.0 tslib: 2.8.1 - '@smithy/util-retry@4.0.3': + '@smithy/util-retry@4.0.4': dependencies: - '@smithy/service-error-classification': 4.0.3 - '@smithy/types': 4.2.0 + '@smithy/service-error-classification': 4.0.4 + '@smithy/types': 4.3.0 tslib: 2.8.1 '@smithy/util-stream@2.2.0': @@ -11185,11 +11211,11 @@ snapshots: '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 - '@smithy/util-stream@4.2.0': + '@smithy/util-stream@4.2.1': dependencies: - '@smithy/fetch-http-handler': 5.0.2 - '@smithy/node-http-handler': 4.0.4 - '@smithy/types': 4.2.0 + '@smithy/fetch-http-handler': 5.0.3 + '@smithy/node-http-handler': 4.0.5 + '@smithy/types': 4.3.0 '@smithy/util-base64': 4.0.0 '@smithy/util-buffer-from': 4.0.0 '@smithy/util-hex-encoding': 4.0.0 @@ -11772,7 +11798,7 @@ snapshots: dependencies: undici-types: 5.26.5 - '@types/node@20.17.47': + '@types/node@20.17.50': dependencies: undici-types: 6.19.8 @@ -11945,13 +11971,13 @@ snapshots: chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.1.3(vite@6.3.5(@types/node@20.17.47)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0))': + '@vitest/mocker@3.1.3(vite@6.3.5(@types/node@20.17.50)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0))': dependencies: '@vitest/spy': 3.1.3 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.3.5(@types/node@20.17.47)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) + vite: 6.3.5(@types/node@20.17.50)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) '@vitest/mocker@3.1.3(vite@6.3.5(@types/node@22.15.20)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0))': dependencies: @@ -12805,13 +12831,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0): + create-jest@29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0) + jest-config: 29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -13609,11 +13635,11 @@ snapshots: eventemitter3@5.0.1: {} - eventsource-parser@3.0.1: {} + eventsource-parser@3.0.2: {} eventsource@3.0.7: dependencies: - eventsource-parser: 3.0.1 + eventsource-parser: 3.0.2 execa@5.1.1: dependencies: @@ -13826,6 +13852,12 @@ snapshots: locate-path: 6.0.0 path-exists: 4.0.0 + fix-dts-default-cjs-exports@1.0.1: + dependencies: + magic-string: 0.30.17 + mlly: 1.7.4 + rollup: 4.40.2 + flat-cache@4.0.1: dependencies: flatted: 3.3.3 @@ -14683,16 +14715,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0): + jest-cli@29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0): dependencies: '@jest/core': 29.7.0(babel-plugin-macros@3.1.0) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0) + create-jest: 29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0) + jest-config: 29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -14732,7 +14764,7 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0): + jest-config@29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0): dependencies: '@babel/core': 7.27.1 '@jest/test-sequencer': 29.7.0 @@ -14757,7 +14789,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 20.17.47 + '@types/node': 20.17.50 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -15052,12 +15084,12 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0): + jest@29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0): dependencies: '@jest/core': 29.7.0(babel-plugin-macros@3.1.0) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0) + jest-cli: 29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -16124,7 +16156,7 @@ snapshots: npm-normalize-package-bin@4.0.0: {} - npm-run-all2@8.0.1: + npm-run-all2@8.0.3: dependencies: ansi-styles: 6.2.1 cross-spawn: 7.0.6 @@ -16239,7 +16271,7 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - openai@4.98.0(ws@8.18.2)(zod@3.24.4): + openai@4.103.0(ws@8.18.2)(zod@3.24.4): dependencies: '@types/node': 18.19.100 '@types/node-fetch': 2.6.12 @@ -16277,10 +16309,10 @@ snapshots: string-width: 7.2.0 strip-ansi: 7.1.0 - os-name@6.0.0: + os-name@6.1.0: dependencies: macos-release: 3.3.0 - windows-release: 6.0.1 + windows-release: 6.1.0 os-tmpdir@1.0.2: {} @@ -16539,7 +16571,7 @@ snapshots: preact: 10.26.6 web-vitals: 4.2.4 - posthog-node@4.17.1: + posthog-node@4.17.2: dependencies: axios: 1.9.0 transitivePeerDependencies: @@ -16651,7 +16683,7 @@ snapshots: puppeteer-chromium-resolver@23.0.0: dependencies: - '@puppeteer/browsers': 2.10.4 + '@puppeteer/browsers': 2.10.5 eight-colors: 1.3.1 gauge: 5.0.2 puppeteer-core: 23.11.1 @@ -17630,7 +17662,7 @@ snapshots: tar-stream: 2.2.0 optional: true - tar-fs@3.0.8: + tar-fs@3.0.9: dependencies: pump: 3.0.2 tar-stream: 3.1.7 @@ -17792,12 +17824,12 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.27.1) esbuild: 0.25.4 - ts-jest@29.3.3(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(esbuild@0.25.4)(jest@29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0))(typescript@5.8.3): + ts-jest@29.3.3(@babel/core@7.27.1)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.27.1))(esbuild@0.25.4)(jest@29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0))(typescript@5.8.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.17.47)(babel-plugin-macros@3.1.0) + jest: 29.7.0(@types/node@20.17.50)(babel-plugin-macros@3.1.0) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -17825,7 +17857,7 @@ snapshots: tslib@2.8.1: {} - tsup@8.4.0(jiti@2.4.2)(postcss@8.5.3)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.8.0): + tsup@8.5.0(jiti@2.4.2)(postcss@8.5.3)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.8.0): dependencies: bundle-require: 5.1.0(esbuild@0.25.4) cac: 6.7.14 @@ -17833,6 +17865,7 @@ snapshots: consola: 3.4.2 debug: 4.4.1(supports-color@8.1.1) esbuild: 0.25.4 + fix-dts-default-cjs-exports: 1.0.1 joycon: 3.1.1 picocolors: 1.1.1 postcss-load-config: 6.0.1(jiti@2.4.2)(postcss@8.5.3)(tsx@4.19.4)(yaml@2.8.0) @@ -18198,13 +18231,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@3.1.3(@types/node@20.17.47)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0): + vite-node@3.1.3(@types/node@20.17.50)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0): dependencies: cac: 6.7.14 debug: 4.4.1(supports-color@8.1.1) es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 6.3.5(@types/node@20.17.47)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) + vite: 6.3.5(@types/node@20.17.50)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) transitivePeerDependencies: - '@types/node' - jiti @@ -18256,7 +18289,7 @@ snapshots: tsx: 4.19.4 yaml: 2.8.0 - vite@6.3.5(@types/node@20.17.47)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0): + vite@6.3.5(@types/node@20.17.50)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0): dependencies: esbuild: 0.25.4 fdir: 6.4.4(picomatch@4.0.2) @@ -18265,7 +18298,7 @@ snapshots: rollup: 4.40.2 tinyglobby: 0.2.13 optionalDependencies: - '@types/node': 20.17.47 + '@types/node': 20.17.50 fsevents: 2.3.3 jiti: 2.4.2 lightningcss: 1.29.2 @@ -18288,10 +18321,10 @@ snapshots: tsx: 4.19.4 yaml: 2.8.0 - vitest@3.1.3(@types/debug@4.1.12)(@types/node@20.17.47)(jiti@2.4.2)(jsdom@20.0.3)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0): + vitest@3.1.3(@types/debug@4.1.12)(@types/node@20.17.50)(jiti@2.4.2)(jsdom@20.0.3)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0): dependencies: '@vitest/expect': 3.1.3 - '@vitest/mocker': 3.1.3(vite@6.3.5(@types/node@20.17.47)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0)) + '@vitest/mocker': 3.1.3(vite@6.3.5(@types/node@20.17.50)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0)) '@vitest/pretty-format': 3.1.3 '@vitest/runner': 3.1.3 '@vitest/snapshot': 3.1.3 @@ -18308,12 +18341,12 @@ snapshots: tinyglobby: 0.2.13 tinypool: 1.0.2 tinyrainbow: 2.0.0 - vite: 6.3.5(@types/node@20.17.47)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) - vite-node: 3.1.3(@types/node@20.17.47)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) + vite: 6.3.5(@types/node@20.17.50)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) + vite-node: 3.1.3(@types/node@20.17.50)(jiti@2.4.2)(lightningcss@1.29.2)(tsx@4.19.4)(yaml@2.8.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/debug': 4.1.12 - '@types/node': 20.17.47 + '@types/node': 20.17.50 jsdom: 20.0.3 transitivePeerDependencies: - jiti @@ -18514,7 +18547,7 @@ snapshots: dependencies: string-width: 4.2.3 - windows-release@6.0.1: + windows-release@6.1.0: dependencies: execa: 8.0.1 diff --git a/src/activate/CodeActionProvider.ts b/src/activate/CodeActionProvider.ts index 37b1a82712..2646552452 100644 --- a/src/activate/CodeActionProvider.ts +++ b/src/activate/CodeActionProvider.ts @@ -1,6 +1,7 @@ import * as vscode from "vscode" -import { CodeActionName, CodeActionId } from "../schemas" +import { CodeActionName, CodeActionId } from "@roo-code/types" + import { getCodeActionCommand } from "../utils/commands" import { EditorUtils } from "../integrations/editor/EditorUtils" diff --git a/src/activate/handleTask.ts b/src/activate/handleTask.ts index 208b7bf427..bc2aed4beb 100644 --- a/src/activate/handleTask.ts +++ b/src/activate/handleTask.ts @@ -1,6 +1,6 @@ import * as vscode from "vscode" -import { Package } from "../schemas" +import { Package } from "../shared/package" import { ClineProvider } from "../core/webview/ClineProvider" import { t } from "../i18n" diff --git a/src/activate/registerCodeActions.ts b/src/activate/registerCodeActions.ts index ba8be1a471..6c0a65b9e0 100644 --- a/src/activate/registerCodeActions.ts +++ b/src/activate/registerCodeActions.ts @@ -1,6 +1,7 @@ import * as vscode from "vscode" -import { CodeActionId, CodeActionName } from "../schemas" +import { CodeActionId, CodeActionName } from "@roo-code/types" + import { getCodeActionCommand } from "../utils/commands" import { EditorUtils } from "../integrations/editor/EditorUtils" import { ClineProvider } from "../core/webview/ClineProvider" diff --git a/src/activate/registerCommands.ts b/src/activate/registerCommands.ts index fc18e96d54..cd76b11f96 100644 --- a/src/activate/registerCommands.ts +++ b/src/activate/registerCommands.ts @@ -1,7 +1,9 @@ import * as vscode from "vscode" import delay from "delay" -import { CommandId, Package } from "../schemas" +import type { CommandId } from "@roo-code/types" + +import { Package } from "../shared/package" import { getCommand } from "../utils/commands" import { ClineProvider } from "../core/webview/ClineProvider" import { ContextProxy } from "../core/config/ContextProxy" diff --git a/src/activate/registerTerminalActions.ts b/src/activate/registerTerminalActions.ts index f2dc8b4709..eb494d66da 100644 --- a/src/activate/registerTerminalActions.ts +++ b/src/activate/registerTerminalActions.ts @@ -1,6 +1,7 @@ import * as vscode from "vscode" -import { TerminalActionId, TerminalActionPromptType } from "../schemas" +import { TerminalActionId, TerminalActionPromptType } from "@roo-code/types" + import { getTerminalCommand } from "../utils/commands" import { ClineProvider } from "../core/webview/ClineProvider" import { Terminal } from "../integrations/terminal/Terminal" diff --git a/src/api/index.ts b/src/api/index.ts index f831e58e8d..8b09bf4cf9 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,29 +1,33 @@ import { Anthropic } from "@anthropic-ai/sdk" -import { ProviderSettings, ModelInfo } from "../shared/api" -import { GlamaHandler } from "./providers/glama" -import { AnthropicHandler } from "./providers/anthropic" -import { AwsBedrockHandler } from "./providers/bedrock" -import { OpenRouterHandler } from "./providers/openrouter" -import { VertexHandler } from "./providers/vertex" -import { AnthropicVertexHandler } from "./providers/anthropic-vertex" -import { OpenAiHandler } from "./providers/openai" -import { OllamaHandler } from "./providers/ollama" -import { LmStudioHandler } from "./providers/lmstudio" -import { GeminiHandler } from "./providers/gemini" -import { OpenAiNativeHandler } from "./providers/openai-native" -import { DeepSeekHandler } from "./providers/deepseek" -import { MistralHandler } from "./providers/mistral" -import { VsCodeLmHandler } from "./providers/vscode-lm" +import type { ProviderSettings, ModelInfo } from "@roo-code/types" + import { ApiStream } from "./transform/stream" -import { UnboundHandler } from "./providers/unbound" -import { RequestyHandler } from "./providers/requesty" -import { HumanRelayHandler } from "./providers/human-relay" -import { FakeAIHandler } from "./providers/fake-ai" -import { XAIHandler } from "./providers/xai" -import { GroqHandler } from "./providers/groq" -import { ChutesHandler } from "./providers/chutes" -import { LiteLLMHandler } from "./providers/litellm" + +import { + GlamaHandler, + AnthropicHandler, + AwsBedrockHandler, + OpenRouterHandler, + VertexHandler, + AnthropicVertexHandler, + OpenAiHandler, + OllamaHandler, + LmStudioHandler, + GeminiHandler, + OpenAiNativeHandler, + DeepSeekHandler, + MistralHandler, + VsCodeLmHandler, + UnboundHandler, + RequestyHandler, + HumanRelayHandler, + FakeAIHandler, + XAIHandler, + GroqHandler, + ChutesHandler, + LiteLLMHandler, +} from "./providers" export interface SingleCompletionHandler { completePrompt(prompt: string): Promise @@ -67,11 +71,9 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler { case "bedrock": return new AwsBedrockHandler(options) case "vertex": - if (options.apiModelId?.startsWith("claude")) { - return new AnthropicVertexHandler(options) - } else { - return new VertexHandler(options) - } + return options.apiModelId?.startsWith("claude") + ? new AnthropicVertexHandler(options) + : new VertexHandler(options) case "openai": return new OpenAiHandler(options) case "ollama": diff --git a/src/api/providers/__tests__/gemini.test.ts b/src/api/providers/__tests__/gemini.test.ts index 97c757f8fb..3016e77364 100644 --- a/src/api/providers/__tests__/gemini.test.ts +++ b/src/api/providers/__tests__/gemini.test.ts @@ -2,8 +2,10 @@ import { Anthropic } from "@anthropic-ai/sdk" +import type { ModelInfo } from "@roo-code/types" + +import { geminiDefaultModelId } from "../../../shared/api" import { GeminiHandler } from "../gemini" -import { geminiDefaultModelId, type ModelInfo } from "../../../shared/api" const GEMINI_20_FLASH_THINKING_NAME = "gemini-2.0-flash-thinking-exp-1219" diff --git a/src/api/providers/anthropic-vertex.ts b/src/api/providers/anthropic-vertex.ts index a4ace61c6e..0ad262593b 100644 --- a/src/api/providers/anthropic-vertex.ts +++ b/src/api/providers/anthropic-vertex.ts @@ -2,7 +2,9 @@ import { Anthropic } from "@anthropic-ai/sdk" import { AnthropicVertex } from "@anthropic-ai/vertex-sdk" import { GoogleAuth, JWTInput } from "google-auth-library" -import { ApiHandlerOptions, ModelInfo, vertexDefaultModelId, VertexModelId, vertexModels } from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandlerOptions, vertexDefaultModelId, VertexModelId, vertexModels } from "../../shared/api" import { safeJsonParse } from "../../shared/safeJsonParse" import { ApiStream } from "../transform/stream" diff --git a/src/api/providers/anthropic.ts b/src/api/providers/anthropic.ts index 9c84f388ef..d0c4c7c9d3 100644 --- a/src/api/providers/anthropic.ts +++ b/src/api/providers/anthropic.ts @@ -2,13 +2,9 @@ import { Anthropic } from "@anthropic-ai/sdk" import { Stream as AnthropicStream } from "@anthropic-ai/sdk/streaming" import { CacheControlEphemeral } from "@anthropic-ai/sdk/resources" -import { - anthropicDefaultModelId, - AnthropicModelId, - anthropicModels, - ApiHandlerOptions, - ModelInfo, -} from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + +import { anthropicDefaultModelId, AnthropicModelId, anthropicModels, ApiHandlerOptions } from "../../shared/api" import { ApiStream } from "../transform/stream" import { getModelParams } from "../transform/model-params" diff --git a/src/api/providers/base-openai-compatible-provider.ts b/src/api/providers/base-openai-compatible-provider.ts index ba9d67b6e3..bf1f3c35a8 100644 --- a/src/api/providers/base-openai-compatible-provider.ts +++ b/src/api/providers/base-openai-compatible-provider.ts @@ -1,7 +1,9 @@ import { Anthropic } from "@anthropic-ai/sdk" import OpenAI from "openai" -import { ApiHandlerOptions, ModelInfo } from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + +import type { ApiHandlerOptions } from "../../shared/api" import { ApiStream } from "../transform/stream" import { convertToOpenAiMessages } from "../transform/openai-format" diff --git a/src/api/providers/base-provider.ts b/src/api/providers/base-provider.ts index edb15a3f85..6b77521ea4 100644 --- a/src/api/providers/base-provider.ts +++ b/src/api/providers/base-provider.ts @@ -1,6 +1,6 @@ import { Anthropic } from "@anthropic-ai/sdk" -import { ModelInfo } from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" import type { ApiHandler, ApiHandlerCreateMessageMetadata } from "../index" import { ApiStream } from "../transform/stream" diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index c378441484..cc5de1b548 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -9,18 +9,18 @@ import { } from "@aws-sdk/client-bedrock-runtime" import { fromIni } from "@aws-sdk/credential-providers" import { Anthropic } from "@anthropic-ai/sdk" + +import type { ModelInfo, ProviderSettings } from "@roo-code/types" + import { BedrockModelId, - ModelInfo as SharedModelInfo, bedrockDefaultModelId, bedrockModels, bedrockDefaultPromptRouterModelId, } from "../../shared/api" -import { ProviderSettings } from "../../schemas" import { ApiStream } from "../transform/stream" import { BaseProvider } from "./base-provider" import { logger } from "../../utils/logging" -// New cache-related imports import { MultiPointStrategy } from "../transform/cache-strategy/multi-point-strategy" import { ModelInfo as CacheModelInfo } from "../transform/cache-strategy/types" import { AMAZON_BEDROCK_REGION_INFO } from "../../shared/aws_regions" @@ -514,7 +514,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH * *************************************************************************************/ - private costModelConfig: { id: BedrockModelId | string; info: SharedModelInfo } = { + private costModelConfig: { id: BedrockModelId | string; info: ModelInfo } = { id: "", info: { maxTokens: 0, contextWindow: 0, supportsPromptCache: false, supportsImages: false }, } @@ -621,7 +621,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH } //Prompt Router responses come back in a different sequence and the model used is in the response and must be fetched by name - getModelById(modelId: string, modelType?: string): { id: BedrockModelId | string; info: SharedModelInfo } { + getModelById(modelId: string, modelType?: string): { id: BedrockModelId | string; info: ModelInfo } { // Try to find the model in bedrockModels const baseModelId = this.parseBaseModelId(modelId) as BedrockModelId @@ -651,7 +651,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH return model } - override getModel(): { id: BedrockModelId | string; info: SharedModelInfo } { + override getModel(): { id: BedrockModelId | string; info: ModelInfo } { if (this.costModelConfig?.id?.trim().length > 0) { return this.costModelConfig } @@ -683,7 +683,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH modelConfig.info.maxTokens = modelConfig.info.maxTokens || BEDROCK_MAX_TOKENS - return modelConfig as { id: BedrockModelId | string; info: SharedModelInfo } + return modelConfig as { id: BedrockModelId | string; info: ModelInfo } } /************************************************************************************ @@ -695,10 +695,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH // Store previous cache point placements for maintaining consistency across consecutive messages private previousCachePointPlacements: { [conversationId: string]: any[] } = {} - private supportsAwsPromptCache(modelConfig: { - id: BedrockModelId | string - info: SharedModelInfo - }): boolean | undefined { + private supportsAwsPromptCache(modelConfig: { id: BedrockModelId | string; info: ModelInfo }): boolean | undefined { // Check if the model supports prompt cache // The cachableFields property is not part of the ModelInfo type in schemas // but it's used in the bedrockModels object in shared/api.ts diff --git a/src/api/providers/fake-ai.ts b/src/api/providers/fake-ai.ts index 9c4f1ca709..c73752fc66 100644 --- a/src/api/providers/fake-ai.ts +++ b/src/api/providers/fake-ai.ts @@ -1,7 +1,10 @@ import { Anthropic } from "@anthropic-ai/sdk" -import { ApiHandlerOptions, ModelInfo } from "../../shared/api" -import { ApiStream } from "../transform/stream" + +import type { ModelInfo } from "@roo-code/types" + import type { ApiHandler, SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" +import type { ApiHandlerOptions } from "../../shared/api" +import { ApiStream } from "../transform/stream" interface FakeAI { /** diff --git a/src/api/providers/fetchers/glama.ts b/src/api/providers/fetchers/glama.ts index 82ceba5233..9fd57e2c68 100644 --- a/src/api/providers/fetchers/glama.ts +++ b/src/api/providers/fetchers/glama.ts @@ -1,7 +1,8 @@ import axios from "axios" -import { ModelInfo } from "../../../shared/api" -import { parseApiPrice } from "../../../utils/cost" +import type { ModelInfo } from "@roo-code/types" + +import { parseApiPrice } from "../../../shared/cost" export async function getGlamaModels(): Promise> { const models: Record = {} diff --git a/src/api/providers/fetchers/litellm.ts b/src/api/providers/fetchers/litellm.ts index 8fb495c63e..a3591d7466 100644 --- a/src/api/providers/fetchers/litellm.ts +++ b/src/api/providers/fetchers/litellm.ts @@ -1,4 +1,5 @@ import axios from "axios" + import { OPEN_ROUTER_COMPUTER_USE_MODELS, ModelRecord } from "../../../shared/api" /** diff --git a/src/api/providers/fetchers/openrouter.ts b/src/api/providers/fetchers/openrouter.ts index 3841b11246..b410d06fc0 100644 --- a/src/api/providers/fetchers/openrouter.ts +++ b/src/api/providers/fetchers/openrouter.ts @@ -1,16 +1,16 @@ import axios from "axios" import { z } from "zod" -import { isModelParameter } from "../../../schemas" +import { type ModelInfo, isModelParameter } from "@roo-code/types" + import { ApiHandlerOptions, - ModelInfo, OPEN_ROUTER_COMPUTER_USE_MODELS, OPEN_ROUTER_REASONING_BUDGET_MODELS, OPEN_ROUTER_REQUIRED_REASONING_BUDGET_MODELS, anthropicModels, } from "../../../shared/api" -import { parseApiPrice } from "../../../utils/cost" +import { parseApiPrice } from "../../../shared/cost" /** * OpenRouterBaseModel diff --git a/src/api/providers/fetchers/requesty.ts b/src/api/providers/fetchers/requesty.ts index 7fe6e41a2b..41f2bdb9b6 100644 --- a/src/api/providers/fetchers/requesty.ts +++ b/src/api/providers/fetchers/requesty.ts @@ -1,7 +1,8 @@ import axios from "axios" -import { ModelInfo } from "../../../shared/api" -import { parseApiPrice } from "../../../utils/cost" +import type { ModelInfo } from "@roo-code/types" + +import { parseApiPrice } from "../../../shared/cost" export async function getRequestyModels(apiKey?: string): Promise> { const models: Record = {} diff --git a/src/api/providers/fetchers/unbound.ts b/src/api/providers/fetchers/unbound.ts index 7834debf35..98c0c58fa5 100644 --- a/src/api/providers/fetchers/unbound.ts +++ b/src/api/providers/fetchers/unbound.ts @@ -1,6 +1,6 @@ import axios from "axios" -import { ModelInfo } from "../../../shared/api" +import type { ModelInfo } from "@roo-code/types" export async function getUnboundModels(apiKey?: string | null): Promise> { const models: Record = {} diff --git a/src/api/providers/gemini.ts b/src/api/providers/gemini.ts index 31c802d2de..e5ceffbf43 100644 --- a/src/api/providers/gemini.ts +++ b/src/api/providers/gemini.ts @@ -7,12 +7,15 @@ import { } from "@google/genai" import type { JWTInput } from "google-auth-library" -import { ApiHandlerOptions, ModelInfo, GeminiModelId, geminiDefaultModelId, geminiModels } from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandlerOptions, GeminiModelId, geminiDefaultModelId, geminiModels } from "../../shared/api" import { safeJsonParse } from "../../shared/safeJsonParse" -import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" import { convertAnthropicContentToGemini, convertAnthropicMessageToGemini } from "../transform/gemini-format" import type { ApiStream } from "../transform/stream" + +import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" import { BaseProvider } from "./base-provider" type GeminiHandlerOptions = ApiHandlerOptions & { diff --git a/src/api/providers/glama.ts b/src/api/providers/glama.ts index e743f82399..db2a3f84b6 100644 --- a/src/api/providers/glama.ts +++ b/src/api/providers/glama.ts @@ -2,7 +2,7 @@ import { Anthropic } from "@anthropic-ai/sdk" import axios from "axios" import OpenAI from "openai" -import { Package } from "../../schemas" +import { Package } from "../../shared/package" import { ApiHandlerOptions, glamaDefaultModelId, glamaDefaultModelInfo } from "../../shared/api" import { ApiStream } from "../transform/stream" diff --git a/src/api/providers/human-relay.ts b/src/api/providers/human-relay.ts index 4abdf7b0c0..c1dc3506e9 100644 --- a/src/api/providers/human-relay.ts +++ b/src/api/providers/human-relay.ts @@ -1,10 +1,13 @@ import { Anthropic } from "@anthropic-ai/sdk" import * as vscode from "vscode" -import { ModelInfo } from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + import { getCommand } from "../../utils/commands" import { ApiStream } from "../transform/stream" + import type { ApiHandler, SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" + /** * Human Relay API processor * This processor does not directly call the API, but interacts with the model through human operations copy and paste. diff --git a/src/api/providers/index.ts b/src/api/providers/index.ts new file mode 100644 index 0000000000..dd2a65dd75 --- /dev/null +++ b/src/api/providers/index.ts @@ -0,0 +1,22 @@ +export { GlamaHandler } from "./glama" +export { AnthropicHandler } from "./anthropic" +export { AwsBedrockHandler } from "./bedrock" +export { OpenRouterHandler } from "./openrouter" +export { VertexHandler } from "./vertex" +export { AnthropicVertexHandler } from "./anthropic-vertex" +export { OpenAiHandler } from "./openai" +export { OllamaHandler } from "./ollama" +export { LmStudioHandler } from "./lmstudio" +export { GeminiHandler } from "./gemini" +export { OpenAiNativeHandler } from "./openai-native" +export { DeepSeekHandler } from "./deepseek" +export { MistralHandler } from "./mistral" +export { VsCodeLmHandler } from "./vscode-lm" +export { UnboundHandler } from "./unbound" +export { RequestyHandler } from "./requesty" +export { HumanRelayHandler } from "./human-relay" +export { FakeAIHandler } from "./fake-ai" +export { XAIHandler } from "./xai" +export { GroqHandler } from "./groq" +export { ChutesHandler } from "./chutes" +export { LiteLLMHandler } from "./litellm" diff --git a/src/api/providers/lmstudio.ts b/src/api/providers/lmstudio.ts index e1aee5e53e..bac6b05551 100644 --- a/src/api/providers/lmstudio.ts +++ b/src/api/providers/lmstudio.ts @@ -2,11 +2,15 @@ import { Anthropic } from "@anthropic-ai/sdk" import OpenAI from "openai" import axios from "axios" -import { ApiHandlerOptions, ModelInfo, openAiModelInfoSaneDefaults } from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandlerOptions, openAiModelInfoSaneDefaults } from "../../shared/api" +import { XmlMatcher } from "../../utils/xml-matcher" + import { convertToOpenAiMessages } from "../transform/openai-format" import { ApiStream } from "../transform/stream" + import { BaseProvider } from "./base-provider" -import { XmlMatcher } from "../../utils/xml-matcher" import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" const LMSTUDIO_DEFAULT_TEMPERATURE = 0 diff --git a/src/api/providers/mistral.ts b/src/api/providers/mistral.ts index 58cd7c7952..5aafb16012 100644 --- a/src/api/providers/mistral.ts +++ b/src/api/providers/mistral.ts @@ -1,8 +1,12 @@ import { Anthropic } from "@anthropic-ai/sdk" import { Mistral } from "@mistralai/mistralai" -import { ApiHandlerOptions, mistralDefaultModelId, MistralModelId, mistralModels, ModelInfo } from "../../shared/api" + +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandlerOptions, mistralDefaultModelId, MistralModelId, mistralModels } from "../../shared/api" import { convertToMistralMessages } from "../transform/mistral-format" import { ApiStream } from "../transform/stream" + import { BaseProvider } from "./base-provider" import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" diff --git a/src/api/providers/ollama.ts b/src/api/providers/ollama.ts index ba2495c095..4a321895d0 100644 --- a/src/api/providers/ollama.ts +++ b/src/api/providers/ollama.ts @@ -2,14 +2,18 @@ import { Anthropic } from "@anthropic-ai/sdk" import OpenAI from "openai" import axios from "axios" -import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" -import { ApiHandlerOptions, ModelInfo, openAiModelInfoSaneDefaults } from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandlerOptions, openAiModelInfoSaneDefaults } from "../../shared/api" +import { XmlMatcher } from "../../utils/xml-matcher" + import { convertToOpenAiMessages } from "../transform/openai-format" import { convertToR1Format } from "../transform/r1-format" import { ApiStream } from "../transform/stream" + import { DEEP_SEEK_DEFAULT_TEMPERATURE } from "./constants" -import { XmlMatcher } from "../../utils/xml-matcher" import { BaseProvider } from "./base-provider" +import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" // Alias for the usage object returned in streaming chunks type CompletionUsage = OpenAI.Chat.Completions.ChatCompletionChunk["usage"] diff --git a/src/api/providers/openai-native.ts b/src/api/providers/openai-native.ts index 8ce7eaa5ef..41a3a63ae7 100644 --- a/src/api/providers/openai-native.ts +++ b/src/api/providers/openai-native.ts @@ -1,22 +1,23 @@ import { Anthropic } from "@anthropic-ai/sdk" import OpenAI from "openai" +import type { ModelInfo } from "@roo-code/types" + import { ApiHandlerOptions, - ModelInfo, openAiNativeDefaultModelId, OpenAiNativeModelId, openAiNativeModels, } from "../../shared/api" -import { calculateApiCostOpenAI } from "../../utils/cost" +import { calculateApiCostOpenAI } from "../../shared/cost" import { convertToOpenAiMessages } from "../transform/openai-format" import { ApiStream } from "../transform/stream" import { getModelParams } from "../transform/model-params" -import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" import { BaseProvider } from "./base-provider" +import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" const OPENAI_NATIVE_DEFAULT_TEMPERATURE = 0 diff --git a/src/api/providers/openai.ts b/src/api/providers/openai.ts index 69d0040d0d..43c5a0e6da 100644 --- a/src/api/providers/openai.ts +++ b/src/api/providers/openai.ts @@ -2,12 +2,9 @@ import { Anthropic } from "@anthropic-ai/sdk" import OpenAI, { AzureOpenAI } from "openai" import axios from "axios" -import { - ApiHandlerOptions, - azureOpenAiDefaultApiVersion, - ModelInfo, - openAiModelInfoSaneDefaults, -} from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandlerOptions, azureOpenAiDefaultApiVersion, openAiModelInfoSaneDefaults } from "../../shared/api" import { XmlMatcher } from "../../utils/xml-matcher" @@ -18,8 +15,8 @@ import { ApiStream, ApiStreamUsageChunk } from "../transform/stream" import { getModelParams } from "../transform/model-params" import { DEFAULT_HEADERS, DEEP_SEEK_DEFAULT_TEMPERATURE } from "./constants" -import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" import { BaseProvider } from "./base-provider" +import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" export const AZURE_AI_INFERENCE_PATH = "/models/chat/completions" diff --git a/src/api/providers/requesty.ts b/src/api/providers/requesty.ts index 1c21af5241..0fbe224668 100644 --- a/src/api/providers/requesty.ts +++ b/src/api/providers/requesty.ts @@ -1,19 +1,18 @@ import { Anthropic } from "@anthropic-ai/sdk" -import { - ApiHandlerOptions, - ModelInfo, - ModelRecord, - requestyDefaultModelId, - requestyDefaultModelInfo, -} from "../../shared/api" +import OpenAI from "openai" + +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandlerOptions, ModelRecord, requestyDefaultModelId, requestyDefaultModelInfo } from "../../shared/api" +import { calculateApiCostOpenAI } from "../../shared/cost" + import { convertToOpenAiMessages } from "../transform/openai-format" -import { calculateApiCostOpenAI } from "../../utils/cost" import { ApiStream, ApiStreamUsageChunk } from "../transform/stream" -import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../" -import { BaseProvider } from "./base-provider" + import { DEFAULT_HEADERS } from "./constants" import { getModels } from "./fetchers/modelCache" -import OpenAI from "openai" +import { BaseProvider } from "./base-provider" +import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../" // Requesty usage includes an extra field for Anthropic use cases. // Safely cast the prompt token details section to the appropriate structure. diff --git a/src/api/providers/router-provider.ts b/src/api/providers/router-provider.ts index 30093be9b8..c64b29571a 100644 --- a/src/api/providers/router-provider.ts +++ b/src/api/providers/router-provider.ts @@ -1,6 +1,9 @@ import OpenAI from "openai" -import { ApiHandlerOptions, RouterName, ModelRecord, ModelInfo } from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandlerOptions, RouterName, ModelRecord } from "../../shared/api" + import { BaseProvider } from "./base-provider" import { getModels } from "./fetchers/modelCache" diff --git a/src/api/providers/vertex.ts b/src/api/providers/vertex.ts index 6d24f60e58..2bc940de7a 100644 --- a/src/api/providers/vertex.ts +++ b/src/api/providers/vertex.ts @@ -1,7 +1,9 @@ -import { ApiHandlerOptions, ModelInfo, VertexModelId, vertexDefaultModelId, vertexModels } from "../../shared/api" +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandlerOptions, VertexModelId, vertexDefaultModelId, vertexModels } from "../../shared/api" -import { SingleCompletionHandler } from "../index" import { GeminiHandler } from "./gemini" +import { SingleCompletionHandler } from "../index" export class VertexHandler extends GeminiHandler implements SingleCompletionHandler { constructor(options: ApiHandlerOptions) { diff --git a/src/api/providers/vscode-lm.ts b/src/api/providers/vscode-lm.ts index 61aab91123..5990193ecb 100644 --- a/src/api/providers/vscode-lm.ts +++ b/src/api/providers/vscode-lm.ts @@ -1,12 +1,16 @@ import { Anthropic } from "@anthropic-ai/sdk" import * as vscode from "vscode" +import type { ModelInfo } from "@roo-code/types" + +import { SELECTOR_SEPARATOR, stringifyVsCodeLmModelSelector } from "../../shared/vsCodeSelectorUtils" +import { ApiHandlerOptions, openAiModelInfoSaneDefaults } from "../../shared/api" + import { ApiStream } from "../transform/stream" import { convertToVsCodeLmMessages } from "../transform/vscode-lm-format" -import { SELECTOR_SEPARATOR, stringifyVsCodeLmModelSelector } from "../../shared/vsCodeSelectorUtils" -import { ApiHandlerOptions, ModelInfo, openAiModelInfoSaneDefaults } from "../../shared/api" + import { BaseProvider } from "./base-provider" -import type { SingleCompletionHandler, ApiHandler, ApiHandlerCreateMessageMetadata } from "../index" +import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index" /** * Handles interaction with VS Code's Language Model API for chat-based operations. diff --git a/src/api/transform/__tests__/image-cleaning.test.ts b/src/api/transform/__tests__/image-cleaning.test.ts index cbb318531a..6260954e89 100644 --- a/src/api/transform/__tests__/image-cleaning.test.ts +++ b/src/api/transform/__tests__/image-cleaning.test.ts @@ -1,7 +1,8 @@ -import { ApiHandler } from "../.." +import type { ModelInfo } from "@roo-code/types" + +import { ApiHandler } from "../../index" import { ApiMessage } from "../../../core/task-persistence/apiMessages" import { maybeRemoveImageBlocks } from "../image-cleaning" -import { ModelInfo } from "../../../shared/api" describe("maybeRemoveImageBlocks", () => { // Mock ApiHandler factory function diff --git a/src/api/transform/__tests__/model-params.test.ts b/src/api/transform/__tests__/model-params.test.ts index 344659328f..2eabe1c7fa 100644 --- a/src/api/transform/__tests__/model-params.test.ts +++ b/src/api/transform/__tests__/model-params.test.ts @@ -1,6 +1,7 @@ // npx jest src/api/transform/__tests__/model-params.test.ts -import { ModelInfo } from "../../../schemas" +import type { ModelInfo } from "@roo-code/types" + import { ANTHROPIC_DEFAULT_MAX_TOKENS } from "../../providers/constants" import { getModelParams } from "../model-params" diff --git a/src/api/transform/__tests__/reasoning.test.ts b/src/api/transform/__tests__/reasoning.test.ts index a03728f366..47a0317a50 100644 --- a/src/api/transform/__tests__/reasoning.test.ts +++ b/src/api/transform/__tests__/reasoning.test.ts @@ -1,6 +1,7 @@ // npx jest src/api/transform/__tests__/reasoning.test.ts -import { ModelInfo, ProviderSettings } from "../../../schemas" +import type { ModelInfo, ProviderSettings } from "@roo-code/types" + import { getOpenRouterReasoning, getAnthropicReasoning, diff --git a/src/api/transform/image-cleaning.ts b/src/api/transform/image-cleaning.ts index e5987bb59e..04ac3a9f65 100644 --- a/src/api/transform/image-cleaning.ts +++ b/src/api/transform/image-cleaning.ts @@ -1,6 +1,7 @@ -import { ApiHandler } from ".." import { ApiMessage } from "../../core/task-persistence/apiMessages" +import { ApiHandler } from "../index" + /* Removes image blocks from messages if they are not supported by the Api Handler */ export function maybeRemoveImageBlocks(messages: ApiMessage[], apiHandler: ApiHandler): ApiMessage[] { return messages.map((message) => { diff --git a/src/api/transform/model-params.ts b/src/api/transform/model-params.ts index 9abe613714..2fb5012655 100644 --- a/src/api/transform/model-params.ts +++ b/src/api/transform/model-params.ts @@ -1,10 +1,7 @@ +import type { ModelInfo, ProviderSettings } from "@roo-code/types" + import { ANTHROPIC_DEFAULT_MAX_TOKENS } from "../providers/constants" -import { - shouldUseReasoningBudget, - shouldUseReasoningEffort, - type ModelInfo, - type ProviderSettings, -} from "../../shared/api" +import { shouldUseReasoningBudget, shouldUseReasoningEffort } from "../../shared/api" import { type AnthropicReasoningParams, diff --git a/src/api/transform/reasoning.ts b/src/api/transform/reasoning.ts index 7c9fcddb4e..9887f1137a 100644 --- a/src/api/transform/reasoning.ts +++ b/src/api/transform/reasoning.ts @@ -1,7 +1,8 @@ import { BetaThinkingConfigParam } from "@anthropic-ai/sdk/resources/beta" import OpenAI from "openai" -import { ModelInfo, ProviderSettings } from "../../schemas" +import type { ModelInfo, ProviderSettings } from "@roo-code/types" + import { shouldUseReasoningBudget, shouldUseReasoningEffort } from "../../shared/api" type ReasoningEffort = "low" | "medium" | "high" diff --git a/src/core/assistant-message/parseAssistantMessage.ts b/src/core/assistant-message/parseAssistantMessage.ts index f641cabdaa..2fe747a6df 100644 --- a/src/core/assistant-message/parseAssistantMessage.ts +++ b/src/core/assistant-message/parseAssistantMessage.ts @@ -1,5 +1,6 @@ +import { type ToolName, toolNames } from "@roo-code/types" + import { TextContent, ToolUse, ToolParamName, toolParamNames } from "../../shared/tools" -import { toolNames, ToolName } from "../../schemas" export type AssistantMessageContent = TextContent | ToolUse diff --git a/src/core/assistant-message/parseAssistantMessageV2.ts b/src/core/assistant-message/parseAssistantMessageV2.ts index d24a67f83d..6d3594cf60 100644 --- a/src/core/assistant-message/parseAssistantMessageV2.ts +++ b/src/core/assistant-message/parseAssistantMessageV2.ts @@ -1,5 +1,6 @@ +import { type ToolName, toolNames } from "@roo-code/types" + import { TextContent, ToolUse, ToolParamName, toolParamNames } from "../../shared/tools" -import { toolNames, ToolName } from "../../schemas" export type AssistantMessageContent = TextContent | ToolUse diff --git a/src/core/assistant-message/presentAssistantMessage.ts b/src/core/assistant-message/presentAssistantMessage.ts index 6d37063457..77c510889b 100644 --- a/src/core/assistant-message/presentAssistantMessage.ts +++ b/src/core/assistant-message/presentAssistantMessage.ts @@ -1,11 +1,10 @@ import cloneDeep from "clone-deep" import { serializeError } from "serialize-error" -import type { ToolName } from "../../schemas" +import type { ToolName, ClineAsk, ToolProgressStatus } from "@roo-code/types" import { defaultModeSlug, getModeBySlug } from "../../shared/modes" import type { ToolParamName, ToolResponse } from "../../shared/tools" -import type { ClineAsk, ToolProgressStatus } from "../../shared/ExtensionMessage" import { telemetryService } from "../../services/telemetry/TelemetryService" diff --git a/src/core/config/ContextProxy.ts b/src/core/config/ContextProxy.ts index c2373ccad2..874ed719f2 100644 --- a/src/core/config/ContextProxy.ts +++ b/src/core/config/ContextProxy.ts @@ -6,15 +6,16 @@ import { GLOBAL_SETTINGS_KEYS, SECRET_STATE_KEYS, GLOBAL_STATE_KEYS, - ProviderSettings, - GlobalSettings, - SecretState, - GlobalState, - RooCodeSettings, + type ProviderSettings, + type GlobalSettings, + type SecretState, + type GlobalState, + type RooCodeSettings, providerSettingsSchema, globalSettingsSchema, isSecretStateKey, -} from "../../schemas" +} from "@roo-code/types" + import { logger } from "../../utils/logging" import { telemetryService } from "../../services/telemetry/TelemetryService" diff --git a/src/core/config/CustomModesManager.ts b/src/core/config/CustomModesManager.ts index 743f96c00e..dc830688e1 100644 --- a/src/core/config/CustomModesManager.ts +++ b/src/core/config/CustomModesManager.ts @@ -1,13 +1,15 @@ import * as vscode from "vscode" import * as path from "path" import * as fs from "fs/promises" -import { customModesSettingsSchema } from "../../schemas" -import { ModeConfig } from "../../shared/modes" + +import * as yaml from "yaml" + +import { type ModeConfig, customModesSettingsSchema } from "@roo-code/types" + import { fileExistsAtPath } from "../../utils/fs" import { arePathsEqual, getWorkspacePath } from "../../utils/path" import { logger } from "../../utils/logging" import { GlobalFileNames } from "../../shared/globalFileNames" -import * as yaml from "yaml" const ROOMODES_FILENAME = ".roomodes" diff --git a/src/core/config/ProviderSettingsManager.ts b/src/core/config/ProviderSettingsManager.ts index d22a87e097..d4f2715318 100644 --- a/src/core/config/ProviderSettingsManager.ts +++ b/src/core/config/ProviderSettingsManager.ts @@ -1,7 +1,12 @@ import { ExtensionContext } from "vscode" import { z, ZodError } from "zod" -import { providerSettingsSchema, ProviderSettingsEntry, providerSettingsSchemaDiscriminated } from "../../schemas" +import { + type ProviderSettingsEntry, + providerSettingsSchema, + providerSettingsSchemaDiscriminated, +} from "@roo-code/types" + import { Mode, modes } from "../../shared/modes" import { telemetryService } from "../../services/telemetry/TelemetryService" diff --git a/src/core/config/__tests__/ContextProxy.test.ts b/src/core/config/__tests__/ContextProxy.test.ts index bdd3d5ddc5..498c1e2199 100644 --- a/src/core/config/__tests__/ContextProxy.test.ts +++ b/src/core/config/__tests__/ContextProxy.test.ts @@ -1,9 +1,10 @@ // npx jest src/core/config/__tests__/ContextProxy.test.ts import * as vscode from "vscode" -import { ContextProxy } from "../ContextProxy" -import { GLOBAL_STATE_KEYS, SECRET_STATE_KEYS } from "../../../schemas" +import { GLOBAL_STATE_KEYS, SECRET_STATE_KEYS } from "@roo-code/types" + +import { ContextProxy } from "../ContextProxy" jest.mock("vscode", () => ({ Uri: { diff --git a/src/core/config/__tests__/CustomModesManager.test.ts b/src/core/config/__tests__/CustomModesManager.test.ts index 15bf244726..cb49c68a05 100644 --- a/src/core/config/__tests__/CustomModesManager.test.ts +++ b/src/core/config/__tests__/CustomModesManager.test.ts @@ -3,12 +3,16 @@ import * as vscode from "vscode" import * as path from "path" import * as fs from "fs/promises" -import { CustomModesManager } from "../CustomModesManager" -import { ModeConfig } from "../../../shared/modes" + +import * as yaml from "yaml" + +import type { ModeConfig } from "@roo-code/types" + import { fileExistsAtPath } from "../../../utils/fs" import { getWorkspacePath, arePathsEqual } from "../../../utils/path" import { GlobalFileNames } from "../../../shared/globalFileNames" -import * as yaml from "yaml" + +import { CustomModesManager } from "../CustomModesManager" jest.mock("vscode") jest.mock("fs/promises") diff --git a/src/core/config/__tests__/CustomModesSettings.test.ts b/src/core/config/__tests__/CustomModesSettings.test.ts index 247bced8b3..117bdbe571 100644 --- a/src/core/config/__tests__/CustomModesSettings.test.ts +++ b/src/core/config/__tests__/CustomModesSettings.test.ts @@ -1,9 +1,9 @@ // npx jest src/core/config/__tests__/CustomModesSettings.test.ts -import { customModesSettingsSchema } from "../../../schemas" -import { ModeConfig } from "../../../shared/modes" import { ZodError } from "zod" +import { type ModeConfig, customModesSettingsSchema } from "@roo-code/types" + describe("CustomModesSettings", () => { const validMode = { slug: "123e4567-e89b-12d3-a456-426614174000", diff --git a/src/core/config/__tests__/ModeConfig.test.ts b/src/core/config/__tests__/ModeConfig.test.ts index e246a7ec4b..099910b241 100644 --- a/src/core/config/__tests__/ModeConfig.test.ts +++ b/src/core/config/__tests__/ModeConfig.test.ts @@ -2,8 +2,7 @@ import { ZodError } from "zod" -import { modeConfigSchema } from "../../../schemas" -import { ModeConfig } from "../../../shared/modes" +import { type ModeConfig, modeConfigSchema } from "@roo-code/types" function validateCustomMode(mode: unknown): asserts mode is ModeConfig { modeConfigSchema.parse(mode) diff --git a/src/core/config/__tests__/ProviderSettingsManager.test.ts b/src/core/config/__tests__/ProviderSettingsManager.test.ts index 3eb436a079..ff2061be13 100644 --- a/src/core/config/__tests__/ProviderSettingsManager.test.ts +++ b/src/core/config/__tests__/ProviderSettingsManager.test.ts @@ -2,7 +2,8 @@ import { ExtensionContext } from "vscode" -import { ProviderSettings } from "../../../schemas" +import type { ProviderSettings } from "@roo-code/types" + import { ProviderSettingsManager, ProviderProfiles } from "../ProviderSettingsManager" // Mock VSCode ExtensionContext diff --git a/src/core/config/__tests__/importExport.test.ts b/src/core/config/__tests__/importExport.test.ts index 3fe5e97595..40def4ebcd 100644 --- a/src/core/config/__tests__/importExport.test.ts +++ b/src/core/config/__tests__/importExport.test.ts @@ -5,7 +5,8 @@ import * as path from "path" import * as vscode from "vscode" -import { ProviderName } from "../../../schemas" +import type { ProviderName } from "@roo-code/types" + import { importSettings, exportSettings } from "../importExport" import { ProviderSettingsManager } from "../ProviderSettingsManager" import { ContextProxy } from "../ContextProxy" diff --git a/src/core/config/importExport.ts b/src/core/config/importExport.ts index 457e91fa37..b9caef727e 100644 --- a/src/core/config/importExport.ts +++ b/src/core/config/importExport.ts @@ -5,12 +5,13 @@ import fs from "fs/promises" import * as vscode from "vscode" import { z, ZodError } from "zod" -import { globalSettingsSchema } from "../../schemas" +import { globalSettingsSchema } from "@roo-code/types" + +import { telemetryService } from "../../services/telemetry/TelemetryService" import { ProviderSettingsManager, providerProfilesSchema } from "./ProviderSettingsManager" import { ContextProxy } from "./ContextProxy" import { CustomModesManager } from "./CustomModesManager" -import { telemetryService } from "../../services/telemetry/TelemetryService" type ImportOptions = { providerSettingsManager: ProviderSettingsManager diff --git a/src/core/diff/strategies/multi-search-replace.ts b/src/core/diff/strategies/multi-search-replace.ts index fdaba9ecbf..af5a03e468 100644 --- a/src/core/diff/strategies/multi-search-replace.ts +++ b/src/core/diff/strategies/multi-search-replace.ts @@ -2,8 +2,9 @@ import { distance } from "fastest-levenshtein" +import { ToolProgressStatus } from "@roo-code/types" + import { addLineNumbers, everyLineHasLineNumbers, stripLineNumbers } from "../../../integrations/misc/extract-text" -import { ToolProgressStatus } from "../../../shared/ExtensionMessage" import { ToolUse, DiffStrategy, DiffResult } from "../../../shared/tools" import { normalizeString } from "../../../utils/text-normalization" diff --git a/src/core/environment/getEnvironmentDetails.ts b/src/core/environment/getEnvironmentDetails.ts index 3d8a9cdbc3..1f8c82b1a4 100644 --- a/src/core/environment/getEnvironmentDetails.ts +++ b/src/core/environment/getEnvironmentDetails.ts @@ -5,7 +5,9 @@ import * as vscode from "vscode" import pWaitFor from "p-wait-for" import delay from "delay" -import { EXPERIMENT_IDS, experiments as Experiments, ExperimentId } from "../../shared/experiments" +import type { ExperimentId } from "@roo-code/types" + +import { EXPERIMENT_IDS, experiments as Experiments } from "../../shared/experiments" import { formatLanguage } from "../../shared/language" import { defaultModeSlug, getFullModeDetails, getModeBySlug, isToolAllowedForMode } from "../../shared/modes" import { getApiMetrics } from "../../shared/getApiMetrics" diff --git a/src/core/prompts/__tests__/system.test.ts b/src/core/prompts/__tests__/system.test.ts index 3647d2d859..74fc8632fd 100644 --- a/src/core/prompts/__tests__/system.test.ts +++ b/src/core/prompts/__tests__/system.test.ts @@ -1,9 +1,13 @@ +// npx jest src/core/prompts/__tests__/system.test.ts + import * as vscode from "vscode" +import { ModeConfig } from "@roo-code/types" + import { SYSTEM_PROMPT } from "../system" import { McpHub } from "../../../services/mcp/McpHub" -import { defaultModeSlug, modes, Mode, ModeConfig } from "../../../shared/modes" -import "../../../utils/path" // Import path utils to get access to toPosix string extension. +import { defaultModeSlug, modes, Mode } from "../../../shared/modes" +import "../../../utils/path" import { addCustomInstructions } from "../sections/custom-instructions" import { MultiSearchReplaceDiffStrategy } from "../../diff/strategies/multi-search-replace" diff --git a/src/core/prompts/sections/custom-instructions.ts b/src/core/prompts/sections/custom-instructions.ts index cf1aea24ff..f9f4b7dea0 100644 --- a/src/core/prompts/sections/custom-instructions.ts +++ b/src/core/prompts/sections/custom-instructions.ts @@ -1,9 +1,11 @@ import fs from "fs/promises" import path from "path" - -import { LANGUAGES, isLanguage } from "../../../shared/language" import { Dirent } from "fs" +import { isLanguage } from "@roo-code/types" + +import { LANGUAGES } from "../../../shared/language" + /** * Safely read a file and return its trimmed content */ diff --git a/src/core/prompts/sections/modes.ts b/src/core/prompts/sections/modes.ts index ff12098d5e..9b863840c0 100644 --- a/src/core/prompts/sections/modes.ts +++ b/src/core/prompts/sections/modes.ts @@ -2,7 +2,9 @@ import * as path from "path" import * as vscode from "vscode" import { promises as fs } from "fs" -import { ModeConfig, getAllModesWithPrompts } from "../../../shared/modes" +import type { ModeConfig } from "@roo-code/types" + +import { getAllModesWithPrompts } from "../../../shared/modes" export async function getModesSection(context: vscode.ExtensionContext): Promise { const settingsDir = path.join(context.globalStorageUri.fsPath, "settings") diff --git a/src/core/prompts/system.ts b/src/core/prompts/system.ts index 96221ae91f..2e91f60e39 100644 --- a/src/core/prompts/system.ts +++ b/src/core/prompts/system.ts @@ -1,19 +1,18 @@ -import { - Mode, - modes, - CustomModePrompts, - PromptComponent, - defaultModeSlug, - ModeConfig, - getModeBySlug, - getGroupName, -} from "../../shared/modes" -import { PromptVariables, loadSystemPromptFile } from "./sections/custom-system-prompt" +import * as vscode from "vscode" +import * as os from "os" + +import type { ModeConfig, PromptComponent, CustomModePrompts } from "@roo-code/types" + +import { Mode, modes, defaultModeSlug, getModeBySlug, getGroupName } from "../../shared/modes" import { DiffStrategy } from "../../shared/tools" +import { formatLanguage } from "../../shared/language" + import { McpHub } from "../../services/mcp/McpHub" +import { CodeIndexManager } from "../../services/code-index/manager" + +import { PromptVariables, loadSystemPromptFile } from "./sections/custom-system-prompt" + import { getToolDescriptionsForMode } from "./tools" -import * as vscode from "vscode" -import * as os from "os" import { getRulesSection, getSystemInfoSection, @@ -26,8 +25,6 @@ import { addCustomInstructions, markdownFormattingSection, } from "./sections" -import { formatLanguage } from "../../shared/language" -import { CodeIndexManager } from "../../services/code-index/manager" async function generatePrompt( context: vscode.ExtensionContext, diff --git a/src/core/prompts/tools/index.ts b/src/core/prompts/tools/index.ts index 4b3f796919..a3d1100dc8 100644 --- a/src/core/prompts/tools/index.ts +++ b/src/core/prompts/tools/index.ts @@ -1,7 +1,8 @@ -import { ToolName } from "../../../schemas" +import type { ToolName, ModeConfig } from "@roo-code/types" + import { TOOL_GROUPS, ALWAYS_AVAILABLE_TOOLS, DiffStrategy } from "../../../shared/tools" import { McpHub } from "../../../services/mcp/McpHub" -import { Mode, ModeConfig, getModeConfig, isToolAllowedForMode, getGroupName } from "../../../shared/modes" +import { Mode, getModeConfig, isToolAllowedForMode, getGroupName } from "../../../shared/modes" import { ToolArgs } from "./types" import { getExecuteCommandDescription } from "./execute-command" diff --git a/src/core/sliding-window/__tests__/sliding-window.test.ts b/src/core/sliding-window/__tests__/sliding-window.test.ts index d48abff449..74bbdf0caa 100644 --- a/src/core/sliding-window/__tests__/sliding-window.test.ts +++ b/src/core/sliding-window/__tests__/sliding-window.test.ts @@ -2,16 +2,18 @@ import { Anthropic } from "@anthropic-ai/sdk" -import { ModelInfo } from "../../../shared/api" +import type { ModelInfo } from "@roo-code/types" + import { BaseProvider } from "../../../api/providers/base-provider" +import { ApiMessage } from "../../task-persistence/apiMessages" +import * as condenseModule from "../../condense" + import { TOKEN_BUFFER_PERCENTAGE, estimateTokenCount, truncateConversation, truncateConversationIfNeeded, } from "../index" -import { ApiMessage } from "../../task-persistence/apiMessages" -import * as condenseModule from "../../condense" // Create a mock ApiHandler for testing class MockApiHandler extends BaseProvider { diff --git a/src/core/task-persistence/taskMessages.ts b/src/core/task-persistence/taskMessages.ts index 54d33b1a51..3ed5c5099e 100644 --- a/src/core/task-persistence/taskMessages.ts +++ b/src/core/task-persistence/taskMessages.ts @@ -1,10 +1,11 @@ import * as path from "path" import * as fs from "fs/promises" +import type { ClineMessage } from "@roo-code/types" + import { fileExistsAtPath } from "../../utils/fs" import { GlobalFileNames } from "../../shared/globalFileNames" -import { ClineMessage } from "../../shared/ExtensionMessage" import { getTaskDirectoryPath } from "../../utils/storage" export type ReadTaskMessagesOptions = { diff --git a/src/core/task-persistence/taskMetadata.ts b/src/core/task-persistence/taskMetadata.ts index 0a028e5ba8..8044acd8ba 100644 --- a/src/core/task-persistence/taskMetadata.ts +++ b/src/core/task-persistence/taskMetadata.ts @@ -1,12 +1,12 @@ import NodeCache from "node-cache" import getFolderSize from "get-folder-size" -import { ClineMessage } from "../../shared/ExtensionMessage" +import type { ClineMessage, HistoryItem } from "@roo-code/types" + import { combineApiRequests } from "../../shared/combineApiRequests" import { combineCommandSequences } from "../../shared/combineCommandSequences" import { getApiMetrics } from "../../shared/getApiMetrics" import { findLastIndex } from "../../shared/array" -import { HistoryItem } from "../../shared/HistoryItem" import { getTaskDirectoryPath } from "../../utils/storage" const taskSizeCache = new NodeCache({ stdTTL: 30, checkperiod: 5 * 60 }) diff --git a/src/core/task/Task.ts b/src/core/task/Task.ts index 231a6049ad..90b4b39c3c 100644 --- a/src/core/task/Task.ts +++ b/src/core/task/Task.ts @@ -8,29 +8,30 @@ import delay from "delay" import pWaitFor from "p-wait-for" import { serializeError } from "serialize-error" -// schemas -import { TokenUsage, ToolUsage, ToolName, ContextCondense } from "../../schemas" +import type { + ProviderSettings, + TokenUsage, + ToolUsage, + ToolName, + ContextCondense, + ClineAsk, + ClineMessage, + ClineSay, + ToolProgressStatus, + HistoryItem, +} from "@roo-code/types" // api import { ApiHandler, ApiHandlerCreateMessageMetadata, buildApiHandler } from "../../api" import { ApiStream } from "../../api/transform/stream" // shared -import { ProviderSettings } from "../../shared/api" import { findLastIndex } from "../../shared/array" import { combineApiRequests } from "../../shared/combineApiRequests" import { combineCommandSequences } from "../../shared/combineCommandSequences" import { t } from "../../i18n" -import { - ClineApiReqCancelReason, - ClineApiReqInfo, - ClineAsk, - ClineMessage, - ClineSay, - ToolProgressStatus, -} from "../../shared/ExtensionMessage" +import { ClineApiReqCancelReason, ClineApiReqInfo } from "../../shared/ExtensionMessage" import { getApiMetrics } from "../../shared/getApiMetrics" -import { HistoryItem } from "../../shared/HistoryItem" import { ClineAskResponse } from "../../shared/WebviewMessage" import { defaultModeSlug } from "../../shared/modes" import { DiffStrategy } from "../../shared/tools" @@ -50,7 +51,7 @@ import { RooTerminalProcess } from "../../integrations/terminal/types" import { TerminalRegistry } from "../../integrations/terminal/TerminalRegistry" // utils -import { calculateApiCostAnthropic } from "../../utils/cost" +import { calculateApiCostAnthropic } from "../../shared/cost" import { getWorkspacePath } from "../../utils/path" // prompts diff --git a/src/core/task/__tests__/Task.test.ts b/src/core/task/__tests__/Task.test.ts index c472355744..79641b56f1 100644 --- a/src/core/task/__tests__/Task.test.ts +++ b/src/core/task/__tests__/Task.test.ts @@ -6,10 +6,10 @@ import * as path from "path" import * as vscode from "vscode" import { Anthropic } from "@anthropic-ai/sdk" -import { GlobalState } from "../../../schemas" +import type { GlobalState, ProviderSettings, ModelInfo } from "@roo-code/types" + import { Task } from "../Task" import { ClineProvider } from "../../webview/ClineProvider" -import { ProviderSettings, ModelInfo } from "../../../shared/api" import { ApiStreamChunk } from "../../../api/transform/stream" import { ContextProxy } from "../../config/ContextProxy" import { processUserContentMentions } from "../../mentions/processUserContentMentions" diff --git a/src/core/tools/__tests__/ToolRepetitionDetector.test.ts b/src/core/tools/__tests__/ToolRepetitionDetector.test.ts index 846011b5d8..286a9559b0 100644 --- a/src/core/tools/__tests__/ToolRepetitionDetector.test.ts +++ b/src/core/tools/__tests__/ToolRepetitionDetector.test.ts @@ -1,6 +1,7 @@ // npx jest src/core/tools/__tests__/ToolRepetitionDetector.test.ts -import type { ToolName } from "../../../schemas" +import type { ToolName } from "@roo-code/types" + import type { ToolUse } from "../../../shared/tools" import { ToolRepetitionDetector } from "../ToolRepetitionDetector" diff --git a/src/core/tools/__tests__/executeCommandTool.test.ts b/src/core/tools/__tests__/executeCommandTool.test.ts index 615d72042d..d0b9a872c8 100644 --- a/src/core/tools/__tests__/executeCommandTool.test.ts +++ b/src/core/tools/__tests__/executeCommandTool.test.ts @@ -2,10 +2,11 @@ import { describe, expect, it, jest, beforeEach } from "@jest/globals" +import type { ToolUsage } from "@roo-code/types" + import { Task } from "../../task/Task" import { formatResponse } from "../../prompts/responses" import { ToolUse, AskApproval, HandleError, PushToolResult, RemoveClosingTag } from "../../../shared/tools" -import { ToolUsage } from "../../../schemas" import { unescapeHtmlEntities } from "../../../utils/text-normalization" // Mock dependencies diff --git a/src/core/tools/__tests__/validateToolUse.test.ts b/src/core/tools/__tests__/validateToolUse.test.ts index da2550b4d6..4b673b85f3 100644 --- a/src/core/tools/__tests__/validateToolUse.test.ts +++ b/src/core/tools/__tests__/validateToolUse.test.ts @@ -1,7 +1,10 @@ // npx jest src/core/tools/__tests__/validateToolUse.test.ts -import { isToolAllowedForMode, modes, ModeConfig } from "../../../shared/modes" +import type { ModeConfig } from "@roo-code/types" + +import { isToolAllowedForMode, modes } from "../../../shared/modes" import { TOOL_GROUPS } from "../../../shared/tools" + import { validateToolUse } from "../validateToolUse" const [codeMode, architectMode, askMode] = modes.map((mode) => mode.slug) diff --git a/src/core/tools/executeCommandTool.ts b/src/core/tools/executeCommandTool.ts index 6f5fc714a8..f20b283082 100644 --- a/src/core/tools/executeCommandTool.ts +++ b/src/core/tools/executeCommandTool.ts @@ -3,8 +3,10 @@ import * as path from "path" import delay from "delay" +import { CommandExecutionStatus } from "@roo-code/types" + import { Task } from "../task/Task" -import { CommandExecutionStatus } from "../../schemas" + import { ToolUse, AskApproval, HandleError, PushToolResult, RemoveClosingTag, ToolResponse } from "../../shared/tools" import { formatResponse } from "../prompts/responses" import { unescapeHtmlEntities } from "../../utils/text-normalization" diff --git a/src/core/tools/validateToolUse.ts b/src/core/tools/validateToolUse.ts index 0b1623f057..f0ce9e16e6 100644 --- a/src/core/tools/validateToolUse.ts +++ b/src/core/tools/validateToolUse.ts @@ -1,5 +1,6 @@ -import { ToolName } from "../../schemas" -import { Mode, isToolAllowedForMode, ModeConfig } from "../../shared/modes" +import type { ToolName, ModeConfig } from "@roo-code/types" + +import { Mode, isToolAllowedForMode } from "../../shared/modes" export function validateToolUse( toolName: ToolName, diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 43f56b8fa5..be7908fda8 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -9,25 +9,26 @@ import axios from "axios" import pWaitFor from "p-wait-for" import * as vscode from "vscode" -import { +import type { GlobalState, ProviderName, ProviderSettings, RooCodeSettings, ProviderSettingsEntry, - Package, CodeActionId, CodeActionName, TerminalActionId, TerminalActionPromptType, -} from "../../schemas" + HistoryItem, +} from "@roo-code/types" + import { t } from "../../i18n" import { setPanel } from "../../activate/registerCommands" +import { Package } from "../../shared/package" import { requestyDefaultModelId, openRouterDefaultModelId, glamaDefaultModelId } from "../../shared/api" import { findLast } from "../../shared/array" import { supportPrompt } from "../../shared/support-prompt" import { GlobalFileNames } from "../../shared/globalFileNames" -import { HistoryItem } from "../../shared/HistoryItem" import { ExtensionMessage } from "../../shared/ExtensionMessage" import { Mode, defaultModeSlug } from "../../shared/modes" import { experimentDefault } from "../../shared/experiments" diff --git a/src/core/webview/__tests__/ClineProvider.test.ts b/src/core/webview/__tests__/ClineProvider.test.ts index 72a40e7044..f141dace36 100644 --- a/src/core/webview/__tests__/ClineProvider.test.ts +++ b/src/core/webview/__tests__/ClineProvider.test.ts @@ -4,14 +4,17 @@ import Anthropic from "@anthropic-ai/sdk" import * as vscode from "vscode" import axios from "axios" -import { ClineProvider } from "../ClineProvider" -import { ProviderSettingsEntry, ClineMessage, ExtensionMessage, ExtensionState } from "../../../shared/ExtensionMessage" -import { setTtsEnabled } from "../../../utils/tts" +import type { ProviderSettingsEntry, ClineMessage } from "@roo-code/types" + +import { ExtensionMessage, ExtensionState } from "../../../shared/ExtensionMessage" import { defaultModeSlug } from "../../../shared/modes" import { experimentDefault } from "../../../shared/experiments" +import { setTtsEnabled } from "../../../utils/tts" import { ContextProxy } from "../../config/ContextProxy" import { Task, TaskOptions } from "../../task/Task" +import { ClineProvider } from "../ClineProvider" + // Mock setup must come before imports jest.mock("../../prompts/sections/custom-instructions") diff --git a/src/core/webview/webviewMessageHandler.ts b/src/core/webview/webviewMessageHandler.ts index c8fd3608e4..0acae75884 100644 --- a/src/core/webview/webviewMessageHandler.ts +++ b/src/core/webview/webviewMessageHandler.ts @@ -3,9 +3,11 @@ import fs from "fs/promises" import pWaitFor from "p-wait-for" import * as vscode from "vscode" +import type { Language, ProviderSettings, GlobalState } from "@roo-code/types" + import { ClineProvider } from "./ClineProvider" -import { Language, ProviderSettings, GlobalState, Package } from "../../schemas" import { changeLanguage, t } from "../../i18n" +import { Package } from "../../shared/package" import { RouterName, toRouterName, ModelRecord } from "../../shared/api" import { supportPrompt } from "../../shared/support-prompt" import { checkoutDiffPayloadSchema, checkoutRestorePayloadSchema, WebviewMessage } from "../../shared/WebviewMessage" diff --git a/src/esbuild.mjs b/src/esbuild.mjs index 67753c5b8a..d8c96b4ede 100644 --- a/src/esbuild.mjs +++ b/src/esbuild.mjs @@ -1,4 +1,5 @@ import * as esbuild from "esbuild" +import * as fs from "fs" import * as path from "path" import { fileURLToPath } from "url" import process from "node:process" @@ -10,6 +11,7 @@ const __filename = fileURLToPath(import.meta.url) const __dirname = path.dirname(__filename) async function main() { + const name = "extension" const production = process.argv.includes("--production") const watch = process.argv.includes("--watch") const minify = production @@ -32,12 +34,17 @@ async function main() { const buildDir = __dirname const distDir = path.join(buildDir, "dist") + if (fs.existsSync(distDir)) { + console.log(`[${name}] Cleaning dist directory: ${distDir}`) + fs.rmSync(distDir, { recursive: true, force: true }) + } + /** * @type {import('esbuild').Plugin[]} */ const plugins = [ { - name: "copy-files", + name: "copyFiles", setup(build) { build.onEnd(() => { copyPaths( @@ -55,13 +62,13 @@ async function main() { }, }, { - name: "copy-wasms", + name: "copyWasms", setup(build) { build.onEnd(() => copyWasms(srcDir, distDir)) }, }, { - name: "copy-locales", + name: "copyLocales", setup(build) { build.onEnd(() => copyLocales(srcDir, distDir)) }, @@ -91,6 +98,9 @@ async function main() { entryPoints: ["extension.ts"], outfile: "dist/extension.js", external: ["vscode"], + alias: { + "@roo-code/types": path.resolve(__dirname, "../packages/types/dist/index.js"), + }, } /** @@ -100,6 +110,9 @@ async function main() { ...buildOptions, entryPoints: ["workers/countTokens.ts"], outdir: "dist/workers", + alias: { + "@roo-code/types": path.resolve(__dirname, "../packages/types/dist/index.js"), + }, } const [extensionCtx, workerCtx] = await Promise.all([ diff --git a/src/exports/log.ts b/src/exports/log.ts deleted file mode 100644 index 1d77172fd1..0000000000 --- a/src/exports/log.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as vscode from "vscode" - -export function outputChannelLog(outputChannel: vscode.OutputChannel, ...args: unknown[]) { - for (const arg of args) { - if (arg === null) { - outputChannel.appendLine("null") - } else if (arg === undefined) { - outputChannel.appendLine("undefined") - } else if (typeof arg === "string") { - outputChannel.appendLine(arg) - } else if (arg instanceof Error) { - outputChannel.appendLine(`Error: ${arg.message}\n${arg.stack || ""}`) - } else { - try { - outputChannel.appendLine( - JSON.stringify( - arg, - (key, value) => { - if (typeof value === "bigint") return `BigInt(${value})` - if (typeof value === "function") return `Function: ${value.name || "anonymous"}` - if (typeof value === "symbol") return value.toString() - return value - }, - 2, - ), - ) - } catch (error) { - outputChannel.appendLine(`[Non-serializable object: ${Object.prototype.toString.call(arg)}]`) - } - } - } -} diff --git a/src/exports/roo-code.d.ts b/src/exports/roo-code.d.ts deleted file mode 100644 index 904eba8530..0000000000 --- a/src/exports/roo-code.d.ts +++ /dev/null @@ -1,1889 +0,0 @@ -import { EventEmitter } from "events" -import { Socket } from "node:net" - -type GlobalSettings = { - currentApiConfigName?: string | undefined - listApiConfigMeta?: - | { - id: string - name: string - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - }[] - | undefined - pinnedApiConfigs?: - | { - [x: string]: boolean - } - | undefined - lastShownAnnouncementId?: string | undefined - customInstructions?: string | undefined - taskHistory?: - | { - id: string - number: number - ts: number - task: string - tokensIn: number - tokensOut: number - cacheWrites?: number | undefined - cacheReads?: number | undefined - totalCost: number - size?: number | undefined - workspace?: string | undefined - }[] - | undefined - condensingApiConfigId?: string | undefined - customCondensingPrompt?: string | undefined - autoApprovalEnabled?: boolean | undefined - alwaysAllowReadOnly?: boolean | undefined - alwaysAllowReadOnlyOutsideWorkspace?: boolean | undefined - codebaseIndexModels?: - | { - openai?: - | { - [x: string]: { - dimension: number - } - } - | undefined - ollama?: - | { - [x: string]: { - dimension: number - } - } - | undefined - } - | undefined - codebaseIndexConfig?: - | { - codebaseIndexEnabled?: boolean | undefined - codebaseIndexQdrantUrl?: string | undefined - codebaseIndexEmbedderProvider?: ("openai" | "ollama") | undefined - codebaseIndexEmbedderBaseUrl?: string | undefined - codebaseIndexEmbedderModelId?: string | undefined - } - | undefined - alwaysAllowWrite?: boolean | undefined - alwaysAllowWriteOutsideWorkspace?: boolean | undefined - writeDelayMs?: number | undefined - alwaysAllowBrowser?: boolean | undefined - alwaysApproveResubmit?: boolean | undefined - requestDelaySeconds?: number | undefined - alwaysAllowMcp?: boolean | undefined - alwaysAllowModeSwitch?: boolean | undefined - alwaysAllowSubtasks?: boolean | undefined - alwaysAllowExecute?: boolean | undefined - allowedCommands?: string[] | undefined - allowedMaxRequests?: (number | null) | undefined - autoCondenseContextPercent?: number | undefined - browserToolEnabled?: boolean | undefined - browserViewportSize?: string | undefined - screenshotQuality?: number | undefined - remoteBrowserEnabled?: boolean | undefined - remoteBrowserHost?: string | undefined - cachedChromeHostUrl?: string | undefined - enableCheckpoints?: boolean | undefined - ttsEnabled?: boolean | undefined - ttsSpeed?: number | undefined - soundEnabled?: boolean | undefined - soundVolume?: number | undefined - maxOpenTabsContext?: number | undefined - maxWorkspaceFiles?: number | undefined - showRooIgnoredFiles?: boolean | undefined - maxReadFileLine?: number | undefined - terminalOutputLineLimit?: number | undefined - terminalShellIntegrationTimeout?: number | undefined - terminalShellIntegrationDisabled?: boolean | undefined - terminalCommandDelay?: number | undefined - terminalPowershellCounter?: boolean | undefined - terminalZshClearEolMark?: boolean | undefined - terminalZshOhMy?: boolean | undefined - terminalZshP10k?: boolean | undefined - terminalZdotdir?: boolean | undefined - terminalCompressProgressBar?: boolean | undefined - rateLimitSeconds?: number | undefined - diffEnabled?: boolean | undefined - fuzzyMatchThreshold?: number | undefined - experiments?: - | { - autoCondenseContext: boolean - powerSteering: boolean - } - | undefined - language?: - | ( - | "ca" - | "de" - | "en" - | "es" - | "fr" - | "hi" - | "it" - | "ja" - | "ko" - | "nl" - | "pl" - | "pt-BR" - | "ru" - | "tr" - | "vi" - | "zh-CN" - | "zh-TW" - ) - | undefined - telemetrySetting?: ("unset" | "enabled" | "disabled") | undefined - mcpEnabled?: boolean | undefined - enableMcpServerCreation?: boolean | undefined - mode?: string | undefined - modeApiConfigs?: - | { - [x: string]: string - } - | undefined - customModes?: - | { - slug: string - name: string - roleDefinition: string - whenToUse?: string | undefined - customInstructions?: string | undefined - groups: ( - | ("read" | "edit" | "browser" | "command" | "mcp" | "modes") - | [ - "read" | "edit" | "browser" | "command" | "mcp" | "modes", - { - fileRegex?: string | undefined - description?: string | undefined - }, - ] - )[] - source?: ("global" | "project") | undefined - }[] - | undefined - customModePrompts?: - | { - [x: string]: - | { - roleDefinition?: string | undefined - whenToUse?: string | undefined - customInstructions?: string | undefined - } - | undefined - } - | undefined - customSupportPrompts?: - | { - [x: string]: string | undefined - } - | undefined - enhancementApiConfigId?: string | undefined - historyPreviewCollapsed?: boolean | undefined -} - -type ProviderName = - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - -type ProviderSettings = { - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - includeMaxTokens?: boolean | undefined - diffEnabled?: boolean | undefined - fuzzyMatchThreshold?: number | undefined - modelTemperature?: (number | null) | undefined - rateLimitSeconds?: number | undefined - enableReasoningEffort?: boolean | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - modelMaxTokens?: number | undefined - modelMaxThinkingTokens?: number | undefined - apiModelId?: string | undefined - apiKey?: string | undefined - anthropicBaseUrl?: string | undefined - anthropicUseAuthToken?: boolean | undefined - glamaModelId?: string | undefined - glamaApiKey?: string | undefined - openRouterApiKey?: string | undefined - openRouterModelId?: string | undefined - openRouterBaseUrl?: string | undefined - openRouterSpecificProvider?: string | undefined - openRouterUseMiddleOutTransform?: boolean | undefined - awsAccessKey?: string | undefined - awsSecretKey?: string | undefined - awsSessionToken?: string | undefined - awsRegion?: string | undefined - awsUseCrossRegionInference?: boolean | undefined - awsUsePromptCache?: boolean | undefined - awsProfile?: string | undefined - awsUseProfile?: boolean | undefined - awsCustomArn?: string | undefined - vertexKeyFile?: string | undefined - vertexJsonCredentials?: string | undefined - vertexProjectId?: string | undefined - vertexRegion?: string | undefined - openAiBaseUrl?: string | undefined - openAiApiKey?: string | undefined - openAiLegacyFormat?: boolean | undefined - openAiR1FormatEnabled?: boolean | undefined - openAiModelId?: string | undefined - openAiCustomModelInfo?: - | ({ - maxTokens?: (number | null) | undefined - maxThinkingTokens?: (number | null) | undefined - contextWindow: number - supportsImages?: boolean | undefined - supportsComputerUse?: boolean | undefined - supportsPromptCache: boolean - supportsReasoningBudget?: boolean | undefined - requiredReasoningBudget?: boolean | undefined - supportsReasoningEffort?: boolean | undefined - supportedParameters?: ("max_tokens" | "temperature" | "reasoning" | "include_reasoning")[] | undefined - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - description?: string | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - minTokensPerCachePoint?: number | undefined - maxCachePoints?: number | undefined - cachableFields?: string[] | undefined - tiers?: - | { - contextWindow: number - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - }[] - | undefined - } | null) - | undefined - openAiUseAzure?: boolean | undefined - azureApiVersion?: string | undefined - openAiStreamingEnabled?: boolean | undefined - openAiHostHeader?: string | undefined - openAiHeaders?: - | { - [x: string]: string - } - | undefined - ollamaModelId?: string | undefined - ollamaBaseUrl?: string | undefined - vsCodeLmModelSelector?: - | { - vendor?: string | undefined - family?: string | undefined - version?: string | undefined - id?: string | undefined - } - | undefined - lmStudioModelId?: string | undefined - lmStudioBaseUrl?: string | undefined - lmStudioDraftModelId?: string | undefined - lmStudioSpeculativeDecodingEnabled?: boolean | undefined - geminiApiKey?: string | undefined - googleGeminiBaseUrl?: string | undefined - openAiNativeApiKey?: string | undefined - openAiNativeBaseUrl?: string | undefined - mistralApiKey?: string | undefined - mistralCodestralUrl?: string | undefined - deepSeekBaseUrl?: string | undefined - deepSeekApiKey?: string | undefined - unboundApiKey?: string | undefined - unboundModelId?: string | undefined - requestyApiKey?: string | undefined - requestyModelId?: string | undefined - fakeAi?: unknown | undefined - xaiApiKey?: string | undefined - groqApiKey?: string | undefined - chutesApiKey?: string | undefined - litellmBaseUrl?: string | undefined - litellmApiKey?: string | undefined - litellmModelId?: string | undefined - codeIndexOpenAiKey?: string | undefined - codeIndexQdrantApiKey?: string | undefined -} - -type ProviderSettingsEntry = { - id: string - name: string - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined -} - -type ClineMessage = { - ts: number - type: "ask" | "say" - ask?: - | ( - | "followup" - | "command" - | "command_output" - | "completion_result" - | "tool" - | "api_req_failed" - | "resume_task" - | "resume_completed_task" - | "mistake_limit_reached" - | "browser_action_launch" - | "use_mcp_server" - | "auto_approval_max_req_reached" - ) - | undefined - say?: - | ( - | "error" - | "api_req_started" - | "api_req_finished" - | "api_req_retried" - | "api_req_retry_delayed" - | "api_req_deleted" - | "text" - | "reasoning" - | "completion_result" - | "user_feedback" - | "user_feedback_diff" - | "command_output" - | "shell_integration_warning" - | "browser_action" - | "browser_action_result" - | "mcp_server_request_started" - | "mcp_server_response" - | "subtask_result" - | "checkpoint_saved" - | "rooignore_error" - | "diff_error" - | "condense_context" - | "codebase_search_result" - ) - | undefined - text?: string | undefined - images?: string[] | undefined - partial?: boolean | undefined - reasoning?: string | undefined - conversationHistoryIndex?: number | undefined - checkpoint?: - | { - [x: string]: unknown - } - | undefined - progressStatus?: - | { - icon?: string | undefined - text?: string | undefined - } - | undefined - contextCondense?: - | { - cost: number - prevContextTokens: number - newContextTokens: number - summary: string - } - | undefined -} - -type TokenUsage = { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number -} - -type RooCodeEvents = { - message: [ - { - taskId: string - action: "created" | "updated" - message: { - ts: number - type: "ask" | "say" - ask?: - | ( - | "followup" - | "command" - | "command_output" - | "completion_result" - | "tool" - | "api_req_failed" - | "resume_task" - | "resume_completed_task" - | "mistake_limit_reached" - | "browser_action_launch" - | "use_mcp_server" - | "auto_approval_max_req_reached" - ) - | undefined - say?: - | ( - | "error" - | "api_req_started" - | "api_req_finished" - | "api_req_retried" - | "api_req_retry_delayed" - | "api_req_deleted" - | "text" - | "reasoning" - | "completion_result" - | "user_feedback" - | "user_feedback_diff" - | "command_output" - | "shell_integration_warning" - | "browser_action" - | "browser_action_result" - | "mcp_server_request_started" - | "mcp_server_response" - | "subtask_result" - | "checkpoint_saved" - | "rooignore_error" - | "diff_error" - | "condense_context" - | "codebase_search_result" - ) - | undefined - text?: string | undefined - images?: string[] | undefined - partial?: boolean | undefined - reasoning?: string | undefined - conversationHistoryIndex?: number | undefined - checkpoint?: - | { - [x: string]: unknown - } - | undefined - progressStatus?: - | { - icon?: string | undefined - text?: string | undefined - } - | undefined - contextCondense?: - | { - cost: number - prevContextTokens: number - newContextTokens: number - summary: string - } - | undefined - } - }, - ] - taskCreated: [string] - taskStarted: [string] - taskModeSwitched: [string, string] - taskPaused: [string] - taskUnpaused: [string] - taskAskResponded: [string] - taskAborted: [string] - taskSpawned: [string, string] - taskCompleted: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - { - [x: string]: { - attempts: number - failures: number - } - }, - ] - taskTokenUsageUpdated: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - ] - taskToolFailed: [ - string, - ( - | "execute_command" - | "read_file" - | "write_to_file" - | "apply_diff" - | "insert_content" - | "search_and_replace" - | "search_files" - | "list_files" - | "list_code_definition_names" - | "browser_action" - | "use_mcp_tool" - | "access_mcp_resource" - | "ask_followup_question" - | "attempt_completion" - | "switch_mode" - | "new_task" - | "fetch_instructions" - | "codebase_search" - ), - string, - ] -} - -type IpcMessage = - | { - type: "Ack" - origin: "server" - data: { - clientId: string - pid: number - ppid: number - } - } - | { - type: "TaskCommand" - origin: "client" - clientId: string - data: - | { - commandName: "StartNewTask" - data: { - configuration: { - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - includeMaxTokens?: boolean | undefined - diffEnabled?: boolean | undefined - fuzzyMatchThreshold?: number | undefined - modelTemperature?: (number | null) | undefined - rateLimitSeconds?: number | undefined - enableReasoningEffort?: boolean | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - modelMaxTokens?: number | undefined - modelMaxThinkingTokens?: number | undefined - apiModelId?: string | undefined - apiKey?: string | undefined - anthropicBaseUrl?: string | undefined - anthropicUseAuthToken?: boolean | undefined - glamaModelId?: string | undefined - glamaApiKey?: string | undefined - openRouterApiKey?: string | undefined - openRouterModelId?: string | undefined - openRouterBaseUrl?: string | undefined - openRouterSpecificProvider?: string | undefined - openRouterUseMiddleOutTransform?: boolean | undefined - awsAccessKey?: string | undefined - awsSecretKey?: string | undefined - awsSessionToken?: string | undefined - awsRegion?: string | undefined - awsUseCrossRegionInference?: boolean | undefined - awsUsePromptCache?: boolean | undefined - awsProfile?: string | undefined - awsUseProfile?: boolean | undefined - awsCustomArn?: string | undefined - vertexKeyFile?: string | undefined - vertexJsonCredentials?: string | undefined - vertexProjectId?: string | undefined - vertexRegion?: string | undefined - openAiBaseUrl?: string | undefined - openAiApiKey?: string | undefined - openAiLegacyFormat?: boolean | undefined - openAiR1FormatEnabled?: boolean | undefined - openAiModelId?: string | undefined - openAiCustomModelInfo?: - | ({ - maxTokens?: (number | null) | undefined - maxThinkingTokens?: (number | null) | undefined - contextWindow: number - supportsImages?: boolean | undefined - supportsComputerUse?: boolean | undefined - supportsPromptCache: boolean - supportsReasoningBudget?: boolean | undefined - requiredReasoningBudget?: boolean | undefined - supportsReasoningEffort?: boolean | undefined - supportedParameters?: - | ("max_tokens" | "temperature" | "reasoning" | "include_reasoning")[] - | undefined - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - description?: string | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - minTokensPerCachePoint?: number | undefined - maxCachePoints?: number | undefined - cachableFields?: string[] | undefined - tiers?: - | { - contextWindow: number - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - }[] - | undefined - } | null) - | undefined - openAiUseAzure?: boolean | undefined - azureApiVersion?: string | undefined - openAiStreamingEnabled?: boolean | undefined - openAiHostHeader?: string | undefined - openAiHeaders?: - | { - [x: string]: string - } - | undefined - ollamaModelId?: string | undefined - ollamaBaseUrl?: string | undefined - vsCodeLmModelSelector?: - | { - vendor?: string | undefined - family?: string | undefined - version?: string | undefined - id?: string | undefined - } - | undefined - lmStudioModelId?: string | undefined - lmStudioBaseUrl?: string | undefined - lmStudioDraftModelId?: string | undefined - lmStudioSpeculativeDecodingEnabled?: boolean | undefined - geminiApiKey?: string | undefined - googleGeminiBaseUrl?: string | undefined - openAiNativeApiKey?: string | undefined - openAiNativeBaseUrl?: string | undefined - mistralApiKey?: string | undefined - mistralCodestralUrl?: string | undefined - deepSeekBaseUrl?: string | undefined - deepSeekApiKey?: string | undefined - unboundApiKey?: string | undefined - unboundModelId?: string | undefined - requestyApiKey?: string | undefined - requestyModelId?: string | undefined - fakeAi?: unknown | undefined - xaiApiKey?: string | undefined - groqApiKey?: string | undefined - chutesApiKey?: string | undefined - litellmBaseUrl?: string | undefined - litellmApiKey?: string | undefined - litellmModelId?: string | undefined - codeIndexOpenAiKey?: string | undefined - codeIndexQdrantApiKey?: string | undefined - currentApiConfigName?: string | undefined - listApiConfigMeta?: - | { - id: string - name: string - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - }[] - | undefined - pinnedApiConfigs?: - | { - [x: string]: boolean - } - | undefined - lastShownAnnouncementId?: string | undefined - customInstructions?: string | undefined - taskHistory?: - | { - id: string - number: number - ts: number - task: string - tokensIn: number - tokensOut: number - cacheWrites?: number | undefined - cacheReads?: number | undefined - totalCost: number - size?: number | undefined - workspace?: string | undefined - }[] - | undefined - condensingApiConfigId?: string | undefined - customCondensingPrompt?: string | undefined - autoApprovalEnabled?: boolean | undefined - alwaysAllowReadOnly?: boolean | undefined - alwaysAllowReadOnlyOutsideWorkspace?: boolean | undefined - codebaseIndexModels?: - | { - openai?: - | { - [x: string]: { - dimension: number - } - } - | undefined - ollama?: - | { - [x: string]: { - dimension: number - } - } - | undefined - } - | undefined - codebaseIndexConfig?: - | { - codebaseIndexEnabled?: boolean | undefined - codebaseIndexQdrantUrl?: string | undefined - codebaseIndexEmbedderProvider?: ("openai" | "ollama") | undefined - codebaseIndexEmbedderBaseUrl?: string | undefined - codebaseIndexEmbedderModelId?: string | undefined - } - | undefined - alwaysAllowWrite?: boolean | undefined - alwaysAllowWriteOutsideWorkspace?: boolean | undefined - writeDelayMs?: number | undefined - alwaysAllowBrowser?: boolean | undefined - alwaysApproveResubmit?: boolean | undefined - requestDelaySeconds?: number | undefined - alwaysAllowMcp?: boolean | undefined - alwaysAllowModeSwitch?: boolean | undefined - alwaysAllowSubtasks?: boolean | undefined - alwaysAllowExecute?: boolean | undefined - allowedCommands?: string[] | undefined - allowedMaxRequests?: (number | null) | undefined - autoCondenseContextPercent?: number | undefined - browserToolEnabled?: boolean | undefined - browserViewportSize?: string | undefined - screenshotQuality?: number | undefined - remoteBrowserEnabled?: boolean | undefined - remoteBrowserHost?: string | undefined - cachedChromeHostUrl?: string | undefined - enableCheckpoints?: boolean | undefined - ttsEnabled?: boolean | undefined - ttsSpeed?: number | undefined - soundEnabled?: boolean | undefined - soundVolume?: number | undefined - maxOpenTabsContext?: number | undefined - maxWorkspaceFiles?: number | undefined - showRooIgnoredFiles?: boolean | undefined - maxReadFileLine?: number | undefined - terminalOutputLineLimit?: number | undefined - terminalShellIntegrationTimeout?: number | undefined - terminalShellIntegrationDisabled?: boolean | undefined - terminalCommandDelay?: number | undefined - terminalPowershellCounter?: boolean | undefined - terminalZshClearEolMark?: boolean | undefined - terminalZshOhMy?: boolean | undefined - terminalZshP10k?: boolean | undefined - terminalZdotdir?: boolean | undefined - terminalCompressProgressBar?: boolean | undefined - experiments?: - | { - autoCondenseContext: boolean - powerSteering: boolean - } - | undefined - language?: - | ( - | "ca" - | "de" - | "en" - | "es" - | "fr" - | "hi" - | "it" - | "ja" - | "ko" - | "nl" - | "pl" - | "pt-BR" - | "ru" - | "tr" - | "vi" - | "zh-CN" - | "zh-TW" - ) - | undefined - telemetrySetting?: ("unset" | "enabled" | "disabled") | undefined - mcpEnabled?: boolean | undefined - enableMcpServerCreation?: boolean | undefined - mode?: string | undefined - modeApiConfigs?: - | { - [x: string]: string - } - | undefined - customModes?: - | { - slug: string - name: string - roleDefinition: string - whenToUse?: string | undefined - customInstructions?: string | undefined - groups: ( - | ("read" | "edit" | "browser" | "command" | "mcp" | "modes") - | [ - "read" | "edit" | "browser" | "command" | "mcp" | "modes", - { - fileRegex?: string | undefined - description?: string | undefined - }, - ] - )[] - source?: ("global" | "project") | undefined - }[] - | undefined - customModePrompts?: - | { - [x: string]: - | { - roleDefinition?: string | undefined - whenToUse?: string | undefined - customInstructions?: string | undefined - } - | undefined - } - | undefined - customSupportPrompts?: - | { - [x: string]: string | undefined - } - | undefined - enhancementApiConfigId?: string | undefined - historyPreviewCollapsed?: boolean | undefined - } - text: string - images?: string[] | undefined - newTab?: boolean | undefined - } - } - | { - commandName: "CancelTask" - data: string - } - | { - commandName: "CloseTask" - data: string - } - } - | { - type: "TaskEvent" - origin: "server" - relayClientId?: string | undefined - data: - | { - eventName: "message" - payload: [ - { - taskId: string - action: "created" | "updated" - message: { - ts: number - type: "ask" | "say" - ask?: - | ( - | "followup" - | "command" - | "command_output" - | "completion_result" - | "tool" - | "api_req_failed" - | "resume_task" - | "resume_completed_task" - | "mistake_limit_reached" - | "browser_action_launch" - | "use_mcp_server" - | "auto_approval_max_req_reached" - ) - | undefined - say?: - | ( - | "error" - | "api_req_started" - | "api_req_finished" - | "api_req_retried" - | "api_req_retry_delayed" - | "api_req_deleted" - | "text" - | "reasoning" - | "completion_result" - | "user_feedback" - | "user_feedback_diff" - | "command_output" - | "shell_integration_warning" - | "browser_action" - | "browser_action_result" - | "mcp_server_request_started" - | "mcp_server_response" - | "subtask_result" - | "checkpoint_saved" - | "rooignore_error" - | "diff_error" - | "condense_context" - | "codebase_search_result" - ) - | undefined - text?: string | undefined - images?: string[] | undefined - partial?: boolean | undefined - reasoning?: string | undefined - conversationHistoryIndex?: number | undefined - checkpoint?: - | { - [x: string]: unknown - } - | undefined - progressStatus?: - | { - icon?: string | undefined - text?: string | undefined - } - | undefined - contextCondense?: - | { - cost: number - prevContextTokens: number - newContextTokens: number - summary: string - } - | undefined - } - }, - ] - } - | { - eventName: "taskCreated" - payload: [string] - } - | { - eventName: "taskStarted" - payload: [string] - } - | { - eventName: "taskModeSwitched" - payload: [string, string] - } - | { - eventName: "taskPaused" - payload: [string] - } - | { - eventName: "taskUnpaused" - payload: [string] - } - | { - eventName: "taskAskResponded" - payload: [string] - } - | { - eventName: "taskAborted" - payload: [string] - } - | { - eventName: "taskSpawned" - payload: [string, string] - } - | { - eventName: "taskCompleted" - payload: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - { - [x: string]: { - attempts: number - failures: number - } - }, - ] - } - | { - eventName: "taskTokenUsageUpdated" - payload: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - ] - } - } - -type TaskCommand = - | { - commandName: "StartNewTask" - data: { - configuration: { - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - includeMaxTokens?: boolean | undefined - diffEnabled?: boolean | undefined - fuzzyMatchThreshold?: number | undefined - modelTemperature?: (number | null) | undefined - rateLimitSeconds?: number | undefined - enableReasoningEffort?: boolean | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - modelMaxTokens?: number | undefined - modelMaxThinkingTokens?: number | undefined - apiModelId?: string | undefined - apiKey?: string | undefined - anthropicBaseUrl?: string | undefined - anthropicUseAuthToken?: boolean | undefined - glamaModelId?: string | undefined - glamaApiKey?: string | undefined - openRouterApiKey?: string | undefined - openRouterModelId?: string | undefined - openRouterBaseUrl?: string | undefined - openRouterSpecificProvider?: string | undefined - openRouterUseMiddleOutTransform?: boolean | undefined - awsAccessKey?: string | undefined - awsSecretKey?: string | undefined - awsSessionToken?: string | undefined - awsRegion?: string | undefined - awsUseCrossRegionInference?: boolean | undefined - awsUsePromptCache?: boolean | undefined - awsProfile?: string | undefined - awsUseProfile?: boolean | undefined - awsCustomArn?: string | undefined - vertexKeyFile?: string | undefined - vertexJsonCredentials?: string | undefined - vertexProjectId?: string | undefined - vertexRegion?: string | undefined - openAiBaseUrl?: string | undefined - openAiApiKey?: string | undefined - openAiLegacyFormat?: boolean | undefined - openAiR1FormatEnabled?: boolean | undefined - openAiModelId?: string | undefined - openAiCustomModelInfo?: - | ({ - maxTokens?: (number | null) | undefined - maxThinkingTokens?: (number | null) | undefined - contextWindow: number - supportsImages?: boolean | undefined - supportsComputerUse?: boolean | undefined - supportsPromptCache: boolean - supportsReasoningBudget?: boolean | undefined - requiredReasoningBudget?: boolean | undefined - supportsReasoningEffort?: boolean | undefined - supportedParameters?: - | ("max_tokens" | "temperature" | "reasoning" | "include_reasoning")[] - | undefined - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - description?: string | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - minTokensPerCachePoint?: number | undefined - maxCachePoints?: number | undefined - cachableFields?: string[] | undefined - tiers?: - | { - contextWindow: number - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - }[] - | undefined - } | null) - | undefined - openAiUseAzure?: boolean | undefined - azureApiVersion?: string | undefined - openAiStreamingEnabled?: boolean | undefined - openAiHostHeader?: string | undefined - openAiHeaders?: - | { - [x: string]: string - } - | undefined - ollamaModelId?: string | undefined - ollamaBaseUrl?: string | undefined - vsCodeLmModelSelector?: - | { - vendor?: string | undefined - family?: string | undefined - version?: string | undefined - id?: string | undefined - } - | undefined - lmStudioModelId?: string | undefined - lmStudioBaseUrl?: string | undefined - lmStudioDraftModelId?: string | undefined - lmStudioSpeculativeDecodingEnabled?: boolean | undefined - geminiApiKey?: string | undefined - googleGeminiBaseUrl?: string | undefined - openAiNativeApiKey?: string | undefined - openAiNativeBaseUrl?: string | undefined - mistralApiKey?: string | undefined - mistralCodestralUrl?: string | undefined - deepSeekBaseUrl?: string | undefined - deepSeekApiKey?: string | undefined - unboundApiKey?: string | undefined - unboundModelId?: string | undefined - requestyApiKey?: string | undefined - requestyModelId?: string | undefined - fakeAi?: unknown | undefined - xaiApiKey?: string | undefined - groqApiKey?: string | undefined - chutesApiKey?: string | undefined - litellmBaseUrl?: string | undefined - litellmApiKey?: string | undefined - litellmModelId?: string | undefined - codeIndexOpenAiKey?: string | undefined - codeIndexQdrantApiKey?: string | undefined - currentApiConfigName?: string | undefined - listApiConfigMeta?: - | { - id: string - name: string - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - }[] - | undefined - pinnedApiConfigs?: - | { - [x: string]: boolean - } - | undefined - lastShownAnnouncementId?: string | undefined - customInstructions?: string | undefined - taskHistory?: - | { - id: string - number: number - ts: number - task: string - tokensIn: number - tokensOut: number - cacheWrites?: number | undefined - cacheReads?: number | undefined - totalCost: number - size?: number | undefined - workspace?: string | undefined - }[] - | undefined - condensingApiConfigId?: string | undefined - customCondensingPrompt?: string | undefined - autoApprovalEnabled?: boolean | undefined - alwaysAllowReadOnly?: boolean | undefined - alwaysAllowReadOnlyOutsideWorkspace?: boolean | undefined - codebaseIndexModels?: - | { - openai?: - | { - [x: string]: { - dimension: number - } - } - | undefined - ollama?: - | { - [x: string]: { - dimension: number - } - } - | undefined - } - | undefined - codebaseIndexConfig?: - | { - codebaseIndexEnabled?: boolean | undefined - codebaseIndexQdrantUrl?: string | undefined - codebaseIndexEmbedderProvider?: ("openai" | "ollama") | undefined - codebaseIndexEmbedderBaseUrl?: string | undefined - codebaseIndexEmbedderModelId?: string | undefined - } - | undefined - alwaysAllowWrite?: boolean | undefined - alwaysAllowWriteOutsideWorkspace?: boolean | undefined - writeDelayMs?: number | undefined - alwaysAllowBrowser?: boolean | undefined - alwaysApproveResubmit?: boolean | undefined - requestDelaySeconds?: number | undefined - alwaysAllowMcp?: boolean | undefined - alwaysAllowModeSwitch?: boolean | undefined - alwaysAllowSubtasks?: boolean | undefined - alwaysAllowExecute?: boolean | undefined - allowedCommands?: string[] | undefined - allowedMaxRequests?: (number | null) | undefined - autoCondenseContextPercent?: number | undefined - browserToolEnabled?: boolean | undefined - browserViewportSize?: string | undefined - screenshotQuality?: number | undefined - remoteBrowserEnabled?: boolean | undefined - remoteBrowserHost?: string | undefined - cachedChromeHostUrl?: string | undefined - enableCheckpoints?: boolean | undefined - ttsEnabled?: boolean | undefined - ttsSpeed?: number | undefined - soundEnabled?: boolean | undefined - soundVolume?: number | undefined - maxOpenTabsContext?: number | undefined - maxWorkspaceFiles?: number | undefined - showRooIgnoredFiles?: boolean | undefined - maxReadFileLine?: number | undefined - terminalOutputLineLimit?: number | undefined - terminalShellIntegrationTimeout?: number | undefined - terminalShellIntegrationDisabled?: boolean | undefined - terminalCommandDelay?: number | undefined - terminalPowershellCounter?: boolean | undefined - terminalZshClearEolMark?: boolean | undefined - terminalZshOhMy?: boolean | undefined - terminalZshP10k?: boolean | undefined - terminalZdotdir?: boolean | undefined - terminalCompressProgressBar?: boolean | undefined - experiments?: - | { - autoCondenseContext: boolean - powerSteering: boolean - } - | undefined - language?: - | ( - | "ca" - | "de" - | "en" - | "es" - | "fr" - | "hi" - | "it" - | "ja" - | "ko" - | "nl" - | "pl" - | "pt-BR" - | "ru" - | "tr" - | "vi" - | "zh-CN" - | "zh-TW" - ) - | undefined - telemetrySetting?: ("unset" | "enabled" | "disabled") | undefined - mcpEnabled?: boolean | undefined - enableMcpServerCreation?: boolean | undefined - mode?: string | undefined - modeApiConfigs?: - | { - [x: string]: string - } - | undefined - customModes?: - | { - slug: string - name: string - roleDefinition: string - whenToUse?: string | undefined - customInstructions?: string | undefined - groups: ( - | ("read" | "edit" | "browser" | "command" | "mcp" | "modes") - | [ - "read" | "edit" | "browser" | "command" | "mcp" | "modes", - { - fileRegex?: string | undefined - description?: string | undefined - }, - ] - )[] - source?: ("global" | "project") | undefined - }[] - | undefined - customModePrompts?: - | { - [x: string]: - | { - roleDefinition?: string | undefined - whenToUse?: string | undefined - customInstructions?: string | undefined - } - | undefined - } - | undefined - customSupportPrompts?: - | { - [x: string]: string | undefined - } - | undefined - enhancementApiConfigId?: string | undefined - historyPreviewCollapsed?: boolean | undefined - } - text: string - images?: string[] | undefined - newTab?: boolean | undefined - } - } - | { - commandName: "CancelTask" - data: string - } - | { - commandName: "CloseTask" - data: string - } - -type TaskEvent = - | { - eventName: "message" - payload: [ - { - taskId: string - action: "created" | "updated" - message: { - ts: number - type: "ask" | "say" - ask?: - | ( - | "followup" - | "command" - | "command_output" - | "completion_result" - | "tool" - | "api_req_failed" - | "resume_task" - | "resume_completed_task" - | "mistake_limit_reached" - | "browser_action_launch" - | "use_mcp_server" - | "auto_approval_max_req_reached" - ) - | undefined - say?: - | ( - | "error" - | "api_req_started" - | "api_req_finished" - | "api_req_retried" - | "api_req_retry_delayed" - | "api_req_deleted" - | "text" - | "reasoning" - | "completion_result" - | "user_feedback" - | "user_feedback_diff" - | "command_output" - | "shell_integration_warning" - | "browser_action" - | "browser_action_result" - | "mcp_server_request_started" - | "mcp_server_response" - | "subtask_result" - | "checkpoint_saved" - | "rooignore_error" - | "diff_error" - | "condense_context" - | "codebase_search_result" - ) - | undefined - text?: string | undefined - images?: string[] | undefined - partial?: boolean | undefined - reasoning?: string | undefined - conversationHistoryIndex?: number | undefined - checkpoint?: - | { - [x: string]: unknown - } - | undefined - progressStatus?: - | { - icon?: string | undefined - text?: string | undefined - } - | undefined - contextCondense?: - | { - cost: number - prevContextTokens: number - newContextTokens: number - summary: string - } - | undefined - } - }, - ] - } - | { - eventName: "taskCreated" - payload: [string] - } - | { - eventName: "taskStarted" - payload: [string] - } - | { - eventName: "taskModeSwitched" - payload: [string, string] - } - | { - eventName: "taskPaused" - payload: [string] - } - | { - eventName: "taskUnpaused" - payload: [string] - } - | { - eventName: "taskAskResponded" - payload: [string] - } - | { - eventName: "taskAborted" - payload: [string] - } - | { - eventName: "taskSpawned" - payload: [string, string] - } - | { - eventName: "taskCompleted" - payload: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - { - [x: string]: { - attempts: number - failures: number - } - }, - ] - } - | { - eventName: "taskTokenUsageUpdated" - payload: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - ] - } - -declare const Package: { - readonly publisher: string - readonly name: string - readonly version: string - readonly outputChannel: string - readonly sha: string | undefined -} -/** - * ProviderName - */ -declare const providerNames: readonly [ - "anthropic", - "glama", - "openrouter", - "bedrock", - "vertex", - "openai", - "ollama", - "vscode-lm", - "lmstudio", - "gemini", - "openai-native", - "mistral", - "deepseek", - "unbound", - "requesty", - "human-relay", - "fake-ai", - "xai", - "groq", - "chutes", - "litellm", -] -/** - * RooCodeEvent - */ -declare enum RooCodeEventName { - Message = "message", - TaskCreated = "taskCreated", - TaskStarted = "taskStarted", - TaskModeSwitched = "taskModeSwitched", - TaskPaused = "taskPaused", - TaskUnpaused = "taskUnpaused", - TaskAskResponded = "taskAskResponded", - TaskAborted = "taskAborted", - TaskSpawned = "taskSpawned", - TaskCompleted = "taskCompleted", - TaskTokenUsageUpdated = "taskTokenUsageUpdated", - TaskToolFailed = "taskToolFailed", -} -/** - * IpcMessage - */ -declare enum IpcMessageType { - Connect = "Connect", - Disconnect = "Disconnect", - Ack = "Ack", - TaskCommand = "TaskCommand", - TaskEvent = "TaskEvent", -} -declare enum IpcOrigin { - Client = "client", - Server = "server", -} - -/** - * RooCodeAPI - */ -type RooCodeSettings = GlobalSettings & ProviderSettings -interface RooCodeAPI extends EventEmitter { - /** - * Starts a new task with an optional initial message and images. - * @param task Optional initial task message. - * @param images Optional array of image data URIs (e.g., "data:image/webp;base64,..."). - * @returns The ID of the new task. - */ - startNewTask({ - configuration, - text, - images, - newTab, - }: { - configuration?: RooCodeSettings - text?: string - images?: string[] - newTab?: boolean - }): Promise - /** - * Resumes a task with the given ID. - * @param taskId The ID of the task to resume. - * @throws Error if the task is not found in the task history. - */ - resumeTask(taskId: string): Promise - /** - * Checks if a task with the given ID is in the task history. - * @param taskId The ID of the task to check. - * @returns True if the task is in the task history, false otherwise. - */ - isTaskInHistory(taskId: string): Promise - /** - * Returns the current task stack. - * @returns An array of task IDs. - */ - getCurrentTaskStack(): string[] - /** - * Clears the current task. - */ - clearCurrentTask(lastMessage?: string): Promise - /** - * Cancels the current task. - */ - cancelCurrentTask(): Promise - /** - * Sends a message to the current task. - * @param message Optional message to send. - * @param images Optional array of image data URIs (e.g., "data:image/webp;base64,..."). - */ - sendMessage(message?: string, images?: string[]): Promise - /** - * Simulates pressing the primary button in the chat interface. - */ - pressPrimaryButton(): Promise - /** - * Simulates pressing the secondary button in the chat interface. - */ - pressSecondaryButton(): Promise - /** - * Returns true if the API is ready to use. - */ - isReady(): boolean - /** - * Returns the current configuration. - * @returns The current configuration. - */ - getConfiguration(): RooCodeSettings - /** - * Sets the configuration for the current task. - * @param values An object containing key-value pairs to set. - */ - setConfiguration(values: RooCodeSettings): Promise - /** - * Returns a list of all configured profile names - * @returns Array of profile names - */ - getProfiles(): string[] - /** - * Returns the profile entry for a given name - * @param name The name of the profile - * @returns The profile entry, or undefined if the profile does not exist - */ - getProfileEntry(name: string): ProviderSettingsEntry | undefined - /** - * Creates a new API configuration profile - * @param name The name of the profile - * @param profile The profile to create; defaults to an empty object - * @param activate Whether to activate the profile after creation; defaults to true - * @returns The ID of the created profile - * @throws Error if the profile already exists - */ - createProfile(name: string, profile?: ProviderSettings, activate?: boolean): Promise - /** - * Updates an existing API configuration profile - * @param name The name of the profile - * @param profile The profile to update - * @param activate Whether to activate the profile after update; defaults to true - * @returns The ID of the updated profile - * @throws Error if the profile does not exist - */ - updateProfile(name: string, profile: ProviderSettings, activate?: boolean): Promise - /** - * Creates a new API configuration profile or updates an existing one - * @param name The name of the profile - * @param profile The profile to create or update; defaults to an empty object - * @param activate Whether to activate the profile after upsert; defaults to true - * @returns The ID of the upserted profile - */ - upsertProfile(name: string, profile: ProviderSettings, activate?: boolean): Promise - /** - * Deletes a profile by name - * @param name The name of the profile to delete - * @throws Error if the profile does not exist - */ - deleteProfile(name: string): Promise - /** - * Returns the name of the currently active profile - * @returns The profile name, or undefined if no profile is active - */ - getActiveProfile(): string | undefined - /** - * Changes the active API configuration profile - * @param name The name of the profile to activate - * @throws Error if the profile does not exist - */ - setActiveProfile(name: string): Promise -} -/** - * RooCodeIpcServer - */ -type IpcServerEvents = { - [IpcMessageType.Connect]: [clientId: string] - [IpcMessageType.Disconnect]: [clientId: string] - [IpcMessageType.TaskCommand]: [clientId: string, data: TaskCommand] - [IpcMessageType.TaskEvent]: [relayClientId: string | undefined, data: TaskEvent] -} -interface RooCodeIpcServer extends EventEmitter { - listen(): void - broadcast(message: IpcMessage): void - send(client: string | Socket, message: IpcMessage): void - get socketPath(): string - get isListening(): boolean -} - -export { - type ClineMessage, - type GlobalSettings, - type IpcMessage, - IpcMessageType, - IpcOrigin, - type IpcServerEvents, - Package, - type ProviderName, - type ProviderSettings, - type ProviderSettingsEntry, - type RooCodeAPI, - RooCodeEventName, - type RooCodeEvents, - type RooCodeIpcServer, - type RooCodeSettings, - type TaskCommand, - type TaskEvent, - type TokenUsage, - providerNames, -} diff --git a/src/exports/types.ts b/src/exports/types.ts deleted file mode 100644 index 6f4989df62..0000000000 --- a/src/exports/types.ts +++ /dev/null @@ -1,1675 +0,0 @@ -// This file is automatically generated by running `pnpm --filter roo-cline generate-types` -// Do not edit it directly. - -type GlobalSettings = { - currentApiConfigName?: string | undefined - listApiConfigMeta?: - | { - id: string - name: string - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - }[] - | undefined - pinnedApiConfigs?: - | { - [x: string]: boolean - } - | undefined - lastShownAnnouncementId?: string | undefined - customInstructions?: string | undefined - taskHistory?: - | { - id: string - number: number - ts: number - task: string - tokensIn: number - tokensOut: number - cacheWrites?: number | undefined - cacheReads?: number | undefined - totalCost: number - size?: number | undefined - workspace?: string | undefined - }[] - | undefined - condensingApiConfigId?: string | undefined - customCondensingPrompt?: string | undefined - autoApprovalEnabled?: boolean | undefined - alwaysAllowReadOnly?: boolean | undefined - alwaysAllowReadOnlyOutsideWorkspace?: boolean | undefined - codebaseIndexModels?: - | { - openai?: - | { - [x: string]: { - dimension: number - } - } - | undefined - ollama?: - | { - [x: string]: { - dimension: number - } - } - | undefined - } - | undefined - codebaseIndexConfig?: - | { - codebaseIndexEnabled?: boolean | undefined - codebaseIndexQdrantUrl?: string | undefined - codebaseIndexEmbedderProvider?: ("openai" | "ollama") | undefined - codebaseIndexEmbedderBaseUrl?: string | undefined - codebaseIndexEmbedderModelId?: string | undefined - } - | undefined - alwaysAllowWrite?: boolean | undefined - alwaysAllowWriteOutsideWorkspace?: boolean | undefined - writeDelayMs?: number | undefined - alwaysAllowBrowser?: boolean | undefined - alwaysApproveResubmit?: boolean | undefined - requestDelaySeconds?: number | undefined - alwaysAllowMcp?: boolean | undefined - alwaysAllowModeSwitch?: boolean | undefined - alwaysAllowSubtasks?: boolean | undefined - alwaysAllowExecute?: boolean | undefined - allowedCommands?: string[] | undefined - allowedMaxRequests?: (number | null) | undefined - autoCondenseContextPercent?: number | undefined - browserToolEnabled?: boolean | undefined - browserViewportSize?: string | undefined - screenshotQuality?: number | undefined - remoteBrowserEnabled?: boolean | undefined - remoteBrowserHost?: string | undefined - cachedChromeHostUrl?: string | undefined - enableCheckpoints?: boolean | undefined - ttsEnabled?: boolean | undefined - ttsSpeed?: number | undefined - soundEnabled?: boolean | undefined - soundVolume?: number | undefined - maxOpenTabsContext?: number | undefined - maxWorkspaceFiles?: number | undefined - showRooIgnoredFiles?: boolean | undefined - maxReadFileLine?: number | undefined - terminalOutputLineLimit?: number | undefined - terminalShellIntegrationTimeout?: number | undefined - terminalShellIntegrationDisabled?: boolean | undefined - terminalCommandDelay?: number | undefined - terminalPowershellCounter?: boolean | undefined - terminalZshClearEolMark?: boolean | undefined - terminalZshOhMy?: boolean | undefined - terminalZshP10k?: boolean | undefined - terminalZdotdir?: boolean | undefined - terminalCompressProgressBar?: boolean | undefined - rateLimitSeconds?: number | undefined - diffEnabled?: boolean | undefined - fuzzyMatchThreshold?: number | undefined - experiments?: - | { - autoCondenseContext: boolean - powerSteering: boolean - } - | undefined - language?: - | ( - | "ca" - | "de" - | "en" - | "es" - | "fr" - | "hi" - | "it" - | "ja" - | "ko" - | "nl" - | "pl" - | "pt-BR" - | "ru" - | "tr" - | "vi" - | "zh-CN" - | "zh-TW" - ) - | undefined - telemetrySetting?: ("unset" | "enabled" | "disabled") | undefined - mcpEnabled?: boolean | undefined - enableMcpServerCreation?: boolean | undefined - mode?: string | undefined - modeApiConfigs?: - | { - [x: string]: string - } - | undefined - customModes?: - | { - slug: string - name: string - roleDefinition: string - whenToUse?: string | undefined - customInstructions?: string | undefined - groups: ( - | ("read" | "edit" | "browser" | "command" | "mcp" | "modes") - | [ - "read" | "edit" | "browser" | "command" | "mcp" | "modes", - { - fileRegex?: string | undefined - description?: string | undefined - }, - ] - )[] - source?: ("global" | "project") | undefined - }[] - | undefined - customModePrompts?: - | { - [x: string]: - | { - roleDefinition?: string | undefined - whenToUse?: string | undefined - customInstructions?: string | undefined - } - | undefined - } - | undefined - customSupportPrompts?: - | { - [x: string]: string | undefined - } - | undefined - enhancementApiConfigId?: string | undefined - historyPreviewCollapsed?: boolean | undefined -} - -export type { GlobalSettings } - -type ProviderName = - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - -export type { ProviderName } - -type ProviderSettings = { - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - includeMaxTokens?: boolean | undefined - diffEnabled?: boolean | undefined - fuzzyMatchThreshold?: number | undefined - modelTemperature?: (number | null) | undefined - rateLimitSeconds?: number | undefined - enableReasoningEffort?: boolean | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - modelMaxTokens?: number | undefined - modelMaxThinkingTokens?: number | undefined - apiModelId?: string | undefined - apiKey?: string | undefined - anthropicBaseUrl?: string | undefined - anthropicUseAuthToken?: boolean | undefined - glamaModelId?: string | undefined - glamaApiKey?: string | undefined - openRouterApiKey?: string | undefined - openRouterModelId?: string | undefined - openRouterBaseUrl?: string | undefined - openRouterSpecificProvider?: string | undefined - openRouterUseMiddleOutTransform?: boolean | undefined - awsAccessKey?: string | undefined - awsSecretKey?: string | undefined - awsSessionToken?: string | undefined - awsRegion?: string | undefined - awsUseCrossRegionInference?: boolean | undefined - awsUsePromptCache?: boolean | undefined - awsProfile?: string | undefined - awsUseProfile?: boolean | undefined - awsCustomArn?: string | undefined - vertexKeyFile?: string | undefined - vertexJsonCredentials?: string | undefined - vertexProjectId?: string | undefined - vertexRegion?: string | undefined - openAiBaseUrl?: string | undefined - openAiApiKey?: string | undefined - openAiLegacyFormat?: boolean | undefined - openAiR1FormatEnabled?: boolean | undefined - openAiModelId?: string | undefined - openAiCustomModelInfo?: - | ({ - maxTokens?: (number | null) | undefined - maxThinkingTokens?: (number | null) | undefined - contextWindow: number - supportsImages?: boolean | undefined - supportsComputerUse?: boolean | undefined - supportsPromptCache: boolean - supportsReasoningBudget?: boolean | undefined - requiredReasoningBudget?: boolean | undefined - supportsReasoningEffort?: boolean | undefined - supportedParameters?: ("max_tokens" | "temperature" | "reasoning" | "include_reasoning")[] | undefined - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - description?: string | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - minTokensPerCachePoint?: number | undefined - maxCachePoints?: number | undefined - cachableFields?: string[] | undefined - tiers?: - | { - contextWindow: number - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - }[] - | undefined - } | null) - | undefined - openAiUseAzure?: boolean | undefined - azureApiVersion?: string | undefined - openAiStreamingEnabled?: boolean | undefined - openAiHostHeader?: string | undefined - openAiHeaders?: - | { - [x: string]: string - } - | undefined - ollamaModelId?: string | undefined - ollamaBaseUrl?: string | undefined - vsCodeLmModelSelector?: - | { - vendor?: string | undefined - family?: string | undefined - version?: string | undefined - id?: string | undefined - } - | undefined - lmStudioModelId?: string | undefined - lmStudioBaseUrl?: string | undefined - lmStudioDraftModelId?: string | undefined - lmStudioSpeculativeDecodingEnabled?: boolean | undefined - geminiApiKey?: string | undefined - googleGeminiBaseUrl?: string | undefined - openAiNativeApiKey?: string | undefined - openAiNativeBaseUrl?: string | undefined - mistralApiKey?: string | undefined - mistralCodestralUrl?: string | undefined - deepSeekBaseUrl?: string | undefined - deepSeekApiKey?: string | undefined - unboundApiKey?: string | undefined - unboundModelId?: string | undefined - requestyApiKey?: string | undefined - requestyModelId?: string | undefined - fakeAi?: unknown | undefined - xaiApiKey?: string | undefined - groqApiKey?: string | undefined - chutesApiKey?: string | undefined - litellmBaseUrl?: string | undefined - litellmApiKey?: string | undefined - litellmModelId?: string | undefined - codeIndexOpenAiKey?: string | undefined - codeIndexQdrantApiKey?: string | undefined -} - -export type { ProviderSettings } - -type ProviderSettingsEntry = { - id: string - name: string - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined -} - -export type { ProviderSettingsEntry } - -type ClineMessage = { - ts: number - type: "ask" | "say" - ask?: - | ( - | "followup" - | "command" - | "command_output" - | "completion_result" - | "tool" - | "api_req_failed" - | "resume_task" - | "resume_completed_task" - | "mistake_limit_reached" - | "browser_action_launch" - | "use_mcp_server" - | "auto_approval_max_req_reached" - ) - | undefined - say?: - | ( - | "error" - | "api_req_started" - | "api_req_finished" - | "api_req_retried" - | "api_req_retry_delayed" - | "api_req_deleted" - | "text" - | "reasoning" - | "completion_result" - | "user_feedback" - | "user_feedback_diff" - | "command_output" - | "shell_integration_warning" - | "browser_action" - | "browser_action_result" - | "mcp_server_request_started" - | "mcp_server_response" - | "subtask_result" - | "checkpoint_saved" - | "rooignore_error" - | "diff_error" - | "condense_context" - | "codebase_search_result" - ) - | undefined - text?: string | undefined - images?: string[] | undefined - partial?: boolean | undefined - reasoning?: string | undefined - conversationHistoryIndex?: number | undefined - checkpoint?: - | { - [x: string]: unknown - } - | undefined - progressStatus?: - | { - icon?: string | undefined - text?: string | undefined - } - | undefined - contextCondense?: - | { - cost: number - prevContextTokens: number - newContextTokens: number - summary: string - } - | undefined -} - -export type { ClineMessage } - -type TokenUsage = { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number -} - -export type { TokenUsage } - -type RooCodeEvents = { - message: [ - { - taskId: string - action: "created" | "updated" - message: { - ts: number - type: "ask" | "say" - ask?: - | ( - | "followup" - | "command" - | "command_output" - | "completion_result" - | "tool" - | "api_req_failed" - | "resume_task" - | "resume_completed_task" - | "mistake_limit_reached" - | "browser_action_launch" - | "use_mcp_server" - | "auto_approval_max_req_reached" - ) - | undefined - say?: - | ( - | "error" - | "api_req_started" - | "api_req_finished" - | "api_req_retried" - | "api_req_retry_delayed" - | "api_req_deleted" - | "text" - | "reasoning" - | "completion_result" - | "user_feedback" - | "user_feedback_diff" - | "command_output" - | "shell_integration_warning" - | "browser_action" - | "browser_action_result" - | "mcp_server_request_started" - | "mcp_server_response" - | "subtask_result" - | "checkpoint_saved" - | "rooignore_error" - | "diff_error" - | "condense_context" - | "codebase_search_result" - ) - | undefined - text?: string | undefined - images?: string[] | undefined - partial?: boolean | undefined - reasoning?: string | undefined - conversationHistoryIndex?: number | undefined - checkpoint?: - | { - [x: string]: unknown - } - | undefined - progressStatus?: - | { - icon?: string | undefined - text?: string | undefined - } - | undefined - contextCondense?: - | { - cost: number - prevContextTokens: number - newContextTokens: number - summary: string - } - | undefined - } - }, - ] - taskCreated: [string] - taskStarted: [string] - taskModeSwitched: [string, string] - taskPaused: [string] - taskUnpaused: [string] - taskAskResponded: [string] - taskAborted: [string] - taskSpawned: [string, string] - taskCompleted: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - { - [x: string]: { - attempts: number - failures: number - } - }, - ] - taskTokenUsageUpdated: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - ] - taskToolFailed: [ - string, - ( - | "execute_command" - | "read_file" - | "write_to_file" - | "apply_diff" - | "insert_content" - | "search_and_replace" - | "search_files" - | "list_files" - | "list_code_definition_names" - | "browser_action" - | "use_mcp_tool" - | "access_mcp_resource" - | "ask_followup_question" - | "attempt_completion" - | "switch_mode" - | "new_task" - | "fetch_instructions" - | "codebase_search" - ), - string, - ] -} - -export type { RooCodeEvents } - -type IpcMessage = - | { - type: "Ack" - origin: "server" - data: { - clientId: string - pid: number - ppid: number - } - } - | { - type: "TaskCommand" - origin: "client" - clientId: string - data: - | { - commandName: "StartNewTask" - data: { - configuration: { - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - includeMaxTokens?: boolean | undefined - diffEnabled?: boolean | undefined - fuzzyMatchThreshold?: number | undefined - modelTemperature?: (number | null) | undefined - rateLimitSeconds?: number | undefined - enableReasoningEffort?: boolean | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - modelMaxTokens?: number | undefined - modelMaxThinkingTokens?: number | undefined - apiModelId?: string | undefined - apiKey?: string | undefined - anthropicBaseUrl?: string | undefined - anthropicUseAuthToken?: boolean | undefined - glamaModelId?: string | undefined - glamaApiKey?: string | undefined - openRouterApiKey?: string | undefined - openRouterModelId?: string | undefined - openRouterBaseUrl?: string | undefined - openRouterSpecificProvider?: string | undefined - openRouterUseMiddleOutTransform?: boolean | undefined - awsAccessKey?: string | undefined - awsSecretKey?: string | undefined - awsSessionToken?: string | undefined - awsRegion?: string | undefined - awsUseCrossRegionInference?: boolean | undefined - awsUsePromptCache?: boolean | undefined - awsProfile?: string | undefined - awsUseProfile?: boolean | undefined - awsCustomArn?: string | undefined - vertexKeyFile?: string | undefined - vertexJsonCredentials?: string | undefined - vertexProjectId?: string | undefined - vertexRegion?: string | undefined - openAiBaseUrl?: string | undefined - openAiApiKey?: string | undefined - openAiLegacyFormat?: boolean | undefined - openAiR1FormatEnabled?: boolean | undefined - openAiModelId?: string | undefined - openAiCustomModelInfo?: - | ({ - maxTokens?: (number | null) | undefined - maxThinkingTokens?: (number | null) | undefined - contextWindow: number - supportsImages?: boolean | undefined - supportsComputerUse?: boolean | undefined - supportsPromptCache: boolean - supportsReasoningBudget?: boolean | undefined - requiredReasoningBudget?: boolean | undefined - supportsReasoningEffort?: boolean | undefined - supportedParameters?: - | ("max_tokens" | "temperature" | "reasoning" | "include_reasoning")[] - | undefined - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - description?: string | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - minTokensPerCachePoint?: number | undefined - maxCachePoints?: number | undefined - cachableFields?: string[] | undefined - tiers?: - | { - contextWindow: number - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - }[] - | undefined - } | null) - | undefined - openAiUseAzure?: boolean | undefined - azureApiVersion?: string | undefined - openAiStreamingEnabled?: boolean | undefined - openAiHostHeader?: string | undefined - openAiHeaders?: - | { - [x: string]: string - } - | undefined - ollamaModelId?: string | undefined - ollamaBaseUrl?: string | undefined - vsCodeLmModelSelector?: - | { - vendor?: string | undefined - family?: string | undefined - version?: string | undefined - id?: string | undefined - } - | undefined - lmStudioModelId?: string | undefined - lmStudioBaseUrl?: string | undefined - lmStudioDraftModelId?: string | undefined - lmStudioSpeculativeDecodingEnabled?: boolean | undefined - geminiApiKey?: string | undefined - googleGeminiBaseUrl?: string | undefined - openAiNativeApiKey?: string | undefined - openAiNativeBaseUrl?: string | undefined - mistralApiKey?: string | undefined - mistralCodestralUrl?: string | undefined - deepSeekBaseUrl?: string | undefined - deepSeekApiKey?: string | undefined - unboundApiKey?: string | undefined - unboundModelId?: string | undefined - requestyApiKey?: string | undefined - requestyModelId?: string | undefined - fakeAi?: unknown | undefined - xaiApiKey?: string | undefined - groqApiKey?: string | undefined - chutesApiKey?: string | undefined - litellmBaseUrl?: string | undefined - litellmApiKey?: string | undefined - litellmModelId?: string | undefined - codeIndexOpenAiKey?: string | undefined - codeIndexQdrantApiKey?: string | undefined - currentApiConfigName?: string | undefined - listApiConfigMeta?: - | { - id: string - name: string - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - }[] - | undefined - pinnedApiConfigs?: - | { - [x: string]: boolean - } - | undefined - lastShownAnnouncementId?: string | undefined - customInstructions?: string | undefined - taskHistory?: - | { - id: string - number: number - ts: number - task: string - tokensIn: number - tokensOut: number - cacheWrites?: number | undefined - cacheReads?: number | undefined - totalCost: number - size?: number | undefined - workspace?: string | undefined - }[] - | undefined - condensingApiConfigId?: string | undefined - customCondensingPrompt?: string | undefined - autoApprovalEnabled?: boolean | undefined - alwaysAllowReadOnly?: boolean | undefined - alwaysAllowReadOnlyOutsideWorkspace?: boolean | undefined - codebaseIndexModels?: - | { - openai?: - | { - [x: string]: { - dimension: number - } - } - | undefined - ollama?: - | { - [x: string]: { - dimension: number - } - } - | undefined - } - | undefined - codebaseIndexConfig?: - | { - codebaseIndexEnabled?: boolean | undefined - codebaseIndexQdrantUrl?: string | undefined - codebaseIndexEmbedderProvider?: ("openai" | "ollama") | undefined - codebaseIndexEmbedderBaseUrl?: string | undefined - codebaseIndexEmbedderModelId?: string | undefined - } - | undefined - alwaysAllowWrite?: boolean | undefined - alwaysAllowWriteOutsideWorkspace?: boolean | undefined - writeDelayMs?: number | undefined - alwaysAllowBrowser?: boolean | undefined - alwaysApproveResubmit?: boolean | undefined - requestDelaySeconds?: number | undefined - alwaysAllowMcp?: boolean | undefined - alwaysAllowModeSwitch?: boolean | undefined - alwaysAllowSubtasks?: boolean | undefined - alwaysAllowExecute?: boolean | undefined - allowedCommands?: string[] | undefined - allowedMaxRequests?: (number | null) | undefined - autoCondenseContextPercent?: number | undefined - browserToolEnabled?: boolean | undefined - browserViewportSize?: string | undefined - screenshotQuality?: number | undefined - remoteBrowserEnabled?: boolean | undefined - remoteBrowserHost?: string | undefined - cachedChromeHostUrl?: string | undefined - enableCheckpoints?: boolean | undefined - ttsEnabled?: boolean | undefined - ttsSpeed?: number | undefined - soundEnabled?: boolean | undefined - soundVolume?: number | undefined - maxOpenTabsContext?: number | undefined - maxWorkspaceFiles?: number | undefined - showRooIgnoredFiles?: boolean | undefined - maxReadFileLine?: number | undefined - terminalOutputLineLimit?: number | undefined - terminalShellIntegrationTimeout?: number | undefined - terminalShellIntegrationDisabled?: boolean | undefined - terminalCommandDelay?: number | undefined - terminalPowershellCounter?: boolean | undefined - terminalZshClearEolMark?: boolean | undefined - terminalZshOhMy?: boolean | undefined - terminalZshP10k?: boolean | undefined - terminalZdotdir?: boolean | undefined - terminalCompressProgressBar?: boolean | undefined - experiments?: - | { - autoCondenseContext: boolean - powerSteering: boolean - } - | undefined - language?: - | ( - | "ca" - | "de" - | "en" - | "es" - | "fr" - | "hi" - | "it" - | "ja" - | "ko" - | "nl" - | "pl" - | "pt-BR" - | "ru" - | "tr" - | "vi" - | "zh-CN" - | "zh-TW" - ) - | undefined - telemetrySetting?: ("unset" | "enabled" | "disabled") | undefined - mcpEnabled?: boolean | undefined - enableMcpServerCreation?: boolean | undefined - mode?: string | undefined - modeApiConfigs?: - | { - [x: string]: string - } - | undefined - customModes?: - | { - slug: string - name: string - roleDefinition: string - whenToUse?: string | undefined - customInstructions?: string | undefined - groups: ( - | ("read" | "edit" | "browser" | "command" | "mcp" | "modes") - | [ - "read" | "edit" | "browser" | "command" | "mcp" | "modes", - { - fileRegex?: string | undefined - description?: string | undefined - }, - ] - )[] - source?: ("global" | "project") | undefined - }[] - | undefined - customModePrompts?: - | { - [x: string]: - | { - roleDefinition?: string | undefined - whenToUse?: string | undefined - customInstructions?: string | undefined - } - | undefined - } - | undefined - customSupportPrompts?: - | { - [x: string]: string | undefined - } - | undefined - enhancementApiConfigId?: string | undefined - historyPreviewCollapsed?: boolean | undefined - } - text: string - images?: string[] | undefined - newTab?: boolean | undefined - } - } - | { - commandName: "CancelTask" - data: string - } - | { - commandName: "CloseTask" - data: string - } - } - | { - type: "TaskEvent" - origin: "server" - relayClientId?: string | undefined - data: - | { - eventName: "message" - payload: [ - { - taskId: string - action: "created" | "updated" - message: { - ts: number - type: "ask" | "say" - ask?: - | ( - | "followup" - | "command" - | "command_output" - | "completion_result" - | "tool" - | "api_req_failed" - | "resume_task" - | "resume_completed_task" - | "mistake_limit_reached" - | "browser_action_launch" - | "use_mcp_server" - | "auto_approval_max_req_reached" - ) - | undefined - say?: - | ( - | "error" - | "api_req_started" - | "api_req_finished" - | "api_req_retried" - | "api_req_retry_delayed" - | "api_req_deleted" - | "text" - | "reasoning" - | "completion_result" - | "user_feedback" - | "user_feedback_diff" - | "command_output" - | "shell_integration_warning" - | "browser_action" - | "browser_action_result" - | "mcp_server_request_started" - | "mcp_server_response" - | "subtask_result" - | "checkpoint_saved" - | "rooignore_error" - | "diff_error" - | "condense_context" - | "codebase_search_result" - ) - | undefined - text?: string | undefined - images?: string[] | undefined - partial?: boolean | undefined - reasoning?: string | undefined - conversationHistoryIndex?: number | undefined - checkpoint?: - | { - [x: string]: unknown - } - | undefined - progressStatus?: - | { - icon?: string | undefined - text?: string | undefined - } - | undefined - contextCondense?: - | { - cost: number - prevContextTokens: number - newContextTokens: number - summary: string - } - | undefined - } - }, - ] - } - | { - eventName: "taskCreated" - payload: [string] - } - | { - eventName: "taskStarted" - payload: [string] - } - | { - eventName: "taskModeSwitched" - payload: [string, string] - } - | { - eventName: "taskPaused" - payload: [string] - } - | { - eventName: "taskUnpaused" - payload: [string] - } - | { - eventName: "taskAskResponded" - payload: [string] - } - | { - eventName: "taskAborted" - payload: [string] - } - | { - eventName: "taskSpawned" - payload: [string, string] - } - | { - eventName: "taskCompleted" - payload: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - { - [x: string]: { - attempts: number - failures: number - } - }, - ] - } - | { - eventName: "taskTokenUsageUpdated" - payload: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - ] - } - } - -export type { IpcMessage } - -type TaskCommand = - | { - commandName: "StartNewTask" - data: { - configuration: { - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - includeMaxTokens?: boolean | undefined - diffEnabled?: boolean | undefined - fuzzyMatchThreshold?: number | undefined - modelTemperature?: (number | null) | undefined - rateLimitSeconds?: number | undefined - enableReasoningEffort?: boolean | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - modelMaxTokens?: number | undefined - modelMaxThinkingTokens?: number | undefined - apiModelId?: string | undefined - apiKey?: string | undefined - anthropicBaseUrl?: string | undefined - anthropicUseAuthToken?: boolean | undefined - glamaModelId?: string | undefined - glamaApiKey?: string | undefined - openRouterApiKey?: string | undefined - openRouterModelId?: string | undefined - openRouterBaseUrl?: string | undefined - openRouterSpecificProvider?: string | undefined - openRouterUseMiddleOutTransform?: boolean | undefined - awsAccessKey?: string | undefined - awsSecretKey?: string | undefined - awsSessionToken?: string | undefined - awsRegion?: string | undefined - awsUseCrossRegionInference?: boolean | undefined - awsUsePromptCache?: boolean | undefined - awsProfile?: string | undefined - awsUseProfile?: boolean | undefined - awsCustomArn?: string | undefined - vertexKeyFile?: string | undefined - vertexJsonCredentials?: string | undefined - vertexProjectId?: string | undefined - vertexRegion?: string | undefined - openAiBaseUrl?: string | undefined - openAiApiKey?: string | undefined - openAiLegacyFormat?: boolean | undefined - openAiR1FormatEnabled?: boolean | undefined - openAiModelId?: string | undefined - openAiCustomModelInfo?: - | ({ - maxTokens?: (number | null) | undefined - maxThinkingTokens?: (number | null) | undefined - contextWindow: number - supportsImages?: boolean | undefined - supportsComputerUse?: boolean | undefined - supportsPromptCache: boolean - supportsReasoningBudget?: boolean | undefined - requiredReasoningBudget?: boolean | undefined - supportsReasoningEffort?: boolean | undefined - supportedParameters?: - | ("max_tokens" | "temperature" | "reasoning" | "include_reasoning")[] - | undefined - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - description?: string | undefined - reasoningEffort?: ("low" | "medium" | "high") | undefined - minTokensPerCachePoint?: number | undefined - maxCachePoints?: number | undefined - cachableFields?: string[] | undefined - tiers?: - | { - contextWindow: number - inputPrice?: number | undefined - outputPrice?: number | undefined - cacheWritesPrice?: number | undefined - cacheReadsPrice?: number | undefined - }[] - | undefined - } | null) - | undefined - openAiUseAzure?: boolean | undefined - azureApiVersion?: string | undefined - openAiStreamingEnabled?: boolean | undefined - openAiHostHeader?: string | undefined - openAiHeaders?: - | { - [x: string]: string - } - | undefined - ollamaModelId?: string | undefined - ollamaBaseUrl?: string | undefined - vsCodeLmModelSelector?: - | { - vendor?: string | undefined - family?: string | undefined - version?: string | undefined - id?: string | undefined - } - | undefined - lmStudioModelId?: string | undefined - lmStudioBaseUrl?: string | undefined - lmStudioDraftModelId?: string | undefined - lmStudioSpeculativeDecodingEnabled?: boolean | undefined - geminiApiKey?: string | undefined - googleGeminiBaseUrl?: string | undefined - openAiNativeApiKey?: string | undefined - openAiNativeBaseUrl?: string | undefined - mistralApiKey?: string | undefined - mistralCodestralUrl?: string | undefined - deepSeekBaseUrl?: string | undefined - deepSeekApiKey?: string | undefined - unboundApiKey?: string | undefined - unboundModelId?: string | undefined - requestyApiKey?: string | undefined - requestyModelId?: string | undefined - fakeAi?: unknown | undefined - xaiApiKey?: string | undefined - groqApiKey?: string | undefined - chutesApiKey?: string | undefined - litellmBaseUrl?: string | undefined - litellmApiKey?: string | undefined - litellmModelId?: string | undefined - codeIndexOpenAiKey?: string | undefined - codeIndexQdrantApiKey?: string | undefined - currentApiConfigName?: string | undefined - listApiConfigMeta?: - | { - id: string - name: string - apiProvider?: - | ( - | "anthropic" - | "glama" - | "openrouter" - | "bedrock" - | "vertex" - | "openai" - | "ollama" - | "vscode-lm" - | "lmstudio" - | "gemini" - | "openai-native" - | "mistral" - | "deepseek" - | "unbound" - | "requesty" - | "human-relay" - | "fake-ai" - | "xai" - | "groq" - | "chutes" - | "litellm" - ) - | undefined - }[] - | undefined - pinnedApiConfigs?: - | { - [x: string]: boolean - } - | undefined - lastShownAnnouncementId?: string | undefined - customInstructions?: string | undefined - taskHistory?: - | { - id: string - number: number - ts: number - task: string - tokensIn: number - tokensOut: number - cacheWrites?: number | undefined - cacheReads?: number | undefined - totalCost: number - size?: number | undefined - workspace?: string | undefined - }[] - | undefined - condensingApiConfigId?: string | undefined - customCondensingPrompt?: string | undefined - autoApprovalEnabled?: boolean | undefined - alwaysAllowReadOnly?: boolean | undefined - alwaysAllowReadOnlyOutsideWorkspace?: boolean | undefined - codebaseIndexModels?: - | { - openai?: - | { - [x: string]: { - dimension: number - } - } - | undefined - ollama?: - | { - [x: string]: { - dimension: number - } - } - | undefined - } - | undefined - codebaseIndexConfig?: - | { - codebaseIndexEnabled?: boolean | undefined - codebaseIndexQdrantUrl?: string | undefined - codebaseIndexEmbedderProvider?: ("openai" | "ollama") | undefined - codebaseIndexEmbedderBaseUrl?: string | undefined - codebaseIndexEmbedderModelId?: string | undefined - } - | undefined - alwaysAllowWrite?: boolean | undefined - alwaysAllowWriteOutsideWorkspace?: boolean | undefined - writeDelayMs?: number | undefined - alwaysAllowBrowser?: boolean | undefined - alwaysApproveResubmit?: boolean | undefined - requestDelaySeconds?: number | undefined - alwaysAllowMcp?: boolean | undefined - alwaysAllowModeSwitch?: boolean | undefined - alwaysAllowSubtasks?: boolean | undefined - alwaysAllowExecute?: boolean | undefined - allowedCommands?: string[] | undefined - allowedMaxRequests?: (number | null) | undefined - autoCondenseContextPercent?: number | undefined - browserToolEnabled?: boolean | undefined - browserViewportSize?: string | undefined - screenshotQuality?: number | undefined - remoteBrowserEnabled?: boolean | undefined - remoteBrowserHost?: string | undefined - cachedChromeHostUrl?: string | undefined - enableCheckpoints?: boolean | undefined - ttsEnabled?: boolean | undefined - ttsSpeed?: number | undefined - soundEnabled?: boolean | undefined - soundVolume?: number | undefined - maxOpenTabsContext?: number | undefined - maxWorkspaceFiles?: number | undefined - showRooIgnoredFiles?: boolean | undefined - maxReadFileLine?: number | undefined - terminalOutputLineLimit?: number | undefined - terminalShellIntegrationTimeout?: number | undefined - terminalShellIntegrationDisabled?: boolean | undefined - terminalCommandDelay?: number | undefined - terminalPowershellCounter?: boolean | undefined - terminalZshClearEolMark?: boolean | undefined - terminalZshOhMy?: boolean | undefined - terminalZshP10k?: boolean | undefined - terminalZdotdir?: boolean | undefined - terminalCompressProgressBar?: boolean | undefined - experiments?: - | { - autoCondenseContext: boolean - powerSteering: boolean - } - | undefined - language?: - | ( - | "ca" - | "de" - | "en" - | "es" - | "fr" - | "hi" - | "it" - | "ja" - | "ko" - | "nl" - | "pl" - | "pt-BR" - | "ru" - | "tr" - | "vi" - | "zh-CN" - | "zh-TW" - ) - | undefined - telemetrySetting?: ("unset" | "enabled" | "disabled") | undefined - mcpEnabled?: boolean | undefined - enableMcpServerCreation?: boolean | undefined - mode?: string | undefined - modeApiConfigs?: - | { - [x: string]: string - } - | undefined - customModes?: - | { - slug: string - name: string - roleDefinition: string - whenToUse?: string | undefined - customInstructions?: string | undefined - groups: ( - | ("read" | "edit" | "browser" | "command" | "mcp" | "modes") - | [ - "read" | "edit" | "browser" | "command" | "mcp" | "modes", - { - fileRegex?: string | undefined - description?: string | undefined - }, - ] - )[] - source?: ("global" | "project") | undefined - }[] - | undefined - customModePrompts?: - | { - [x: string]: - | { - roleDefinition?: string | undefined - whenToUse?: string | undefined - customInstructions?: string | undefined - } - | undefined - } - | undefined - customSupportPrompts?: - | { - [x: string]: string | undefined - } - | undefined - enhancementApiConfigId?: string | undefined - historyPreviewCollapsed?: boolean | undefined - } - text: string - images?: string[] | undefined - newTab?: boolean | undefined - } - } - | { - commandName: "CancelTask" - data: string - } - | { - commandName: "CloseTask" - data: string - } - -export type { TaskCommand } - -type TaskEvent = - | { - eventName: "message" - payload: [ - { - taskId: string - action: "created" | "updated" - message: { - ts: number - type: "ask" | "say" - ask?: - | ( - | "followup" - | "command" - | "command_output" - | "completion_result" - | "tool" - | "api_req_failed" - | "resume_task" - | "resume_completed_task" - | "mistake_limit_reached" - | "browser_action_launch" - | "use_mcp_server" - | "auto_approval_max_req_reached" - ) - | undefined - say?: - | ( - | "error" - | "api_req_started" - | "api_req_finished" - | "api_req_retried" - | "api_req_retry_delayed" - | "api_req_deleted" - | "text" - | "reasoning" - | "completion_result" - | "user_feedback" - | "user_feedback_diff" - | "command_output" - | "shell_integration_warning" - | "browser_action" - | "browser_action_result" - | "mcp_server_request_started" - | "mcp_server_response" - | "subtask_result" - | "checkpoint_saved" - | "rooignore_error" - | "diff_error" - | "condense_context" - | "codebase_search_result" - ) - | undefined - text?: string | undefined - images?: string[] | undefined - partial?: boolean | undefined - reasoning?: string | undefined - conversationHistoryIndex?: number | undefined - checkpoint?: - | { - [x: string]: unknown - } - | undefined - progressStatus?: - | { - icon?: string | undefined - text?: string | undefined - } - | undefined - contextCondense?: - | { - cost: number - prevContextTokens: number - newContextTokens: number - summary: string - } - | undefined - } - }, - ] - } - | { - eventName: "taskCreated" - payload: [string] - } - | { - eventName: "taskStarted" - payload: [string] - } - | { - eventName: "taskModeSwitched" - payload: [string, string] - } - | { - eventName: "taskPaused" - payload: [string] - } - | { - eventName: "taskUnpaused" - payload: [string] - } - | { - eventName: "taskAskResponded" - payload: [string] - } - | { - eventName: "taskAborted" - payload: [string] - } - | { - eventName: "taskSpawned" - payload: [string, string] - } - | { - eventName: "taskCompleted" - payload: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - { - [x: string]: { - attempts: number - failures: number - } - }, - ] - } - | { - eventName: "taskTokenUsageUpdated" - payload: [ - string, - { - totalTokensIn: number - totalTokensOut: number - totalCacheWrites?: number | undefined - totalCacheReads?: number | undefined - totalCost: number - contextTokens: number - }, - ] - } - -export type { TaskEvent } diff --git a/src/extension.ts b/src/extension.ts index 0244e425f8..db4edd7b26 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -14,17 +14,17 @@ try { import "./utils/path" // Necessary to have access to String.prototype.toPosix. -import { Package } from "./schemas" +import { Package } from "./shared/package" +import { formatLanguage } from "./shared/language" import { ContextProxy } from "./core/config/ContextProxy" import { ClineProvider } from "./core/webview/ClineProvider" import { DIFF_VIEW_URI_SCHEME } from "./integrations/editor/DiffViewProvider" import { TerminalRegistry } from "./integrations/terminal/TerminalRegistry" import { McpServerManager } from "./services/mcp/McpServerManager" import { telemetryService } from "./services/telemetry/TelemetryService" -import { API } from "./exports/api" -import { migrateSettings } from "./utils/migrateSettings" -import { formatLanguage } from "./shared/language" import { CodeIndexManager } from "./services/code-index/manager" +import { migrateSettings } from "./utils/migrateSettings" +import { API } from "./extension/api" import { handleUri, diff --git a/src/exports/api.ts b/src/extension/api.ts similarity index 90% rename from src/exports/api.ts rename to src/extension/api.ts index 17728f3019..f9b8e7a69a 100644 --- a/src/exports/api.ts +++ b/src/extension/api.ts @@ -3,11 +3,8 @@ import * as vscode from "vscode" import fs from "fs/promises" import * as path from "path" -import { Package } from "../schemas" -import { getWorkspacePath } from "../utils/path" -import { ClineProvider } from "../core/webview/ClineProvider" -import { openClineInNewTab } from "../activate/registerCommands" import { + RooCodeAPI, RooCodeSettings, RooCodeEvents, RooCodeEventName, @@ -18,11 +15,14 @@ import { IpcMessageType, TaskCommandName, TaskEvent, -} from "../schemas" +} from "@roo-code/types" + +import { Package } from "../shared/package" +import { getWorkspacePath } from "../utils/path" +import { ClineProvider } from "../core/webview/ClineProvider" +import { openClineInNewTab } from "../activate/registerCommands" -import { RooCodeAPI } from "./interface" -import { IpcServer } from "./ipc" -import { outputChannelLog } from "./log" +import { IpcServer } from "./ipc-server" export class API extends EventEmitter implements RooCodeAPI { private readonly outputChannel: vscode.OutputChannel @@ -47,7 +47,7 @@ export class API extends EventEmitter implements RooCodeAPI { if (enableLogging) { this.log = (...args: unknown[]) => { - outputChannelLog(this.outputChannel, ...args) + this.outputChannelLog(...args) console.log(args) } @@ -243,6 +243,39 @@ export class API extends EventEmitter implements RooCodeAPI { }) } + // Logging + + private outputChannelLog(...args: unknown[]) { + for (const arg of args) { + if (arg === null) { + this.outputChannel.appendLine("null") + } else if (arg === undefined) { + this.outputChannel.appendLine("undefined") + } else if (typeof arg === "string") { + this.outputChannel.appendLine(arg) + } else if (arg instanceof Error) { + this.outputChannel.appendLine(`Error: ${arg.message}\n${arg.stack || ""}`) + } else { + try { + this.outputChannel.appendLine( + JSON.stringify( + arg, + (key, value) => { + if (typeof value === "bigint") return `BigInt(${value})` + if (typeof value === "function") return `Function: ${value.name || "anonymous"}` + if (typeof value === "symbol") return value.toString() + return value + }, + 2, + ), + ) + } catch (error) { + this.outputChannel.appendLine(`[Non-serializable object: ${Object.prototype.toString.call(arg)}]`) + } + } + } + } + private async fileLog(message: string) { if (!this.logfile) { return diff --git a/src/exports/ipc.ts b/src/extension/ipc-server.ts similarity index 95% rename from src/exports/ipc.ts rename to src/extension/ipc-server.ts index 85950c5ee6..3903846243 100644 --- a/src/exports/ipc.ts +++ b/src/extension/ipc-server.ts @@ -4,8 +4,14 @@ import * as crypto from "node:crypto" import ipc from "node-ipc" -import { IpcOrigin, IpcMessageType, type IpcMessage, ipcMessageSchema } from "../schemas" -import type { IpcServerEvents, RooCodeIpcServer } from "./interface" +import { + type IpcServerEvents, + type RooCodeIpcServer, + IpcOrigin, + IpcMessageType, + type IpcMessage, + ipcMessageSchema, +} from "@roo-code/types" /** * IpcServer diff --git a/src/integrations/diagnostics/__tests__/diagnostics.test.ts b/src/integrations/diagnostics/__tests__/diagnostics.test.ts index 3cf9ede4f6..874ce40b09 100644 --- a/src/integrations/diagnostics/__tests__/diagnostics.test.ts +++ b/src/integrations/diagnostics/__tests__/diagnostics.test.ts @@ -1,5 +1,6 @@ import * as vscode from "vscode" -import { diagnosticsToProblemsString } from ".." + +import { diagnosticsToProblemsString } from "../index" // Mock path module jest.mock("path", () => ({ diff --git a/src/integrations/theme/getTheme.ts b/src/integrations/theme/getTheme.ts index 7951b9e2c0..20171cc304 100644 --- a/src/integrations/theme/getTheme.ts +++ b/src/integrations/theme/getTheme.ts @@ -3,7 +3,7 @@ import * as path from "path" import * as fs from "fs/promises" import { convertTheme } from "monaco-vscode-textmate-theme-converter/lib/cjs" -import { Package } from "../../schemas" +import { Package } from "../../shared/package" const defaultThemes: Record = { "Default Dark Modern": "dark_modern", diff --git a/src/package.json b/src/package.json index c76298e59a..dba6499244 100644 --- a/src/package.json +++ b/src/package.json @@ -320,19 +320,16 @@ "scripts": { "lint": "eslint . --ext=ts --max-warnings=0", "check-types": "tsc --noEmit", - "pretest": "pnpm bundle", + "pretest": "turbo run bundle --cwd ..", "test": "jest -w=40% && vitest run --globals", "format": "prettier --write .", - "bundle": "pnpm clean && pnpm --filter @roo-code/build build && node esbuild.mjs", - "build": "pnpm bundle --production && pnpm --filter @roo-code/vscode-webview build", - "build:development": "pnpm bundle && pnpm --filter @roo-code/vscode-webview build", - "publish:marketplace": "vsce publish --no-dependencies && ovsx publish --no-dependencies", - "vscode:prepublish": "pnpm build", + "bundle": "node esbuild.mjs", + "vscode:prepublish": "pnpm bundle --production", "vsix": "mkdirp ../bin && npx vsce package --no-dependencies --out ../bin", + "publish:marketplace": "vsce publish --no-dependencies && ovsx publish --no-dependencies", "watch:esbuild": "pnpm bundle --watch", "watch:tsc": "tsc --noEmit --watch --project tsconfig.json", - "generate-types": "tsx scripts/generate-types.mts", - "clean": "rimraf README.md CHANGELOG.md LICENSE dist webview-ui out .turbo" + "clean": "rimraf README.md CHANGELOG.md LICENSE dist webview-ui out mock .turbo" }, "dependencies": { "@anthropic-ai/bedrock-sdk": "^0.10.2", @@ -343,6 +340,7 @@ "@google/genai": "^0.13.0", "@mistralai/mistralai": "^1.3.6", "@modelcontextprotocol/sdk": "^1.9.0", + "@roo-code/types": "workspace:^", "@qdrant/js-client-rest": "^1.14.0", "@types/lodash.debounce": "^4.0.9", "@vscode/codicons": "^0.0.36", diff --git a/src/schemas/__tests__/index.test.ts b/src/schemas/__tests__/index.test.ts deleted file mode 100644 index 1780ce04a8..0000000000 --- a/src/schemas/__tests__/index.test.ts +++ /dev/null @@ -1,41 +0,0 @@ -// npx jest src/schemas/__tests__/index.test.ts - -import { contributes } from "../../package.json" - -import { GLOBAL_STATE_KEYS, Package, codeActionIds, terminalActionIds, commandIds } from "../index" - -describe("GLOBAL_STATE_KEYS", () => { - it("should contain provider settings keys", () => { - expect(GLOBAL_STATE_KEYS).toContain("autoApprovalEnabled") - }) - - it("should contain provider settings keys", () => { - expect(GLOBAL_STATE_KEYS).toContain("anthropicBaseUrl") - }) - - it("should not contain secret state keys", () => { - expect(GLOBAL_STATE_KEYS).not.toContain("openRouterApiKey") - }) -}) - -describe("package.json#contributes", () => { - it("is in sync with the schema's commands", () => { - // These aren't explicitly referenced in package.json despite - // being registered by the extension. - const absent = new Set([ - "activationCompleted", - "showHumanRelayDialog", - "registerHumanRelayCallback", - "unregisterHumanRelayCallback", - "handleHumanRelayResponse", - ]) - - // This test will notify us if package.json drifts from the schema. - expect(contributes.commands.map((command) => command.command).sort()).toEqual( - [...new Set([...commandIds, ...terminalActionIds, ...codeActionIds])] - .filter((id) => !absent.has(id)) - .map((id) => `${Package.name}.${id}`) - .sort(), - ) - }) -}) diff --git a/src/scripts/generate-types.mts b/src/scripts/generate-types.mts deleted file mode 100644 index fc67c005b2..0000000000 --- a/src/scripts/generate-types.mts +++ /dev/null @@ -1,34 +0,0 @@ -import path from "path" -import fs from "fs" - -import { zodToTs, createTypeAlias, printNode } from "zod-to-ts" -import { $ } from "execa" - -import schemas from "../schemas" - -const { typeDefinitions } = schemas - -async function main() { - const types: string[] = [ - "// This file is automatically generated by running `pnpm --filter roo-cline generate-types`\n// Do not edit it directly.", - ] - - for (const { schema, identifier } of typeDefinitions) { - types.push(printNode(createTypeAlias(zodToTs(schema, identifier).node, identifier))) - types.push(`export type { ${identifier} }`) - } - - fs.writeFileSync("exports/types.ts", types.join("\n\n")) - - await $`npx tsup exports/interface.ts --dts -d out` - fs.copyFileSync("out/interface.d.ts", "exports/roo-code.d.ts") - - await $`npx prettier --write exports/types.ts exports/roo-code.d.ts` - - if (fs.existsSync(path.join("..", "..", "Roo-Code-Types", "src"))) { - fs.copyFileSync("out/interface.js", path.join("..", "..", "Roo-Code-Types", "src", "index.js")) - fs.copyFileSync("out/interface.d.ts", path.join("..", "..", "Roo-Code-Types", "src", "index.d.ts")) - } -} - -main() diff --git a/src/shared/ExtensionMessage.ts b/src/shared/ExtensionMessage.ts index cd1efbe983..5586e1327b 100644 --- a/src/shared/ExtensionMessage.ts +++ b/src/shared/ExtensionMessage.ts @@ -1,6 +1,4 @@ -import { GitCommit } from "../utils/git" - -import { +import type { GlobalSettings, ProviderSettingsEntry, ProviderSettings, @@ -8,17 +6,15 @@ import { ModeConfig, TelemetrySetting, ExperimentId, - ClineAsk, - ClineSay, - ToolProgressStatus, ClineMessage, -} from "../schemas" +} from "@roo-code/types" + +import { GitCommit } from "../utils/git" + import { McpServer } from "./mcp" import { Mode } from "./modes" import { RouterModels } from "./api" -export type { ProviderSettingsEntry, ToolProgressStatus } - export interface LanguageModelChatSelector { vendor?: string family?: string @@ -217,8 +213,6 @@ export type ExtensionState = Pick< autoCondenseContextPercent: number } -export type { ClineMessage, ClineAsk, ClineSay } - export interface ClineSayTool { tool: | "editedExistingFile" diff --git a/src/shared/HistoryItem.ts b/src/shared/HistoryItem.ts deleted file mode 100644 index 0bc5528302..0000000000 --- a/src/shared/HistoryItem.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { HistoryItem } from "../schemas" - -export type { HistoryItem } diff --git a/src/shared/WebviewMessage.ts b/src/shared/WebviewMessage.ts index 85a12aa238..9ce596deb7 100644 --- a/src/shared/WebviewMessage.ts +++ b/src/shared/WebviewMessage.ts @@ -1,7 +1,8 @@ import { z } from "zod" -import { ProviderSettings } from "./api" -import { Mode, PromptComponent, ModeConfig } from "./modes" +import type { ProviderSettings, PromptComponent, ModeConfig } from "@roo-code/types" + +import { Mode } from "./modes" export type ClineAskResponse = "yesButtonClicked" | "noButtonClicked" | "messageResponse" diff --git a/src/shared/__tests__/api.test.ts b/src/shared/__tests__/api.test.ts index 19dbe1dbcc..b71b68095f 100644 --- a/src/shared/__tests__/api.test.ts +++ b/src/shared/__tests__/api.test.ts @@ -1,14 +1,11 @@ // npx jest src/shared/__tests__/api.test.ts -import { - type ModelInfo, - ProviderSettings, - getModelMaxOutputTokens, - shouldUseReasoningBudget, - shouldUseReasoningEffort, -} from "../api" +import type { ModelInfo, ProviderSettings } from "@roo-code/types" + import { ANTHROPIC_DEFAULT_MAX_TOKENS } from "../../api/providers/constants" +import { getModelMaxOutputTokens, shouldUseReasoningBudget, shouldUseReasoningEffort } from "../api" + describe("getMaxTokensForModel", () => { const modelId = "test" diff --git a/src/shared/__tests__/checkExistApiConfig.test.ts b/src/shared/__tests__/checkExistApiConfig.test.ts index a8e603db8a..218313e7ef 100644 --- a/src/shared/__tests__/checkExistApiConfig.test.ts +++ b/src/shared/__tests__/checkExistApiConfig.test.ts @@ -1,5 +1,8 @@ +// npx jest src/shared/__tests__/checkExistApiConfig.test.ts + +import type { ProviderSettings } from "@roo-code/types" + import { checkExistKey } from "../checkExistApiConfig" -import { ProviderSettings } from "../api" describe("checkExistKey", () => { it("should return false for undefined config", () => { diff --git a/src/shared/__tests__/combineApiRequests.test.ts b/src/shared/__tests__/combineApiRequests.test.ts index 4a939e5f53..04a942eda5 100644 --- a/src/shared/__tests__/combineApiRequests.test.ts +++ b/src/shared/__tests__/combineApiRequests.test.ts @@ -1,7 +1,8 @@ // npx jest src/shared/__tests__/combineApiRequests.test.ts +import type { ClineMessage, ClineSay } from "@roo-code/types" + import { combineApiRequests } from "../combineApiRequests" -import { ClineMessage, ClineSay } from "../ExtensionMessage" describe("combineApiRequests", () => { // Helper function to create a basic api_req_started message diff --git a/src/shared/__tests__/combineCommandSequences.test.ts b/src/shared/__tests__/combineCommandSequences.test.ts index 2bed68ba73..93305b20ce 100644 --- a/src/shared/__tests__/combineCommandSequences.test.ts +++ b/src/shared/__tests__/combineCommandSequences.test.ts @@ -1,6 +1,6 @@ // npx jest src/shared/__tests__/combineCommandSequences.test.ts -import { ClineMessage } from "../ExtensionMessage" +import type { ClineMessage } from "@roo-code/types" import { combineCommandSequences } from "../combineCommandSequences" diff --git a/src/shared/__tests__/experiments.test.ts b/src/shared/__tests__/experiments.test.ts index 9d0e6dab9c..1e7ce0993a 100644 --- a/src/shared/__tests__/experiments.test.ts +++ b/src/shared/__tests__/experiments.test.ts @@ -1,4 +1,8 @@ -import { EXPERIMENT_IDS, experimentConfigsMap, experiments as Experiments, ExperimentId } from "../experiments" +// npx jest src/shared/__tests__/experiments.test.ts + +import type { ExperimentId } from "@roo-code/types" + +import { EXPERIMENT_IDS, experimentConfigsMap, experiments as Experiments } from "../experiments" describe("experiments", () => { describe("POWER_STEERING", () => { diff --git a/src/shared/__tests__/getApiMetrics.test.ts b/src/shared/__tests__/getApiMetrics.test.ts index 4a884f5ea5..52cdc10283 100644 --- a/src/shared/__tests__/getApiMetrics.test.ts +++ b/src/shared/__tests__/getApiMetrics.test.ts @@ -1,7 +1,8 @@ // npx jest src/shared/__tests__/getApiMetrics.test.ts +import type { ClineMessage } from "@roo-code/types" + import { getApiMetrics } from "../getApiMetrics" -import { ClineMessage } from "../ExtensionMessage" describe("getApiMetrics", () => { // Helper function to create a basic api_req_started message diff --git a/src/shared/__tests__/modes.test.ts b/src/shared/__tests__/modes.test.ts index 0e93137e9c..e45417c741 100644 --- a/src/shared/__tests__/modes.test.ts +++ b/src/shared/__tests__/modes.test.ts @@ -1,11 +1,17 @@ +// npx jest src/shared/__tests__/modes.test.ts + +import type { ModeConfig } from "@roo-code/types" + // Mock setup must come before imports jest.mock("vscode") + const mockAddCustomInstructions = jest.fn().mockResolvedValue("Combined instructions") + jest.mock("../../core/prompts/sections/custom-instructions", () => ({ addCustomInstructions: mockAddCustomInstructions, })) -import { isToolAllowedForMode, FileRestrictionError, ModeConfig, getFullModeDetails, modes } from "../modes" +import { isToolAllowedForMode, FileRestrictionError, getFullModeDetails, modes } from "../modes" import { addCustomInstructions } from "../../core/prompts/sections/custom-instructions" describe("isToolAllowedForMode", () => { diff --git a/src/shared/api.ts b/src/shared/api.ts index d66aca6721..48c397d1b4 100644 --- a/src/shared/api.ts +++ b/src/shared/api.ts @@ -1,7 +1,6 @@ -import { ANTHROPIC_DEFAULT_MAX_TOKENS } from "../api/providers/constants" -import { ModelInfo, ProviderName, ProviderSettings } from "../schemas" +import type { ModelInfo, ProviderSettings } from "@roo-code/types" -export type { ModelInfo, ProviderName, ProviderSettings } +import { ANTHROPIC_DEFAULT_MAX_TOKENS } from "../api/providers/constants" export type ApiHandlerOptions = Omit diff --git a/src/shared/checkExistApiConfig.ts b/src/shared/checkExistApiConfig.ts index 05dcb6e678..4093e8541d 100644 --- a/src/shared/checkExistApiConfig.ts +++ b/src/shared/checkExistApiConfig.ts @@ -1,4 +1,4 @@ -import { SECRET_STATE_KEYS, ProviderSettings } from "../schemas" +import { SECRET_STATE_KEYS, ProviderSettings } from "@roo-code/types" export function checkExistKey(config: ProviderSettings | undefined) { if (!config) { diff --git a/src/shared/combineApiRequests.ts b/src/shared/combineApiRequests.ts index 363ff66051..20ba6bb6aa 100644 --- a/src/shared/combineApiRequests.ts +++ b/src/shared/combineApiRequests.ts @@ -1,4 +1,4 @@ -import { ClineMessage } from "./ExtensionMessage" +import type { ClineMessage } from "@roo-code/types" /** * Combines API request start and finish messages in an array of ClineMessages. diff --git a/src/shared/combineCommandSequences.ts b/src/shared/combineCommandSequences.ts index dd171a77ec..7b37b72c63 100644 --- a/src/shared/combineCommandSequences.ts +++ b/src/shared/combineCommandSequences.ts @@ -1,4 +1,4 @@ -import { ClineMessage } from "./ExtensionMessage" +import type { ClineMessage } from "@roo-code/types" export const COMMAND_OUTPUT_STRING = "Output:" diff --git a/src/utils/cost.ts b/src/shared/cost.ts similarity index 97% rename from src/utils/cost.ts rename to src/shared/cost.ts index 48108b6348..3257cab16c 100644 --- a/src/utils/cost.ts +++ b/src/shared/cost.ts @@ -1,4 +1,4 @@ -import { ModelInfo } from "../shared/api" +import type { ModelInfo } from "@roo-code/types" function calculateApiCostInternal( modelInfo: ModelInfo, diff --git a/src/shared/experiments.ts b/src/shared/experiments.ts index aa2c246bb6..fbcea728ac 100644 --- a/src/shared/experiments.ts +++ b/src/shared/experiments.ts @@ -1,7 +1,4 @@ -import { ExperimentId } from "../schemas" -import { AssertEqual, Equals, Keys, Values } from "../utils/type-fu" - -export type { ExperimentId } +import type { AssertEqual, Equals, Keys, Values, ExperimentId } from "@roo-code/types" export const EXPERIMENT_IDS = { POWER_STEERING: "powerSteering", diff --git a/src/shared/getApiMetrics.ts b/src/shared/getApiMetrics.ts index c728aa563b..49476fdbb6 100644 --- a/src/shared/getApiMetrics.ts +++ b/src/shared/getApiMetrics.ts @@ -1,6 +1,4 @@ -import { TokenUsage } from "../schemas" - -import { ClineMessage } from "./ExtensionMessage" +import type { TokenUsage, ClineMessage } from "@roo-code/types" export type ParsedApiReqStartedTextType = { tokensIn: number diff --git a/src/shared/language.ts b/src/shared/language.ts index 82947ccbcd..4513aa89c9 100644 --- a/src/shared/language.ts +++ b/src/shared/language.ts @@ -1,9 +1,7 @@ -import { type Language, isLanguage } from "../schemas" - -export { type Language, isLanguage } +import { type Language, isLanguage } from "@roo-code/types" /** - * Language name mapping from ISO codes to full language names + * Language name mapping from ISO codes to full language names. */ export const LANGUAGES: Record = { diff --git a/src/shared/modes.ts b/src/shared/modes.ts index 18028791a9..686c0437d3 100644 --- a/src/shared/modes.ts +++ b/src/shared/modes.ts @@ -1,12 +1,13 @@ import * as vscode from "vscode" -import { GroupOptions, GroupEntry, ModeConfig, PromptComponent, CustomModePrompts, ExperimentId } from "../schemas" -import { TOOL_GROUPS, ToolGroup, ALWAYS_AVAILABLE_TOOLS } from "./tools" +import type { GroupOptions, GroupEntry, ModeConfig, CustomModePrompts, ExperimentId, ToolGroup } from "@roo-code/types" + import { addCustomInstructions } from "../core/prompts/sections/custom-instructions" + import { EXPERIMENT_IDS } from "./experiments" -export type Mode = string +import { TOOL_GROUPS, ALWAYS_AVAILABLE_TOOLS } from "./tools" -export type { GroupOptions, GroupEntry, ModeConfig, PromptComponent, CustomModePrompts } +export type Mode = string // Helper to extract group name regardless of format export function getGroupName(group: GroupEntry): ToolGroup { diff --git a/src/shared/package.ts b/src/shared/package.ts new file mode 100644 index 0000000000..25588164ec --- /dev/null +++ b/src/shared/package.ts @@ -0,0 +1,19 @@ +/** + * Package + */ + +import { publisher, name, version } from "../package.json" + +// These ENV variables can be defined by ESBuild when building the extension +// in order to override the values in package.json. This allows us to build +// different extension variants with the same package.json file. +// The build process still needs to emit a modified package.json for consumption +// by VSCode, but that build artifact is not used during the transpile step of +// the build, so we still need this override mechanism. +export const Package = { + publisher, + name: process.env.PKG_NAME || name, + version: process.env.PKG_VERSION || version, + outputChannel: process.env.PKG_OUTPUT_CHANNEL || "Roo-Code", + sha: process.env.PKG_SHA, +} as const diff --git a/src/shared/tools.ts b/src/shared/tools.ts index 37ab53516e..6fc32b98c7 100644 --- a/src/shared/tools.ts +++ b/src/shared/tools.ts @@ -1,6 +1,6 @@ import { Anthropic } from "@anthropic-ai/sdk" -import { ClineAsk, ToolProgressStatus, ToolGroup, ToolName } from "../schemas" +import type { ClineAsk, ToolProgressStatus, ToolGroup, ToolName } from "@roo-code/types" export type ToolResponse = string | Array @@ -190,8 +190,6 @@ export const TOOL_DISPLAY_NAMES: Record = { codebase_search: "codebase search", } as const -export type { ToolGroup } - // Define available tool groups. export const TOOL_GROUPS: Record = { read: { diff --git a/src/utils/__tests__/cost.test.ts b/src/utils/__tests__/cost.test.ts index 4501f86b88..3ca22e1801 100644 --- a/src/utils/__tests__/cost.test.ts +++ b/src/utils/__tests__/cost.test.ts @@ -1,5 +1,8 @@ -import { calculateApiCostAnthropic, calculateApiCostOpenAI } from "../cost" -import { ModelInfo } from "../../shared/api" +// npx jest src/utils/__tests__/cost.test.ts + +import type { ModelInfo } from "@roo-code/types" + +import { calculateApiCostAnthropic, calculateApiCostOpenAI } from "../../shared/cost" describe("Cost Utility", () => { describe("calculateApiCostAnthropic", () => { diff --git a/src/utils/__tests__/enhance-prompt.test.ts b/src/utils/__tests__/enhance-prompt.test.ts index 524f99c817..6f4ea2be62 100644 --- a/src/utils/__tests__/enhance-prompt.test.ts +++ b/src/utils/__tests__/enhance-prompt.test.ts @@ -1,5 +1,8 @@ +// npx jest src/utils/__tests__/enhance-prompt.test.ts + +import type { ProviderSettings } from "@roo-code/types" + import { singleCompletionHandler } from "../single-completion-handler" -import { ProviderSettings } from "../../shared/api" import { buildApiHandler, SingleCompletionHandler } from "../../api" import { supportPrompt } from "../../shared/support-prompt" diff --git a/src/utils/commands.ts b/src/utils/commands.ts index cb7d548725..5836c2735f 100644 --- a/src/utils/commands.ts +++ b/src/utils/commands.ts @@ -1,4 +1,6 @@ -import { Package, CommandId, CodeActionId, TerminalActionId } from "../schemas" +import type { CommandId, CodeActionId, TerminalActionId } from "@roo-code/types" + +import { Package } from "../shared/package" export const getCommand = (id: CommandId) => `${Package.name}.${id}` diff --git a/src/utils/single-completion-handler.ts b/src/utils/single-completion-handler.ts index 7434d07e19..4606a17bab 100644 --- a/src/utils/single-completion-handler.ts +++ b/src/utils/single-completion-handler.ts @@ -1,4 +1,5 @@ -import { ProviderSettings } from "../shared/api" +import type { ProviderSettings } from "@roo-code/types" + import { buildApiHandler, SingleCompletionHandler } from "../api" /** diff --git a/src/utils/storage.ts b/src/utils/storage.ts index b4e47c9888..8240588794 100644 --- a/src/utils/storage.ts +++ b/src/utils/storage.ts @@ -2,7 +2,7 @@ import * as vscode from "vscode" import * as path from "path" import * as fs from "fs/promises" -import { Package } from "../schemas" +import { Package } from "../shared/package" import { t } from "../i18n" /** diff --git a/src/utils/type-fu.ts b/src/utils/type-fu.ts deleted file mode 100644 index e7d93b77ac..0000000000 --- a/src/utils/type-fu.ts +++ /dev/null @@ -1,7 +0,0 @@ -export type Keys = keyof T - -export type Values = T[keyof T] - -export type Equals = (() => T extends X ? 1 : 2) extends () => T extends Y ? 1 : 2 ? true : false - -export type AssertEqual = T diff --git a/src/vitest.config.ts b/src/vitest.config.ts index 42d471a0ce..e8e65e5e91 100644 --- a/src/vitest.config.ts +++ b/src/vitest.config.ts @@ -1,8 +1,14 @@ import { defineConfig } from "vitest/config" +import path from "path" export default defineConfig({ test: { include: ["**/__tests__/**/*.spec.ts"], globals: true, }, + resolve: { + alias: { + "@roo-code/types": path.resolve(__dirname, "..", "packages", "types", "src", "index.ts"), + }, + }, }) diff --git a/turbo.json b/turbo.json index b7f7d1fa8d..55ef646fa6 100644 --- a/turbo.json +++ b/turbo.json @@ -3,8 +3,33 @@ "tasks": { "lint": {}, "check-types": {}, - "test": {}, + "test": { + "dependsOn": ["@roo-code/types#build"] + }, "format": {}, - "clean": { "cache": false } + "clean": { + "cache": false + }, + "build": { + "outputs": ["dist/**"], + "inputs": ["src/**", "package.json", "tsconfig.json", "tsup.config.ts"] + }, + "build:nightly": {}, + "bundle": { + "dependsOn": ["^build"], + "cache": false + }, + "bundle:nightly": { + "dependsOn": ["^build"], + "cache": false + }, + "vsix": { + "dependsOn": ["bundle", "@roo-code/vscode-webview#build"], + "cache": false + }, + "vsix:nightly": { + "dependsOn": ["bundle:nightly", "@roo-code/vscode-webview#build:nightly"], + "cache": false + } } } diff --git a/webview-ui/jest.config.cjs b/webview-ui/jest.config.cjs index 8a673da1ce..4a897ef00c 100644 --- a/webview-ui/jest.config.cjs +++ b/webview-ui/jest.config.cjs @@ -12,7 +12,7 @@ module.exports = { "^vscrui$": "/src/__mocks__/vscrui.ts", "^@vscode/webview-ui-toolkit/react$": "/src/__mocks__/@vscode/webview-ui-toolkit/react.ts", "^@/(.*)$": "/src/$1", - "^@roo/(.*)$": "/../src/$1", + "^@roo/(.*)$": "/../src/shared/$1", "^@src/(.*)$": "/src/$1", "^src/i18n/setup$": "/src/__mocks__/i18n/setup.ts", "^\\.\\./setup$": "/src/__mocks__/i18n/setup.ts", diff --git a/webview-ui/package.json b/webview-ui/package.json index cb9e5c91e3..269b8e6e49 100644 --- a/webview-ui/package.json +++ b/webview-ui/package.json @@ -5,10 +5,12 @@ "scripts": { "lint": "eslint src --ext=ts,tsx --max-warnings=0", "check-types": "tsc", + "pretest": "turbo run bundle --cwd ..", "test": "jest -w=40%", "format": "prettier --write src", "dev": "vite", "build": "tsc -b && vite build", + "build:nightly": "tsc -b && vite build --mode nightly", "preview": "vite preview", "storybook": "storybook dev -p 6006", "build-storybook": "storybook build", @@ -29,6 +31,7 @@ "@radix-ui/react-slider": "^1.2.3", "@radix-ui/react-slot": "^1.1.2", "@radix-ui/react-tooltip": "^1.1.8", + "@roo-code/types": "workspace:^", "@tailwindcss/vite": "^4.0.0", "@tanstack/react-query": "^5.68.0", "@vscode/codicons": "^0.0.36", diff --git a/webview-ui/src/App.tsx b/webview-ui/src/App.tsx index 8ca72ecf71..053c9f2456 100644 --- a/webview-ui/src/App.tsx +++ b/webview-ui/src/App.tsx @@ -2,9 +2,9 @@ import { useCallback, useEffect, useRef, useState } from "react" import { useEvent } from "react-use" import { QueryClient, QueryClientProvider } from "@tanstack/react-query" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" -import TranslationProvider from "./i18n/TranslationContext" +import { ExtensionMessage } from "@roo/ExtensionMessage" +import TranslationProvider from "./i18n/TranslationContext" import { vscode } from "./utils/vscode" import { telemetryClient } from "./utils/TelemetryClient" import { ExtensionStateContextProvider, useExtensionState } from "./context/ExtensionStateContext" diff --git a/webview-ui/src/components/chat/Announcement.tsx b/webview-ui/src/components/chat/Announcement.tsx index 5bce25b786..012829f547 100644 --- a/webview-ui/src/components/chat/Announcement.tsx +++ b/webview-ui/src/components/chat/Announcement.tsx @@ -2,7 +2,7 @@ import { useState, memo } from "react" import { Trans } from "react-i18next" import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" -import { Package } from "@roo/schemas" +import { Package } from "@roo/package" import { useAppTranslation } from "@src/i18n/TranslationContext" import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from "@src/components/ui" diff --git a/webview-ui/src/components/chat/AutoApprovedRequestLimitWarning.tsx b/webview-ui/src/components/chat/AutoApprovedRequestLimitWarning.tsx index 608646b266..1c454e0082 100644 --- a/webview-ui/src/components/chat/AutoApprovedRequestLimitWarning.tsx +++ b/webview-ui/src/components/chat/AutoApprovedRequestLimitWarning.tsx @@ -1,9 +1,11 @@ import React, { memo, useState } from "react" import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" -import { ClineMessage } from "@roo/shared/ExtensionMessage" -import { vscode } from "@src/utils/vscode" import { Trans } from "react-i18next" +import type { ClineMessage } from "@roo-code/types" + +import { vscode } from "@src/utils/vscode" + type AutoApprovedRequestLimitWarningProps = { message: ClineMessage } diff --git a/webview-ui/src/components/chat/BrowserSessionRow.tsx b/webview-ui/src/components/chat/BrowserSessionRow.tsx index e4aa54fdad..cdb15315dd 100644 --- a/webview-ui/src/components/chat/BrowserSessionRow.tsx +++ b/webview-ui/src/components/chat/BrowserSessionRow.tsx @@ -4,10 +4,12 @@ import deepEqual from "fast-deep-equal" import { useTranslation } from "react-i18next" import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" -import { BrowserAction, BrowserActionResult, ClineMessage, ClineSayBrowserAction } from "@roo/shared/ExtensionMessage" +import type { ClineMessage } from "@roo-code/types" + +import { BrowserAction, BrowserActionResult, ClineSayBrowserAction } from "@roo/ExtensionMessage" -import { useExtensionState } from "@src/context/ExtensionStateContext" import { vscode } from "@src/utils/vscode" +import { useExtensionState } from "@src/context/ExtensionStateContext" import CodeBlock, { CODE_BLOCK_BG_COLOR } from "../common/CodeBlock" import { ChatRowContent } from "./ChatRow" diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index f9522901b7..e6b8bb601a 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -4,9 +4,11 @@ import { useTranslation, Trans } from "react-i18next" import deepEqual from "fast-deep-equal" import { VSCodeBadge, VSCodeButton } from "@vscode/webview-ui-toolkit/react" -import { ClineApiReqInfo, ClineAskUseMcpServer, ClineMessage, ClineSayTool } from "@roo/shared/ExtensionMessage" -import { COMMAND_OUTPUT_STRING } from "@roo/shared/combineCommandSequences" -import { safeJsonParse } from "@roo/shared/safeJsonParse" +import type { ClineMessage } from "@roo-code/types" + +import { ClineApiReqInfo, ClineAskUseMcpServer, ClineSayTool } from "@roo/ExtensionMessage" +import { COMMAND_OUTPUT_STRING } from "@roo/combineCommandSequences" +import { safeJsonParse } from "@roo/safeJsonParse" import { useCopyToClipboard } from "@src/utils/clipboard" import { useExtensionState } from "@src/context/ExtensionStateContext" diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index 0df1a90f60..5d8e0a2112 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -2,10 +2,10 @@ import React, { forwardRef, useCallback, useEffect, useLayoutEffect, useMemo, us import { useEvent } from "react-use" import DynamicTextArea from "react-textarea-autosize" -import { mentionRegex, mentionRegexGlobal, unescapeSpaces } from "@roo/shared/context-mentions" -import { WebviewMessage } from "@roo/shared/WebviewMessage" -import { Mode, getAllModes } from "@roo/shared/modes" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" +import { mentionRegex, mentionRegexGlobal, unescapeSpaces } from "@roo/context-mentions" +import { WebviewMessage } from "@roo/WebviewMessage" +import { Mode, getAllModes } from "@roo/modes" +import { ExtensionMessage } from "@roo/ExtensionMessage" import { vscode } from "@/utils/vscode" import { useExtensionState } from "@/context/ExtensionStateContext" diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index 0b39baf39a..6eaceb1374 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -7,32 +7,29 @@ import { Trans } from "react-i18next" import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" import useSound from "use-sound" -import { - ClineAsk, - ClineMessage, - ClineSayBrowserAction, - ClineSayTool, - ExtensionMessage, -} from "@roo/shared/ExtensionMessage" -import { McpServer, McpTool } from "@roo/shared/mcp" -import { findLast } from "@roo/shared/array" -import { combineApiRequests } from "@roo/shared/combineApiRequests" -import { combineCommandSequences } from "@roo/shared/combineCommandSequences" -import { getApiMetrics } from "@roo/shared/getApiMetrics" -import { AudioType } from "@roo/shared/WebviewMessage" -import { getAllModes } from "@roo/shared/modes" +import type { ClineAsk, ClineMessage } from "@roo-code/types" + +import { ClineSayBrowserAction, ClineSayTool, ExtensionMessage } from "@roo/ExtensionMessage" +import { McpServer, McpTool } from "@roo/mcp" +import { findLast } from "@roo/array" +import { combineApiRequests } from "@roo/combineApiRequests" +import { combineCommandSequences } from "@roo/combineCommandSequences" +import { getApiMetrics } from "@roo/getApiMetrics" +import { AudioType } from "@roo/WebviewMessage" +import { getAllModes } from "@roo/modes" -import { useExtensionState } from "@src/context/ExtensionStateContext" import { vscode } from "@src/utils/vscode" -import { useSelectedModel } from "@/components/ui/hooks/useSelectedModel" import { validateCommand } from "@src/utils/command-validation" +import { buildDocLink } from "@src/utils/docLinks" import { useAppTranslation } from "@src/i18n/TranslationContext" +import { useExtensionState } from "@src/context/ExtensionStateContext" +import { useSelectedModel } from "@src/components/ui/hooks/useSelectedModel" +import RooHero from "@src/components/welcome/RooHero" +import RooTips from "@src/components/welcome/RooTips" import TelemetryBanner from "../common/TelemetryBanner" import { useTaskSearch } from "../history/useTaskSearch" import HistoryPreview from "../history/HistoryPreview" -import RooHero from "@src/components/welcome/RooHero" -import RooTips from "@src/components/welcome/RooTips" import Announcement from "./Announcement" import BrowserSessionRow from "./BrowserSessionRow" import ChatRow from "./ChatRow" @@ -41,7 +38,6 @@ import TaskHeader from "./TaskHeader" import AutoApproveMenu from "./AutoApproveMenu" import SystemPromptWarning from "./SystemPromptWarning" import { CheckpointWarning } from "./CheckpointWarning" -import { buildDocLink } from "@src/utils/docLinks" export interface ChatViewProps { isHidden: boolean diff --git a/webview-ui/src/components/chat/CommandExecution.tsx b/webview-ui/src/components/chat/CommandExecution.tsx index d1142addd1..8c92ec7e7b 100644 --- a/webview-ui/src/components/chat/CommandExecution.tsx +++ b/webview-ui/src/components/chat/CommandExecution.tsx @@ -2,10 +2,11 @@ import { useCallback, useState, memo, useMemo } from "react" import { useEvent } from "react-use" import { ChevronDown, Skull } from "lucide-react" -import { CommandExecutionStatus, commandExecutionStatusSchema } from "@roo/schemas" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" -import { safeJsonParse } from "@roo/shared/safeJsonParse" -import { COMMAND_OUTPUT_STRING } from "@roo/shared/combineCommandSequences" +import { CommandExecutionStatus, commandExecutionStatusSchema } from "@roo-code/types" + +import { ExtensionMessage } from "@roo/ExtensionMessage" +import { safeJsonParse } from "@roo/safeJsonParse" +import { COMMAND_OUTPUT_STRING } from "@roo/combineCommandSequences" import { vscode } from "@src/utils/vscode" import { useExtensionState } from "@src/context/ExtensionStateContext" diff --git a/webview-ui/src/components/chat/ContextCondenseRow.tsx b/webview-ui/src/components/chat/ContextCondenseRow.tsx index fa52d853ad..6a80208770 100644 --- a/webview-ui/src/components/chat/ContextCondenseRow.tsx +++ b/webview-ui/src/components/chat/ContextCondenseRow.tsx @@ -2,7 +2,8 @@ import { useState } from "react" import { useTranslation } from "react-i18next" import { VSCodeBadge } from "@vscode/webview-ui-toolkit/react" -import { ContextCondense } from "@roo/schemas" +import type { ContextCondense } from "@roo-code/types" + import { Markdown } from "./Markdown" import { ProgressIndicator } from "./ProgressIndicator" diff --git a/webview-ui/src/components/chat/ContextMenu.tsx b/webview-ui/src/components/chat/ContextMenu.tsx index 2983c023f2..1672c35ee3 100644 --- a/webview-ui/src/components/chat/ContextMenu.tsx +++ b/webview-ui/src/components/chat/ContextMenu.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useMemo, useRef, useState } from "react" import { getIconForFilePath, getIconUrlByName, getIconForDirectoryPath } from "vscode-material-icons" -import { ModeConfig } from "@roo/shared/modes" +import type { ModeConfig } from "@roo-code/types" import { ContextMenuOptionType, diff --git a/webview-ui/src/components/chat/Mention.tsx b/webview-ui/src/components/chat/Mention.tsx index 188bb36332..764c027203 100644 --- a/webview-ui/src/components/chat/Mention.tsx +++ b/webview-ui/src/components/chat/Mention.tsx @@ -1,4 +1,4 @@ -import { mentionRegexGlobal } from "@roo/shared/context-mentions" +import { mentionRegexGlobal } from "@roo/context-mentions" import { vscode } from "../../utils/vscode" diff --git a/webview-ui/src/components/chat/TaskActions.tsx b/webview-ui/src/components/chat/TaskActions.tsx index d143a9aa1c..2eebc6ccb3 100644 --- a/webview-ui/src/components/chat/TaskActions.tsx +++ b/webview-ui/src/components/chat/TaskActions.tsx @@ -2,8 +2,9 @@ import { useState } from "react" import prettyBytes from "pretty-bytes" import { useTranslation } from "react-i18next" +import type { HistoryItem } from "@roo-code/types" + import { vscode } from "@/utils/vscode" -import { HistoryItem } from "@roo/shared/HistoryItem" import { DeleteTaskDialog } from "../history/DeleteTaskDialog" import { IconButton } from "./IconButton" diff --git a/webview-ui/src/components/chat/TaskHeader.tsx b/webview-ui/src/components/chat/TaskHeader.tsx index 038a903d04..a46035c9b4 100644 --- a/webview-ui/src/components/chat/TaskHeader.tsx +++ b/webview-ui/src/components/chat/TaskHeader.tsx @@ -4,8 +4,9 @@ import { useTranslation } from "react-i18next" import { VSCodeBadge } from "@vscode/webview-ui-toolkit/react" import { CloudUpload, CloudDownload } from "lucide-react" -import { ClineMessage } from "@roo/shared/ExtensionMessage" -import { getModelMaxOutputTokens } from "@roo/shared/api" +import type { ClineMessage } from "@roo-code/types" + +import { getModelMaxOutputTokens } from "@roo/api" import { formatLargeNumber } from "@src/utils/format" import { cn } from "@src/lib/utils" diff --git a/webview-ui/src/components/chat/__tests__/Announcement.test.tsx b/webview-ui/src/components/chat/__tests__/Announcement.test.tsx index 70cc8ac506..d2f109f365 100644 --- a/webview-ui/src/components/chat/__tests__/Announcement.test.tsx +++ b/webview-ui/src/components/chat/__tests__/Announcement.test.tsx @@ -1,7 +1,7 @@ import { render, screen } from "@testing-library/react" import { jest } from "@jest/globals" // Or 'jest' if using Jest -import { Package } from "@roo/schemas" +import { Package } from "@roo/package" import Announcement from "../Announcement" diff --git a/webview-ui/src/components/chat/__tests__/ChatTextArea.test.tsx b/webview-ui/src/components/chat/__tests__/ChatTextArea.test.tsx index 204821c902..8b09a5eb87 100644 --- a/webview-ui/src/components/chat/__tests__/ChatTextArea.test.tsx +++ b/webview-ui/src/components/chat/__tests__/ChatTextArea.test.tsx @@ -2,7 +2,7 @@ import { render, fireEvent, screen } from "@testing-library/react" import ChatTextArea from "../ChatTextArea" import { useExtensionState } from "@src/context/ExtensionStateContext" import { vscode } from "@src/utils/vscode" -import { defaultModeSlug } from "@roo/shared/modes" +import { defaultModeSlug } from "@roo/modes" import * as pathMentions from "@src/utils/path-mentions" // Mock modules diff --git a/webview-ui/src/components/chat/__tests__/TaskHeader.test.tsx b/webview-ui/src/components/chat/__tests__/TaskHeader.test.tsx index 27704a2ce5..12f43b8bea 100644 --- a/webview-ui/src/components/chat/__tests__/TaskHeader.test.tsx +++ b/webview-ui/src/components/chat/__tests__/TaskHeader.test.tsx @@ -4,7 +4,7 @@ import React from "react" import { render, screen } from "@testing-library/react" import { QueryClient, QueryClientProvider } from "@tanstack/react-query" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import TaskHeader, { TaskHeaderProps } from "../TaskHeader" diff --git a/webview-ui/src/components/common/CodeAccordian.tsx b/webview-ui/src/components/common/CodeAccordian.tsx index c3e44e7713..b42d0e2f7e 100644 --- a/webview-ui/src/components/common/CodeAccordian.tsx +++ b/webview-ui/src/components/common/CodeAccordian.tsx @@ -1,7 +1,8 @@ import { memo, useMemo } from "react" import { VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react" -import { type ToolProgressStatus } from "@roo/shared/ExtensionMessage" +import type { ToolProgressStatus } from "@roo-code/types" + import { getLanguageFromPath } from "@src/utils/getLanguageFromPath" import { removeLeadingNonAlphanumeric } from "@src/utils/removeLeadingNonAlphanumeric" diff --git a/webview-ui/src/components/common/TelemetryBanner.tsx b/webview-ui/src/components/common/TelemetryBanner.tsx index dac980489c..6ce2f79994 100644 --- a/webview-ui/src/components/common/TelemetryBanner.tsx +++ b/webview-ui/src/components/common/TelemetryBanner.tsx @@ -1,10 +1,12 @@ -import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { memo, useState } from "react" +import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import styled from "styled-components" +import { Trans } from "react-i18next" + +import { TelemetrySetting } from "@roo/TelemetrySetting" + import { vscode } from "@src/utils/vscode" -import { TelemetrySetting } from "@roo/shared/TelemetrySetting" import { useAppTranslation } from "@src/i18n/TranslationContext" -import { Trans } from "react-i18next" const BannerContainer = styled.div` background-color: var(--vscode-banner-background); diff --git a/webview-ui/src/components/mcp/McpErrorRow.tsx b/webview-ui/src/components/mcp/McpErrorRow.tsx index 3b1ea8f7ce..cebd8a4d4b 100644 --- a/webview-ui/src/components/mcp/McpErrorRow.tsx +++ b/webview-ui/src/components/mcp/McpErrorRow.tsx @@ -1,7 +1,7 @@ import { useMemo } from "react" import { formatRelative } from "date-fns" -import type { McpErrorEntry } from "@roo/shared/mcp" +import type { McpErrorEntry } from "@roo/mcp" type McpErrorRowProps = { error: McpErrorEntry diff --git a/webview-ui/src/components/mcp/McpResourceRow.tsx b/webview-ui/src/components/mcp/McpResourceRow.tsx index b31082dafb..651a569a3c 100644 --- a/webview-ui/src/components/mcp/McpResourceRow.tsx +++ b/webview-ui/src/components/mcp/McpResourceRow.tsx @@ -1,4 +1,4 @@ -import { McpResource, McpResourceTemplate } from "@roo/shared/mcp" +import { McpResource, McpResourceTemplate } from "@roo/mcp" type McpResourceRowProps = { item: McpResource | McpResourceTemplate diff --git a/webview-ui/src/components/mcp/McpToolRow.tsx b/webview-ui/src/components/mcp/McpToolRow.tsx index 2cab9b31ee..507933ddf1 100644 --- a/webview-ui/src/components/mcp/McpToolRow.tsx +++ b/webview-ui/src/components/mcp/McpToolRow.tsx @@ -1,5 +1,7 @@ import { VSCodeCheckbox } from "@vscode/webview-ui-toolkit/react" -import { McpTool } from "@roo/shared/mcp" + +import { McpTool } from "@roo/mcp" + import { useAppTranslation } from "@src/i18n/TranslationContext" import { vscode } from "@src/utils/vscode" diff --git a/webview-ui/src/components/mcp/McpView.tsx b/webview-ui/src/components/mcp/McpView.tsx index 7b6a89799b..d486d8b93c 100644 --- a/webview-ui/src/components/mcp/McpView.tsx +++ b/webview-ui/src/components/mcp/McpView.tsx @@ -9,7 +9,7 @@ import { VSCodePanelView, } from "@vscode/webview-ui-toolkit/react" -import { McpServer } from "@roo/shared/mcp" +import { McpServer } from "@roo/mcp" import { vscode } from "@src/utils/vscode" import { useExtensionState } from "@src/context/ExtensionStateContext" diff --git a/webview-ui/src/components/prompts/PromptsView.tsx b/webview-ui/src/components/prompts/PromptsView.tsx index c47a51e6d7..1f175154e1 100644 --- a/webview-ui/src/components/prompts/PromptsView.tsx +++ b/webview-ui/src/components/prompts/PromptsView.tsx @@ -1,5 +1,4 @@ import React, { useState, useEffect, useMemo, useCallback, useRef } from "react" -import { Button } from "@/components/ui/button" import { VSCodeCheckbox, VSCodeRadioGroup, @@ -7,28 +6,22 @@ import { VSCodeTextArea, VSCodeLink, } from "@vscode/webview-ui-toolkit/react" +import { Trans } from "react-i18next" +import { ChevronsUpDown, X } from "lucide-react" + +import { ModeConfig, GroupEntry, PromptComponent, ToolGroup, modeConfigSchema } from "@roo-code/types" + +import { Mode, getRoleDefinition, getWhenToUse, getCustomInstructions, getAllModes } from "@roo/modes" +import { supportPrompt, SupportPromptType } from "@roo/support-prompt" +import { TOOL_GROUPS } from "@roo/tools" -import { useExtensionState } from "@src/context/ExtensionStateContext" -import { - Mode, - PromptComponent, - getRoleDefinition, - getWhenToUse, - getCustomInstructions, - getAllModes, - ModeConfig, - GroupEntry, -} from "@roo/shared/modes" -import { modeConfigSchema } from "@roo/schemas" -import { supportPrompt, SupportPromptType } from "@roo/shared/support-prompt" - -import { TOOL_GROUPS, ToolGroup } from "@roo/shared/tools" import { vscode } from "@src/utils/vscode" -import { Tab, TabContent, TabHeader } from "../common/Tab" -import { useAppTranslation } from "@src/i18n/TranslationContext" -import { Trans } from "react-i18next" import { buildDocLink } from "@src/utils/docLinks" +import { useAppTranslation } from "@src/i18n/TranslationContext" +import { useExtensionState } from "@src/context/ExtensionStateContext" +import { Tab, TabContent, TabHeader } from "@src/components/common/Tab" import { + Button, Select, SelectContent, SelectItem, @@ -44,8 +37,7 @@ import { CommandItem, CommandGroup, Input, -} from "../ui" -import { ChevronsUpDown, X } from "lucide-react" +} from "@src/components/ui" // Get all available groups that should show in prompts view const availableGroups = (Object.keys(TOOL_GROUPS) as ToolGroup[]).filter((group) => !TOOL_GROUPS[group].alwaysAvailable) diff --git a/webview-ui/src/components/settings/About.tsx b/webview-ui/src/components/settings/About.tsx index fb045932c0..bfffeb1611 100644 --- a/webview-ui/src/components/settings/About.tsx +++ b/webview-ui/src/components/settings/About.tsx @@ -5,8 +5,8 @@ import { Info, Download, Upload, TriangleAlert } from "lucide-react" import { VSCodeCheckbox, VSCodeLink } from "@vscode/webview-ui-toolkit/react" -import { Package } from "@roo/schemas" -import { TelemetrySetting } from "@roo/shared/TelemetrySetting" +import { Package } from "@roo/package" +import { TelemetrySetting } from "@roo/TelemetrySetting" import { vscode } from "@/utils/vscode" import { cn } from "@/lib/utils" diff --git a/webview-ui/src/components/settings/ApiConfigManager.tsx b/webview-ui/src/components/settings/ApiConfigManager.tsx index 05b14bc586..54e3725e44 100644 --- a/webview-ui/src/components/settings/ApiConfigManager.tsx +++ b/webview-ui/src/components/settings/ApiConfigManager.tsx @@ -2,7 +2,7 @@ import { memo, useEffect, useRef, useState } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" import { ChevronsUpDown, Check, X } from "lucide-react" -import { ProviderSettingsEntry } from "@roo/shared/ExtensionMessage" +import type { ProviderSettingsEntry } from "@roo-code/types" import { useAppTranslation } from "@/i18n/TranslationContext" import { cn } from "@/lib/utils" diff --git a/webview-ui/src/components/settings/ApiOptions.tsx b/webview-ui/src/components/settings/ApiOptions.tsx index 20d10cf459..bef4e45f20 100644 --- a/webview-ui/src/components/settings/ApiOptions.tsx +++ b/webview-ui/src/components/settings/ApiOptions.tsx @@ -3,15 +3,15 @@ import { convertHeadersToObject } from "./utils/headers" import { useDebounce } from "react-use" import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" +import type { ProviderName, ProviderSettings } from "@roo-code/types" + import { - type ProviderName, - type ProviderSettings, openRouterDefaultModelId, requestyDefaultModelId, glamaDefaultModelId, unboundDefaultModelId, litellmDefaultModelId, -} from "@roo/shared/api" +} from "@roo/api" import { vscode } from "@src/utils/vscode" import { validateApiConfiguration, validateModelId } from "@src/utils/validate" diff --git a/webview-ui/src/components/settings/AutoApproveToggle.tsx b/webview-ui/src/components/settings/AutoApproveToggle.tsx index 17307e8367..ffad47e2ac 100644 --- a/webview-ui/src/components/settings/AutoApproveToggle.tsx +++ b/webview-ui/src/components/settings/AutoApproveToggle.tsx @@ -1,4 +1,4 @@ -import type { GlobalSettings } from "@roo/schemas" +import type { GlobalSettings } from "@roo-code/types" import { useAppTranslation } from "@/i18n/TranslationContext" import { cn } from "@/lib/utils" diff --git a/webview-ui/src/components/settings/CodeIndexSettings.tsx b/webview-ui/src/components/settings/CodeIndexSettings.tsx index 06bac1927d..45ed5a9087 100644 --- a/webview-ui/src/components/settings/CodeIndexSettings.tsx +++ b/webview-ui/src/components/settings/CodeIndexSettings.tsx @@ -1,11 +1,23 @@ import React, { useState, useEffect } from "react" +import { z } from "zod" import * as ProgressPrimitive from "@radix-ui/react-progress" +import { VSCodeCheckbox, VSCodeTextField, VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { Trans } from "react-i18next" -import { useAppTranslation } from "@/i18n/TranslationContext" -import { VSCodeCheckbox, VSCodeTextField, VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" -import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select" +import { CodebaseIndexConfig, CodebaseIndexModels, ProviderSettings } from "@roo-code/types" + +import { EmbedderProvider } from "@roo/embeddingModels" + +import { vscode } from "@src/utils/vscode" +import { useAppTranslation } from "@src/i18n/TranslationContext" +import { buildDocLink } from "@src/utils/docLinks" + import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, AlertDialog, AlertDialogAction, AlertDialogCancel, @@ -15,13 +27,7 @@ import { AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, -} from "@/components/ui/alert-dialog" - -import { vscode } from "@/utils/vscode" -import { buildDocLink } from "@/utils/docLinks" -import { CodebaseIndexConfig, CodebaseIndexModels, ProviderSettings } from "../../../../src/schemas" -import { EmbedderProvider } from "../../../../src/shared/embeddingModels" -import { z } from "zod" +} from "@src/components/ui" import { SetCachedStateField } from "./types" diff --git a/webview-ui/src/components/settings/ExperimentalSettings.tsx b/webview-ui/src/components/settings/ExperimentalSettings.tsx index 36b5c86a97..ee7cde49fb 100644 --- a/webview-ui/src/components/settings/ExperimentalSettings.tsx +++ b/webview-ui/src/components/settings/ExperimentalSettings.tsx @@ -1,21 +1,22 @@ import { HTMLAttributes } from "react" -import { useAppTranslation } from "@/i18n/TranslationContext" +import { VSCodeTextArea } from "@vscode/webview-ui-toolkit/react" import { FlaskConical } from "lucide-react" -import { EXPERIMENT_IDS, experimentConfigsMap, ExperimentId } from "@roo/shared/experiments" +import type { ExperimentId, CodebaseIndexConfig, CodebaseIndexModels, ProviderSettings } from "@roo-code/types" + +import { EXPERIMENT_IDS, experimentConfigsMap } from "@roo/experiments" -import { cn } from "@/lib/utils" -import { vscode } from "@/utils/vscode" +import { vscode } from "@src/utils/vscode" +import { ExtensionStateContextType } from "@src/context/ExtensionStateContext" +import { useAppTranslation } from "@src/i18n/TranslationContext" +import { cn } from "@src/lib/utils" +import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Slider } from "@src/components/ui" import { SetCachedStateField, SetExperimentEnabled } from "./types" import { SectionHeader } from "./SectionHeader" import { Section } from "./Section" import { ExperimentalFeature } from "./ExperimentalFeature" -import { Button, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Slider } from "@/components/ui/" -import { VSCodeTextArea } from "@vscode/webview-ui-toolkit/react" -import { CodebaseIndexConfig, CodebaseIndexModels, ProviderSettings } from "../../../../src/schemas" import { CodeIndexSettings } from "./CodeIndexSettings" -import { ExtensionStateContextType } from "../../context/ExtensionStateContext" const SUMMARY_PROMPT = `\ Your task is to create a detailed summary of the conversation so far, paying close attention to the user's explicit requests and your previous actions. diff --git a/webview-ui/src/components/settings/LanguageSettings.tsx b/webview-ui/src/components/settings/LanguageSettings.tsx index b7dd141fbf..5745d78b9b 100644 --- a/webview-ui/src/components/settings/LanguageSettings.tsx +++ b/webview-ui/src/components/settings/LanguageSettings.tsx @@ -2,9 +2,12 @@ import { HTMLAttributes } from "react" import { useAppTranslation } from "@/i18n/TranslationContext" import { Globe } from "lucide-react" -import { cn } from "@/lib/utils" -import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@/components/ui" -import { Language, LANGUAGES } from "@roo/shared/language" +import type { Language } from "@roo-code/types" + +import { LANGUAGES } from "@roo/language" + +import { cn } from "@src/lib/utils" +import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "@src/components/ui" import { SetCachedStateField } from "./types" import { SectionHeader } from "./SectionHeader" diff --git a/webview-ui/src/components/settings/ModelInfoView.tsx b/webview-ui/src/components/settings/ModelInfoView.tsx index 7920469c19..d940e66d42 100644 --- a/webview-ui/src/components/settings/ModelInfoView.tsx +++ b/webview-ui/src/components/settings/ModelInfoView.tsx @@ -1,10 +1,10 @@ import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" -import { useAppTranslation } from "@/i18n/TranslationContext" -import { formatPrice } from "@/utils/formatPrice" -import { cn } from "@/lib/utils" +import type { ModelInfo } from "@roo-code/types" -import { ModelInfo } from "@roo/shared/api" +import { formatPrice } from "@src/utils/formatPrice" +import { cn } from "@src/lib/utils" +import { useAppTranslation } from "@src/i18n/TranslationContext" import { ModelDescriptionMarkdown } from "./ModelDescriptionMarkdown" diff --git a/webview-ui/src/components/settings/ModelPicker.tsx b/webview-ui/src/components/settings/ModelPicker.tsx index 4ac7f530a6..96ac4e0dec 100644 --- a/webview-ui/src/components/settings/ModelPicker.tsx +++ b/webview-ui/src/components/settings/ModelPicker.tsx @@ -3,7 +3,7 @@ import { VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { Trans } from "react-i18next" import { ChevronsUpDown, Check, X } from "lucide-react" -import { ProviderSettings, ModelInfo } from "@roo/schemas" +import type { ProviderSettings, ModelInfo } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { useSelectedModel } from "@/components/ui/hooks/useSelectedModel" diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 16770a15e2..8243632469 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -9,7 +9,6 @@ import React, { useRef, useState, } from "react" -import { useAppTranslation } from "@/i18n/TranslationContext" import { CheckCheck, SquareMousePointer, @@ -25,12 +24,13 @@ import { LucideIcon, } from "lucide-react" -import { ExperimentId } from "@roo/shared/experiments" -import { TelemetrySetting } from "@roo/shared/TelemetrySetting" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings, ExperimentId } from "@roo-code/types" -import { vscode } from "@/utils/vscode" -import { ExtensionStateContextType, useExtensionState } from "@/context/ExtensionStateContext" +import { TelemetrySetting } from "@roo/TelemetrySetting" + +import { vscode } from "@src/utils/vscode" +import { useAppTranslation } from "@src/i18n/TranslationContext" +import { ExtensionStateContextType, useExtensionState } from "@src/context/ExtensionStateContext" import { AlertDialog, AlertDialogContent, @@ -45,7 +45,7 @@ import { TooltipContent, TooltipProvider, TooltipTrigger, -} from "@/components/ui" +} from "@src/components/ui" import { Tab, TabContent, TabHeader, TabList, TabTrigger } from "../common/Tab" import { SetCachedStateField, SetExperimentEnabled } from "./types" diff --git a/webview-ui/src/components/settings/TerminalSettings.tsx b/webview-ui/src/components/settings/TerminalSettings.tsx index 59c434fbb2..2808fb03be 100644 --- a/webview-ui/src/components/settings/TerminalSettings.tsx +++ b/webview-ui/src/components/settings/TerminalSettings.tsx @@ -7,7 +7,7 @@ import { Trans } from "react-i18next" import { buildDocLink } from "@src/utils/docLinks" import { useEvent, useMount } from "react-use" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" +import { ExtensionMessage } from "@roo/ExtensionMessage" import { cn } from "@/lib/utils" import { Slider } from "@/components/ui" diff --git a/webview-ui/src/components/settings/ThinkingBudget.tsx b/webview-ui/src/components/settings/ThinkingBudget.tsx index a33ed13d68..456e0be17a 100644 --- a/webview-ui/src/components/settings/ThinkingBudget.tsx +++ b/webview-ui/src/components/settings/ThinkingBudget.tsx @@ -1,13 +1,9 @@ import { useEffect } from "react" import { Checkbox } from "vscrui" -import { reasoningEfforts, ReasoningEffort } from "@roo/schemas" -import { - type ProviderSettings, - type ModelInfo, - DEFAULT_HYBRID_REASONING_MODEL_MAX_TOKENS, - DEFAULT_HYBRID_REASONING_MODEL_THINKING_TOKENS, -} from "@roo/shared/api" +import { type ProviderSettings, type ModelInfo, type ReasoningEffort, reasoningEfforts } from "@roo-code/types" + +import { DEFAULT_HYBRID_REASONING_MODEL_MAX_TOKENS, DEFAULT_HYBRID_REASONING_MODEL_THINKING_TOKENS } from "@roo/api" import { useAppTranslation } from "@src/i18n/TranslationContext" import { Slider, Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@src/components/ui" diff --git a/webview-ui/src/components/settings/__tests__/ApiOptions.test.tsx b/webview-ui/src/components/settings/__tests__/ApiOptions.test.tsx index 19d707a009..ca0eb5f7fe 100644 --- a/webview-ui/src/components/settings/__tests__/ApiOptions.test.tsx +++ b/webview-ui/src/components/settings/__tests__/ApiOptions.test.tsx @@ -3,9 +3,11 @@ import { render, screen, fireEvent } from "@testing-library/react" import { QueryClient, QueryClientProvider } from "@tanstack/react-query" -import { ModelInfo, ProviderSettings, openAiModelInfoSaneDefaults } from "@roo/shared/api" +import type { ModelInfo, ProviderSettings } from "@roo-code/types" -import { ExtensionStateContextProvider } from "@/context/ExtensionStateContext" +import { openAiModelInfoSaneDefaults } from "@roo/api" + +import { ExtensionStateContextProvider } from "@src/context/ExtensionStateContext" import ApiOptions, { ApiOptionsProps } from "../ApiOptions" @@ -146,6 +148,22 @@ jest.mock("../DiffSettingsControl", () => ({ ), })) +// Mock ThinkingBudget component +jest.mock("../ThinkingBudget", () => ({ + ThinkingBudget: ({ modelInfo }: any) => { + // Only render if model supports reasoning budget (thinking models) + if (modelInfo?.supportsReasoningBudget || modelInfo?.requiredReasoningBudget) { + return ( +
+
Max Thinking Tokens
+ +
+ ) + } + return null + }, +})) + // Mock LiteLLM provider for tests jest.mock("../providers/LiteLLM", () => ({ LiteLLM: ({ apiConfiguration, setApiConfigurationField }: any) => ( diff --git a/webview-ui/src/components/settings/__tests__/ModelPicker.test.tsx b/webview-ui/src/components/settings/__tests__/ModelPicker.test.tsx index 710ca3e5ef..6d64130cf1 100644 --- a/webview-ui/src/components/settings/__tests__/ModelPicker.test.tsx +++ b/webview-ui/src/components/settings/__tests__/ModelPicker.test.tsx @@ -4,7 +4,7 @@ import { screen, fireEvent, render } from "@testing-library/react" import { act } from "react" import { QueryClient, QueryClientProvider } from "@tanstack/react-query" -import { ModelInfo } from "@roo/schemas" +import { ModelInfo } from "@roo-code/types" import { ModelPicker } from "../ModelPicker" diff --git a/webview-ui/src/components/settings/__tests__/ThinkingBudget.test.tsx b/webview-ui/src/components/settings/__tests__/ThinkingBudget.test.tsx index 4e448f7cb1..60f2c29497 100644 --- a/webview-ui/src/components/settings/__tests__/ThinkingBudget.test.tsx +++ b/webview-ui/src/components/settings/__tests__/ThinkingBudget.test.tsx @@ -2,7 +2,7 @@ import { render, screen, fireEvent } from "@testing-library/react" -import { ModelInfo } from "@roo/shared/api" +import type { ModelInfo } from "@roo-code/types" import { ThinkingBudget } from "../ThinkingBudget" diff --git a/webview-ui/src/components/settings/constants.ts b/webview-ui/src/components/settings/constants.ts index 295088f9de..bd1ce69eb6 100644 --- a/webview-ui/src/components/settings/constants.ts +++ b/webview-ui/src/components/settings/constants.ts @@ -1,6 +1,6 @@ +import type { ProviderName, ModelInfo } from "@roo-code/types" + import { - ProviderName, - ModelInfo, anthropicModels, bedrockModels, deepSeekModels, @@ -11,9 +11,9 @@ import { xaiModels, groqModels, chutesModels, -} from "@roo/shared/api" +} from "@roo/api" -export { AWS_REGIONS } from "@roo/shared/aws_regions" +export { AWS_REGIONS } from "@roo/aws_regions" export const MODELS_BY_PROVIDER: Partial>> = { anthropic: anthropicModels, diff --git a/webview-ui/src/components/settings/providers/Anthropic.tsx b/webview-ui/src/components/settings/providers/Anthropic.tsx index 4d5957b562..f340e73f72 100644 --- a/webview-ui/src/components/settings/providers/Anthropic.tsx +++ b/webview-ui/src/components/settings/providers/Anthropic.tsx @@ -2,7 +2,7 @@ import { useCallback, useState } from "react" import { Checkbox } from "vscrui" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" diff --git a/webview-ui/src/components/settings/providers/Bedrock.tsx b/webview-ui/src/components/settings/providers/Bedrock.tsx index 2ddc5797ca..a672ff406e 100644 --- a/webview-ui/src/components/settings/providers/Bedrock.tsx +++ b/webview-ui/src/components/settings/providers/Bedrock.tsx @@ -2,7 +2,7 @@ import { useCallback } from "react" import { Checkbox } from "vscrui" import { VSCodeTextField, VSCodeRadio, VSCodeRadioGroup } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings, ModelInfo } from "@roo/shared/api" +import type { ProviderSettings, ModelInfo } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@src/components/ui" diff --git a/webview-ui/src/components/settings/providers/BedrockCustomArn.tsx b/webview-ui/src/components/settings/providers/BedrockCustomArn.tsx index 1caf95b8c7..7ace93c843 100644 --- a/webview-ui/src/components/settings/providers/BedrockCustomArn.tsx +++ b/webview-ui/src/components/settings/providers/BedrockCustomArn.tsx @@ -1,7 +1,7 @@ import { useMemo } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { validateBedrockArn } from "@src/utils/validate" import { useAppTranslation } from "@src/i18n/TranslationContext" diff --git a/webview-ui/src/components/settings/providers/Chutes.tsx b/webview-ui/src/components/settings/providers/Chutes.tsx index 10ca2c202f..c51479421a 100644 --- a/webview-ui/src/components/settings/providers/Chutes.tsx +++ b/webview-ui/src/components/settings/providers/Chutes.tsx @@ -1,7 +1,7 @@ import { useCallback } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" diff --git a/webview-ui/src/components/settings/providers/DeepSeek.tsx b/webview-ui/src/components/settings/providers/DeepSeek.tsx index ffb48aec09..6f0ac2d92a 100644 --- a/webview-ui/src/components/settings/providers/DeepSeek.tsx +++ b/webview-ui/src/components/settings/providers/DeepSeek.tsx @@ -1,7 +1,7 @@ import { useCallback } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" diff --git a/webview-ui/src/components/settings/providers/Gemini.tsx b/webview-ui/src/components/settings/providers/Gemini.tsx index 0a9af31568..21056f12d5 100644 --- a/webview-ui/src/components/settings/providers/Gemini.tsx +++ b/webview-ui/src/components/settings/providers/Gemini.tsx @@ -2,7 +2,7 @@ import { useCallback, useState } from "react" import { Checkbox } from "vscrui" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" diff --git a/webview-ui/src/components/settings/providers/Glama.tsx b/webview-ui/src/components/settings/providers/Glama.tsx index 7a7f5dcc49..990f7804d0 100644 --- a/webview-ui/src/components/settings/providers/Glama.tsx +++ b/webview-ui/src/components/settings/providers/Glama.tsx @@ -1,7 +1,9 @@ import { useCallback } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings, RouterModels, glamaDefaultModelId } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" + +import { RouterModels, glamaDefaultModelId } from "@roo/api" import { useAppTranslation } from "@src/i18n/TranslationContext" import { getGlamaAuthUrl } from "@src/oauth/urls" diff --git a/webview-ui/src/components/settings/providers/Groq.tsx b/webview-ui/src/components/settings/providers/Groq.tsx index eaf29a4572..a8a910d1ac 100644 --- a/webview-ui/src/components/settings/providers/Groq.tsx +++ b/webview-ui/src/components/settings/providers/Groq.tsx @@ -1,7 +1,7 @@ import { useCallback } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" diff --git a/webview-ui/src/components/settings/providers/LMStudio.tsx b/webview-ui/src/components/settings/providers/LMStudio.tsx index df58f903bb..9177457039 100644 --- a/webview-ui/src/components/settings/providers/LMStudio.tsx +++ b/webview-ui/src/components/settings/providers/LMStudio.tsx @@ -4,10 +4,10 @@ import { Trans } from "react-i18next" import { Checkbox } from "vscrui" import { VSCodeLink, VSCodeRadio, VSCodeRadioGroup, VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" +import { ExtensionMessage } from "@roo/ExtensionMessage" import { inputEventTransform } from "../transforms" diff --git a/webview-ui/src/components/settings/providers/LiteLLM.tsx b/webview-ui/src/components/settings/providers/LiteLLM.tsx index 717b10bb8a..b9ea04e87f 100644 --- a/webview-ui/src/components/settings/providers/LiteLLM.tsx +++ b/webview-ui/src/components/settings/providers/LiteLLM.tsx @@ -1,16 +1,18 @@ import { useCallback, useState, useEffect, useRef } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings, litellmDefaultModelId, RouterName } from "@roo/shared/api" -import { Button } from "@src/components/ui" -import { vscode } from "@src/utils/vscode" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" +import type { ProviderSettings } from "@roo-code/types" +import { litellmDefaultModelId, RouterName } from "@roo/api" +import { ExtensionMessage } from "@roo/ExtensionMessage" + +import { vscode } from "@src/utils/vscode" +import { useExtensionState } from "@src/context/ExtensionStateContext" import { useAppTranslation } from "@src/i18n/TranslationContext" +import { Button } from "@src/components/ui" import { inputEventTransform } from "../transforms" import { ModelPicker } from "../ModelPicker" -import { useExtensionState } from "@src/context/ExtensionStateContext" type LiteLLMProps = { apiConfiguration: ProviderSettings diff --git a/webview-ui/src/components/settings/providers/Mistral.tsx b/webview-ui/src/components/settings/providers/Mistral.tsx index 1669166043..115b0b6b80 100644 --- a/webview-ui/src/components/settings/providers/Mistral.tsx +++ b/webview-ui/src/components/settings/providers/Mistral.tsx @@ -1,7 +1,9 @@ import { useCallback } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings, RouterModels, mistralDefaultModelId } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" + +import { RouterModels, mistralDefaultModelId } from "@roo/api" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" diff --git a/webview-ui/src/components/settings/providers/Ollama.tsx b/webview-ui/src/components/settings/providers/Ollama.tsx index bda3c441cc..27fd2a5189 100644 --- a/webview-ui/src/components/settings/providers/Ollama.tsx +++ b/webview-ui/src/components/settings/providers/Ollama.tsx @@ -2,8 +2,9 @@ import { useState, useCallback } from "react" import { useEvent } from "react-use" import { VSCodeTextField, VSCodeRadioGroup, VSCodeRadio } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" +import type { ProviderSettings } from "@roo-code/types" + +import { ExtensionMessage } from "@roo/ExtensionMessage" import { useAppTranslation } from "@src/i18n/TranslationContext" diff --git a/webview-ui/src/components/settings/providers/OpenAI.tsx b/webview-ui/src/components/settings/providers/OpenAI.tsx index 771d77ef6a..e2f7857fe0 100644 --- a/webview-ui/src/components/settings/providers/OpenAI.tsx +++ b/webview-ui/src/components/settings/providers/OpenAI.tsx @@ -2,7 +2,7 @@ import { useCallback, useState } from "react" import { Checkbox } from "vscrui" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" diff --git a/webview-ui/src/components/settings/providers/OpenAICompatible.tsx b/webview-ui/src/components/settings/providers/OpenAICompatible.tsx index e0de23e792..948bcc4b7f 100644 --- a/webview-ui/src/components/settings/providers/OpenAICompatible.tsx +++ b/webview-ui/src/components/settings/providers/OpenAICompatible.tsx @@ -2,15 +2,16 @@ import { useState, useCallback, useEffect } from "react" import { useEvent } from "react-use" import { Checkbox } from "vscrui" import { VSCodeButton, VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { convertHeadersToObject } from "../utils/headers" -import { ModelInfo, ReasoningEffort } from "@roo/schemas" -import { ProviderSettings, azureOpenAiDefaultApiVersion, openAiModelInfoSaneDefaults } from "@roo/shared/api" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" +import type { ProviderSettings, ModelInfo, ReasoningEffort } from "@roo-code/types" + +import { azureOpenAiDefaultApiVersion, openAiModelInfoSaneDefaults } from "@roo/api" +import { ExtensionMessage } from "@roo/ExtensionMessage" import { useAppTranslation } from "@src/i18n/TranslationContext" import { Button } from "@src/components/ui" +import { convertHeadersToObject } from "../utils/headers" import { inputEventTransform, noTransform } from "../transforms" import { ModelPicker } from "../ModelPicker" import { R1FormatSetting } from "../R1FormatSetting" diff --git a/webview-ui/src/components/settings/providers/OpenRouter.tsx b/webview-ui/src/components/settings/providers/OpenRouter.tsx index 35cf34b6c9..eb89f6bfaf 100644 --- a/webview-ui/src/components/settings/providers/OpenRouter.tsx +++ b/webview-ui/src/components/settings/providers/OpenRouter.tsx @@ -4,7 +4,9 @@ import { Checkbox } from "vscrui" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" import { ExternalLinkIcon } from "@radix-ui/react-icons" -import { ProviderSettings, RouterModels, openRouterDefaultModelId } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" + +import { RouterModels, openRouterDefaultModelId } from "@roo/api" import { useAppTranslation } from "@src/i18n/TranslationContext" import { getOpenRouterAuthUrl } from "@src/oauth/urls" diff --git a/webview-ui/src/components/settings/providers/Requesty.tsx b/webview-ui/src/components/settings/providers/Requesty.tsx index 9c6ba2844e..6c9e3c97a8 100644 --- a/webview-ui/src/components/settings/providers/Requesty.tsx +++ b/webview-ui/src/components/settings/providers/Requesty.tsx @@ -1,7 +1,9 @@ import { useCallback, useState } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings, RouterModels, requestyDefaultModelId } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" + +import { RouterModels, requestyDefaultModelId } from "@roo/api" import { vscode } from "@src/utils/vscode" import { useAppTranslation } from "@src/i18n/TranslationContext" diff --git a/webview-ui/src/components/settings/providers/Unbound.tsx b/webview-ui/src/components/settings/providers/Unbound.tsx index 3d5aa0c67a..33b124c69c 100644 --- a/webview-ui/src/components/settings/providers/Unbound.tsx +++ b/webview-ui/src/components/settings/providers/Unbound.tsx @@ -2,7 +2,9 @@ import { useCallback, useState, useRef } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" import { useQueryClient } from "@tanstack/react-query" -import { ProviderSettings, RouterModels, unboundDefaultModelId } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" + +import { RouterModels, unboundDefaultModelId } from "@roo/api" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" diff --git a/webview-ui/src/components/settings/providers/VSCodeLM.tsx b/webview-ui/src/components/settings/providers/VSCodeLM.tsx index 7f9426e5ce..a2097badf6 100644 --- a/webview-ui/src/components/settings/providers/VSCodeLM.tsx +++ b/webview-ui/src/components/settings/providers/VSCodeLM.tsx @@ -2,8 +2,9 @@ import { useState, useCallback } from "react" import { useEvent } from "react-use" import { LanguageModelChatSelector } from "vscode" -import { ProviderSettings } from "@roo/shared/api" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" +import type { ProviderSettings } from "@roo-code/types" + +import { ExtensionMessage } from "@roo/ExtensionMessage" import { useAppTranslation } from "@src/i18n/TranslationContext" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@src/components/ui" diff --git a/webview-ui/src/components/settings/providers/Vertex.tsx b/webview-ui/src/components/settings/providers/Vertex.tsx index b43c793816..1bf475eb0a 100644 --- a/webview-ui/src/components/settings/providers/Vertex.tsx +++ b/webview-ui/src/components/settings/providers/Vertex.tsx @@ -1,7 +1,7 @@ import { useCallback } from "react" import { VSCodeLink, VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@src/components/ui" diff --git a/webview-ui/src/components/settings/providers/XAI.tsx b/webview-ui/src/components/settings/providers/XAI.tsx index c42bde1b1e..619f223901 100644 --- a/webview-ui/src/components/settings/providers/XAI.tsx +++ b/webview-ui/src/components/settings/providers/XAI.tsx @@ -1,7 +1,7 @@ import { useCallback } from "react" import { VSCodeTextField } from "@vscode/webview-ui-toolkit/react" -import { ProviderSettings } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" import { useAppTranslation } from "@src/i18n/TranslationContext" import { VSCodeButtonLink } from "@src/components/common/VSCodeButtonLink" diff --git a/webview-ui/src/components/settings/types.ts b/webview-ui/src/components/settings/types.ts index 9eb22b7694..f4fa4c7832 100644 --- a/webview-ui/src/components/settings/types.ts +++ b/webview-ui/src/components/settings/types.ts @@ -1,4 +1,4 @@ -import { ExperimentId } from "@roo/shared/experiments" +import type { ExperimentId } from "@roo-code/types" import { ExtensionStateContextType } from "@/context/ExtensionStateContext" diff --git a/webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.test.ts b/webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.test.ts index 544da42c35..e7806a9f21 100644 --- a/webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.test.ts +++ b/webview-ui/src/components/ui/hooks/__tests__/useSelectedModel.test.ts @@ -4,7 +4,7 @@ import React from "react" import { QueryClient, QueryClientProvider } from "@tanstack/react-query" import { renderHook } from "@testing-library/react" -import { ProviderSettings, ModelInfo } from "@roo/shared/api" +import { ProviderSettings, ModelInfo } from "@roo-code/types" import { useSelectedModel } from "../useSelectedModel" import { useRouterModels } from "../useRouterModels" diff --git a/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts b/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts index fb3863ff6a..dc50c0f6a6 100644 --- a/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts +++ b/webview-ui/src/components/ui/hooks/useOpenRouterModelProviders.ts @@ -2,8 +2,9 @@ import axios from "axios" import { z } from "zod" import { useQuery, UseQueryOptions } from "@tanstack/react-query" -import { ModelInfo } from "@roo/shared/api" -import { parseApiPrice } from "@roo/utils/cost" +import type { ModelInfo } from "@roo-code/types" + +import { parseApiPrice } from "@roo/cost" export const OPENROUTER_DEFAULT_PROVIDER_NAME = "[default]" diff --git a/webview-ui/src/components/ui/hooks/useRouterModels.ts b/webview-ui/src/components/ui/hooks/useRouterModels.ts index f9a9c06a66..0ca68cc27a 100644 --- a/webview-ui/src/components/ui/hooks/useRouterModels.ts +++ b/webview-ui/src/components/ui/hooks/useRouterModels.ts @@ -1,8 +1,9 @@ -import { RouterModels } from "@roo/shared/api" +import { useQuery } from "@tanstack/react-query" + +import { RouterModels } from "@roo/api" +import { ExtensionMessage } from "@roo/ExtensionMessage" import { vscode } from "@src/utils/vscode" -import { ExtensionMessage } from "@roo/shared/ExtensionMessage" -import { useQuery } from "@tanstack/react-query" const getRouterModels = async () => new Promise((resolve, reject) => { diff --git a/webview-ui/src/components/ui/hooks/useSelectedModel.ts b/webview-ui/src/components/ui/hooks/useSelectedModel.ts index e28b24824b..f656c702dd 100644 --- a/webview-ui/src/components/ui/hooks/useSelectedModel.ts +++ b/webview-ui/src/components/ui/hooks/useSelectedModel.ts @@ -1,8 +1,7 @@ +import type { ProviderName, ProviderSettings, ModelInfo } from "@roo-code/types" + import { - type ProviderName, - type ProviderSettings, - type RouterModels, - type ModelInfo, + RouterModels, anthropicDefaultModelId, anthropicModels, bedrockDefaultModelId, @@ -31,7 +30,7 @@ import { glamaDefaultModelId, unboundDefaultModelId, litellmDefaultModelId, -} from "@roo/shared/api" +} from "@roo/api" import { useRouterModels } from "./useRouterModels" import { useOpenRouterModelProviders } from "./useOpenRouterModelProviders" diff --git a/webview-ui/src/components/welcome/WelcomeView.tsx b/webview-ui/src/components/welcome/WelcomeView.tsx index 3d860fd7ec..3989151c52 100644 --- a/webview-ui/src/components/welcome/WelcomeView.tsx +++ b/webview-ui/src/components/welcome/WelcomeView.tsx @@ -1,16 +1,20 @@ import { useCallback, useState } from "react" +import knuthShuffle from "knuth-shuffle-seeded" +import { Trans } from "react-i18next" import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" + +import type { ProviderSettings } from "@roo-code/types" + import { useExtensionState } from "@src/context/ExtensionStateContext" import { validateApiConfiguration } from "@src/utils/validate" import { vscode } from "@src/utils/vscode" -import ApiOptions from "../settings/ApiOptions" -import { Tab, TabContent } from "../common/Tab" -import { Trans } from "react-i18next" import { useAppTranslation } from "@src/i18n/TranslationContext" import { getRequestyAuthUrl, getOpenRouterAuthUrl } from "@src/oauth/urls" + +import ApiOptions from "../settings/ApiOptions" +import { Tab, TabContent } from "../common/Tab" + import RooHero from "./RooHero" -import knuthShuffle from "knuth-shuffle-seeded" -import { ProviderSettings } from "@roo/shared/api" const WelcomeView = () => { const { apiConfiguration, currentApiConfigName, setApiConfiguration, uriScheme, machineId } = useExtensionState() diff --git a/webview-ui/src/context/ExtensionStateContext.tsx b/webview-ui/src/context/ExtensionStateContext.tsx index 53629f942e..b7cdf75f25 100644 --- a/webview-ui/src/context/ExtensionStateContext.tsx +++ b/webview-ui/src/context/ExtensionStateContext.tsx @@ -1,16 +1,23 @@ import React, { createContext, useCallback, useContext, useEffect, useState } from "react" import { useEvent } from "react-use" -import { ProviderSettingsEntry, ExtensionMessage, ExtensionState } from "@roo/shared/ExtensionMessage" -import { ProviderSettings } from "@roo/shared/api" -import { findLastIndex } from "@roo/shared/array" -import { McpServer } from "@roo/shared/mcp" -import { checkExistKey } from "@roo/shared/checkExistApiConfig" -import { Mode, CustomModePrompts, defaultModeSlug, defaultPrompts, ModeConfig } from "@roo/shared/modes" -import { CustomSupportPrompts } from "@roo/shared/support-prompt" -import { experimentDefault, ExperimentId } from "@roo/shared/experiments" -import { TelemetrySetting } from "@roo/shared/TelemetrySetting" -import { RouterModels } from "@roo/shared/api" +import type { + ProviderSettings, + ProviderSettingsEntry, + CustomModePrompts, + ModeConfig, + ExperimentId, +} from "@roo-code/types" + +import { ExtensionMessage, ExtensionState } from "@roo/ExtensionMessage" +import { findLastIndex } from "@roo/array" +import { McpServer } from "@roo/mcp" +import { checkExistKey } from "@roo/checkExistApiConfig" +import { Mode, defaultModeSlug, defaultPrompts } from "@roo/modes" +import { CustomSupportPrompts } from "@roo/support-prompt" +import { experimentDefault } from "@roo/experiments" +import { TelemetrySetting } from "@roo/TelemetrySetting" +import { RouterModels } from "@roo/api" import { vscode } from "@src/utils/vscode" import { convertTextMateToHljs } from "@src/utils/textMateToHljs" diff --git a/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx b/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx index 9c15b3bb0d..911d516caa 100644 --- a/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx +++ b/webview-ui/src/context/__tests__/ExtensionStateContext.test.tsx @@ -2,10 +2,11 @@ import { render, screen, act } from "@testing-library/react" -import { ExtensionState } from "@roo/shared/ExtensionMessage" +import { ProviderSettings, ExperimentId } from "@roo-code/types" + +import { ExtensionState } from "@roo/ExtensionMessage" + import { ExtensionStateContextProvider, useExtensionState, mergeExtensionState } from "../ExtensionStateContext" -import { ExperimentId } from "@roo/shared/experiments" -import { ProviderSettings } from "@roo/shared/api" const TestComponent = () => { const { allowedCommands, setAllowedCommands, soundEnabled, showRooIgnoredFiles, setShowRooIgnoredFiles } = diff --git a/webview-ui/src/oauth/urls.ts b/webview-ui/src/oauth/urls.ts index 17e205ae3e..8abf0ca434 100644 --- a/webview-ui/src/oauth/urls.ts +++ b/webview-ui/src/oauth/urls.ts @@ -1,4 +1,4 @@ -import { Package } from "@roo/schemas" +import { Package } from "@roo/package" export function getCallbackUrl(provider: string, uriScheme?: string) { return encodeURIComponent(`${uriScheme || "vscode"}://${Package.publisher}.${Package.name}/${provider}`) diff --git a/webview-ui/src/utils/TelemetryClient.ts b/webview-ui/src/utils/TelemetryClient.ts index 8b502da5a4..4f8759d2c5 100644 --- a/webview-ui/src/utils/TelemetryClient.ts +++ b/webview-ui/src/utils/TelemetryClient.ts @@ -1,5 +1,5 @@ import posthog from "posthog-js" -import { TelemetrySetting } from "@roo/shared/TelemetrySetting" +import { TelemetrySetting } from "@roo/TelemetrySetting" class TelemetryClient { private static instance: TelemetryClient diff --git a/webview-ui/src/utils/context-mentions.ts b/webview-ui/src/utils/context-mentions.ts index e3783d13ae..5df3404b23 100644 --- a/webview-ui/src/utils/context-mentions.ts +++ b/webview-ui/src/utils/context-mentions.ts @@ -1,6 +1,8 @@ -import { mentionRegex } from "@roo/shared/context-mentions" import { Fzf } from "fzf" -import { ModeConfig } from "@roo/shared/modes" + +import type { ModeConfig } from "@roo-code/types" + +import { mentionRegex } from "@roo/context-mentions" import { escapeSpaces } from "./path-mentions" diff --git a/webview-ui/src/utils/mcp.ts b/webview-ui/src/utils/mcp.ts index c3bce68f0a..b2a2ca002f 100644 --- a/webview-ui/src/utils/mcp.ts +++ b/webview-ui/src/utils/mcp.ts @@ -1,4 +1,4 @@ -import { McpResource, McpResourceTemplate } from "@roo/shared/mcp" +import { McpResource, McpResourceTemplate } from "@roo/mcp" /** * Matches a URI against an array of URI templates and returns the matching template diff --git a/webview-ui/src/utils/validate.ts b/webview-ui/src/utils/validate.ts index 0765fffeda..69b7590c0f 100644 --- a/webview-ui/src/utils/validate.ts +++ b/webview-ui/src/utils/validate.ts @@ -1,6 +1,8 @@ import i18next from "i18next" -import { ProviderSettings, isRouterName, RouterModels } from "@roo/shared/api" +import type { ProviderSettings } from "@roo-code/types" + +import { isRouterName, RouterModels } from "@roo/api" export function validateApiConfiguration(apiConfiguration: ProviderSettings): string | undefined { switch (apiConfiguration.apiProvider) { diff --git a/webview-ui/src/utils/vscode.ts b/webview-ui/src/utils/vscode.ts index 238eed22fd..2b2b25593b 100644 --- a/webview-ui/src/utils/vscode.ts +++ b/webview-ui/src/utils/vscode.ts @@ -1,6 +1,7 @@ -import { WebviewMessage } from "@roo/shared/WebviewMessage" import type { WebviewApi } from "vscode-webview" +import { WebviewMessage } from "@roo/WebviewMessage" + /** * A utility wrapper around the acquireVsCodeApi() function, which enables * message passing and state management between the webview and extension diff --git a/webview-ui/tsconfig.json b/webview-ui/tsconfig.json index 94b4a65bf9..530519bd27 100644 --- a/webview-ui/tsconfig.json +++ b/webview-ui/tsconfig.json @@ -21,7 +21,7 @@ "paths": { "@/*": ["./src/*"], "@src/*": ["./src/*"], - "@roo/*": ["../src/*"] + "@roo/*": ["../src/shared/*"] } }, "include": ["src", "../src/shared"] diff --git a/webview-ui/vite.config.ts b/webview-ui/vite.config.ts index 46afaf06dd..c47a838afa 100644 --- a/webview-ui/vite.config.ts +++ b/webview-ui/vite.config.ts @@ -87,7 +87,7 @@ export default defineConfig(({ mode }) => { alias: { "@": resolve(__dirname, "./src"), "@src": resolve(__dirname, "./src"), - "@roo": resolve(__dirname, "../src"), + "@roo": resolve(__dirname, "../src/shared"), }, }, build: {