snow-flow 1.4.6 โ 1.4.7
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/.husky/pre-commit +4 -0
- package/.releaserc.json +47 -0
- package/LICENSE +1 -1
- package/dist/agents/base-agent.d.ts +1 -1
- package/dist/agents/base-agent.d.ts.map +1 -1
- package/dist/agents/base-agent.js +2 -1
- package/dist/agents/base-agent.js.map +1 -1
- package/dist/agents/coordinator.d.ts.map +1 -1
- package/dist/agents/coordinator.js +5 -2
- package/dist/agents/coordinator.js.map +1 -1
- package/dist/agents/index.d.ts +0 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +1 -0
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/queen-403-handler.d.ts +2 -2
- package/dist/agents/queen-403-handler.d.ts.map +1 -1
- package/dist/agents/queen-403-handler.js +3 -2
- package/dist/agents/queen-403-handler.js.map +1 -1
- package/dist/agents/queen-agent.d.ts +4 -0
- package/dist/agents/queen-agent.d.ts.map +1 -1
- package/dist/agents/queen-agent.js +137 -34
- package/dist/agents/queen-agent.js.map +1 -1
- package/dist/agents/script-writer-agent.js +1 -0
- package/dist/agents/security-agent.js +28 -27
- package/dist/agents/security-agent.js.map +1 -1
- package/dist/agents/widget-creator-agent.d.ts.map +1 -1
- package/dist/agents/widget-creator-agent.js +121 -62
- package/dist/agents/widget-creator-agent.js.map +1 -1
- package/dist/api/error-handling.d.ts +112 -1
- package/dist/api/error-handling.d.ts.map +1 -1
- package/dist/api/error-handling.js +2 -1
- package/dist/api/error-handling.js.map +1 -1
- package/dist/api/natural-language-mapper.d.ts +3 -5
- package/dist/api/natural-language-mapper.d.ts.map +1 -1
- package/dist/api/natural-language-mapper.js +1 -0
- package/dist/api/natural-language-mapper.js.map +1 -1
- package/dist/api/performance-optimizer.d.ts.map +1 -1
- package/dist/api/performance-optimizer.js +1 -0
- package/dist/api/performance-optimizer.js.map +1 -1
- package/dist/api/transaction-manager.js +1 -0
- package/dist/cli/deploy-artifact.js +1 -0
- package/dist/cli/snow-flow-cli-integration.d.ts.map +1 -1
- package/dist/cli/snow-flow-cli-integration.js +1 -0
- package/dist/cli/snow-flow-cli-integration.js.map +1 -1
- package/dist/cli.js +10 -9
- package/dist/cli.js.map +1 -1
- package/dist/compliance/advanced-compliance-system.d.ts +316 -0
- package/dist/compliance/advanced-compliance-system.d.ts.map +1 -0
- package/dist/compliance/advanced-compliance-system.js +1 -0
- package/dist/compliance/advanced-compliance-system.js.map +1 -0
- package/dist/compliance/index.d.ts +6 -0
- package/dist/compliance/index.d.ts.map +1 -0
- package/dist/compliance/index.js +1 -0
- package/dist/compliance/index.js.map +1 -0
- package/dist/config/snow-flow-config.d.ts +279 -241
- package/dist/config/snow-flow-config.d.ts.map +1 -1
- package/dist/config/snow-flow-config.js +1 -0
- package/dist/config/snow-flow-config.js.map +1 -1
- package/dist/documentation/index.d.ts +6 -0
- package/dist/documentation/index.d.ts.map +1 -0
- package/dist/documentation/index.js +1 -0
- package/dist/documentation/index.js.map +1 -0
- package/dist/documentation/self-documenting-system.d.ts +287 -0
- package/dist/documentation/self-documenting-system.d.ts.map +1 -0
- package/dist/documentation/self-documenting-system.js +38 -37
- package/dist/documentation/self-documenting-system.js.map +1 -0
- package/dist/healing/index.d.ts +6 -0
- package/dist/healing/index.d.ts.map +1 -0
- package/dist/healing/index.js +1 -0
- package/dist/healing/index.js.map +1 -0
- package/dist/healing/self-healing-system.d.ts +315 -0
- package/dist/healing/self-healing-system.d.ts.map +1 -0
- package/dist/healing/self-healing-system.js +1 -0
- package/dist/healing/self-healing-system.js.map +1 -0
- package/dist/health/system-health.d.ts +34 -0
- package/dist/health/system-health.d.ts.map +1 -1
- package/dist/health/system-health.js +1 -0
- package/dist/health/system-health.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/intelligence/acl-analyzer.d.ts +1 -1
- package/dist/intelligence/acl-analyzer.d.ts.map +1 -1
- package/dist/intelligence/acl-analyzer.js +4 -3
- package/dist/intelligence/acl-analyzer.js.map +1 -1
- package/dist/intelligence/auto-resolution-engine.js +1 -0
- package/dist/intelligence/auto-resolution-engine.js.map +1 -1
- package/dist/intelligence/gap-analysis-engine.d.ts +3 -3
- package/dist/intelligence/gap-analysis-engine.js +14 -13
- package/dist/intelligence/gap-analysis-engine.js.map +1 -1
- package/dist/intelligence/manual-instructions-generator.d.ts +1 -1
- package/dist/intelligence/manual-instructions-generator.d.ts.map +1 -1
- package/dist/intelligence/manual-instructions-generator.js +2 -1
- package/dist/intelligence/manual-instructions-generator.js.map +1 -1
- package/dist/intelligence/mcp-coverage-analyzer.js +4 -3
- package/dist/intelligence/mcp-coverage-analyzer.js.map +1 -1
- 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 +13 -12
- 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 +5 -4
- package/dist/intelligence/performance-recommendations-engine.js.map +1 -0
- package/dist/intelligence/requirements-analyzer.d.ts +1 -1
- package/dist/intelligence/requirements-analyzer.d.ts.map +1 -1
- package/dist/intelligence/requirements-analyzer.js +4 -3
- package/dist/intelligence/requirements-analyzer.js.map +1 -1
- package/dist/intelligence/task-analyzer.d.ts +2 -2
- package/dist/intelligence/task-analyzer.d.ts.map +1 -1
- package/dist/intelligence/task-analyzer.js +40 -39
- package/dist/intelligence/task-analyzer.js.map +1 -1
- package/dist/managers/scope-manager.d.ts.map +1 -1
- package/dist/managers/scope-manager.js +2 -1
- package/dist/managers/scope-manager.js.map +1 -1
- package/dist/mcp/base-mcp-server.d.ts +26 -2
- package/dist/mcp/base-mcp-server.d.ts.map +1 -1
- package/dist/mcp/base-mcp-server.js +2 -1
- package/dist/mcp/base-mcp-server.js.map +1 -1
- package/dist/mcp/http-transport-wrapper.d.ts +1 -0
- package/dist/mcp/http-transport-wrapper.d.ts.map +1 -1
- package/dist/mcp/http-transport-wrapper.js +1 -0
- package/dist/mcp/http-transport-wrapper.js.map +1 -1
- package/dist/mcp/service-discovery-client.js +1 -0
- package/dist/mcp/servicenow-automation-mcp-refactored.d.ts.map +1 -1
- package/dist/mcp/servicenow-automation-mcp-refactored.js +1 -1
- package/dist/mcp/servicenow-automation-mcp-refactored.js.map +1 -1
- package/dist/mcp/servicenow-automation-mcp.js +1 -0
- package/dist/mcp/servicenow-deployment-mcp-refactored.d.ts +5 -0
- package/dist/mcp/servicenow-deployment-mcp-refactored.d.ts.map +1 -1
- package/dist/mcp/servicenow-deployment-mcp-refactored.js +1 -0
- package/dist/mcp/servicenow-deployment-mcp-refactored.js.map +1 -1
- package/dist/mcp/servicenow-deployment-mcp.js +500 -131
- package/dist/mcp/servicenow-deployment-mcp.js.map +1 -1
- package/dist/mcp/servicenow-graph-memory-mcp-refactored.js +5 -4
- package/dist/mcp/servicenow-graph-memory-mcp-refactored.js.map +1 -1
- package/dist/mcp/servicenow-graph-memory-mcp.js +6 -5
- package/dist/mcp/servicenow-graph-memory-mcp.js.map +1 -1
- package/dist/mcp/servicenow-integration-mcp-refactored.d.ts.map +1 -1
- package/dist/mcp/servicenow-integration-mcp-refactored.js +1 -0
- package/dist/mcp/servicenow-integration-mcp-refactored.js.map +1 -1
- package/dist/mcp/servicenow-integration-mcp.js +1 -0
- package/dist/mcp/servicenow-intelligent-mcp-refactored.js +24 -23
- package/dist/mcp/servicenow-intelligent-mcp-refactored.js.map +1 -1
- package/dist/mcp/servicenow-intelligent-mcp.d.ts +38 -1
- package/dist/mcp/servicenow-intelligent-mcp.d.ts.map +1 -1
- package/dist/mcp/servicenow-intelligent-mcp.js +35 -34
- package/dist/mcp/servicenow-intelligent-mcp.js.map +1 -1
- package/dist/mcp/servicenow-mcp-server.js +1 -0
- package/dist/mcp/servicenow-memory-mcp.d.ts +5 -4
- package/dist/mcp/servicenow-memory-mcp.d.ts.map +1 -1
- package/dist/mcp/servicenow-memory-mcp.js +1 -0
- package/dist/mcp/servicenow-memory-mcp.js.map +1 -1
- package/dist/mcp/servicenow-operations-mcp-refactored.d.ts +1 -1
- package/dist/mcp/servicenow-operations-mcp-refactored.d.ts.map +1 -1
- package/dist/mcp/servicenow-operations-mcp-refactored.js +34 -33
- package/dist/mcp/servicenow-operations-mcp-refactored.js.map +1 -1
- package/dist/mcp/servicenow-operations-mcp.d.ts +1 -1
- package/dist/mcp/servicenow-operations-mcp.js +68 -67
- package/dist/mcp/servicenow-operations-mcp.js.map +1 -1
- package/dist/mcp/servicenow-platform-development-mcp-refactored.js +1 -0
- package/dist/mcp/servicenow-platform-development-mcp.js +2 -1
- package/dist/mcp/servicenow-platform-development-mcp.js.map +1 -1
- package/dist/mcp/servicenow-progressive-indexer.js +1 -0
- package/dist/mcp/servicenow-reporting-analytics-mcp-refactored.d.ts.map +1 -1
- package/dist/mcp/servicenow-reporting-analytics-mcp-refactored.js +6 -5
- package/dist/mcp/servicenow-reporting-analytics-mcp-refactored.js.map +1 -1
- package/dist/mcp/servicenow-reporting-analytics-mcp.js +9 -8
- package/dist/mcp/servicenow-reporting-analytics-mcp.js.map +1 -1
- package/dist/mcp/servicenow-security-compliance-mcp-refactored.js +3 -2
- package/dist/mcp/servicenow-security-compliance-mcp-refactored.js.map +1 -1
- package/dist/mcp/servicenow-security-compliance-mcp.js +6 -5
- package/dist/mcp/servicenow-security-compliance-mcp.js.map +1 -1
- package/dist/mcp/servicenow-update-set-mcp-refactored.d.ts.map +1 -1
- package/dist/mcp/servicenow-update-set-mcp-refactored.js +1 -0
- package/dist/mcp/servicenow-update-set-mcp-refactored.js.map +1 -1
- package/dist/mcp/servicenow-update-set-mcp.js +1 -0
- package/dist/mcp/servicenow-update-set-mcp.js.map +1 -1
- package/dist/mcp/servicenow-xml-flow-mcp.d.ts +53 -0
- package/dist/mcp/servicenow-xml-flow-mcp.d.ts.map +1 -0
- package/dist/mcp/servicenow-xml-flow-mcp.js +14 -13
- package/dist/mcp/servicenow-xml-flow-mcp.js.map +1 -0
- package/dist/mcp/shared/agent-context-provider.js +1 -0
- package/dist/mcp/shared/base-mcp-server.d.ts +142 -0
- package/dist/mcp/shared/base-mcp-server.d.ts.map +1 -1
- package/dist/mcp/shared/base-mcp-server.js +5 -4
- package/dist/mcp/shared/base-mcp-server.js.map +1 -1
- package/dist/mcp/shared/mcp-memory-manager.js +1 -0
- package/dist/mcp/shared/mcp-resource-manager.d.ts +99 -0
- package/dist/mcp/shared/mcp-resource-manager.d.ts.map +1 -0
- package/dist/mcp/shared/mcp-resource-manager.js +1 -0
- package/dist/mcp/shared/mcp-resource-manager.js.map +1 -0
- package/dist/mcp/start-all-mcp-servers.js +1 -0
- package/dist/mcp/start-servicenow-mcp.js +1 -0
- package/dist/memory/hierarchical-memory-system.d.ts +90 -0
- package/dist/memory/hierarchical-memory-system.d.ts.map +1 -0
- package/dist/memory/hierarchical-memory-system.js +1 -0
- package/dist/memory/hierarchical-memory-system.js.map +1 -0
- package/dist/memory/index.js +1 -0
- package/dist/memory/memory-client.d.ts +11 -1
- package/dist/memory/memory-client.d.ts.map +1 -1
- package/dist/memory/memory-client.js +1 -0
- package/dist/memory/memory-client.js.map +1 -1
- package/dist/memory/memory-operations.d.ts +12 -3
- package/dist/memory/memory-operations.d.ts.map +1 -1
- package/dist/memory/memory-operations.js +1 -0
- package/dist/memory/memory-operations.js.map +1 -1
- package/dist/memory/memory-system.d.ts +41 -7
- package/dist/memory/memory-system.d.ts.map +1 -1
- package/dist/memory/memory-system.js +1 -0
- package/dist/memory/memory-system.js.map +1 -1
- package/dist/memory/servicenow-artifact-indexer.js +1 -0
- package/dist/memory/snow-flow-memory-patterns.d.ts +213 -0
- package/dist/memory/snow-flow-memory-patterns.d.ts.map +1 -0
- package/dist/memory/snow-flow-memory-patterns.js +1 -0
- package/dist/memory/snow-flow-memory-patterns.js.map +1 -0
- package/dist/memory/swarm-memory.js +1 -0
- package/dist/monitoring/enhanced-monitoring-system.d.ts +172 -0
- package/dist/monitoring/enhanced-monitoring-system.d.ts.map +1 -0
- package/dist/monitoring/enhanced-monitoring-system.js +2 -1
- package/dist/monitoring/enhanced-monitoring-system.js.map +1 -0
- package/dist/monitoring/performance-tracker.d.ts.map +1 -1
- package/dist/monitoring/performance-tracker.js +1 -0
- package/dist/optimization/cost-optimization-engine.d.ts +271 -0
- package/dist/optimization/cost-optimization-engine.d.ts.map +1 -0
- package/dist/optimization/cost-optimization-engine.js +3 -2
- package/dist/optimization/cost-optimization-engine.js.map +1 -0
- package/dist/optimization/index.d.ts +5 -0
- package/dist/optimization/index.d.ts.map +1 -0
- package/dist/optimization/index.js +1 -0
- package/dist/optimization/index.js.map +1 -0
- package/dist/queen/agent-factory.d.ts.map +1 -1
- package/dist/queen/agent-factory.js +18 -3
- package/dist/queen/agent-factory.js.map +1 -1
- package/dist/queen/index.js +1 -0
- package/dist/queen/mcp-execution-bridge.d.ts +4 -0
- package/dist/queen/mcp-execution-bridge.d.ts.map +1 -1
- package/dist/queen/mcp-execution-bridge.js +1 -0
- package/dist/queen/mcp-execution-bridge.js.map +1 -1
- package/dist/queen/neural-learning.d.ts.map +1 -1
- package/dist/queen/neural-learning.js +5 -0
- package/dist/queen/neural-learning.js.map +1 -1
- package/dist/queen/parallel-agent-engine.d.ts +1 -0
- package/dist/queen/parallel-agent-engine.d.ts.map +1 -1
- package/dist/queen/parallel-agent-engine.js +2 -1
- package/dist/queen/parallel-agent-engine.js.map +1 -1
- package/dist/queen/queen-memory-system.d.ts +164 -0
- package/dist/queen/queen-memory-system.d.ts.map +1 -0
- package/dist/queen/queen-memory-system.js +11 -10
- package/dist/queen/queen-memory-system.js.map +1 -0
- package/dist/queen/queen-memory.js +1 -0
- package/dist/queen/servicenow-queen.d.ts +3 -2
- package/dist/queen/servicenow-queen.d.ts.map +1 -1
- package/dist/queen/servicenow-queen.js +20 -19
- package/dist/queen/servicenow-queen.js.map +1 -1
- package/dist/queen/types.d.ts +11 -5
- package/dist/queen/types.d.ts.map +1 -1
- package/dist/queen/types.js +1 -0
- package/dist/rollback/smart-rollback-system.d.ts +350 -0
- package/dist/rollback/smart-rollback-system.d.ts.map +1 -0
- package/dist/rollback/smart-rollback-system.js +1 -0
- package/dist/rollback/smart-rollback-system.js.map +1 -0
- package/dist/snow-flow-system.d.ts +3 -3
- package/dist/snow-flow-system.d.ts.map +1 -1
- package/dist/snow-flow-system.js +4 -3
- package/dist/snow-flow-system.js.map +1 -1
- package/dist/sparc/sparc-help.d.ts +1 -2
- package/dist/sparc/sparc-help.d.ts.map +1 -1
- package/dist/sparc/sparc-help.js +2 -1
- package/dist/sparc/sparc-help.js.map +1 -1
- package/dist/sparc/team-sparc.d.ts +2 -2
- package/dist/sparc/team-sparc.d.ts.map +1 -1
- package/dist/sparc/team-sparc.js +4 -3
- package/dist/sparc/team-sparc.js.map +1 -1
- package/dist/strategies/global-scope-strategy.js +4 -3
- package/dist/strategies/global-scope-strategy.js.map +1 -1
- package/dist/testing/integration-test-suite.d.ts +303 -0
- package/dist/testing/integration-test-suite.d.ts.map +1 -0
- package/dist/testing/integration-test-suite.js +4 -3
- package/dist/testing/integration-test-suite.js.map +1 -0
- package/dist/types/index.d.ts +2 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/servicenow.types.js +1 -0
- package/dist/types/snow-flow.types.d.ts +1 -1
- package/dist/types/snow-flow.types.d.ts.map +1 -1
- package/dist/types/snow-flow.types.js +1 -0
- package/dist/types/todo.types.js +1 -0
- package/dist/utils/action-type-cache.d.ts.map +1 -1
- package/dist/utils/action-type-cache.js +1 -0
- package/dist/utils/action-type-cache.js.map +1 -1
- package/dist/utils/agent-detector.d.ts +1 -1
- package/dist/utils/agent-detector.d.ts.map +1 -1
- package/dist/utils/agent-detector.js +11 -10
- package/dist/utils/agent-detector.js.map +1 -1
- package/dist/utils/artifact-tracker.js +1 -0
- package/dist/utils/dependency-detector.js +1 -0
- package/dist/utils/deployment-metadata-handler.d.ts +110 -0
- package/dist/utils/deployment-metadata-handler.d.ts.map +1 -0
- package/dist/utils/deployment-metadata-handler.js +1 -0
- package/dist/utils/deployment-metadata-handler.js.map +1 -0
- package/dist/utils/error-recovery.js +1 -0
- package/dist/utils/logger.js +1 -0
- package/dist/utils/mcp-auth-middleware.js +1 -0
- package/dist/utils/mcp-config-manager.d.ts.map +1 -1
- package/dist/utils/mcp-config-manager.js +1 -0
- package/dist/utils/mcp-config-manager.js.map +1 -1
- package/dist/utils/mcp-server-manager.d.ts.map +1 -1
- package/dist/utils/mcp-server-manager.js +1 -0
- package/dist/utils/mcp-server-manager.js.map +1 -1
- package/dist/utils/mcp-tool-registry.d.ts +69 -0
- package/dist/utils/mcp-tool-registry.d.ts.map +1 -0
- package/dist/utils/mcp-tool-registry.js +1 -0
- package/dist/utils/mcp-tool-registry.js.map +1 -0
- package/dist/utils/scope-utils.d.ts +2 -2
- package/dist/utils/scope-utils.d.ts.map +1 -1
- package/dist/utils/scope-utils.js +32 -31
- package/dist/utils/scope-utils.js.map +1 -1
- package/dist/utils/servicenow-client.d.ts +18 -1
- package/dist/utils/servicenow-client.d.ts.map +1 -1
- package/dist/utils/servicenow-client.js +1 -0
- package/dist/utils/servicenow-client.js.map +1 -1
- package/dist/utils/servicenow-id-generator.d.ts +107 -0
- package/dist/utils/servicenow-id-generator.d.ts.map +1 -0
- package/dist/utils/servicenow-id-generator.js +1 -0
- package/dist/utils/servicenow-id-generator.js.map +1 -0
- package/dist/utils/snow-oauth.d.ts +20 -0
- package/dist/utils/snow-oauth.d.ts.map +1 -1
- package/dist/utils/snow-oauth.js +1 -0
- package/dist/utils/snow-oauth.js.map +1 -1
- package/dist/utils/template-engine.js +1 -0
- package/dist/utils/theme-manager.js +1 -0
- package/dist/utils/unified-auth-store.d.ts +55 -0
- package/dist/utils/unified-auth-store.d.ts.map +1 -0
- package/dist/utils/unified-auth-store.js +1 -0
- package/dist/utils/unified-auth-store.js.map +1 -0
- package/dist/utils/update-set-importer.d.ts +72 -0
- package/dist/utils/update-set-importer.d.ts.map +1 -0
- package/dist/utils/update-set-importer.js +1 -0
- package/dist/utils/update-set-importer.js.map +1 -0
- package/dist/utils/update-set-xml-packager.d.ts +85 -0
- package/dist/utils/update-set-xml-packager.d.ts.map +1 -0
- package/dist/utils/update-set-xml-packager.js +1 -0
- package/dist/utils/update-set-xml-packager.js.map +1 -0
- package/dist/utils/widget-template-generator.d.ts +82 -0
- package/dist/utils/widget-template-generator.d.ts.map +1 -0
- package/dist/utils/widget-template-generator.js +1 -0
- package/dist/utils/widget-template-generator.js.map +1 -0
- package/dist/version.d.ts +28 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +29 -19
- package/dist/version.js.map +1 -1
- package/package.json +20 -2
- package/COMMIT_MESSAGE.txt +0 -31
- package/action-v2-implementation.js +0 -338
- package/create-snow-flow-env.sh +0 -32
- package/decode-action-values.js +0 -164
- package/npm-publish-summary.txt +0 -35
- package/snow-flow-claude-md-template.txt +0 -262
- package/test-config.js +0 -55
- package/test-flow-fix.js +0 -92
- package/test-parallel-agents.js +0 -177
- package/test-queen-workflow.js +0 -184
- package/test-real-monitoring.js +0 -184
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
# Snow-Flow Development with Claude Code
|
|
2
|
-
|
|
3
|
-
## ๐จ CRITICAL: MCP-FIRST WORKFLOW (READ THIS FIRST!)
|
|
4
|
-
|
|
5
|
-
**Snow-flow's core value is REAL ServiceNow integration through MCP tools. NEVER work in offline mode!**
|
|
6
|
-
|
|
7
|
-
### โ ๏ธ MANDATORY WORKFLOW - NO EXCEPTIONS
|
|
8
|
-
|
|
9
|
-
**Every ServiceNow task MUST start with this sequence:**
|
|
10
|
-
|
|
11
|
-
```javascript
|
|
12
|
-
// 1. MANDATORY: Pre-flight authentication check
|
|
13
|
-
const authCheck = await snow_validate_live_connection({ test_level: "permissions" });
|
|
14
|
-
if (!authCheck.success) {
|
|
15
|
-
// STOP! Fix authentication first
|
|
16
|
-
return authenticationError(authCheck.error);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// 2. MANDATORY: Discovery before creation
|
|
20
|
-
const discovery = await snow_find_artifact({
|
|
21
|
-
query: "your objective",
|
|
22
|
-
type: "widget|flow|script|any"
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// 3. MANDATORY: Real ServiceNow deployment
|
|
26
|
-
const deployment = await snow_deploy({
|
|
27
|
-
type: "widget|application", // Note: flow removed in v1.4.0+
|
|
28
|
-
config: { /* your config */ },
|
|
29
|
-
auto_update_set: true // Always track changes
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// 4. MANDATORY: Track in Update Set
|
|
33
|
-
await snow_update_set_add_artifact({
|
|
34
|
-
type: deployment.type,
|
|
35
|
-
sys_id: deployment.result.sys_id,
|
|
36
|
-
name: deployment.result.name
|
|
37
|
-
});
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
### ๐ซ FORBIDDEN ACTIONS
|
|
41
|
-
|
|
42
|
-
**THESE ACTIONS ARE BANNED - NEVER DO THESE:**
|
|
43
|
-
|
|
44
|
-
โ **Creating local files** without MCP check first
|
|
45
|
-
โ **Generating mock data** instead of using MCP tools
|
|
46
|
-
โ **Working in "offline mode"** when ServiceNow is available
|
|
47
|
-
โ **Skipping authentication validation**
|
|
48
|
-
โ **Planning mode** without trying MCP tools first
|
|
49
|
-
|
|
50
|
-
### โ
CORRECT: MCP-First Decision Tree
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
User Request โ ALWAYS START HERE:
|
|
54
|
-
โ
|
|
55
|
-
1. snow_validate_live_connection()
|
|
56
|
-
โ
|
|
57
|
-
SUCCESS? โ Continue to Step 2
|
|
58
|
-
โ
|
|
59
|
-
FAILURE? โ Fix auth: snow_auth_diagnostics()
|
|
60
|
-
Then guide user: "snow-flow auth login"
|
|
61
|
-
STOP until auth works
|
|
62
|
-
โ
|
|
63
|
-
2. snow_find_artifact() // Check if exists
|
|
64
|
-
โ
|
|
65
|
-
FOUND? โ Ask: "Reuse existing or create new?"
|
|
66
|
-
โ
|
|
67
|
-
NOT FOUND? โ Continue to Step 3
|
|
68
|
-
โ
|
|
69
|
-
3. snow_deploy() // Real deployment to ServiceNow
|
|
70
|
-
โ
|
|
71
|
-
SUCCESS? โ Step 4: Track in Update Set
|
|
72
|
-
โ
|
|
73
|
-
FAILURE? โ Use fallback strategies
|
|
74
|
-
โ
|
|
75
|
-
4. snow_update_set_add_artifact() // Always track
|
|
76
|
-
โ
|
|
77
|
-
DONE! โ
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## ๐ Snow-Flow Swarm Command - MCP-Orchestrated Multi-Agent Intelligence
|
|
81
|
-
|
|
82
|
-
**The Swarm system is MCP-native and ALWAYS uses ServiceNow tools first!**
|
|
83
|
-
|
|
84
|
-
### ๐ง Queen Agent with Parallel Execution (v1.4.0+)
|
|
85
|
-
- Automatically spawns 6+ specialized agents for widget development
|
|
86
|
-
- Achieves proven 2.8x speedup through intelligent parallel execution
|
|
87
|
-
- All agents coordinate through Snow-Flow's memory system
|
|
88
|
-
- Every agent uses MCP tools directly - no offline mode
|
|
89
|
-
|
|
90
|
-
### Swarm Command Examples
|
|
91
|
-
```bash
|
|
92
|
-
# Simple widget creation
|
|
93
|
-
snow-flow swarm "create incident dashboard widget"
|
|
94
|
-
|
|
95
|
-
# Complex development
|
|
96
|
-
snow-flow swarm "build employee onboarding portal with approval workflows"
|
|
97
|
-
|
|
98
|
-
# With specific options
|
|
99
|
-
snow-flow swarm "create service catalog item" --no-auto-deploy --monitor
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## ๐ ๏ธ Complete ServiceNow MCP Tools Reference
|
|
103
|
-
|
|
104
|
-
### Discovery & Search Tools
|
|
105
|
-
```javascript
|
|
106
|
-
// Find any ServiceNow artifact using natural language
|
|
107
|
-
snow_find_artifact({
|
|
108
|
-
query: "the widget that shows incidents on homepage",
|
|
109
|
-
type: "widget" // or "flow", "script", "application", "any"
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
// Search catalog items with fuzzy matching
|
|
113
|
-
snow_catalog_item_search({
|
|
114
|
-
query: "laptop",
|
|
115
|
-
fuzzy_match: true, // Finds variations: notebook, MacBook, etc.
|
|
116
|
-
include_variables: true // Include catalog variables
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
// Comprehensive search across all tables
|
|
120
|
-
snow_comprehensive_search({
|
|
121
|
-
query: "approval",
|
|
122
|
-
include_inactive: false
|
|
123
|
-
});
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Deployment Tools
|
|
127
|
-
```javascript
|
|
128
|
-
// Universal deployment tool
|
|
129
|
-
snow_deploy({
|
|
130
|
-
type: "widget",
|
|
131
|
-
config: {
|
|
132
|
-
name: "Incident Dashboard",
|
|
133
|
-
template: "<html>...</html>",
|
|
134
|
-
css: "/* styles */",
|
|
135
|
-
server_script: "// server code",
|
|
136
|
-
client_script: "// client code"
|
|
137
|
-
},
|
|
138
|
-
auto_update_set: true
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
// Bulk deployment
|
|
142
|
-
snow_bulk_deploy({
|
|
143
|
-
artifacts: [...],
|
|
144
|
-
transaction_mode: true,
|
|
145
|
-
rollback_on_error: true
|
|
146
|
-
});
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Update Set Management
|
|
150
|
-
```javascript
|
|
151
|
-
// Ensure active Update Set
|
|
152
|
-
snow_ensure_active_update_set({
|
|
153
|
-
context: "Widget development"
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
// Track artifacts
|
|
157
|
-
snow_update_set_add_artifact({
|
|
158
|
-
type: "widget",
|
|
159
|
-
sys_id: "abc123",
|
|
160
|
-
name: "My Widget"
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
// Preview changes
|
|
164
|
-
snow_update_set_preview({
|
|
165
|
-
update_set_id: "current"
|
|
166
|
-
});
|
|
167
|
-
```
|
|
168
|
-
|
|
169
|
-
### Testing Tools
|
|
170
|
-
```javascript
|
|
171
|
-
// Test flows with mock data
|
|
172
|
-
snow_test_flow_with_mock({
|
|
173
|
-
flow_id: "equipment_provisioning_flow",
|
|
174
|
-
create_test_user: true,
|
|
175
|
-
mock_catalog_items: true,
|
|
176
|
-
simulate_approvals: true,
|
|
177
|
-
cleanup_after_test: true
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
// Link catalog to flow
|
|
181
|
-
snow_link_catalog_to_flow({
|
|
182
|
-
catalog_item_id: "iPhone 6S",
|
|
183
|
-
flow_id: "mobile_provisioning_flow",
|
|
184
|
-
test_link: true
|
|
185
|
-
});
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
## ๐ Essential Patterns
|
|
189
|
-
|
|
190
|
-
### Authentication Handling
|
|
191
|
-
```javascript
|
|
192
|
-
// Always handle auth failures gracefully
|
|
193
|
-
if (error.includes('401') || error.includes('403')) {
|
|
194
|
-
// Guide user to fix authentication
|
|
195
|
-
console.log('Run: snow-flow auth login');
|
|
196
|
-
console.log('Check .env file for credentials');
|
|
197
|
-
// STOP - don't continue without auth
|
|
198
|
-
}
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
### Error Recovery
|
|
202
|
-
```javascript
|
|
203
|
-
// Implement fallback strategies
|
|
204
|
-
if (deployment.failed) {
|
|
205
|
-
// Try global scope
|
|
206
|
-
const globalAttempt = await snow_deploy({
|
|
207
|
-
...config,
|
|
208
|
-
scope_preference: 'global'
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
if (globalAttempt.failed) {
|
|
212
|
-
// Provide manual instructions
|
|
213
|
-
return createManualStepsGuide(config, error);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
## ๐ง Configuration
|
|
219
|
-
|
|
220
|
-
### Build Commands
|
|
221
|
-
- `npm run build`: Build the project
|
|
222
|
-
- `npm run test`: Run the full test suite
|
|
223
|
-
- `npm run lint`: Run ESLint and format checks
|
|
224
|
-
- `npm run typecheck`: Run TypeScript type checking
|
|
225
|
-
|
|
226
|
-
### Snow-Flow Commands
|
|
227
|
-
- `snow-flow init --sparc`: Initialize project with MCP servers
|
|
228
|
-
- `snow-flow auth login`: Authenticate with ServiceNow
|
|
229
|
-
- `snow-flow swarm "<objective>"`: Execute multi-agent development
|
|
230
|
-
- `snow-flow mcp start`: Start MCP servers manually
|
|
231
|
-
|
|
232
|
-
### Environment Setup
|
|
233
|
-
```bash
|
|
234
|
-
# .env file
|
|
235
|
-
SNOW_INSTANCE=dev123456
|
|
236
|
-
SNOW_CLIENT_ID=your_oauth_client_id
|
|
237
|
-
SNOW_CLIENT_SECRET=your_oauth_client_secret
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
## ๐ก Best Practices
|
|
241
|
-
|
|
242
|
-
### DO's
|
|
243
|
-
โ
Always use `snow_validate_live_connection()` first
|
|
244
|
-
โ
Check for existing artifacts with `snow_find_artifact()`
|
|
245
|
-
โ
Use Update Sets for all changes
|
|
246
|
-
โ
Test with mock data before production
|
|
247
|
-
โ
Handle errors gracefully with fallbacks
|
|
248
|
-
|
|
249
|
-
### DON'Ts
|
|
250
|
-
โ Don't create local files first
|
|
251
|
-
โ Don't skip authentication
|
|
252
|
-
โ Don't hardcode sys_ids or credentials
|
|
253
|
-
โ Don't work in offline mode
|
|
254
|
-
โ Don't deploy without testing
|
|
255
|
-
|
|
256
|
-
## ๐ฏ Quick Start
|
|
257
|
-
1. `snow-flow init --sparc` - Initialize project with MCP servers
|
|
258
|
-
2. Configure ServiceNow credentials in .env file
|
|
259
|
-
3. `snow-flow auth login` - Authenticate with ServiceNow
|
|
260
|
-
4. `snow-flow swarm "create a widget for incident management"` - Everything automatic!
|
|
261
|
-
|
|
262
|
-
For full documentation, visit: https://github.com/groeimetai/snow-flow
|
package/test-config.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Configuration Test Script
|
|
5
|
-
* Validates that environment variables are properly loaded into the configuration system
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// Test environment variables
|
|
9
|
-
process.env.SNOW_REQUEST_TIMEOUT = '45000';
|
|
10
|
-
process.env.MCP_DEPLOYMENT_PORT = '3010';
|
|
11
|
-
process.env.SNOW_REDIRECT_PORT = '3020';
|
|
12
|
-
process.env.SNOW_FLOW_MAX_WORKER_AGENTS = '15';
|
|
13
|
-
process.env.SNOW_FLOW_LOG_LEVEL = 'debug';
|
|
14
|
-
|
|
15
|
-
// Import configuration
|
|
16
|
-
const { SnowFlowConfig } = require('./dist/config/snow-flow-config.js');
|
|
17
|
-
|
|
18
|
-
console.log('๐งช Testing Configuration System...\n');
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
const config = new SnowFlowConfig();
|
|
22
|
-
|
|
23
|
-
console.log('โ
Configuration loaded successfully\n');
|
|
24
|
-
|
|
25
|
-
// Test basic configuration values
|
|
26
|
-
console.log('๐ Configuration Values:');
|
|
27
|
-
console.log(` ServiceNow timeout: ${config.servicenow.timeout}ms (expected: 45000)`);
|
|
28
|
-
console.log(` MCP Deployment port: ${config.mcp.servers.deployment.port} (expected: 3010)`);
|
|
29
|
-
console.log(` OAuth redirect port: ${config.servicenow.oauth.redirectPort} (expected: 3020)`);
|
|
30
|
-
console.log(` Max worker agents: ${config.agents.queen.maxWorkerAgents} (expected: 15)`);
|
|
31
|
-
console.log(` Log level: ${config.system.logLevel} (expected: debug)`);
|
|
32
|
-
|
|
33
|
-
// Test default values (no env vars set)
|
|
34
|
-
console.log(` MCP Intelligent port: ${config.mcp.servers.intelligent.port} (expected: 3002 - default)`);
|
|
35
|
-
console.log(` OAuth redirect host: ${config.servicenow.oauth.redirectHost} (expected: localhost - default)`);
|
|
36
|
-
|
|
37
|
-
// Test validation
|
|
38
|
-
const isValid = config.servicenow.timeout === 45000 &&
|
|
39
|
-
config.mcp.servers.deployment.port === 3010 &&
|
|
40
|
-
config.servicenow.oauth.redirectPort === 3020 &&
|
|
41
|
-
config.agents.queen.maxWorkerAgents === 15 &&
|
|
42
|
-
config.system.logLevel === 'debug';
|
|
43
|
-
|
|
44
|
-
if (isValid) {
|
|
45
|
-
console.log('\nโ
All environment variables correctly loaded!');
|
|
46
|
-
console.log('โ
Configuration system is working properly');
|
|
47
|
-
} else {
|
|
48
|
-
console.log('\nโ Some environment variables were not loaded correctly');
|
|
49
|
-
process.exit(1);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
} catch (error) {
|
|
53
|
-
console.error('โ Configuration test failed:', error.message);
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
package/test-flow-fix.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Test script to verify that flow creation now properly creates
|
|
5
|
-
* sys_hub_trigger_instance, sys_hub_action_instance, and sys_hub_flow_logic records
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
const { ServiceNowClient } = require('./dist/utils/servicenow-client.js');
|
|
9
|
-
|
|
10
|
-
async function testFlowComponentCreation() {
|
|
11
|
-
console.log('๐งช Testing Flow Component Creation Fix...');
|
|
12
|
-
|
|
13
|
-
try {
|
|
14
|
-
const client = new ServiceNowClient({
|
|
15
|
-
instance: process.env.SNOW_INSTANCE,
|
|
16
|
-
clientId: process.env.SNOW_CLIENT_ID,
|
|
17
|
-
clientSecret: process.env.SNOW_CLIENT_SECRET
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
// Test flow definition with a simple notification action
|
|
21
|
-
const testFlow = {
|
|
22
|
-
name: 'Test Notification Flow',
|
|
23
|
-
description: 'Test flow to verify component record creation',
|
|
24
|
-
trigger_type: 'record_created',
|
|
25
|
-
table: 'incident',
|
|
26
|
-
condition: 'priority=1',
|
|
27
|
-
activities: [
|
|
28
|
-
{
|
|
29
|
-
name: 'Send Notification Email',
|
|
30
|
-
type: 'notification',
|
|
31
|
-
to: 'admin@test.com',
|
|
32
|
-
subject: 'High Priority Incident Created',
|
|
33
|
-
message: 'A high priority incident has been created: ${trigger.number}'
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
console.log('๐ Creating test flow...');
|
|
39
|
-
const result = await client.createFlow(testFlow);
|
|
40
|
-
|
|
41
|
-
if (result.success) {
|
|
42
|
-
console.log('โ
Flow creation successful!');
|
|
43
|
-
console.log(`๐ Flow sys_id: ${result.data.sys_id}`);
|
|
44
|
-
console.log(`๐ Flow Designer URL: ${result.data.flow_designer_url}`);
|
|
45
|
-
console.log(`๐ Activities created: ${result.data.activities_created}`);
|
|
46
|
-
console.log(`๐ง Component records created: ${result.data.component_records_created}`);
|
|
47
|
-
console.log(`๐ฏ Has actual flow instances: ${result.data.has_actual_flow_instances}`);
|
|
48
|
-
|
|
49
|
-
// Verify component records were created by checking the tables
|
|
50
|
-
console.log('\n๐ Verifying component records...');
|
|
51
|
-
|
|
52
|
-
// Check sys_hub_trigger_instance
|
|
53
|
-
const triggerQuery = await client.get(
|
|
54
|
-
`/api/now/table/sys_hub_trigger_instance?sysparm_query=flow=${result.data.sys_id}`
|
|
55
|
-
);
|
|
56
|
-
console.log(`๐ Trigger instances found: ${triggerQuery.result?.length || 0}`);
|
|
57
|
-
|
|
58
|
-
// Check sys_hub_action_instance
|
|
59
|
-
const actionQuery = await client.get(
|
|
60
|
-
`/api/now/table/sys_hub_action_instance?sysparm_query=flow=${result.data.sys_id}`
|
|
61
|
-
);
|
|
62
|
-
console.log(`โก Action instances found: ${actionQuery.result?.length || 0}`);
|
|
63
|
-
|
|
64
|
-
// Check sys_hub_flow_logic
|
|
65
|
-
const logicQuery = await client.get(
|
|
66
|
-
`/api/now/table/sys_hub_flow_logic?sysparm_query=flow=${result.data.sys_id}`
|
|
67
|
-
);
|
|
68
|
-
console.log(`๐ง Flow logic entries found: ${logicQuery.result?.length || 0}`);
|
|
69
|
-
|
|
70
|
-
if (triggerQuery.result?.length > 0 &&
|
|
71
|
-
actionQuery.result?.length > 0 &&
|
|
72
|
-
logicQuery.result?.length > 0) {
|
|
73
|
-
console.log('\n๐ SUCCESS: All component records were created properly!');
|
|
74
|
-
console.log('โ
Flow should now be functional in ServiceNow Flow Designer');
|
|
75
|
-
} else {
|
|
76
|
-
console.log('\nโ ๏ธ WARNING: Some component records may be missing');
|
|
77
|
-
console.log('- This could indicate the fix needs further refinement');
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
} else {
|
|
81
|
-
console.error('โ Flow creation failed:', result.error);
|
|
82
|
-
process.exit(1);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
} catch (error) {
|
|
86
|
-
console.error('โ Test failed with error:', error);
|
|
87
|
-
process.exit(1);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Run the test
|
|
92
|
-
testFlowComponentCreation().catch(console.error);
|
package/test-parallel-agents.js
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test script to verify parallel agent detection works correctly
|
|
3
|
-
* Tests the enhanced ParallelAgentEngine with widget development scenario
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// Mock TodoItem class
|
|
7
|
-
class TodoItem {
|
|
8
|
-
constructor(id, content, status = 'pending', priority = 'medium') {
|
|
9
|
-
this.id = id;
|
|
10
|
-
this.content = content;
|
|
11
|
-
this.status = status;
|
|
12
|
-
this.priority = priority;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Mock QueenMemorySystem
|
|
17
|
-
class MockQueenMemorySystem {
|
|
18
|
-
async store(key, value) {
|
|
19
|
-
console.log(`๐ Memory: Storing ${key}`);
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async retrieve(key) {
|
|
24
|
-
console.log(`๐ Memory: Retrieved ${key}`);
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Simple test of the detectSpecializedBreakdown logic
|
|
30
|
-
function testSpecializedBreakdown() {
|
|
31
|
-
console.log('๐งช Testing Specialized Breakdown Detection Logic...\n');
|
|
32
|
-
|
|
33
|
-
// Test todos voor widget ontwikkeling
|
|
34
|
-
const mockTodos = [
|
|
35
|
-
new TodoItem('todo_1', 'Create incident dashboard widget with charts and real-time data', 'pending', 'high'),
|
|
36
|
-
new TodoItem('todo_2', 'Style the widget with responsive design for mobile', 'pending', 'medium'),
|
|
37
|
-
new TodoItem('todo_3', 'Implement server script for data fetching', 'pending', 'high'),
|
|
38
|
-
new TodoItem('todo_4', 'Add client-side JavaScript for interactivity', 'pending', 'medium')
|
|
39
|
-
];
|
|
40
|
-
|
|
41
|
-
console.log('๐ Mock todos:');
|
|
42
|
-
mockTodos.forEach(todo => {
|
|
43
|
-
console.log(` - ${todo.content} (${todo.priority})`);
|
|
44
|
-
});
|
|
45
|
-
console.log('');
|
|
46
|
-
|
|
47
|
-
// Test de enhanced detection logica (gekopieerd uit parallel-agent-engine.ts)
|
|
48
|
-
const canBenefitFromSpecialization = mockTodos.filter(todo => {
|
|
49
|
-
const content = todo.content.toLowerCase();
|
|
50
|
-
|
|
51
|
-
// Widget development indicators
|
|
52
|
-
if (content.includes('widget') || content.includes('portal') || content.includes('ui')) {
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Development indicators
|
|
57
|
-
if (content.includes('develop') || content.includes('create') || content.includes('build')) {
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Multiple component indicators
|
|
62
|
-
if (content.includes('and') || content.includes('with') || content.includes('including')) {
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Complex task indicators
|
|
67
|
-
if (todo.priority === 'high' || todo.priority === 'medium') {
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Any development-related task benefits from specialization
|
|
72
|
-
if (content.includes('test') || content.includes('style') || content.includes('script')) {
|
|
73
|
-
return true;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
return false;
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
console.log(`๐ฏ Tasks benefiting from specialization: ${canBenefitFromSpecialization.length}/${mockTodos.length}`);
|
|
80
|
-
canBenefitFromSpecialization.forEach(todo => {
|
|
81
|
-
console.log(` โ
${todo.id}: ${todo.content}`);
|
|
82
|
-
});
|
|
83
|
-
console.log('');
|
|
84
|
-
|
|
85
|
-
// Test be more aggressive fallback
|
|
86
|
-
if (canBenefitFromSpecialization.length === 0 && mockTodos.length > 0) {
|
|
87
|
-
console.log('๐ Fallback: Adding first 3 todos for parallelization');
|
|
88
|
-
canBenefitFromSpecialization.push(...mockTodos.slice(0, Math.min(3, mockTodos.length)));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// Test specialized agent teams (gekopieerd uit parallel-agent-engine.ts)
|
|
92
|
-
const breakdownMap = {
|
|
93
|
-
'widget': [
|
|
94
|
-
'widget-creator', // HTML structure specialist
|
|
95
|
-
'css-specialist', // Styling and responsive design specialist
|
|
96
|
-
'backend-specialist', // Server script specialist
|
|
97
|
-
'frontend-specialist', // Client script specialist
|
|
98
|
-
'integration-specialist', // API integration specialist
|
|
99
|
-
'ui-ux-specialist', // User experience specialist
|
|
100
|
-
'performance-specialist', // Performance optimization
|
|
101
|
-
'accessibility-specialist', // Accessibility compliance
|
|
102
|
-
'tester' // Testing specialist
|
|
103
|
-
]
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
const objectiveType = 'widget';
|
|
107
|
-
const suggestedAgents = breakdownMap[objectiveType] || [];
|
|
108
|
-
|
|
109
|
-
console.log(`๐ค Suggested agents for ${objectiveType} development:`);
|
|
110
|
-
suggestedAgents.forEach((agent, i) => {
|
|
111
|
-
console.log(` ${i + 1}. ${agent}`);
|
|
112
|
-
});
|
|
113
|
-
console.log('');
|
|
114
|
-
|
|
115
|
-
// Create mock opportunity
|
|
116
|
-
const opportunity = {
|
|
117
|
-
id: 'specialized_widget_dev',
|
|
118
|
-
type: 'specialized_breakdown',
|
|
119
|
-
todos: canBenefitFromSpecialization.map(t => t.id),
|
|
120
|
-
suggestedAgents: suggestedAgents,
|
|
121
|
-
estimatedSpeedup: Math.min(suggestedAgents.length * 0.6, 3.0), // Cap at 3x speedup
|
|
122
|
-
confidence: 0.8, // High confidence for widget development
|
|
123
|
-
dependencies: [],
|
|
124
|
-
blockers: []
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
console.log(`๐ Generated Parallelization Opportunity:`);
|
|
128
|
-
console.log(` ID: ${opportunity.id}`);
|
|
129
|
-
console.log(` Type: ${opportunity.type}`);
|
|
130
|
-
console.log(` Confidence: ${opportunity.confidence}`);
|
|
131
|
-
console.log(` Estimated speedup: ${opportunity.estimatedSpeedup}x`);
|
|
132
|
-
console.log(` Todo IDs: ${opportunity.todos.join(', ')}`);
|
|
133
|
-
console.log(` Suggested agents: ${opportunity.suggestedAgents.join(', ')}`);
|
|
134
|
-
console.log('');
|
|
135
|
-
|
|
136
|
-
// Test confidence and speedup thresholds
|
|
137
|
-
const meetsThreshold = opportunity.confidence > 0.5 && opportunity.estimatedSpeedup > 1.1;
|
|
138
|
-
console.log(`โ
Meets parallelization threshold (>0.5 confidence, >1.1x speedup): ${meetsThreshold}`);
|
|
139
|
-
|
|
140
|
-
if (meetsThreshold) {
|
|
141
|
-
console.log(`๐ SUCCESS: This opportunity would trigger parallel agent spawning!`);
|
|
142
|
-
console.log(`๐ Expected result: ${opportunity.suggestedAgents.length} specialized agents working in parallel`);
|
|
143
|
-
} else {
|
|
144
|
-
console.log(`โ FAILURE: This opportunity would NOT trigger parallel agent spawning`);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
return opportunity;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Test the agent selection logic
|
|
151
|
-
function testAgentSpecialization() {
|
|
152
|
-
console.log('\n๐ Testing Agent Specialization Matching...\n');
|
|
153
|
-
|
|
154
|
-
const testCases = [
|
|
155
|
-
{ content: 'Create incident dashboard widget', expectedAgents: ['widget-creator', 'css-specialist'] },
|
|
156
|
-
{ content: 'Style the widget with responsive design', expectedAgents: ['css-specialist', 'ui-ux-specialist'] },
|
|
157
|
-
{ content: 'Implement server script for data fetching', expectedAgents: ['backend-specialist'] },
|
|
158
|
-
{ content: 'Add client-side JavaScript for interactivity', expectedAgents: ['frontend-specialist'] },
|
|
159
|
-
{ content: 'Test the widget functionality', expectedAgents: ['tester'] }
|
|
160
|
-
];
|
|
161
|
-
|
|
162
|
-
testCases.forEach(testCase => {
|
|
163
|
-
console.log(`๐ Todo: "${testCase.content}"`);
|
|
164
|
-
console.log(`๐ฏ Expected agents: ${testCase.expectedAgents.join(', ')}`);
|
|
165
|
-
console.log('');
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// Run tests
|
|
170
|
-
console.log('๐ TESTING PARALLEL AGENT DETECTION v1.1.92\n');
|
|
171
|
-
console.log('=' .repeat(60));
|
|
172
|
-
|
|
173
|
-
const opportunity = testSpecializedBreakdown();
|
|
174
|
-
testAgentSpecialization();
|
|
175
|
-
|
|
176
|
-
console.log('=' .repeat(60));
|
|
177
|
-
console.log('๐ Test completed. Check if parallel agents would be spawned!');
|