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 src/__tests__/agent-as-tool.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
generateTraceId,
agentAsTool,
getTextContent
} from '../index';
} from '../index.js';

type Ctx = { userId: string; permissions: string[] };

Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/engine.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { run, RunConfig, RunState, generateTraceId, generateRunId } from '../index';
import { run, RunConfig, RunState, generateTraceId, generateRunId } from '../index.js';

describe('JAF Engine', () => {
const mockContext = { userId: 'test' };
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/hitl.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { z } from 'zod';
import { run, RunConfig, RunState, generateTraceId, generateRunId, Agent, Tool, getTextContent } from '../index';
import { run, RunConfig, RunState, generateTraceId, generateRunId, Agent, Tool, getTextContent } from '../index.js';

describe('HITL approvals', () => {
const sensitiveTool: Tool<{ x: number }, any> = {
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/validation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
createPathValidator,
createContentFilter,
createRateLimiter
} from '../policies/validation';
} from '../policies/validation.js';

describe('Validation Policies', () => {
describe('composeValidations', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/__tests__/agent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
type A2AToolResult,
type ToolContext,
StreamEvent,
} from '../index';
} from '../index.js';

describe('A2A Agent', () => {
describe('createA2ATool', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/__tests__/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
createMessageRequest,
createStreamingMessageRequest,
extractTextResponse,
} from '../index';
} from '../index.js';

// Mock fetch for testing
const mockFetch = jest.fn();
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/__tests__/executor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
createA2ATextMessage,
type A2AExecutionContext,
type A2AStreamEvent
} from '../index';
} from '../index.js';

describe('A2A Executor', () => {
// Mock model provider
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/__tests__/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
type SendMessageRequest,
type JSONRPCRequest,
type A2ATaskProvider
} from '../index';
} from '../index.js';

describe('A2A Integration', () => {
// Mock model provider for integration tests
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/__tests__/protocol.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
type SendMessageRequest,
type A2AAgent,
type A2ATaskProvider
} from '../index';
} from '../index.js';

describe('A2A Protocol', () => {
// Mock agent for testing
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/__tests__/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
createA2ATool,
generateAgentCard,
type A2AServerConfig,
} from '../index';
} from '../index.js';

describe('A2A Server', () => {
// Test agents
Expand Down
2 changes: 1 addition & 1 deletion src/a2a/__tests__/types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
A2AErrorCodes,
a2aMessageSchema,
sendMessageRequestSchema
} from '../types';
} from '../types.js';

describe('A2A Types', () => {
describe('A2AMessage', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/a2a/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ export {
} from './agent-card.js';

// Server Functions
import {
createA2AServer,
startA2AServer
import {
createA2AServer,
startA2AServer
} from './server.js';
export {
createA2AServer,
Expand Down
6 changes: 3 additions & 3 deletions src/adk/__tests__/agents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import {
compareAgents,
createAgentError,
withAgentErrorHandling
} from '../agents';
} from '../agents/index.js';

import { createFunctionTool } from '../tools';
import { AgentConfig, Tool, Model } from '../types';
import { createFunctionTool } from '../tools/index.js';
import { AgentConfig, Tool, Model } from '../types.js';

describe('Agent System', () => {
const mockTool: Tool = createFunctionTool({
Expand Down
2 changes: 1 addition & 1 deletion src/adk/__tests__/content.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
getLastModelMessage,
getContentStats,
getConversationStats
} from '../content';
} from '../content/index.js';

describe('Content System', () => {
describe('Content Creation', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/adk/__tests__/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import {
Model,
ToolParameterType,
AgentEvent
} from '../index';
} from '../index.js';

import { streamToArray } from '../streaming';
import { streamToArray } from '../streaming/index.js';

// Mock the Core ModelProvider to avoid real API calls in tests
let mockCallCount = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/adk/__tests__/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
CLAUDE_3_OPUS,
CLAUDE_3_SONNET,
CLAUDE_3_HAIKU
} from '../models';
} from '../models.js';

describe('Model Enum', () => {
it('should have all major model categories', () => {
Expand Down
16 changes: 8 additions & 8 deletions src/adk/__tests__/runners.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,40 @@ import {
validateRunContext,
getRunnerStats,
withRunnerErrorHandling
} from '../runners';
} from '../runners/index.js';

import {
createAgent,
createSimpleAgent,
createMultiAgent
} from '../agents';
} from '../agents/index.js';

import {
createFunctionTool,
createEchoTool,
createCalculatorTool
} from '../tools';
} from '../tools/index.js';

import { Model, ToolParameterType } from '../types';
import { Model, ToolParameterType } from '../types.js';

import {
createInMemorySessionProvider,
addMessageToSession
} from '../sessions';
} from '../sessions/index.js';

import {
createUserMessage,
createModelMessage,
getFunctionCalls
} from '../content';
} from '../content/index.js';

import {
createSchemaValidator,
stringSchema,
isString
} from '../schemas';
} from '../schemas/index.js';

import { RunnerConfig, RunContext, AgentConfig, GuardrailFunction, AgentError } from '../types';
import { RunnerConfig, RunContext, AgentConfig, GuardrailFunction, AgentError } from '../types.js';

// Mock the LLM service to avoid real API calls
let mockLLMResponses: any[] = [];
Expand Down
4 changes: 2 additions & 2 deletions src/adk/__tests__/schemas.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import {
weatherResponseValidator,
createValidationError,
withSchemaValidation
} from '../schemas';
} from '../schemas/index.js';

import { JsonSchema, ValidationResult } from '../types';
import { JsonSchema, ValidationResult } from '../types.js';

describe('Schema Validation', () => {
describe('Schema Validator Creation', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/adk/__tests__/sessions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import {
createMemoryProviderBridge,
createSessionError,
withSessionErrorHandling
} from '../sessions';
} from '../sessions/index.js';

import { createUserMessage, createModelMessage, createSystemMessage } from '../content';
import { Session, SessionProvider } from '../types';
import { createUserMessage, createModelMessage, createSystemMessage } from '../content/index.js';
import { Session, SessionProvider } from '../types.js';

describe('Session Management', () => {
describe('Session Creation', () => {
Expand Down
6 changes: 3 additions & 3 deletions src/adk/__tests__/streaming.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ import {
streamToArray,
takeFromStream,
skipFromStream
} from '../streaming';
} from '../streaming/index.js';

import { createUserMessage, createFunctionCall, createFunctionResponse } from '../content';
import { AgentEvent, AgentEventType } from '../types';
import { createUserMessage, createFunctionCall, createFunctionResponse } from '../content/index.js';
import { AgentEvent, AgentEventType } from '../types.js';

describe('Streaming System', () => {
describe('Live Request Queue', () => {
Expand Down
10 changes: 5 additions & 5 deletions src/adk/__tests__/tools.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ import {
createEchoTool,
createCalculatorTool,
createTimestampTool
} from '../tools';
} from '../tools/index.js';

import { createAgent } from '../agents';
import { createInMemorySessionProvider } from '../sessions';
import { createUserMessage } from '../content';
import { Tool, ToolContext, OpenAPISpec, Model, ToolParameterType } from '../types';
import { createAgent } from '../agents/index.js';
import { createInMemorySessionProvider } from '../sessions/index.js';
import { createUserMessage } from '../content/index.js';
import { Tool, ToolContext, OpenAPISpec, Model, ToolParameterType } from '../types.js';

describe('Tool System', () => {
const mockSession = {
Expand Down
2 changes: 1 addition & 1 deletion src/adk/agents/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
throwAgentError,
createAgentError,
Model
} from '../types';
} from '../types.js';

// ========== ID Generation ==========

Expand Down
4 changes: 2 additions & 2 deletions src/adk/artifacts/__tests__/artifacts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
clearSessionArtifacts,
listSessionArtifacts,
type ArtifactStorage
} from '../index';
import { Session } from '../../types';
} from '../index.js';
import { Session } from '../../types.js';

describe('Artifact Storage System', () => {
const testSessionId = 'test-session-123';
Expand Down
2 changes: 1 addition & 1 deletion src/adk/content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Functional content and message handling utilities
*/

import { Content, Part, FunctionCall, FunctionResponse } from '../types';
import { Content, Part, FunctionCall, FunctionResponse } from '../types.js';

// ========== Content Creation ==========

Expand Down
2 changes: 1 addition & 1 deletion src/adk/examples/advanced-features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import {
SessionProvider,
Model,
ToolParameterType
} from '../index';
} from '../index.js';

// ========== Schema Validation Example ==========

Expand Down
2 changes: 1 addition & 1 deletion src/adk/examples/basic-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
quickSetup,
Model,
ToolParameterType
} from '../index';
} from '../index.js';

// ========== Example 1: Simple Chat Agent ==========

Expand Down
2 changes: 1 addition & 1 deletion src/adk/examples/multi-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
AgentConfig,
Model,
ToolParameterType
} from '../index';
} from '../index.js';

// ========== Specialized Agents ==========

Expand Down
Loading