Skip to content

Commit eb018e5

Browse files
committed
refactor: update all imports and references to use snake_case filenames
Fix all import paths, package.json exports/scripts, and documentation references to match the renamed snake_case files. Add explicit NEVER use kebab-case rule to AGENTS.md naming conventions.
1 parent 61dc079 commit eb018e5

73 files changed

Lines changed: 169 additions & 169 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎AGENTS.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The codebase is organized into logical modules:
4545

4646
- Entry points:
4747
- `src/index.ts` - Main library export (`ActorsMcpServer` class)
48-
- `src/index-internals.ts` - Internal exports for testing and advanced usage
48+
- `src/index_internals.ts` - Internal exports for testing and advanced usage
4949
- `src/stdio.ts` - Standard input/output entry point (CLI, used for Docker)
5050
- `src/main.ts` - Actor entry point (for Apify platform)
5151
- `src/input.ts` - Input processing and validation
@@ -195,7 +195,7 @@ We use **4 spaces** for indentation (configured in `.editorconfig`).
195195
- **Constants**: Use uppercase `SNAKE_CASE` for global, immutable constants (e.g., `ACTOR_MAX_MEMORY_MBYTES`, `SERVER_NAME`)
196196
- **Functions & Variables**: Use `camelCase` format (e.g., `fetchActorDetails`, `actorClient`)
197197
- **Classes, Types, Interfaces**: Use `PascalCase` format (e.g., `ActorsMcpServer`, `ActorDetailsResult`)
198-
- **Files & Folders**: Use lowercase `snake_case` format (e.g., `actor_details.ts`, `key_value_store.ts`)
198+
- **Files & Folders**: Use lowercase `snake_case` format (e.g., `actor_details.ts`, `key_value_store.ts`). **NEVER use kebab-case** (`kebab-case.ts`) for file or folder names — always use underscores, not hyphens.
199199
- **Booleans**: Prefix with `is`, `has`, or `should` (e.g., `isValid`, `hasFinished`, `shouldRetry`)
200200
- **Units**: Suffix with the unit of measure (e.g., `intervalMillis`, `maxMemoryBytes`)
201201
- **Date/Time**: Suffix with `At` (e.g., `createdAt`, `updatedAt`)
@@ -283,10 +283,10 @@ We use **4 spaces** for indentation (configured in `.editorconfig`).
283283
### Common patterns
284284

285285
- **Tool implementation**: Tools are defined in `src/tools/` using Zod schemas for validation
286-
- **Actor interaction**: Use `src/utils/apify-client.ts` for Apify API calls, never call Apify API directly
286+
- **Actor interaction**: Use `src/utils/apify_client.ts` for Apify API calls, never call Apify API directly
287287
- **Error responses**: Return user-friendly error messages with suggestions
288288
- **Input validation**: Always validate tool inputs with Zod before processing
289-
- **Caching**: Use TTL-based caching for Actor schemas and details (see `src/utils/ttl-lru.ts`)
289+
- **Caching**: Use TTL-based caching for Actor schemas and details (see `src/utils/ttl_lru.ts`)
290290
- **Constants and Tool Names**: Always use constants and never magic or hardcoded values. When referring to tools, ALWAYS use the `HelperTools` enum.
291291
- **Exception**: Integration tests (`tests/integration/`) must use hardcoded strings for tool names. This ensures tests fail if a tool is renamed, helping to prevent accidental breaking changes.
292292

‎DEVELOPMENT.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ tests/
2929
Key entry points:
3030

3131
- `src/index.ts` - Main library export (`ActorsMcpServer` class)
32-
- `src/index-internals.ts` - Internal exports for testing / advanced usage
32+
- `src/index_internals.ts` - Internal exports for testing / advanced usage
3333
- `src/stdio.ts` - Standard input/output (CLI) entry point
3434
- `src/main.ts` - Actor entry point (standby server / debugging)
3535
- `src/input.ts` - Input processing and validation

‎evals/create_dataset.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { hideBin } from 'yargs/helpers';
1515
import log from '@apify/log';
1616

1717
import { sanitizeHeaderValue, validatePhoenixEnvVars } from './config.js';
18-
import { loadTestCases, filterByCategory, filterById, type TestCase } from './evaluation-utils.js';
18+
import { loadTestCases, filterByCategory, filterById, type TestCase } from './evaluation_utils.js';
1919

2020
// Set log level to debug
2121
log.setLevel(log.LEVELS.INFO);

‎evals/eval_single.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
createToolSelectionLLMEvaluator,
99
loadTestCases, filterById,
1010
type TestCase
11-
} from './evaluation-utils.js';
11+
} from './evaluation_utils.js';
1212
import { PASS_THRESHOLD, sanitizeHeaderValue } from './config.js';
1313

1414
dotenv.config({ path: '.env' });

‎evals/evaluation_utils.ts‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { createClassifierFn } from '@arizeai/phoenix-evals';
99

1010
import log from '@apify/log';
1111

12-
import { ApifyClient } from '../src/apify-client.js';
13-
import { getToolPublicFieldOnly, processParamsGetTools } from '../src/index-internals.js';
12+
import { ApifyClient } from '../src/apify_client.js';
13+
import { getToolPublicFieldOnly, processParamsGetTools } from '../src/index_internals.js';
1414
import type { ToolBase, ToolEntry } from '../src/types.js';
1515
import {
1616
SYSTEM_PROMPT,
@@ -20,16 +20,16 @@ import {
2020
TEMPERATURE,
2121
sanitizeHeaderValue
2222
} from './config.js';
23-
import { loadTestCases as loadTestCasesShared, filterByCategory, filterById } from './shared/test-case-loader.js';
24-
import { transformToolsToOpenAIFormat } from './shared/openai-tools.js';
23+
import { loadTestCases as loadTestCasesShared, filterByCategory, filterById } from './shared/test_case_loader.js';
24+
import { transformToolsToOpenAIFormat } from './shared/openai_tools.js';
2525
import type { ToolSelectionTestCase, TestData } from './shared/types.js';
2626

2727
// Re-export types for backwards compatibility
2828
export type TestCase = ToolSelectionTestCase;
2929
export type { TestData } from './shared/types.js';
3030

3131
// Re-export shared functions for backwards compatibility
32-
export { filterByCategory, filterById } from './shared/test-case-loader.js';
32+
export { filterByCategory, filterById } from './shared/test_case_loader.js';
3333

3434
type ExampleInputOnly = { input: Record<string, unknown>, metadata?: Record<string, unknown>, output?: never };
3535

‎evals/run_evaluation.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
loadTools,
2121
createOpenRouterTask,
2222
createToolSelectionLLMEvaluator
23-
} from './evaluation-utils.js';
23+
} from './evaluation_utils.js';
2424
import {
2525
DATASET_NAME,
2626
MODELS_TO_EVALUATE,

‎evals/shared/line_range_filter.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Filter test cases by line ranges
33
*/
44

5-
import type { LineRange } from './line-range-parser.js';
5+
import type { LineRange } from './line_range_parser.js';
66

77
/**
88
* Type for test cases with line number metadata

‎evals/workflows/conversation_executor.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
// eslint-disable-next-line import/extensions
77
import type { ChatCompletionMessageParam, ChatCompletionTool } from 'openai/resources/chat/completions';
88

9-
import { mcpToolsToOpenAiTools } from '../shared/openai-tools.js';
9+
import { mcpToolsToOpenAiTools } from '../shared/openai_tools.js';
1010
import { AGENT_SYSTEM_PROMPT, MAX_CONVERSATION_TURNS, MODELS } from './config.js';
11-
import type { LlmClient } from './llm-client.js';
12-
import type { McpClient } from './mcp-client.js';
11+
import type { LlmClient } from './llm_client.js';
12+
import type { McpClient } from './mcp_client.js';
1313
import type { ConversationHistory, ConversationTurn } from './types.js';
1414

1515
export type ConversationExecutorOptions = {

‎evals/workflows/output_formatter.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* Output formatter for evaluation results
33
*/
44

5-
import type { WorkflowTestCase } from './test-cases-loader.js';
5+
import type { WorkflowTestCase } from './test_cases_loader.js';
66
import type { ConversationHistory } from './types.js';
7-
import type { JudgeResult } from './workflow-judge.js';
7+
import type { JudgeResult } from './workflow_judge.js';
88

99
/**
1010
* Single evaluation result

‎evals/workflows/results_writer.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
77
import { dirname } from 'node:path';
88

9-
import type { EvaluationResult, ResultsDatabase, TestResultRecord } from './output-formatter.js';
9+
import type { EvaluationResult, ResultsDatabase, TestResultRecord } from './output_formatter.js';
1010

1111
/**
1212
* Build composite key for storing results

0 commit comments

Comments
 (0)