claude-flow-novice 2.0.3 → 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/swarm.js +1 -1
- package/dist/src/cli/main.js +1 -1
- package/dist/src/coordination/byzantine-memory-channels.js +25 -1
- package/dist/src/index.js +384 -35
- package/dist/src/utils/error-handler.js +2 -36
- 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 +6 -4
- package/dist/src/cli/minimal-main.js +0 -22
- 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
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebSocket Handler for APM Integration
|
|
3
|
+
* Real-time APM metrics and alerts over WebSocket connections
|
|
4
|
+
*/ function _define_property(obj, key, value) {
|
|
5
|
+
if (key in obj) {
|
|
6
|
+
Object.defineProperty(obj, key, {
|
|
7
|
+
value: value,
|
|
8
|
+
enumerable: true,
|
|
9
|
+
configurable: true,
|
|
10
|
+
writable: true
|
|
11
|
+
});
|
|
12
|
+
} else {
|
|
13
|
+
obj[key] = value;
|
|
14
|
+
}
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
export class APMWebSocketHandler {
|
|
18
|
+
setupEventHandlers() {
|
|
19
|
+
this.io.on('connection', (socket)=>{
|
|
20
|
+
this.handleConnection(socket);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
handleConnection(socket) {
|
|
24
|
+
const client = {
|
|
25
|
+
socketId: socket.id,
|
|
26
|
+
subscriptions: new Set(),
|
|
27
|
+
lastActivity: new Date(),
|
|
28
|
+
filters: {}
|
|
29
|
+
};
|
|
30
|
+
this.clients.set(socket.id, client);
|
|
31
|
+
// Setup client-specific event handlers
|
|
32
|
+
socket.on('subscribe', (data)=>this.handleSubscribe(socket, data));
|
|
33
|
+
socket.on('unsubscribe', (data)=>this.handleUnsubscribe(socket, data));
|
|
34
|
+
socket.on('set-filters', (filters)=>this.handleSetFilters(socket, filters));
|
|
35
|
+
socket.on('request-metrics', (data)=>this.handleRequestMetrics(socket, data));
|
|
36
|
+
socket.on('trace-agent', (data)=>this.handleTraceAgent(socket, data));
|
|
37
|
+
socket.on('trace-swarm', (data)=>this.handleTraceSwarm(socket, data));
|
|
38
|
+
socket.on('run-integration-test', ()=>this.handleRunIntegrationTest(socket));
|
|
39
|
+
socket.on('disconnect', ()=>this.handleDisconnection(socket.id));
|
|
40
|
+
socket.on('error', (error)=>this.handleError(socket, error));
|
|
41
|
+
// Send initial connection message
|
|
42
|
+
socket.emit('apm-connected', {
|
|
43
|
+
socketId: socket.id,
|
|
44
|
+
timestamp: new Date().toISOString(),
|
|
45
|
+
availableSubscriptions: [
|
|
46
|
+
'health-status',
|
|
47
|
+
'performance-metrics',
|
|
48
|
+
'recommendations',
|
|
49
|
+
'alerts',
|
|
50
|
+
'slow-queries',
|
|
51
|
+
'cache-performance'
|
|
52
|
+
]
|
|
53
|
+
});
|
|
54
|
+
// Send initial data
|
|
55
|
+
this.sendInitialData(socket);
|
|
56
|
+
}
|
|
57
|
+
handleSubscribe(socket, data) {
|
|
58
|
+
const client = this.clients.get(socket.id);
|
|
59
|
+
if (!client) return;
|
|
60
|
+
const { subscriptions } = data;
|
|
61
|
+
if (!Array.isArray(subscriptions)) {
|
|
62
|
+
socket.emit('error', {
|
|
63
|
+
message: 'Invalid subscriptions format'
|
|
64
|
+
});
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const validSubscriptions = [
|
|
68
|
+
'health-status',
|
|
69
|
+
'performance-metrics',
|
|
70
|
+
'recommendations',
|
|
71
|
+
'alerts',
|
|
72
|
+
'slow-queries',
|
|
73
|
+
'cache-performance'
|
|
74
|
+
];
|
|
75
|
+
subscriptions.forEach((sub)=>{
|
|
76
|
+
if (validSubscriptions.includes(sub)) {
|
|
77
|
+
client.subscriptions.add(sub);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
client.lastActivity = new Date();
|
|
81
|
+
socket.emit('subscribed', {
|
|
82
|
+
subscriptions: Array.from(client.subscriptions),
|
|
83
|
+
timestamp: new Date().toISOString()
|
|
84
|
+
});
|
|
85
|
+
// Send current data for new subscriptions
|
|
86
|
+
this.sendSubscriptionData(socket, subscriptions);
|
|
87
|
+
}
|
|
88
|
+
handleUnsubscribe(socket, data) {
|
|
89
|
+
const client = this.clients.get(socket.id);
|
|
90
|
+
if (!client) return;
|
|
91
|
+
const { subscriptions } = data;
|
|
92
|
+
if (!Array.isArray(subscriptions)) {
|
|
93
|
+
socket.emit('error', {
|
|
94
|
+
message: 'Invalid subscriptions format'
|
|
95
|
+
});
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
subscriptions.forEach((sub)=>{
|
|
99
|
+
client.subscriptions.delete(sub);
|
|
100
|
+
});
|
|
101
|
+
client.lastActivity = new Date();
|
|
102
|
+
socket.emit('unsubscribed', {
|
|
103
|
+
subscriptions: Array.from(client.subscriptions),
|
|
104
|
+
timestamp: new Date().toISOString()
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
handleSetFilters(socket, filters) {
|
|
108
|
+
const client = this.clients.get(socket.id);
|
|
109
|
+
if (!client) return;
|
|
110
|
+
client.filters = {
|
|
111
|
+
...client.filters,
|
|
112
|
+
...filters
|
|
113
|
+
};
|
|
114
|
+
client.lastActivity = new Date();
|
|
115
|
+
socket.emit('filters-updated', {
|
|
116
|
+
filters: client.filters,
|
|
117
|
+
timestamp: new Date().toISOString()
|
|
118
|
+
});
|
|
119
|
+
// Re-send data with new filters
|
|
120
|
+
this.sendSubscriptionData(socket, Array.from(client.subscriptions));
|
|
121
|
+
}
|
|
122
|
+
handleRequestMetrics(socket, data) {
|
|
123
|
+
const client = this.clients.get(socket.id);
|
|
124
|
+
if (!client) return;
|
|
125
|
+
client.lastActivity = new Date();
|
|
126
|
+
try {
|
|
127
|
+
const analytics = this.apmIntegration.getPerformanceAnalytics();
|
|
128
|
+
const timeRange = data.timeRange || '1h';
|
|
129
|
+
const type = data.type || 'overview';
|
|
130
|
+
let responseData = {
|
|
131
|
+
timeRange,
|
|
132
|
+
type,
|
|
133
|
+
timestamp: new Date().toISOString()
|
|
134
|
+
};
|
|
135
|
+
switch(type){
|
|
136
|
+
case 'overview':
|
|
137
|
+
responseData = {
|
|
138
|
+
...responseData,
|
|
139
|
+
...analytics
|
|
140
|
+
};
|
|
141
|
+
break;
|
|
142
|
+
case 'performance':
|
|
143
|
+
responseData.metrics = analytics.metrics;
|
|
144
|
+
break;
|
|
145
|
+
case 'recommendations':
|
|
146
|
+
responseData.recommendations = analytics.recommendations;
|
|
147
|
+
break;
|
|
148
|
+
case 'trends':
|
|
149
|
+
responseData.trends = analytics.trends;
|
|
150
|
+
break;
|
|
151
|
+
default:
|
|
152
|
+
responseData = {
|
|
153
|
+
...responseData,
|
|
154
|
+
...analytics
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
socket.emit('metrics-response', responseData);
|
|
158
|
+
} catch (error) {
|
|
159
|
+
socket.emit('error', {
|
|
160
|
+
message: 'Failed to fetch metrics',
|
|
161
|
+
error: error.message
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
handleTraceAgent(socket, data) {
|
|
166
|
+
const client = this.clients.get(socket.id);
|
|
167
|
+
if (!client) return;
|
|
168
|
+
client.lastActivity = new Date();
|
|
169
|
+
try {
|
|
170
|
+
this.apmIntegration.traceAgentLifecycle(data.agentType, data.lifecycleEvent, data.agentId, {
|
|
171
|
+
...data.metadata,
|
|
172
|
+
source: 'websocket',
|
|
173
|
+
clientId: socket.id
|
|
174
|
+
});
|
|
175
|
+
socket.emit('trace-acknowledged', {
|
|
176
|
+
type: 'agent',
|
|
177
|
+
agentType: data.agentType,
|
|
178
|
+
lifecycleEvent: data.lifecycleEvent,
|
|
179
|
+
agentId: data.agentId,
|
|
180
|
+
timestamp: new Date().toISOString()
|
|
181
|
+
});
|
|
182
|
+
} catch (error) {
|
|
183
|
+
socket.emit('error', {
|
|
184
|
+
message: 'Failed to trace agent lifecycle',
|
|
185
|
+
error: error.message
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
handleTraceSwarm(socket, data) {
|
|
190
|
+
const client = this.clients.get(socket.id);
|
|
191
|
+
if (!client) return;
|
|
192
|
+
client.lastActivity = new Date();
|
|
193
|
+
try {
|
|
194
|
+
this.apmIntegration.traceSwarmActivity(data.swarmId, data.activity, data.topology, data.agentCount || 0, {
|
|
195
|
+
...data.metadata,
|
|
196
|
+
source: 'websocket',
|
|
197
|
+
clientId: socket.id
|
|
198
|
+
});
|
|
199
|
+
socket.emit('trace-acknowledged', {
|
|
200
|
+
type: 'swarm',
|
|
201
|
+
swarmId: data.swarmId,
|
|
202
|
+
activity: data.activity,
|
|
203
|
+
topology: data.topology,
|
|
204
|
+
agentCount: data.agentCount,
|
|
205
|
+
timestamp: new Date().toISOString()
|
|
206
|
+
});
|
|
207
|
+
} catch (error) {
|
|
208
|
+
socket.emit('error', {
|
|
209
|
+
message: 'Failed to trace swarm activity',
|
|
210
|
+
error: error.message
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
async handleRunIntegrationTest(socket) {
|
|
215
|
+
const client = this.clients.get(socket.id);
|
|
216
|
+
if (!client) return;
|
|
217
|
+
client.lastActivity = new Date();
|
|
218
|
+
try {
|
|
219
|
+
socket.emit('integration-test-started', {
|
|
220
|
+
timestamp: new Date().toISOString()
|
|
221
|
+
});
|
|
222
|
+
const results = await this.apmIntegration.runIntegrationTest();
|
|
223
|
+
socket.emit('integration-test-completed', {
|
|
224
|
+
results,
|
|
225
|
+
timestamp: new Date().toISOString()
|
|
226
|
+
});
|
|
227
|
+
} catch (error) {
|
|
228
|
+
socket.emit('error', {
|
|
229
|
+
message: 'Integration test failed',
|
|
230
|
+
error: error.message
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
handleDisconnection(socketId) {
|
|
235
|
+
this.clients.delete(socketId);
|
|
236
|
+
}
|
|
237
|
+
handleError(socket, error) {
|
|
238
|
+
console.error('WebSocket error:', error);
|
|
239
|
+
const client = this.clients.get(socket.id);
|
|
240
|
+
if (client) {
|
|
241
|
+
client.lastActivity = new Date();
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
sendInitialData(socket) {
|
|
245
|
+
try {
|
|
246
|
+
// Send initial health status
|
|
247
|
+
this.apmIntegration.getHealthStatus().then((health)=>{
|
|
248
|
+
socket.emit('health-status-update', {
|
|
249
|
+
...health,
|
|
250
|
+
timestamp: new Date().toISOString()
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
// Send initial performance metrics
|
|
254
|
+
const analytics = this.apmIntegration.getPerformanceAnalytics();
|
|
255
|
+
socket.emit('performance-metrics-update', {
|
|
256
|
+
...analytics,
|
|
257
|
+
timestamp: new Date().toISOString()
|
|
258
|
+
});
|
|
259
|
+
} catch (error) {
|
|
260
|
+
console.error('Failed to send initial data:', error);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
sendSubscriptionData(socket, subscriptions) {
|
|
264
|
+
const client = this.clients.get(socket.id);
|
|
265
|
+
if (!client) return;
|
|
266
|
+
subscriptions.forEach((subscription)=>{
|
|
267
|
+
switch(subscription){
|
|
268
|
+
case 'health-status':
|
|
269
|
+
this.apmIntegration.getHealthStatus().then((health)=>{
|
|
270
|
+
socket.emit('health-status-update', {
|
|
271
|
+
...health,
|
|
272
|
+
timestamp: new Date().toISOString()
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
break;
|
|
276
|
+
case 'performance-metrics':
|
|
277
|
+
const analytics = this.apmIntegration.getPerformanceAnalytics();
|
|
278
|
+
socket.emit('performance-metrics-update', {
|
|
279
|
+
...analytics,
|
|
280
|
+
timestamp: new Date().toISOString()
|
|
281
|
+
});
|
|
282
|
+
break;
|
|
283
|
+
case 'recommendations':
|
|
284
|
+
const recommendations = this.apmIntegration.getPerformanceAnalytics().recommendations;
|
|
285
|
+
socket.emit('recommendations-update', {
|
|
286
|
+
recommendations,
|
|
287
|
+
timestamp: new Date().toISOString()
|
|
288
|
+
});
|
|
289
|
+
break;
|
|
290
|
+
case 'slow-queries':
|
|
291
|
+
const collectors = this.apmIntegration.getCollectors();
|
|
292
|
+
if (collectors.performanceOptimizer) {
|
|
293
|
+
const slowQueries = collectors.performanceOptimizer.getSlowQueries();
|
|
294
|
+
socket.emit('slow-queries-update', {
|
|
295
|
+
slowQueries,
|
|
296
|
+
timestamp: new Date().toISOString()
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
break;
|
|
300
|
+
case 'cache-performance':
|
|
301
|
+
const perfCollectors = this.apmIntegration.getCollectors();
|
|
302
|
+
if (perfCollectors.performanceOptimizer) {
|
|
303
|
+
const cacheHitRates = perfCollectors.performanceOptimizer.getCacheHitRates();
|
|
304
|
+
socket.emit('cache-performance-update', {
|
|
305
|
+
cacheHitRates: Object.fromEntries(cacheHitRates),
|
|
306
|
+
timestamp: new Date().toISOString()
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
break;
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
startRealTimeUpdates() {
|
|
314
|
+
// Send health status updates every 30 seconds
|
|
315
|
+
this.healthCheckInterval = setInterval(async ()=>{
|
|
316
|
+
try {
|
|
317
|
+
const health = await this.apmIntegration.getHealthStatus();
|
|
318
|
+
this.broadcastToSubscribers('health-status', 'health-status-update', {
|
|
319
|
+
...health,
|
|
320
|
+
timestamp: new Date().toISOString()
|
|
321
|
+
});
|
|
322
|
+
} catch (error) {
|
|
323
|
+
console.error('Failed to broadcast health status:', error);
|
|
324
|
+
}
|
|
325
|
+
}, 30000);
|
|
326
|
+
// Send performance metrics updates every 10 seconds
|
|
327
|
+
this.metricsInterval = setInterval(()=>{
|
|
328
|
+
try {
|
|
329
|
+
const analytics = this.apmIntegration.getPerformanceAnalytics();
|
|
330
|
+
this.broadcastToSubscribers('performance-metrics', 'performance-metrics-update', {
|
|
331
|
+
...analytics,
|
|
332
|
+
timestamp: new Date().toISOString()
|
|
333
|
+
});
|
|
334
|
+
// Send recommendations if any
|
|
335
|
+
if (analytics.recommendations.length > 0) {
|
|
336
|
+
this.broadcastToSubscribers('recommendations', 'recommendations-update', {
|
|
337
|
+
recommendations: analytics.recommendations,
|
|
338
|
+
timestamp: new Date().toISOString()
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
} catch (error) {
|
|
342
|
+
console.error('Failed to broadcast performance metrics:', error);
|
|
343
|
+
}
|
|
344
|
+
}, 10000);
|
|
345
|
+
}
|
|
346
|
+
broadcastToSubscribers(subscription, event, data) {
|
|
347
|
+
for (const [socketId, client] of this.clients){
|
|
348
|
+
if (client.subscriptions.has(subscription)) {
|
|
349
|
+
// Apply client filters if any
|
|
350
|
+
const filteredData = this.applyFilters(data, client.filters);
|
|
351
|
+
this.io.to(socketId).emit(event, filteredData);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
applyFilters(data, filters) {
|
|
356
|
+
// Apply component filters
|
|
357
|
+
if (filters.components && Array.isArray(filters.components) && data.components) {
|
|
358
|
+
const filteredComponents = {};
|
|
359
|
+
filters.components.forEach((component)=>{
|
|
360
|
+
if (data.components[component]) {
|
|
361
|
+
filteredComponents[component] = data.components[component];
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
data = {
|
|
365
|
+
...data,
|
|
366
|
+
components: filteredComponents
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
// Apply severity filters for recommendations
|
|
370
|
+
if (filters.severity && Array.isArray(filters.severity) && data.recommendations) {
|
|
371
|
+
data.recommendations = data.recommendations.filter((rec)=>filters.severity.includes(rec.priority));
|
|
372
|
+
}
|
|
373
|
+
return data;
|
|
374
|
+
}
|
|
375
|
+
// Public API methods
|
|
376
|
+
broadcastAlert(alert) {
|
|
377
|
+
this.broadcastToSubscribers('alerts', 'alert', {
|
|
378
|
+
...alert,
|
|
379
|
+
timestamp: new Date().toISOString()
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
broadcastSlowQuery(slowQuery) {
|
|
383
|
+
this.broadcastToSubscribers('slow-queries', 'slow-query-detected', {
|
|
384
|
+
...slowQuery,
|
|
385
|
+
timestamp: new Date().toISOString()
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
broadcastRecommendation(recommendation) {
|
|
389
|
+
this.broadcastToSubscribers('recommendations', 'new-recommendation', {
|
|
390
|
+
...recommendation,
|
|
391
|
+
timestamp: new Date().toISOString()
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
getClientStats() {
|
|
395
|
+
const subscriptionCounts = {};
|
|
396
|
+
let totalSubscriptions = 0;
|
|
397
|
+
for (const client of this.clients.values()){
|
|
398
|
+
totalSubscriptions += client.subscriptions.size;
|
|
399
|
+
for (const subscription of client.subscriptions){
|
|
400
|
+
subscriptionCounts[subscription] = (subscriptionCounts[subscription] || 0) + 1;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return {
|
|
404
|
+
totalClients: this.clients.size,
|
|
405
|
+
activeSubscriptions: subscriptionCounts,
|
|
406
|
+
averageSubscriptionsPerClient: this.clients.size > 0 ? totalSubscriptions / this.clients.size : 0
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
cleanupInactiveClients(maxInactiveTime = 300000) {
|
|
410
|
+
const now = new Date();
|
|
411
|
+
const inactiveClients = [];
|
|
412
|
+
for (const [socketId, client] of this.clients){
|
|
413
|
+
if (now.getTime() - client.lastActivity.getTime() > maxInactiveTime) {
|
|
414
|
+
inactiveClients.push(socketId);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
inactiveClients.forEach((socketId)=>{
|
|
418
|
+
this.io.to(socketId).disconnect();
|
|
419
|
+
this.clients.delete(socketId);
|
|
420
|
+
});
|
|
421
|
+
if (inactiveClients.length > 0) {
|
|
422
|
+
console.log(`Cleaned up ${inactiveClients.length} inactive WebSocket clients`);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
shutdown() {
|
|
426
|
+
if (this.metricsInterval) {
|
|
427
|
+
clearInterval(this.metricsInterval);
|
|
428
|
+
}
|
|
429
|
+
if (this.healthCheckInterval) {
|
|
430
|
+
clearInterval(this.healthCheckInterval);
|
|
431
|
+
}
|
|
432
|
+
// Disconnect all clients
|
|
433
|
+
for (const socketId of this.clients.keys()){
|
|
434
|
+
this.io.to(socketId).disconnect();
|
|
435
|
+
}
|
|
436
|
+
this.clients.clear();
|
|
437
|
+
}
|
|
438
|
+
constructor(io, apmIntegration){
|
|
439
|
+
_define_property(this, "io", void 0);
|
|
440
|
+
_define_property(this, "apmIntegration", void 0);
|
|
441
|
+
_define_property(this, "clients", void 0);
|
|
442
|
+
_define_property(this, "metricsInterval", void 0);
|
|
443
|
+
_define_property(this, "healthCheckInterval", void 0);
|
|
444
|
+
this.io = io;
|
|
445
|
+
this.apmIntegration = apmIntegration;
|
|
446
|
+
this.clients = new Map();
|
|
447
|
+
this.setupEventHandlers();
|
|
448
|
+
this.startRealTimeUpdates();
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
export function createAPMWebSocketHandler(io, apmIntegration) {
|
|
452
|
+
return new APMWebSocketHandler(io, apmIntegration);
|
|
453
|
+
}
|