@aiready/agents 0.3.3 → 0.3.5

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,16 +1,16 @@
1
1
 
2
2
  
3
- > @aiready/agents@0.3.2 test /Users/pengcao/projects/aiready/packages/agents
3
+ > @aiready/agents@0.3.3 test /Users/pengcao/projects/aiready/packages/agents
4
4
  > vitest run
5
5
 
6
+ [?25l
7
+  RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/agents
6
8
 
7
-  RUN  v1.6.1 /Users/pengcao/projects/aiready/packages/agents
8
-
9
- ✓ src/__tests__/smoke.test.ts  (1 test) 2ms
9
+ ✓ src/__tests__/smoke.test.ts (1 test) 1ms
10
10
 
11
11
   Test Files  1 passed (1)
12
12
   Tests  1 passed (1)
13
-  Start at  22:22:16
14
-  Duration  359ms (transform 56ms, setup 0ms, collect 38ms, tests 2ms, environment 0ms, prepare 121ms)
13
+  Start at  10:36:36
14
+  Duration  217ms (transform 23ms, setup 0ms, import 29ms, tests 1ms, environment 0ms)
15
15
 
16
16
  [?25h
package/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@aiready/agents",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Agentic remediation and analysis system for AIReady",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@mastra/core": "^0.24.0",
9
- "zod": "^3.0.0",
10
- "@aiready/core": "0.23.3",
11
- "@aiready/cli": "0.14.4"
8
+ "@mastra/core": "^1.0.0",
9
+ "zod": "^4.0.0",
10
+ "@aiready/core": "0.23.6",
11
+ "@aiready/cli": "0.14.7"
12
12
  },
13
13
  "devDependencies": {
14
14
  "typescript": "^5.0.0",
15
- "vitest": "^1.0.0",
16
- "@types/node": "^20.0.0"
15
+ "vitest": "^4.0.0",
16
+ "@types/node": "^24.0.0"
17
17
  },
18
18
  "scripts": {
19
19
  "test": "vitest run",
@@ -1,7 +1,8 @@
1
- import { Agent } from '@mastra/core';
1
+ import { Agent } from '@mastra/core/agent';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export const ImpactAgent = new Agent({
5
+ id: 'impact-agent',
5
6
  name: 'Impact Agent',
6
7
  instructions: `
7
8
  You are a financial analyst for AI infrastructure.
@@ -1,7 +1,8 @@
1
- import { Agent } from '@mastra/core';
1
+ import { Agent } from '@mastra/core/agent';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export const PrioritizationAgent = new Agent({
5
+ id: 'prioritization-agent',
5
6
  name: 'Prioritization Agent',
6
7
  instructions: `
7
8
  You are a strategic technical debt manager. Your goal is to rank remediation tasks based on their Return on Investment (ROI).
@@ -1,7 +1,8 @@
1
- import { Agent } from '@mastra/core';
1
+ import { Agent } from '@mastra/core/agent';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export const RefactorAgent = new Agent({
5
+ id: 'refactor-agent',
5
6
  name: 'Refactor Agent',
6
7
  instructions: `
7
8
  You are an expert full-stack engineer specialized in code consolidation and refactoring.
@@ -1,7 +1,8 @@
1
- import { Agent } from '@mastra/core';
1
+ import { Agent } from '@mastra/core/agent';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export const RenameAgent = new Agent({
5
+ id: 'rename-agent',
5
6
  name: 'Rename Agent',
6
7
  instructions: `
7
8
  You are a linguistics and domain-modeling expert specialized in software engineering.
@@ -1,7 +1,8 @@
1
- import { Agent } from '@mastra/core';
1
+ import { Agent } from '@mastra/core/agent';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export const RestructureAgent = new Agent({
5
+ id: 'restructure-agent',
5
6
  name: 'Restructure Agent',
6
7
  instructions: `
7
8
  You are an expert Software Architect specialized in AI-Ready codebases.
package/src/risk-agent.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { Agent } from '@mastra/core';
1
+ import { Agent } from '@mastra/core/agent';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export const RiskAssessmentAgent = new Agent({
5
+ id: 'risk-assessment-agent',
5
6
  name: 'Risk Assessment Agent',
6
7
  instructions: `
7
8
  You are an expert software architect specialized in analyzing the risk of automated code refactorings.
@@ -1,4 +1,4 @@
1
- import { createTool } from '@mastra/core';
1
+ import { createTool } from '@mastra/core/tools';
2
2
  import { z } from 'zod';
3
3
 
4
4
  // Note: In a real implementation, this would use Octokit with appropriate auth
@@ -15,14 +15,14 @@ export const githubTools = {
15
15
  success: z.boolean(),
16
16
  branchUrl: z.string().optional(),
17
17
  }),
18
- execute: async (context) => {
18
+ execute: async (input) => {
19
19
  console.log(
20
- `[GitHubTool] Creating branch ${context.context.branchName} from ${context.context.baseBranch}`
20
+ `[GitHubTool] Creating branch ${input.branchName} from ${input.baseBranch}`
21
21
  );
22
22
  // Mock implementation
23
23
  return {
24
24
  success: true,
25
- branchUrl: `https://github.com/placeholder/${context.context.branchName}`,
25
+ branchUrl: `https://github.com/placeholder/${input.branchName}`,
26
26
  };
27
27
  },
28
28
  }),
@@ -42,8 +42,8 @@ export const githubTools = {
42
42
  prNumber: z.number().optional(),
43
43
  prUrl: z.string().optional(),
44
44
  }),
45
- execute: async (context) => {
46
- console.log(`[GitHubTool] Creating PR: ${context.context.title}`);
45
+ execute: async (input) => {
46
+ console.log(`[GitHubTool] Creating PR: ${input.title}`);
47
47
  // Mock implementation
48
48
  return {
49
49
  success: true,
@@ -1,7 +1,8 @@
1
- import { Agent } from '@mastra/core';
1
+ import { Agent } from '@mastra/core/agent';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export const ValidationAgent = new Agent({
5
+ id: 'validation-agent',
5
6
  name: 'Validation Agent',
6
7
  instructions: `
7
8
  You are a Senior QA Automation Engineer and Type System Expert.
@@ -1,4 +1,4 @@
1
- import { Workflow } from '@mastra/core';
1
+ import { Workflow } from '@mastra/core/workflows';
2
2
  import { z } from 'zod';
3
3
  import { PrioritizationAgent } from '../prioritization-agent';
4
4
  import { ImpactAgent } from '../impact-agent';