mycontext-cli 1.0.94 → 1.0.95

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.
Files changed (31) hide show
  1. package/README.md +99 -5
  2. package/dist/agents/implementations/ClaudeAgentWorkflow.d.ts +110 -0
  3. package/dist/agents/implementations/ClaudeAgentWorkflow.d.ts.map +1 -0
  4. package/dist/agents/implementations/ClaudeAgentWorkflow.js +555 -0
  5. package/dist/agents/implementations/ClaudeAgentWorkflow.js.map +1 -0
  6. package/dist/agents/implementations/WorkflowAgent.d.ts +1 -0
  7. package/dist/agents/implementations/WorkflowAgent.d.ts.map +1 -1
  8. package/dist/agents/implementations/WorkflowAgent.js +8 -0
  9. package/dist/agents/implementations/WorkflowAgent.js.map +1 -1
  10. package/dist/package.json +2 -1
  11. package/dist/utils/claudeAgentClient.d.ts +98 -0
  12. package/dist/utils/claudeAgentClient.d.ts.map +1 -0
  13. package/dist/utils/claudeAgentClient.js +409 -0
  14. package/dist/utils/claudeAgentClient.js.map +1 -0
  15. package/dist/utils/contextManager.d.ts +86 -0
  16. package/dist/utils/contextManager.d.ts.map +1 -0
  17. package/dist/utils/contextManager.js +322 -0
  18. package/dist/utils/contextManager.js.map +1 -0
  19. package/dist/utils/hybridAIClient.d.ts +25 -1
  20. package/dist/utils/hybridAIClient.d.ts.map +1 -1
  21. package/dist/utils/hybridAIClient.js +69 -2
  22. package/dist/utils/hybridAIClient.js.map +1 -1
  23. package/dist/utils/mcpAgentIntegration.d.ts +104 -0
  24. package/dist/utils/mcpAgentIntegration.d.ts.map +1 -0
  25. package/dist/utils/mcpAgentIntegration.js +382 -0
  26. package/dist/utils/mcpAgentIntegration.js.map +1 -0
  27. package/dist/utils/toolPermissions.d.ts +105 -0
  28. package/dist/utils/toolPermissions.d.ts.map +1 -0
  29. package/dist/utils/toolPermissions.js +408 -0
  30. package/dist/utils/toolPermissions.js.map +1 -0
  31. package/package.json +2 -1
@@ -0,0 +1,555 @@
1
+ "use strict";
2
+ /**
3
+ * ClaudeAgentWorkflow Implementation
4
+ *
5
+ * Enhanced workflow agent that leverages Claude Agent SDK for advanced
6
+ * context management, tool permissions, and MCP integration.
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ClaudeAgentWorkflow = void 0;
13
+ const claudeAgentClient_1 = require("../../utils/claudeAgentClient");
14
+ const contextManager_1 = require("../../utils/contextManager");
15
+ const toolPermissions_1 = require("../../utils/toolPermissions");
16
+ const mcpAgentIntegration_1 = require("../../utils/mcpAgentIntegration");
17
+ const chalk_1 = __importDefault(require("chalk"));
18
+ class ClaudeAgentWorkflow {
19
+ constructor(workingDirectory) {
20
+ this.name = "ClaudeAgentWorkflow";
21
+ this.description = "Enhanced workflow agent using Claude Agent SDK with advanced context management and MCP integration";
22
+ this.personality = "Advanced AI coordinator with deep project understanding and intelligent workflow orchestration";
23
+ this.llmProvider = "claude-agent-sdk";
24
+ this.expertise = [
25
+ "workflow-management",
26
+ "context-management",
27
+ "tool-permissions",
28
+ "mcp-integration",
29
+ "agent-coordination",
30
+ "error-handling",
31
+ "user-experience",
32
+ ];
33
+ this.completedSteps = new Set();
34
+ this.failedSteps = [];
35
+ this.userInteractions = 0;
36
+ this.totalRetries = 0;
37
+ this.workflowContext = {};
38
+ this.claudeAgentClient = new claudeAgentClient_1.ClaudeAgentClient(workingDirectory);
39
+ this.contextManager = new contextManager_1.ContextManager(workingDirectory);
40
+ this.permissionManager = new toolPermissions_1.ToolPermissionManager(workingDirectory);
41
+ this.mcpIntegration = new mcpAgentIntegration_1.MCPAgentIntegration(workingDirectory);
42
+ }
43
+ /**
44
+ * Check if Claude Agent SDK is available
45
+ */
46
+ isClaudeAgentAvailable() {
47
+ return this.claudeAgentClient.hasApiKey();
48
+ }
49
+ async run(input) {
50
+ const startTime = Date.now();
51
+ const maxRetries = input.maxRetries || 3;
52
+ console.log(chalk_1.default.blue.bold("šŸš€ Starting Claude Agent SDK Enhanced Workflow\n"));
53
+ console.log(chalk_1.default.gray(`Project: ${input.projectName}`));
54
+ console.log(chalk_1.default.gray(`Framework: ${input.framework}`));
55
+ console.log(chalk_1.default.gray(`Interactive Mode: ${input.interactive ? "Enabled" : "Disabled"}\n`));
56
+ try {
57
+ // Initialize Claude Agent SDK
58
+ await this.initializeClaudeAgent();
59
+ // Load and prepare context
60
+ await this.prepareWorkflowContext(input);
61
+ // Define enhanced workflow steps
62
+ const steps = this.defineEnhancedWorkflowSteps(input);
63
+ // Execute workflow with Claude Agent SDK
64
+ await this.executeEnhancedWorkflow(steps, maxRetries, input.interactive || false);
65
+ const duration = Date.now() - startTime;
66
+ const completedSteps = Array.from(this.completedSteps);
67
+ console.log(chalk_1.default.green.bold("\nāœ… Claude Agent SDK Workflow completed successfully!"));
68
+ console.log(chalk_1.default.blue(`ā±ļø Total duration: ${Math.round(duration / 1000)}s`));
69
+ console.log(chalk_1.default.blue(`šŸ“‹ Completed steps: ${completedSteps.length}`));
70
+ console.log(chalk_1.default.blue(`šŸ”„ Total retries: ${this.totalRetries}`));
71
+ console.log(chalk_1.default.blue(`šŸ’¬ User interactions: ${this.userInteractions}`));
72
+ // Save final context
73
+ await this.contextManager.saveContext(this.workflowContext);
74
+ return {
75
+ success: true,
76
+ projectPath: input.projectName,
77
+ completedSteps,
78
+ failedSteps: this.failedSteps,
79
+ userInteractions: this.userInteractions,
80
+ totalRetries: this.totalRetries,
81
+ duration,
82
+ };
83
+ }
84
+ catch (error) {
85
+ const duration = Date.now() - startTime;
86
+ console.log(chalk_1.default.red.bold("\nāŒ Claude Agent SDK Workflow failed"));
87
+ console.log(chalk_1.default.red(`Error: ${error instanceof Error ? error.message : "Unknown error"}`));
88
+ return {
89
+ success: false,
90
+ projectPath: input.projectName,
91
+ completedSteps: Array.from(this.completedSteps),
92
+ failedSteps: this.failedSteps,
93
+ userInteractions: this.userInteractions,
94
+ totalRetries: this.totalRetries,
95
+ duration,
96
+ };
97
+ }
98
+ finally {
99
+ // Cleanup
100
+ await this.claudeAgentClient.cleanup();
101
+ }
102
+ }
103
+ /**
104
+ * Initialize Claude Agent SDK with enhanced configuration
105
+ */
106
+ async initializeClaudeAgent() {
107
+ console.log(chalk_1.default.yellow("šŸ”§ Initializing Claude Agent SDK..."));
108
+ try {
109
+ // Check if Claude Agent SDK is available
110
+ if (!this.claudeAgentClient.hasApiKey()) {
111
+ throw new Error("Claude API key not configured. Set MYCONTEXT_CLAUDE_API_KEY or ANTHROPIC_API_KEY");
112
+ }
113
+ // Initialize MCP integration
114
+ await this.mcpIntegration.initialize(this.claudeAgentClient);
115
+ // Get permission configuration
116
+ const permissionConfig = this.permissionManager.getClaudeAgentConfig();
117
+ // Initialize Claude Agent with enhanced configuration
118
+ await this.claudeAgentClient.initialize({
119
+ model: "claude-3-5-sonnet-20241022",
120
+ temperature: 0.2,
121
+ maxTokens: 8000,
122
+ systemPrompt: this.getEnhancedSystemPrompt(),
123
+ ...permissionConfig,
124
+ contextManagement: true,
125
+ });
126
+ console.log(chalk_1.default.green("āœ… Claude Agent SDK initialized successfully"));
127
+ }
128
+ catch (error) {
129
+ console.log(chalk_1.default.red(`āŒ Claude Agent SDK initialization failed: ${error.message}`));
130
+ throw error;
131
+ }
132
+ }
133
+ /**
134
+ * Prepare workflow context
135
+ */
136
+ async prepareWorkflowContext(input) {
137
+ console.log(chalk_1.default.yellow("šŸ“‹ Preparing workflow context..."));
138
+ try {
139
+ // Load existing context
140
+ this.workflowContext = await this.contextManager.loadContext();
141
+ // Add workflow-specific context
142
+ this.workflowContext = await this.contextManager.mergeContext(this.workflowContext, {
143
+ userPrompt: input.description,
144
+ workingDirectory: input.projectName === "." ? process.cwd() : input.projectName,
145
+ previousOutputs: {
146
+ workflowStart: {
147
+ projectName: input.projectName,
148
+ framework: input.framework,
149
+ description: input.description,
150
+ interactive: input.interactive,
151
+ timestamp: new Date().toISOString(),
152
+ },
153
+ },
154
+ });
155
+ // Check if context needs compaction
156
+ const contextStats = this.contextManager.getContextStats(this.workflowContext);
157
+ if (contextStats.totalSize > 50000) {
158
+ // 50KB limit
159
+ console.log(chalk_1.default.yellow("āš ļø Context size exceeds limit, compacting..."));
160
+ this.workflowContext = await this.contextManager.compactContext(this.workflowContext);
161
+ }
162
+ console.log(chalk_1.default.green("āœ… Workflow context prepared"));
163
+ }
164
+ catch (error) {
165
+ console.log(chalk_1.default.yellow(`āš ļø Context preparation warning: ${error.message}`));
166
+ }
167
+ }
168
+ /**
169
+ * Define enhanced workflow steps with Claude Agent SDK
170
+ */
171
+ defineEnhancedWorkflowSteps(input) {
172
+ return [
173
+ {
174
+ id: "context-analysis",
175
+ name: "Context Analysis",
176
+ description: "Analyze project context and requirements using Claude Agent SDK",
177
+ agentName: this.name,
178
+ agent: this,
179
+ input: {
180
+ workflowType: "context-analysis",
181
+ projectContext: this.workflowContext,
182
+ requirements: input.description,
183
+ },
184
+ required: true,
185
+ retryable: true,
186
+ interactive: false,
187
+ },
188
+ {
189
+ id: "project-setup",
190
+ name: "Project Setup",
191
+ description: "Initialize project structure with enhanced context awareness",
192
+ agentName: this.name,
193
+ agent: this,
194
+ input: {
195
+ workflowType: "project-setup",
196
+ projectName: input.projectName,
197
+ framework: input.framework,
198
+ context: this.workflowContext,
199
+ },
200
+ dependencies: ["context-analysis"],
201
+ required: true,
202
+ retryable: true,
203
+ interactive: false,
204
+ },
205
+ {
206
+ id: "requirement-gathering",
207
+ name: "Requirement Gathering",
208
+ description: "Gather detailed requirements using Claude Agent SDK",
209
+ agentName: this.name,
210
+ agent: this,
211
+ input: {
212
+ workflowType: "requirement-gathering",
213
+ context: this.workflowContext,
214
+ interactive: input.interactive,
215
+ },
216
+ dependencies: ["project-setup"],
217
+ required: input.interactive,
218
+ retryable: true,
219
+ interactive: true,
220
+ },
221
+ {
222
+ id: "context-generation",
223
+ name: "Context Generation",
224
+ description: "Generate comprehensive context files using Claude Agent SDK",
225
+ agentName: this.name,
226
+ agent: this,
227
+ input: {
228
+ workflowType: "context-generation",
229
+ context: this.workflowContext,
230
+ requirements: input.description,
231
+ },
232
+ dependencies: ["project-setup"],
233
+ required: true,
234
+ retryable: true,
235
+ interactive: false,
236
+ },
237
+ {
238
+ id: "component-generation",
239
+ name: "Component Generation",
240
+ description: "Generate React components using Claude Agent SDK with MCP integration",
241
+ agentName: this.name,
242
+ agent: this,
243
+ input: {
244
+ workflowType: "component-generation",
245
+ context: this.workflowContext,
246
+ components: "all",
247
+ },
248
+ dependencies: ["context-generation"],
249
+ required: true,
250
+ retryable: true,
251
+ interactive: false,
252
+ },
253
+ {
254
+ id: "validation-testing",
255
+ name: "Validation & Testing",
256
+ description: "Validate and test generated components using Claude Agent SDK",
257
+ agentName: this.name,
258
+ agent: this,
259
+ input: {
260
+ workflowType: "validation-testing",
261
+ context: this.workflowContext,
262
+ },
263
+ dependencies: ["component-generation"],
264
+ required: true,
265
+ retryable: true,
266
+ interactive: false,
267
+ },
268
+ ];
269
+ }
270
+ /**
271
+ * Execute enhanced workflow with Claude Agent SDK
272
+ */
273
+ async executeEnhancedWorkflow(steps, maxRetries, interactive) {
274
+ for (const step of steps) {
275
+ await this.executeStepWithClaudeAgent(step, maxRetries, interactive);
276
+ }
277
+ }
278
+ /**
279
+ * Execute individual step using Claude Agent SDK
280
+ */
281
+ async executeStepWithClaudeAgent(step, maxRetries, interactive) {
282
+ const stepId = step.id;
283
+ let retryCount = 0;
284
+ console.log(chalk_1.default.blue(`\nšŸ”„ Executing: ${step.name}`));
285
+ console.log(chalk_1.default.gray(` ${step.description}`));
286
+ while (retryCount <= maxRetries) {
287
+ try {
288
+ // Build step-specific prompt
289
+ const stepPrompt = this.buildStepPrompt(step);
290
+ // Execute step using Claude Agent SDK
291
+ const result = await this.claudeAgentClient.runAgentWorkflow(stepPrompt, this.workflowContext, {
292
+ model: "claude-3-5-sonnet-20241022",
293
+ temperature: 0.2,
294
+ maxTokens: 8000,
295
+ });
296
+ // Process step result
297
+ await this.processStepResult(step, result);
298
+ // Mark step as completed
299
+ this.completedSteps.add(stepId);
300
+ console.log(chalk_1.default.green(`āœ… ${step.name} completed successfully`));
301
+ // Update context with step results
302
+ this.workflowContext = await this.contextManager.mergeContext(this.workflowContext, {
303
+ previousOutputs: {
304
+ ...this.workflowContext.previousOutputs,
305
+ [stepId]: {
306
+ result: result.content,
307
+ timestamp: new Date().toISOString(),
308
+ success: true,
309
+ },
310
+ },
311
+ });
312
+ return;
313
+ }
314
+ catch (error) {
315
+ retryCount++;
316
+ this.totalRetries++;
317
+ if (retryCount <= maxRetries) {
318
+ console.log(chalk_1.default.yellow(`āš ļø ${step.name} failed, retrying (${retryCount}/${maxRetries})`));
319
+ console.log(chalk_1.default.gray(` Error: ${error.message}`));
320
+ // Add delay before retry
321
+ await new Promise((resolve) => setTimeout(resolve, 1000 * retryCount));
322
+ }
323
+ else {
324
+ console.log(chalk_1.default.red(`āŒ ${step.name} failed after ${maxRetries} retries`));
325
+ this.failedSteps.push(stepId);
326
+ if (step.required) {
327
+ throw new Error(`Required step '${step.name}' failed: ${error.message}`);
328
+ }
329
+ }
330
+ }
331
+ }
332
+ }
333
+ /**
334
+ * Build step-specific prompt for Claude Agent SDK
335
+ */
336
+ buildStepPrompt(step) {
337
+ const basePrompt = `Execute the following workflow step: ${step.name}\n\nDescription: ${step.description}\n\n`;
338
+ switch (step.input.workflowType) {
339
+ case "context-analysis":
340
+ return basePrompt + this.buildContextAnalysisPrompt(step);
341
+ case "project-setup":
342
+ return basePrompt + this.buildProjectSetupPrompt(step);
343
+ case "requirement-gathering":
344
+ return basePrompt + this.buildRequirementGatheringPrompt(step);
345
+ case "context-generation":
346
+ return basePrompt + this.buildContextGenerationPrompt(step);
347
+ case "component-generation":
348
+ return basePrompt + this.buildComponentGenerationPrompt(step);
349
+ case "validation-testing":
350
+ return basePrompt + this.buildValidationTestingPrompt(step);
351
+ default:
352
+ return (basePrompt +
353
+ "Please execute this workflow step according to the provided input.");
354
+ }
355
+ }
356
+ /**
357
+ * Build context analysis prompt
358
+ */
359
+ buildContextAnalysisPrompt(step) {
360
+ return `Analyze the project context and requirements:
361
+
362
+ Project Context:
363
+ ${JSON.stringify(step.input.projectContext, null, 2)}
364
+
365
+ Requirements:
366
+ ${step.input.requirements}
367
+
368
+ Please provide:
369
+ 1. Context analysis summary
370
+ 2. Key requirements identified
371
+ 3. Recommended approach
372
+ 4. Potential challenges and solutions`;
373
+ }
374
+ /**
375
+ * Build project setup prompt
376
+ */
377
+ buildProjectSetupPrompt(step) {
378
+ return `Set up the project structure:
379
+
380
+ Project Name: ${step.input.projectName}
381
+ Framework: ${step.input.framework}
382
+
383
+ Context:
384
+ ${JSON.stringify(step.input.context, null, 2)}
385
+
386
+ Please provide:
387
+ 1. Project structure recommendations
388
+ 2. Dependencies to install
389
+ 3. Configuration files needed
390
+ 4. Initial setup steps`;
391
+ }
392
+ /**
393
+ * Build requirement gathering prompt
394
+ */
395
+ buildRequirementGatheringPrompt(step) {
396
+ return `Gather detailed requirements:
397
+
398
+ Current Context:
399
+ ${JSON.stringify(step.input.context, null, 2)}
400
+
401
+ Interactive Mode: ${step.input.interactive}
402
+
403
+ Please provide:
404
+ 1. Detailed requirements analysis
405
+ 2. User stories and use cases
406
+ 3. Technical specifications
407
+ 4. Acceptance criteria`;
408
+ }
409
+ /**
410
+ * Build context generation prompt
411
+ */
412
+ buildContextGenerationPrompt(step) {
413
+ return `Generate comprehensive context files:
414
+
415
+ Context:
416
+ ${JSON.stringify(step.input.context, null, 2)}
417
+
418
+ Requirements:
419
+ ${step.input.requirements}
420
+
421
+ Please provide:
422
+ 1. PRD (Product Requirements Document)
423
+ 2. TypeScript type definitions
424
+ 3. Branding guidelines
425
+ 4. Component list
426
+ 5. Project structure documentation`;
427
+ }
428
+ /**
429
+ * Build component generation prompt
430
+ */
431
+ buildComponentGenerationPrompt(step) {
432
+ return `Generate React components:
433
+
434
+ Context:
435
+ ${JSON.stringify(step.input.context, null, 2)}
436
+
437
+ Components to generate: ${step.input.components}
438
+
439
+ Please provide:
440
+ 1. Complete React component code
441
+ 2. TypeScript interfaces
442
+ 3. Styling with Tailwind CSS
443
+ 4. Component documentation
444
+ 5. Usage examples`;
445
+ }
446
+ /**
447
+ * Build validation testing prompt
448
+ */
449
+ buildValidationTestingPrompt(step) {
450
+ return `Validate and test generated components:
451
+
452
+ Context:
453
+ ${JSON.stringify(step.input.context, null, 2)}
454
+
455
+ Please provide:
456
+ 1. Component validation results
457
+ 2. Test cases and scenarios
458
+ 3. Performance analysis
459
+ 4. Accessibility checks
460
+ 5. Recommendations for improvements`;
461
+ }
462
+ /**
463
+ * Process step result
464
+ */
465
+ async processStepResult(step, result) {
466
+ // Process result based on step type
467
+ switch (step.input.workflowType) {
468
+ case "context-analysis":
469
+ await this.processContextAnalysisResult(result);
470
+ break;
471
+ case "project-setup":
472
+ await this.processProjectSetupResult(result);
473
+ break;
474
+ case "requirement-gathering":
475
+ await this.processRequirementGatheringResult(result);
476
+ break;
477
+ case "context-generation":
478
+ await this.processContextGenerationResult(result);
479
+ break;
480
+ case "component-generation":
481
+ await this.processComponentGenerationResult(result);
482
+ break;
483
+ case "validation-testing":
484
+ await this.processValidationTestingResult(result);
485
+ break;
486
+ }
487
+ }
488
+ /**
489
+ * Process context analysis result
490
+ */
491
+ async processContextAnalysisResult(result) {
492
+ // Extract key insights from context analysis
493
+ console.log(chalk_1.default.green("šŸ“Š Context analysis completed"));
494
+ }
495
+ /**
496
+ * Process project setup result
497
+ */
498
+ async processProjectSetupResult(result) {
499
+ // Process project setup recommendations
500
+ console.log(chalk_1.default.green("šŸ—ļø Project setup completed"));
501
+ }
502
+ /**
503
+ * Process requirement gathering result
504
+ */
505
+ async processRequirementGatheringResult(result) {
506
+ // Process gathered requirements
507
+ console.log(chalk_1.default.green("šŸ“‹ Requirements gathered"));
508
+ }
509
+ /**
510
+ * Process context generation result
511
+ */
512
+ async processContextGenerationResult(result) {
513
+ // Process generated context files
514
+ console.log(chalk_1.default.green("šŸ“„ Context files generated"));
515
+ }
516
+ /**
517
+ * Process component generation result
518
+ */
519
+ async processComponentGenerationResult(result) {
520
+ // Process generated components
521
+ console.log(chalk_1.default.green("šŸŽØ Components generated"));
522
+ }
523
+ /**
524
+ * Process validation testing result
525
+ */
526
+ async processValidationTestingResult(result) {
527
+ // Process validation results
528
+ console.log(chalk_1.default.green("āœ… Validation completed"));
529
+ }
530
+ /**
531
+ * Get enhanced system prompt for Claude Agent SDK
532
+ */
533
+ getEnhancedSystemPrompt() {
534
+ return `You are an expert AI assistant specialized in React/Next.js development and component generation, enhanced with Claude Agent SDK capabilities.
535
+
536
+ Your enhanced capabilities include:
537
+ - Advanced context management and compaction
538
+ - Fine-grained tool permissions
539
+ - MCP (Model Context Protocol) integration
540
+ - Intelligent workflow orchestration
541
+ - Automatic error handling and retry logic
542
+
543
+ When executing workflows:
544
+ 1. Use context management to maintain project state
545
+ 2. Respect tool permissions and restrictions
546
+ 3. Leverage MCP tools when available
547
+ 4. Provide detailed progress updates
548
+ 5. Handle errors gracefully with retry logic
549
+ 6. Maintain comprehensive project context
550
+
551
+ Provide intelligent, context-aware responses that demonstrate deep understanding of the project and requirements.`;
552
+ }
553
+ }
554
+ exports.ClaudeAgentWorkflow = ClaudeAgentWorkflow;
555
+ //# sourceMappingURL=ClaudeAgentWorkflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClaudeAgentWorkflow.js","sourceRoot":"","sources":["../../../src/agents/implementations/ClaudeAgentWorkflow.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;AAQH,qEAAkE;AAClE,+DAA4E;AAC5E,iEAAoE;AACpE,yEAAsE;AACtE,kDAA0B;AAE1B,MAAa,mBAAmB;IA8B9B,YAAY,gBAAyB;QA3BrC,SAAI,GAAG,qBAAqB,CAAC;QAC7B,gBAAW,GACT,qGAAqG,CAAC;QACxG,gBAAW,GACT,gGAAgG,CAAC;QACnG,gBAAW,GAAG,kBAAkB,C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AED;;OAEG;IACK,KAAK,CAAC,4BAA4B,CAAC,MAAW;QACpD,6CAA6C;QAC7C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,yBAAyB,CAAC,MAAW;QACjD,wCAAwC;QACxC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,iCAAiC,CAAC,MAAW;QACzD,gCAAgC;QAChC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,8BAA8B,CAAC,MAAW;QACtD,kCAAkC;QAClC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC;IACzD,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,gCAAgC,CAAC,MAAW;QACxD,+BAA+B;QAC/B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,8BAA8B,CAAC,MAAW;QACtD,6BAA6B;QAC7B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC;IACrD,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,OAAO;;;;;;;;;;;;;;;;;kHAiBuG,CAAC;IACjH,CAAC;CACF;AAvpBD,kDAupBC"}
@@ -17,6 +17,7 @@ export declare class WorkflowAgent implements SubAgent<WorkflowInput, WorkflowOu
17
17
  private codeGenAgent;
18
18
  private qaAgent;
19
19
  private docsAgent;
20
+ private claudeAgentWorkflow;
20
21
  private completedSteps;
21
22
  private failedSteps;
22
23
  private userInteractions;
@@ -1 +1 @@
1
- {"version":3,"file":"WorkflowAgent.d.ts","sourceRoot":"","sources":["../../../src/agents/implementations/WorkflowAgent.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,QAAQ,EACR,aAAa,EACb,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAQhC,qBAAa,aAAc,YAAW,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;IAC3E,IAAI,SAAmB;IACvB,WAAW,SACsF;IACjG,WAAW,SAC0E;IACrF,WAAW,SAAkB;IAC7B,SAAS,WAKP;IAEF,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,iBAAiB,CAA2B;IACpD,OAAO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,SAAS,CAAsB;IAEvC,OAAO,CAAC,cAAc,CAA0B;IAChD,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,YAAY,CAAK;IAEnB,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IA+DxD,OAAO,CAAC,mBAAmB;YAyMb,oBAAoB;IA8FlC,QAAQ,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAarD,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;IAMzB,SAAS,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC;CAajC"}
1
+ {"version":3,"file":"WorkflowAgent.d.ts","sourceRoot":"","sources":["../../../src/agents/implementations/WorkflowAgent.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,QAAQ,EACR,aAAa,EACb,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAShC,qBAAa,aAAc,YAAW,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;IAC3E,IAAI,SAAmB;IACvB,WAAW,SACsF;IACjG,WAAW,SAC0E;IACrF,WAAW,SAAkB;IAC7B,SAAS,WAKP;IAEF,OAAO,CAAC,gBAAgB,CAA0B;IAClD,OAAO,CAAC,iBAAiB,CAA2B;IACpD,OAAO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,mBAAmB,CAA6B;IAExD,OAAO,CAAC,cAAc,CAA0B;IAChD,OAAO,CAAC,WAAW,CAAgB;IACnC,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,YAAY,CAAK;IAEnB,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;IA8ExD,OAAO,CAAC,mBAAmB;YAyMb,oBAAoB;IA8FlC,QAAQ,CAAC,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAarD,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC;IAMzB,SAAS,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC;CAajC"}
@@ -16,6 +16,7 @@ const ProjectSetupAgent_1 = require("./ProjectSetupAgent");
16
16
  const CodeGenSubAgent_1 = require("./CodeGenSubAgent");
17
17
  const QASubAgent_1 = require("./QASubAgent");
18
18
  const DocsSubAgent_1 = require("./DocsSubAgent");
19
+ const ClaudeAgentWorkflow_1 = require("./ClaudeAgentWorkflow");
19
20
  const chalk_1 = __importDefault(require("chalk"));
20
21
  class WorkflowAgent {
21
22
  constructor() {
@@ -34,6 +35,7 @@ class WorkflowAgent {
34
35
  this.codeGenAgent = new CodeGenSubAgent_1.CodeGenSubAgent();
35
36
  this.qaAgent = new QASubAgent_1.QASubAgent();
36
37
  this.docsAgent = new DocsSubAgent_1.DocsSubAgent();
38
+ this.claudeAgentWorkflow = new ClaudeAgentWorkflow_1.ClaudeAgentWorkflow();
37
39
  this.completedSteps = new Set();
38
40
  this.failedSteps = [];
39
41
  this.userInteractions = 0;
@@ -47,6 +49,12 @@ class WorkflowAgent {
47
49
  console.log(chalk_1.default.gray(`Framework: ${input.framework}`));
48
50
  console.log(chalk_1.default.gray(`Interactive Mode: ${input.interactive ? "Enabled" : "Disabled"}\n`));
49
51
  try {
52
+ // Check if Claude Agent SDK is available and use it preferentially
53
+ if (this.claudeAgentWorkflow.isClaudeAgentAvailable()) {
54
+ console.log(chalk_1.default.green("šŸ¤– Using Claude Agent SDK for enhanced workflow execution"));
55
+ return await this.claudeAgentWorkflow.run(input);
56
+ }
57
+ console.log(chalk_1.default.yellow("āš ļø Claude Agent SDK not available, using standard workflow"));
50
58
  const steps = this.defineWorkflowSteps(input);
51
59
  for (const step of steps) {
52
60
  await this.executeStepWithRetry(step, maxRetries, input.interactive);