Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function build({
buildOptions.banner = {
js:
(buildOptions.banner?.js || '') +
`import {createRequire as topLevelCreateRequire} from 'module';\nconst require = topLevelCreateRequire(import.meta.url);`,
`import {createRequire as topLevelCreateRequire} from 'node:module';\nconst require = topLevelCreateRequire(import.meta.url);`,
};
}

Expand Down
6 changes: 3 additions & 3 deletions core/src/artifacts/file_artifact_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

import {Part} from '@google/genai';
import * as fs from 'fs/promises';
import * as path from 'path';
import {fileURLToPath, pathToFileURL} from 'url';
import * as fs from 'node:fs/promises';
import * as path from 'node:path';
import {fileURLToPath, pathToFileURL} from 'node:url';

import {logger} from '../utils/logger.js';

Expand Down
4 changes: 2 additions & 2 deletions core/test/a2a/agent_to_a2a_body_parsing_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import express from 'express';
import type {Server} from 'http';
import type {AddressInfo} from 'net';
import type {Server} from 'node:http';
import type {AddressInfo} from 'node:net';
import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest';
import {toA2a} from '../../src/a2a/agent_to_a2a.js';
import {BaseAgent} from '../../src/agents/base_agent.js';
Expand Down
2 changes: 1 addition & 1 deletion core/test/agents/llm_agent_auth_integration_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
RestApiTool,
Runner,
} from '@google/adk';
import * as http from 'http';
import * as http from 'node:http';
import {OpenAPIV3} from 'openapi-types';
import {
afterAll,
Expand Down
6 changes: 3 additions & 3 deletions core/test/artifacts/file_artifact_service_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
*/

import {FileArtifactService} from '@google/adk';
import * as fs from 'fs/promises';
import * as os from 'os';
import * as path from 'path';
import * as fs from 'node:fs/promises';
import * as os from 'node:os';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';
import {
assertInsideRoot,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

import {Context, OpenAPIToolset} from '@google/adk';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {beforeEach, describe, expect, it, vi} from 'vitest';

describe('OpenAPIToolset Integration', () => {
Expand Down
2 changes: 1 addition & 1 deletion dev/src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
} from '@google/adk';
import {Argument, Command, Option} from 'commander';
import dotenv from 'dotenv';
import * as path from 'path';
import * as path from 'node:path';
import {runIntegrationTests} from '../integration/run_integration_tests.js';
import {AdkApiServer} from '../server/adk_api_server.js';
import {FileModuleType} from '../utils/agent_loader.js';
Expand Down
2 changes: 1 addition & 1 deletion integrations/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function build({
buildOptions.banner = {
js:
(buildOptions.banner?.js || '') +
`import {createRequire as topLevelCreateRequire} from 'module';\nconst require = topLevelCreateRequire(import.meta.url);`,
`import {createRequire as topLevelCreateRequire} from 'node:module';\nconst require = topLevelCreateRequire(import.meta.url);`,
};
}

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/context_compaction/agent_controlled_e2e_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';
import {createAgentControlledCompactionAgent} from './agent.js';

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/context_compaction/e2e_anchored_compaction_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import {
} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

class TestCompactionPlugin extends BasePlugin {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/context_compaction/e2e_compaction_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';
import {createCompactionAgent} from './agent.js';

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/context_compaction/e2e_compaction_vertexai_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import {
} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

function createVertexAICompactionAgent(): LlmAgent {
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/custom_metadata/custom_metadata_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import {Agent, Gemini, InMemoryRunner} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import {fileURLToPath} from 'url';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {fileURLToPath} from 'node:url';
import {describe, expect, it} from 'vitest';

const __filename = fileURLToPath(import.meta.url);
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/routing/ab_testing_agent_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import {InMemoryRunner, LlmAgent, RoutedAgent} from '@google/adk';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

const envPath = path.resolve(__dirname, '.env');
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/routing/ab_testing_llm_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import {Gemini, LlmRequest, RoutedLlm} from '@google/adk';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

const envPath = path.resolve(__dirname, '.env');
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/routing/auto_routing_agent_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
RoutedAgent,
} from '@google/adk';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

const envPath = path.resolve(__dirname, '.env');
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/routing/auto_routing_llm_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import {BaseLlm, Gemini, LlmRequest, RoutedLlm} from '@google/adk';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

const envPath = path.resolve(__dirname, '.env');
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/routing/model_fallback_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import {BaseLlm, Gemini, LlmRequest, RoutedLlm} from '@google/adk';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

const envPath = path.resolve(__dirname, '.env');
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/routing/planning_mode_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

import {FunctionTool, InMemoryRunner, LlmAgent, RoutedAgent} from '@google/adk';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';
import {z} from 'zod';

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/streaming/streaming_e2e_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';
import {z} from 'zod';

Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/tools/agent_registry_e2e_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import {AgentRegistry, InMemoryRunner, LlmAgent} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

describe('E2E Live Agent Registry', () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/tools/agent_tool_e2e_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import {AgentTool, InMemoryRunner, LlmAgent, State} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

describe('E2E AgentTool State Filtering', () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/tools/before_tool_selection_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

class FilterPlugin extends BasePlugin {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/tools/load_artifacts_tool_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import {InMemoryRunner, LlmAgent, LOAD_ARTIFACTS} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

describe('E2E LoadArtifactsTool', () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/tools/load_memory_tool_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
import {createEvent, InMemoryRunner, LlmAgent, LOAD_MEMORY} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

describe('E2E LoadMemoryTool', () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/tools/preload_memory_tool_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {describe, expect, it} from 'vitest';

describe('E2E PreloadMemoryTool', () => {
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/tools/rest_api_tool_auth_e2e_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import {InMemoryRunner, LlmAgent, RestApiTool} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as http from 'http';
import * as fs from 'node:fs';
import * as http from 'node:http';
import * as path from 'node:path';
import {OpenAPIV3} from 'openapi-types';
import * as path from 'path';
import {afterAll, beforeAll, describe, expect, it} from 'vitest';

describe('RestApiTool Auth E2E', () => {
Expand Down
6 changes: 3 additions & 3 deletions tests/e2e/tools/skills_registry_e2e_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {
} from '@google/adk';
import {createUserContent} from '@google/genai';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import * as path from 'path';
import {fileURLToPath} from 'url';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {fileURLToPath} from 'node:url';
import {describe, expect, it} from 'vitest';

const __filename = fileURLToPath(import.meta.url);
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/

import path from 'path';
import path from 'node:path';
import {defineConfig} from 'vitest/config';

/**
Expand Down
Loading