snow-flow 8.31.31 → 8.31.34
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/api/health-api.d.ts +1 -1
- package/dist/api/health-api.d.ts.map +1 -1
- package/dist/api/simple-health-api.d.ts +1 -1
- package/dist/api/simple-health-api.d.ts.map +1 -1
- package/dist/cli/partners.d.ts +47 -0
- package/dist/cli/partners.d.ts.map +1 -0
- package/dist/cli/partners.js +283 -0
- package/dist/cli/partners.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +146 -561
- package/dist/cli.js.map +1 -1
- package/dist/examples/queen/integration-example.d.ts +83 -0
- package/dist/examples/queen/integration-example.d.ts.map +1 -0
- package/dist/examples/queen/integration-example.js +219 -0
- package/dist/examples/queen/integration-example.js.map +1 -0
- package/dist/intelligence/acl-analyzer.d.ts +88 -0
- package/dist/intelligence/acl-analyzer.d.ts.map +1 -0
- package/dist/intelligence/acl-analyzer.js +276 -0
- package/dist/intelligence/acl-analyzer.js.map +1 -0
- package/dist/intelligence/auto-resolution-engine.d.ts +74 -0
- package/dist/intelligence/auto-resolution-engine.d.ts.map +1 -0
- package/dist/intelligence/auto-resolution-engine.js +518 -0
- package/dist/intelligence/auto-resolution-engine.js.map +1 -0
- package/dist/intelligence/gap-analysis-engine.d.ts +103 -0
- package/dist/intelligence/gap-analysis-engine.d.ts.map +1 -0
- package/dist/intelligence/gap-analysis-engine.js +333 -0
- package/dist/intelligence/gap-analysis-engine.js.map +1 -0
- package/dist/intelligence/manual-instructions-generator.d.ts +88 -0
- package/dist/intelligence/manual-instructions-generator.d.ts.map +1 -0
- package/dist/intelligence/manual-instructions-generator.js +641 -0
- package/dist/intelligence/manual-instructions-generator.js.map +1 -0
- package/dist/intelligence/mcp-coverage-analyzer.d.ts +89 -0
- package/dist/intelligence/mcp-coverage-analyzer.d.ts.map +1 -0
- package/dist/intelligence/mcp-coverage-analyzer.js +556 -0
- package/dist/intelligence/mcp-coverage-analyzer.js.map +1 -0
- package/dist/intelligence/multi-pass-requirements-analyzer.d.ts +79 -0
- package/dist/intelligence/multi-pass-requirements-analyzer.d.ts.map +1 -0
- package/dist/intelligence/multi-pass-requirements-analyzer.js +478 -0
- package/dist/intelligence/multi-pass-requirements-analyzer.js.map +1 -0
- package/dist/intelligence/performance-recommendations-engine.d.ts +236 -0
- package/dist/intelligence/performance-recommendations-engine.d.ts.map +1 -0
- package/dist/intelligence/performance-recommendations-engine.js +958 -0
- package/dist/intelligence/performance-recommendations-engine.js.map +1 -0
- package/dist/intelligence/requirements-analyzer.d.ts +59 -0
- package/dist/intelligence/requirements-analyzer.d.ts.map +1 -0
- package/dist/intelligence/requirements-analyzer.js +978 -0
- package/dist/intelligence/requirements-analyzer.js.map +1 -0
- package/dist/intelligence/task-analyzer.d.ts +119 -0
- package/dist/intelligence/task-analyzer.d.ts.map +1 -0
- package/dist/intelligence/task-analyzer.js +494 -0
- package/dist/intelligence/task-analyzer.js.map +1 -0
- package/dist/mcp/mcp-tool-manager.d.ts +80 -0
- package/dist/mcp/mcp-tool-manager.d.ts.map +1 -0
- package/dist/mcp/mcp-tool-manager.js +272 -0
- package/dist/mcp/mcp-tool-manager.js.map +1 -0
- package/dist/mcp/servicenow-development-assistant-mcp.js +8 -8
- package/dist/mcp/servicenow-development-assistant-mcp.js.map +1 -1
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_jira_integration.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_jira_integration.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_jira_integration.js +49 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_jira_integration.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_ldap_sync.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_ldap_sync.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_ldap_sync.js +48 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_ldap_sync.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_oauth_provider.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_oauth_provider.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_oauth_provider.js +50 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_oauth_provider.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_saml_config.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_saml_config.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_saml_config.js +49 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_saml_config.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_webhook_config.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_webhook_config.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_webhook_config.js +51 -0
- package/dist/mcp/servicenow-mcp-unified/tools/adapters/snow_webhook_config.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/index.d.ts +3 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/index.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/index.js +10 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/index.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/snow_predict.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/snow_predict.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/snow_predict.js +40 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/snow_predict.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/snow_train_classifier.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/snow_train_classifier.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/snow_train_classifier.js +42 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ai-ml/snow_train_classifier.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_approve_change.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_approve_change.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_approve_change.js +43 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_approve_change.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_assess_change_risk.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_assess_change_risk.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_assess_change_risk.js +53 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_assess_change_risk.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_create_change.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_create_change.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_create_change.js +50 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_create_change.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_create_change_task.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_create_change_task.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_create_change_task.js +50 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_create_change_task.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_get_change_request.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_get_change_request.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_get_change_request.js +60 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_get_change_request.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_schedule_cab_meeting.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_schedule_cab_meeting.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_schedule_cab_meeting.js +55 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_schedule_cab_meeting.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_search_change_requests.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_search_change_requests.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_search_change_requests.js +54 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_search_change_requests.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_update_change_state.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_update_change_state.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_update_change_state.js +67 -0
- package/dist/mcp/servicenow-mcp-unified/tools/change/snow_update_change_state.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_csv_to_json.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_csv_to_json.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_csv_to_json.js +52 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_csv_to_json.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_json_to_csv.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_json_to_csv.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_json_to_csv.js +51 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_json_to_csv.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_json_to_xml.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_json_to_xml.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_json_to_xml.js +42 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_json_to_xml.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_xml_to_json.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_xml_to_json.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_xml_to_json.js +42 -0
- package/dist/mcp/servicenow-mcp-unified/tools/converters/snow_xml_to_json.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_details.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_details.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_details.js +68 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_details.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_execution_history.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_execution_history.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_execution_history.js +76 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_execution_history.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_execution_status.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_execution_status.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_execution_status.js +71 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_get_flow_execution_status.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_list_flows.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_list_flows.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_list_flows.js +42 -0
- package/dist/mcp/servicenow-mcp-unified/tools/flow-designer/snow_list_flows.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_create_knowledge_article.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_create_knowledge_article.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_create_knowledge_article.js +80 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_create_knowledge_article.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_get_knowledge_article_details.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_get_knowledge_article_details.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_get_knowledge_article_details.js +63 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_get_knowledge_article_details.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_publish_kb_article.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_publish_kb_article.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_publish_kb_article.js +41 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_publish_kb_article.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_retire_knowledge_article.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_retire_knowledge_article.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_retire_knowledge_article.js +59 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_retire_knowledge_article.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_search_knowledge.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_search_knowledge.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_search_knowledge.js +72 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_search_knowledge.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_update_knowledge_article.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_update_knowledge_article.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_update_knowledge_article.js +68 -0
- package/dist/mcp/servicenow-mcp-unified/tools/knowledge/snow_update_knowledge_article.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_assign_user_to_group.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_assign_user_to_group.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_assign_user_to_group.js +106 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_assign_user_to_group.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_create_record.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_create_record.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_create_record.js +107 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_create_record.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_delete_record.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_delete_record.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_delete_record.js +157 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_delete_record.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_list_group_members.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_list_group_members.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_list_group_members.js +117 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_list_group_members.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_remove_user_from_group.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_remove_user_from_group.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_remove_user_from_group.js +99 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_remove_user_from_group.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_update_record.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_update_record.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_update_record.js +105 -0
- package/dist/mcp/servicenow-mcp-unified/tools/operations/snow_update_record.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_collect_pa_data.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_collect_pa_data.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_collect_pa_data.js +55 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_collect_pa_data.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_data_visualization.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_data_visualization.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_data_visualization.js +70 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_data_visualization.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_kpi.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_kpi.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_kpi.js +69 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_kpi.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_breakdown.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_breakdown.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_breakdown.js +55 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_breakdown.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_indicator.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_indicator.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_indicator.js +43 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_indicator.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_threshold.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_threshold.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_threshold.js +57 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_threshold.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_widget.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_widget.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_widget.js +62 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_pa_widget.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_scheduled_report.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_scheduled_report.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_scheduled_report.js +69 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_create_scheduled_report.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_pa_indicators.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_pa_indicators.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_pa_indicators.js +55 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_pa_indicators.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_report_fields.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_report_fields.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_report_fields.js +53 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_report_fields.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_reporting_tables.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_reporting_tables.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_reporting_tables.js +51 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_discover_reporting_tables.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_export_report_data.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_export_report_data.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_export_report_data.js +62 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_export_report_data.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_generate_insights.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_generate_insights.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_generate_insights.js +69 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_generate_insights.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_get_pa_scores.d.ts +8 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_get_pa_scores.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_get_pa_scores.js +42 -0
- package/dist/mcp/servicenow-mcp-unified/tools/performance-analytics/snow_get_pa_scores.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/index.d.ts +10 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/index.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/index.js +28 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/index.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_activate_pi_solution.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_activate_pi_solution.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_activate_pi_solution.js +168 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_activate_pi_solution.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_create_pi_solution.d.ts +20 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_create_pi_solution.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_create_pi_solution.js +235 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_create_pi_solution.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_list_pi_solutions.d.ts +10 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_list_pi_solutions.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_list_pi_solutions.js +166 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_list_pi_solutions.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_monitor_pi_training.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_monitor_pi_training.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_monitor_pi_training.js +142 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_monitor_pi_training.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_train_pi_solution.d.ts +14 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_train_pi_solution.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_train_pi_solution.js +149 -0
- package/dist/mcp/servicenow-mcp-unified/tools/predictive-intelligence/snow_train_pi_solution.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_add_uib_page_element.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_add_uib_page_element.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_add_uib_page_element.js +111 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_add_uib_page_element.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_clone_uib_component.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_clone_uib_component.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_clone_uib_component.js +99 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_clone_uib_component.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_create_uib_component.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_create_uib_component.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_create_uib_component.js +102 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_create_uib_component.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_create_uib_page.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_create_uib_page.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_create_uib_page.js +99 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_create_uib_page.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_delete_uib_page.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_delete_uib_page.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_delete_uib_page.js +108 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_delete_uib_page.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_components.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_components.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_components.js +96 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_components.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_page_usage.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_page_usage.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_page_usage.js +106 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_page_usage.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_pages.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_pages.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_pages.js +102 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_pages.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_routes.d.ts +12 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_routes.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_routes.js +99 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_discover_uib_routes.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_remove_uib_page_element.d.ts +11 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_remove_uib_page_element.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_remove_uib_page_element.js +138 -0
- package/dist/mcp/servicenow-mcp-unified/tools/ui-builder/snow_remove_uib_page_element.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_add_user_to_group.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_add_user_to_group.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_add_user_to_group.js +42 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_add_user_to_group.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_assign_role.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_assign_role.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_assign_role.js +51 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_assign_role.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_group.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_group.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_group.js +51 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_group.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_role.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_role.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_role.js +47 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_role.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_user.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_user.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_user.js +51 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_create_user.js.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_deactivate_user.d.ts +9 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_deactivate_user.d.ts.map +1 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_deactivate_user.js +40 -0
- package/dist/mcp/servicenow-mcp-unified/tools/user-admin/snow_deactivate_user.js.map +1 -0
- package/dist/memory/session-memory.d.ts +70 -0
- package/dist/memory/session-memory.d.ts.map +1 -0
- package/dist/memory/session-memory.js +110 -0
- package/dist/memory/session-memory.js.map +1 -0
- package/dist/partners/license-parser.d.ts +52 -0
- package/dist/partners/license-parser.d.ts.map +1 -0
- package/dist/partners/license-parser.js +240 -0
- package/dist/partners/license-parser.js.map +1 -0
- package/dist/partners/types.d.ts +253 -0
- package/dist/partners/types.d.ts.map +1 -0
- package/dist/partners/types.js +111 -0
- package/dist/partners/types.js.map +1 -0
- package/dist/portal/partner-backend.d.ts +106 -0
- package/dist/portal/partner-backend.d.ts.map +1 -0
- package/dist/portal/partner-backend.js +254 -0
- package/dist/portal/partner-backend.js.map +1 -0
- package/dist/queen/agent-factory.d.ts +45 -0
- package/dist/queen/agent-factory.d.ts.map +1 -0
- package/dist/queen/agent-factory.js +659 -0
- package/dist/queen/agent-factory.js.map +1 -0
- package/dist/queen/index.d.ts +59 -0
- package/dist/queen/index.d.ts.map +1 -0
- package/dist/queen/index.js +80 -0
- package/dist/queen/index.js.map +1 -0
- package/dist/queen/mcp-execution-bridge.d.ts +115 -0
- package/dist/queen/mcp-execution-bridge.d.ts.map +1 -0
- package/dist/queen/mcp-execution-bridge.js +535 -0
- package/dist/queen/mcp-execution-bridge.js.map +1 -0
- package/dist/queen/neural-learning.d.ts +28 -0
- package/dist/queen/neural-learning.d.ts.map +1 -0
- package/dist/queen/neural-learning.js +252 -0
- package/dist/queen/neural-learning.js.map +1 -0
- package/dist/queen/parallel-agent-engine.d.ts +126 -0
- package/dist/queen/parallel-agent-engine.d.ts.map +1 -0
- package/dist/queen/parallel-agent-engine.js +704 -0
- package/dist/queen/parallel-agent-engine.js.map +1 -0
- package/dist/queen/queen-knowledge-base.d.ts +151 -0
- package/dist/queen/queen-knowledge-base.d.ts.map +1 -0
- package/dist/queen/queen-knowledge-base.js +283 -0
- package/dist/queen/queen-knowledge-base.js.map +1 -0
- package/dist/queen/queen-memory.d.ts +65 -0
- package/dist/queen/queen-memory.d.ts.map +1 -0
- package/dist/queen/queen-memory.js +467 -0
- package/dist/queen/queen-memory.js.map +1 -0
- package/dist/queen/servicenow-queen.d.ts +154 -0
- package/dist/queen/servicenow-queen.d.ts.map +1 -0
- package/dist/queen/servicenow-queen.js +1409 -0
- package/dist/queen/servicenow-queen.js.map +1 -0
- package/dist/queen/types.d.ts +65 -0
- package/dist/queen/types.d.ts.map +1 -0
- package/dist/queen/types.js +7 -0
- package/dist/queen/types.js.map +1 -0
- package/dist/sdk/queen-orchestrator.d.ts +94 -0
- package/dist/sdk/queen-orchestrator.d.ts.map +1 -0
- package/dist/sdk/queen-orchestrator.js +309 -0
- package/dist/sdk/queen-orchestrator.js.map +1 -0
- package/dist/sdk/universal-agent-spawner.d.ts +112 -0
- package/dist/sdk/universal-agent-spawner.d.ts.map +1 -0
- package/dist/sdk/universal-agent-spawner.js +353 -0
- package/dist/sdk/universal-agent-spawner.js.map +1 -0
- package/dist/sparc/sparc-help.d.ts +5 -0
- package/dist/sparc/sparc-help.d.ts.map +1 -0
- package/dist/sparc/sparc-help.js +52 -0
- package/dist/sparc/sparc-help.js.map +1 -0
- package/dist/sparc/team-sparc.d.ts +9 -0
- package/dist/sparc/team-sparc.d.ts.map +1 -0
- package/dist/sparc/team-sparc.js +83 -0
- package/dist/sparc/team-sparc.js.map +1 -0
- package/package.json +1 -1
- package/patches/@groeimetai+snow-code+0.18.48.patch +25 -27
|
@@ -0,0 +1,704 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Intelligent Parallel Agent Engine
|
|
4
|
+
* Automatically detects parallelizable work and spawns optimized agent teams
|
|
5
|
+
* Integrates with Queen Agent for enhanced multi-agent coordination
|
|
6
|
+
*/
|
|
7
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
8
|
+
if (k2 === undefined) k2 = k;
|
|
9
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
11
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
12
|
+
}
|
|
13
|
+
Object.defineProperty(o, k2, desc);
|
|
14
|
+
}) : (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
o[k2] = m[k];
|
|
17
|
+
}));
|
|
18
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
19
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
20
|
+
}) : function(o, v) {
|
|
21
|
+
o["default"] = v;
|
|
22
|
+
});
|
|
23
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
24
|
+
var ownKeys = function(o) {
|
|
25
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
26
|
+
var ar = [];
|
|
27
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
28
|
+
return ar;
|
|
29
|
+
};
|
|
30
|
+
return ownKeys(o);
|
|
31
|
+
};
|
|
32
|
+
return function (mod) {
|
|
33
|
+
if (mod && mod.__esModule) return mod;
|
|
34
|
+
var result = {};
|
|
35
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
36
|
+
__setModuleDefault(result, mod);
|
|
37
|
+
return result;
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.ParallelAgentEngine = void 0;
|
|
42
|
+
const eventemitter3_1 = require("eventemitter3");
|
|
43
|
+
const logger_1 = require("../utils/logger");
|
|
44
|
+
const crypto = __importStar(require("crypto"));
|
|
45
|
+
class ParallelAgentEngine extends eventemitter3_1.EventEmitter {
|
|
46
|
+
constructor(memory) {
|
|
47
|
+
super();
|
|
48
|
+
this.logger = new logger_1.Logger('ParallelAgentEngine');
|
|
49
|
+
this.memory = memory;
|
|
50
|
+
this.activeExecutionPlans = new Map();
|
|
51
|
+
this.agentWorkloads = new Map();
|
|
52
|
+
this.parallelizationHistory = new Map();
|
|
53
|
+
this.initializeCapabilityMap();
|
|
54
|
+
this.setupLearningSystem();
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Main entry point: Analyze todos and detect parallelization opportunities
|
|
58
|
+
*/
|
|
59
|
+
async detectParallelizationOpportunities(todos, objectiveType, currentAgents) {
|
|
60
|
+
this.logger.info('🧠 Analyzing parallelization opportunities', {
|
|
61
|
+
todoCount: todos.length,
|
|
62
|
+
objectiveType,
|
|
63
|
+
currentAgentCount: currentAgents.length
|
|
64
|
+
});
|
|
65
|
+
const opportunities = [];
|
|
66
|
+
// 1. Detect independent tasks (can run simultaneously)
|
|
67
|
+
const independentOpportunity = await this.detectIndependentTasks(todos);
|
|
68
|
+
if (independentOpportunity)
|
|
69
|
+
opportunities.push(independentOpportunity);
|
|
70
|
+
// 2. Detect specialized breakdown opportunities (split complex task)
|
|
71
|
+
const specializedOpportunity = await this.detectSpecializedBreakdown(todos, objectiveType);
|
|
72
|
+
if (specializedOpportunity)
|
|
73
|
+
opportunities.push(specializedOpportunity);
|
|
74
|
+
// 3. Detect load distribution opportunities (same type, multiple agents)
|
|
75
|
+
const loadOpportunity = await this.detectLoadDistribution(todos, currentAgents);
|
|
76
|
+
if (loadOpportunity)
|
|
77
|
+
opportunities.push(loadOpportunity);
|
|
78
|
+
// 4. Detect capability split opportunities (different skills needed)
|
|
79
|
+
const capabilityOpportunity = await this.detectCapabilitySplit(todos);
|
|
80
|
+
if (capabilityOpportunity)
|
|
81
|
+
opportunities.push(capabilityOpportunity);
|
|
82
|
+
// 🚀 ENHANCED: More lenient filtering to ensure parallel execution happens
|
|
83
|
+
const rankedOpportunities = opportunities
|
|
84
|
+
.filter(opp => opp.confidence > 0.5 && opp.estimatedSpeedup > 1.1) // Lower thresholds
|
|
85
|
+
.sort((a, b) => (b.confidence * b.estimatedSpeedup) - (a.confidence * a.estimatedSpeedup));
|
|
86
|
+
this.logger.info(`🎯 Found ${rankedOpportunities.length} high-confidence parallelization opportunities`, {
|
|
87
|
+
totalOpportunities: opportunities.length,
|
|
88
|
+
rankedCount: rankedOpportunities.length,
|
|
89
|
+
averageConfidence: rankedOpportunities.reduce((sum, opp) => sum + opp.confidence, 0) / rankedOpportunities.length || 0
|
|
90
|
+
});
|
|
91
|
+
// Store opportunities for learning
|
|
92
|
+
await this.storeOpportunities(todos, rankedOpportunities);
|
|
93
|
+
return rankedOpportunities;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Create optimal execution plan based on opportunities
|
|
97
|
+
*/
|
|
98
|
+
async createExecutionPlan(opportunities, todos, maxAgents = 8) {
|
|
99
|
+
const planId = this.generateId('plan');
|
|
100
|
+
// Calculate optimal agent team
|
|
101
|
+
const agentTeam = await this.calculateOptimalTeam(opportunities, todos, maxAgents);
|
|
102
|
+
// Determine execution strategy
|
|
103
|
+
const strategy = this.determineExecutionStrategy(opportunities, agentTeam);
|
|
104
|
+
// Estimate completion time
|
|
105
|
+
const estimatedCompletion = this.estimateCompletionTime(agentTeam, strategy);
|
|
106
|
+
const plan = {
|
|
107
|
+
planId,
|
|
108
|
+
opportunities,
|
|
109
|
+
agentTeam,
|
|
110
|
+
executionStrategy: strategy,
|
|
111
|
+
estimatedCompletion,
|
|
112
|
+
maxParallelism: Math.min(agentTeam.length, maxAgents),
|
|
113
|
+
failureRecovery: 'reassign'
|
|
114
|
+
};
|
|
115
|
+
this.activeExecutionPlans.set(planId, plan);
|
|
116
|
+
this.logger.info(`📋 Created execution plan ${planId}`, {
|
|
117
|
+
planId,
|
|
118
|
+
strategy,
|
|
119
|
+
teamSize: agentTeam.length,
|
|
120
|
+
estimatedCompletion,
|
|
121
|
+
maxParallelism: plan.maxParallelism,
|
|
122
|
+
opportunityCount: opportunities.length
|
|
123
|
+
});
|
|
124
|
+
return plan;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Execute parallel plan and coordinate agents
|
|
128
|
+
*/
|
|
129
|
+
async executeParallelPlan(plan, spawnAgentCallback) {
|
|
130
|
+
this.logger.info(`🚀 Executing parallel plan ${plan.planId}`, {
|
|
131
|
+
planId: plan.planId,
|
|
132
|
+
strategy: plan.executionStrategy,
|
|
133
|
+
agentTeamSize: plan.agentTeam.length,
|
|
134
|
+
maxParallelism: plan.maxParallelism
|
|
135
|
+
});
|
|
136
|
+
const spawnedAgents = [];
|
|
137
|
+
// Spawn agents based on plan
|
|
138
|
+
for (const workload of plan.agentTeam) {
|
|
139
|
+
if (workload.agentId === 'new') {
|
|
140
|
+
// Spawn new agent with specialization
|
|
141
|
+
const specialization = this.determineAgentSpecialization(workload);
|
|
142
|
+
const agent = await spawnAgentCallback(workload.agentType, specialization);
|
|
143
|
+
spawnedAgents.push(agent);
|
|
144
|
+
// Update workload with actual agent ID
|
|
145
|
+
workload.agentId = agent.id;
|
|
146
|
+
this.agentWorkloads.set(agent.id, workload);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// Set up parallel coordination
|
|
150
|
+
await this.setupParallelCoordination(plan, spawnedAgents);
|
|
151
|
+
// Calculate speedup
|
|
152
|
+
const sequentialTime = plan.agentTeam.reduce((sum, w) => sum + w.estimatedDuration, 0);
|
|
153
|
+
const parallelTime = plan.estimatedCompletion;
|
|
154
|
+
const actualSpeedup = sequentialTime / parallelTime;
|
|
155
|
+
this.emit('parallel_execution_started', {
|
|
156
|
+
planId: plan.planId,
|
|
157
|
+
agentCount: spawnedAgents.length,
|
|
158
|
+
estimatedSpeedup: actualSpeedup
|
|
159
|
+
});
|
|
160
|
+
return {
|
|
161
|
+
spawnedAgents,
|
|
162
|
+
executionDetails: {
|
|
163
|
+
totalAgentsSpawned: spawnedAgents.length,
|
|
164
|
+
parallelWorkflows: plan.opportunities.length,
|
|
165
|
+
estimatedSpeedup: `${actualSpeedup.toFixed(1)}x faster`
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Detect independent tasks that can run in parallel
|
|
171
|
+
*/
|
|
172
|
+
async detectIndependentTasks(todos) {
|
|
173
|
+
const independentGroups = [];
|
|
174
|
+
const processed = new Set();
|
|
175
|
+
for (const todo of todos) {
|
|
176
|
+
if (processed.has(todo.id))
|
|
177
|
+
continue;
|
|
178
|
+
const group = [todo.id];
|
|
179
|
+
processed.add(todo.id);
|
|
180
|
+
// Find todos that can run with this one
|
|
181
|
+
for (const otherTodo of todos) {
|
|
182
|
+
if (processed.has(otherTodo.id))
|
|
183
|
+
continue;
|
|
184
|
+
if (this.areTasksIndependent(todo, otherTodo)) {
|
|
185
|
+
group.push(otherTodo.id);
|
|
186
|
+
processed.add(otherTodo.id);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (group.length > 1) {
|
|
190
|
+
independentGroups.push(group);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (independentGroups.length === 0)
|
|
194
|
+
return null;
|
|
195
|
+
// Find the largest independent group
|
|
196
|
+
const largestGroup = independentGroups.reduce((max, group) => group.length > max.length ? group : max);
|
|
197
|
+
return {
|
|
198
|
+
id: this.generateId('independent'),
|
|
199
|
+
type: 'independent_tasks',
|
|
200
|
+
todos: largestGroup,
|
|
201
|
+
suggestedAgents: this.suggestAgentsForTodos(largestGroup, todos),
|
|
202
|
+
estimatedSpeedup: largestGroup.length * 0.8, // Account for coordination overhead
|
|
203
|
+
confidence: 0.9, // High confidence for independent tasks
|
|
204
|
+
dependencies: [],
|
|
205
|
+
blockers: []
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Detect opportunities to break down complex tasks into specialized agents
|
|
210
|
+
*/
|
|
211
|
+
async detectSpecializedBreakdown(todos, objectiveType) {
|
|
212
|
+
// 🚀 ENHANCED: More intelligent detection of tasks that benefit from specialization
|
|
213
|
+
const canBenefitFromSpecialization = todos.filter(todo => {
|
|
214
|
+
const content = todo.content.toLowerCase();
|
|
215
|
+
// Widget development indicators
|
|
216
|
+
if (content.includes('widget') || content.includes('portal') || content.includes('ui')) {
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
// Development indicators
|
|
220
|
+
if (content.includes('develop') || content.includes('create') || content.includes('build')) {
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
// Multiple component indicators
|
|
224
|
+
if (content.includes('and') || content.includes('with') || content.includes('including')) {
|
|
225
|
+
return true;
|
|
226
|
+
}
|
|
227
|
+
// Complex task indicators
|
|
228
|
+
if (todo.priority === 'high' || todo.priority === 'medium') {
|
|
229
|
+
return true;
|
|
230
|
+
}
|
|
231
|
+
// Any development-related task benefits from specialization
|
|
232
|
+
if (content.includes('test') || content.includes('style') || content.includes('script')) {
|
|
233
|
+
return true;
|
|
234
|
+
}
|
|
235
|
+
return false;
|
|
236
|
+
});
|
|
237
|
+
// 🚀 Be more aggressive - even single development tasks benefit from parallel specialists
|
|
238
|
+
if (canBenefitFromSpecialization.length === 0 && todos.length > 0) {
|
|
239
|
+
// If no specific indicators, but we have todos, still try to parallelize
|
|
240
|
+
canBenefitFromSpecialization.push(...todos.slice(0, Math.min(3, todos.length)));
|
|
241
|
+
}
|
|
242
|
+
if (canBenefitFromSpecialization.length === 0)
|
|
243
|
+
return null;
|
|
244
|
+
// 🚀 ENHANCED: More specialized agent teams with specific roles
|
|
245
|
+
const breakdownMap = {
|
|
246
|
+
'widget': [
|
|
247
|
+
'widget-creator', // HTML structure specialist
|
|
248
|
+
'css-specialist', // Styling and responsive design specialist
|
|
249
|
+
'backend-specialist', // Server script specialist
|
|
250
|
+
'frontend-specialist', // Client script specialist
|
|
251
|
+
'integration-specialist', // API integration specialist
|
|
252
|
+
'ui-ux-specialist', // User experience specialist
|
|
253
|
+
'performance-specialist', // Performance optimization
|
|
254
|
+
'accessibility-specialist', // Accessibility compliance
|
|
255
|
+
'tester' // Testing specialist
|
|
256
|
+
],
|
|
257
|
+
'flow': [
|
|
258
|
+
'flow-builder', // Flow structure specialist
|
|
259
|
+
'trigger-specialist', // Trigger configuration specialist
|
|
260
|
+
'action-specialist', // Action development specialist
|
|
261
|
+
'integration-specialist', // External system integration
|
|
262
|
+
'approval-specialist', // Approval process specialist
|
|
263
|
+
'notification-specialist', // Notification configuration
|
|
264
|
+
'error-handler', // Error handling specialist
|
|
265
|
+
'tester' // Flow testing specialist
|
|
266
|
+
],
|
|
267
|
+
'application': [
|
|
268
|
+
'app-architect', // Application architecture
|
|
269
|
+
'widget-creator', // UI components
|
|
270
|
+
'css-specialist', // Styling specialist
|
|
271
|
+
'flow-builder', // Business logic flows
|
|
272
|
+
'script-writer', // Script includes and business rules
|
|
273
|
+
'security-specialist', // Security implementation
|
|
274
|
+
'integration-specialist', // System integration
|
|
275
|
+
'performance-specialist', // Performance optimization
|
|
276
|
+
'documentation-specialist', // Documentation
|
|
277
|
+
'tester' // Comprehensive testing
|
|
278
|
+
],
|
|
279
|
+
'script': [
|
|
280
|
+
'script-writer', // Core script development
|
|
281
|
+
'api-specialist', // API integration specialist
|
|
282
|
+
'performance-specialist', // Code optimization
|
|
283
|
+
'security-specialist', // Security review
|
|
284
|
+
'documentation-specialist', // Code documentation
|
|
285
|
+
'tester' // Script testing
|
|
286
|
+
],
|
|
287
|
+
'integration': [
|
|
288
|
+
'integration-specialist', // Core integration
|
|
289
|
+
'api-specialist', // API development
|
|
290
|
+
'transform-specialist', // Data transformation
|
|
291
|
+
'error-handler', // Error handling
|
|
292
|
+
'monitoring-specialist', // Integration monitoring
|
|
293
|
+
'security-specialist', // Security implementation
|
|
294
|
+
'tester' // Integration testing
|
|
295
|
+
]
|
|
296
|
+
};
|
|
297
|
+
// Select appropriate specialists based on task
|
|
298
|
+
let suggestedAgents = breakdownMap[objectiveType] || breakdownMap['widget'];
|
|
299
|
+
// 🚀 Limit to reasonable number but ensure good coverage
|
|
300
|
+
const maxSpecialists = Math.min(8, Math.max(4, canBenefitFromSpecialization.length * 2));
|
|
301
|
+
suggestedAgents = suggestedAgents.slice(0, maxSpecialists);
|
|
302
|
+
const todoIds = canBenefitFromSpecialization.map(t => t.id);
|
|
303
|
+
return {
|
|
304
|
+
id: this.generateId('specialized'),
|
|
305
|
+
type: 'specialized_breakdown',
|
|
306
|
+
todos: todoIds,
|
|
307
|
+
suggestedAgents: suggestedAgents,
|
|
308
|
+
estimatedSpeedup: Math.min(3.5, 1.5 + (suggestedAgents.length * 0.3)), // More realistic speedup
|
|
309
|
+
confidence: 0.85, // Higher confidence for specialization benefits
|
|
310
|
+
dependencies: [],
|
|
311
|
+
blockers: []
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Detect load distribution opportunities (same work type, multiple agents)
|
|
316
|
+
*/
|
|
317
|
+
async detectLoadDistribution(todos, currentAgents) {
|
|
318
|
+
// Group todos by capability requirement
|
|
319
|
+
const todoGroups = new Map();
|
|
320
|
+
for (const todo of todos) {
|
|
321
|
+
const capability = this.inferTodoCapability(todo);
|
|
322
|
+
if (!todoGroups.has(capability)) {
|
|
323
|
+
todoGroups.set(capability, []);
|
|
324
|
+
}
|
|
325
|
+
todoGroups.get(capability).push(todo.id);
|
|
326
|
+
}
|
|
327
|
+
// Find groups with multiple todos that can be distributed
|
|
328
|
+
for (const [capability, todoIds] of todoGroups) {
|
|
329
|
+
if (todoIds.length >= 3) { // Worth distributing if 3+ similar tasks
|
|
330
|
+
const agentType = this.capabilityToAgentType(capability);
|
|
331
|
+
return {
|
|
332
|
+
id: this.generateId('load'),
|
|
333
|
+
type: 'load_distribution',
|
|
334
|
+
todos: todoIds,
|
|
335
|
+
suggestedAgents: [agentType, agentType, agentType], // Multiple agents of same type
|
|
336
|
+
estimatedSpeedup: Math.min(todoIds.length, 3) * 0.75, // Account for coordination
|
|
337
|
+
confidence: 0.85,
|
|
338
|
+
dependencies: [],
|
|
339
|
+
blockers: []
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Detect capability split opportunities (different skills for different parts)
|
|
347
|
+
*/
|
|
348
|
+
async detectCapabilitySplit(todos) {
|
|
349
|
+
const capabilityGroups = new Map();
|
|
350
|
+
// Group todos by required capabilities
|
|
351
|
+
for (const todo of todos) {
|
|
352
|
+
const capabilities = this.analyzeTodoCapabilities(todo);
|
|
353
|
+
for (const capability of capabilities) {
|
|
354
|
+
if (!capabilityGroups.has(capability)) {
|
|
355
|
+
capabilityGroups.set(capability, []);
|
|
356
|
+
}
|
|
357
|
+
capabilityGroups.get(capability).push(todo.id);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
// If we have multiple capability groups, we can split
|
|
361
|
+
if (capabilityGroups.size >= 2) {
|
|
362
|
+
const allTodos = Array.from(new Set(Array.from(capabilityGroups.values()).flat()));
|
|
363
|
+
const agentTypes = Array.from(capabilityGroups.keys())
|
|
364
|
+
.map(cap => this.capabilityToAgentType(cap));
|
|
365
|
+
return {
|
|
366
|
+
id: this.generateId('capability'),
|
|
367
|
+
type: 'capability_split',
|
|
368
|
+
todos: allTodos,
|
|
369
|
+
suggestedAgents: agentTypes,
|
|
370
|
+
estimatedSpeedup: 1.8,
|
|
371
|
+
confidence: 0.75,
|
|
372
|
+
dependencies: [],
|
|
373
|
+
blockers: []
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
return null;
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Calculate optimal agent team for execution plan
|
|
380
|
+
*/
|
|
381
|
+
async calculateOptimalTeam(opportunities, todos, maxAgents) {
|
|
382
|
+
const team = [];
|
|
383
|
+
const usedAgentTypes = new Set();
|
|
384
|
+
for (const opportunity of opportunities) {
|
|
385
|
+
for (const agentType of opportunity.suggestedAgents) {
|
|
386
|
+
if (team.length >= maxAgents)
|
|
387
|
+
break;
|
|
388
|
+
// Avoid duplicate agent types unless it's load distribution
|
|
389
|
+
if (usedAgentTypes.has(agentType) && opportunity.type !== 'load_distribution') {
|
|
390
|
+
continue;
|
|
391
|
+
}
|
|
392
|
+
const workload = {
|
|
393
|
+
agentId: 'new', // Will be assigned when spawned
|
|
394
|
+
agentType,
|
|
395
|
+
assignedTodos: opportunity.todos.filter(todoId => this.todoRequiresAgentType(todoId, agentType, todos)),
|
|
396
|
+
estimatedDuration: this.estimateTodoDuration(opportunity.todos, todos),
|
|
397
|
+
utilization: 0.8, // Start at 80% utilization
|
|
398
|
+
capabilities: this.getAgentCapabilities(agentType),
|
|
399
|
+
specializations: this.getAgentSpecializations(agentType, opportunity.type)
|
|
400
|
+
};
|
|
401
|
+
team.push(workload);
|
|
402
|
+
usedAgentTypes.add(agentType);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return team;
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Determine execution strategy based on opportunities and team
|
|
409
|
+
*/
|
|
410
|
+
determineExecutionStrategy(opportunities, agentTeam) {
|
|
411
|
+
const hasIndependent = opportunities.some(o => o.type === 'independent_tasks');
|
|
412
|
+
const hasSpecialized = opportunities.some(o => o.type === 'specialized_breakdown');
|
|
413
|
+
const hasLoadDistribution = opportunities.some(o => o.type === 'load_distribution');
|
|
414
|
+
if (hasIndependent && hasSpecialized) {
|
|
415
|
+
return 'hybrid'; // Mix of parallel and sequential
|
|
416
|
+
}
|
|
417
|
+
else if (hasLoadDistribution) {
|
|
418
|
+
return 'concurrent'; // All agents work simultaneously
|
|
419
|
+
}
|
|
420
|
+
else if (hasSpecialized) {
|
|
421
|
+
return 'pipeline'; // Sequential handoffs between specialists
|
|
422
|
+
}
|
|
423
|
+
else {
|
|
424
|
+
return 'wave_based'; // Waves of parallel execution
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Estimate completion time for agent team
|
|
429
|
+
*/
|
|
430
|
+
estimateCompletionTime(agentTeam, strategy) {
|
|
431
|
+
const coordinationOverhead = agentTeam.length * 2; // 2 minutes per agent for coordination
|
|
432
|
+
switch (strategy) {
|
|
433
|
+
case 'concurrent':
|
|
434
|
+
return Math.max(...agentTeam.map(w => w.estimatedDuration)) + coordinationOverhead;
|
|
435
|
+
case 'pipeline':
|
|
436
|
+
return agentTeam.reduce((sum, w) => sum + w.estimatedDuration, 0) * 0.7 + coordinationOverhead;
|
|
437
|
+
case 'wave_based':
|
|
438
|
+
const avgDuration = agentTeam.reduce((sum, w) => sum + w.estimatedDuration, 0) / agentTeam.length;
|
|
439
|
+
return avgDuration * 1.5 + coordinationOverhead;
|
|
440
|
+
case 'hybrid':
|
|
441
|
+
return agentTeam.reduce((sum, w) => sum + w.estimatedDuration, 0) * 0.6 + coordinationOverhead;
|
|
442
|
+
default:
|
|
443
|
+
return Math.max(...agentTeam.map(w => w.estimatedDuration)) + coordinationOverhead;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Set up coordination between parallel agents
|
|
448
|
+
*/
|
|
449
|
+
async setupParallelCoordination(plan, agents) {
|
|
450
|
+
// Store coordination plan in memory for agents to access
|
|
451
|
+
await this.memory.store(`parallel_coordination_${plan.planId}`, {
|
|
452
|
+
planId: plan.planId,
|
|
453
|
+
strategy: plan.executionStrategy,
|
|
454
|
+
agentTeam: plan.agentTeam,
|
|
455
|
+
sharedContext: {
|
|
456
|
+
objectiveId: plan.planId,
|
|
457
|
+
coordinationMode: 'parallel',
|
|
458
|
+
checkpoints: this.createCoordinationCheckpoints(plan),
|
|
459
|
+
failureRecovery: plan.failureRecovery
|
|
460
|
+
},
|
|
461
|
+
timestamp: new Date().toISOString()
|
|
462
|
+
});
|
|
463
|
+
// Set up shared memory spaces for agent coordination
|
|
464
|
+
for (let i = 0; i < agents.length; i++) {
|
|
465
|
+
const agent = agents[i];
|
|
466
|
+
const workload = plan.agentTeam[i];
|
|
467
|
+
await this.memory.store(`agent_workload_${agent.id}`, {
|
|
468
|
+
agentId: agent.id,
|
|
469
|
+
assignedTodos: workload.assignedTodos,
|
|
470
|
+
specializations: workload.specializations,
|
|
471
|
+
coordinationKey: `parallel_coordination_${plan.planId}`,
|
|
472
|
+
peerAgents: agents.filter(a => a.id !== agent.id).map(a => a.id),
|
|
473
|
+
timestamp: new Date().toISOString()
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* Utility methods
|
|
479
|
+
*/
|
|
480
|
+
areTasksIndependent(todo1, todo2) {
|
|
481
|
+
// Check if tasks have no direct dependencies
|
|
482
|
+
const todo1Keywords = todo1.content.toLowerCase().split(' ');
|
|
483
|
+
const todo2Keywords = todo2.content.toLowerCase().split(' ');
|
|
484
|
+
// Tasks are independent if they don't share critical keywords
|
|
485
|
+
const sharedCriticalKeywords = ['deploy', 'test', 'validate', 'create table', 'configure'].filter(keyword => todo1.content.toLowerCase().includes(keyword) && todo2.content.toLowerCase().includes(keyword));
|
|
486
|
+
return sharedCriticalKeywords.length === 0;
|
|
487
|
+
}
|
|
488
|
+
suggestAgentsForTodos(todoIds, todos) {
|
|
489
|
+
const agents = [];
|
|
490
|
+
const todoContents = todoIds.map(id => todos.find(t => t.id === id)?.content || '');
|
|
491
|
+
for (const content of todoContents) {
|
|
492
|
+
const agentType = this.inferBestAgentType(content);
|
|
493
|
+
if (!agents.includes(agentType)) {
|
|
494
|
+
agents.push(agentType);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
return agents;
|
|
498
|
+
}
|
|
499
|
+
inferTodoCapability(todo) {
|
|
500
|
+
const content = todo.content.toLowerCase();
|
|
501
|
+
if (content.includes('widget') || content.includes('template'))
|
|
502
|
+
return 'widget_development';
|
|
503
|
+
if (content.includes('flow') || content.includes('workflow'))
|
|
504
|
+
return 'flow_creation';
|
|
505
|
+
if (content.includes('script') || content.includes('code'))
|
|
506
|
+
return 'scripting';
|
|
507
|
+
if (content.includes('test') || content.includes('validate'))
|
|
508
|
+
return 'testing';
|
|
509
|
+
if (content.includes('deploy') || content.includes('configuration'))
|
|
510
|
+
return 'deployment';
|
|
511
|
+
return 'general_development';
|
|
512
|
+
}
|
|
513
|
+
capabilityToAgentType(capability) {
|
|
514
|
+
const mapping = {
|
|
515
|
+
'widget_development': 'widget-creator',
|
|
516
|
+
'flow_creation': 'flow-builder',
|
|
517
|
+
'scripting': 'script-writer',
|
|
518
|
+
'testing': 'tester',
|
|
519
|
+
'deployment': 'app-architect',
|
|
520
|
+
'general_development': 'script-writer'
|
|
521
|
+
};
|
|
522
|
+
return mapping[capability] || 'script-writer';
|
|
523
|
+
}
|
|
524
|
+
analyzeTodoCapabilities(todo) {
|
|
525
|
+
const content = todo.content.toLowerCase();
|
|
526
|
+
const capabilities = [];
|
|
527
|
+
if (content.includes('widget') || content.includes('ui'))
|
|
528
|
+
capabilities.push('widget_development');
|
|
529
|
+
if (content.includes('script') || content.includes('code'))
|
|
530
|
+
capabilities.push('scripting');
|
|
531
|
+
if (content.includes('flow') || content.includes('workflow'))
|
|
532
|
+
capabilities.push('flow_creation');
|
|
533
|
+
if (content.includes('test') || content.includes('validate'))
|
|
534
|
+
capabilities.push('testing');
|
|
535
|
+
if (content.includes('deploy') || content.includes('install'))
|
|
536
|
+
capabilities.push('deployment');
|
|
537
|
+
if (content.includes('integrate') || content.includes('api'))
|
|
538
|
+
capabilities.push('integration');
|
|
539
|
+
return capabilities.length > 0 ? capabilities : ['general_development'];
|
|
540
|
+
}
|
|
541
|
+
todoRequiresAgentType(todoId, agentType, todos) {
|
|
542
|
+
const todo = todos.find(t => t.id === todoId);
|
|
543
|
+
if (!todo)
|
|
544
|
+
return false;
|
|
545
|
+
const requiredType = this.inferBestAgentType(todo.content);
|
|
546
|
+
return requiredType === agentType;
|
|
547
|
+
}
|
|
548
|
+
inferBestAgentType(content) {
|
|
549
|
+
const lower = content.toLowerCase();
|
|
550
|
+
if (lower.includes('widget') || lower.includes('template'))
|
|
551
|
+
return 'widget-creator';
|
|
552
|
+
if (lower.includes('flow') || lower.includes('workflow'))
|
|
553
|
+
return 'flow-builder';
|
|
554
|
+
if (lower.includes('script') || lower.includes('business rule'))
|
|
555
|
+
return 'script-writer';
|
|
556
|
+
if (lower.includes('test') || lower.includes('validate'))
|
|
557
|
+
return 'tester';
|
|
558
|
+
if (lower.includes('integrate') || lower.includes('api'))
|
|
559
|
+
return 'integration-specialist';
|
|
560
|
+
if (lower.includes('catalog') || lower.includes('item'))
|
|
561
|
+
return 'catalog-manager';
|
|
562
|
+
if (lower.includes('research') || lower.includes('analyze'))
|
|
563
|
+
return 'researcher';
|
|
564
|
+
return 'script-writer';
|
|
565
|
+
}
|
|
566
|
+
estimateTodoDuration(todoIds, todos) {
|
|
567
|
+
let totalDuration = 0;
|
|
568
|
+
for (const todoId of todoIds) {
|
|
569
|
+
const todo = todos.find(t => t.id === todoId);
|
|
570
|
+
if (!todo)
|
|
571
|
+
continue;
|
|
572
|
+
// Estimate based on content complexity
|
|
573
|
+
const words = todo.content.split(' ').length;
|
|
574
|
+
const baseDuration = 15; // 15 minutes base
|
|
575
|
+
const complexityMultiplier = todo.priority === 'high' ? 1.5 : 1.0;
|
|
576
|
+
totalDuration += baseDuration + (words * 2) * complexityMultiplier;
|
|
577
|
+
}
|
|
578
|
+
return Math.max(10, totalDuration); // Minimum 10 minutes
|
|
579
|
+
}
|
|
580
|
+
getAgentCapabilities(agentType) {
|
|
581
|
+
const capabilityMap = {
|
|
582
|
+
'widget-creator': ['html_generation', 'css_styling', 'javascript_development'],
|
|
583
|
+
'flow-builder': ['flow_design', 'trigger_configuration', 'action_creation'],
|
|
584
|
+
'script-writer': ['glide_scripting', 'business_logic', 'error_handling'],
|
|
585
|
+
'app-architect': ['system_design', 'architecture_planning', 'integration'],
|
|
586
|
+
'integration-specialist': ['rest_api', 'soap_services', 'data_transformation'],
|
|
587
|
+
'catalog-manager': ['catalog_creation', 'variable_management', 'workflow_linking'],
|
|
588
|
+
'researcher': ['requirement__analysis', 'feasibility_study', 'solution_research'],
|
|
589
|
+
'tester': ['test_planning', 'test_execution', 'mock_data_creation']
|
|
590
|
+
};
|
|
591
|
+
return capabilityMap[agentType] || ['general_development'];
|
|
592
|
+
}
|
|
593
|
+
getAgentSpecializations(agentType, opportunityType) {
|
|
594
|
+
const specializationMap = {
|
|
595
|
+
'independent_tasks': {
|
|
596
|
+
'widget-creator': ['parallel_ui_development', 'component_isolation'],
|
|
597
|
+
'script-writer': ['parallel_scripting', 'independent_logic'],
|
|
598
|
+
'tester': ['parallel_testing', 'test_isolation']
|
|
599
|
+
},
|
|
600
|
+
'specialized_breakdown': {
|
|
601
|
+
'widget-creator': ['ui_specialist', 'template_expert'],
|
|
602
|
+
'script-writer': ['logic_specialist', 'performance_expert'],
|
|
603
|
+
'flow-builder': ['workflow_specialist', 'integration_expert']
|
|
604
|
+
},
|
|
605
|
+
'load_distribution': {
|
|
606
|
+
'widget-creator': ['high_throughput_ui', 'batch_processing'],
|
|
607
|
+
'script-writer': ['concurrent_scripting', 'load_handling'],
|
|
608
|
+
'tester': ['bulk_testing', 'parallel_validation']
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
return specializationMap[opportunityType]?.[agentType] || ['general_specialist'];
|
|
612
|
+
}
|
|
613
|
+
determineAgentSpecialization(workload) {
|
|
614
|
+
return workload.specializations[0] || 'general';
|
|
615
|
+
}
|
|
616
|
+
createCoordinationCheckpoints(plan) {
|
|
617
|
+
return [
|
|
618
|
+
'initialization_complete',
|
|
619
|
+
'halfway_milestone',
|
|
620
|
+
'integration_ready',
|
|
621
|
+
'testing_phase',
|
|
622
|
+
'deployment_ready'
|
|
623
|
+
];
|
|
624
|
+
}
|
|
625
|
+
async storeOpportunities(todos, opportunities) {
|
|
626
|
+
await this.memory.store(`parallelization_analysis_${Date.now()}`, {
|
|
627
|
+
todoCount: todos.length,
|
|
628
|
+
opportunitiesFound: opportunities.length,
|
|
629
|
+
opportunities: opportunities.map(opp => ({
|
|
630
|
+
type: opp.type,
|
|
631
|
+
confidence: opp.confidence,
|
|
632
|
+
estimatedSpeedup: opp.estimatedSpeedup,
|
|
633
|
+
agentCount: opp.suggestedAgents.length
|
|
634
|
+
})),
|
|
635
|
+
timestamp: new Date().toISOString()
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
setupLearningSystem() {
|
|
639
|
+
this.on('parallel_execution_completed', async (data) => {
|
|
640
|
+
// Store execution results for learning
|
|
641
|
+
this.parallelizationHistory.set(data.planId, {
|
|
642
|
+
success: data.success,
|
|
643
|
+
speedup: data.actualSpeedup
|
|
644
|
+
});
|
|
645
|
+
await this.memory.store(`execution_result_${data.planId}`, {
|
|
646
|
+
planId: data.planId,
|
|
647
|
+
actualSpeedup: data.actualSpeedup,
|
|
648
|
+
success: data.success,
|
|
649
|
+
timestamp: new Date().toISOString()
|
|
650
|
+
});
|
|
651
|
+
});
|
|
652
|
+
}
|
|
653
|
+
initializeCapabilityMap() {
|
|
654
|
+
this.capabilityMap = {
|
|
655
|
+
'widget.*template': {
|
|
656
|
+
primaryCapability: 'template_development',
|
|
657
|
+
requiredAgentTypes: ['widget-creator'],
|
|
658
|
+
parallelizable: true,
|
|
659
|
+
estimatedDuration: 20,
|
|
660
|
+
dependencies: []
|
|
661
|
+
},
|
|
662
|
+
'server.*script': {
|
|
663
|
+
primaryCapability: 'server_development',
|
|
664
|
+
requiredAgentTypes: ['script-writer'],
|
|
665
|
+
parallelizable: true,
|
|
666
|
+
estimatedDuration: 25,
|
|
667
|
+
dependencies: ['template_development']
|
|
668
|
+
},
|
|
669
|
+
'client.*script': {
|
|
670
|
+
primaryCapability: 'client_development',
|
|
671
|
+
requiredAgentTypes: ['script-writer'],
|
|
672
|
+
parallelizable: true,
|
|
673
|
+
estimatedDuration: 20,
|
|
674
|
+
dependencies: ['template_development']
|
|
675
|
+
},
|
|
676
|
+
'css.*style': {
|
|
677
|
+
primaryCapability: 'styling',
|
|
678
|
+
requiredAgentTypes: ['widget-creator'],
|
|
679
|
+
parallelizable: true,
|
|
680
|
+
estimatedDuration: 15,
|
|
681
|
+
dependencies: ['template_development']
|
|
682
|
+
},
|
|
683
|
+
'test.*validate': {
|
|
684
|
+
primaryCapability: 'testing',
|
|
685
|
+
requiredAgentTypes: ['tester'],
|
|
686
|
+
parallelizable: false,
|
|
687
|
+
estimatedDuration: 30,
|
|
688
|
+
dependencies: ['server_development', 'client_development', 'styling']
|
|
689
|
+
},
|
|
690
|
+
'deploy': {
|
|
691
|
+
primaryCapability: 'deployment',
|
|
692
|
+
requiredAgentTypes: ['app-architect'],
|
|
693
|
+
parallelizable: false,
|
|
694
|
+
estimatedDuration: 10,
|
|
695
|
+
dependencies: ['testing']
|
|
696
|
+
}
|
|
697
|
+
};
|
|
698
|
+
}
|
|
699
|
+
generateId(prefix) {
|
|
700
|
+
return `${prefix}_${Date.now()}_${crypto.randomBytes(4).toString('hex')}`;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
exports.ParallelAgentEngine = ParallelAgentEngine;
|
|
704
|
+
//# sourceMappingURL=parallel-agent-engine.js.map
|