claude-flow-novice 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cli/commands/guidance.js +668 -487
- package/dist/src/cli/commands/index-validate.js +29 -18
- package/dist/src/cli/commands/mcp-troubleshoot.js +282 -230
- package/dist/src/cli/commands/neural-goal-init.js +125 -92
- package/dist/src/cli/commands/swarm-exec.js +393 -317
- package/dist/src/cli/commands/validate-framework.js +1100 -983
- package/dist/src/cli/commands/validate.js +223 -144
- package/dist/src/cli/main.js +1 -1
- package/dist/src/cli/simple-commands/__tests__/agent.test.js +277 -265
- package/dist/src/cli/simple-commands/__tests__/memory.test.js +7 -6
- package/dist/src/cli/simple-commands/__tests__/swarm.test.js +356 -373
- package/dist/src/cli/simple-commands/__tests__/task.test.js +7 -6
- package/dist/src/cli/simple-commands/agent.js +193 -157
- package/dist/src/cli/simple-commands/analysis.js +446 -336
- package/dist/src/cli/simple-commands/automation-executor.js +1339 -1095
- package/dist/src/cli/simple-commands/automation.js +469 -481
- package/dist/src/cli/simple-commands/batch-manager.js +313 -261
- package/dist/src/cli/simple-commands/claude-telemetry.js +267 -241
- package/dist/src/cli/simple-commands/claude-track.js +90 -68
- package/dist/src/cli/simple-commands/concurrent-display.js +320 -266
- package/dist/src/cli/simple-commands/config.js +290 -245
- package/dist/src/cli/simple-commands/coordination.js +234 -182
- package/dist/src/cli/simple-commands/enhanced-ui-views.js +615 -812
- package/dist/src/cli/simple-commands/enhanced-webui-complete.js +981 -922
- package/dist/src/cli/simple-commands/fix-hook-variables.js +294 -274
- package/dist/src/cli/simple-commands/github/gh-coordinator.js +457 -378
- package/dist/src/cli/simple-commands/github/github-api.js +574 -535
- package/dist/src/cli/simple-commands/github/init.js +303 -276
- package/dist/src/cli/simple-commands/github.js +247 -222
- package/dist/src/cli/simple-commands/goal.js +63 -51
- package/dist/src/cli/simple-commands/hive-mind/auto-save-middleware.js +278 -208
- package/dist/src/cli/simple-commands/hive-mind/communication.js +696 -601
- package/dist/src/cli/simple-commands/hive-mind/core.js +979 -907
- package/dist/src/cli/simple-commands/hive-mind/db-optimizer.js +655 -406
- package/dist/src/cli/simple-commands/hive-mind/mcp-wrapper.js +1245 -1125
- package/dist/src/cli/simple-commands/hive-mind/memory.js +1090 -854
- package/dist/src/cli/simple-commands/hive-mind/performance-optimizer.js +574 -459
- package/dist/src/cli/simple-commands/hive-mind/performance-test.js +347 -263
- package/dist/src/cli/simple-commands/hive-mind/queen.js +768 -727
- package/dist/src/cli/simple-commands/hive-mind/session-manager.js +1049 -745
- package/dist/src/cli/simple-commands/hive-mind-optimize.js +283 -227
- package/dist/src/cli/simple-commands/hive-mind-wizard.js +217 -174
- package/dist/src/cli/simple-commands/hive-mind.js +2282 -1841
- package/dist/src/cli/simple-commands/hive.js +79 -90
- package/dist/src/cli/simple-commands/hook-safety.js +521 -431
- package/dist/src/cli/simple-commands/hooks/session-start-soul.js +254 -203
- package/dist/src/cli/simple-commands/hooks.js +1204 -1064
- package/dist/src/cli/simple-commands/init/agent-copier.js +319 -294
- package/dist/src/cli/simple-commands/init/batch-init.js +562 -496
- package/dist/src/cli/simple-commands/init/claude-commands/claude-flow-commands.js +19 -13
- package/dist/src/cli/simple-commands/init/claude-commands/optimized-claude-flow-commands.js +19 -13
- package/dist/src/cli/simple-commands/init/claude-commands/optimized-slash-commands.js +88 -61
- package/dist/src/cli/simple-commands/init/claude-commands/optimized-sparc-commands.js +150 -125
- package/dist/src/cli/simple-commands/init/claude-commands/slash-commands.js +49 -42
- package/dist/src/cli/simple-commands/init/claude-commands/sparc-commands.js +61 -43
- package/dist/src/cli/simple-commands/init/copy-revised-templates.js +147 -141
- package/dist/src/cli/simple-commands/init/executable-wrapper.js +44 -31
- package/dist/src/cli/simple-commands/init/gitignore-updater.js +90 -64
- package/dist/src/cli/simple-commands/init/help.js +107 -104
- package/dist/src/cli/simple-commands/init/hive-mind-init.js +528 -509
- package/dist/src/cli/simple-commands/init/index.js +1759 -1510
- package/dist/src/cli/simple-commands/init/performance-monitor.js +317 -234
- package/dist/src/cli/simple-commands/init/rollback/backup-manager.js +504 -441
- package/dist/src/cli/simple-commands/init/rollback/index.js +364 -289
- package/dist/src/cli/simple-commands/init/rollback/recovery-manager.js +728 -652
- package/dist/src/cli/simple-commands/init/rollback/rollback-executor.js +481 -416
- package/dist/src/cli/simple-commands/init/rollback/state-tracker.js +448 -369
- package/dist/src/cli/simple-commands/init/sparc/roo-readme.js +2 -1
- package/dist/src/cli/simple-commands/init/sparc/roomodes-config.js +99 -122
- package/dist/src/cli/simple-commands/init/sparc/workflows.js +37 -32
- package/dist/src/cli/simple-commands/init/sparc-structure.js +62 -55
- package/dist/src/cli/simple-commands/init/template-copier.js +533 -421
- package/dist/src/cli/simple-commands/init/templates/coordination-md.js +6 -3
- package/dist/src/cli/simple-commands/init/templates/enhanced-templates.js +318 -344
- package/dist/src/cli/simple-commands/init/templates/github-safe-enhanced.js +218 -173
- package/dist/src/cli/simple-commands/init/templates/github-safe.js +75 -65
- package/dist/src/cli/simple-commands/init/templates/memory-bank-md.js +6 -3
- package/dist/src/cli/simple-commands/init/templates/readme-files.js +4 -2
- package/dist/src/cli/simple-commands/init/templates/safe-hook-patterns.js +230 -187
- package/dist/src/cli/simple-commands/init/templates/sparc-modes.js +80 -53
- package/dist/src/cli/simple-commands/init/templates/verification-claude-md.js +85 -101
- package/dist/src/cli/simple-commands/init/validation/config-validator.js +330 -283
- package/dist/src/cli/simple-commands/init/validation/health-checker.js +561 -495
- package/dist/src/cli/simple-commands/init/validation/index.js +358 -302
- package/dist/src/cli/simple-commands/init/validation/mode-validator.js +359 -308
- package/dist/src/cli/simple-commands/init/validation/post-init-validator.js +366 -389
- package/dist/src/cli/simple-commands/init/validation/pre-init-validator.js +268 -270
- package/dist/src/cli/simple-commands/init/validation/test-runner.js +447 -427
- package/dist/src/cli/simple-commands/init.js +2 -1
- package/dist/src/cli/simple-commands/mcp-health.js +158 -131
- package/dist/src/cli/simple-commands/mcp-integration-layer.js +634 -533
- package/dist/src/cli/simple-commands/mcp.js +400 -345
- package/dist/src/cli/simple-commands/memory-consolidation.js +537 -426
- package/dist/src/cli/simple-commands/memory.js +311 -247
- package/dist/src/cli/simple-commands/migrate-hooks.js +46 -39
- package/dist/src/cli/simple-commands/monitor.js +363 -294
- package/dist/src/cli/simple-commands/neural.js +65 -51
- package/dist/src/cli/simple-commands/pair-autofix-only.js +662 -538
- package/dist/src/cli/simple-commands/pair-basic.js +656 -528
- package/dist/src/cli/simple-commands/pair-old.js +543 -430
- package/dist/src/cli/simple-commands/pair-working.js +751 -615
- package/dist/src/cli/simple-commands/pair.js +751 -615
- package/dist/src/cli/simple-commands/performance-hooks.js +111 -83
- package/dist/src/cli/simple-commands/performance-metrics.js +433 -348
- package/dist/src/cli/simple-commands/process-ui-enhanced.js +787 -708
- package/dist/src/cli/simple-commands/process-ui.js +254 -230
- package/dist/src/cli/simple-commands/realtime-update-system.js +611 -525
- package/dist/src/cli/simple-commands/sparc/architecture.js +1530 -1704
- package/dist/src/cli/simple-commands/sparc/commands.js +516 -438
- package/dist/src/cli/simple-commands/sparc/completion.js +1481 -1224
- package/dist/src/cli/simple-commands/sparc/coordinator.js +978 -913
- package/dist/src/cli/simple-commands/sparc/index.js +298 -241
- package/dist/src/cli/simple-commands/sparc/phase-base.js +390 -314
- package/dist/src/cli/simple-commands/sparc/pseudocode.js +869 -965
- package/dist/src/cli/simple-commands/sparc/refinement.js +1273 -980
- package/dist/src/cli/simple-commands/sparc/specification.js +645 -559
- package/dist/src/cli/simple-commands/sparc-modes/architect.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/ask.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/code.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/debug.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/devops.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/docs-writer.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/generic.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/index.js +55 -47
- package/dist/src/cli/simple-commands/sparc-modes/integration.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/mcp.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/monitoring.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/optimization.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/security-review.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/sparc-orchestrator.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/spec-pseudocode.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/supabase-admin.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/swarm.js +87 -101
- package/dist/src/cli/simple-commands/sparc-modes/tdd.js +1 -1
- package/dist/src/cli/simple-commands/sparc-modes/tutorial.js +1 -1
- package/dist/src/cli/simple-commands/sparc.js +493 -465
- package/dist/src/cli/simple-commands/start-ui.js +132 -108
- package/dist/src/cli/simple-commands/start-wrapper.js +268 -240
- package/dist/src/cli/simple-commands/start.js +1 -1
- package/dist/src/cli/simple-commands/status.js +275 -254
- package/dist/src/cli/simple-commands/stream-chain-clean.js +171 -128
- package/dist/src/cli/simple-commands/stream-chain-fixed.js +82 -61
- package/dist/src/cli/simple-commands/stream-chain-real.js +331 -267
- package/dist/src/cli/simple-commands/stream-chain-working.js +263 -211
- package/dist/src/cli/simple-commands/stream-chain.js +318 -260
- package/dist/src/cli/simple-commands/stream-processor.js +315 -290
- package/dist/src/cli/simple-commands/swarm-executor.js +222 -189
- package/dist/src/cli/simple-commands/swarm-metrics-integration.js +300 -208
- package/dist/src/cli/simple-commands/swarm-ui.js +703 -623
- package/dist/src/cli/simple-commands/swarm-webui-integration.js +286 -258
- package/dist/src/cli/simple-commands/swarm.js +1082 -887
- package/dist/src/cli/simple-commands/task.js +206 -161
- package/dist/src/cli/simple-commands/timestamp-fix.js +89 -59
- package/dist/src/cli/simple-commands/token-tracker.js +316 -258
- package/dist/src/cli/simple-commands/tool-execution-framework.js +519 -433
- package/dist/src/cli/simple-commands/train-and-stream.js +331 -275
- package/dist/src/cli/simple-commands/training-pipeline.js +725 -619
- package/dist/src/cli/simple-commands/training.js +227 -170
- package/dist/src/cli/simple-commands/verification-hooks.js +284 -261
- package/dist/src/cli/simple-commands/verification-integration.js +417 -389
- package/dist/src/cli/simple-commands/verification-training-integration.js +606 -486
- package/dist/src/cli/simple-commands/verification.js +513 -493
- package/dist/src/cli/simple-commands/web-server.js +836 -766
- package/dist/src/cli/simple-commands/webui-validator.js +124 -106
- package/dist/src/coordination/byzantine-memory-channels.js +25 -1
- package/dist/src/coordination/event-bus/demo-wasm-integration.js +251 -212
- package/dist/src/coordination/event-bus/qe-event-bus.js +748 -608
- package/dist/src/coordination/event-bus/qe-event-bus.test.js +454 -379
- package/dist/src/coordination/iteration-tracker.js +454 -363
- package/dist/src/index.js +384 -35
- package/dist/src/mcp/DEPRECATED.js +60 -46
- package/dist/src/mcp/fixes/mcp-error-fixes.js +134 -115
- package/dist/src/mcp/implementations/agent-tracker.js +128 -114
- package/dist/src/mcp/implementations/daa-tools.js +350 -292
- package/dist/src/mcp/implementations/workflow-tools.js +361 -329
- package/dist/src/mcp/mcp-config-manager.js +1331 -1183
- package/dist/src/mcp/mcp-server-novice-simplified.js +17 -11
- package/dist/src/mcp/mcp-server-novice.js +17 -11
- package/dist/src/mcp/mcp-server-sdk.js +17 -11
- package/dist/src/mcp/mcp-server.js +1484 -1620
- package/dist/src/mcp/ruv-swarm-wrapper.js +239 -209
- package/dist/src/memory/advanced-serializer.js +589 -609
- package/dist/src/memory/enhanced-examples.js +305 -220
- package/dist/src/memory/enhanced-memory.js +336 -295
- package/dist/src/memory/enhanced-session-serializer.js +492 -408
- package/dist/src/memory/fallback-memory-system.js +1021 -900
- package/dist/src/memory/fallback-store.js +131 -93
- package/dist/src/memory/high-performance-serialization.js +730 -592
- package/dist/src/memory/in-memory-store.js +213 -161
- package/dist/src/memory/index.js +157 -123
- package/dist/src/memory/lock-free-structures.js +764 -578
- package/dist/src/memory/memory-mapped-persistence.js +766 -585
- package/dist/src/memory/memory-pressure-manager.js +707 -569
- package/dist/src/memory/migration.js +445 -358
- package/dist/src/memory/shared-memory.js +768 -641
- package/dist/src/memory/sqlite-store.js +325 -245
- package/dist/src/memory/sqlite-wrapper.js +151 -122
- package/dist/src/memory/swarm-memory.js +603 -470
- package/dist/src/memory/test-example.js +134 -126
- package/dist/src/memory/ultra-fast-memory-store.js +821 -622
- package/dist/src/memory/unified-memory-manager.js +437 -356
- package/dist/src/swarm/CodeRefactoringSwarm.js +952 -777
- package/dist/src/utils/__tests__/github-cli-safety-wrapper.test.js +400 -332
- package/dist/src/utils/error-handler.js +2 -36
- package/dist/src/utils/github-cli-safe.js +64 -56
- package/dist/src/utils/github-cli-safety-wrapper.js +546 -451
- package/dist/src/utils/npx-isolated-cache.js +119 -104
- package/dist/src/utils/preference-manager.js +652 -622
- package/dist/src/utils/timezone-utils.js +105 -86
- package/dist/src/web/api/apm-routes.js +353 -0
- package/dist/src/web/api/config/api-config.js +184 -0
- package/dist/src/web/api/middleware/auth.js +203 -0
- package/dist/src/web/api/middleware/cache.js +273 -0
- package/dist/src/web/api/middleware/error-handler.js +257 -0
- package/dist/src/web/api/middleware/request-logger.js +215 -0
- package/dist/src/web/api/middleware/validation.js +323 -0
- package/dist/src/web/api/routes/events.js +463 -0
- package/dist/src/web/api/routes/hierarchy.js +300 -0
- package/dist/src/web/api/routes/index.js +12 -0
- package/dist/src/web/api/routes/metrics.js +559 -0
- package/dist/src/web/api/routes/parallel-status.js +359 -0
- package/dist/src/web/api/routes/status.js +448 -0
- package/dist/src/web/api/server.js +462 -0
- package/dist/src/web/dashboard/hooks/useWebSocket.js +383 -0
- package/dist/src/web/dashboard/index.js +85 -0
- package/dist/src/web/dashboard/realtime/CustomSyncManager.js +439 -0
- package/dist/src/web/dashboard/realtime/NativeWebSocketManager.js +323 -0
- package/dist/src/web/dashboard/realtime/PerformanceBenchmark.js +527 -0
- package/dist/src/web/dashboard/realtime/RealtimeCommunicationManager.js +474 -0
- package/dist/src/web/dashboard/realtime/RealtimeServer.js +666 -0
- package/dist/src/web/dashboard/realtime/SSEManager.js +426 -0
- package/dist/src/web/dashboard/types.js +4 -0
- package/dist/src/web/messaging/agent-status-tracker.js +453 -0
- package/dist/src/web/messaging/human-intervention-system.js +305 -0
- package/dist/src/web/messaging/message-filter.js +302 -0
- package/dist/src/web/messaging/swarm-message-router.js +324 -0
- package/dist/src/web/messaging/transparency-logger.js +421 -0
- package/dist/src/web/portal-server.js +460 -0
- package/dist/src/web/server.js +322 -0
- package/dist/src/web/websocket/apm-websocket-handler.js +453 -0
- package/dist/src/web/websocket/websocket-manager.js +780 -0
- package/package.json +5 -3
- package/dist/src/cli/minimal-main.js +0 -22
- package/dist/src/enterprise/analytics-manager.js +0 -1135
- package/dist/src/enterprise/audit-manager.js +0 -1115
- package/dist/src/enterprise/cloud-manager.js +0 -891
- package/dist/src/enterprise/deployment-manager.js +0 -966
- package/dist/src/enterprise/index.js +0 -6
- package/dist/src/enterprise/project-manager.js +0 -584
- package/dist/src/enterprise/security-manager.js +0 -991
- package/dist/src/migration/index.js +0 -92
- package/dist/src/migration/logger.js +0 -121
- package/dist/src/migration/migration-analyzer.js +0 -268
- package/dist/src/migration/migration-runner.js +0 -522
- package/dist/src/migration/migration-validator.js +0 -285
- package/dist/src/migration/progress-reporter.js +0 -150
- package/dist/src/migration/rollback-manager.js +0 -321
- package/dist/src/migration/tests/migration-system.test.js +0 -7
- package/dist/src/migration/types.js +0 -3
- package/dist/src/swarm/__tests__/integration.test.js +0 -227
- package/dist/src/swarm/__tests__/prompt-copier.test.js +0 -344
- package/dist/src/swarm/advanced-orchestrator.js +0 -1095
- package/dist/src/swarm/claude-code-interface.js +0 -961
- package/dist/src/swarm/claude-flow-executor.js +0 -229
- package/dist/src/swarm/consensus-coordinator.js +0 -475
- package/dist/src/swarm/coordinator.js +0 -2993
- package/dist/src/swarm/direct-executor.js +0 -1180
- package/dist/src/swarm/error-recovery/advanced-error-detection.js +0 -691
- package/dist/src/swarm/error-recovery/automated-recovery-workflows.js +0 -998
- package/dist/src/swarm/error-recovery/error-recovery-coordinator.js +0 -1197
- package/dist/src/swarm/error-recovery/recovery-monitoring.js +0 -772
- package/dist/src/swarm/error-recovery/resilience-architecture.js +0 -714
- package/dist/src/swarm/error-recovery/self-healing-mechanisms.js +0 -1319
- package/dist/src/swarm/error-recovery/test-error-recovery-effectiveness.js +0 -808
- package/dist/src/swarm/executor-v2.js +0 -322
- package/dist/src/swarm/executor.js +0 -815
- package/dist/src/swarm/hive-mind-integration.js +0 -703
- package/dist/src/swarm/index.js +0 -41
- package/dist/src/swarm/json-output-aggregator.js +0 -267
- package/dist/src/swarm/large-scale-coordinator.js +0 -542
- package/dist/src/swarm/mcp-integration-wrapper.js +0 -628
- package/dist/src/swarm/memory.js +0 -1117
- package/dist/src/swarm/optimizations/__tests__/optimization.test.js +0 -348
- package/dist/src/swarm/optimizations/async-file-manager.js +0 -285
- package/dist/src/swarm/optimizations/circular-buffer.js +0 -162
- package/dist/src/swarm/optimizations/connection-pool.js +0 -244
- package/dist/src/swarm/optimizations/index.js +0 -28
- package/dist/src/swarm/optimizations/optimized-executor.js +0 -320
- package/dist/src/swarm/optimizations/ttl-map.js +0 -234
- package/dist/src/swarm/prompt-cli.js +0 -200
- package/dist/src/swarm/prompt-copier-enhanced.js +0 -202
- package/dist/src/swarm/prompt-copier.js +0 -381
- package/dist/src/swarm/prompt-manager.js +0 -295
- package/dist/src/swarm/prompt-utils.js +0 -310
- package/dist/src/swarm/result-aggregator.js +0 -718
- package/dist/src/swarm/sparc-executor.js +0 -1568
- package/dist/src/swarm/strategies/auto.js +0 -758
- package/dist/src/swarm/strategies/base.js +0 -128
- package/dist/src/swarm/strategies/research.js +0 -914
- package/dist/src/swarm/strategies/strategy-metrics-patch.js +0 -2
- package/dist/src/swarm/types.js +0 -52
- package/dist/src/swarm/workers/copy-worker.js +0 -56
- package/dist/src/validators/epic-config-schema.js +0 -214
- package/dist/src/validators/index.js +0 -10
- package/dist/src/validators/swarm-init-validator.js +0 -259
- package/dist/src/validators/todowrite-batching-validator.js +0 -215
- package/dist/src/validators/todowrite-integration.js +0 -187
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/documentSymbols/browser/documentSymbols.js +0 -23
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution.js +0 -57
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/copyPasteController.js +0 -401
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +0 -181
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution.js +0 -44
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +0 -157
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/dropOrPasteInto/browser/edit.js +0 -71
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/editorState/browser/editorState.js +0 -112
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findController.js +0 -990
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findDecorations.js +0 -296
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findModel.js +0 -488
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findOptionsWidget.js +0 -138
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findState.js +0 -243
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/find/browser/findWidget.js +0 -1177
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/folding.js +0 -1093
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingDecorations.js +0 -133
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingModel.js +0 -538
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/folding/browser/foldingRanges.js +0 -351
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/fontZoom/browser/fontZoom.js +0 -49
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/format.js +0 -360
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formatActions.js +0 -263
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/format/browser/formattingEdit.js +0 -54
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture.js +0 -149
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/hover/browser/contentHover.js +0 -874
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commandIds.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/inlineCompletions/browser/commands.js +0 -199
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/linesOperations/browser/copyLinesCommand.js +0 -70
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/commandsQuickAccess.js +0 -26
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/quickAccess/browser/editorNavigationQuickAccess.js +0 -153
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/readOnlyMessage/browser/contribution.js +0 -33
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/semanticTokens/browser/documentSemanticTokens.js +0 -354
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/smartSelect/browser/bracketSelections.js +0 -146
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/suggest/browser/completionModel.js +0 -224
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/contrib/unicodeHighlighter/browser/bannerController.js +0 -119
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/edcore.main.js +0 -14
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.all.js +0 -63
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.api.js +0 -55
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.main.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/editor.worker.js +0 -25
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/editor/standalone/browser/colorizer.js +0 -118
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/css.worker.js +0 -36869
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/language/css/cssMode.js +0 -2035
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/browser/accessibilityService.js +0 -88
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/accessibility/common/accessibility.js +0 -9
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/action.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/action/common/actionCommonCategories.js +0 -13
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionList.js +0 -276
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/browser/actionWidget.js +0 -248
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actionWidget/common/actionWidget.js +0 -5
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/actions/common/actions.js +0 -409
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/audioCues/browser/audioCueService.js +0 -176
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/browser/clipboardService.js +0 -141
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/clipboard/common/clipboardService.js +0 -6
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/commands/common/commands.js +0 -80
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configuration.js +0 -86
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationModels.js +0 -554
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurationRegistry.js +0 -317
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/configuration/common/configurations.js +0 -41
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/browser/contextKeyService.js +0 -432
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkey.js +0 -1547
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextkey/common/contextkeys.js +0 -18
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuHandler.js +0 -124
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextMenuService.js +0 -101
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextView.js +0 -7
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/contextview/browser/contextViewService.js +0 -72
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dialogs/common/dialogs.js +0 -2
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/dnd/browser/dnd.js +0 -36
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/editor/common/editor.js +0 -17
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/environment/common/environment.js +0 -2
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/extensions/common/extensions.js +0 -47
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/files/common/files.js +0 -9
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/history/browser/contextScopedHistoryWidget.js +0 -105
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/descriptors.js +0 -11
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/instantiation/common/extensions.js +0 -15
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/abstractKeybindingService.js +0 -277
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/keybinding/common/baseResolvedKeybinding.js +0 -53
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/quickinput/browser/commandsQuickAccess.js +0 -354
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/browser/defaultStyles.js +0 -162
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/esm/vs/platform/theme/common/colorRegistry.js +0 -482
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/abap/abap.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/apex/apex.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/azcli/azcli.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bat/bat.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/bicep/bicep.js +0 -11
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cameligo/cameligo.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/clojure/clojure.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/coffee/coffee.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cpp/cpp.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csharp/csharp.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/csp/csp.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/css/css.js +0 -12
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/cypher/cypher.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dart/dart.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/dockerfile/dockerfile.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/ecl/ecl.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/elixir/elixir.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/basic-languages/flow9/flow9.js +0 -10
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.js +0 -745
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.de.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.es.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.fr.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.it.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ja.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ko.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.ru.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-cn.js +0 -31
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/editor/editor.main.nls.zh-tw.js +0 -29
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssMode.js +0 -13
- package/dist/src/web/frontend/node_modules/.monaco-editor-MndU045b/min/vs/language/css/cssWorker.js +0 -81
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/cli.js +0 -64
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/example.js +0 -36
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/index.js +0 -205
- package/dist/src/web/frontend/node_modules/.multicast-dns-iKseM9bB/test.js +0 -260
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.browser.js +0 -34
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.js +0 -35
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/async/index.native.js +0 -26
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.browser.js +0 -34
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/index.js +0 -45
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/nanoid.js +0 -1
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/non-secure/index.js +0 -21
- package/dist/src/web/frontend/node_modules/.nanoid-PAMEV9Hd/url-alphabet/index.js +0 -3
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/bin/nodemon.js +0 -16
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/index.js +0 -49
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/cli/parse.js +0 -230
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/command.js +0 -43
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/defaults.js +0 -34
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/exec.js +0 -234
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/index.js +0 -93
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/config/load.js +0 -225
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/help/index.js +0 -27
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/index.js +0 -1
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/index.js +0 -4
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/match.js +0 -287
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/run.js +0 -562
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/signals.js +0 -34
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/monitor/watch.js +0 -244
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/nodemon.js +0 -317
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/add.js +0 -89
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/index.js +0 -53
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/rules/parse.js +0 -43
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/spawn.js +0 -74
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/bus.js +0 -44
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/clone.js +0 -40
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/colour.js +0 -26
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/index.js +0 -103
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/log.js +0 -82
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/utils/merge.js +0 -47
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/lib/version.js +0 -100
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/brace-expansion/index.js +0 -201
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/has-flag/index.js +0 -8
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/minimatch/minimatch.js +0 -947
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/browser.js +0 -5
- package/dist/src/web/frontend/node_modules/.nodemon-QcvNKhKT/node_modules/supports-color/index.js +0 -131
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/bin/pidtree.js +0 -128
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/index.js +0 -49
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/bin.js +0 -61
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/get.js +0 -45
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/pidtree.js +0 -104
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/ps.js +0 -47
- package/dist/src/web/frontend/node_modules/.pidtree-icfat3SQ/lib/wmic.js +0 -49
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/doc.js +0 -1270
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/acorn.js +0 -15
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/angular.js +0 -2
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/babel.js +0 -15
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/estree.js +0 -36
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/flow.js +0 -19
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/glimmer.js +0 -29
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/graphql.js +0 -29
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/html.js +0 -22
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/markdown.js +0 -63
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/meriyah.js +0 -4
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/postcss.js +0 -54
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/typescript.js +0 -20
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/plugins/yaml.js +0 -160
- package/dist/src/web/frontend/node_modules/.prettier-ApZm3b7s/standalone.js +0 -34
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/bin/react-scripts.js +0 -58
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/env.js +0 -112
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/getHttpsConfig.js +0 -74
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/babelTransform.js +0 -37
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/cssTransform.js +0 -22
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/jest/fileTransform.js +0 -40
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/modules.js +0 -142
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/paths.js +0 -153
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack/persistentCache/createEnvironmentHash.js +0 -9
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpack.config.js +0 -796
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/config/webpackDevServer.config.js +0 -135
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/build.js +0 -225
- package/dist/src/web/frontend/node_modules/.react-scripts-OTANyoRb/scripts/eject.js +0 -340
|
@@ -2,978 +2,1037 @@
|
|
|
2
2
|
* Enhanced Web UI Complete - Full Integration
|
|
3
3
|
* Combines all MCP tools with enhanced UI views and real-time updates
|
|
4
4
|
* Provides access to all 87 Claude-Flow MCP tools through a comprehensive interface
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { printSuccess, printError, printWarning, printInfo } from '../utils.js';
|
|
8
|
+
import { compat } from '../runtime-detector.js';
|
|
9
|
+
import SwarmWebUIIntegration from './swarm-webui-integration.js';
|
|
10
|
+
import MCPIntegrationLayer from './mcp-integration-layer.js';
|
|
11
|
+
import ToolExecutionFramework from './tool-execution-framework.js';
|
|
12
|
+
import { EnhancedUIViews, ENHANCED_VIEWS } from './enhanced-ui-views.js';
|
|
13
|
+
import RealtimeUpdateSystem from './realtime-update-system.js';
|
|
14
|
+
|
|
11
15
|
// Enhanced view modes with all tool categories
|
|
12
16
|
const ALL_VIEWS = {
|
|
13
|
-
|
|
17
|
+
...ENHANCED_VIEWS,
|
|
18
|
+
// Add any additional views if needed
|
|
14
19
|
};
|
|
20
|
+
|
|
15
21
|
export class EnhancedWebUIComplete {
|
|
16
|
-
|
|
22
|
+
constructor() {
|
|
23
|
+
this.processes = new Map();
|
|
24
|
+
this.running = true;
|
|
25
|
+
this.selectedIndex = 0;
|
|
26
|
+
this.currentView = ALL_VIEWS.PROCESSES;
|
|
27
|
+
this.agents = [];
|
|
28
|
+
this.tasks = [];
|
|
29
|
+
this.memoryStats = {
|
|
30
|
+
totalEntries: 0,
|
|
31
|
+
totalSize: 0,
|
|
32
|
+
namespaces: [],
|
|
33
|
+
};
|
|
34
|
+
this.logs = [];
|
|
35
|
+
this.systemStats = {
|
|
36
|
+
uptime: 0,
|
|
37
|
+
totalTasks: 0,
|
|
38
|
+
completedTasks: 0,
|
|
39
|
+
activeAgents: 0,
|
|
40
|
+
memoryUsage: 0,
|
|
41
|
+
cpuUsage: 0,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
// Enhanced components
|
|
45
|
+
this.mcpIntegration = null;
|
|
46
|
+
this.toolFramework = null;
|
|
47
|
+
this.enhancedViews = null;
|
|
48
|
+
this.realtimeUpdates = null;
|
|
49
|
+
|
|
50
|
+
// Input handling
|
|
51
|
+
this.inputBuffer = '';
|
|
52
|
+
this.commandHistory = [];
|
|
53
|
+
this.historyIndex = -1;
|
|
54
|
+
|
|
55
|
+
// Colors for consistent styling
|
|
56
|
+
this.colors = {
|
|
57
|
+
cyan: (text) => `\x1b[36m${text}\x1b[0m`,
|
|
58
|
+
gray: (text) => `\x1b[90m${text}\x1b[0m`,
|
|
59
|
+
white: (text) => `\x1b[37m${text}\x1b[0m`,
|
|
60
|
+
yellow: (text) => `\x1b[33m${text}\x1b[0m`,
|
|
61
|
+
green: (text) => `\x1b[32m${text}\x1b[0m`,
|
|
62
|
+
red: (text) => `\x1b[31m${text}\x1b[0m`,
|
|
63
|
+
blue: (text) => `\x1b[34m${text}\x1b[0m`,
|
|
64
|
+
magenta: (text) => `\x1b[35m${text}\x1b[0m`,
|
|
65
|
+
bold: (text) => `\x1b[1m${text}\x1b[0m`,
|
|
66
|
+
dim: (text) => `\x1b[2m${text}\x1b[0m`,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
this.initializeEnhancedUI();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
17
73
|
* Initialize all enhanced UI components
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
74
|
+
*/
|
|
75
|
+
async initializeEnhancedUI() {
|
|
76
|
+
try {
|
|
77
|
+
// Initialize original swarm integration
|
|
78
|
+
this.swarmIntegration = new SwarmWebUIIntegration(this);
|
|
79
|
+
|
|
80
|
+
// Initialize MCP integration layer
|
|
81
|
+
this.mcpIntegration = new MCPIntegrationLayer(this);
|
|
82
|
+
|
|
83
|
+
// Initialize tool execution framework
|
|
84
|
+
this.toolFramework = new ToolExecutionFramework(this);
|
|
85
|
+
|
|
86
|
+
// Initialize enhanced UI views
|
|
87
|
+
this.enhancedViews = new EnhancedUIViews(this);
|
|
88
|
+
|
|
89
|
+
// Initialize real-time update system
|
|
90
|
+
this.realtimeUpdates = new RealtimeUpdateSystem(this);
|
|
91
|
+
|
|
92
|
+
// Initialize default processes
|
|
93
|
+
this.initializeProcesses();
|
|
94
|
+
|
|
95
|
+
// Initialize mock data
|
|
96
|
+
await this.initializeSystemData();
|
|
97
|
+
|
|
98
|
+
// Start system monitoring
|
|
99
|
+
this.startSystemMonitoring();
|
|
100
|
+
|
|
101
|
+
this.addLog('success', '🚀 Enhanced Web UI fully initialized with all 87 MCP tools');
|
|
102
|
+
} catch (error) {
|
|
103
|
+
this.addLog('error', `Failed to initialize enhanced UI: ${error.message}`);
|
|
104
|
+
throw error;
|
|
41
105
|
}
|
|
42
|
-
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
43
109
|
* Initialize system processes
|
|
44
|
-
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
name: 'Coordinator',
|
|
74
|
-
description: 'Task coordination service'
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: 'neural-engine',
|
|
78
|
-
name: 'Neural Engine',
|
|
79
|
-
description: 'Neural network processing'
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: 'analysis-service',
|
|
83
|
-
name: 'Analysis Service',
|
|
84
|
-
description: 'Performance analysis'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
id: 'workflow-engine',
|
|
88
|
-
name: 'Workflow Engine',
|
|
89
|
-
description: 'Automation workflows'
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
id: 'github-connector',
|
|
93
|
-
name: 'GitHub Connector',
|
|
94
|
-
description: 'GitHub integration'
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
id: 'daa-controller',
|
|
98
|
-
name: 'DAA Controller',
|
|
99
|
-
description: 'Dynamic agent architecture'
|
|
100
|
-
}
|
|
101
|
-
];
|
|
102
|
-
PROCESSES.forEach((p)=>{
|
|
103
|
-
this.processes.set(p.id, {
|
|
104
|
-
...p,
|
|
105
|
-
status: 'running',
|
|
106
|
-
pid: Math.floor(Math.random() * 50000) + 1000,
|
|
107
|
-
uptime: Math.floor(Math.random() * 86400),
|
|
108
|
-
cpu: Math.random() * 5,
|
|
109
|
-
memory: Math.random() * 100
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
110
|
+
*/
|
|
111
|
+
initializeProcesses() {
|
|
112
|
+
const PROCESSES = [
|
|
113
|
+
{ id: 'event-bus', name: 'Event Bus', description: 'Central event distribution system' },
|
|
114
|
+
{ id: 'orchestrator', name: 'Orchestrator', description: 'Main coordination engine' },
|
|
115
|
+
{ id: 'memory-manager', name: 'Memory Manager', description: 'Persistent memory system' },
|
|
116
|
+
{ id: 'terminal-pool', name: 'Terminal Pool', description: 'Terminal session management' },
|
|
117
|
+
{ id: 'mcp-server', name: 'MCP Server', description: 'Model Context Protocol server' },
|
|
118
|
+
{ id: 'coordinator', name: 'Coordinator', description: 'Task coordination service' },
|
|
119
|
+
{ id: 'neural-engine', name: 'Neural Engine', description: 'Neural network processing' },
|
|
120
|
+
{ id: 'analysis-service', name: 'Analysis Service', description: 'Performance analysis' },
|
|
121
|
+
{ id: 'workflow-engine', name: 'Workflow Engine', description: 'Automation workflows' },
|
|
122
|
+
{ id: 'github-connector', name: 'GitHub Connector', description: 'GitHub integration' },
|
|
123
|
+
{ id: 'daa-controller', name: 'DAA Controller', description: 'Dynamic agent architecture' },
|
|
124
|
+
];
|
|
125
|
+
|
|
126
|
+
PROCESSES.forEach((p) => {
|
|
127
|
+
this.processes.set(p.id, {
|
|
128
|
+
...p,
|
|
129
|
+
status: 'running', // Start most services as running
|
|
130
|
+
pid: Math.floor(Math.random() * 50000) + 1000,
|
|
131
|
+
uptime: Math.floor(Math.random() * 86400), // Random uptime up to 24h
|
|
132
|
+
cpu: Math.random() * 5,
|
|
133
|
+
memory: Math.random() * 100,
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
114
139
|
* Initialize system data
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
time: new Date(),
|
|
194
|
-
level: 'success',
|
|
195
|
-
message: '🛠️ System utilities loaded 8 management tools'
|
|
196
|
-
}
|
|
197
|
-
];
|
|
198
|
-
// Start uptime counter
|
|
199
|
-
setInterval(()=>{
|
|
200
|
-
this.systemStats.uptime++;
|
|
201
|
-
// Update process uptimes
|
|
202
|
-
this.processes.forEach((process1)=>{
|
|
203
|
-
if (process1.status === 'running') {
|
|
204
|
-
process1.uptime++;
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
}, 1000);
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
140
|
+
*/
|
|
141
|
+
async initializeSystemData() {
|
|
142
|
+
// Initialize swarm
|
|
143
|
+
await this.swarmIntegration.initializeSwarm('hierarchical', 8);
|
|
144
|
+
|
|
145
|
+
// Initialize memory stats
|
|
146
|
+
this.memoryStats = {
|
|
147
|
+
totalEntries: 156,
|
|
148
|
+
totalSize: '2.3 MB',
|
|
149
|
+
namespaces: [
|
|
150
|
+
{ name: 'neural', entries: 42, size: '856 KB' },
|
|
151
|
+
{ name: 'swarm', entries: 35, size: '645 KB' },
|
|
152
|
+
{ name: 'analysis', entries: 28, size: '423 KB' },
|
|
153
|
+
{ name: 'workflow', entries: 24, size: '298 KB' },
|
|
154
|
+
{ name: 'github', entries: 15, size: '156 KB' },
|
|
155
|
+
{ name: 'system', entries: 12, size: '89 KB' },
|
|
156
|
+
],
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// Initialize logs
|
|
160
|
+
this.logs = [
|
|
161
|
+
{
|
|
162
|
+
time: new Date(),
|
|
163
|
+
level: 'success',
|
|
164
|
+
message: '🧠 Neural engine initialized with 27 models',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
time: new Date(),
|
|
168
|
+
level: 'success',
|
|
169
|
+
message: '🐝 Swarm orchestration active with hierarchical topology',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
time: new Date(),
|
|
173
|
+
level: 'info',
|
|
174
|
+
message: '📊 Analysis service monitoring 13 performance metrics',
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
time: new Date(),
|
|
178
|
+
level: 'success',
|
|
179
|
+
message: '🔄 Workflow engine loaded 11 automation tools',
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
time: new Date(),
|
|
183
|
+
level: 'info',
|
|
184
|
+
message: '🐙 GitHub connector established with 8 integration tools',
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
time: new Date(),
|
|
188
|
+
level: 'success',
|
|
189
|
+
message: '🤖 DAA controller managing 8 dynamic agent tools',
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
time: new Date(),
|
|
193
|
+
level: 'success',
|
|
194
|
+
message: '💾 Memory system active with 12 persistence tools',
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
time: new Date(),
|
|
198
|
+
level: 'success',
|
|
199
|
+
message: '🛠️ System utilities loaded 8 management tools',
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
|
|
203
|
+
// Start uptime counter
|
|
204
|
+
setInterval(() => {
|
|
205
|
+
this.systemStats.uptime++;
|
|
206
|
+
// Update process uptimes
|
|
207
|
+
this.processes.forEach((process) => {
|
|
208
|
+
if (process.status === 'running') {
|
|
209
|
+
process.uptime++;
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}, 1000);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
210
216
|
* Start system monitoring
|
|
211
|
-
*/
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
217
|
+
*/
|
|
218
|
+
startSystemMonitoring() {
|
|
219
|
+
setInterval(() => {
|
|
220
|
+
// Update system stats
|
|
221
|
+
this.systemStats.cpuUsage = Math.max(
|
|
222
|
+
0,
|
|
223
|
+
this.systemStats.cpuUsage + (Math.random() - 0.5) * 2,
|
|
224
|
+
);
|
|
225
|
+
this.systemStats.memoryUsage = Math.max(
|
|
226
|
+
0,
|
|
227
|
+
this.systemStats.memoryUsage + (Math.random() - 0.5) * 3,
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
// Update process stats
|
|
231
|
+
this.processes.forEach((process) => {
|
|
232
|
+
if (process.status === 'running') {
|
|
233
|
+
process.cpu = Math.max(0, process.cpu + (Math.random() - 0.5) * 1);
|
|
234
|
+
process.memory = Math.max(0, process.memory + (Math.random() - 0.5) * 5);
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
|
|
238
|
+
// Emit performance metrics for real-time updates
|
|
239
|
+
if (this.realtimeUpdates) {
|
|
240
|
+
this.realtimeUpdates.emit('system_stats_update', {
|
|
241
|
+
cpuUsage: this.systemStats.cpuUsage,
|
|
242
|
+
memoryUsage: this.systemStats.memoryUsage,
|
|
243
|
+
processCount: this.processes.size,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
}, 5000);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
234
250
|
* Start the enhanced UI
|
|
235
|
-
*/
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
251
|
+
*/
|
|
252
|
+
async start() {
|
|
253
|
+
// Clear screen
|
|
254
|
+
console.clear();
|
|
255
|
+
|
|
256
|
+
// Show enhanced welcome
|
|
257
|
+
printSuccess('🧠 Claude-Flow Enhanced Web UI v2.0.0');
|
|
258
|
+
printInfo('🔧 Comprehensive MCP Tool Integration - 87 Tools Available');
|
|
259
|
+
console.log('─'.repeat(80));
|
|
260
|
+
console.log();
|
|
261
|
+
|
|
262
|
+
// Show tool categories summary
|
|
263
|
+
this.showToolCategoriesSummary();
|
|
264
|
+
|
|
265
|
+
// Initial render
|
|
266
|
+
this.render();
|
|
267
|
+
|
|
268
|
+
// Setup input handling
|
|
269
|
+
this.setupInputHandling();
|
|
270
|
+
|
|
271
|
+
// Main UI loop
|
|
272
|
+
while (this.running) {
|
|
273
|
+
await this.handleInput();
|
|
274
|
+
if (this.running) {
|
|
246
275
|
this.render();
|
|
247
|
-
|
|
248
|
-
this.setupInputHandling();
|
|
249
|
-
// Main UI loop
|
|
250
|
-
while(this.running){
|
|
251
|
-
await this.handleInput();
|
|
252
|
-
if (this.running) {
|
|
253
|
-
this.render();
|
|
254
|
-
}
|
|
255
|
-
}
|
|
276
|
+
}
|
|
256
277
|
}
|
|
257
|
-
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
258
281
|
* Show tool categories summary at startup
|
|
259
|
-
*/
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
icon: '🔄'
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
name: 'GitHub Integration',
|
|
288
|
-
count: 8,
|
|
289
|
-
icon: '🐙'
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
name: 'Dynamic Agents (DAA)',
|
|
293
|
-
count: 8,
|
|
294
|
-
icon: '🤖'
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
name: 'System & Utilities',
|
|
298
|
-
count: 8,
|
|
299
|
-
icon: '🛠️'
|
|
300
|
-
}
|
|
301
|
-
];
|
|
302
|
-
console.log(this.colors.cyan('📂 Available Tool Categories:'));
|
|
303
|
-
categories.forEach((cat)=>{
|
|
304
|
-
console.log(` ${cat.icon} ${this.colors.white(cat.name)}: ${this.colors.yellow(cat.count)} tools`);
|
|
305
|
-
});
|
|
306
|
-
console.log();
|
|
307
|
-
console.log(this.colors.green(`Total: ${this.colors.bold('87')} MCP tools ready for use`));
|
|
308
|
-
console.log();
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
282
|
+
*/
|
|
283
|
+
showToolCategoriesSummary() {
|
|
284
|
+
const categories = [
|
|
285
|
+
{ name: 'Swarm Coordination', count: 12, icon: '🐝' },
|
|
286
|
+
{ name: 'Neural Networks', count: 15, icon: '🧠' },
|
|
287
|
+
{ name: 'Memory & Persistence', count: 12, icon: '💾' },
|
|
288
|
+
{ name: 'Analysis & Monitoring', count: 13, icon: '📊' },
|
|
289
|
+
{ name: 'Workflow & Automation', count: 11, icon: '🔄' },
|
|
290
|
+
{ name: 'GitHub Integration', count: 8, icon: '🐙' },
|
|
291
|
+
{ name: 'Dynamic Agents (DAA)', count: 8, icon: '🤖' },
|
|
292
|
+
{ name: 'System & Utilities', count: 8, icon: '🛠️' },
|
|
293
|
+
];
|
|
294
|
+
|
|
295
|
+
console.log(this.colors.cyan('📂 Available Tool Categories:'));
|
|
296
|
+
categories.forEach((cat) => {
|
|
297
|
+
console.log(
|
|
298
|
+
` ${cat.icon} ${this.colors.white(cat.name)}: ${this.colors.yellow(cat.count)} tools`,
|
|
299
|
+
);
|
|
300
|
+
});
|
|
301
|
+
console.log();
|
|
302
|
+
console.log(this.colors.green(`Total: ${this.colors.bold('87')} MCP tools ready for use`));
|
|
303
|
+
console.log();
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
311
307
|
* Setup input handling for enhanced features
|
|
312
|
-
*/
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
process.stdin.resume();
|
|
308
|
+
*/
|
|
309
|
+
setupInputHandling() {
|
|
310
|
+
// Enable raw input mode for better key handling
|
|
311
|
+
if (process.stdin.setRawMode) {
|
|
312
|
+
process.stdin.setRawMode(true);
|
|
318
313
|
}
|
|
319
|
-
|
|
314
|
+
process.stdin.resume();
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
320
318
|
* Enhanced render method
|
|
321
|
-
*/
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
319
|
+
*/
|
|
320
|
+
render() {
|
|
321
|
+
// Clear screen and move cursor to top
|
|
322
|
+
console.log('\x1b[2J\x1b[H');
|
|
323
|
+
|
|
324
|
+
// Header with enhanced navigation
|
|
325
|
+
this.renderEnhancedHeader();
|
|
326
|
+
|
|
327
|
+
// Main content based on current view
|
|
328
|
+
switch (this.currentView) {
|
|
329
|
+
case ALL_VIEWS.PROCESSES:
|
|
330
|
+
this.renderProcessView();
|
|
331
|
+
break;
|
|
332
|
+
case ALL_VIEWS.STATUS:
|
|
333
|
+
this.renderStatusView();
|
|
334
|
+
break;
|
|
335
|
+
case ALL_VIEWS.ORCHESTRATION:
|
|
336
|
+
this.renderOrchestrationView();
|
|
337
|
+
break;
|
|
338
|
+
case ALL_VIEWS.MEMORY:
|
|
339
|
+
this.renderMemoryView();
|
|
340
|
+
break;
|
|
341
|
+
case ALL_VIEWS.LOGS:
|
|
342
|
+
this.renderLogsView();
|
|
343
|
+
break;
|
|
344
|
+
case ALL_VIEWS.NEURAL:
|
|
345
|
+
this.enhancedViews.renderNeuralView();
|
|
346
|
+
break;
|
|
347
|
+
case ALL_VIEWS.ANALYSIS:
|
|
348
|
+
this.enhancedViews.renderAnalysisView();
|
|
349
|
+
break;
|
|
350
|
+
case ALL_VIEWS.WORKFLOW:
|
|
351
|
+
this.enhancedViews.renderWorkflowView();
|
|
352
|
+
break;
|
|
353
|
+
case ALL_VIEWS.GITHUB:
|
|
354
|
+
this.enhancedViews.renderGitHubView();
|
|
355
|
+
break;
|
|
356
|
+
case ALL_VIEWS.DAA:
|
|
357
|
+
this.enhancedViews.renderDAAView();
|
|
358
|
+
break;
|
|
359
|
+
case ALL_VIEWS.SYSTEM:
|
|
360
|
+
this.enhancedViews.renderSystemView();
|
|
361
|
+
break;
|
|
362
|
+
case ALL_VIEWS.TOOLS:
|
|
363
|
+
this.enhancedViews.renderToolsView();
|
|
364
|
+
break;
|
|
365
|
+
case ALL_VIEWS.HELP:
|
|
366
|
+
this.renderEnhancedHelpView();
|
|
367
|
+
break;
|
|
370
368
|
}
|
|
371
|
-
|
|
369
|
+
|
|
370
|
+
// Enhanced footer with more controls
|
|
371
|
+
this.renderEnhancedFooter();
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/**
|
|
372
375
|
* Render enhanced header with all navigation options
|
|
373
|
-
*/
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
label: 'DAA',
|
|
441
|
-
icon: '🤖'
|
|
442
|
-
}
|
|
443
|
-
];
|
|
444
|
-
let toolTabLine = '';
|
|
445
|
-
toolTabs.forEach((tab)=>{
|
|
446
|
-
const isActive = this.currentView === tab.view;
|
|
447
|
-
const label = isActive ? this.colors.yellow(`[${tab.icon}${tab.label}]`) : this.colors.gray(`${tab.icon}${tab.label}`);
|
|
448
|
-
toolTabLine += ` ${this.colors.bold(tab.key)}:${label}`;
|
|
449
|
-
});
|
|
450
|
-
console.log(toolTabLine);
|
|
451
|
-
// Additional tabs (row 3)
|
|
452
|
-
const additionalTabs = [
|
|
453
|
-
{
|
|
454
|
-
key: 't',
|
|
455
|
-
view: ALL_VIEWS.TOOLS,
|
|
456
|
-
label: 'Tools',
|
|
457
|
-
icon: '🎛️'
|
|
458
|
-
},
|
|
459
|
-
{
|
|
460
|
-
key: 's',
|
|
461
|
-
view: ALL_VIEWS.SYSTEM,
|
|
462
|
-
label: 'System',
|
|
463
|
-
icon: '🛠️'
|
|
464
|
-
},
|
|
465
|
-
{
|
|
466
|
-
key: 'h',
|
|
467
|
-
view: ALL_VIEWS.HELP,
|
|
468
|
-
label: 'Help',
|
|
469
|
-
icon: '❓'
|
|
470
|
-
}
|
|
471
|
-
];
|
|
472
|
-
let additionalTabLine = '';
|
|
473
|
-
additionalTabs.forEach((tab)=>{
|
|
474
|
-
const isActive = this.currentView === tab.view;
|
|
475
|
-
const label = isActive ? this.colors.yellow(`[${tab.icon}${tab.label}]`) : this.colors.gray(`${tab.icon}${tab.label}`);
|
|
476
|
-
additionalTabLine += ` ${this.colors.bold(tab.key)}:${label}`;
|
|
477
|
-
});
|
|
478
|
-
console.log(additionalTabLine);
|
|
479
|
-
console.log(this.colors.gray('─'.repeat(80)));
|
|
480
|
-
console.log();
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
376
|
+
*/
|
|
377
|
+
renderEnhancedHeader() {
|
|
378
|
+
console.log(this.colors.cyan(this.colors.bold('🧠 Claude-Flow Enhanced Web UI v2.0.0')));
|
|
379
|
+
console.log(this.colors.gray('─'.repeat(80)));
|
|
380
|
+
|
|
381
|
+
// Main navigation tabs (row 1)
|
|
382
|
+
const mainTabs = [
|
|
383
|
+
{ key: '1', view: ALL_VIEWS.PROCESSES, label: 'Processes' },
|
|
384
|
+
{ key: '2', view: ALL_VIEWS.STATUS, label: 'Status' },
|
|
385
|
+
{ key: '3', view: ALL_VIEWS.ORCHESTRATION, label: 'Orchestration' },
|
|
386
|
+
{ key: '4', view: ALL_VIEWS.MEMORY, label: 'Memory' },
|
|
387
|
+
{ key: '5', view: ALL_VIEWS.LOGS, label: 'Logs' },
|
|
388
|
+
];
|
|
389
|
+
|
|
390
|
+
let mainTabLine = '';
|
|
391
|
+
mainTabs.forEach((tab) => {
|
|
392
|
+
const isActive = this.currentView === tab.view;
|
|
393
|
+
const label = isActive
|
|
394
|
+
? this.colors.yellow(`[${tab.label}]`)
|
|
395
|
+
: this.colors.gray(`${tab.label}`);
|
|
396
|
+
mainTabLine += ` ${this.colors.bold(tab.key)}:${label}`;
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
console.log(mainTabLine);
|
|
400
|
+
|
|
401
|
+
// Enhanced tool tabs (row 2)
|
|
402
|
+
const toolTabs = [
|
|
403
|
+
{ key: '6', view: ALL_VIEWS.NEURAL, label: 'Neural', icon: '🧠' },
|
|
404
|
+
{ key: '7', view: ALL_VIEWS.ANALYSIS, label: 'Analysis', icon: '📊' },
|
|
405
|
+
{ key: '8', view: ALL_VIEWS.WORKFLOW, label: 'Workflow', icon: '🔄' },
|
|
406
|
+
{ key: '9', view: ALL_VIEWS.GITHUB, label: 'GitHub', icon: '🐙' },
|
|
407
|
+
{ key: '0', view: ALL_VIEWS.DAA, label: 'DAA', icon: '🤖' },
|
|
408
|
+
];
|
|
409
|
+
|
|
410
|
+
let toolTabLine = '';
|
|
411
|
+
toolTabs.forEach((tab) => {
|
|
412
|
+
const isActive = this.currentView === tab.view;
|
|
413
|
+
const label = isActive
|
|
414
|
+
? this.colors.yellow(`[${tab.icon}${tab.label}]`)
|
|
415
|
+
: this.colors.gray(`${tab.icon}${tab.label}`);
|
|
416
|
+
toolTabLine += ` ${this.colors.bold(tab.key)}:${label}`;
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
console.log(toolTabLine);
|
|
420
|
+
|
|
421
|
+
// Additional tabs (row 3)
|
|
422
|
+
const additionalTabs = [
|
|
423
|
+
{ key: 't', view: ALL_VIEWS.TOOLS, label: 'Tools', icon: '🎛️' },
|
|
424
|
+
{ key: 's', view: ALL_VIEWS.SYSTEM, label: 'System', icon: '🛠️' },
|
|
425
|
+
{ key: 'h', view: ALL_VIEWS.HELP, label: 'Help', icon: '❓' },
|
|
426
|
+
];
|
|
427
|
+
|
|
428
|
+
let additionalTabLine = '';
|
|
429
|
+
additionalTabs.forEach((tab) => {
|
|
430
|
+
const isActive = this.currentView === tab.view;
|
|
431
|
+
const label = isActive
|
|
432
|
+
? this.colors.yellow(`[${tab.icon}${tab.label}]`)
|
|
433
|
+
: this.colors.gray(`${tab.icon}${tab.label}`);
|
|
434
|
+
additionalTabLine += ` ${this.colors.bold(tab.key)}:${label}`;
|
|
435
|
+
});
|
|
436
|
+
|
|
437
|
+
console.log(additionalTabLine);
|
|
438
|
+
console.log(this.colors.gray('─'.repeat(80)));
|
|
439
|
+
console.log();
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
483
443
|
* Render enhanced help view
|
|
484
|
-
*/
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
444
|
+
*/
|
|
445
|
+
renderEnhancedHelpView() {
|
|
446
|
+
console.log(this.colors.white(this.colors.bold('❓ Enhanced Web UI Help')));
|
|
447
|
+
console.log();
|
|
448
|
+
|
|
449
|
+
console.log(this.colors.cyan('🗝️ Navigation Keys:'));
|
|
450
|
+
console.log(' 1-5: Main views (Processes, Status, Orchestration, Memory, Logs)');
|
|
451
|
+
console.log(' 6-0: Tool categories (Neural, Analysis, Workflow, GitHub, DAA)');
|
|
452
|
+
console.log(' t: Tool execution center');
|
|
453
|
+
console.log(' s: System utilities');
|
|
454
|
+
console.log(' h: This help screen');
|
|
455
|
+
console.log();
|
|
456
|
+
|
|
457
|
+
console.log(this.colors.cyan('🔧 Tool Categories:'));
|
|
458
|
+
console.log(' 🧠 Neural (15 tools): Training, prediction, model management');
|
|
459
|
+
console.log(' 📊 Analysis (13 tools): Performance reports, monitoring, metrics');
|
|
460
|
+
console.log(' 🔄 Workflow (11 tools): Automation, pipelines, scheduling');
|
|
461
|
+
console.log(' 🐙 GitHub (8 tools): Repository management, PR automation');
|
|
462
|
+
console.log(' 🤖 DAA (8 tools): Dynamic agent architecture');
|
|
463
|
+
console.log(' 🛠️ System (8 tools): Configuration, security, diagnostics');
|
|
464
|
+
console.log(' 🐝 Swarm (12 tools): Agent coordination, task orchestration');
|
|
465
|
+
console.log(' 💾 Memory (12 tools): Persistence, caching, namespaces');
|
|
466
|
+
console.log();
|
|
467
|
+
|
|
468
|
+
console.log(this.colors.cyan('⚡ Quick Actions:'));
|
|
469
|
+
console.log(' r: Run custom tool (from any view)');
|
|
470
|
+
console.log(' w: Execute workflow');
|
|
471
|
+
console.log(' b: Batch tool execution');
|
|
472
|
+
console.log(' c: Clear screen');
|
|
473
|
+
console.log(' q: Quit application');
|
|
474
|
+
console.log();
|
|
475
|
+
|
|
476
|
+
console.log(this.colors.cyan('💡 Features:'));
|
|
477
|
+
console.log(' • Real-time updates and monitoring');
|
|
478
|
+
console.log(' • Comprehensive MCP tool integration');
|
|
479
|
+
console.log(' • Batch and workflow execution');
|
|
480
|
+
console.log(' • Performance tracking and analysis');
|
|
481
|
+
console.log(' • Memory management and persistence');
|
|
482
|
+
console.log(' • GitHub integration and automation');
|
|
483
|
+
console.log(' • Dynamic agent architecture');
|
|
484
|
+
console.log(' • Neural network management');
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/**
|
|
522
488
|
* Render enhanced footer
|
|
523
|
-
*/
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}
|
|
546
|
-
|
|
489
|
+
*/
|
|
490
|
+
renderEnhancedFooter() {
|
|
491
|
+
console.log();
|
|
492
|
+
console.log(this.colors.gray('─'.repeat(80)));
|
|
493
|
+
|
|
494
|
+
// Status line
|
|
495
|
+
const mcpStatus = this.mcpIntegration ? this.mcpIntegration.getStatus() : null;
|
|
496
|
+
const toolStatus = this.toolFramework ? this.toolFramework.getStatus() : null;
|
|
497
|
+
|
|
498
|
+
let statusLine = `🧠 Claude-Flow Enhanced UI | `;
|
|
499
|
+
statusLine += `MCP: ${mcpStatus?.mcpAvailable ? this.colors.green('✓') : this.colors.red('✗')} | `;
|
|
500
|
+
statusLine += `Tools: ${this.colors.yellow(mcpStatus?.totalTools || 87)} | `;
|
|
501
|
+
statusLine += `Active: ${this.colors.blue(toolStatus?.currentExecutions || 0)} | `;
|
|
502
|
+
statusLine += `Queued: ${this.colors.cyan(toolStatus?.queuedExecutions || 0)} | `;
|
|
503
|
+
statusLine += `Uptime: ${this.colors.white(this.formatUptime(this.systemStats.uptime))}`;
|
|
504
|
+
|
|
505
|
+
console.log(statusLine);
|
|
506
|
+
|
|
507
|
+
// Controls line
|
|
508
|
+
let controlsLine = `${this.colors.gray('Controls:')} `;
|
|
509
|
+
controlsLine += `${this.colors.yellow('r')}=Run Tool | `;
|
|
510
|
+
controlsLine += `${this.colors.yellow('w')}=Workflow | `;
|
|
511
|
+
controlsLine += `${this.colors.yellow('b')}=Batch | `;
|
|
512
|
+
controlsLine += `${this.colors.yellow('c')}=Clear | `;
|
|
513
|
+
controlsLine += `${this.colors.yellow('q')}=Quit | `;
|
|
514
|
+
controlsLine += `${this.colors.yellow('↑↓')}=Navigate`;
|
|
515
|
+
|
|
516
|
+
console.log(controlsLine);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
547
520
|
* Enhanced input handling
|
|
548
|
-
*/
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
})
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* Handle navigation input
|
|
582
|
-
*/ async handleNavigationInput(key) {
|
|
583
|
-
const navigationMap = {
|
|
584
|
-
1: ALL_VIEWS.PROCESSES,
|
|
585
|
-
2: ALL_VIEWS.STATUS,
|
|
586
|
-
3: ALL_VIEWS.ORCHESTRATION,
|
|
587
|
-
4: ALL_VIEWS.MEMORY,
|
|
588
|
-
5: ALL_VIEWS.LOGS,
|
|
589
|
-
6: ALL_VIEWS.NEURAL,
|
|
590
|
-
7: ALL_VIEWS.ANALYSIS,
|
|
591
|
-
8: ALL_VIEWS.WORKFLOW,
|
|
592
|
-
9: ALL_VIEWS.GITHUB,
|
|
593
|
-
0: ALL_VIEWS.DAA,
|
|
594
|
-
t: ALL_VIEWS.TOOLS,
|
|
595
|
-
s: ALL_VIEWS.SYSTEM,
|
|
596
|
-
h: ALL_VIEWS.HELP
|
|
597
|
-
};
|
|
598
|
-
if (navigationMap[key]) {
|
|
599
|
-
this.currentView = navigationMap[key];
|
|
600
|
-
this.selectedIndex = 0;
|
|
601
|
-
this.addLog('info', `Switched to ${this.currentView} view`);
|
|
602
|
-
return true;
|
|
521
|
+
*/
|
|
522
|
+
async handleInput() {
|
|
523
|
+
return new Promise((resolve) => {
|
|
524
|
+
const onData = async (chunk) => {
|
|
525
|
+
const key = chunk.toString();
|
|
526
|
+
|
|
527
|
+
// Remove listener
|
|
528
|
+
process.stdin.removeListener('data', onData);
|
|
529
|
+
|
|
530
|
+
try {
|
|
531
|
+
// Handle navigation keys
|
|
532
|
+
if (await this.handleNavigationInput(key)) {
|
|
533
|
+
resolve();
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
// Handle enhanced view input
|
|
538
|
+
if (await this.handleEnhancedViewInput(key)) {
|
|
539
|
+
resolve();
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// Handle global commands
|
|
544
|
+
if (await this.handleGlobalCommands(key)) {
|
|
545
|
+
resolve();
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
// Handle original input
|
|
550
|
+
await this.handleOriginalInput(key);
|
|
551
|
+
} catch (error) {
|
|
552
|
+
this.addLog('error', `Input handling error: ${error.message}`);
|
|
603
553
|
}
|
|
604
|
-
|
|
554
|
+
|
|
555
|
+
resolve();
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
process.stdin.once('data', onData);
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Handle navigation input
|
|
564
|
+
*/
|
|
565
|
+
async handleNavigationInput(key) {
|
|
566
|
+
const navigationMap = {
|
|
567
|
+
1: ALL_VIEWS.PROCESSES,
|
|
568
|
+
2: ALL_VIEWS.STATUS,
|
|
569
|
+
3: ALL_VIEWS.ORCHESTRATION,
|
|
570
|
+
4: ALL_VIEWS.MEMORY,
|
|
571
|
+
5: ALL_VIEWS.LOGS,
|
|
572
|
+
6: ALL_VIEWS.NEURAL,
|
|
573
|
+
7: ALL_VIEWS.ANALYSIS,
|
|
574
|
+
8: ALL_VIEWS.WORKFLOW,
|
|
575
|
+
9: ALL_VIEWS.GITHUB,
|
|
576
|
+
0: ALL_VIEWS.DAA,
|
|
577
|
+
t: ALL_VIEWS.TOOLS,
|
|
578
|
+
s: ALL_VIEWS.SYSTEM,
|
|
579
|
+
h: ALL_VIEWS.HELP,
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
if (navigationMap[key]) {
|
|
583
|
+
this.currentView = navigationMap[key];
|
|
584
|
+
this.selectedIndex = 0;
|
|
585
|
+
this.addLog('info', `Switched to ${this.currentView} view`);
|
|
586
|
+
return true;
|
|
605
587
|
}
|
|
606
|
-
|
|
588
|
+
|
|
589
|
+
return false;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
607
593
|
* Handle enhanced view input
|
|
608
|
-
*/
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
return false;
|
|
594
|
+
*/
|
|
595
|
+
async handleEnhancedViewInput(key) {
|
|
596
|
+
if (this.enhancedViews) {
|
|
597
|
+
return await this.enhancedViews.handleEnhancedInput(key, this.currentView);
|
|
613
598
|
}
|
|
614
|
-
|
|
599
|
+
return false;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/**
|
|
615
603
|
* Handle global commands
|
|
616
|
-
*/
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
return false;
|
|
604
|
+
*/
|
|
605
|
+
async handleGlobalCommands(key) {
|
|
606
|
+
switch (key) {
|
|
607
|
+
case 'r':
|
|
608
|
+
await this.promptRunTool();
|
|
609
|
+
return true;
|
|
610
|
+
case 'w':
|
|
611
|
+
await this.promptRunWorkflow();
|
|
612
|
+
return true;
|
|
613
|
+
case 'b':
|
|
614
|
+
await this.promptBatchExecution();
|
|
615
|
+
return true;
|
|
616
|
+
case 'c':
|
|
617
|
+
console.clear();
|
|
618
|
+
return true;
|
|
619
|
+
case 'q':
|
|
620
|
+
case '\x03': // Ctrl+C
|
|
621
|
+
await this.shutdown();
|
|
622
|
+
return true;
|
|
636
623
|
}
|
|
637
|
-
|
|
624
|
+
|
|
625
|
+
return false;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
638
629
|
* Prompt for tool execution
|
|
639
|
-
*/
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
630
|
+
*/
|
|
631
|
+
async promptRunTool() {
|
|
632
|
+
// In a real implementation, this would show an interactive prompt
|
|
633
|
+
// For now, execute a sample tool
|
|
634
|
+
this.addLog('info', 'Tool execution prompt (demo)');
|
|
635
|
+
|
|
636
|
+
try {
|
|
637
|
+
const result = await this.toolFramework.executeTool('features_detect');
|
|
638
|
+
this.addLog('success', 'Tool executed successfully');
|
|
639
|
+
this.enhancedViews.displayToolResult(result);
|
|
640
|
+
} catch (error) {
|
|
641
|
+
this.addLog('error', `Tool execution failed: ${error.message}`);
|
|
650
642
|
}
|
|
651
|
-
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
652
646
|
* Prompt for workflow execution
|
|
653
|
-
*/
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
647
|
+
*/
|
|
648
|
+
async promptRunWorkflow() {
|
|
649
|
+
this.addLog('info', 'Executing sample workflow...');
|
|
650
|
+
|
|
651
|
+
try {
|
|
652
|
+
const result = await this.toolFramework.executePredefinedWorkflow('performance_analysis');
|
|
653
|
+
this.addLog('success', 'Workflow completed successfully');
|
|
654
|
+
} catch (error) {
|
|
655
|
+
this.addLog('error', `Workflow failed: ${error.message}`);
|
|
661
656
|
}
|
|
662
|
-
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
/**
|
|
663
660
|
* Prompt for batch execution
|
|
664
|
-
*/
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
parallel: true
|
|
683
|
-
});
|
|
684
|
-
this.addLog('success', `Batch completed: ${result.summary.successful}/${result.summary.total} successful`);
|
|
685
|
-
} catch (error) {
|
|
686
|
-
this.addLog('error', `Batch execution failed: ${error.message}`);
|
|
687
|
-
}
|
|
661
|
+
*/
|
|
662
|
+
async promptBatchExecution() {
|
|
663
|
+
this.addLog('info', 'Executing sample batch...');
|
|
664
|
+
|
|
665
|
+
const batchTools = [
|
|
666
|
+
{ toolName: 'swarm_status' },
|
|
667
|
+
{ toolName: 'neural_status' },
|
|
668
|
+
{ toolName: 'memory_usage', parameters: { action: 'list' } },
|
|
669
|
+
];
|
|
670
|
+
|
|
671
|
+
try {
|
|
672
|
+
const result = await this.toolFramework.executeToolsBatch(batchTools, { parallel: true });
|
|
673
|
+
this.addLog(
|
|
674
|
+
'success',
|
|
675
|
+
`Batch completed: ${result.summary.successful}/${result.summary.total} successful`,
|
|
676
|
+
);
|
|
677
|
+
} catch (error) {
|
|
678
|
+
this.addLog('error', `Batch execution failed: ${error.message}`);
|
|
688
679
|
}
|
|
689
|
-
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
690
683
|
* Handle original input for backward compatibility
|
|
691
|
-
*/
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
684
|
+
*/
|
|
685
|
+
async handleOriginalInput(key) {
|
|
686
|
+
// Handle original process view navigation
|
|
687
|
+
if (this.currentView === ALL_VIEWS.PROCESSES) {
|
|
688
|
+
switch (key) {
|
|
689
|
+
case '\x1b[A': // Up arrow
|
|
690
|
+
this.selectedIndex = Math.max(0, this.selectedIndex - 1);
|
|
691
|
+
break;
|
|
692
|
+
case '\x1b[B': // Down arrow
|
|
693
|
+
this.selectedIndex = Math.min(this.processes.size - 1, this.selectedIndex + 1);
|
|
694
|
+
break;
|
|
695
|
+
case ' ':
|
|
696
|
+
case '\r':
|
|
697
|
+
await this.toggleSelectedProcess();
|
|
698
|
+
break;
|
|
699
|
+
}
|
|
707
700
|
}
|
|
708
|
-
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
/**
|
|
709
704
|
* Toggle selected process status
|
|
710
|
-
*/
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
}
|
|
705
|
+
*/
|
|
706
|
+
async toggleSelectedProcess() {
|
|
707
|
+
const processes = Array.from(this.processes.values());
|
|
708
|
+
const selected = processes[this.selectedIndex];
|
|
709
|
+
|
|
710
|
+
if (selected) {
|
|
711
|
+
if (selected.status === 'running') {
|
|
712
|
+
selected.status = 'stopped';
|
|
713
|
+
selected.pid = null;
|
|
714
|
+
this.addLog('warning', `Stopped ${selected.name}`);
|
|
715
|
+
} else {
|
|
716
|
+
selected.status = 'running';
|
|
717
|
+
selected.pid = Math.floor(Math.random() * 50000) + 1000;
|
|
718
|
+
this.addLog('success', `Started ${selected.name}`);
|
|
719
|
+
}
|
|
724
720
|
}
|
|
725
|
-
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
/**
|
|
726
724
|
* Add log entry with enhanced formatting
|
|
727
|
-
*/
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
725
|
+
*/
|
|
726
|
+
addLog(level, message) {
|
|
727
|
+
const logEntry = {
|
|
728
|
+
time: new Date(),
|
|
729
|
+
level,
|
|
730
|
+
message,
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
this.logs.unshift(logEntry);
|
|
734
|
+
|
|
735
|
+
// Keep only last 100 logs
|
|
736
|
+
if (this.logs.length > 100) {
|
|
737
|
+
this.logs = this.logs.slice(0, 100);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
// Emit log event for real-time updates
|
|
741
|
+
if (this.realtimeUpdates) {
|
|
742
|
+
this.realtimeUpdates.emit('log_added', logEntry);
|
|
742
743
|
}
|
|
743
|
-
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
/**
|
|
744
747
|
* Render process view (original)
|
|
745
|
-
*/
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
748
|
+
*/
|
|
749
|
+
renderProcessView() {
|
|
750
|
+
console.log(this.colors.white(this.colors.bold('Process Management')));
|
|
751
|
+
console.log();
|
|
752
|
+
|
|
753
|
+
let index = 0;
|
|
754
|
+
for (const [id, process] of this.processes) {
|
|
755
|
+
const selected = index === this.selectedIndex;
|
|
756
|
+
const prefix = selected ? this.colors.yellow('▶ ') : ' ';
|
|
757
|
+
const status = this.getStatusIcon(process.status);
|
|
758
|
+
const name = selected ? this.colors.yellow(process.name) : this.colors.white(process.name);
|
|
759
|
+
|
|
760
|
+
console.log(`${prefix}${status} ${name}`);
|
|
761
|
+
console.log(` ${this.colors.gray(process.description)}`);
|
|
762
|
+
|
|
763
|
+
if (process.status === 'running') {
|
|
764
|
+
const stats = this.colors.dim(
|
|
765
|
+
`PID: ${process.pid} | Uptime: ${this.formatUptime(process.uptime)} | CPU: ${process.cpu.toFixed(1)}% | Mem: ${process.memory.toFixed(0)}MB`,
|
|
766
|
+
);
|
|
767
|
+
console.log(` ${stats}`);
|
|
768
|
+
}
|
|
769
|
+
console.log();
|
|
770
|
+
|
|
771
|
+
index++;
|
|
768
772
|
}
|
|
769
|
-
|
|
773
|
+
|
|
774
|
+
// Enhanced stats
|
|
775
|
+
const running = Array.from(this.processes.values()).filter(
|
|
776
|
+
(p) => p.status === 'running',
|
|
777
|
+
).length;
|
|
778
|
+
console.log(this.colors.gray('─'.repeat(80)));
|
|
779
|
+
console.log(
|
|
780
|
+
this.colors.white(
|
|
781
|
+
`Total: ${this.processes.size} | Running: ${this.colors.green(running)} | Stopped: ${this.colors.gray(this.processes.size - running)}`,
|
|
782
|
+
),
|
|
783
|
+
);
|
|
784
|
+
console.log(
|
|
785
|
+
this.colors.cyan(
|
|
786
|
+
`Enhanced: ${this.colors.yellow('87 MCP tools')} available across ${this.colors.yellow('8 categories')}`,
|
|
787
|
+
),
|
|
788
|
+
);
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
/**
|
|
770
792
|
* Render status view with enhanced metrics
|
|
771
|
-
*/
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
}
|
|
793
|
+
*/
|
|
794
|
+
renderStatusView() {
|
|
795
|
+
console.log(this.colors.white(this.colors.bold('Enhanced System Status')));
|
|
796
|
+
console.log();
|
|
797
|
+
|
|
798
|
+
// System overview
|
|
799
|
+
console.log(this.colors.cyan('📊 System Overview'));
|
|
800
|
+
console.log(` Uptime: ${this.colors.green(this.formatUptime(this.systemStats.uptime))}`);
|
|
801
|
+
console.log(` Process Health: ${this.getHealthBar()}`);
|
|
802
|
+
console.log(` MCP Tools: ${this.colors.yellow('87')} available`);
|
|
803
|
+
console.log(` Tool Categories: ${this.colors.blue('8')} active`);
|
|
804
|
+
console.log();
|
|
805
|
+
|
|
806
|
+
// Enhanced resource usage
|
|
807
|
+
console.log(this.colors.cyan('💻 Resource Usage'));
|
|
808
|
+
console.log(
|
|
809
|
+
` CPU Usage: ${this.getUsageBar(this.systemStats.cpuUsage, 100)} ${this.systemStats.cpuUsage.toFixed(1)}%`,
|
|
810
|
+
);
|
|
811
|
+
console.log(
|
|
812
|
+
` Memory: ${this.getUsageBar(this.systemStats.memoryUsage, 100)} ${this.systemStats.memoryUsage.toFixed(1)}%`,
|
|
813
|
+
);
|
|
814
|
+
console.log();
|
|
815
|
+
|
|
816
|
+
// Enhanced activity metrics
|
|
817
|
+
console.log(this.colors.cyan('📈 Enhanced Activity Metrics'));
|
|
818
|
+
console.log(
|
|
819
|
+
` Active Agents: ${this.colors.yellow(this.agents.filter((a) => a.status === 'working').length)}/${this.agents.length}`,
|
|
820
|
+
);
|
|
821
|
+
console.log(` Total Tasks: ${this.tasks.length}`);
|
|
822
|
+
console.log(` Tool Executions: ${this.colors.green('Running')}`);
|
|
823
|
+
console.log(` Real-time Updates: ${this.colors.green('Active')}`);
|
|
824
|
+
console.log();
|
|
825
|
+
|
|
826
|
+
// Tool status
|
|
827
|
+
const mcpStatus = this.mcpIntegration ? this.mcpIntegration.getStatus() : null;
|
|
828
|
+
if (mcpStatus) {
|
|
829
|
+
console.log(this.colors.cyan('🔧 Tool System Status'));
|
|
830
|
+
console.log(
|
|
831
|
+
` MCP Connection: ${mcpStatus.mcpAvailable ? this.colors.green('Connected') : this.colors.red('Mock Mode')}`,
|
|
832
|
+
);
|
|
833
|
+
console.log(` Active Executions: ${this.colors.yellow(mcpStatus.activeExecutions || 0)}`);
|
|
834
|
+
console.log(` Cache Size: ${this.colors.blue(mcpStatus.cacheSize || 0)} entries`);
|
|
835
|
+
console.log();
|
|
810
836
|
}
|
|
811
|
-
|
|
837
|
+
|
|
838
|
+
// Recent events
|
|
839
|
+
console.log(this.colors.cyan('🔔 Recent Events'));
|
|
840
|
+
this.logs.slice(0, 5).forEach((log) => {
|
|
841
|
+
const time = log.time.toLocaleTimeString();
|
|
842
|
+
const icon =
|
|
843
|
+
log.level === 'success'
|
|
844
|
+
? '✓'
|
|
845
|
+
: log.level === 'warning'
|
|
846
|
+
? '⚠'
|
|
847
|
+
: log.level === 'error'
|
|
848
|
+
? '❌'
|
|
849
|
+
: 'ℹ';
|
|
850
|
+
const color =
|
|
851
|
+
log.level === 'success'
|
|
852
|
+
? this.colors.green
|
|
853
|
+
: log.level === 'warning'
|
|
854
|
+
? this.colors.yellow
|
|
855
|
+
: log.level === 'error'
|
|
856
|
+
? this.colors.red
|
|
857
|
+
: this.colors.blue;
|
|
858
|
+
console.log(` ${this.colors.gray(time)} ${color(icon)} ${log.message}`);
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/**
|
|
812
863
|
* Render orchestration view (enhanced)
|
|
813
|
-
*/
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
const prefix = selected ? this.colors.yellow('▶ ') : ' ';
|
|
834
|
-
const statusIcon = agent.status === 'working' ? this.colors.green('●') : this.colors.gray('○');
|
|
835
|
-
const name = selected ? this.colors.yellow(agent.name) : this.colors.white(agent.name);
|
|
836
|
-
console.log(`${prefix}${statusIcon} ${name} (${agent.type})`);
|
|
837
|
-
console.log(` ID: ${agent.id} | Tasks: ${agent.tasks} | Status: ${agent.status}`);
|
|
838
|
-
if (agent.capabilities && agent.capabilities.length > 0) {
|
|
839
|
-
console.log(` Capabilities: ${this.colors.dim(agent.capabilities.join(', '))}`);
|
|
840
|
-
}
|
|
841
|
-
console.log();
|
|
842
|
-
});
|
|
843
|
-
console.log(this.colors.gray('─'.repeat(40)));
|
|
844
|
-
console.log(this.colors.cyan('⚡ Quick Actions: [1-9] Execute swarm tools | [r] Run custom tool'));
|
|
864
|
+
*/
|
|
865
|
+
renderOrchestrationView() {
|
|
866
|
+
console.log(this.colors.white(this.colors.bold('Enhanced Swarm Orchestration')));
|
|
867
|
+
console.log();
|
|
868
|
+
|
|
869
|
+
// Enhanced swarm metrics
|
|
870
|
+
const metrics = this.swarmIntegration.getSwarmMetrics();
|
|
871
|
+
if (metrics) {
|
|
872
|
+
console.log(this.colors.cyan('🐝 Swarm Status'));
|
|
873
|
+
console.log(` Swarm ID: ${this.colors.yellow(metrics.swarmId)}`);
|
|
874
|
+
console.log(` Topology: ${this.colors.blue('hierarchical')} (optimized)`);
|
|
875
|
+
console.log(
|
|
876
|
+
` Agents: ${this.colors.green(metrics.agents.active)}/${metrics.agents.total} active`,
|
|
877
|
+
);
|
|
878
|
+
console.log(
|
|
879
|
+
` Tasks: ${this.colors.yellow(metrics.tasks.inProgress)} in progress, ${this.colors.green(metrics.tasks.completed)} completed`,
|
|
880
|
+
);
|
|
881
|
+
console.log(` Efficiency: ${this.colors.green(metrics.efficiency + '%')}`);
|
|
882
|
+
console.log(` Coordination Tools: ${this.colors.cyan('12')} available`);
|
|
883
|
+
console.log();
|
|
845
884
|
}
|
|
846
|
-
|
|
885
|
+
|
|
886
|
+
// Enhanced agents section
|
|
887
|
+
console.log(this.colors.cyan('🤖 Enhanced Agent Pool'));
|
|
888
|
+
console.log();
|
|
889
|
+
this.agents.forEach((agent, index) => {
|
|
890
|
+
const selected = this.currentView === ALL_VIEWS.ORCHESTRATION && index === this.selectedIndex;
|
|
891
|
+
const prefix = selected ? this.colors.yellow('▶ ') : ' ';
|
|
892
|
+
const statusIcon =
|
|
893
|
+
agent.status === 'working' ? this.colors.green('●') : this.colors.gray('○');
|
|
894
|
+
const name = selected ? this.colors.yellow(agent.name) : this.colors.white(agent.name);
|
|
895
|
+
|
|
896
|
+
console.log(`${prefix}${statusIcon} ${name} (${agent.type})`);
|
|
897
|
+
console.log(` ID: ${agent.id} | Tasks: ${agent.tasks} | Status: ${agent.status}`);
|
|
898
|
+
if (agent.capabilities && agent.capabilities.length > 0) {
|
|
899
|
+
console.log(` Capabilities: ${this.colors.dim(agent.capabilities.join(', '))}`);
|
|
900
|
+
}
|
|
901
|
+
console.log();
|
|
902
|
+
});
|
|
903
|
+
|
|
904
|
+
console.log(this.colors.gray('─'.repeat(40)));
|
|
905
|
+
console.log(
|
|
906
|
+
this.colors.cyan('⚡ Quick Actions: [1-9] Execute swarm tools | [r] Run custom tool'),
|
|
907
|
+
);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/**
|
|
847
911
|
* Render memory view (enhanced)
|
|
848
|
-
*/
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
912
|
+
*/
|
|
913
|
+
renderMemoryView() {
|
|
914
|
+
console.log(this.colors.white(this.colors.bold('Enhanced Memory Management')));
|
|
915
|
+
console.log();
|
|
916
|
+
|
|
917
|
+
// Enhanced memory overview
|
|
918
|
+
console.log(this.colors.cyan('💾 Memory Overview'));
|
|
919
|
+
console.log(` Total Entries: ${this.colors.yellow(this.memoryStats.totalEntries)}`);
|
|
920
|
+
console.log(` Total Size: ${this.colors.blue(this.memoryStats.totalSize)}`);
|
|
921
|
+
console.log(` Namespaces: ${this.colors.green(this.memoryStats.namespaces.length)}`);
|
|
922
|
+
console.log(` Persistence Tools: ${this.colors.cyan('12')} available`);
|
|
923
|
+
console.log();
|
|
924
|
+
|
|
925
|
+
// Enhanced namespace details
|
|
926
|
+
console.log(this.colors.cyan('📂 Namespace Details'));
|
|
927
|
+
this.memoryStats.namespaces.forEach((ns) => {
|
|
928
|
+
const usageBar = this.getUsageBar(ns.entries, 100);
|
|
929
|
+
console.log(
|
|
930
|
+
` ${this.colors.white(ns.name.padEnd(12))} ${usageBar} ${this.colors.yellow(ns.entries)} entries (${this.colors.blue(ns.size)})`,
|
|
931
|
+
);
|
|
932
|
+
});
|
|
933
|
+
|
|
934
|
+
console.log();
|
|
935
|
+
console.log(this.colors.cyan('⚡ Memory Tools Available:'));
|
|
936
|
+
console.log(` ${this.colors.gray('• Store/Retrieve operations')}`);
|
|
937
|
+
console.log(` ${this.colors.gray('• Backup and restore')}`);
|
|
938
|
+
console.log(` ${this.colors.gray('• Cross-session persistence')}`);
|
|
939
|
+
console.log(` ${this.colors.gray('• Memory analytics and compression')}`);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
/**
|
|
872
943
|
* Render logs view (enhanced)
|
|
873
|
-
*/
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
944
|
+
*/
|
|
945
|
+
renderLogsView() {
|
|
946
|
+
console.log(this.colors.white(this.colors.bold('Enhanced System Logs')));
|
|
947
|
+
console.log();
|
|
948
|
+
|
|
949
|
+
console.log(this.colors.cyan(`📋 Recent Activity (${this.logs.length} total entries)`));
|
|
950
|
+
console.log();
|
|
951
|
+
|
|
952
|
+
this.logs.slice(0, 15).forEach((log) => {
|
|
953
|
+
const time = log.time.toLocaleTimeString();
|
|
954
|
+
const icon =
|
|
955
|
+
log.level === 'success'
|
|
956
|
+
? this.colors.green('✅')
|
|
957
|
+
: log.level === 'warning'
|
|
958
|
+
? this.colors.yellow('⚠️')
|
|
959
|
+
: log.level === 'error'
|
|
960
|
+
? this.colors.red('❌')
|
|
961
|
+
: this.colors.blue('ℹ️');
|
|
962
|
+
|
|
963
|
+
console.log(`${this.colors.gray(time)} ${icon} ${log.message}`);
|
|
964
|
+
});
|
|
965
|
+
|
|
966
|
+
console.log();
|
|
967
|
+
console.log(this.colors.gray('─'.repeat(80)));
|
|
968
|
+
console.log(
|
|
969
|
+
this.colors.cyan(
|
|
970
|
+
'🔍 Log Analysis Tools Available: Pattern detection, error analysis, usage statistics',
|
|
971
|
+
),
|
|
972
|
+
);
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
/**
|
|
888
976
|
* Utility methods
|
|
889
|
-
*/
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
977
|
+
*/
|
|
978
|
+
getStatusIcon(status) {
|
|
979
|
+
return status === 'running' ? this.colors.green('●') : this.colors.gray('○');
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
formatUptime(seconds) {
|
|
983
|
+
const hours = Math.floor(seconds / 3600);
|
|
984
|
+
const minutes = Math.floor((seconds % 3600) / 60);
|
|
985
|
+
const secs = seconds % 60;
|
|
986
|
+
return `${hours}h ${minutes}m ${secs}s`;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
getHealthBar() {
|
|
990
|
+
const running = Array.from(this.processes.values()).filter(
|
|
991
|
+
(p) => p.status === 'running',
|
|
992
|
+
).length;
|
|
993
|
+
const total = this.processes.size;
|
|
994
|
+
const percentage = (running / total) * 100;
|
|
995
|
+
return this.getUsageBar(percentage, 100);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
getUsageBar(value, max, width = 20) {
|
|
999
|
+
const percentage = Math.min((value / max) * 100, 100);
|
|
1000
|
+
const filled = Math.round((percentage / 100) * width);
|
|
1001
|
+
const empty = width - filled;
|
|
1002
|
+
|
|
1003
|
+
const color =
|
|
1004
|
+
percentage > 80 ? this.colors.red : percentage > 60 ? this.colors.yellow : this.colors.green;
|
|
1005
|
+
return color('█'.repeat(filled)) + this.colors.gray('░'.repeat(empty));
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
912
1009
|
* Shutdown the enhanced UI
|
|
913
|
-
*/
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
process.stdin.setRawMode(false);
|
|
926
|
-
}
|
|
927
|
-
process.stdin.pause();
|
|
928
|
-
this.running = false;
|
|
929
|
-
console.log();
|
|
930
|
-
printSuccess('👋 Enhanced Web UI shutdown complete');
|
|
931
|
-
process.exit(0);
|
|
1010
|
+
*/
|
|
1011
|
+
async shutdown() {
|
|
1012
|
+
console.log();
|
|
1013
|
+
this.addLog('info', 'Shutting down Enhanced Web UI...');
|
|
1014
|
+
|
|
1015
|
+
// Cleanup enhanced components
|
|
1016
|
+
if (this.enhancedViews) {
|
|
1017
|
+
this.enhancedViews.cleanup();
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
if (this.realtimeUpdates) {
|
|
1021
|
+
this.realtimeUpdates.cleanup();
|
|
932
1022
|
}
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
this.currentView = ALL_VIEWS.PROCESSES;
|
|
938
|
-
this.agents = [];
|
|
939
|
-
this.tasks = [];
|
|
940
|
-
this.memoryStats = {
|
|
941
|
-
totalEntries: 0,
|
|
942
|
-
totalSize: 0,
|
|
943
|
-
namespaces: []
|
|
944
|
-
};
|
|
945
|
-
this.logs = [];
|
|
946
|
-
this.systemStats = {
|
|
947
|
-
uptime: 0,
|
|
948
|
-
totalTasks: 0,
|
|
949
|
-
completedTasks: 0,
|
|
950
|
-
activeAgents: 0,
|
|
951
|
-
memoryUsage: 0,
|
|
952
|
-
cpuUsage: 0
|
|
953
|
-
};
|
|
954
|
-
// Enhanced components
|
|
955
|
-
this.mcpIntegration = null;
|
|
956
|
-
this.toolFramework = null;
|
|
957
|
-
this.enhancedViews = null;
|
|
958
|
-
this.realtimeUpdates = null;
|
|
959
|
-
// Input handling
|
|
960
|
-
this.inputBuffer = '';
|
|
961
|
-
this.commandHistory = [];
|
|
962
|
-
this.historyIndex = -1;
|
|
963
|
-
// Colors for consistent styling
|
|
964
|
-
this.colors = {
|
|
965
|
-
cyan: (text)=>`\x1b[36m${text}\x1b[0m`,
|
|
966
|
-
gray: (text)=>`\x1b[90m${text}\x1b[0m`,
|
|
967
|
-
white: (text)=>`\x1b[37m${text}\x1b[0m`,
|
|
968
|
-
yellow: (text)=>`\x1b[33m${text}\x1b[0m`,
|
|
969
|
-
green: (text)=>`\x1b[32m${text}\x1b[0m`,
|
|
970
|
-
red: (text)=>`\x1b[31m${text}\x1b[0m`,
|
|
971
|
-
blue: (text)=>`\x1b[34m${text}\x1b[0m`,
|
|
972
|
-
magenta: (text)=>`\x1b[35m${text}\x1b[0m`,
|
|
973
|
-
bold: (text)=>`\x1b[1m${text}\x1b[0m`,
|
|
974
|
-
dim: (text)=>`\x1b[2m${text}\x1b[0m`
|
|
975
|
-
};
|
|
976
|
-
this.initializeEnhancedUI();
|
|
1023
|
+
|
|
1024
|
+
// Reset terminal
|
|
1025
|
+
if (process.stdin.setRawMode) {
|
|
1026
|
+
process.stdin.setRawMode(false);
|
|
977
1027
|
}
|
|
1028
|
+
process.stdin.pause();
|
|
1029
|
+
|
|
1030
|
+
this.running = false;
|
|
1031
|
+
|
|
1032
|
+
console.log();
|
|
1033
|
+
printSuccess('👋 Enhanced Web UI shutdown complete');
|
|
1034
|
+
process.exit(0);
|
|
1035
|
+
}
|
|
978
1036
|
}
|
|
1037
|
+
|
|
979
1038
|
export default EnhancedWebUIComplete;
|