agentic-flow 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/utils/agentLoader.js +15 -5
- package/package.json +7 -5
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
// Agent loader for .claude/agents integration
|
|
2
|
-
import { readFileSync, readdirSync, statSync } from 'fs';
|
|
3
|
-
import { join, extname } from 'path';
|
|
2
|
+
import { readFileSync, readdirSync, statSync, existsSync } from 'fs';
|
|
3
|
+
import { join, extname, dirname } from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
4
5
|
import { logger } from './logger.js';
|
|
6
|
+
// Get the package root directory
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
const packageRoot = join(__dirname, '../..');
|
|
10
|
+
const defaultAgentsDir = join(packageRoot, '.claude/agents');
|
|
5
11
|
/**
|
|
6
12
|
* Parse agent markdown file with frontmatter
|
|
7
13
|
*/
|
|
@@ -75,10 +81,14 @@ function findAgentFiles(dir) {
|
|
|
75
81
|
/**
|
|
76
82
|
* Load all agents from .claude/agents directory
|
|
77
83
|
*/
|
|
78
|
-
export function loadAgents(agentsDir
|
|
84
|
+
export function loadAgents(agentsDir) {
|
|
79
85
|
const agents = new Map();
|
|
80
|
-
|
|
81
|
-
const
|
|
86
|
+
// Priority: explicit parameter > env var > package default > current working directory
|
|
87
|
+
const targetDir = agentsDir
|
|
88
|
+
|| process.env.AGENTS_DIR
|
|
89
|
+
|| (existsSync(defaultAgentsDir) ? defaultAgentsDir : join(process.cwd(), '.claude/agents'));
|
|
90
|
+
logger.info('Loading agents from directory', { agentsDir: targetDir });
|
|
91
|
+
const agentFiles = findAgentFiles(targetDir);
|
|
82
92
|
logger.debug('Found agent files', { count: agentFiles.length });
|
|
83
93
|
for (const filePath of agentFiles) {
|
|
84
94
|
const agent = parseAgentFile(filePath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-flow",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Production-ready AI agent orchestration platform with 66 specialized agents, 111 MCP tools, and autonomous multi-agent swarms. Built by @ruvnet with Claude Agent SDK, neural networks, memory persistence, GitHub integration, and distributed consensus protocols.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -110,9 +110,6 @@
|
|
|
110
110
|
"dependencies": {
|
|
111
111
|
"@anthropic-ai/claude-agent-sdk": "^0.1.5",
|
|
112
112
|
"@anthropic-ai/sdk": "^0.65.0",
|
|
113
|
-
"@huggingface/hub": "^2.6.10",
|
|
114
|
-
"@huggingface/inference": "^4.11.0",
|
|
115
|
-
"@xenova/transformers": "^2.17.2",
|
|
116
113
|
"agentic-payments": "^0.1.3",
|
|
117
114
|
"axios": "^1.12.2",
|
|
118
115
|
"claude-flow": "^2.0.0",
|
|
@@ -120,10 +117,15 @@
|
|
|
120
117
|
"express": "^5.1.0",
|
|
121
118
|
"fastmcp": "^3.19.0",
|
|
122
119
|
"http-proxy-middleware": "^3.0.5",
|
|
123
|
-
"onnxruntime-node": "^1.23.0",
|
|
124
120
|
"tiktoken": "^1.0.22",
|
|
125
121
|
"zod": "^3.25.76"
|
|
126
122
|
},
|
|
123
|
+
"optionalDependencies": {
|
|
124
|
+
"@huggingface/hub": "^2.6.10",
|
|
125
|
+
"@huggingface/inference": "^4.11.0",
|
|
126
|
+
"@xenova/transformers": "^2.17.2",
|
|
127
|
+
"onnxruntime-node": "^1.23.0"
|
|
128
|
+
},
|
|
127
129
|
"devDependencies": {
|
|
128
130
|
"@types/express": "^5.0.3",
|
|
129
131
|
"@types/node": "^20.19.19",
|