diff --git a/agentic-flow/src/agentdb/cli/agentdb-cli.ts b/agentic-flow/src/agentdb/cli/agentdb-cli.ts index 77a0e77d0..7d362f106 100644 --- a/agentic-flow/src/agentdb/cli/agentdb-cli.ts +++ b/agentic-flow/src/agentdb/cli/agentdb-cli.ts @@ -19,6 +19,12 @@ import { SkillLibrary, Skill, SkillQuery } from '../controllers/SkillLibrary.js' import { EmbeddingService } from '../controllers/EmbeddingService.js'; import * as fs from 'fs'; import * as path from 'path'; +import { fileURLToPath } from 'url'; +import { dirname } from 'path'; + +// ESM __dirname polyfill (required since ES modules don't have __dirname) +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); // Color codes for terminal output const colors = {