Compare commits

...

4 Commits

Author SHA1 Message Date
matt korwel aaabf79472 Merge branch 'main' into chore/migrate-to-tsgo 2026-04-17 08:21:55 -07:00
matt korwel e57bec920d Merge branch 'main' into chore/migrate-to-tsgo 2026-04-14 16:34:16 -07:00
Michael Bleigh 94575adb42 chore: address PR feedback on type safety and path mappings 2026-04-12 19:16:18 -07:00
Michael Bleigh 9594a1822b chore: migrate to @typescript/native-preview (tsgo) 2026-04-12 18:42:13 -07:00
13 changed files with 152 additions and 28 deletions
+126 -6
View File
@@ -34,6 +34,7 @@
"@types/react-dom": "^19.2.0",
"@types/shell-quote": "^1.7.5",
"@types/ws": "^8.18.1",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"@vitest/coverage-v8": "^3.1.1",
"@vitest/eslint-plugin": "^1.3.4",
"asciichart": "^1.5.25",
@@ -4504,6 +4505,123 @@
"url": "https://opencollective.com/typescript-eslint"
}
},
"node_modules/@typescript/native-preview": {
"version": "7.0.0-dev.20260412.1",
"resolved": "https://registry.npmjs.org/@typescript/native-preview/-/native-preview-7.0.0-dev.20260412.1.tgz",
"integrity": "sha512-tDw3XZt2BkjAlt/MJmnFGmbe9lgKmc5wezmrMoBIEvJcqz+/KVpVBVvjbkZoaiABnJmuG3G3b6IUFrEveTw6UQ==",
"dev": true,
"license": "Apache-2.0",
"bin": {
"tsgo": "bin/tsgo.js"
},
"optionalDependencies": {
"@typescript/native-preview-darwin-arm64": "7.0.0-dev.20260412.1",
"@typescript/native-preview-darwin-x64": "7.0.0-dev.20260412.1",
"@typescript/native-preview-linux-arm": "7.0.0-dev.20260412.1",
"@typescript/native-preview-linux-arm64": "7.0.0-dev.20260412.1",
"@typescript/native-preview-linux-x64": "7.0.0-dev.20260412.1",
"@typescript/native-preview-win32-arm64": "7.0.0-dev.20260412.1",
"@typescript/native-preview-win32-x64": "7.0.0-dev.20260412.1"
}
},
"node_modules/@typescript/native-preview-darwin-arm64": {
"version": "7.0.0-dev.20260412.1",
"resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-arm64/-/native-preview-darwin-arm64-7.0.0-dev.20260412.1.tgz",
"integrity": "sha512-sSkFG+hjtRWffg6FddF3dEkk7N3TRMEqfiUpixwcWhXgyocMdPw8wutTvQRBxQdgxeL9y01M2SO8A8YPPiEgVg==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@typescript/native-preview-darwin-x64": {
"version": "7.0.0-dev.20260412.1",
"resolved": "https://registry.npmjs.org/@typescript/native-preview-darwin-x64/-/native-preview-darwin-x64-7.0.0-dev.20260412.1.tgz",
"integrity": "sha512-m2BTeaLkrHEEDg0D9snigddy01qTY+wgx+W+GpXAfx36PPvW4xWuGXNVWfSaB8bqAC9C8NeLnT/C9/G/rJ5v2w==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@typescript/native-preview-linux-arm": {
"version": "7.0.0-dev.20260412.1",
"resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm/-/native-preview-linux-arm-7.0.0-dev.20260412.1.tgz",
"integrity": "sha512-wDLekbfsfmKMWORg7CTnEnpKj8oXpU/6AEBrtVN9CEUCiQAe6yH878nZHhJNzWQXHtrtFf3lY49Yplqmdxja3w==",
"cpu": [
"arm"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@typescript/native-preview-linux-arm64": {
"version": "7.0.0-dev.20260412.1",
"resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-arm64/-/native-preview-linux-arm64-7.0.0-dev.20260412.1.tgz",
"integrity": "sha512-JAdsG6MlVV1hoAUKPy8zxAL7xLeNxz8JgCbLCJVqW8EyH29R9FD4cFTqr7CSIRTNUEDzDTrgnXUyoRtDe1gr+w==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@typescript/native-preview-linux-x64": {
"version": "7.0.0-dev.20260412.1",
"resolved": "https://registry.npmjs.org/@typescript/native-preview-linux-x64/-/native-preview-linux-x64-7.0.0-dev.20260412.1.tgz",
"integrity": "sha512-gYgppiQIqid3jZ7D8THh4k3Q+4bwidrQH6SL9Xgbk1qfP6/jwv8twuPqDOfZ+cK2OD55lQHp15fOh2lMNAC40Q==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@typescript/native-preview-win32-arm64": {
"version": "7.0.0-dev.20260412.1",
"resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-arm64/-/native-preview-win32-arm64-7.0.0-dev.20260412.1.tgz",
"integrity": "sha512-TOh7rH5H3jisHJqRXJSjmUGMzcbNBocS/hufhXPQIv+g3pdG5IKZoSnv3SV62I5d12FFDSS5KQon5MQPnOKAHg==",
"cpu": [
"arm64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"win32"
]
},
"node_modules/@typescript/native-preview-win32-x64": {
"version": "7.0.0-dev.20260412.1",
"resolved": "https://registry.npmjs.org/@typescript/native-preview-win32-x64/-/native-preview-win32-x64-7.0.0-dev.20260412.1.tgz",
"integrity": "sha512-u+70wL89wspN1wKoX6FVNUATRGCG3BpleByP3H/UqOZvlwuMm8N7Gy8hEbM0U8bDyAuyP/daUfTBVkqXjjv9mA==",
"cpu": [
"x64"
],
"dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
"win32"
]
},
"node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz",
@@ -16054,6 +16172,7 @@
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"devOptional": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
@@ -17763,9 +17882,9 @@
"@types/fs-extra": "^11.0.4",
"@types/supertest": "^6.0.3",
"@types/tar": "^6.1.13",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"dotenv": "^16.4.5",
"supertest": "^7.1.4",
"typescript": "^5.3.3",
"vitest": "^3.1.1"
},
"engines": {
@@ -17928,8 +18047,8 @@
"@types/shell-quote": "^1.7.5",
"@types/ws": "^8.5.10",
"@types/yargs": "^17.0.32",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"@xterm/headless": "^5.5.0",
"typescript": "^5.3.3",
"vitest": "^3.1.1"
},
"engines": {
@@ -18096,9 +18215,9 @@
"@types/js-yaml": "^4.0.9",
"@types/json-stable-stringify": "^1.1.0",
"@types/picomatch": "^4.0.1",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"chrome-devtools-mcp": "^0.19.0",
"msw": "^2.3.4",
"typescript": "^5.3.3",
"vitest": "^3.1.1"
},
"engines": {
@@ -18306,6 +18425,7 @@
"ws": "^8.16.0"
},
"devDependencies": {
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"react": "^19.2.0",
"react-dom": "^19.2.0"
},
@@ -18323,7 +18443,7 @@
"zod-to-json-schema": "^3.23.1"
},
"devDependencies": {
"typescript": "^5.3.3",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"vitest": "^3.1.1"
},
"engines": {
@@ -18356,7 +18476,7 @@
"vitest": "^3.2.4"
},
"devDependencies": {
"typescript": "^5.3.3"
"@typescript/native-preview": "^7.0.0-dev.20260412.1"
},
"engines": {
"node": ">=20"
@@ -18393,11 +18513,11 @@
"@types/vscode": "^1.99.0",
"@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.31.1",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"@vscode/vsce": "^3.6.0",
"esbuild": "^0.25.3",
"eslint": "^9.25.1",
"npm-run-all2": "^8.0.2",
"typescript": "^5.8.3",
"vitest": "^3.2.4"
},
"engines": {
+1
View File
@@ -106,6 +106,7 @@
"@types/react-dom": "^19.2.0",
"@types/shell-quote": "^1.7.5",
"@types/ws": "^8.18.1",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"@vitest/coverage-v8": "^3.1.1",
"@vitest/eslint-plugin": "^1.3.4",
"asciichart": "^1.5.25",
+2 -2
View File
@@ -19,7 +19,7 @@
"format": "prettier --write .",
"test": "vitest run",
"test:ci": "vitest run --coverage",
"typecheck": "tsc --noEmit"
"typecheck": "tsgo --noEmit"
},
"files": [
"dist"
@@ -41,9 +41,9 @@
"@types/fs-extra": "^11.0.4",
"@types/supertest": "^6.0.3",
"@types/tar": "^6.1.13",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"dotenv": "^16.4.5",
"supertest": "^7.1.4",
"typescript": "^5.3.3",
"vitest": "^3.1.1"
},
"engines": {
+7 -6
View File
@@ -12,6 +12,7 @@ import {
type ToolCallRequestInfo,
type GitService,
type CompletedToolCall,
type ServerGeminiStreamEvent,
} from '@google/gemini-cli-core';
import { createMockConfig } from '../utils/testing_utils.js';
import type { ExecutionEventBus, RequestContext } from '@a2a-js/sdk/server';
@@ -230,8 +231,8 @@ describe('Task', () => {
mockEventBus,
);
const event = {
type: 'content',
const event: ServerGeminiStreamEvent = {
type: GeminiEventType.Content,
value: 'test',
traceId: 'test-trace-id',
};
@@ -267,7 +268,7 @@ describe('Task', () => {
);
const citationText = 'Source: example.com';
const citationEvent = {
const citationEvent: ServerGeminiStreamEvent = {
type: GeminiEventType.Citation,
value: citationText,
};
@@ -310,7 +311,7 @@ describe('Task', () => {
mockEventBus,
);
const modelInfoEvent = {
const modelInfoEvent: ServerGeminiStreamEvent = {
type: GeminiEventType.ModelInfo,
value: 'new-model-name',
};
@@ -342,7 +343,7 @@ describe('Task', () => {
it.each([
{ eventType: GeminiEventType.Retry, eventName: 'Retry' },
{ eventType: GeminiEventType.InvalidStream, eventName: 'InvalidStream' },
])(
] as const)(
'should handle $eventName event without triggering error handling',
async ({ eventType }) => {
const mockConfig = createMockConfig();
@@ -366,7 +367,7 @@ describe('Task', () => {
const cancelPendingToolsSpy = vi.spyOn(task, 'cancelPendingTools');
const setTaskStateSpy = vi.spyOn(task, 'setTaskStateAndPublishUpdate');
const event = {
const event: ServerGeminiStreamEvent = {
type: eventType,
};
+2 -2
View File
@@ -21,7 +21,7 @@
"test": "vitest run",
"test:ci": "vitest run",
"posttest": "npm run build",
"typecheck": "tsc --noEmit"
"typecheck": "tsgo --noEmit"
},
"files": [
"dist"
@@ -81,8 +81,8 @@
"@types/shell-quote": "^1.7.5",
"@types/ws": "^8.5.10",
"@types/yargs": "^17.0.32",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"@xterm/headless": "^5.5.0",
"typescript": "^5.3.3",
"vitest": "^3.1.1"
},
"engines": {
+2 -2
View File
@@ -17,7 +17,7 @@
"test": "vitest run",
"test:ci": "vitest run",
"posttest": "npm run build",
"typecheck": "tsc --noEmit"
"typecheck": "tsgo --noEmit"
},
"files": [
"dist",
@@ -108,9 +108,9 @@
"@types/js-yaml": "^4.0.9",
"@types/json-stable-stringify": "^1.1.0",
"@types/picomatch": "^4.0.1",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"chrome-devtools-mcp": "^0.19.0",
"msw": "^2.3.4",
"typescript": "^5.3.3",
"vitest": "^3.1.1"
},
"engines": {
+1 -1
View File
@@ -5,8 +5,8 @@
"lib": ["DOM", "DOM.Iterable", "ES2023"],
"composite": true,
"types": ["node", "vitest/globals"],
"baseUrl": ".",
"paths": {
"src/*": ["./src/*"],
"@google/gemini-cli-core": ["./index.ts"]
}
},
+2 -1
View File
@@ -12,7 +12,7 @@
}
},
"scripts": {
"build": "npm run build:client && tsc -p tsconfig.build.json",
"build": "npm run build:client && tsgo -p tsconfig.build.json",
"build:client": "node esbuild.client.js"
},
"files": [
@@ -23,6 +23,7 @@
"node": ">=20"
},
"devDependencies": {
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"react": "^19.2.0",
"react-dom": "^19.2.0"
},
+1
View File
@@ -1,6 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist/src",
"declaration": true,
"sourceMap": true,
+2 -2
View File
@@ -16,7 +16,7 @@
"format": "prettier --write .",
"test": "vitest run",
"test:ci": "vitest run",
"typecheck": "tsc --noEmit"
"typecheck": "tsgo --noEmit"
},
"files": [
"dist"
@@ -27,7 +27,7 @@
"zod-to-json-schema": "^3.23.1"
},
"devDependencies": {
"typescript": "^5.3.3",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"vitest": "^3.1.1"
},
"engines": {
+4 -4
View File
@@ -7,7 +7,7 @@
"type": "module",
"scripts": {
"build": "node ../../scripts/build_package.js",
"typecheck": "tsc --noEmit"
"typecheck": "tsgo --noEmit"
},
"dependencies": {
"@google/gemini-cli-core": "file:../core",
@@ -16,10 +16,10 @@
"strip-ansi": "^7.1.2",
"vitest": "^3.2.4"
},
"devDependencies": {
"typescript": "^5.3.3"
},
"engines": {
"node": ">=20"
},
"devDependencies": {
"@typescript/native-preview": "^7.0.0-dev.20260412.1"
}
}
+1 -1
View File
@@ -129,11 +129,11 @@
"@types/vscode": "^1.99.0",
"@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.31.1",
"@typescript/native-preview": "^7.0.0-dev.20260412.1",
"@vscode/vsce": "^3.6.0",
"esbuild": "^0.25.3",
"eslint": "^9.25.1",
"npm-run-all2": "^8.0.2",
"typescript": "^5.8.3",
"vitest": "^3.2.4"
},
"dependencies": {
+1 -1
View File
@@ -29,7 +29,7 @@ if (!process.cwd().includes('packages')) {
const packageName = basename(process.cwd());
// build typescript files
execSync('tsc --build', { stdio: 'inherit' });
execSync('tsgo --build', { stdio: 'inherit' });
// Run package-specific bundling if the script exists
const bundleScript = join(process.cwd(), 'scripts', 'bundle-browser-mcp.mjs');