@amitdeshmukh/ax-crew 1.0.0 → 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.
@@ -1,8 +1,8 @@
1
1
  import fs from 'fs';
2
2
  import yaml from 'js-yaml';
3
- import { PROVIDER_API_KEYS } from '../config/index';
4
- import { functions as importedFunctions } from '../functions/index';
5
3
  import { AxAIAnthropic, AxAIOpenAI, AxAIAzureOpenAI, AxAICohere, AxAIDeepSeek, AxAIGoogleGemini, AxAIGroq, AxAIHuggingFace, AxAIMistral, AxAIOllama, AxAITogether } from '@ax-llm/ax';
4
+ import { PROVIDER_API_KEYS } from '../config/index.js';
5
+ import { functions as importedFunctions } from '../functions/index.js';
6
6
  // Define a mapping from provider names to their respective constructors
7
7
  const AIConstructors = {
8
8
  'anthropic': AxAIAnthropic,
@@ -1,7 +1,7 @@
1
1
  import { v4 as uuidv4 } from 'uuid';
2
- import { getAgentConfigParams } from './agentConfig';
3
2
  import { AxAgent } from '@ax-llm/ax';
4
- import { createState } from '../state/createState';
3
+ import { getAgentConfigParams } from './agentConfig.js';
4
+ import { createState } from '../state/createState.js';
5
5
  // Extend the AxAgent class to include shared state functionality
6
6
  class StatefulAxAgent extends AxAgent {
7
7
  constructor(ai, options, state) {
@@ -16,7 +16,7 @@ class StatefulAxAgent extends AxAgent {
16
16
  /**
17
17
  * Represents a crew of agents with shared state functionality.
18
18
  */
19
- class AgentCrew {
19
+ class AxCrew {
20
20
  /**
21
21
  * Creates an instance of AgentCrew.
22
22
  * @param {string} configFilePath - The file path to the agent configuration.
@@ -90,4 +90,4 @@ class AgentCrew {
90
90
  this.state.reset();
91
91
  }
92
92
  }
93
- export default AgentCrew;
93
+ export default AxCrew;
@@ -1,4 +1,4 @@
1
- import { CurrentDateTime, DaysBetweenDates } from './dateTime';
1
+ import { CurrentDateTime, DaysBetweenDates } from './dateTime.js';
2
2
  const functions = {
3
3
  CurrentDateTime,
4
4
  DaysBetweenDates
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import AgentCrew from './agents/index';
2
- export { AgentCrew };
1
+ import AxCrew from './agents/index.js';
2
+ export { AxCrew };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@amitdeshmukh/ax-crew",
4
- "version": "1.0.0",
4
+ "version": "1.0.2",
5
5
  "description": "Build and launch a crew of AI agents with shared state. Built with axllm.dev",
6
6
  "main": "dist/index.js",
7
7
  "engines": {
8
8
  "node": ">=21.0.0"
9
9
  },
10
10
  "scripts": {
11
- "build": "tsc --outDir dist",
11
+ "build": "rm -rf dist && tsc --outDir dist",
12
12
  "release": "npm run build && npm publish --access public"
13
13
  },
14
14
  "dependencies": {
@@ -1,11 +1,12 @@
1
1
  import fs from 'fs';
2
2
  import yaml from 'js-yaml';
3
- import { PROVIDER_API_KEYS } from '../config/index';
4
- import { functions as importedFunctions } from '../functions/index';
5
3
 
6
4
  import { AxAIAnthropic, AxAIOpenAI, AxAIAzureOpenAI, AxAICohere, AxAIDeepSeek, AxAIGoogleGemini, AxAIGroq, AxAIHuggingFace, AxAIMistral, AxAIOllama, AxAITogether } from '@ax-llm/ax';
7
5
  import type { AxAI, AxModelConfig, AxFunction, AxSignature } from '@ax-llm/ax';
8
6
 
7
+ import { PROVIDER_API_KEYS } from '../config/index.js';
8
+ import { functions as importedFunctions } from '../functions/index.js';
9
+
9
10
  // Define a mapping from provider names to their respective constructors
10
11
  const AIConstructors: Record<string, any> = {
11
12
  'anthropic': AxAIAnthropic,
@@ -1,8 +1,8 @@
1
1
  import { v4 as uuidv4 } from 'uuid';
2
- import { getAgentConfigParams } from './agentConfig';
3
2
  import { AxAgent, AxAI } from '@ax-llm/ax';
4
- import type { AxSignature, AxAgentic, AxFunction, AxAIService } from '@ax-llm/ax';
5
- import { createState, StateInstance } from '../state/createState';
3
+ import type { AxSignature, AxAgentic, AxFunction } from '@ax-llm/ax';
4
+ import { getAgentConfigParams } from './agentConfig.js';
5
+ import { createState, StateInstance } from '../state/createState.js';
6
6
 
7
7
 
8
8
  // Define interfaces for the agent configurations and return types
@@ -36,7 +36,7 @@ class StatefulAxAgent extends AxAgent<any, any> {
36
36
  /**
37
37
  * Represents a crew of agents with shared state functionality.
38
38
  */
39
- class AgentCrew {
39
+ class AxCrew {
40
40
  private configFilePath: string;
41
41
  crewId: string;
42
42
  agents: Map<string, StatefulAxAgent> | null;
@@ -130,4 +130,4 @@ class AgentCrew {
130
130
  }
131
131
  }
132
132
 
133
- export default AgentCrew;
133
+ export default AxCrew;
@@ -1,4 +1,4 @@
1
- import { CurrentDateTime, DaysBetweenDates } from './dateTime';
1
+ import { CurrentDateTime, DaysBetweenDates } from './dateTime.js';
2
2
 
3
3
  const functions = {
4
4
  CurrentDateTime,
package/src/index.ts CHANGED
@@ -1,3 +1,3 @@
1
- import AgentCrew from './agents/index';
1
+ import AxCrew from './agents/index.js';
2
2
 
3
- export { AgentCrew };
3
+ export { AxCrew };
package/tsconfig.json CHANGED
@@ -5,6 +5,8 @@
5
5
  "moduleResolution": "node",
6
6
  "esModuleInterop": true,
7
7
  "allowSyntheticDefaultImports": true,
8
+ "emitDeclarationOnly": false,
9
+ "noEmit": false,
8
10
  "strict": true,
9
11
  "outDir": "./dist",
10
12
  "rootDir": "./src",