specmem-hardwicksoftware 3.5.99
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/CHANGELOG.md +299 -0
- package/LICENSE.md +6406 -0
- package/README.md +539 -0
- package/bin/AegisTheme.cjs +1022 -0
- package/bin/AnsiRenderer.cjs +1055 -0
- package/bin/BoxRenderer.cjs +605 -0
- package/bin/ClaudeLiveScreen.cjs +1299 -0
- package/bin/DashboardModules.cjs +733 -0
- package/bin/LiveScreenCapture.cjs +1012 -0
- package/bin/MemoryBrowserScreen.cjs +1595 -0
- package/bin/TabManager.cjs +1414 -0
- package/bin/checkAgentStatus-fix.patch +30 -0
- package/bin/mcp-socket-client.cjs +462 -0
- package/bin/screen-utils.cjs +106 -0
- package/bin/specmem-autoclaude.cjs +663 -0
- package/bin/specmem-cleanup.cjs +421 -0
- package/bin/specmem-cli.cjs +794 -0
- package/bin/specmem-console-teamcomms-class.cjs +428 -0
- package/bin/specmem-console.cjs +8104 -0
- package/bin/specmem-statusbar.cjs +530 -0
- package/bootstrap.cjs +5065 -0
- package/claude-hooks/agent-chooser-hook.js +179 -0
- package/claude-hooks/agent-chooser-inject.js +121 -0
- package/claude-hooks/agent-loading-hook.js +990 -0
- package/claude-hooks/agent-output-fader.cjs +542 -0
- package/claude-hooks/agent-output-interceptor.js +193 -0
- package/claude-hooks/agent-type-matcher.js +419 -0
- package/claude-hooks/auto-bypass.py +74 -0
- package/claude-hooks/background-completion-silencer.js +134 -0
- package/claude-hooks/bash-auto-background.js +182 -0
- package/claude-hooks/build-cedict-dictionary.mjs +167 -0
- package/claude-hooks/bullshit-radar.cjs +323 -0
- package/claude-hooks/cedict-codes.json +270 -0
- package/claude-hooks/cedict-extracted.json +22632 -0
- package/claude-hooks/claude-watchdog.sh +401 -0
- package/claude-hooks/context-dedup.cjs +144 -0
- package/claude-hooks/context-yeeter.cjs +244 -0
- package/claude-hooks/debug-suffix.cjs +15 -0
- package/claude-hooks/debug2.cjs +7 -0
- package/claude-hooks/drilldown-enforcer.js +242 -0
- package/claude-hooks/english-morphology-standalone.cjs +149 -0
- package/claude-hooks/english-morphology.cjs +152 -0
- package/claude-hooks/extract-translations.mjs +193 -0
- package/claude-hooks/file-claim-enforcer.cjs +293 -0
- package/claude-hooks/file-claim-enforcer.js +293 -0
- package/claude-hooks/find-collisions.cjs +39 -0
- package/claude-hooks/fix-abbreviations.cjs +60 -0
- package/claude-hooks/fix-collisions.cjs +60 -0
- package/claude-hooks/fix-decompressor.cjs +79 -0
- package/claude-hooks/fix-suffixes.cjs +66 -0
- package/claude-hooks/grammar-engine.cjs +159 -0
- package/claude-hooks/input-aware-improver.js +231 -0
- package/claude-hooks/is-agent.cjs +64 -0
- package/claude-hooks/mega-test.cjs +213 -0
- package/claude-hooks/merge-dictionaries.mjs +207 -0
- package/claude-hooks/merged-codes.cjs +22675 -0
- package/claude-hooks/merged-codes.json +22676 -0
- package/claude-hooks/output-cleaner.cjs +388 -0
- package/claude-hooks/post-write-memory-hook.cjs +430 -0
- package/claude-hooks/quick-test.cjs +24 -0
- package/claude-hooks/quick-test2.cjs +24 -0
- package/claude-hooks/remove-bad-codes.cjs +23 -0
- package/claude-hooks/search-reminder-hook.js +90 -0
- package/claude-hooks/semantic-test.cjs +93 -0
- package/claude-hooks/settings.json +445 -0
- package/claude-hooks/smart-context-hook.cjs +547 -0
- package/claude-hooks/smart-context-hook.js +539 -0
- package/claude-hooks/smart-search-interceptor.js +364 -0
- package/claude-hooks/socket-connect-helper.cjs +235 -0
- package/claude-hooks/specmem/sockets/session-start.lock +1 -0
- package/claude-hooks/specmem-context-hook.cjs +357 -0
- package/claude-hooks/specmem-context-hook.js +357 -0
- package/claude-hooks/specmem-drilldown-hook.cjs +480 -0
- package/claude-hooks/specmem-drilldown-hook.js +480 -0
- package/claude-hooks/specmem-drilldown-setter.js +210 -0
- package/claude-hooks/specmem-paths.cjs +213 -0
- package/claude-hooks/specmem-precompact.js +183 -0
- package/claude-hooks/specmem-session-init.sh +33 -0
- package/claude-hooks/specmem-session-start.cjs +498 -0
- package/claude-hooks/specmem-stop-hook.cjs +73 -0
- package/claude-hooks/specmem-stop-hook.js +5 -0
- package/claude-hooks/specmem-team-comms.cjs +434 -0
- package/claude-hooks/specmem-team-member-inject.js +271 -0
- package/claude-hooks/specmem-unified-hook.py +670 -0
- package/claude-hooks/subagent-loading-hook.js +194 -0
- package/claude-hooks/sysprompt-squisher.cjs +167 -0
- package/claude-hooks/task-progress-hook.js +204 -0
- package/claude-hooks/team-comms-enforcer.cjs +585 -0
- package/claude-hooks/test-accuracy.cjs +27 -0
- package/claude-hooks/test-big.cjs +28 -0
- package/claude-hooks/test-inflectors.cjs +39 -0
- package/claude-hooks/test-pluralize.cjs +37 -0
- package/claude-hooks/test-quick.cjs +8 -0
- package/claude-hooks/test-wink.cjs +20 -0
- package/claude-hooks/token-compressor.cjs +940 -0
- package/claude-hooks/use-code-pointers.cjs +279 -0
- package/commands/COMMAND_TOOL_MAP.md +299 -0
- package/commands/specmem-agents.md +412 -0
- package/commands/specmem-autoclaude.md +295 -0
- package/commands/specmem-changes.md +247 -0
- package/commands/specmem-code.md +103 -0
- package/commands/specmem-configteammembercomms.md +322 -0
- package/commands/specmem-drilldown.md +208 -0
- package/commands/specmem-find.md +195 -0
- package/commands/specmem-getdashboard.md +243 -0
- package/commands/specmem-hooks.md +219 -0
- package/commands/specmem-pointers.md +149 -0
- package/commands/specmem-progress.md +287 -0
- package/commands/specmem-remember.md +123 -0
- package/commands/specmem-service.md +349 -0
- package/commands/specmem-stats.md +189 -0
- package/commands/specmem-team-member.md +409 -0
- package/commands/specmem-webdev.md +583 -0
- package/commands/specmem.md +363 -0
- package/dist/autoStart/index.d.ts +214 -0
- package/dist/autoStart/index.d.ts.map +1 -0
- package/dist/autoStart/index.js +883 -0
- package/dist/autoStart/index.js.map +1 -0
- package/dist/claude-sessions/contextRestorationParser.d.ts +74 -0
- package/dist/claude-sessions/contextRestorationParser.d.ts.map +1 -0
- package/dist/claude-sessions/contextRestorationParser.js +570 -0
- package/dist/claude-sessions/contextRestorationParser.js.map +1 -0
- package/dist/claude-sessions/index.d.ts +13 -0
- package/dist/claude-sessions/index.d.ts.map +1 -0
- package/dist/claude-sessions/index.js +11 -0
- package/dist/claude-sessions/index.js.map +1 -0
- package/dist/claude-sessions/sessionIntegration.d.ts +48 -0
- package/dist/claude-sessions/sessionIntegration.d.ts.map +1 -0
- package/dist/claude-sessions/sessionIntegration.js +146 -0
- package/dist/claude-sessions/sessionIntegration.js.map +1 -0
- package/dist/claude-sessions/sessionParser.d.ts +293 -0
- package/dist/claude-sessions/sessionParser.d.ts.map +1 -0
- package/dist/claude-sessions/sessionParser.js +1028 -0
- package/dist/claude-sessions/sessionParser.js.map +1 -0
- package/dist/claude-sessions/sessionWatcher.d.ts +139 -0
- package/dist/claude-sessions/sessionWatcher.d.ts.map +1 -0
- package/dist/claude-sessions/sessionWatcher.js +722 -0
- package/dist/claude-sessions/sessionWatcher.js.map +1 -0
- package/dist/cli/deploy-to-claude.d.ts +56 -0
- package/dist/cli/deploy-to-claude.d.ts.map +1 -0
- package/dist/cli/deploy-to-claude.js +576 -0
- package/dist/cli/deploy-to-claude.js.map +1 -0
- package/dist/code-explanations/explainCode.d.ts +86 -0
- package/dist/code-explanations/explainCode.d.ts.map +1 -0
- package/dist/code-explanations/explainCode.js +286 -0
- package/dist/code-explanations/explainCode.js.map +1 -0
- package/dist/code-explanations/feedback.d.ts +87 -0
- package/dist/code-explanations/feedback.d.ts.map +1 -0
- package/dist/code-explanations/feedback.js +212 -0
- package/dist/code-explanations/feedback.js.map +1 -0
- package/dist/code-explanations/getRelatedCode.d.ts +80 -0
- package/dist/code-explanations/getRelatedCode.d.ts.map +1 -0
- package/dist/code-explanations/getRelatedCode.js +262 -0
- package/dist/code-explanations/getRelatedCode.js.map +1 -0
- package/dist/code-explanations/index.d.ts +284 -0
- package/dist/code-explanations/index.d.ts.map +1 -0
- package/dist/code-explanations/index.js +249 -0
- package/dist/code-explanations/index.js.map +1 -0
- package/dist/code-explanations/linkCodeToPrompt.d.ts +79 -0
- package/dist/code-explanations/linkCodeToPrompt.d.ts.map +1 -0
- package/dist/code-explanations/linkCodeToPrompt.js +213 -0
- package/dist/code-explanations/linkCodeToPrompt.js.map +1 -0
- package/dist/code-explanations/recallExplanation.d.ts +88 -0
- package/dist/code-explanations/recallExplanation.d.ts.map +1 -0
- package/dist/code-explanations/recallExplanation.js +218 -0
- package/dist/code-explanations/recallExplanation.js.map +1 -0
- package/dist/code-explanations/schema.d.ts +32 -0
- package/dist/code-explanations/schema.d.ts.map +1 -0
- package/dist/code-explanations/schema.js +221 -0
- package/dist/code-explanations/schema.js.map +1 -0
- package/dist/code-explanations/semanticSearch.d.ts +75 -0
- package/dist/code-explanations/semanticSearch.d.ts.map +1 -0
- package/dist/code-explanations/semanticSearch.js +203 -0
- package/dist/code-explanations/semanticSearch.js.map +1 -0
- package/dist/code-explanations/types.d.ts +328 -0
- package/dist/code-explanations/types.d.ts.map +1 -0
- package/dist/code-explanations/types.js +122 -0
- package/dist/code-explanations/types.js.map +1 -0
- package/dist/codebase/codeAnalyzer.d.ts +272 -0
- package/dist/codebase/codeAnalyzer.d.ts.map +1 -0
- package/dist/codebase/codeAnalyzer.js +1353 -0
- package/dist/codebase/codeAnalyzer.js.map +1 -0
- package/dist/codebase/codebaseIndexer.d.ts +360 -0
- package/dist/codebase/codebaseIndexer.d.ts.map +1 -0
- package/dist/codebase/codebaseIndexer.js +1735 -0
- package/dist/codebase/codebaseIndexer.js.map +1 -0
- package/dist/codebase/codebaseTools.d.ts +853 -0
- package/dist/codebase/codebaseTools.d.ts.map +1 -0
- package/dist/codebase/codebaseTools.js +1279 -0
- package/dist/codebase/codebaseTools.js.map +1 -0
- package/dist/codebase/exclusions.d.ts +111 -0
- package/dist/codebase/exclusions.d.ts.map +1 -0
- package/dist/codebase/exclusions.js +771 -0
- package/dist/codebase/exclusions.js.map +1 -0
- package/dist/codebase/fileWatcher.d.ts +135 -0
- package/dist/codebase/fileWatcher.d.ts.map +1 -0
- package/dist/codebase/fileWatcher.js +309 -0
- package/dist/codebase/fileWatcher.js.map +1 -0
- package/dist/codebase/index.d.ts +33 -0
- package/dist/codebase/index.d.ts.map +1 -0
- package/dist/codebase/index.js +77 -0
- package/dist/codebase/index.js.map +1 -0
- package/dist/codebase/ingestion.d.ts +177 -0
- package/dist/codebase/ingestion.d.ts.map +1 -0
- package/dist/codebase/ingestion.js +690 -0
- package/dist/codebase/ingestion.js.map +1 -0
- package/dist/codebase/languageDetection.d.ts +75 -0
- package/dist/codebase/languageDetection.d.ts.map +1 -0
- package/dist/codebase/languageDetection.js +768 -0
- package/dist/codebase/languageDetection.js.map +1 -0
- package/dist/commands/codebaseCommands.d.ts +101 -0
- package/dist/commands/codebaseCommands.d.ts.map +1 -0
- package/dist/commands/codebaseCommands.js +911 -0
- package/dist/commands/codebaseCommands.js.map +1 -0
- package/dist/commands/commandHandler.d.ts +126 -0
- package/dist/commands/commandHandler.d.ts.map +1 -0
- package/dist/commands/commandHandler.js +296 -0
- package/dist/commands/commandHandler.js.map +1 -0
- package/dist/commands/commandLoader.d.ts +103 -0
- package/dist/commands/commandLoader.d.ts.map +1 -0
- package/dist/commands/commandLoader.js +223 -0
- package/dist/commands/commandLoader.js.map +1 -0
- package/dist/commands/contextCommands.d.ts +83 -0
- package/dist/commands/contextCommands.d.ts.map +1 -0
- package/dist/commands/contextCommands.js +512 -0
- package/dist/commands/contextCommands.js.map +1 -0
- package/dist/commands/index.d.ts +24 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +28 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/mcpResources.d.ts +50 -0
- package/dist/commands/mcpResources.d.ts.map +1 -0
- package/dist/commands/mcpResources.js +372 -0
- package/dist/commands/mcpResources.js.map +1 -0
- package/dist/commands/memoryCommands.d.ts +74 -0
- package/dist/commands/memoryCommands.d.ts.map +1 -0
- package/dist/commands/memoryCommands.js +609 -0
- package/dist/commands/memoryCommands.js.map +1 -0
- package/dist/commands/promptCommands.d.ts +91 -0
- package/dist/commands/promptCommands.d.ts.map +1 -0
- package/dist/commands/promptCommands.js +801 -0
- package/dist/commands/promptCommands.js.map +1 -0
- package/dist/commands/teamMemberCommands.d.ts +21 -0
- package/dist/commands/teamMemberCommands.d.ts.map +1 -0
- package/dist/commands/teamMemberCommands.js +137 -0
- package/dist/commands/teamMemberCommands.js.map +1 -0
- package/dist/comms/fileCommsTransport.d.ts +91 -0
- package/dist/comms/fileCommsTransport.d.ts.map +1 -0
- package/dist/comms/fileCommsTransport.js +244 -0
- package/dist/comms/fileCommsTransport.js.map +1 -0
- package/dist/comms/index.d.ts +7 -0
- package/dist/comms/index.d.ts.map +1 -0
- package/dist/comms/index.js +7 -0
- package/dist/comms/index.js.map +1 -0
- package/dist/config/apiKeyDetection.d.ts +41 -0
- package/dist/config/apiKeyDetection.d.ts.map +1 -0
- package/dist/config/apiKeyDetection.js +211 -0
- package/dist/config/apiKeyDetection.js.map +1 -0
- package/dist/config/autoConfig.d.ts +188 -0
- package/dist/config/autoConfig.d.ts.map +1 -0
- package/dist/config/autoConfig.js +850 -0
- package/dist/config/autoConfig.js.map +1 -0
- package/dist/config/configSync.d.ts +119 -0
- package/dist/config/configSync.d.ts.map +1 -0
- package/dist/config/configSync.js +878 -0
- package/dist/config/configSync.js.map +1 -0
- package/dist/config/embeddingTimeouts.d.ts +145 -0
- package/dist/config/embeddingTimeouts.d.ts.map +1 -0
- package/dist/config/embeddingTimeouts.js +255 -0
- package/dist/config/embeddingTimeouts.js.map +1 -0
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +7 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/languageConfig.d.ts +68 -0
- package/dist/config/languageConfig.d.ts.map +1 -0
- package/dist/config/languageConfig.js +473 -0
- package/dist/config/languageConfig.js.map +1 -0
- package/dist/config/password.d.ts +145 -0
- package/dist/config/password.d.ts.map +1 -0
- package/dist/config/password.js +428 -0
- package/dist/config/password.js.map +1 -0
- package/dist/config.d.ts +338 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1177 -0
- package/dist/config.js.map +1 -0
- package/dist/consolidation.d.ts +44 -0
- package/dist/consolidation.d.ts.map +1 -0
- package/dist/consolidation.js +447 -0
- package/dist/consolidation.js.map +1 -0
- package/dist/constants.d.ts +371 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +552 -0
- package/dist/constants.js.map +1 -0
- package/dist/coordination/TeamMemberRegistry.d.ts +192 -0
- package/dist/coordination/TeamMemberRegistry.d.ts.map +1 -0
- package/dist/coordination/TeamMemberRegistry.js +415 -0
- package/dist/coordination/TeamMemberRegistry.js.map +1 -0
- package/dist/coordination/events.d.ts +369 -0
- package/dist/coordination/events.d.ts.map +1 -0
- package/dist/coordination/events.js +232 -0
- package/dist/coordination/events.js.map +1 -0
- package/dist/coordination/handlers.d.ts +116 -0
- package/dist/coordination/handlers.d.ts.map +1 -0
- package/dist/coordination/handlers.js +400 -0
- package/dist/coordination/handlers.js.map +1 -0
- package/dist/coordination/index.d.ts +14 -0
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +31 -0
- package/dist/coordination/index.js.map +1 -0
- package/dist/coordination/integration.d.ts +260 -0
- package/dist/coordination/integration.d.ts.map +1 -0
- package/dist/coordination/integration.js +472 -0
- package/dist/coordination/integration.js.map +1 -0
- package/dist/coordination/server.d.ts +266 -0
- package/dist/coordination/server.d.ts.map +1 -0
- package/dist/coordination/server.js +995 -0
- package/dist/coordination/server.js.map +1 -0
- package/dist/coordination/serviceProvider.d.ts +70 -0
- package/dist/coordination/serviceProvider.d.ts.map +1 -0
- package/dist/coordination/serviceProvider.js +273 -0
- package/dist/coordination/serviceProvider.js.map +1 -0
- package/dist/dashboard/api/claudeControl.d.ts +44 -0
- package/dist/dashboard/api/claudeControl.d.ts.map +1 -0
- package/dist/dashboard/api/claudeControl.js +650 -0
- package/dist/dashboard/api/claudeControl.js.map +1 -0
- package/dist/dashboard/api/claudeHistory.d.ts +4 -0
- package/dist/dashboard/api/claudeHistory.d.ts.map +1 -0
- package/dist/dashboard/api/claudeHistory.js +319 -0
- package/dist/dashboard/api/claudeHistory.js.map +1 -0
- package/dist/dashboard/api/dataExport.d.ts +23 -0
- package/dist/dashboard/api/dataExport.d.ts.map +1 -0
- package/dist/dashboard/api/dataExport.js +509 -0
- package/dist/dashboard/api/dataExport.js.map +1 -0
- package/dist/dashboard/api/fileManager.d.ts +39 -0
- package/dist/dashboard/api/fileManager.d.ts.map +1 -0
- package/dist/dashboard/api/fileManager.js +814 -0
- package/dist/dashboard/api/fileManager.js.map +1 -0
- package/dist/dashboard/api/hooks.d.ts +16 -0
- package/dist/dashboard/api/hooks.d.ts.map +1 -0
- package/dist/dashboard/api/hooks.js +342 -0
- package/dist/dashboard/api/hooks.js.map +1 -0
- package/dist/dashboard/api/hotReload.d.ts +14 -0
- package/dist/dashboard/api/hotReload.d.ts.map +1 -0
- package/dist/dashboard/api/hotReload.js +219 -0
- package/dist/dashboard/api/hotReload.js.map +1 -0
- package/dist/dashboard/api/liveSessionStream.d.ts +19 -0
- package/dist/dashboard/api/liveSessionStream.d.ts.map +1 -0
- package/dist/dashboard/api/liveSessionStream.js +430 -0
- package/dist/dashboard/api/liveSessionStream.js.map +1 -0
- package/dist/dashboard/api/memoryRecall.d.ts +20 -0
- package/dist/dashboard/api/memoryRecall.d.ts.map +1 -0
- package/dist/dashboard/api/memoryRecall.js +524 -0
- package/dist/dashboard/api/memoryRecall.js.map +1 -0
- package/dist/dashboard/api/promptSend.d.ts +33 -0
- package/dist/dashboard/api/promptSend.d.ts.map +1 -0
- package/dist/dashboard/api/promptSend.js +544 -0
- package/dist/dashboard/api/promptSend.js.map +1 -0
- package/dist/dashboard/api/settings.d.ts +10 -0
- package/dist/dashboard/api/settings.d.ts.map +1 -0
- package/dist/dashboard/api/settings.js +656 -0
- package/dist/dashboard/api/settings.js.map +1 -0
- package/dist/dashboard/api/setup.d.ts +21 -0
- package/dist/dashboard/api/setup.d.ts.map +1 -0
- package/dist/dashboard/api/setup.js +663 -0
- package/dist/dashboard/api/setup.js.map +1 -0
- package/dist/dashboard/api/specmemTools.d.ts +14 -0
- package/dist/dashboard/api/specmemTools.d.ts.map +1 -0
- package/dist/dashboard/api/specmemTools.js +1059 -0
- package/dist/dashboard/api/specmemTools.js.map +1 -0
- package/dist/dashboard/api/taskTeamMembers.d.ts +8 -0
- package/dist/dashboard/api/taskTeamMembers.d.ts.map +1 -0
- package/dist/dashboard/api/taskTeamMembers.js +136 -0
- package/dist/dashboard/api/taskTeamMembers.js.map +1 -0
- package/dist/dashboard/api/teamMemberDeploy.d.ts +15 -0
- package/dist/dashboard/api/teamMemberDeploy.d.ts.map +1 -0
- package/dist/dashboard/api/teamMemberDeploy.js +421 -0
- package/dist/dashboard/api/teamMemberDeploy.js.map +1 -0
- package/dist/dashboard/api/teamMemberHistory.d.ts +38 -0
- package/dist/dashboard/api/teamMemberHistory.d.ts.map +1 -0
- package/dist/dashboard/api/teamMemberHistory.js +583 -0
- package/dist/dashboard/api/teamMemberHistory.js.map +1 -0
- package/dist/dashboard/api/terminal.d.ts +12 -0
- package/dist/dashboard/api/terminal.d.ts.map +1 -0
- package/dist/dashboard/api/terminal.js +344 -0
- package/dist/dashboard/api/terminal.js.map +1 -0
- package/dist/dashboard/api/terminalInject.d.ts +17 -0
- package/dist/dashboard/api/terminalInject.d.ts.map +1 -0
- package/dist/dashboard/api/terminalInject.js +322 -0
- package/dist/dashboard/api/terminalInject.js.map +1 -0
- package/dist/dashboard/api/terminalStream.d.ts +12 -0
- package/dist/dashboard/api/terminalStream.d.ts.map +1 -0
- package/dist/dashboard/api/terminalStream.js +482 -0
- package/dist/dashboard/api/terminalStream.js.map +1 -0
- package/dist/dashboard/index.d.ts +7 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +7 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/dashboard/ptyStreamer.d.ts +173 -0
- package/dist/dashboard/ptyStreamer.d.ts.map +1 -0
- package/dist/dashboard/ptyStreamer.js +661 -0
- package/dist/dashboard/ptyStreamer.js.map +1 -0
- package/dist/dashboard/public/DASHBOARD-README.md +378 -0
- package/dist/dashboard/public/INTEGRATION-GUIDE.md +395 -0
- package/dist/dashboard/public/codebase-config.html +1247 -0
- package/dist/dashboard/public/dashboard-v2.html +1942 -0
- package/dist/dashboard/public/data-export.html +819 -0
- package/dist/dashboard/public/example-page.html +164 -0
- package/dist/dashboard/public/file-explorer.html +1023 -0
- package/dist/dashboard/public/hooks.html +1103 -0
- package/dist/dashboard/public/index-improvements.css +499 -0
- package/dist/dashboard/public/index.html +5534 -0
- package/dist/dashboard/public/memory-controls.html +1959 -0
- package/dist/dashboard/public/memory-recall.html +1495 -0
- package/dist/dashboard/public/previews/skeleton-memory-graph.html +361 -0
- package/dist/dashboard/public/previews/skeleton-memory-list.html +366 -0
- package/dist/dashboard/public/previews/skeleton-search-results.html +609 -0
- package/dist/dashboard/public/previews/skeleton-stats-dashboard.html +556 -0
- package/dist/dashboard/public/prompt-console.html +2763 -0
- package/dist/dashboard/public/react-dist/assets/index-CkjobT5B.js +871 -0
- package/dist/dashboard/public/react-dist/assets/index-iRclxMst.css +1 -0
- package/dist/dashboard/public/react-dist/index.html +16 -0
- package/dist/dashboard/public/shared-header.js +325 -0
- package/dist/dashboard/public/shared-language-selector.js +626 -0
- package/dist/dashboard/public/shared-logger.js +66 -0
- package/dist/dashboard/public/shared-nav.js +325 -0
- package/dist/dashboard/public/shared-theme-blue.css +331 -0
- package/dist/dashboard/public/shared-theme.css +813 -0
- package/dist/dashboard/public/shared-toast.js +415 -0
- package/dist/dashboard/public/team-member-history.html +1291 -0
- package/dist/dashboard/public/team-member-spy.html +1199 -0
- package/dist/dashboard/public/team-members.html +3756 -0
- package/dist/dashboard/public/terminal-output.html +1013 -0
- package/dist/dashboard/public/terminal.html +372 -0
- package/dist/dashboard/sessionStore.d.ts +86 -0
- package/dist/dashboard/sessionStore.d.ts.map +1 -0
- package/dist/dashboard/sessionStore.js +262 -0
- package/dist/dashboard/sessionStore.js.map +1 -0
- package/dist/dashboard/standalone.d.ts +27 -0
- package/dist/dashboard/standalone.d.ts.map +1 -0
- package/dist/dashboard/standalone.js +380 -0
- package/dist/dashboard/standalone.js.map +1 -0
- package/dist/dashboard/webServer.d.ts +390 -0
- package/dist/dashboard/webServer.d.ts.map +1 -0
- package/dist/dashboard/webServer.js +4297 -0
- package/dist/dashboard/webServer.js.map +1 -0
- package/dist/dashboard/websocket/teamMemberStream.d.ts +87 -0
- package/dist/dashboard/websocket/teamMemberStream.d.ts.map +1 -0
- package/dist/dashboard/websocket/teamMemberStream.js +366 -0
- package/dist/dashboard/websocket/teamMemberStream.js.map +1 -0
- package/dist/dashboard/websocket/terminalStream.d.ts +130 -0
- package/dist/dashboard/websocket/terminalStream.d.ts.map +1 -0
- package/dist/dashboard/websocket/terminalStream.js +456 -0
- package/dist/dashboard/websocket/terminalStream.js.map +1 -0
- package/dist/database/embeddedPostgres.d.ts +187 -0
- package/dist/database/embeddedPostgres.d.ts.map +1 -0
- package/dist/database/embeddedPostgres.js +763 -0
- package/dist/database/embeddedPostgres.js.map +1 -0
- package/dist/database/index.d.ts +12 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +20 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/initEmbeddedPostgres.d.ts +124 -0
- package/dist/database/initEmbeddedPostgres.d.ts.map +1 -0
- package/dist/database/initEmbeddedPostgres.js +855 -0
- package/dist/database/initEmbeddedPostgres.js.map +1 -0
- package/dist/database.d.ts +256 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +1209 -0
- package/dist/database.js.map +1 -0
- package/dist/db/apiDataManager.d.ts +334 -0
- package/dist/db/apiDataManager.d.ts.map +1 -0
- package/dist/db/apiDataManager.js +631 -0
- package/dist/db/apiDataManager.js.map +1 -0
- package/dist/db/batchOperations.d.ts +154 -0
- package/dist/db/batchOperations.d.ts.map +1 -0
- package/dist/db/batchOperations.js +564 -0
- package/dist/db/batchOperations.js.map +1 -0
- package/dist/db/bigBrainMigrations.d.ts +48 -0
- package/dist/db/bigBrainMigrations.d.ts.map +1 -0
- package/dist/db/bigBrainMigrations.js +4266 -0
- package/dist/db/bigBrainMigrations.js.map +1 -0
- package/dist/db/connectionPoolGoBrrr.d.ts +94 -0
- package/dist/db/connectionPoolGoBrrr.d.ts.map +1 -0
- package/dist/db/connectionPoolGoBrrr.js +548 -0
- package/dist/db/connectionPoolGoBrrr.js.map +1 -0
- package/dist/db/dashboardQueries.d.ts +182 -0
- package/dist/db/dashboardQueries.d.ts.map +1 -0
- package/dist/db/dashboardQueries.js +821 -0
- package/dist/db/dashboardQueries.js.map +1 -0
- package/dist/db/deploymentBootstrap.d.ts +43 -0
- package/dist/db/deploymentBootstrap.d.ts.map +1 -0
- package/dist/db/deploymentBootstrap.js +329 -0
- package/dist/db/deploymentBootstrap.js.map +1 -0
- package/dist/db/dimensionService.d.ts +140 -0
- package/dist/db/dimensionService.d.ts.map +1 -0
- package/dist/db/dimensionService.js +261 -0
- package/dist/db/dimensionService.js.map +1 -0
- package/dist/db/embeddingOverflow.d.ts +69 -0
- package/dist/db/embeddingOverflow.d.ts.map +1 -0
- package/dist/db/embeddingOverflow.js +332 -0
- package/dist/db/embeddingOverflow.js.map +1 -0
- package/dist/db/embeddingOverflow.sql +221 -0
- package/dist/db/findThatShit.d.ts +145 -0
- package/dist/db/findThatShit.d.ts.map +1 -0
- package/dist/db/findThatShit.js +782 -0
- package/dist/db/findThatShit.js.map +1 -0
- package/dist/db/hotPathManager.d.ts +187 -0
- package/dist/db/hotPathManager.d.ts.map +1 -0
- package/dist/db/hotPathManager.js +504 -0
- package/dist/db/hotPathManager.js.map +1 -0
- package/dist/db/index.d.ts +85 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +219 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/memoryDrilldown.sql +99 -0
- package/dist/db/migrate.d.ts +3 -0
- package/dist/db/migrate.d.ts.map +1 -0
- package/dist/db/migrate.js +97 -0
- package/dist/db/migrate.js.map +1 -0
- package/dist/db/migrateJsonToPostgres.d.ts +43 -0
- package/dist/db/migrateJsonToPostgres.d.ts.map +1 -0
- package/dist/db/migrateJsonToPostgres.js +465 -0
- package/dist/db/migrateJsonToPostgres.js.map +1 -0
- package/dist/db/nukeFromOrbit.d.ts +63 -0
- package/dist/db/nukeFromOrbit.d.ts.map +1 -0
- package/dist/db/nukeFromOrbit.js +499 -0
- package/dist/db/nukeFromOrbit.js.map +1 -0
- package/dist/db/processedTraining.sql +60 -0
- package/dist/db/projectNamespacing.d.ts +258 -0
- package/dist/db/projectNamespacing.d.ts.map +1 -0
- package/dist/db/projectNamespacing.js +920 -0
- package/dist/db/projectNamespacing.js.map +1 -0
- package/dist/db/projectNamespacing.sql +374 -0
- package/dist/db/projectSchemaInit.sql +271 -0
- package/dist/db/spatialMemory.d.ts +296 -0
- package/dist/db/spatialMemory.d.ts.map +1 -0
- package/dist/db/spatialMemory.js +818 -0
- package/dist/db/spatialMemory.js.map +1 -0
- package/dist/db/streamingQuery.d.ts +143 -0
- package/dist/db/streamingQuery.d.ts.map +1 -0
- package/dist/db/streamingQuery.js +350 -0
- package/dist/db/streamingQuery.js.map +1 -0
- package/dist/db/teamComms.sql +224 -0
- package/dist/db/yeetStuffInDb.d.ts +72 -0
- package/dist/db/yeetStuffInDb.d.ts.map +1 -0
- package/dist/db/yeetStuffInDb.js +473 -0
- package/dist/db/yeetStuffInDb.js.map +1 -0
- package/dist/embedding-providers/index.d.ts +10 -0
- package/dist/embedding-providers/index.d.ts.map +1 -0
- package/dist/embedding-providers/index.js +12 -0
- package/dist/embedding-providers/index.js.map +1 -0
- package/dist/embeddings/projectionLayer.d.ts +114 -0
- package/dist/embeddings/projectionLayer.d.ts.map +1 -0
- package/dist/embeddings/projectionLayer.js +345 -0
- package/dist/embeddings/projectionLayer.js.map +1 -0
- package/dist/events/Publisher.d.ts +193 -0
- package/dist/events/Publisher.d.ts.map +1 -0
- package/dist/events/Publisher.js +439 -0
- package/dist/events/Publisher.js.map +1 -0
- package/dist/events/config.d.ts +139 -0
- package/dist/events/config.d.ts.map +1 -0
- package/dist/events/config.js +266 -0
- package/dist/events/config.js.map +1 -0
- package/dist/events/index.d.ts +19 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +31 -0
- package/dist/events/index.js.map +1 -0
- package/dist/events/integration.d.ts +206 -0
- package/dist/events/integration.d.ts.map +1 -0
- package/dist/events/integration.js +348 -0
- package/dist/events/integration.js.map +1 -0
- package/dist/events/metrics.d.ts +147 -0
- package/dist/events/metrics.d.ts.map +1 -0
- package/dist/events/metrics.js +343 -0
- package/dist/events/metrics.js.map +1 -0
- package/dist/hooks/cli.d.ts +28 -0
- package/dist/hooks/cli.d.ts.map +1 -0
- package/dist/hooks/cli.js +118 -0
- package/dist/hooks/cli.js.map +1 -0
- package/dist/hooks/contextInjectionHook.d.ts +60 -0
- package/dist/hooks/contextInjectionHook.d.ts.map +1 -0
- package/dist/hooks/contextInjectionHook.js +294 -0
- package/dist/hooks/contextInjectionHook.js.map +1 -0
- package/dist/hooks/drilldownHook.d.ts +125 -0
- package/dist/hooks/drilldownHook.d.ts.map +1 -0
- package/dist/hooks/drilldownHook.js +181 -0
- package/dist/hooks/drilldownHook.js.map +1 -0
- package/dist/hooks/hookManager.d.ts +180 -0
- package/dist/hooks/hookManager.d.ts.map +1 -0
- package/dist/hooks/hookManager.js +782 -0
- package/dist/hooks/hookManager.js.map +1 -0
- package/dist/hooks/index.d.ts +62 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +66 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/lowContextHook.d.ts +71 -0
- package/dist/hooks/lowContextHook.d.ts.map +1 -0
- package/dist/hooks/lowContextHook.js +258 -0
- package/dist/hooks/lowContextHook.js.map +1 -0
- package/dist/hooks/simpleContextHook.d.ts +65 -0
- package/dist/hooks/simpleContextHook.d.ts.map +1 -0
- package/dist/hooks/simpleContextHook.js +194 -0
- package/dist/hooks/simpleContextHook.js.map +1 -0
- package/dist/hooks/teamFramingCli.d.ts +56 -0
- package/dist/hooks/teamFramingCli.d.ts.map +1 -0
- package/dist/hooks/teamFramingCli.js +264 -0
- package/dist/hooks/teamFramingCli.js.map +1 -0
- package/dist/hooks/teamMemberPrepromptHook.d.ts +150 -0
- package/dist/hooks/teamMemberPrepromptHook.d.ts.map +1 -0
- package/dist/hooks/teamMemberPrepromptHook.js +308 -0
- package/dist/hooks/teamMemberPrepromptHook.js.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4433 -0
- package/dist/index.js.map +1 -0
- package/dist/init/claudeConfigInjector.d.ts +116 -0
- package/dist/init/claudeConfigInjector.d.ts.map +1 -0
- package/dist/init/claudeConfigInjector.js +1154 -0
- package/dist/init/claudeConfigInjector.js.map +1 -0
- package/dist/installer/autoInstall.d.ts +72 -0
- package/dist/installer/autoInstall.d.ts.map +1 -0
- package/dist/installer/autoInstall.js +617 -0
- package/dist/installer/autoInstall.js.map +1 -0
- package/dist/installer/dbSetup.d.ts +84 -0
- package/dist/installer/dbSetup.d.ts.map +1 -0
- package/dist/installer/dbSetup.js +350 -0
- package/dist/installer/dbSetup.js.map +1 -0
- package/dist/installer/firstRun.d.ts +49 -0
- package/dist/installer/firstRun.d.ts.map +1 -0
- package/dist/installer/firstRun.js +207 -0
- package/dist/installer/firstRun.js.map +1 -0
- package/dist/installer/index.d.ts +10 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +10 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/silentAutoInstall.d.ts +99 -0
- package/dist/installer/silentAutoInstall.d.ts.map +1 -0
- package/dist/installer/silentAutoInstall.js +491 -0
- package/dist/installer/silentAutoInstall.js.map +1 -0
- package/dist/installer/systemDeps.d.ts +54 -0
- package/dist/installer/systemDeps.d.ts.map +1 -0
- package/dist/installer/systemDeps.js +322 -0
- package/dist/installer/systemDeps.js.map +1 -0
- package/dist/mcp/cliNotifications.d.ts +133 -0
- package/dist/mcp/cliNotifications.d.ts.map +1 -0
- package/dist/mcp/cliNotifications.js +289 -0
- package/dist/mcp/cliNotifications.js.map +1 -0
- package/dist/mcp/embeddingServerManager.d.ts +307 -0
- package/dist/mcp/embeddingServerManager.d.ts.map +1 -0
- package/dist/mcp/embeddingServerManager.js +2081 -0
- package/dist/mcp/embeddingServerManager.js.map +1 -0
- package/dist/mcp/healthMonitor.d.ts +196 -0
- package/dist/mcp/healthMonitor.d.ts.map +1 -0
- package/dist/mcp/healthMonitor.js +685 -0
- package/dist/mcp/healthMonitor.js.map +1 -0
- package/dist/mcp/hotReloadManager.d.ts +101 -0
- package/dist/mcp/hotReloadManager.d.ts.map +1 -0
- package/dist/mcp/hotReloadManager.js +251 -0
- package/dist/mcp/hotReloadManager.js.map +1 -0
- package/dist/mcp/index.d.ts +16 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +22 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/mcpProtocolHandler.d.ts +64 -0
- package/dist/mcp/mcpProtocolHandler.d.ts.map +1 -0
- package/dist/mcp/mcpProtocolHandler.js +253 -0
- package/dist/mcp/mcpProtocolHandler.js.map +1 -0
- package/dist/mcp/miniCOTServerManager.d.ts +336 -0
- package/dist/mcp/miniCOTServerManager.d.ts.map +1 -0
- package/dist/mcp/miniCOTServerManager.js +1384 -0
- package/dist/mcp/miniCOTServerManager.js.map +1 -0
- package/dist/mcp/promptExecutor.d.ts +188 -0
- package/dist/mcp/promptExecutor.d.ts.map +1 -0
- package/dist/mcp/promptExecutor.js +469 -0
- package/dist/mcp/promptExecutor.js.map +1 -0
- package/dist/mcp/reloadBroadcast.d.ts +127 -0
- package/dist/mcp/reloadBroadcast.d.ts.map +1 -0
- package/dist/mcp/reloadBroadcast.js +275 -0
- package/dist/mcp/reloadBroadcast.js.map +1 -0
- package/dist/mcp/resilientTransport.d.ts +249 -0
- package/dist/mcp/resilientTransport.d.ts.map +1 -0
- package/dist/mcp/resilientTransport.js +931 -0
- package/dist/mcp/resilientTransport.js.map +1 -0
- package/dist/mcp/samplingHandler.d.ts +129 -0
- package/dist/mcp/samplingHandler.d.ts.map +1 -0
- package/dist/mcp/samplingHandler.js +276 -0
- package/dist/mcp/samplingHandler.js.map +1 -0
- package/dist/mcp/specMemServer.d.ts +305 -0
- package/dist/mcp/specMemServer.d.ts.map +1 -0
- package/dist/mcp/specMemServer.js +2048 -0
- package/dist/mcp/specMemServer.js.map +1 -0
- package/dist/mcp/toolRegistry.d.ts +122 -0
- package/dist/mcp/toolRegistry.d.ts.map +1 -0
- package/dist/mcp/toolRegistry.js +609 -0
- package/dist/mcp/toolRegistry.js.map +1 -0
- package/dist/mcp/tools/embeddingControl.d.ts +114 -0
- package/dist/mcp/tools/embeddingControl.d.ts.map +1 -0
- package/dist/mcp/tools/embeddingControl.js +222 -0
- package/dist/mcp/tools/embeddingControl.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +10 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +17 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/teamComms.d.ts +444 -0
- package/dist/mcp/tools/teamComms.d.ts.map +1 -0
- package/dist/mcp/tools/teamComms.js +1953 -0
- package/dist/mcp/tools/teamComms.js.map +1 -0
- package/dist/mcp/triggerSystem.d.ts +129 -0
- package/dist/mcp/triggerSystem.d.ts.map +1 -0
- package/dist/mcp/triggerSystem.js +363 -0
- package/dist/mcp/triggerSystem.js.map +1 -0
- package/dist/mcp/watcherIntegration.d.ts +77 -0
- package/dist/mcp/watcherIntegration.d.ts.map +1 -0
- package/dist/mcp/watcherIntegration.js +428 -0
- package/dist/mcp/watcherIntegration.js.map +1 -0
- package/dist/mcp/watcherToolWrappers.d.ts +89 -0
- package/dist/mcp/watcherToolWrappers.d.ts.map +1 -0
- package/dist/mcp/watcherToolWrappers.js +91 -0
- package/dist/mcp/watcherToolWrappers.js.map +1 -0
- package/dist/memorization/claudeCodeMigration.d.ts +34 -0
- package/dist/memorization/claudeCodeMigration.d.ts.map +1 -0
- package/dist/memorization/claudeCodeMigration.js +210 -0
- package/dist/memorization/claudeCodeMigration.js.map +1 -0
- package/dist/memorization/claudeCodeTracker.d.ts +147 -0
- package/dist/memorization/claudeCodeTracker.d.ts.map +1 -0
- package/dist/memorization/claudeCodeTracker.js +424 -0
- package/dist/memorization/claudeCodeTracker.js.map +1 -0
- package/dist/memorization/codeMemorizer.d.ts +158 -0
- package/dist/memorization/codeMemorizer.d.ts.map +1 -0
- package/dist/memorization/codeMemorizer.js +357 -0
- package/dist/memorization/codeMemorizer.js.map +1 -0
- package/dist/memorization/codeRecall.d.ts +156 -0
- package/dist/memorization/codeRecall.d.ts.map +1 -0
- package/dist/memorization/codeRecall.js +499 -0
- package/dist/memorization/codeRecall.js.map +1 -0
- package/dist/memorization/index.d.ts +55 -0
- package/dist/memorization/index.d.ts.map +1 -0
- package/dist/memorization/index.js +64 -0
- package/dist/memorization/index.js.map +1 -0
- package/dist/memorization/memorizationTools.d.ts +413 -0
- package/dist/memorization/memorizationTools.d.ts.map +1 -0
- package/dist/memorization/memorizationTools.js +513 -0
- package/dist/memorization/memorizationTools.js.map +1 -0
- package/dist/memorization/watcherIntegration.d.ts +100 -0
- package/dist/memorization/watcherIntegration.d.ts.map +1 -0
- package/dist/memorization/watcherIntegration.js +196 -0
- package/dist/memorization/watcherIntegration.js.map +1 -0
- package/dist/memory/humanLikeMemory.d.ts +206 -0
- package/dist/memory/humanLikeMemory.d.ts.map +1 -0
- package/dist/memory/humanLikeMemory.js +603 -0
- package/dist/memory/humanLikeMemory.js.map +1 -0
- package/dist/memory/index.d.ts +22 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +24 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/memoryEvolutionMigration.d.ts +36 -0
- package/dist/memory/memoryEvolutionMigration.d.ts.map +1 -0
- package/dist/memory/memoryEvolutionMigration.js +371 -0
- package/dist/memory/memoryEvolutionMigration.js.map +1 -0
- package/dist/memory/quadrantSearch.d.ts +221 -0
- package/dist/memory/quadrantSearch.d.ts.map +1 -0
- package/dist/memory/quadrantSearch.js +897 -0
- package/dist/memory/quadrantSearch.js.map +1 -0
- package/dist/middleware/apiVersioning.d.ts +83 -0
- package/dist/middleware/apiVersioning.d.ts.map +1 -0
- package/dist/middleware/apiVersioning.js +152 -0
- package/dist/middleware/apiVersioning.js.map +1 -0
- package/dist/middleware/compression.d.ts +48 -0
- package/dist/middleware/compression.d.ts.map +1 -0
- package/dist/middleware/compression.js +240 -0
- package/dist/middleware/compression.js.map +1 -0
- package/dist/middleware/csrf.d.ts +118 -0
- package/dist/middleware/csrf.d.ts.map +1 -0
- package/dist/middleware/csrf.js +300 -0
- package/dist/middleware/csrf.js.map +1 -0
- package/dist/middleware/index.d.ts +13 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/index.js +17 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/wsRateLimiter.d.ts +129 -0
- package/dist/middleware/wsRateLimiter.d.ts.map +1 -0
- package/dist/middleware/wsRateLimiter.js +279 -0
- package/dist/middleware/wsRateLimiter.js.map +1 -0
- package/dist/migrations/run.d.ts +2 -0
- package/dist/migrations/run.d.ts.map +1 -0
- package/dist/migrations/run.js +25 -0
- package/dist/migrations/run.js.map +1 -0
- package/dist/migrations/syncDimensions.d.ts +24 -0
- package/dist/migrations/syncDimensions.d.ts.map +1 -0
- package/dist/migrations/syncDimensions.js +140 -0
- package/dist/migrations/syncDimensions.js.map +1 -0
- package/dist/migrations/teamComms.d.ts +16 -0
- package/dist/migrations/teamComms.d.ts.map +1 -0
- package/dist/migrations/teamComms.js +210 -0
- package/dist/migrations/teamComms.js.map +1 -0
- package/dist/openapi/index.d.ts +10 -0
- package/dist/openapi/index.d.ts.map +1 -0
- package/dist/openapi/index.js +10 -0
- package/dist/openapi/index.js.map +1 -0
- package/dist/openapi/spec.d.ts +902 -0
- package/dist/openapi/spec.d.ts.map +1 -0
- package/dist/openapi/spec.js +733 -0
- package/dist/openapi/spec.js.map +1 -0
- package/dist/packages/dependencyHistory.d.ts +113 -0
- package/dist/packages/dependencyHistory.d.ts.map +1 -0
- package/dist/packages/dependencyHistory.js +360 -0
- package/dist/packages/dependencyHistory.js.map +1 -0
- package/dist/packages/index.d.ts +30 -0
- package/dist/packages/index.d.ts.map +1 -0
- package/dist/packages/index.js +65 -0
- package/dist/packages/index.js.map +1 -0
- package/dist/packages/packageTools.d.ts +255 -0
- package/dist/packages/packageTools.d.ts.map +1 -0
- package/dist/packages/packageTools.js +242 -0
- package/dist/packages/packageTools.js.map +1 -0
- package/dist/packages/packageTracker.d.ts +98 -0
- package/dist/packages/packageTracker.d.ts.map +1 -0
- package/dist/packages/packageTracker.js +268 -0
- package/dist/packages/packageTracker.js.map +1 -0
- package/dist/packages/packageWatcher.d.ts +62 -0
- package/dist/packages/packageWatcher.d.ts.map +1 -0
- package/dist/packages/packageWatcher.js +146 -0
- package/dist/packages/packageWatcher.js.map +1 -0
- package/dist/providers/MiniCOTProvider.d.ts +48 -0
- package/dist/providers/MiniCOTProvider.d.ts.map +1 -0
- package/dist/providers/MiniCOTProvider.js +98 -0
- package/dist/providers/MiniCOTProvider.js.map +1 -0
- package/dist/reminders/index.d.ts +5 -0
- package/dist/reminders/index.d.ts.map +1 -0
- package/dist/reminders/index.js +5 -0
- package/dist/reminders/index.js.map +1 -0
- package/dist/reminders/skillReminder.d.ts +131 -0
- package/dist/reminders/skillReminder.d.ts.map +1 -0
- package/dist/reminders/skillReminder.js +386 -0
- package/dist/reminders/skillReminder.js.map +1 -0
- package/dist/search.d.ts +35 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +574 -0
- package/dist/search.js.map +1 -0
- package/dist/security/localhostOnly.d.ts +36 -0
- package/dist/security/localhostOnly.d.ts.map +1 -0
- package/dist/security/localhostOnly.js +101 -0
- package/dist/security/localhostOnly.js.map +1 -0
- package/dist/services/CameraZoomSearch.d.ts +206 -0
- package/dist/services/CameraZoomSearch.d.ts.map +1 -0
- package/dist/services/CameraZoomSearch.js +669 -0
- package/dist/services/CameraZoomSearch.js.map +1 -0
- package/dist/services/DataFlowPipeline.d.ts +111 -0
- package/dist/services/DataFlowPipeline.d.ts.map +1 -0
- package/dist/services/DataFlowPipeline.js +379 -0
- package/dist/services/DataFlowPipeline.js.map +1 -0
- package/dist/services/DimensionAdapter.d.ts +194 -0
- package/dist/services/DimensionAdapter.d.ts.map +1 -0
- package/dist/services/DimensionAdapter.js +566 -0
- package/dist/services/DimensionAdapter.js.map +1 -0
- package/dist/services/DimensionService.d.ts +252 -0
- package/dist/services/DimensionService.d.ts.map +1 -0
- package/dist/services/DimensionService.js +564 -0
- package/dist/services/DimensionService.js.map +1 -0
- package/dist/services/EmbeddingQueue.d.ts +71 -0
- package/dist/services/EmbeddingQueue.d.ts.map +1 -0
- package/dist/services/EmbeddingQueue.js +258 -0
- package/dist/services/EmbeddingQueue.js.map +1 -0
- package/dist/services/MemoryDrilldown.d.ts +226 -0
- package/dist/services/MemoryDrilldown.d.ts.map +1 -0
- package/dist/services/MemoryDrilldown.js +479 -0
- package/dist/services/MemoryDrilldown.js.map +1 -0
- package/dist/services/MiniCOTScorer.d.ts +140 -0
- package/dist/services/MiniCOTScorer.d.ts.map +1 -0
- package/dist/services/MiniCOTScorer.js +292 -0
- package/dist/services/MiniCOTScorer.js.map +1 -0
- package/dist/services/ProjectContext.d.ts +342 -0
- package/dist/services/ProjectContext.d.ts.map +1 -0
- package/dist/services/ProjectContext.js +667 -0
- package/dist/services/ProjectContext.js.map +1 -0
- package/dist/services/ResponseCompactor.d.ts +135 -0
- package/dist/services/ResponseCompactor.d.ts.map +1 -0
- package/dist/services/ResponseCompactor.js +501 -0
- package/dist/services/ResponseCompactor.js.map +1 -0
- package/dist/services/TeamCommsDbService.d.ts +202 -0
- package/dist/services/TeamCommsDbService.d.ts.map +1 -0
- package/dist/services/TeamCommsDbService.js +526 -0
- package/dist/services/TeamCommsDbService.js.map +1 -0
- package/dist/services/UnifiedPasswordService.d.ts +166 -0
- package/dist/services/UnifiedPasswordService.d.ts.map +1 -0
- package/dist/services/UnifiedPasswordService.js +587 -0
- package/dist/services/UnifiedPasswordService.js.map +1 -0
- package/dist/services/adaptiveSearchConfig.d.ts +64 -0
- package/dist/services/adaptiveSearchConfig.d.ts.map +1 -0
- package/dist/services/adaptiveSearchConfig.js +187 -0
- package/dist/services/adaptiveSearchConfig.js.map +1 -0
- package/dist/skills/index.d.ts +8 -0
- package/dist/skills/index.d.ts.map +1 -0
- package/dist/skills/index.js +8 -0
- package/dist/skills/index.js.map +1 -0
- package/dist/skills/skillScanner.d.ts +203 -0
- package/dist/skills/skillScanner.d.ts.map +1 -0
- package/dist/skills/skillScanner.js +559 -0
- package/dist/skills/skillScanner.js.map +1 -0
- package/dist/skills/skillsResource.d.ts +69 -0
- package/dist/skills/skillsResource.d.ts.map +1 -0
- package/dist/skills/skillsResource.js +257 -0
- package/dist/skills/skillsResource.js.map +1 -0
- package/dist/startup/index.d.ts +9 -0
- package/dist/startup/index.d.ts.map +1 -0
- package/dist/startup/index.js +12 -0
- package/dist/startup/index.js.map +1 -0
- package/dist/startup/startupIndexing.d.ts +80 -0
- package/dist/startup/startupIndexing.d.ts.map +1 -0
- package/dist/startup/startupIndexing.js +463 -0
- package/dist/startup/startupIndexing.js.map +1 -0
- package/dist/startup/validation.d.ts +89 -0
- package/dist/startup/validation.d.ts.map +1 -0
- package/dist/startup/validation.js +590 -0
- package/dist/startup/validation.js.map +1 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +4 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/overflowManager.d.ts +80 -0
- package/dist/storage/overflowManager.d.ts.map +1 -0
- package/dist/storage/overflowManager.js +317 -0
- package/dist/storage/overflowManager.js.map +1 -0
- package/dist/storage/overflowStorage.d.ts +69 -0
- package/dist/storage/overflowStorage.d.ts.map +1 -0
- package/dist/storage/overflowStorage.js +379 -0
- package/dist/storage/overflowStorage.js.map +1 -0
- package/dist/storage/toonFormat.d.ts +50 -0
- package/dist/storage/toonFormat.d.ts.map +1 -0
- package/dist/storage/toonFormat.js +224 -0
- package/dist/storage/toonFormat.js.map +1 -0
- package/dist/team-members/communication.d.ts +237 -0
- package/dist/team-members/communication.d.ts.map +1 -0
- package/dist/team-members/communication.js +650 -0
- package/dist/team-members/communication.js.map +1 -0
- package/dist/team-members/index.d.ts +14 -0
- package/dist/team-members/index.d.ts.map +1 -0
- package/dist/team-members/index.js +22 -0
- package/dist/team-members/index.js.map +1 -0
- package/dist/team-members/taskOrchestrator.d.ts +224 -0
- package/dist/team-members/taskOrchestrator.d.ts.map +1 -0
- package/dist/team-members/taskOrchestrator.js +574 -0
- package/dist/team-members/taskOrchestrator.js.map +1 -0
- package/dist/team-members/taskTeamMemberLogger.d.ts +157 -0
- package/dist/team-members/taskTeamMemberLogger.d.ts.map +1 -0
- package/dist/team-members/taskTeamMemberLogger.js +478 -0
- package/dist/team-members/taskTeamMemberLogger.js.map +1 -0
- package/dist/team-members/teamCommsService.d.ts +221 -0
- package/dist/team-members/teamCommsService.d.ts.map +1 -0
- package/dist/team-members/teamCommsService.js +628 -0
- package/dist/team-members/teamCommsService.js.map +1 -0
- package/dist/team-members/teamMemberChannels.d.ts +217 -0
- package/dist/team-members/teamMemberChannels.d.ts.map +1 -0
- package/dist/team-members/teamMemberChannels.js +687 -0
- package/dist/team-members/teamMemberChannels.js.map +1 -0
- package/dist/team-members/teamMemberDashboard.d.ts +222 -0
- package/dist/team-members/teamMemberDashboard.d.ts.map +1 -0
- package/dist/team-members/teamMemberDashboard.js +610 -0
- package/dist/team-members/teamMemberDashboard.js.map +1 -0
- package/dist/team-members/teamMemberDeployment.d.ts +60 -0
- package/dist/team-members/teamMemberDeployment.d.ts.map +1 -0
- package/dist/team-members/teamMemberDeployment.js +429 -0
- package/dist/team-members/teamMemberDeployment.js.map +1 -0
- package/dist/team-members/teamMemberDiscovery.d.ts +178 -0
- package/dist/team-members/teamMemberDiscovery.d.ts.map +1 -0
- package/dist/team-members/teamMemberDiscovery.js +446 -0
- package/dist/team-members/teamMemberDiscovery.js.map +1 -0
- package/dist/team-members/teamMemberHistory.d.ts +80 -0
- package/dist/team-members/teamMemberHistory.d.ts.map +1 -0
- package/dist/team-members/teamMemberHistory.js +426 -0
- package/dist/team-members/teamMemberHistory.js.map +1 -0
- package/dist/team-members/teamMemberLimits.d.ts +66 -0
- package/dist/team-members/teamMemberLimits.d.ts.map +1 -0
- package/dist/team-members/teamMemberLimits.js +259 -0
- package/dist/team-members/teamMemberLimits.js.map +1 -0
- package/dist/team-members/teamMemberRegistry.d.ts +199 -0
- package/dist/team-members/teamMemberRegistry.d.ts.map +1 -0
- package/dist/team-members/teamMemberRegistry.js +572 -0
- package/dist/team-members/teamMemberRegistry.js.map +1 -0
- package/dist/team-members/teamMemberTracker.d.ts +148 -0
- package/dist/team-members/teamMemberTracker.d.ts.map +1 -0
- package/dist/team-members/teamMemberTracker.js +828 -0
- package/dist/team-members/teamMemberTracker.js.map +1 -0
- package/dist/team-members/workers/aiWorker.d.ts +53 -0
- package/dist/team-members/workers/aiWorker.d.ts.map +1 -0
- package/dist/team-members/workers/aiWorker.js +322 -0
- package/dist/team-members/workers/aiWorker.js.map +1 -0
- package/dist/team-members/workers/baseWorker.d.ts +101 -0
- package/dist/team-members/workers/baseWorker.d.ts.map +1 -0
- package/dist/team-members/workers/baseWorker.js +179 -0
- package/dist/team-members/workers/baseWorker.js.map +1 -0
- package/dist/team-members/workers/codeReviewWorker.d.ts +3 -0
- package/dist/team-members/workers/codeReviewWorker.d.ts.map +1 -0
- package/dist/team-members/workers/codeReviewWorker.js +144 -0
- package/dist/team-members/workers/codeReviewWorker.js.map +1 -0
- package/dist/team-members/workers/index.d.ts +7 -0
- package/dist/team-members/workers/index.d.ts.map +1 -0
- package/dist/team-members/workers/index.js +7 -0
- package/dist/team-members/workers/index.js.map +1 -0
- package/dist/team-members/workers/repairWorker.d.ts +9 -0
- package/dist/team-members/workers/repairWorker.d.ts.map +1 -0
- package/dist/team-members/workers/repairWorker.js +102 -0
- package/dist/team-members/workers/repairWorker.js.map +1 -0
- package/dist/team-members/workers/sendToTeamMemberB.d.ts +9 -0
- package/dist/team-members/workers/sendToTeamMemberB.d.ts.map +1 -0
- package/dist/team-members/workers/sendToTeamMemberB.js +105 -0
- package/dist/team-members/workers/sendToTeamMemberB.js.map +1 -0
- package/dist/team-members/workers/specmemClient.d.ts +179 -0
- package/dist/team-members/workers/specmemClient.d.ts.map +1 -0
- package/dist/team-members/workers/specmemClient.js +421 -0
- package/dist/team-members/workers/specmemClient.js.map +1 -0
- package/dist/team-members/workers/testCommunication.d.ts +8 -0
- package/dist/team-members/workers/testCommunication.d.ts.map +1 -0
- package/dist/team-members/workers/testCommunication.js +136 -0
- package/dist/team-members/workers/testCommunication.js.map +1 -0
- package/dist/team-members/workers/testCommunicationSuite.d.ts +26 -0
- package/dist/team-members/workers/testCommunicationSuite.d.ts.map +1 -0
- package/dist/team-members/workers/testCommunicationSuite.js +415 -0
- package/dist/team-members/workers/testCommunicationSuite.js.map +1 -0
- package/dist/team-members/workers/testWorker.d.ts +9 -0
- package/dist/team-members/workers/testWorker.d.ts.map +1 -0
- package/dist/team-members/workers/testWorker.js +107 -0
- package/dist/team-members/workers/testWorker.js.map +1 -0
- package/dist/tools/agentDefinitions.d.ts +30 -0
- package/dist/tools/agentDefinitions.d.ts.map +1 -0
- package/dist/tools/agentDefinitions.js +166 -0
- package/dist/tools/agentDefinitions.js.map +1 -0
- package/dist/tools/goofy/checkSyncStatus.d.ts +68 -0
- package/dist/tools/goofy/checkSyncStatus.d.ts.map +1 -0
- package/dist/tools/goofy/checkSyncStatus.js +112 -0
- package/dist/tools/goofy/checkSyncStatus.js.map +1 -0
- package/dist/tools/goofy/codeMemoryLink.d.ts +82 -0
- package/dist/tools/goofy/codeMemoryLink.d.ts.map +1 -0
- package/dist/tools/goofy/codeMemoryLink.js +212 -0
- package/dist/tools/goofy/codeMemoryLink.js.map +1 -0
- package/dist/tools/goofy/compareInstanceMemory.d.ts +97 -0
- package/dist/tools/goofy/compareInstanceMemory.d.ts.map +1 -0
- package/dist/tools/goofy/compareInstanceMemory.js +218 -0
- package/dist/tools/goofy/compareInstanceMemory.js.map +1 -0
- package/dist/tools/goofy/createReasoningChain.d.ts +135 -0
- package/dist/tools/goofy/createReasoningChain.d.ts.map +1 -0
- package/dist/tools/goofy/createReasoningChain.js +257 -0
- package/dist/tools/goofy/createReasoningChain.js.map +1 -0
- package/dist/tools/goofy/deployTeamMember.d.ts +63 -0
- package/dist/tools/goofy/deployTeamMember.d.ts.map +1 -0
- package/dist/tools/goofy/deployTeamMember.js +103 -0
- package/dist/tools/goofy/deployTeamMember.js.map +1 -0
- package/dist/tools/goofy/drillDown.d.ts +143 -0
- package/dist/tools/goofy/drillDown.d.ts.map +1 -0
- package/dist/tools/goofy/drillDown.js +288 -0
- package/dist/tools/goofy/drillDown.js.map +1 -0
- package/dist/tools/goofy/extractClaudeSessions.d.ts +90 -0
- package/dist/tools/goofy/extractClaudeSessions.d.ts.map +1 -0
- package/dist/tools/goofy/extractClaudeSessions.js +277 -0
- package/dist/tools/goofy/extractClaudeSessions.js.map +1 -0
- package/dist/tools/goofy/extractContextRestorations.d.ts +70 -0
- package/dist/tools/goofy/extractContextRestorations.d.ts.map +1 -0
- package/dist/tools/goofy/extractContextRestorations.js +100 -0
- package/dist/tools/goofy/extractContextRestorations.js.map +1 -0
- package/dist/tools/goofy/findCodePointers.d.ts +364 -0
- package/dist/tools/goofy/findCodePointers.d.ts.map +1 -0
- package/dist/tools/goofy/findCodePointers.js +1764 -0
- package/dist/tools/goofy/findCodePointers.js.map +1 -0
- package/dist/tools/goofy/findMemoryGallery.d.ts +40 -0
- package/dist/tools/goofy/findMemoryGallery.d.ts.map +1 -0
- package/dist/tools/goofy/findMemoryGallery.js +66 -0
- package/dist/tools/goofy/findMemoryGallery.js.map +1 -0
- package/dist/tools/goofy/findWhatISaid.d.ts +300 -0
- package/dist/tools/goofy/findWhatISaid.d.ts.map +1 -0
- package/dist/tools/goofy/findWhatISaid.js +2547 -0
- package/dist/tools/goofy/findWhatISaid.js.map +1 -0
- package/dist/tools/goofy/forceResync.d.ts +57 -0
- package/dist/tools/goofy/forceResync.d.ts.map +1 -0
- package/dist/tools/goofy/forceResync.js +100 -0
- package/dist/tools/goofy/forceResync.js.map +1 -0
- package/dist/tools/goofy/getActiveTeamMembers.d.ts +48 -0
- package/dist/tools/goofy/getActiveTeamMembers.d.ts.map +1 -0
- package/dist/tools/goofy/getActiveTeamMembers.js +136 -0
- package/dist/tools/goofy/getActiveTeamMembers.js.map +1 -0
- package/dist/tools/goofy/getMemoryFull.d.ts +34 -0
- package/dist/tools/goofy/getMemoryFull.d.ts.map +1 -0
- package/dist/tools/goofy/getMemoryFull.js +58 -0
- package/dist/tools/goofy/getMemoryFull.js.map +1 -0
- package/dist/tools/goofy/getSessionWatcherStatus.d.ts +43 -0
- package/dist/tools/goofy/getSessionWatcherStatus.d.ts.map +1 -0
- package/dist/tools/goofy/getSessionWatcherStatus.js +92 -0
- package/dist/tools/goofy/getSessionWatcherStatus.js.map +1 -0
- package/dist/tools/goofy/getTeamMemberOutput.d.ts +35 -0
- package/dist/tools/goofy/getTeamMemberOutput.d.ts.map +1 -0
- package/dist/tools/goofy/getTeamMemberOutput.js +62 -0
- package/dist/tools/goofy/getTeamMemberOutput.js.map +1 -0
- package/dist/tools/goofy/getTeamMemberScreen.d.ts +28 -0
- package/dist/tools/goofy/getTeamMemberScreen.d.ts.map +1 -0
- package/dist/tools/goofy/getTeamMemberScreen.js +59 -0
- package/dist/tools/goofy/getTeamMemberScreen.js.map +1 -0
- package/dist/tools/goofy/getTeamMemberStatus.d.ts +33 -0
- package/dist/tools/goofy/getTeamMemberStatus.d.ts.map +1 -0
- package/dist/tools/goofy/getTeamMemberStatus.js +56 -0
- package/dist/tools/goofy/getTeamMemberStatus.js.map +1 -0
- package/dist/tools/goofy/index.d.ts +39 -0
- package/dist/tools/goofy/index.d.ts.map +1 -0
- package/dist/tools/goofy/index.js +51 -0
- package/dist/tools/goofy/index.js.map +1 -0
- package/dist/tools/goofy/interveneTeamMember.d.ts +33 -0
- package/dist/tools/goofy/interveneTeamMember.d.ts.map +1 -0
- package/dist/tools/goofy/interveneTeamMember.js +69 -0
- package/dist/tools/goofy/interveneTeamMember.js.map +1 -0
- package/dist/tools/goofy/killDeployedTeamMember.d.ts +29 -0
- package/dist/tools/goofy/killDeployedTeamMember.d.ts.map +1 -0
- package/dist/tools/goofy/killDeployedTeamMember.js +56 -0
- package/dist/tools/goofy/killDeployedTeamMember.js.map +1 -0
- package/dist/tools/goofy/linkTheVibes.d.ts +125 -0
- package/dist/tools/goofy/linkTheVibes.d.ts.map +1 -0
- package/dist/tools/goofy/linkTheVibes.js +354 -0
- package/dist/tools/goofy/linkTheVibes.js.map +1 -0
- package/dist/tools/goofy/listDeployedTeamMembers.d.ts +26 -0
- package/dist/tools/goofy/listDeployedTeamMembers.d.ts.map +1 -0
- package/dist/tools/goofy/listDeployedTeamMembers.js +52 -0
- package/dist/tools/goofy/listDeployedTeamMembers.js.map +1 -0
- package/dist/tools/goofy/listenForMessages.d.ts +56 -0
- package/dist/tools/goofy/listenForMessages.d.ts.map +1 -0
- package/dist/tools/goofy/listenForMessages.js +122 -0
- package/dist/tools/goofy/listenForMessages.js.map +1 -0
- package/dist/tools/goofy/memoryHealthCheck.d.ts +159 -0
- package/dist/tools/goofy/memoryHealthCheck.d.ts.map +1 -0
- package/dist/tools/goofy/memoryHealthCheck.js +443 -0
- package/dist/tools/goofy/memoryHealthCheck.js.map +1 -0
- package/dist/tools/goofy/rememberThisShit.d.ts +103 -0
- package/dist/tools/goofy/rememberThisShit.d.ts.map +1 -0
- package/dist/tools/goofy/rememberThisShit.js +291 -0
- package/dist/tools/goofy/rememberThisShit.js.map +1 -0
- package/dist/tools/goofy/sayToTeamMember.d.ts +55 -0
- package/dist/tools/goofy/sayToTeamMember.d.ts.map +1 -0
- package/dist/tools/goofy/sayToTeamMember.js +116 -0
- package/dist/tools/goofy/sayToTeamMember.js.map +1 -0
- package/dist/tools/goofy/selfMessage.d.ts +54 -0
- package/dist/tools/goofy/selfMessage.d.ts.map +1 -0
- package/dist/tools/goofy/selfMessage.js +111 -0
- package/dist/tools/goofy/selfMessage.js.map +1 -0
- package/dist/tools/goofy/sendHeartbeat.d.ts +53 -0
- package/dist/tools/goofy/sendHeartbeat.d.ts.map +1 -0
- package/dist/tools/goofy/sendHeartbeat.js +119 -0
- package/dist/tools/goofy/sendHeartbeat.js.map +1 -0
- package/dist/tools/goofy/showMeTheStats.d.ts +216 -0
- package/dist/tools/goofy/showMeTheStats.d.ts.map +1 -0
- package/dist/tools/goofy/showMeTheStats.js +535 -0
- package/dist/tools/goofy/showMeTheStats.js.map +1 -0
- package/dist/tools/goofy/smartRecall.d.ts +136 -0
- package/dist/tools/goofy/smartRecall.d.ts.map +1 -0
- package/dist/tools/goofy/smartRecall.js +286 -0
- package/dist/tools/goofy/smartRecall.js.map +1 -0
- package/dist/tools/goofy/smartSearch.d.ts +64 -0
- package/dist/tools/goofy/smartSearch.d.ts.map +1 -0
- package/dist/tools/goofy/smartSearch.js +89 -0
- package/dist/tools/goofy/smartSearch.js.map +1 -0
- package/dist/tools/goofy/smushMemoriesTogether.d.ts +128 -0
- package/dist/tools/goofy/smushMemoriesTogether.d.ts.map +1 -0
- package/dist/tools/goofy/smushMemoriesTogether.js +536 -0
- package/dist/tools/goofy/smushMemoriesTogether.js.map +1 -0
- package/dist/tools/goofy/spatialSearch.d.ts +198 -0
- package/dist/tools/goofy/spatialSearch.d.ts.map +1 -0
- package/dist/tools/goofy/spatialSearch.js +551 -0
- package/dist/tools/goofy/spatialSearch.js.map +1 -0
- package/dist/tools/goofy/spawnResearchTeamMember.d.ts +104 -0
- package/dist/tools/goofy/spawnResearchTeamMember.d.ts.map +1 -0
- package/dist/tools/goofy/spawnResearchTeamMember.js +290 -0
- package/dist/tools/goofy/spawnResearchTeamMember.js.map +1 -0
- package/dist/tools/goofy/spawnResearchTeamMemberTool.d.ts +121 -0
- package/dist/tools/goofy/spawnResearchTeamMemberTool.d.ts.map +1 -0
- package/dist/tools/goofy/spawnResearchTeamMemberTool.js +215 -0
- package/dist/tools/goofy/spawnResearchTeamMemberTool.js.map +1 -0
- package/dist/tools/goofy/startWatchingTheFiles.d.ts +81 -0
- package/dist/tools/goofy/startWatchingTheFiles.d.ts.map +1 -0
- package/dist/tools/goofy/startWatchingTheFiles.js +161 -0
- package/dist/tools/goofy/startWatchingTheFiles.js.map +1 -0
- package/dist/tools/goofy/stopWatchingTheFiles.d.ts +50 -0
- package/dist/tools/goofy/stopWatchingTheFiles.d.ts.map +1 -0
- package/dist/tools/goofy/stopWatchingTheFiles.js +81 -0
- package/dist/tools/goofy/stopWatchingTheFiles.js.map +1 -0
- package/dist/tools/goofy/whatDidIMean.d.ts +113 -0
- package/dist/tools/goofy/whatDidIMean.d.ts.map +1 -0
- package/dist/tools/goofy/whatDidIMean.js +401 -0
- package/dist/tools/goofy/whatDidIMean.js.map +1 -0
- package/dist/tools/goofy/yeahNahDeleteThat.d.ts +109 -0
- package/dist/tools/goofy/yeahNahDeleteThat.d.ts.map +1 -0
- package/dist/tools/goofy/yeahNahDeleteThat.js +319 -0
- package/dist/tools/goofy/yeahNahDeleteThat.js.map +1 -0
- package/dist/tools/index.d.ts +9 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +9 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/teamMemberDeployer.d.ts +117 -0
- package/dist/tools/teamMemberDeployer.d.ts.map +1 -0
- package/dist/tools/teamMemberDeployer.js +613 -0
- package/dist/tools/teamMemberDeployer.js.map +1 -0
- package/dist/trace/index.d.ts +14 -0
- package/dist/trace/index.d.ts.map +1 -0
- package/dist/trace/index.js +16 -0
- package/dist/trace/index.js.map +1 -0
- package/dist/trace/tools/analyzeImpact.d.ts +90 -0
- package/dist/trace/tools/analyzeImpact.d.ts.map +1 -0
- package/dist/trace/tools/analyzeImpact.js +240 -0
- package/dist/trace/tools/analyzeImpact.js.map +1 -0
- package/dist/trace/tools/exploreDependencies.d.ts +81 -0
- package/dist/trace/tools/exploreDependencies.d.ts.map +1 -0
- package/dist/trace/tools/exploreDependencies.js +161 -0
- package/dist/trace/tools/exploreDependencies.js.map +1 -0
- package/dist/trace/tools/findSimilarBugs.d.ts +112 -0
- package/dist/trace/tools/findSimilarBugs.d.ts.map +1 -0
- package/dist/trace/tools/findSimilarBugs.js +216 -0
- package/dist/trace/tools/findSimilarBugs.js.map +1 -0
- package/dist/trace/tools/index.d.ts +22 -0
- package/dist/trace/tools/index.d.ts.map +1 -0
- package/dist/trace/tools/index.js +39 -0
- package/dist/trace/tools/index.js.map +1 -0
- package/dist/trace/tools/smartExplore.d.ts +126 -0
- package/dist/trace/tools/smartExplore.d.ts.map +1 -0
- package/dist/trace/tools/smartExplore.js +303 -0
- package/dist/trace/tools/smartExplore.js.map +1 -0
- package/dist/trace/tools/traceError.d.ts +101 -0
- package/dist/trace/tools/traceError.d.ts.map +1 -0
- package/dist/trace/tools/traceError.js +175 -0
- package/dist/trace/tools/traceError.js.map +1 -0
- package/dist/trace/traceExploreSystem.d.ts +271 -0
- package/dist/trace/traceExploreSystem.d.ts.map +1 -0
- package/dist/trace/traceExploreSystem.js +789 -0
- package/dist/trace/traceExploreSystem.js.map +1 -0
- package/dist/types/index.d.ts +421 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +118 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/circuitBreaker.d.ts +195 -0
- package/dist/utils/circuitBreaker.d.ts.map +1 -0
- package/dist/utils/circuitBreaker.js +374 -0
- package/dist/utils/circuitBreaker.js.map +1 -0
- package/dist/utils/cleanupHandler.d.ts +108 -0
- package/dist/utils/cleanupHandler.d.ts.map +1 -0
- package/dist/utils/cleanupHandler.js +203 -0
- package/dist/utils/cleanupHandler.js.map +1 -0
- package/dist/utils/compactXmlResponse.d.ts +60 -0
- package/dist/utils/compactXmlResponse.d.ts.map +1 -0
- package/dist/utils/compactXmlResponse.js +209 -0
- package/dist/utils/compactXmlResponse.js.map +1 -0
- package/dist/utils/cotBroadcast.d.ts +56 -0
- package/dist/utils/cotBroadcast.d.ts.map +1 -0
- package/dist/utils/cotBroadcast.js +157 -0
- package/dist/utils/cotBroadcast.js.map +1 -0
- package/dist/utils/debugLogger.d.ts +95 -0
- package/dist/utils/debugLogger.d.ts.map +1 -0
- package/dist/utils/debugLogger.js +610 -0
- package/dist/utils/debugLogger.js.map +1 -0
- package/dist/utils/fileProcessingQueue.d.ts +259 -0
- package/dist/utils/fileProcessingQueue.d.ts.map +1 -0
- package/dist/utils/fileProcessingQueue.js +714 -0
- package/dist/utils/fileProcessingQueue.js.map +1 -0
- package/dist/utils/humanReadableOutput.d.ts +124 -0
- package/dist/utils/humanReadableOutput.d.ts.map +1 -0
- package/dist/utils/humanReadableOutput.js +340 -0
- package/dist/utils/humanReadableOutput.js.map +1 -0
- package/dist/utils/index.d.ts +32 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +71 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/instanceManager.d.ts +530 -0
- package/dist/utils/instanceManager.d.ts.map +1 -0
- package/dist/utils/instanceManager.js +1784 -0
- package/dist/utils/instanceManager.js.map +1 -0
- package/dist/utils/logger.d.ts +6 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +49 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/mapCleanup.d.ts +58 -0
- package/dist/utils/mapCleanup.d.ts.map +1 -0
- package/dist/utils/mapCleanup.js +150 -0
- package/dist/utils/mapCleanup.js.map +1 -0
- package/dist/utils/memoryManager.d.ts +349 -0
- package/dist/utils/memoryManager.d.ts.map +1 -0
- package/dist/utils/memoryManager.js +799 -0
- package/dist/utils/memoryManager.js.map +1 -0
- package/dist/utils/metrics.d.ts +160 -0
- package/dist/utils/metrics.d.ts.map +1 -0
- package/dist/utils/metrics.js +558 -0
- package/dist/utils/metrics.js.map +1 -0
- package/dist/utils/pathValidator.d.ts +96 -0
- package/dist/utils/pathValidator.d.ts.map +1 -0
- package/dist/utils/pathValidator.js +320 -0
- package/dist/utils/pathValidator.js.map +1 -0
- package/dist/utils/portAllocator.d.ts +296 -0
- package/dist/utils/portAllocator.d.ts.map +1 -0
- package/dist/utils/portAllocator.js +768 -0
- package/dist/utils/portAllocator.js.map +1 -0
- package/dist/utils/portUtils.d.ts +97 -0
- package/dist/utils/portUtils.d.ts.map +1 -0
- package/dist/utils/portUtils.js +285 -0
- package/dist/utils/portUtils.js.map +1 -0
- package/dist/utils/postgresAutoSetup.d.ts +55 -0
- package/dist/utils/postgresAutoSetup.d.ts.map +1 -0
- package/dist/utils/postgresAutoSetup.js +406 -0
- package/dist/utils/postgresAutoSetup.js.map +1 -0
- package/dist/utils/processHealthCheck.d.ts +61 -0
- package/dist/utils/processHealthCheck.d.ts.map +1 -0
- package/dist/utils/processHealthCheck.js +313 -0
- package/dist/utils/processHealthCheck.js.map +1 -0
- package/dist/utils/progressReporter.d.ts +151 -0
- package/dist/utils/progressReporter.d.ts.map +1 -0
- package/dist/utils/progressReporter.js +345 -0
- package/dist/utils/progressReporter.js.map +1 -0
- package/dist/utils/projectEnv.d.ts +73 -0
- package/dist/utils/projectEnv.d.ts.map +1 -0
- package/dist/utils/projectEnv.js +137 -0
- package/dist/utils/projectEnv.js.map +1 -0
- package/dist/utils/qoms.d.ts +122 -0
- package/dist/utils/qoms.d.ts.map +1 -0
- package/dist/utils/qoms.js +650 -0
- package/dist/utils/qoms.js.map +1 -0
- package/dist/utils/retryHelper.d.ts +122 -0
- package/dist/utils/retryHelper.d.ts.map +1 -0
- package/dist/utils/retryHelper.js +272 -0
- package/dist/utils/retryHelper.js.map +1 -0
- package/dist/utils/safeProcessTermination.d.ts +206 -0
- package/dist/utils/safeProcessTermination.d.ts.map +1 -0
- package/dist/utils/safeProcessTermination.js +552 -0
- package/dist/utils/safeProcessTermination.js.map +1 -0
- package/dist/utils/sessionInjector.d.ts +68 -0
- package/dist/utils/sessionInjector.d.ts.map +1 -0
- package/dist/utils/sessionInjector.js +189 -0
- package/dist/utils/sessionInjector.js.map +1 -0
- package/dist/utils/statsCache.d.ts +134 -0
- package/dist/utils/statsCache.d.ts.map +1 -0
- package/dist/utils/statsCache.js +285 -0
- package/dist/utils/statsCache.js.map +1 -0
- package/dist/utils/timeoutMiddleware.d.ts +81 -0
- package/dist/utils/timeoutMiddleware.d.ts.map +1 -0
- package/dist/utils/timeoutMiddleware.js +155 -0
- package/dist/utils/timeoutMiddleware.js.map +1 -0
- package/dist/utils/timerRegistry.d.ts +91 -0
- package/dist/utils/timerRegistry.d.ts.map +1 -0
- package/dist/utils/timerRegistry.js +187 -0
- package/dist/utils/timerRegistry.js.map +1 -0
- package/dist/utils/tokenCompressor.d.ts +332 -0
- package/dist/utils/tokenCompressor.d.ts.map +1 -0
- package/dist/utils/tokenCompressor.js +1306 -0
- package/dist/utils/tokenCompressor.js.map +1 -0
- package/dist/utils/tracing.d.ts +236 -0
- package/dist/utils/tracing.d.ts.map +1 -0
- package/dist/utils/tracing.js +378 -0
- package/dist/utils/tracing.js.map +1 -0
- package/dist/watcher/changeHandler.d.ts +123 -0
- package/dist/watcher/changeHandler.d.ts.map +1 -0
- package/dist/watcher/changeHandler.js +623 -0
- package/dist/watcher/changeHandler.js.map +1 -0
- package/dist/watcher/changeQueue.d.ts +133 -0
- package/dist/watcher/changeQueue.d.ts.map +1 -0
- package/dist/watcher/changeQueue.js +355 -0
- package/dist/watcher/changeQueue.js.map +1 -0
- package/dist/watcher/fileWatcher.d.ts +121 -0
- package/dist/watcher/fileWatcher.d.ts.map +1 -0
- package/dist/watcher/fileWatcher.js +531 -0
- package/dist/watcher/fileWatcher.js.map +1 -0
- package/dist/watcher/index.d.ts +94 -0
- package/dist/watcher/index.d.ts.map +1 -0
- package/dist/watcher/index.js +235 -0
- package/dist/watcher/index.js.map +1 -0
- package/dist/watcher/syncChecker.d.ts +93 -0
- package/dist/watcher/syncChecker.d.ts.map +1 -0
- package/dist/watcher/syncChecker.js +401 -0
- package/dist/watcher/syncChecker.js.map +1 -0
- package/dist/watcher/tsCompiler.d.ts +88 -0
- package/dist/watcher/tsCompiler.d.ts.map +1 -0
- package/dist/watcher/tsCompiler.js +212 -0
- package/dist/watcher/tsCompiler.js.map +1 -0
- package/embedding-sandbox/Dockerfile +77 -0
- package/embedding-sandbox/Dockerfile.frankenstein +91 -0
- package/embedding-sandbox/README.md +193 -0
- package/embedding-sandbox/__pycache__/frankenstein-embeddings.cpython-312.pyc +0 -0
- package/embedding-sandbox/__pycache__/frankenstein-embeddings.cpython-313.pyc +0 -0
- package/embedding-sandbox/__pycache__/qqms_v2.cpython-312.pyc +0 -0
- package/embedding-sandbox/__pycache__/qqms_v2.cpython-313.pyc +0 -0
- package/embedding-sandbox/add_js_docs.py +684 -0
- package/embedding-sandbox/build_docs_db.py +239 -0
- package/embedding-sandbox/client.cjs +376 -0
- package/embedding-sandbox/client.ts +913 -0
- package/embedding-sandbox/deploy-frankenstein.sh +240 -0
- package/embedding-sandbox/docker-compose.yml +60 -0
- package/embedding-sandbox/docker-manager.py +325 -0
- package/embedding-sandbox/docs/python_docs.db +0 -0
- package/embedding-sandbox/download-model.mjs +79 -0
- package/embedding-sandbox/download-model.py +28 -0
- package/embedding-sandbox/embedding-supervisor.sh +164 -0
- package/embedding-sandbox/frankenstein-embeddings.py +3940 -0
- package/embedding-sandbox/manage-services.sh +354 -0
- package/embedding-sandbox/overflow_queue.py +345 -0
- package/embedding-sandbox/package.json +17 -0
- package/embedding-sandbox/project_isolation.py +292 -0
- package/embedding-sandbox/qqms_v2.py +967 -0
- package/embedding-sandbox/ram-manager.sh +311 -0
- package/embedding-sandbox/requirements-frankenstein.txt +7 -0
- package/embedding-sandbox/run_js_docs.py +59 -0
- package/embedding-sandbox/seed_docs.py +885 -0
- package/embedding-sandbox/server-batch.mjs +228 -0
- package/embedding-sandbox/server.mjs +389 -0
- package/embedding-sandbox/specmem/sockets/claude-input-state.json +1 -0
- package/embedding-sandbox/specmem/sockets/embedding-death-reason.txt +3 -0
- package/embedding-sandbox/specmem/sockets/seen-sessions.json +1 -0
- package/embedding-sandbox/specmem/sockets/session-start.lock +1 -0
- package/embedding-sandbox/specmem/sockets/session-stops.log +7 -0
- package/embedding-sandbox/start-frankenstein-throttled.sh +98 -0
- package/embedding-sandbox/start-on-demand.sh +116 -0
- package/embedding-sandbox/start-sandbox.sh +237 -0
- package/embedding-sandbox/start-supervised.sh +11 -0
- package/embedding-sandbox/stop-sandbox.sh +51 -0
- package/embedding-sandbox/test-socket.mjs +61 -0
- package/embedding-sandbox/warm-start.sh +353 -0
- package/embedding-sandbox/warm_start_feeder.py +660 -0
- package/legal/README.md +31 -0
- package/legal/anthropic-privacy-center-screenshot-2026-01-30.png +0 -0
- package/legal/anthropic-tos-screenshot-2026-01-30.png +0 -0
- package/lib/codebase-bridge.cjs +308 -0
- package/package.json +136 -0
- package/plugins/specmem-agents/agents/bug-hunter.md +79 -0
- package/plugins/specmem-agents/agents/memory-explorer.md +57 -0
- package/plugins/specmem-agents/agents/team-coordinator.md +82 -0
- package/scripts/auto-updater.cjs +399 -0
- package/scripts/backfill-code-definition-embeddings.ts +440 -0
- package/scripts/backfill-code-embeddings.ts +206 -0
- package/scripts/capture-tos-screenshots.cjs +94 -0
- package/scripts/check-global-install.cjs +67 -0
- package/scripts/cleanup-embedding-servers.sh +25 -0
- package/scripts/dashboard-standalone.sh +369 -0
- package/scripts/deploy-hooks.cjs +1451 -0
- package/scripts/deploy.sh +106 -0
- package/scripts/docker-project-down.sh +83 -0
- package/scripts/docker-project-list.sh +40 -0
- package/scripts/docker-project-up.sh +79 -0
- package/scripts/fast-backfill-embeddings.ts +173 -0
- package/scripts/fast-batch-embedder.cjs +334 -0
- package/scripts/first-run-model-setup.cjs +849 -0
- package/scripts/global-postinstall.cjs +1957 -0
- package/scripts/index-codebase.js +72 -0
- package/scripts/migrate-fix-embeddings.py +110 -0
- package/scripts/migrate-to-project-schemas.ts +525 -0
- package/scripts/optimize-embedding-model.py +324 -0
- package/scripts/optimize-instructions.cjs +530 -0
- package/scripts/pack-docker-images.sh +68 -0
- package/scripts/pack-for-testing.sh +130 -0
- package/scripts/postinstall.cjs +54 -0
- package/scripts/project-env.sh +51 -0
- package/scripts/reset-db.sh +30 -0
- package/scripts/run-indexer.ts +69 -0
- package/scripts/run-migrations.js +47 -0
- package/scripts/setup-db.sh +34 -0
- package/scripts/setup-minimal-schema.sql +143 -0
- package/scripts/skills/code-review.md +44 -0
- package/scripts/skills/debugging.md +56 -0
- package/scripts/skills/specmem-deployteam.md +239 -0
- package/scripts/skills/teammemberskills/EFFICIENT_GREP.md +171 -0
- package/scripts/skills/teammemberskills/task-planning.md +67 -0
- package/scripts/specmem/sockets/session-start.lock +1 -0
- package/scripts/specmem/sockets/session-stops.log +1 -0
- package/scripts/specmem-health.sh +382 -0
- package/scripts/specmem-init.cjs +6935 -0
- package/scripts/strip-debug-logs.cjs +43 -0
- package/scripts/test-mcp-standalone.sh +365 -0
- package/scripts/test-optimized-models.py +166 -0
- package/scripts/verify-embedding-fix.sh +148 -0
- package/skills/code-review.md +44 -0
- package/skills/debugging.md +56 -0
- package/skills/specmem-deployteam.md +239 -0
- package/skills/teammemberskills/EFFICIENT_GREP.md +171 -0
- package/skills/teammemberskills/task-planning.md +67 -0
- package/specmem-health.cjs +522 -0
- package/specmem.env +216 -0
|
@@ -0,0 +1,1384 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mini COT Server Lifecycle Manager v2
|
|
3
|
+
*
|
|
4
|
+
* Manages the Mini COT (Chain-of-Thought) model service lifecycle for the MCP server.
|
|
5
|
+
* Mini COT provides semantic analysis and gallery curation using TinyLlama.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* 1. On MCP server start: Check for stale processes, kill them, start fresh
|
|
9
|
+
* 2. On MCP server stop: Gracefully kill Mini COT server using PID file
|
|
10
|
+
* 3. Project-specific socket path: {PROJECT}/specmem/sockets/minicot.sock
|
|
11
|
+
* 4. Health check that pings Mini COT server periodically
|
|
12
|
+
* 5. Auto-restart if Mini COT server dies
|
|
13
|
+
*
|
|
14
|
+
* NEW IN v2 (Task #18 - Optimized like Frankenstein):
|
|
15
|
+
* - Lazy loading: Model only loads on first request (faster startup)
|
|
16
|
+
* - Model caching: Cached in /tmp/mini-cot-models/
|
|
17
|
+
* - Web dev context: Injects documentation patterns for better code analysis
|
|
18
|
+
* - Quantization support: SPECMEM_MINICOT_QUANTIZE=true for 4-bit (GPU)
|
|
19
|
+
* - RAM guard: Auto-throttles under memory pressure
|
|
20
|
+
* - Health check optimization: Fast ping without full inference
|
|
21
|
+
*
|
|
22
|
+
* Environment Variables:
|
|
23
|
+
* - SPECMEM_MINICOT_CONTEXT: Custom context to inject (optional)
|
|
24
|
+
* - SPECMEM_MINICOT_QUANTIZE: Enable 4-bit quantization (default: false)
|
|
25
|
+
* - SPECMEM_MINICOT_MODEL: Model name (default: TinyLlama/TinyLlama-1.1B-Chat-v1.0)
|
|
26
|
+
* - SPECMEM_MINICOT_DEVICE: cpu/cuda (default: cpu)
|
|
27
|
+
*
|
|
28
|
+
* @author hardwicksoftwareservices
|
|
29
|
+
*/
|
|
30
|
+
import { spawn, execSync } from 'child_process';
|
|
31
|
+
import { existsSync, readFileSync, writeFileSync, unlinkSync, mkdirSync } from 'fs';
|
|
32
|
+
import { join, dirname } from 'path';
|
|
33
|
+
import { createConnection } from 'net';
|
|
34
|
+
import { EventEmitter } from 'events';
|
|
35
|
+
import { fileURLToPath } from 'url';
|
|
36
|
+
import { logger } from '../utils/logger.js';
|
|
37
|
+
import { getProjectPath, getProjectSocketDir } from '../config.js';
|
|
38
|
+
import { mergeWithProjectEnv, getPythonPath } from '../utils/projectEnv.js';
|
|
39
|
+
import { checkProcessHealth } from '../utils/processHealthCheck.js';
|
|
40
|
+
import { ensureSocketDirAtomicSync } from '../utils/fileProcessingQueue.js';
|
|
41
|
+
// ESM __dirname equivalent - replaces hardcoded paths
|
|
42
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
43
|
+
const __dirname = dirname(__filename);
|
|
44
|
+
const DEFAULT_CONFIG = {
|
|
45
|
+
healthCheckIntervalMs: parseInt(process.env['SPECMEM_MINICOT_HEALTH_INTERVAL'] || '30000', 10),
|
|
46
|
+
healthCheckTimeoutMs: parseInt(process.env['SPECMEM_MINICOT_HEALTH_TIMEOUT'] || '10000', 10),
|
|
47
|
+
maxFailuresBeforeRestart: parseInt(process.env['SPECMEM_MINICOT_MAX_FAILURES'] || '2', 10),
|
|
48
|
+
restartCooldownMs: parseInt(process.env['SPECMEM_MINICOT_RESTART_COOLDOWN'] || '10000', 10),
|
|
49
|
+
// With lazy loading, startup is faster - model loads on first request
|
|
50
|
+
startupTimeoutMs: parseInt(process.env['SPECMEM_MINICOT_STARTUP_TIMEOUT'] || '60000', 10),
|
|
51
|
+
maxRestartAttempts: parseInt(process.env['SPECMEM_MINICOT_MAX_RESTARTS'] || '5', 10),
|
|
52
|
+
// Mini COT is optional - disabled by default
|
|
53
|
+
autoStart: process.env['SPECMEM_MINICOT_AUTO_START'] === 'true',
|
|
54
|
+
killStaleOnStart: process.env['SPECMEM_MINICOT_KILL_STALE'] !== 'false',
|
|
55
|
+
maxProcessAgeHours: parseFloat(process.env['SPECMEM_MINICOT_MAX_AGE_HOURS'] || '1'),
|
|
56
|
+
modelName: process.env['SPECMEM_MINICOT_MODEL'] || 'TinyLlama/TinyLlama-1.1B-Chat-v1.0',
|
|
57
|
+
device: process.env['SPECMEM_MINICOT_DEVICE'] || 'cpu',
|
|
58
|
+
};
|
|
59
|
+
// ============================================================================
|
|
60
|
+
// MINI COT SERVER MANAGER
|
|
61
|
+
// ============================================================================
|
|
62
|
+
/**
|
|
63
|
+
* MiniCOTServerManager - Manages Mini COT model service lifecycle
|
|
64
|
+
*
|
|
65
|
+
* Events emitted:
|
|
66
|
+
* - 'started': { pid: number } - Server started successfully
|
|
67
|
+
* - 'stopped': { pid: number } - Server stopped
|
|
68
|
+
* - 'health': HealthCheckResult - Health check result
|
|
69
|
+
* - 'unhealthy': { failures: number } - Server unhealthy
|
|
70
|
+
* - 'restarting': { attempt: number } - Restarting server
|
|
71
|
+
* - 'restart_failed': { attempts: number } - All restart attempts failed
|
|
72
|
+
* - 'restart_loop': RestartLoopInfo - Restart loop detected
|
|
73
|
+
* - 'warm_restart': { success: boolean } - Warm restart completed
|
|
74
|
+
* - 'cold_restart': { success: boolean } - Cold restart completed
|
|
75
|
+
* - 'queue_overflow': { dropped: number, queueSize: number } - Queue overflow occurred
|
|
76
|
+
* - 'queue_drained': { processed: number, failed: number } - Queue drained after restart
|
|
77
|
+
*/
|
|
78
|
+
export class MiniCOTServerManager extends EventEmitter {
|
|
79
|
+
config;
|
|
80
|
+
process = null;
|
|
81
|
+
healthCheckTimer = null;
|
|
82
|
+
isRunning = false;
|
|
83
|
+
consecutiveFailures = 0;
|
|
84
|
+
restartCount = 0;
|
|
85
|
+
lastRestartTime = 0;
|
|
86
|
+
startTime = null;
|
|
87
|
+
projectPath;
|
|
88
|
+
socketPath;
|
|
89
|
+
pidFilePath;
|
|
90
|
+
isShuttingDown = false;
|
|
91
|
+
// Prevent concurrent starts (race condition causing duplicate processes)
|
|
92
|
+
isStarting = false;
|
|
93
|
+
// Track if user manually stopped server (prevents auto-restart)
|
|
94
|
+
stoppedFlagPath;
|
|
95
|
+
// Track restart timestamps for loop detection
|
|
96
|
+
restartTimestamps = [];
|
|
97
|
+
// Overflow queue for requests during downtime
|
|
98
|
+
requestQueue = [];
|
|
99
|
+
queueMaxSize = 100;
|
|
100
|
+
queueDroppedCount = 0;
|
|
101
|
+
isDrainingQueue = false;
|
|
102
|
+
constructor(config = {}) {
|
|
103
|
+
super();
|
|
104
|
+
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
105
|
+
// Get project-specific paths
|
|
106
|
+
this.projectPath = getProjectPath();
|
|
107
|
+
this.socketPath = this.getMiniCOTSocketPath();
|
|
108
|
+
this.pidFilePath = join(dirname(this.socketPath), 'minicot.pid');
|
|
109
|
+
// Stopped flag file path - prevents auto-restart when user manually stops
|
|
110
|
+
this.stoppedFlagPath = join(dirname(this.socketPath), 'minicot.stopped');
|
|
111
|
+
logger.info({
|
|
112
|
+
projectPath: this.projectPath,
|
|
113
|
+
socketPath: this.socketPath,
|
|
114
|
+
pidFilePath: this.pidFilePath,
|
|
115
|
+
config: this.config,
|
|
116
|
+
}, '[MiniCOTServerManager] Initialized');
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Get the Mini COT socket path for this project
|
|
120
|
+
*/
|
|
121
|
+
getMiniCOTSocketPath() {
|
|
122
|
+
const socketDir = getProjectSocketDir();
|
|
123
|
+
return join(socketDir, 'minicot.sock');
|
|
124
|
+
}
|
|
125
|
+
// ==========================================================================
|
|
126
|
+
// PUBLIC METHODS
|
|
127
|
+
// ==========================================================================
|
|
128
|
+
/**
|
|
129
|
+
* Initialize and start the Mini COT server
|
|
130
|
+
* Should be called on MCP server startup
|
|
131
|
+
*/
|
|
132
|
+
async initialize() {
|
|
133
|
+
logger.info('[MiniCOTServerManager] Initializing...');
|
|
134
|
+
// Check if user manually stopped the server - respect their choice
|
|
135
|
+
if (this.isStoppedByUser()) {
|
|
136
|
+
logger.info('[MiniCOTServerManager] Server stopped by user, skipping auto-start. Use userStart() to restart.');
|
|
137
|
+
// Still start health monitoring so we can detect if external process starts it
|
|
138
|
+
this.startHealthMonitoring();
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
// Step 1: Kill any stale processes
|
|
142
|
+
if (this.config.killStaleOnStart) {
|
|
143
|
+
await this.killStaleProcesses();
|
|
144
|
+
}
|
|
145
|
+
// Step 2: Start the Mini COT server if auto-start is enabled
|
|
146
|
+
if (this.config.autoStart) {
|
|
147
|
+
await this.start();
|
|
148
|
+
}
|
|
149
|
+
// Step 3: Start health monitoring
|
|
150
|
+
this.startHealthMonitoring();
|
|
151
|
+
logger.info('[MiniCOTServerManager] Initialization complete');
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Start the Mini COT server
|
|
155
|
+
* First checks if external process is already serving on this socket
|
|
156
|
+
*/
|
|
157
|
+
async start() {
|
|
158
|
+
if (this.isRunning) {
|
|
159
|
+
logger.debug('[MiniCOTServerManager] Server already running');
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
// Prevent concurrent starts (race condition causing duplicate processes)
|
|
163
|
+
if (this.isStarting) {
|
|
164
|
+
logger.debug('[MiniCOTServerManager] Start already in progress, skipping duplicate');
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
if (this.isShuttingDown) {
|
|
168
|
+
logger.warn('[MiniCOTServerManager] Cannot start during shutdown');
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
// Set starting flag immediately to prevent race conditions
|
|
172
|
+
this.isStarting = true;
|
|
173
|
+
logger.info('[MiniCOTServerManager] Starting Mini COT server...');
|
|
174
|
+
// Ensure socket directory exists
|
|
175
|
+
// Task #17 FIX: Use atomic mkdir to prevent race condition when multiple
|
|
176
|
+
// MCP servers try to create the socket directory simultaneously
|
|
177
|
+
const socketDir = dirname(this.socketPath);
|
|
178
|
+
try {
|
|
179
|
+
const created = ensureSocketDirAtomicSync(socketDir);
|
|
180
|
+
if (created) {
|
|
181
|
+
logger.debug({ socketDir }, '[MiniCOTServerManager] Created socket directory atomically');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
catch (err) {
|
|
185
|
+
logger.error({ error: err }, '[MiniCOTServerManager] Failed to create socket directory');
|
|
186
|
+
}
|
|
187
|
+
// Check if socket already exists AND is responsive (external process may have started it)
|
|
188
|
+
if (existsSync(this.socketPath)) {
|
|
189
|
+
const healthResult = await this.healthCheck();
|
|
190
|
+
if (healthResult.success) {
|
|
191
|
+
logger.info({
|
|
192
|
+
socketPath: this.socketPath,
|
|
193
|
+
responseTimeMs: healthResult.responseTimeMs
|
|
194
|
+
}, '[MiniCOTServerManager] Socket already responsive (external server) - using existing');
|
|
195
|
+
// Mark as running but with no managed process (external server)
|
|
196
|
+
this.isRunning = true;
|
|
197
|
+
this.startTime = Date.now();
|
|
198
|
+
this.consecutiveFailures = 0;
|
|
199
|
+
this.isStarting = false;
|
|
200
|
+
this.emit('started', { pid: null, external: true });
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
// Socket exists but not responding - clean it up
|
|
204
|
+
try {
|
|
205
|
+
unlinkSync(this.socketPath);
|
|
206
|
+
logger.debug('[MiniCOTServerManager] Removed non-responsive socket file');
|
|
207
|
+
}
|
|
208
|
+
catch (err) {
|
|
209
|
+
logger.warn({ error: err }, '[MiniCOTServerManager] Failed to remove old socket');
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// Find the Mini COT script
|
|
213
|
+
const miniCOTScript = this.findMiniCOTScript();
|
|
214
|
+
if (!miniCOTScript) {
|
|
215
|
+
logger.error('[MiniCOTServerManager] Could not find Mini COT script');
|
|
216
|
+
this.isStarting = false;
|
|
217
|
+
return false;
|
|
218
|
+
}
|
|
219
|
+
// Spawn the Mini COT server process
|
|
220
|
+
try {
|
|
221
|
+
// yooo ALWAYS use mergeWithProjectEnv for project isolation - spawned processes need the full context
|
|
222
|
+
const env = mergeWithProjectEnv({
|
|
223
|
+
SPECMEM_SOCKET_DIR: socketDir,
|
|
224
|
+
SPECMEM_MINICOT_SOCKET: this.socketPath,
|
|
225
|
+
});
|
|
226
|
+
// Task #22 fix: Use getPythonPath() instead of hardcoded 'python3'
|
|
227
|
+
// Respects SPECMEM_PYTHON_PATH, PYTHON_PATH env vars, and venv activation
|
|
228
|
+
const pythonPath = getPythonPath();
|
|
229
|
+
logger.debug({ pythonPath }, '[MiniCOTServerManager] Using Python executable');
|
|
230
|
+
this.process = spawn(pythonPath, [
|
|
231
|
+
miniCOTScript,
|
|
232
|
+
'--socket', this.socketPath,
|
|
233
|
+
'--model', this.config.modelName,
|
|
234
|
+
'--device', this.config.device,
|
|
235
|
+
], {
|
|
236
|
+
env,
|
|
237
|
+
cwd: this.projectPath,
|
|
238
|
+
detached: true,
|
|
239
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
240
|
+
});
|
|
241
|
+
const pid = this.process.pid;
|
|
242
|
+
if (!pid) {
|
|
243
|
+
throw new Error('Failed to get process PID');
|
|
244
|
+
}
|
|
245
|
+
// Write PID file
|
|
246
|
+
this.writePidFile(pid);
|
|
247
|
+
// Handle process events
|
|
248
|
+
this.process.on('error', (err) => {
|
|
249
|
+
logger.error({ error: err }, '[MiniCOTServerManager] Process error');
|
|
250
|
+
this.handleProcessExit(-1, 'error');
|
|
251
|
+
});
|
|
252
|
+
this.process.on('exit', (code, signal) => {
|
|
253
|
+
logger.info({ code, signal }, '[MiniCOTServerManager] Process exited');
|
|
254
|
+
this.handleProcessExit(code ?? -1, signal ?? 'unknown');
|
|
255
|
+
});
|
|
256
|
+
// Log stderr for debugging
|
|
257
|
+
this.process.stderr?.on('data', (data) => {
|
|
258
|
+
const msg = data.toString().trim();
|
|
259
|
+
if (msg && (msg.includes('Socket') || msg.includes('loaded') || msg.includes('Error') || msg.includes('Mini COT'))) {
|
|
260
|
+
logger.debug({ msg }, '[MiniCOTServerManager] Server stderr');
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
// Wait for socket to appear (Mini COT takes longer due to model loading)
|
|
264
|
+
const socketReady = await this.waitForSocket();
|
|
265
|
+
if (!socketReady) {
|
|
266
|
+
logger.error('[MiniCOTServerManager] Socket did not appear within timeout');
|
|
267
|
+
this.isStarting = false;
|
|
268
|
+
await this.stop();
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
this.isRunning = true;
|
|
272
|
+
this.startTime = Date.now();
|
|
273
|
+
this.consecutiveFailures = 0;
|
|
274
|
+
// Verify the new process with health check
|
|
275
|
+
const verifyHealth = await this.healthCheck();
|
|
276
|
+
if (verifyHealth.success) {
|
|
277
|
+
logger.info({
|
|
278
|
+
pid,
|
|
279
|
+
socketPath: this.socketPath,
|
|
280
|
+
responseTimeMs: verifyHealth.responseTimeMs,
|
|
281
|
+
modelInfo: verifyHealth.modelInfo,
|
|
282
|
+
}, '[MiniCOTServerManager] Server started successfully and verified healthy');
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
logger.warn({
|
|
286
|
+
pid,
|
|
287
|
+
socketPath: this.socketPath,
|
|
288
|
+
error: verifyHealth.error,
|
|
289
|
+
}, '[MiniCOTServerManager] Server started but health check failed (may still be initializing)');
|
|
290
|
+
}
|
|
291
|
+
this.emit('started', { pid });
|
|
292
|
+
this.isStarting = false;
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
catch (err) {
|
|
296
|
+
logger.error({ error: err }, '[MiniCOTServerManager] Failed to start server');
|
|
297
|
+
this.isStarting = false;
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Stop the Mini COT server gracefully
|
|
303
|
+
*/
|
|
304
|
+
async stop() {
|
|
305
|
+
this.isShuttingDown = true;
|
|
306
|
+
this.isStarting = false;
|
|
307
|
+
logger.info('[MiniCOTServerManager] Stopping Mini COT server...');
|
|
308
|
+
// Stop health monitoring
|
|
309
|
+
this.stopHealthMonitoring();
|
|
310
|
+
// Kill the process
|
|
311
|
+
if (this.process && this.process.pid) {
|
|
312
|
+
try {
|
|
313
|
+
// Try graceful SIGTERM first
|
|
314
|
+
process.kill(this.process.pid, 'SIGTERM');
|
|
315
|
+
// Wait briefly for graceful shutdown
|
|
316
|
+
await this.sleep(1000);
|
|
317
|
+
// Force kill if still running
|
|
318
|
+
try {
|
|
319
|
+
process.kill(this.process.pid, 0); // Check if still running
|
|
320
|
+
process.kill(this.process.pid, 'SIGKILL');
|
|
321
|
+
logger.debug('[MiniCOTServerManager] Force killed process');
|
|
322
|
+
}
|
|
323
|
+
catch {
|
|
324
|
+
// Process already dead - good
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
catch (err) {
|
|
328
|
+
logger.debug({ error: err }, '[MiniCOTServerManager] Process already dead');
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
// Also try killing by PID file (in case process reference was lost)
|
|
332
|
+
await this.killByPidFile();
|
|
333
|
+
// Clean up PID file
|
|
334
|
+
this.removePidFile();
|
|
335
|
+
// Clean up socket file
|
|
336
|
+
if (existsSync(this.socketPath)) {
|
|
337
|
+
try {
|
|
338
|
+
unlinkSync(this.socketPath);
|
|
339
|
+
}
|
|
340
|
+
catch (err) {
|
|
341
|
+
logger.debug({ error: err }, '[MiniCOTServerManager] Failed to remove socket');
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
this.process = null;
|
|
345
|
+
this.isRunning = false;
|
|
346
|
+
this.startTime = null;
|
|
347
|
+
logger.info('[MiniCOTServerManager] Server stopped');
|
|
348
|
+
this.emit('stopped', { pid: this.process?.pid });
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Perform a health check on the Mini COT server
|
|
352
|
+
* Mini COT uses JSON-based protocol - send a simple ping request
|
|
353
|
+
*/
|
|
354
|
+
async healthCheck() {
|
|
355
|
+
const startTime = Date.now();
|
|
356
|
+
// Quick check: socket must exist
|
|
357
|
+
if (!existsSync(this.socketPath)) {
|
|
358
|
+
return {
|
|
359
|
+
success: false,
|
|
360
|
+
responseTimeMs: Date.now() - startTime,
|
|
361
|
+
error: 'Socket file does not exist',
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
// Ping the server with a minimal gallery request
|
|
365
|
+
return new Promise((resolve) => {
|
|
366
|
+
const socket = createConnection(this.socketPath);
|
|
367
|
+
let buffer = '';
|
|
368
|
+
let resolved = false;
|
|
369
|
+
const timeout = setTimeout(() => {
|
|
370
|
+
if (!resolved) {
|
|
371
|
+
resolved = true;
|
|
372
|
+
socket.destroy();
|
|
373
|
+
resolve({
|
|
374
|
+
success: false,
|
|
375
|
+
responseTimeMs: Date.now() - startTime,
|
|
376
|
+
error: 'Health check timeout',
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
}, this.config.healthCheckTimeoutMs);
|
|
380
|
+
socket.on('connect', () => {
|
|
381
|
+
// Send a minimal health check request
|
|
382
|
+
// Mini COT expects: { query: string, memories: [...] }
|
|
383
|
+
const healthRequest = {
|
|
384
|
+
query: '__health_check__',
|
|
385
|
+
memories: []
|
|
386
|
+
};
|
|
387
|
+
socket.write(JSON.stringify(healthRequest) + '\n');
|
|
388
|
+
});
|
|
389
|
+
socket.on('data', (data) => {
|
|
390
|
+
buffer += data.toString();
|
|
391
|
+
const newlineIndex = buffer.indexOf('\n');
|
|
392
|
+
if (newlineIndex !== -1) {
|
|
393
|
+
clearTimeout(timeout);
|
|
394
|
+
if (resolved)
|
|
395
|
+
return;
|
|
396
|
+
resolved = true;
|
|
397
|
+
try {
|
|
398
|
+
const response = JSON.parse(buffer.slice(0, newlineIndex));
|
|
399
|
+
socket.end();
|
|
400
|
+
// Mini COT responds with gallery format
|
|
401
|
+
// If we get a response (even empty gallery), it's healthy
|
|
402
|
+
if (response && !response.error) {
|
|
403
|
+
resolve({
|
|
404
|
+
success: true,
|
|
405
|
+
responseTimeMs: Date.now() - startTime,
|
|
406
|
+
modelInfo: {
|
|
407
|
+
loaded: true,
|
|
408
|
+
modelName: this.config.modelName,
|
|
409
|
+
},
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
else {
|
|
413
|
+
resolve({
|
|
414
|
+
success: false,
|
|
415
|
+
responseTimeMs: Date.now() - startTime,
|
|
416
|
+
error: response?.error || 'Invalid response from server',
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
catch (parseErr) {
|
|
421
|
+
socket.end();
|
|
422
|
+
resolve({
|
|
423
|
+
success: false,
|
|
424
|
+
responseTimeMs: Date.now() - startTime,
|
|
425
|
+
error: 'Invalid JSON response from server',
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
socket.on('error', (err) => {
|
|
431
|
+
clearTimeout(timeout);
|
|
432
|
+
if (!resolved) {
|
|
433
|
+
resolved = true;
|
|
434
|
+
resolve({
|
|
435
|
+
success: false,
|
|
436
|
+
responseTimeMs: Date.now() - startTime,
|
|
437
|
+
error: `Socket error: ${err.message}`,
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
/**
|
|
444
|
+
* Get current server status
|
|
445
|
+
*/
|
|
446
|
+
getStatus() {
|
|
447
|
+
const pid = this.readPidFile();
|
|
448
|
+
const socketExists = existsSync(this.socketPath);
|
|
449
|
+
return {
|
|
450
|
+
running: this.isRunning,
|
|
451
|
+
pid,
|
|
452
|
+
socketPath: this.socketPath,
|
|
453
|
+
socketExists,
|
|
454
|
+
healthy: this.isRunning && socketExists && this.consecutiveFailures === 0,
|
|
455
|
+
lastHealthCheck: this.healthCheckTimer ? Date.now() : null,
|
|
456
|
+
consecutiveFailures: this.consecutiveFailures,
|
|
457
|
+
restartCount: this.restartCount,
|
|
458
|
+
startTime: this.startTime,
|
|
459
|
+
uptime: this.startTime ? Date.now() - this.startTime : null,
|
|
460
|
+
// Queue stats
|
|
461
|
+
queueSize: this.requestQueue.length,
|
|
462
|
+
queueMaxSize: this.queueMaxSize,
|
|
463
|
+
queueDropped: this.queueDroppedCount,
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Shutdown - called when MCP server is shutting down
|
|
468
|
+
*/
|
|
469
|
+
async shutdown() {
|
|
470
|
+
await this.stop();
|
|
471
|
+
this.removeAllListeners();
|
|
472
|
+
}
|
|
473
|
+
// ==========================================================================
|
|
474
|
+
// USER-INITIATED START/STOP + RESTART LOOP DETECTION
|
|
475
|
+
// ==========================================================================
|
|
476
|
+
/**
|
|
477
|
+
* Check if user manually stopped the server
|
|
478
|
+
* Returns true if the stopped flag file exists
|
|
479
|
+
*/
|
|
480
|
+
isStoppedByUser() {
|
|
481
|
+
return existsSync(this.stoppedFlagPath);
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* Set the stopped-by-user flag
|
|
485
|
+
* When true, prevents auto-restart
|
|
486
|
+
*/
|
|
487
|
+
setStoppedByUser(stopped) {
|
|
488
|
+
if (stopped) {
|
|
489
|
+
writeFileSync(this.stoppedFlagPath, Date.now().toString(), 'utf8');
|
|
490
|
+
logger.info('[MiniCOTServerManager] Set stopped-by-user flag');
|
|
491
|
+
}
|
|
492
|
+
else if (existsSync(this.stoppedFlagPath)) {
|
|
493
|
+
unlinkSync(this.stoppedFlagPath);
|
|
494
|
+
logger.info('[MiniCOTServerManager] Cleared stopped-by-user flag');
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* User-initiated stop - sets flag to prevent auto-restart
|
|
499
|
+
* Use this when user explicitly wants to stop the Mini COT server
|
|
500
|
+
*/
|
|
501
|
+
async userStop() {
|
|
502
|
+
logger.info('[MiniCOTServerManager] User-initiated stop');
|
|
503
|
+
// Set flag BEFORE stopping to prevent health check restart race
|
|
504
|
+
this.setStoppedByUser(true);
|
|
505
|
+
await this.stop();
|
|
506
|
+
return {
|
|
507
|
+
success: true,
|
|
508
|
+
message: 'Mini COT server stopped. Auto-restart disabled. Use userStart() to restart.'
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* User-initiated start - clears stopped flag and does hard restart
|
|
513
|
+
* Use this when user explicitly wants to (re)start the Mini COT server
|
|
514
|
+
*/
|
|
515
|
+
async userStart() {
|
|
516
|
+
logger.info('[MiniCOTServerManager] User-initiated start');
|
|
517
|
+
// Clear the stopped flag
|
|
518
|
+
this.setStoppedByUser(false);
|
|
519
|
+
// Reset restart counter for fresh start
|
|
520
|
+
this.restartCount = 0;
|
|
521
|
+
this.restartTimestamps = [];
|
|
522
|
+
this.consecutiveFailures = 0;
|
|
523
|
+
this.isShuttingDown = false;
|
|
524
|
+
// Kill existing and start fresh
|
|
525
|
+
await this.stop();
|
|
526
|
+
// Clear the shutdown flag that stop() sets
|
|
527
|
+
this.isShuttingDown = false;
|
|
528
|
+
const success = await this.start();
|
|
529
|
+
if (success) {
|
|
530
|
+
// Start health monitoring if not already running
|
|
531
|
+
this.startHealthMonitoring();
|
|
532
|
+
}
|
|
533
|
+
return {
|
|
534
|
+
success,
|
|
535
|
+
message: success
|
|
536
|
+
? 'Mini COT server started successfully'
|
|
537
|
+
: 'Failed to start Mini COT server - check logs for details'
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
// ==========================================================================
|
|
541
|
+
// WARM/COLD RESTART METHODS
|
|
542
|
+
// ==========================================================================
|
|
543
|
+
/**
|
|
544
|
+
* Warm restart - Quick restart that preserves loaded model weights in memory
|
|
545
|
+
* Sends SIGHUP to Python service to reset state without unloading model
|
|
546
|
+
* Faster recovery from errors while keeping the model warm
|
|
547
|
+
*/
|
|
548
|
+
async warmRestart() {
|
|
549
|
+
logger.info('[MiniCOTServerManager] Warm restart requested');
|
|
550
|
+
// Check if server is running and we have a PID
|
|
551
|
+
const pid = this.readPidFile();
|
|
552
|
+
if (!pid || !this.isRunning) {
|
|
553
|
+
logger.warn('[MiniCOTServerManager] Cannot warm restart - server not running, falling back to cold start');
|
|
554
|
+
return this.coldRestart();
|
|
555
|
+
}
|
|
556
|
+
// Check if process exists
|
|
557
|
+
try {
|
|
558
|
+
process.kill(pid, 0);
|
|
559
|
+
}
|
|
560
|
+
catch {
|
|
561
|
+
logger.warn('[MiniCOTServerManager] Cannot warm restart - process not found, falling back to cold start');
|
|
562
|
+
return this.coldRestart();
|
|
563
|
+
}
|
|
564
|
+
try {
|
|
565
|
+
// Send SIGHUP to signal warm restart (Python will reset state but keep model loaded)
|
|
566
|
+
process.kill(pid, 'SIGHUP');
|
|
567
|
+
logger.info({ pid }, '[MiniCOTServerManager] Sent SIGHUP for warm restart');
|
|
568
|
+
// Wait for server to reset (much faster than cold start)
|
|
569
|
+
await this.sleep(2000);
|
|
570
|
+
// Verify health after warm restart
|
|
571
|
+
const healthResult = await this.healthCheck();
|
|
572
|
+
if (healthResult.success) {
|
|
573
|
+
this.consecutiveFailures = 0;
|
|
574
|
+
this.emit('warm_restart', { success: true });
|
|
575
|
+
// Drain the queue after successful restart
|
|
576
|
+
const drainResult = await this.drainQueue();
|
|
577
|
+
logger.info({
|
|
578
|
+
pid,
|
|
579
|
+
responseTimeMs: healthResult.responseTimeMs,
|
|
580
|
+
queueDrained: drainResult.processed,
|
|
581
|
+
}, '[MiniCOTServerManager] Warm restart successful');
|
|
582
|
+
return {
|
|
583
|
+
success: true,
|
|
584
|
+
message: 'Warm restart completed - model weights preserved',
|
|
585
|
+
drainedCount: drainResult.processed,
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
else {
|
|
589
|
+
// Warm restart didnt work, try cold restart
|
|
590
|
+
logger.warn({ error: healthResult.error }, '[MiniCOTServerManager] Warm restart failed health check, falling back to cold');
|
|
591
|
+
this.emit('warm_restart', { success: false });
|
|
592
|
+
return this.coldRestart();
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
catch (err) {
|
|
596
|
+
logger.error({ error: err }, '[MiniCOTServerManager] Warm restart signal failed');
|
|
597
|
+
this.emit('warm_restart', { success: false });
|
|
598
|
+
return this.coldRestart();
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
/**
|
|
602
|
+
* Cold restart - Full restart that unloads and reloads the TinyLlama model
|
|
603
|
+
* Complete process termination and fresh spawn
|
|
604
|
+
* Use when warm restart fails or model corruption suspected
|
|
605
|
+
*/
|
|
606
|
+
async coldRestart() {
|
|
607
|
+
logger.info('[MiniCOTServerManager] Cold restart requested');
|
|
608
|
+
// Clear stopped flag if set (user wants restart)
|
|
609
|
+
this.setStoppedByUser(false);
|
|
610
|
+
// Reset counters for fresh start
|
|
611
|
+
this.restartCount = 0;
|
|
612
|
+
this.restartTimestamps = [];
|
|
613
|
+
this.consecutiveFailures = 0;
|
|
614
|
+
this.isShuttingDown = false;
|
|
615
|
+
// Kill existing process completely
|
|
616
|
+
await this.stop();
|
|
617
|
+
this.isShuttingDown = false;
|
|
618
|
+
// Wait a bit for cleanup
|
|
619
|
+
await this.sleep(1000);
|
|
620
|
+
// Fresh start
|
|
621
|
+
const success = await this.start();
|
|
622
|
+
if (success) {
|
|
623
|
+
this.startHealthMonitoring();
|
|
624
|
+
this.emit('cold_restart', { success: true });
|
|
625
|
+
// Drain the queue after successful restart
|
|
626
|
+
const drainResult = await this.drainQueue();
|
|
627
|
+
logger.info({
|
|
628
|
+
queueDrained: drainResult.processed,
|
|
629
|
+
}, '[MiniCOTServerManager] Cold restart successful');
|
|
630
|
+
return {
|
|
631
|
+
success: true,
|
|
632
|
+
message: 'Cold restart completed - model fully reloaded',
|
|
633
|
+
drainedCount: drainResult.processed,
|
|
634
|
+
};
|
|
635
|
+
}
|
|
636
|
+
else {
|
|
637
|
+
this.emit('cold_restart', { success: false });
|
|
638
|
+
return {
|
|
639
|
+
success: false,
|
|
640
|
+
message: 'Cold restart failed - check logs for details',
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
// ==========================================================================
|
|
645
|
+
// OVERFLOW QUEUE METHODS
|
|
646
|
+
// ==========================================================================
|
|
647
|
+
/**
|
|
648
|
+
* Queue a request when server is unhealthy/restarting
|
|
649
|
+
* Returns a promise that resolves when the request is processed after restart
|
|
650
|
+
*/
|
|
651
|
+
queueRequest(query, memories) {
|
|
652
|
+
return new Promise((resolve, reject) => {
|
|
653
|
+
// Check queue size limit
|
|
654
|
+
if (this.requestQueue.length >= this.queueMaxSize) {
|
|
655
|
+
// Queue full - drop oldest request and add new one
|
|
656
|
+
const dropped = this.requestQueue.shift();
|
|
657
|
+
if (dropped) {
|
|
658
|
+
dropped.reject(new Error('Request dropped from queue due to overflow'));
|
|
659
|
+
this.queueDroppedCount++;
|
|
660
|
+
logger.warn({
|
|
661
|
+
droppedId: dropped.id,
|
|
662
|
+
queueSize: this.requestQueue.length,
|
|
663
|
+
}, '[MiniCOTServerManager] Queue overflow - dropped oldest request');
|
|
664
|
+
this.emit('queue_overflow', {
|
|
665
|
+
dropped: 1,
|
|
666
|
+
queueSize: this.requestQueue.length,
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
const requestId = 'cot-' + Date.now() + '-' + Math.random().toString(36).slice(2, 8);
|
|
671
|
+
const queuedRequest = {
|
|
672
|
+
id: requestId,
|
|
673
|
+
query,
|
|
674
|
+
memories,
|
|
675
|
+
timestamp: Date.now(),
|
|
676
|
+
resolve,
|
|
677
|
+
reject,
|
|
678
|
+
};
|
|
679
|
+
this.requestQueue.push(queuedRequest);
|
|
680
|
+
logger.debug({
|
|
681
|
+
requestId,
|
|
682
|
+
queueSize: this.requestQueue.length,
|
|
683
|
+
}, '[MiniCOTServerManager] Request queued for processing after restart');
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* Drain the queue after server restart
|
|
688
|
+
* Processes all queued requests sequentially
|
|
689
|
+
*/
|
|
690
|
+
async drainQueue() {
|
|
691
|
+
if (this.isDrainingQueue) {
|
|
692
|
+
logger.debug('[MiniCOTServerManager] Queue drain already in progress');
|
|
693
|
+
return { processed: 0, failed: 0 };
|
|
694
|
+
}
|
|
695
|
+
if (this.requestQueue.length === 0) {
|
|
696
|
+
logger.debug('[MiniCOTServerManager] No queued requests to drain');
|
|
697
|
+
return { processed: 0, failed: 0 };
|
|
698
|
+
}
|
|
699
|
+
this.isDrainingQueue = true;
|
|
700
|
+
const queueSize = this.requestQueue.length;
|
|
701
|
+
logger.info({ queueSize }, '[MiniCOTServerManager] Draining request queue');
|
|
702
|
+
let processed = 0;
|
|
703
|
+
let failed = 0;
|
|
704
|
+
// Process all queued requests
|
|
705
|
+
while (this.requestQueue.length > 0) {
|
|
706
|
+
const request = this.requestQueue.shift();
|
|
707
|
+
if (!request)
|
|
708
|
+
break;
|
|
709
|
+
// Check if request is too old (> 5 minutes)
|
|
710
|
+
const age = Date.now() - request.timestamp;
|
|
711
|
+
if (age > 5 * 60 * 1000) {
|
|
712
|
+
request.reject(new Error('Request expired in queue (> 5 minutes)'));
|
|
713
|
+
failed++;
|
|
714
|
+
continue;
|
|
715
|
+
}
|
|
716
|
+
try {
|
|
717
|
+
// Send request to server
|
|
718
|
+
const result = await this.sendRequest(request.query, request.memories);
|
|
719
|
+
request.resolve(result);
|
|
720
|
+
processed++;
|
|
721
|
+
}
|
|
722
|
+
catch (err) {
|
|
723
|
+
request.reject(err instanceof Error ? err : new Error(String(err)));
|
|
724
|
+
failed++;
|
|
725
|
+
}
|
|
726
|
+
// Small delay between requests to not overwhelm the server
|
|
727
|
+
await this.sleep(100);
|
|
728
|
+
}
|
|
729
|
+
this.isDrainingQueue = false;
|
|
730
|
+
logger.info({ processed, failed }, '[MiniCOTServerManager] Queue drain complete');
|
|
731
|
+
this.emit('queue_drained', { processed, failed });
|
|
732
|
+
return { processed, failed };
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Get current queue status
|
|
736
|
+
*/
|
|
737
|
+
getQueueStatus() {
|
|
738
|
+
const oldestRequest = this.requestQueue[0];
|
|
739
|
+
return {
|
|
740
|
+
size: this.requestQueue.length,
|
|
741
|
+
maxSize: this.queueMaxSize,
|
|
742
|
+
dropped: this.queueDroppedCount,
|
|
743
|
+
isDraining: this.isDrainingQueue,
|
|
744
|
+
oldestRequestAge: oldestRequest ? Date.now() - oldestRequest.timestamp : null,
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
/**
|
|
748
|
+
* Clear all queued requests (reject them with error)
|
|
749
|
+
*/
|
|
750
|
+
clearQueue(reason = 'Queue cleared') {
|
|
751
|
+
const count = this.requestQueue.length;
|
|
752
|
+
while (this.requestQueue.length > 0) {
|
|
753
|
+
const request = this.requestQueue.shift();
|
|
754
|
+
if (request) {
|
|
755
|
+
request.reject(new Error(reason));
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
logger.info({ count, reason }, '[MiniCOTServerManager] Queue cleared');
|
|
759
|
+
return count;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Send a request to the Mini COT server (internal helper)
|
|
763
|
+
*/
|
|
764
|
+
sendRequest(query, memories) {
|
|
765
|
+
return new Promise((resolve, reject) => {
|
|
766
|
+
if (!existsSync(this.socketPath)) {
|
|
767
|
+
reject(new Error('Socket file does not exist'));
|
|
768
|
+
return;
|
|
769
|
+
}
|
|
770
|
+
const socket = createConnection(this.socketPath);
|
|
771
|
+
let buffer = '';
|
|
772
|
+
let resolved = false;
|
|
773
|
+
const timeout = setTimeout(() => {
|
|
774
|
+
if (!resolved) {
|
|
775
|
+
resolved = true;
|
|
776
|
+
socket.destroy();
|
|
777
|
+
reject(new Error('Request timeout'));
|
|
778
|
+
}
|
|
779
|
+
}, 30000); // 30 second timeout for COT processing
|
|
780
|
+
socket.on('connect', () => {
|
|
781
|
+
const request = { query, memories };
|
|
782
|
+
socket.write(JSON.stringify(request) + '\n');
|
|
783
|
+
});
|
|
784
|
+
socket.on('data', (data) => {
|
|
785
|
+
buffer += data.toString();
|
|
786
|
+
const newlineIndex = buffer.indexOf('\n');
|
|
787
|
+
if (newlineIndex !== -1) {
|
|
788
|
+
clearTimeout(timeout);
|
|
789
|
+
if (resolved)
|
|
790
|
+
return;
|
|
791
|
+
resolved = true;
|
|
792
|
+
try {
|
|
793
|
+
const response = JSON.parse(buffer.slice(0, newlineIndex));
|
|
794
|
+
socket.end();
|
|
795
|
+
if (response.error) {
|
|
796
|
+
reject(new Error(response.error));
|
|
797
|
+
}
|
|
798
|
+
else {
|
|
799
|
+
resolve(response);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
catch (parseErr) {
|
|
803
|
+
socket.end();
|
|
804
|
+
reject(new Error('Invalid JSON response from server'));
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
socket.on('error', (err) => {
|
|
809
|
+
clearTimeout(timeout);
|
|
810
|
+
if (!resolved) {
|
|
811
|
+
resolved = true;
|
|
812
|
+
reject(err);
|
|
813
|
+
}
|
|
814
|
+
});
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Get restart loop detection info
|
|
819
|
+
* Detects if we're in a restart loop (>3 restarts in 60 seconds)
|
|
820
|
+
*/
|
|
821
|
+
getRestartLoopInfo() {
|
|
822
|
+
const windowMs = 60000; // 60 seconds
|
|
823
|
+
const loopThreshold = 3;
|
|
824
|
+
const now = Date.now();
|
|
825
|
+
// Count restarts in the last 60 seconds
|
|
826
|
+
const recentRestarts = this.restartTimestamps.filter(ts => now - ts < windowMs).length;
|
|
827
|
+
return {
|
|
828
|
+
inLoop: recentRestarts >= loopThreshold,
|
|
829
|
+
recentRestarts,
|
|
830
|
+
maxAttempts: this.config.maxRestartAttempts,
|
|
831
|
+
windowSeconds: 60,
|
|
832
|
+
restartCount: this.restartCount
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Get extended status including stopped-by-user flag and restart loop info
|
|
837
|
+
*/
|
|
838
|
+
getExtendedStatus() {
|
|
839
|
+
return {
|
|
840
|
+
...this.getStatus(),
|
|
841
|
+
stoppedByUser: this.isStoppedByUser(),
|
|
842
|
+
restartLoop: this.getRestartLoopInfo()
|
|
843
|
+
};
|
|
844
|
+
}
|
|
845
|
+
// ==========================================================================
|
|
846
|
+
// PRIVATE METHODS
|
|
847
|
+
// ==========================================================================
|
|
848
|
+
/**
|
|
849
|
+
* Kill any stale Mini COT processes from previous runs
|
|
850
|
+
* Uses robust process age checking to verify we're killing the right process
|
|
851
|
+
*/
|
|
852
|
+
async killStaleProcesses() {
|
|
853
|
+
logger.info('[MiniCOTServerManager] Checking for stale processes...');
|
|
854
|
+
// Step 1: Check PID file with health check
|
|
855
|
+
const healthInfo = checkProcessHealth({
|
|
856
|
+
pidFilePath: this.pidFilePath,
|
|
857
|
+
maxAgeHours: this.config.maxProcessAgeHours,
|
|
858
|
+
expectedProcessName: 'mini-cot',
|
|
859
|
+
projectPath: this.projectPath,
|
|
860
|
+
});
|
|
861
|
+
if (healthInfo) {
|
|
862
|
+
logger.info({
|
|
863
|
+
pid: healthInfo.pid,
|
|
864
|
+
processExists: healthInfo.processExists,
|
|
865
|
+
isMiniCOTServer: healthInfo.isEmbeddingServer, // reusing field name from generic health check
|
|
866
|
+
ageHours: healthInfo.processAgeHours?.toFixed(2) || 'unknown',
|
|
867
|
+
pidFileAgeHours: healthInfo.pidFileAgeHours.toFixed(2),
|
|
868
|
+
isStale: healthInfo.isStale,
|
|
869
|
+
recommendedAction: healthInfo.recommendedAction,
|
|
870
|
+
statusMessage: healthInfo.statusMessage,
|
|
871
|
+
}, '[MiniCOTServerManager] Process health check result');
|
|
872
|
+
// Take action based on health check
|
|
873
|
+
if (healthInfo.recommendedAction === 'kill') {
|
|
874
|
+
await this.killProcessWithHealthInfo(healthInfo);
|
|
875
|
+
}
|
|
876
|
+
else if (healthInfo.recommendedAction === 'investigate') {
|
|
877
|
+
logger.warn({
|
|
878
|
+
pid: healthInfo.pid,
|
|
879
|
+
commandLine: healthInfo.commandLine,
|
|
880
|
+
message: 'Process exists but may not be Mini COT server - killing to be safe',
|
|
881
|
+
}, '[MiniCOTServerManager] Suspicious process found');
|
|
882
|
+
await this.killProcessWithHealthInfo(healthInfo);
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
logger.info({
|
|
886
|
+
pid: healthInfo.pid,
|
|
887
|
+
ageHours: healthInfo.processAgeHours?.toFixed(2) || 'unknown',
|
|
888
|
+
}, '[MiniCOTServerManager] Process is healthy but will be killed (killStaleOnStart=true)');
|
|
889
|
+
await this.killProcessWithHealthInfo(healthInfo);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
else {
|
|
893
|
+
logger.debug('[MiniCOTServerManager] No PID file found, checking for orphaned processes');
|
|
894
|
+
}
|
|
895
|
+
// Step 2: Also check for orphaned processes (no PID file but process exists)
|
|
896
|
+
await this.killOrphanedProcesses();
|
|
897
|
+
// Step 3: Clean up old socket if exists
|
|
898
|
+
if (existsSync(this.socketPath)) {
|
|
899
|
+
try {
|
|
900
|
+
unlinkSync(this.socketPath);
|
|
901
|
+
logger.debug('[MiniCOTServerManager] Removed stale socket');
|
|
902
|
+
}
|
|
903
|
+
catch (err) {
|
|
904
|
+
logger.debug({ error: err }, '[MiniCOTServerManager] Failed to remove stale socket');
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
// Step 4: Clean up PID file if exists
|
|
908
|
+
this.removePidFile();
|
|
909
|
+
logger.info('[MiniCOTServerManager] Stale process cleanup complete');
|
|
910
|
+
}
|
|
911
|
+
/**
|
|
912
|
+
* Kill a process using health info metadata
|
|
913
|
+
*/
|
|
914
|
+
async killProcessWithHealthInfo(healthInfo) {
|
|
915
|
+
const { pid, processAgeHours, pidFileAgeHours } = healthInfo;
|
|
916
|
+
if (!healthInfo.processExists) {
|
|
917
|
+
logger.debug({ pid }, '[MiniCOTServerManager] Process does not exist, nothing to kill');
|
|
918
|
+
return;
|
|
919
|
+
}
|
|
920
|
+
try {
|
|
921
|
+
logger.info({
|
|
922
|
+
pid,
|
|
923
|
+
processAge: processAgeHours?.toFixed(2) || 'unknown',
|
|
924
|
+
pidFileAge: pidFileAgeHours.toFixed(2),
|
|
925
|
+
commandLine: healthInfo.commandLine,
|
|
926
|
+
}, '[MiniCOTServerManager] Killing process');
|
|
927
|
+
// Try graceful SIGTERM first
|
|
928
|
+
process.kill(pid, 'SIGTERM');
|
|
929
|
+
await this.sleep(500);
|
|
930
|
+
// Check if still running
|
|
931
|
+
try {
|
|
932
|
+
process.kill(pid, 0);
|
|
933
|
+
// Still running - force kill
|
|
934
|
+
process.kill(pid, 'SIGKILL');
|
|
935
|
+
logger.debug({ pid }, '[MiniCOTServerManager] Force killed process with SIGKILL');
|
|
936
|
+
}
|
|
937
|
+
catch {
|
|
938
|
+
// Already dead - good
|
|
939
|
+
logger.debug({ pid }, '[MiniCOTServerManager] Process terminated gracefully');
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
catch (err) {
|
|
943
|
+
logger.debug({ pid, error: err }, '[MiniCOTServerManager] Failed to kill process (may already be dead)');
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Find and kill orphaned Mini COT processes (no PID file)
|
|
948
|
+
* Kills zombie mini-cot processes NOT tracked by any project's PID file
|
|
949
|
+
*/
|
|
950
|
+
async killOrphanedProcesses() {
|
|
951
|
+
try {
|
|
952
|
+
// Find ALL python3 processes running mini-cot-service.py
|
|
953
|
+
const result = execSync(`pgrep -f "mini-cot-service.py" 2>/dev/null || true`, { encoding: 'utf8' }).trim();
|
|
954
|
+
// Get ALL known PID files from specmem sockets dirs
|
|
955
|
+
const trackedPids = new Set();
|
|
956
|
+
try {
|
|
957
|
+
const pidFiles = execSync(`find /tmp -name "minicot.pid" 2>/dev/null | xargs cat 2>/dev/null || true`, { encoding: 'utf8' }).trim();
|
|
958
|
+
// PID files format: {PID}:{TIMESTAMP}
|
|
959
|
+
for (const line of pidFiles.split('\n')) {
|
|
960
|
+
const pid = parseInt(line.split(':')[0], 10);
|
|
961
|
+
if (!isNaN(pid))
|
|
962
|
+
trackedPids.add(pid);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
catch { /* no pid files - all are orphans */ }
|
|
966
|
+
// Also check ~/.specmem/*/sockets/ and project-local specmem/sockets/
|
|
967
|
+
try {
|
|
968
|
+
const homePids = execSync(`find ~/.specmem /specmem -name "minicot.pid" 2>/dev/null | xargs cat 2>/dev/null || true`, { encoding: 'utf8' }).trim();
|
|
969
|
+
for (const line of homePids.split('\n')) {
|
|
970
|
+
const pid = parseInt(line.split(':')[0], 10);
|
|
971
|
+
if (!isNaN(pid))
|
|
972
|
+
trackedPids.add(pid);
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
catch { /* fine */ }
|
|
976
|
+
if (result) {
|
|
977
|
+
const pids = result.split('\n').filter(p => p.trim());
|
|
978
|
+
const orphanPids = pids.filter(p => !trackedPids.has(parseInt(p, 10)));
|
|
979
|
+
if (orphanPids.length > 0) {
|
|
980
|
+
logger.info({
|
|
981
|
+
orphanPids,
|
|
982
|
+
trackedCount: trackedPids.size,
|
|
983
|
+
totalFound: pids.length
|
|
984
|
+
}, '[MiniCOTServerManager] Found orphaned processes (not tracked by any PID file)');
|
|
985
|
+
}
|
|
986
|
+
for (const pidStr of orphanPids) {
|
|
987
|
+
const pid = parseInt(pidStr, 10);
|
|
988
|
+
if (isNaN(pid))
|
|
989
|
+
continue;
|
|
990
|
+
// Skip if tracked by another project
|
|
991
|
+
if (trackedPids.has(pid)) {
|
|
992
|
+
logger.debug({ pid }, '[MiniCOTServerManager] Skipping - tracked by another project');
|
|
993
|
+
continue;
|
|
994
|
+
}
|
|
995
|
+
try {
|
|
996
|
+
// Get process info before killing
|
|
997
|
+
const healthInfo = this.getProcessInfoForOrphan(pid);
|
|
998
|
+
const ageHours = healthInfo?.ageHours ?? null;
|
|
999
|
+
// Only kill if older than max age
|
|
1000
|
+
if (ageHours !== null && ageHours <= this.config.maxProcessAgeHours) {
|
|
1001
|
+
logger.info({
|
|
1002
|
+
pid,
|
|
1003
|
+
ageHours: ageHours.toFixed(2),
|
|
1004
|
+
maxAgeHours: this.config.maxProcessAgeHours,
|
|
1005
|
+
}, '[MiniCOTServerManager] Orphaned process is recent, keeping it');
|
|
1006
|
+
continue;
|
|
1007
|
+
}
|
|
1008
|
+
logger.info({
|
|
1009
|
+
pid,
|
|
1010
|
+
ageHours: ageHours?.toFixed(2) || 'unknown',
|
|
1011
|
+
maxAgeHours: this.config.maxProcessAgeHours,
|
|
1012
|
+
commandLine: healthInfo?.commandLine || 'unknown',
|
|
1013
|
+
}, '[MiniCOTServerManager] Killing stale orphaned process (zombie)');
|
|
1014
|
+
process.kill(pid, 'SIGTERM');
|
|
1015
|
+
await this.sleep(200);
|
|
1016
|
+
// Force kill if still running
|
|
1017
|
+
try {
|
|
1018
|
+
process.kill(pid, 0);
|
|
1019
|
+
process.kill(pid, 'SIGKILL');
|
|
1020
|
+
}
|
|
1021
|
+
catch {
|
|
1022
|
+
// Already dead
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
catch (err) {
|
|
1026
|
+
logger.debug({ pid, error: err }, '[MiniCOTServerManager] Failed to kill orphaned process');
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
catch (err) {
|
|
1032
|
+
// pgrep may not exist or may fail - that's OK
|
|
1033
|
+
logger.debug({ error: err }, '[MiniCOTServerManager] pgrep failed (may not exist)');
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* Get process info for an orphaned process (no PID file)
|
|
1038
|
+
*/
|
|
1039
|
+
getProcessInfoForOrphan(pid) {
|
|
1040
|
+
try {
|
|
1041
|
+
// Try to read /proc/[pid]/stat for start time
|
|
1042
|
+
const statPath = `/proc/${pid}/stat`;
|
|
1043
|
+
if (!existsSync(statPath)) {
|
|
1044
|
+
return null;
|
|
1045
|
+
}
|
|
1046
|
+
const statContent = readFileSync(statPath, 'utf8');
|
|
1047
|
+
const match = statContent.match(/\(.*?\)\s+(.*)$/);
|
|
1048
|
+
if (!match) {
|
|
1049
|
+
return null;
|
|
1050
|
+
}
|
|
1051
|
+
const fields = match[1].split(/\s+/);
|
|
1052
|
+
const startTimeJiffies = parseInt(fields[19], 10);
|
|
1053
|
+
if (!isNaN(startTimeJiffies)) {
|
|
1054
|
+
// Simple age calculation (not fully accurate but good enough)
|
|
1055
|
+
const uptimeContent = readFileSync('/proc/uptime', 'utf8');
|
|
1056
|
+
const uptimeSeconds = parseFloat(uptimeContent.split(/\s+/)[0]);
|
|
1057
|
+
const clockTicks = 100; // Standard for most systems
|
|
1058
|
+
const processStartSeconds = startTimeJiffies / clockTicks;
|
|
1059
|
+
const processAgeSeconds = uptimeSeconds - processStartSeconds;
|
|
1060
|
+
const ageHours = processAgeSeconds / 3600;
|
|
1061
|
+
// Get command line
|
|
1062
|
+
const cmdlinePath = `/proc/${pid}/cmdline`;
|
|
1063
|
+
let commandLine = null;
|
|
1064
|
+
if (existsSync(cmdlinePath)) {
|
|
1065
|
+
commandLine = readFileSync(cmdlinePath, 'utf8').replace(/\0/g, ' ').trim();
|
|
1066
|
+
}
|
|
1067
|
+
return { ageHours, commandLine };
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
catch (err) {
|
|
1071
|
+
logger.debug({ pid, error: err }, '[MiniCOTServerManager] Failed to get orphan process info');
|
|
1072
|
+
}
|
|
1073
|
+
return null;
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Kill process by PID file (using robust health check)
|
|
1077
|
+
*/
|
|
1078
|
+
async killByPidFile() {
|
|
1079
|
+
const healthInfo = checkProcessHealth({
|
|
1080
|
+
pidFilePath: this.pidFilePath,
|
|
1081
|
+
maxAgeHours: this.config.maxProcessAgeHours,
|
|
1082
|
+
expectedProcessName: 'mini-cot',
|
|
1083
|
+
projectPath: this.projectPath,
|
|
1084
|
+
});
|
|
1085
|
+
if (!healthInfo) {
|
|
1086
|
+
logger.debug('[MiniCOTServerManager] No PID file found');
|
|
1087
|
+
return;
|
|
1088
|
+
}
|
|
1089
|
+
logger.debug({
|
|
1090
|
+
pid: healthInfo.pid,
|
|
1091
|
+
processExists: healthInfo.processExists,
|
|
1092
|
+
isMiniCOTServer: healthInfo.isEmbeddingServer,
|
|
1093
|
+
ageHours: healthInfo.processAgeHours?.toFixed(2) || 'unknown',
|
|
1094
|
+
recommendedAction: healthInfo.recommendedAction,
|
|
1095
|
+
statusMessage: healthInfo.statusMessage,
|
|
1096
|
+
}, '[MiniCOTServerManager] Checked PID file process');
|
|
1097
|
+
if (healthInfo.processExists) {
|
|
1098
|
+
await this.killProcessWithHealthInfo(healthInfo);
|
|
1099
|
+
}
|
|
1100
|
+
else {
|
|
1101
|
+
logger.debug({ pid: healthInfo.pid }, '[MiniCOTServerManager] Process from PID file no longer exists');
|
|
1102
|
+
}
|
|
1103
|
+
this.removePidFile();
|
|
1104
|
+
}
|
|
1105
|
+
/**
|
|
1106
|
+
* Find the Mini COT script path
|
|
1107
|
+
*/
|
|
1108
|
+
findMiniCOTScript() {
|
|
1109
|
+
// specmem root dir is 2 levels up from src/mcp/
|
|
1110
|
+
const specmemRoot = dirname(dirname(__dirname));
|
|
1111
|
+
const possiblePaths = [
|
|
1112
|
+
// Project-local (development)
|
|
1113
|
+
join(this.projectPath, 'mini-cot-service.py'),
|
|
1114
|
+
// SpecMem package root (via __dirname - works for all installs)
|
|
1115
|
+
join(specmemRoot, 'mini-cot-service.py'),
|
|
1116
|
+
// Local npm install
|
|
1117
|
+
join(this.projectPath, 'node_modules', 'specmem-hardwicksoftware', 'mini-cot-service.py'),
|
|
1118
|
+
// Global npm install fallback (platform-agnostic)
|
|
1119
|
+
join(dirname(dirname(process.execPath)), 'lib', 'node_modules', 'specmem-hardwicksoftware', 'mini-cot-service.py'),
|
|
1120
|
+
];
|
|
1121
|
+
for (const p of possiblePaths) {
|
|
1122
|
+
if (existsSync(p)) {
|
|
1123
|
+
logger.debug({ path: p }, '[MiniCOTServerManager] Found Mini COT script');
|
|
1124
|
+
return p;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
logger.error({ searchedPaths: possiblePaths }, '[MiniCOTServerManager] Mini COT script not found');
|
|
1128
|
+
return null;
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* Wait for socket file to appear
|
|
1132
|
+
* Mini COT needs more time due to model loading
|
|
1133
|
+
*/
|
|
1134
|
+
async waitForSocket() {
|
|
1135
|
+
const startTime = Date.now();
|
|
1136
|
+
const checkInterval = 1000; // Check every second
|
|
1137
|
+
while (Date.now() - startTime < this.config.startupTimeoutMs) {
|
|
1138
|
+
if (existsSync(this.socketPath)) {
|
|
1139
|
+
// Socket exists - wait a bit more for it to be fully ready
|
|
1140
|
+
await this.sleep(1000);
|
|
1141
|
+
return true;
|
|
1142
|
+
}
|
|
1143
|
+
await this.sleep(checkInterval);
|
|
1144
|
+
}
|
|
1145
|
+
return false;
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Handle process exit
|
|
1149
|
+
*/
|
|
1150
|
+
handleProcessExit(code, signal) {
|
|
1151
|
+
const wasRunning = this.isRunning;
|
|
1152
|
+
this.isRunning = false;
|
|
1153
|
+
// Only clear process if we actually had one (not external server)
|
|
1154
|
+
if (this.process) {
|
|
1155
|
+
this.process = null;
|
|
1156
|
+
}
|
|
1157
|
+
if (this.isShuttingDown) {
|
|
1158
|
+
// Expected exit during shutdown
|
|
1159
|
+
return;
|
|
1160
|
+
}
|
|
1161
|
+
logger.warn({ code, signal, wasRunning }, '[MiniCOTServerManager] Process exited unexpectedly');
|
|
1162
|
+
// Attempt restart if not shutting down
|
|
1163
|
+
this.attemptRestart();
|
|
1164
|
+
}
|
|
1165
|
+
/**
|
|
1166
|
+
* Attempt to restart the server
|
|
1167
|
+
*/
|
|
1168
|
+
async attemptRestart() {
|
|
1169
|
+
// Don't restart if user manually stopped
|
|
1170
|
+
if (this.isStoppedByUser()) {
|
|
1171
|
+
logger.info('[MiniCOTServerManager] Skipping restart - stopped by user');
|
|
1172
|
+
return;
|
|
1173
|
+
}
|
|
1174
|
+
// Check for restart loop (>3 restarts in 60 seconds)
|
|
1175
|
+
const loopInfo = this.getRestartLoopInfo();
|
|
1176
|
+
if (loopInfo.inLoop) {
|
|
1177
|
+
logger.error({
|
|
1178
|
+
recentRestarts: loopInfo.recentRestarts,
|
|
1179
|
+
windowSeconds: 60,
|
|
1180
|
+
}, '[MiniCOTServerManager] RESTART LOOP DETECTED - backing off');
|
|
1181
|
+
this.emit('restart_loop', loopInfo);
|
|
1182
|
+
// Exponential backoff: wait 2^restartCount seconds (max 5 minutes)
|
|
1183
|
+
const backoffMs = Math.min(Math.pow(2, this.restartCount) * 1000, 300000);
|
|
1184
|
+
logger.info({ backoffMs }, '[MiniCOTServerManager] Waiting for exponential backoff');
|
|
1185
|
+
await this.sleep(backoffMs);
|
|
1186
|
+
}
|
|
1187
|
+
// Check cooldown
|
|
1188
|
+
const timeSinceLastRestart = Date.now() - this.lastRestartTime;
|
|
1189
|
+
if (timeSinceLastRestart < this.config.restartCooldownMs) {
|
|
1190
|
+
const waitTime = this.config.restartCooldownMs - timeSinceLastRestart;
|
|
1191
|
+
logger.debug({ waitTime }, '[MiniCOTServerManager] Waiting for restart cooldown');
|
|
1192
|
+
await this.sleep(waitTime);
|
|
1193
|
+
}
|
|
1194
|
+
// Check max restarts
|
|
1195
|
+
if (this.restartCount >= this.config.maxRestartAttempts) {
|
|
1196
|
+
logger.error({
|
|
1197
|
+
restartCount: this.restartCount,
|
|
1198
|
+
maxAttempts: this.config.maxRestartAttempts,
|
|
1199
|
+
}, '[MiniCOTServerManager] Max restart attempts reached');
|
|
1200
|
+
this.emit('restart_failed', { attempts: this.restartCount });
|
|
1201
|
+
return;
|
|
1202
|
+
}
|
|
1203
|
+
this.restartCount++;
|
|
1204
|
+
this.lastRestartTime = Date.now();
|
|
1205
|
+
// Track restart timestamp for loop detection
|
|
1206
|
+
this.restartTimestamps.push(Date.now());
|
|
1207
|
+
// Keep only last 10 timestamps
|
|
1208
|
+
if (this.restartTimestamps.length > 10) {
|
|
1209
|
+
this.restartTimestamps.shift();
|
|
1210
|
+
}
|
|
1211
|
+
logger.info({ attempt: this.restartCount }, '[MiniCOTServerManager] Attempting restart');
|
|
1212
|
+
this.emit('restarting', { attempt: this.restartCount });
|
|
1213
|
+
const success = await this.start();
|
|
1214
|
+
if (!success) {
|
|
1215
|
+
// Will retry on next health check
|
|
1216
|
+
logger.warn('[MiniCOTServerManager] Restart attempt failed');
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
/**
|
|
1220
|
+
* Start health monitoring
|
|
1221
|
+
*/
|
|
1222
|
+
startHealthMonitoring() {
|
|
1223
|
+
if (this.healthCheckTimer) {
|
|
1224
|
+
return;
|
|
1225
|
+
}
|
|
1226
|
+
this.healthCheckTimer = setInterval(async () => {
|
|
1227
|
+
const result = await this.healthCheck();
|
|
1228
|
+
this.emit('health', result);
|
|
1229
|
+
if (result.success) {
|
|
1230
|
+
// Reset failure counter on success
|
|
1231
|
+
if (this.consecutiveFailures > 0) {
|
|
1232
|
+
logger.info({
|
|
1233
|
+
responseTimeMs: result.responseTimeMs,
|
|
1234
|
+
modelInfo: result.modelInfo,
|
|
1235
|
+
previousFailures: this.consecutiveFailures,
|
|
1236
|
+
}, '[MiniCOTServerManager] Health check recovered - server is healthy');
|
|
1237
|
+
}
|
|
1238
|
+
else {
|
|
1239
|
+
logger.debug({
|
|
1240
|
+
responseTimeMs: result.responseTimeMs,
|
|
1241
|
+
modelInfo: result.modelInfo,
|
|
1242
|
+
}, '[MiniCOTServerManager] Health check successful');
|
|
1243
|
+
}
|
|
1244
|
+
this.consecutiveFailures = 0;
|
|
1245
|
+
}
|
|
1246
|
+
else {
|
|
1247
|
+
this.consecutiveFailures++;
|
|
1248
|
+
logger.warn({
|
|
1249
|
+
failures: this.consecutiveFailures,
|
|
1250
|
+
maxFailures: this.config.maxFailuresBeforeRestart,
|
|
1251
|
+
error: result.error,
|
|
1252
|
+
responseTimeMs: result.responseTimeMs,
|
|
1253
|
+
socketPath: this.socketPath,
|
|
1254
|
+
socketExists: existsSync(this.socketPath),
|
|
1255
|
+
}, '[MiniCOTServerManager] Health check failed');
|
|
1256
|
+
this.emit('unhealthy', { failures: this.consecutiveFailures });
|
|
1257
|
+
// Attempt restart if too many failures
|
|
1258
|
+
if (this.consecutiveFailures >= this.config.maxFailuresBeforeRestart) {
|
|
1259
|
+
logger.warn({
|
|
1260
|
+
failures: this.consecutiveFailures,
|
|
1261
|
+
maxFailures: this.config.maxFailuresBeforeRestart,
|
|
1262
|
+
restartCount: this.restartCount,
|
|
1263
|
+
}, '[MiniCOTServerManager] Too many consecutive failures, initiating restart...');
|
|
1264
|
+
this.consecutiveFailures = 0;
|
|
1265
|
+
await this.attemptRestart();
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
}, this.config.healthCheckIntervalMs);
|
|
1269
|
+
// Don't prevent process exit
|
|
1270
|
+
this.healthCheckTimer.unref();
|
|
1271
|
+
logger.debug('[MiniCOTServerManager] Health monitoring started');
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Stop health monitoring
|
|
1275
|
+
*/
|
|
1276
|
+
stopHealthMonitoring() {
|
|
1277
|
+
if (this.healthCheckTimer) {
|
|
1278
|
+
clearInterval(this.healthCheckTimer);
|
|
1279
|
+
this.healthCheckTimer = null;
|
|
1280
|
+
logger.debug('[MiniCOTServerManager] Health monitoring stopped');
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Write PID file with timestamp
|
|
1285
|
+
*/
|
|
1286
|
+
writePidFile(pid) {
|
|
1287
|
+
try {
|
|
1288
|
+
const pidDir = dirname(this.pidFilePath);
|
|
1289
|
+
if (!existsSync(pidDir)) {
|
|
1290
|
+
mkdirSync(pidDir, { recursive: true });
|
|
1291
|
+
}
|
|
1292
|
+
// Format: PID:TIMESTAMP
|
|
1293
|
+
writeFileSync(this.pidFilePath, `${pid}:${Date.now()}`, 'utf8');
|
|
1294
|
+
logger.debug({ pid, path: this.pidFilePath }, '[MiniCOTServerManager] Wrote PID file');
|
|
1295
|
+
}
|
|
1296
|
+
catch (err) {
|
|
1297
|
+
logger.error({ error: err }, '[MiniCOTServerManager] Failed to write PID file');
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
/**
|
|
1301
|
+
* Read PID from file
|
|
1302
|
+
*/
|
|
1303
|
+
readPidFile() {
|
|
1304
|
+
try {
|
|
1305
|
+
if (!existsSync(this.pidFilePath)) {
|
|
1306
|
+
return null;
|
|
1307
|
+
}
|
|
1308
|
+
const content = readFileSync(this.pidFilePath, 'utf8').trim();
|
|
1309
|
+
const pid = parseInt(content.split(':')[0], 10);
|
|
1310
|
+
return isNaN(pid) ? null : pid;
|
|
1311
|
+
}
|
|
1312
|
+
catch (err) {
|
|
1313
|
+
return null;
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
/**
|
|
1317
|
+
* Remove PID file
|
|
1318
|
+
*/
|
|
1319
|
+
removePidFile() {
|
|
1320
|
+
try {
|
|
1321
|
+
if (existsSync(this.pidFilePath)) {
|
|
1322
|
+
unlinkSync(this.pidFilePath);
|
|
1323
|
+
logger.debug('[MiniCOTServerManager] Removed PID file');
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
catch (err) {
|
|
1327
|
+
logger.debug({ error: err }, '[MiniCOTServerManager] Failed to remove PID file');
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
/**
|
|
1331
|
+
* Sleep helper
|
|
1332
|
+
*/
|
|
1333
|
+
sleep(ms) {
|
|
1334
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
1335
|
+
}
|
|
1336
|
+
}
|
|
1337
|
+
// ============================================================================
|
|
1338
|
+
// PER-PROJECT INSTANCE MAP
|
|
1339
|
+
// ============================================================================
|
|
1340
|
+
// Use per-project Map instead of global singleton
|
|
1341
|
+
// This prevents cross-project socket conflicts when running multiple instances
|
|
1342
|
+
const miniCOTManagersByProject = new Map();
|
|
1343
|
+
/**
|
|
1344
|
+
* Get or create the Mini COT server manager for a specific project
|
|
1345
|
+
* Uses per-project Map pattern to ensure proper isolation
|
|
1346
|
+
*/
|
|
1347
|
+
export function getMiniCOTServerManager(config) {
|
|
1348
|
+
const projectPath = getProjectPath();
|
|
1349
|
+
// Check if we already have a manager for this project
|
|
1350
|
+
if (miniCOTManagersByProject.has(projectPath)) {
|
|
1351
|
+
return miniCOTManagersByProject.get(projectPath);
|
|
1352
|
+
}
|
|
1353
|
+
// Create new manager for this project
|
|
1354
|
+
const manager = new MiniCOTServerManager(config);
|
|
1355
|
+
miniCOTManagersByProject.set(projectPath, manager);
|
|
1356
|
+
logger.info({ projectPath, totalManagers: miniCOTManagersByProject.size }, '[MiniCOTServerManager] Created new per-project manager');
|
|
1357
|
+
return manager;
|
|
1358
|
+
}
|
|
1359
|
+
/**
|
|
1360
|
+
* Reset the Mini COT server manager for a specific project (or current project)
|
|
1361
|
+
*/
|
|
1362
|
+
export async function resetMiniCOTServerManager(projectPath) {
|
|
1363
|
+
const targetPath = projectPath || getProjectPath();
|
|
1364
|
+
if (miniCOTManagersByProject.has(targetPath)) {
|
|
1365
|
+
const manager = miniCOTManagersByProject.get(targetPath);
|
|
1366
|
+
await manager.shutdown();
|
|
1367
|
+
miniCOTManagersByProject.delete(targetPath);
|
|
1368
|
+
logger.info({ projectPath: targetPath }, '[MiniCOTServerManager] Reset project manager');
|
|
1369
|
+
}
|
|
1370
|
+
}
|
|
1371
|
+
/**
|
|
1372
|
+
* Reset ALL Mini COT server managers (for global cleanup)
|
|
1373
|
+
*/
|
|
1374
|
+
export async function resetAllMiniCOTServerManagers() {
|
|
1375
|
+
const promises = [];
|
|
1376
|
+
for (const [projectPath, manager] of miniCOTManagersByProject) {
|
|
1377
|
+
promises.push(manager.shutdown().then(() => {
|
|
1378
|
+
logger.info({ projectPath }, '[MiniCOTServerManager] Shutdown manager');
|
|
1379
|
+
}));
|
|
1380
|
+
}
|
|
1381
|
+
await Promise.all(promises);
|
|
1382
|
+
miniCOTManagersByProject.clear();
|
|
1383
|
+
}
|
|
1384
|
+
//# sourceMappingURL=miniCOTServerManager.js.map
|