snow-flow 1.1.94 → 1.1.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.
@@ -25,11 +25,17 @@ class AgentDetector {
25
25
  const requiresApplication = this.requiresApplication(lowerObjective, serviceNowArtifacts);
26
26
  // Determine task type
27
27
  const taskType = this.determineTaskType(lowerObjective, serviceNowArtifacts);
28
+ // 🚀 NEW: Accurate agent count for parallel system
29
+ const isDevelopmentTask = ['widget-creator', 'flow-builder', 'script-writer', 'app-architect'].includes(primaryAgent) ||
30
+ supportingAgents.some(agent => ['css-specialist', 'backend-specialist', 'frontend-specialist'].includes(agent));
31
+ const estimatedAgentCount = isDevelopmentTask
32
+ ? Math.max(supportingAgents.length + 1, 6) // 6+ agents for development (1 primary + 5+ specialists)
33
+ : Math.min(Math.max(supportingAgents.length + 1, 2), 8); // Original logic for non-development
28
34
  return {
29
35
  primaryAgent,
30
36
  supportingAgents,
31
37
  complexity,
32
- estimatedAgentCount: Math.min(Math.max(supportingAgents.length + 1, 2), 8),
38
+ estimatedAgentCount,
33
39
  requiresUpdateSet,
34
40
  requiresApplication,
35
41
  taskType,
@@ -60,49 +66,64 @@ class AgentDetector {
60
66
  }
61
67
  static determinePrimaryAgent(capabilities) {
62
68
  if (capabilities.length === 0)
63
- return 'orchestrator';
64
- // Special logic for ServiceNow-specific tasks
65
- const serviceNowAgents = capabilities.filter(c => ['flow_designer', 'widget_builder', 'integration_specialist', 'database_expert'].includes(c.type));
69
+ return 'queen-coordinator';
70
+ // Map detected types to new parallel agent types
71
+ const convertToParallelType = (detectedType) => {
72
+ const mapping = {
73
+ 'widget_builder': 'widget-creator',
74
+ 'flow_designer': 'flow-builder',
75
+ 'integration_specialist': 'integration-specialist',
76
+ 'database_expert': 'app-architect',
77
+ 'coder': 'script-writer',
78
+ 'architect': 'app-architect',
79
+ 'tester': 'tester'
80
+ };
81
+ return mapping[detectedType] || detectedType;
82
+ };
83
+ // Convert all capability types to parallel agent types
84
+ const parallelCapabilities = capabilities.map(c => ({
85
+ ...c,
86
+ type: convertToParallelType(c.type)
87
+ }));
88
+ // Special logic for ServiceNow-specific tasks - use new parallel agent types
89
+ const serviceNowAgents = parallelCapabilities.filter(c => ['flow-builder', 'widget-creator', 'integration-specialist', 'app-architect'].includes(c.type));
66
90
  if (serviceNowAgents.length > 0) {
67
91
  return serviceNowAgents[0].type;
68
92
  }
69
- return capabilities[0].type;
93
+ return parallelCapabilities[0].type;
70
94
  }
71
95
  static determineSupportingAgents(capabilities, primaryAgent, userMaxAgents) {
72
- // Calculate how many supporting agents we need based on user request
73
- const requestedSupportingCount = userMaxAgents ? Math.max(userMaxAgents - 1, 1) : 5; // -1 for primary agent
96
+ // 🚀 NEW: Parallel Agent System - Show 6+ specialized agents for development tasks
97
+ const isWidgetDevelopment = primaryAgent === 'widget-creator' || capabilities.some(c => c.type === 'widget-creator');
98
+ const isFlowDevelopment = primaryAgent === 'flow-builder' || capabilities.some(c => c.type === 'flow-builder');
99
+ const isDevelopmentTask = isWidgetDevelopment || isFlowDevelopment ||
100
+ capabilities.some(c => ['widget-creator', 'flow-builder', 'script-writer', 'app-architect'].includes(c.type));
101
+ if (isDevelopmentTask) {
102
+ // 🚀 Widget development gets full specialized team (6+ agents)
103
+ if (isWidgetDevelopment) {
104
+ return ['css-specialist', 'backend-specialist', 'frontend-specialist', 'integration-specialist', 'performance-specialist', 'tester'];
105
+ }
106
+ // 🚀 Flow development gets flow-specific team
107
+ if (isFlowDevelopment) {
108
+ return ['trigger-specialist', 'action-specialist', 'approval-specialist', 'integration-specialist', 'error-handler', 'tester'];
109
+ }
110
+ // 🚀 General development gets adaptive specialized team
111
+ return ['script-writer', 'css-specialist', 'integration-specialist', 'security-specialist', 'performance-specialist', 'tester'];
112
+ }
113
+ // 🚀 For non-development tasks, use smart agent selection based on capabilities
114
+ const requestedSupportingCount = userMaxAgents ? Math.max(userMaxAgents - 1, 1) : 5;
74
115
  // Start with high-confidence agents (confidence > 0.3)
75
116
  let supportingAgents = capabilities
76
117
  .filter(c => c.type !== primaryAgent && c.confidence > 0.3)
77
118
  .slice(0, requestedSupportingCount)
78
119
  .map(c => c.type);
79
- // If user wants more agents and we have fewer than requested, add lower-confidence agents
80
- if (userMaxAgents && supportingAgents.length < requestedSupportingCount) {
120
+ // If we need more agents, add specialized agents based on task context
121
+ if (supportingAgents.length < requestedSupportingCount) {
81
122
  const remainingSlots = requestedSupportingCount - supportingAgents.length;
82
- const lowConfidenceAgents = capabilities
83
- .filter(c => c.type !== primaryAgent && c.confidence <= 0.3 && c.confidence > 0)
84
- .slice(0, remainingSlots)
85
- .map(c => c.type);
86
- supportingAgents = [...supportingAgents, ...lowConfidenceAgents];
87
- }
88
- // Always include orchestrator for complex tasks (if not already included)
89
- if (capabilities.length > 3 && !supportingAgents.includes('orchestrator')) {
90
- // Only add if we have room or if no max specified
91
- if (!userMaxAgents || supportingAgents.length < requestedSupportingCount) {
92
- supportingAgents.push('orchestrator');
93
- }
94
- }
95
- // Always include tester for development tasks (if not already included)
96
- const developmentAgents = ['coder', 'architect', 'flow_designer', 'widget_builder'];
97
- if (developmentAgents.includes(primaryAgent) && !supportingAgents.includes('tester')) {
98
- // Only add if we have room or if no max specified
99
- if (!userMaxAgents || supportingAgents.length < requestedSupportingCount) {
100
- supportingAgents.push('tester');
101
- }
102
- else if (userMaxAgents && supportingAgents.length >= requestedSupportingCount) {
103
- // Replace least relevant agent with tester for development tasks
104
- supportingAgents[supportingAgents.length - 1] = 'tester';
105
- }
123
+ const specializedAgents = ['integration-specialist', 'security-specialist', 'tester', 'performance-specialist']
124
+ .filter(agent => !supportingAgents.includes(agent))
125
+ .slice(0, remainingSlots);
126
+ supportingAgents = [...supportingAgents, ...specializedAgents];
106
127
  }
107
128
  // Ensure we don't exceed the requested count
108
129
  if (userMaxAgents && supportingAgents.length > requestedSupportingCount) {
package/dist/version.js CHANGED
@@ -7,7 +7,7 @@ exports.VERSION_INFO = exports.VERSION = void 0;
7
7
  exports.getVersionString = getVersionString;
8
8
  exports.getLatestFeatures = getLatestFeatures;
9
9
  exports.isLatestVersion = isLatestVersion;
10
- exports.VERSION = '1.1.94';
10
+ exports.VERSION = '1.1.95';
11
11
  exports.VERSION_INFO = {
12
12
  version: exports.VERSION,
13
13
  name: 'Snow-Flow',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snow-flow",
3
- "version": "1.1.94",
3
+ "version": "1.1.95",
4
4
  "description": "ServiceNow Queen Agent - Hive-Mind Intelligence for ServiceNow Development inspired by claude-flow. Transform complex workflows into elegant one-command orchestration.",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",