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,1279 @@
|
|
|
1
|
+
// yooo these are the MCP tools for codebase operations
|
|
2
|
+
// findCodeThatMatters, codebaseStatsGoCrazy, and more
|
|
3
|
+
// claude gonna be able to search our entire codebase now fr fr
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { logger } from '../utils/logger.js';
|
|
6
|
+
import { IngestThisWholeAssMfCodebase } from './ingestion.js';
|
|
7
|
+
import { DEFAULT_EXCLUSIONS } from './exclusions.js';
|
|
8
|
+
import { LANGUAGE_REGISTRY } from './languageDetection.js';
|
|
9
|
+
import { getDimensionService } from '../services/DimensionService.js';
|
|
10
|
+
import { compactResponse } from '../services/ResponseCompactor.js';
|
|
11
|
+
import { getProjectContext } from '../services/ProjectContext.js';
|
|
12
|
+
import { TEXT_LIMITS } from '../constants.js';
|
|
13
|
+
/**
|
|
14
|
+
* Input schemas for all the codebase tools
|
|
15
|
+
*/
|
|
16
|
+
export const IngestCodebaseInput = z.object({
|
|
17
|
+
rootPath: z.string().describe('absolute path to the codebase root directory'),
|
|
18
|
+
additionalExclusions: z.array(z.string()).optional().describe('extra patterns to exclude'),
|
|
19
|
+
maxFileSizeBytes: z.number().optional().describe('skip files larger than this (default 10MB)'),
|
|
20
|
+
generateEmbeddings: z.boolean().default(true).describe('whether to generate embeddings'),
|
|
21
|
+
includeHiddenFiles: z.boolean().default(false).describe('include hidden files/folders')
|
|
22
|
+
});
|
|
23
|
+
export const FindInCodebaseInput = z.object({
|
|
24
|
+
query: z.string().min(1).describe('semantic search query'),
|
|
25
|
+
limit: z.number().int().min(1).max(100).default(20).describe('max results'),
|
|
26
|
+
threshold: z.number().min(0).max(1).default(0.6).describe('similarity threshold'),
|
|
27
|
+
languageFilter: z.array(z.string()).optional().describe('filter by language IDs'),
|
|
28
|
+
pathPattern: z.string().optional().describe('glob pattern for file path'),
|
|
29
|
+
excludeChunks: z.boolean().default(false).describe('only return full files, not chunks')
|
|
30
|
+
});
|
|
31
|
+
export const GetFileContentInput = z.object({
|
|
32
|
+
id: z.string().uuid().optional().describe('file ID'),
|
|
33
|
+
filePath: z.string().optional().describe('relative file path'),
|
|
34
|
+
includeEmbedding: z.boolean().default(false).describe('include the embedding vector')
|
|
35
|
+
}).refine(data => data.id || data.filePath, { message: 'must provide either id or filePath' });
|
|
36
|
+
export const ListFilesInput = z.object({
|
|
37
|
+
pathPattern: z.string().optional().describe('glob pattern for file path'),
|
|
38
|
+
languageFilter: z.array(z.string()).optional().describe('filter by language IDs'),
|
|
39
|
+
limit: z.number().int().min(1).max(1000).default(100).describe('max results'),
|
|
40
|
+
offset: z.number().int().min(0).default(0).describe('pagination offset'),
|
|
41
|
+
orderBy: z.enum(['path', 'size', 'lines', 'modified']).default('path').describe('sort field'),
|
|
42
|
+
orderDirection: z.enum(['asc', 'desc']).default('asc').describe('sort direction')
|
|
43
|
+
});
|
|
44
|
+
export const CodebaseStatsInput = z.object({
|
|
45
|
+
includeLanguageBreakdown: z.boolean().default(true),
|
|
46
|
+
includeTopFiles: z.boolean().default(false),
|
|
47
|
+
topFilesLimit: z.number().int().min(1).max(50).default(10)
|
|
48
|
+
});
|
|
49
|
+
export const FindRelatedFilesInput = z.object({
|
|
50
|
+
fileId: z.string().uuid().optional().describe('find files related to this file by ID'),
|
|
51
|
+
filePath: z.string().optional().describe('find files related to this path'),
|
|
52
|
+
limit: z.number().int().min(1).max(50).default(10).describe('max related files'),
|
|
53
|
+
threshold: z.number().min(0).max(1).default(0.7).describe('similarity threshold')
|
|
54
|
+
}).refine(data => data.fileId || data.filePath, { message: 'must provide either fileId or filePath' });
|
|
55
|
+
export const TextSearchInCodebaseInput = z.object({
|
|
56
|
+
query: z.string().min(1).describe('full-text search query'),
|
|
57
|
+
limit: z.number().int().min(1).max(100).default(20).describe('max results'),
|
|
58
|
+
languageFilter: z.array(z.string()).optional().describe('filter by language IDs'),
|
|
59
|
+
caseSensitive: z.boolean().default(false).describe('case-sensitive search')
|
|
60
|
+
});
|
|
61
|
+
/**
|
|
62
|
+
* IngestCodebaseTool - ingestThisWholeAssMfCodebase
|
|
63
|
+
* scans and stores an entire codebase
|
|
64
|
+
*/
|
|
65
|
+
export class IngestCodebaseTool {
|
|
66
|
+
pool;
|
|
67
|
+
embeddingProvider;
|
|
68
|
+
name = 'ingest_codebase';
|
|
69
|
+
description = 'Scan and store an entire codebase in memory for semantic search. This ingests ALL files recursively, detects languages, chunks large files, and generates embeddings.';
|
|
70
|
+
inputSchema = {
|
|
71
|
+
type: 'object',
|
|
72
|
+
properties: {
|
|
73
|
+
rootPath: { type: 'string', description: 'Absolute path to codebase root' },
|
|
74
|
+
additionalExclusions: { type: 'array', items: { type: 'string' }, description: 'Extra exclusion patterns' },
|
|
75
|
+
maxFileSizeBytes: { type: 'number', description: 'Skip files larger than this (default 10MB)' },
|
|
76
|
+
generateEmbeddings: { type: 'boolean', description: 'Generate embeddings for semantic search' },
|
|
77
|
+
includeHiddenFiles: { type: 'boolean', description: 'Include hidden files' }
|
|
78
|
+
},
|
|
79
|
+
required: ['rootPath']
|
|
80
|
+
};
|
|
81
|
+
constructor(pool, embeddingProvider) {
|
|
82
|
+
this.pool = pool;
|
|
83
|
+
this.embeddingProvider = embeddingProvider;
|
|
84
|
+
}
|
|
85
|
+
async execute(params) {
|
|
86
|
+
const input = IngestCodebaseInput.parse(params);
|
|
87
|
+
logger.info({ rootPath: input.rootPath }, 'starting codebase ingestion - ingestThisWholeAssMfCodebase activated');
|
|
88
|
+
const engine = new IngestThisWholeAssMfCodebase(this.pool, this.embeddingProvider);
|
|
89
|
+
const result = await engine.ingest({
|
|
90
|
+
rootPath: input.rootPath,
|
|
91
|
+
additionalExclusions: input.additionalExclusions,
|
|
92
|
+
maxFileSizeBytes: input.maxFileSizeBytes,
|
|
93
|
+
generateEmbeddings: input.generateEmbeddings,
|
|
94
|
+
includeHiddenFiles: input.includeHiddenFiles
|
|
95
|
+
});
|
|
96
|
+
return {
|
|
97
|
+
success: result.success,
|
|
98
|
+
message: result.success
|
|
99
|
+
? `Successfully ingested ${result.storedFiles} files (${result.chunkedFiles} chunked into ${result.totalChunks} pieces) from ${result.rootPath}`
|
|
100
|
+
: `Ingestion failed with ${result.errors.length} errors`,
|
|
101
|
+
stats: {
|
|
102
|
+
totalFiles: result.totalFiles,
|
|
103
|
+
storedFiles: result.storedFiles,
|
|
104
|
+
chunkedFiles: result.chunkedFiles,
|
|
105
|
+
totalChunks: result.totalChunks,
|
|
106
|
+
skippedFiles: result.skippedFiles,
|
|
107
|
+
errorFiles: result.errorFiles,
|
|
108
|
+
totalLines: result.totalLines,
|
|
109
|
+
totalBytes: result.totalBytes,
|
|
110
|
+
durationMs: result.duration
|
|
111
|
+
},
|
|
112
|
+
languageBreakdown: result.languageBreakdown,
|
|
113
|
+
errors: result.errors.slice(0, 10) // only return first 10 errors
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* FindInCodebaseTool - findCodeThatMatters
|
|
119
|
+
* semantic search across all indexed files
|
|
120
|
+
*/
|
|
121
|
+
export class FindInCodebaseTool {
|
|
122
|
+
pool;
|
|
123
|
+
embeddingProvider;
|
|
124
|
+
name = 'find_in_codebase';
|
|
125
|
+
description = 'Semantic search across all indexed codebase files. Uses embeddings to find relevant code based on meaning, not just keywords.';
|
|
126
|
+
inputSchema = {
|
|
127
|
+
type: 'object',
|
|
128
|
+
properties: {
|
|
129
|
+
query: { type: 'string', description: 'Search query describing what you\'re looking for' },
|
|
130
|
+
limit: { type: 'number', description: 'Max results (default 20)' },
|
|
131
|
+
threshold: { type: 'number', description: 'Similarity threshold 0-1 (default 0.6)' },
|
|
132
|
+
languageFilter: { type: 'array', items: { type: 'string' }, description: 'Filter by language IDs' },
|
|
133
|
+
pathPattern: { type: 'string', description: 'Glob pattern for file path' },
|
|
134
|
+
excludeChunks: { type: 'boolean', description: 'Only return full files' }
|
|
135
|
+
},
|
|
136
|
+
required: ['query']
|
|
137
|
+
};
|
|
138
|
+
dimensionService = null;
|
|
139
|
+
constructor(pool, embeddingProvider) {
|
|
140
|
+
this.pool = pool;
|
|
141
|
+
this.embeddingProvider = embeddingProvider;
|
|
142
|
+
try {
|
|
143
|
+
this.dimensionService = getDimensionService(pool, embeddingProvider);
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
// Will initialize when needed
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
getDimService() {
|
|
150
|
+
if (!this.dimensionService) {
|
|
151
|
+
this.dimensionService = getDimensionService(this.pool, this.embeddingProvider);
|
|
152
|
+
}
|
|
153
|
+
return this.dimensionService;
|
|
154
|
+
}
|
|
155
|
+
async execute(params) {
|
|
156
|
+
const input = FindInCodebaseInput.parse(params);
|
|
157
|
+
// generate query embedding
|
|
158
|
+
const rawEmbedding = await this.embeddingProvider.generateEmbedding(input.query);
|
|
159
|
+
// Validate and prepare embedding dimension using DimensionService
|
|
160
|
+
const dimService = this.getDimService();
|
|
161
|
+
const prepared = await dimService.validateAndPrepare('codebase_files', rawEmbedding, input.query);
|
|
162
|
+
const queryEmbedding = prepared.embedding;
|
|
163
|
+
if (prepared.wasModified) {
|
|
164
|
+
logger.debug({ action: prepared.action }, 'Adjusted embedding dimension for codebase search');
|
|
165
|
+
}
|
|
166
|
+
const embeddingStr = `[${queryEmbedding.join(',')}]`;
|
|
167
|
+
// Get project path for filtering
|
|
168
|
+
const projectPath = getProjectContext().getProjectPath();
|
|
169
|
+
// build query with project filter
|
|
170
|
+
const conditions = ['embedding IS NOT NULL', 'project_path = $4'];
|
|
171
|
+
const values = [embeddingStr, 1 - input.threshold, input.limit, projectPath];
|
|
172
|
+
let paramIndex = 5;
|
|
173
|
+
if (input.languageFilter?.length) {
|
|
174
|
+
conditions.push(`language_id = ANY($${paramIndex})`);
|
|
175
|
+
values.push(input.languageFilter);
|
|
176
|
+
paramIndex++;
|
|
177
|
+
}
|
|
178
|
+
if (input.pathPattern) {
|
|
179
|
+
conditions.push(`file_path LIKE $${paramIndex}`);
|
|
180
|
+
values.push(input.pathPattern.replace(/\*/g, '%'));
|
|
181
|
+
paramIndex++;
|
|
182
|
+
}
|
|
183
|
+
if (input.excludeChunks) {
|
|
184
|
+
conditions.push('chunk_index IS NULL');
|
|
185
|
+
}
|
|
186
|
+
const query = `
|
|
187
|
+
SELECT
|
|
188
|
+
id, file_path, file_name, language_id, language_name,
|
|
189
|
+
line_count, size_bytes, chunk_index, total_chunks,
|
|
190
|
+
content,
|
|
191
|
+
1 - (embedding <=> $1::vector) AS similarity
|
|
192
|
+
FROM codebase_files
|
|
193
|
+
WHERE ${conditions.join(' AND ')}
|
|
194
|
+
AND (embedding <=> $1::vector) < $2
|
|
195
|
+
ORDER BY embedding <=> $1::vector
|
|
196
|
+
LIMIT $3
|
|
197
|
+
`;
|
|
198
|
+
const result = await this.pool.queryWithSwag(query, values);
|
|
199
|
+
const searchResults = result.rows.map((row) => ({
|
|
200
|
+
file: {
|
|
201
|
+
id: row.id,
|
|
202
|
+
filePath: row.file_path,
|
|
203
|
+
fileName: row.file_name,
|
|
204
|
+
language: row.language_name,
|
|
205
|
+
lineCount: row.line_count,
|
|
206
|
+
sizeBytes: row.size_bytes,
|
|
207
|
+
isChunk: row.chunk_index !== null,
|
|
208
|
+
chunkIndex: row.chunk_index ?? undefined,
|
|
209
|
+
totalChunks: row.total_chunks ?? undefined
|
|
210
|
+
},
|
|
211
|
+
similarity: row.similarity,
|
|
212
|
+
contentPreview: row.content.slice(0, TEXT_LIMITS.PREVIEW_MEDIUM) + (row.content.length > TEXT_LIMITS.PREVIEW_MEDIUM ? '...' : '')
|
|
213
|
+
}));
|
|
214
|
+
logger.info({
|
|
215
|
+
query: input.query,
|
|
216
|
+
resultCount: searchResults.length,
|
|
217
|
+
topSimilarity: searchResults[0]?.similarity
|
|
218
|
+
}, 'findCodeThatMatters search complete');
|
|
219
|
+
// Apply Chinese compactor for token efficiency
|
|
220
|
+
return compactResponse({
|
|
221
|
+
query: input.query,
|
|
222
|
+
resultCount: searchResults.length,
|
|
223
|
+
results: searchResults
|
|
224
|
+
}, 'search');
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* GetFileContentTool - retrieve specific file content
|
|
229
|
+
*/
|
|
230
|
+
export class GetFileContentTool {
|
|
231
|
+
pool;
|
|
232
|
+
name = 'get_file_content';
|
|
233
|
+
description = 'Retrieve the full content of a specific file from the indexed codebase.';
|
|
234
|
+
inputSchema = {
|
|
235
|
+
type: 'object',
|
|
236
|
+
properties: {
|
|
237
|
+
id: { type: 'string', description: 'File ID (UUID)' },
|
|
238
|
+
filePath: { type: 'string', description: 'Relative file path' },
|
|
239
|
+
includeEmbedding: { type: 'boolean', description: 'Include embedding vector' }
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
constructor(pool) {
|
|
243
|
+
this.pool = pool;
|
|
244
|
+
}
|
|
245
|
+
async execute(params) {
|
|
246
|
+
const input = GetFileContentInput.parse(params);
|
|
247
|
+
// Get project path for filtering
|
|
248
|
+
const projectPath = getProjectContext().getProjectPath();
|
|
249
|
+
let query;
|
|
250
|
+
let values;
|
|
251
|
+
if (input.id) {
|
|
252
|
+
query = `SELECT * FROM codebase_files WHERE id = $1 AND project_path = $2`;
|
|
253
|
+
values = [input.id, projectPath];
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
query = `SELECT * FROM codebase_files WHERE file_path = $1 AND project_path = $2`;
|
|
257
|
+
values = [input.filePath, projectPath];
|
|
258
|
+
}
|
|
259
|
+
const result = await this.pool.queryWithSwag(query, values);
|
|
260
|
+
if (result.rows.length === 0) {
|
|
261
|
+
return {
|
|
262
|
+
found: false,
|
|
263
|
+
message: 'File not found in indexed codebase'
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
const row = result.rows[0];
|
|
267
|
+
return {
|
|
268
|
+
found: true,
|
|
269
|
+
file: {
|
|
270
|
+
id: row.id,
|
|
271
|
+
filePath: row.file_path,
|
|
272
|
+
absolutePath: row.absolute_path,
|
|
273
|
+
fileName: row.file_name,
|
|
274
|
+
extension: row.extension,
|
|
275
|
+
language: {
|
|
276
|
+
id: row.language_id,
|
|
277
|
+
name: row.language_name,
|
|
278
|
+
type: row.language_type
|
|
279
|
+
},
|
|
280
|
+
sizeBytes: row.size_bytes,
|
|
281
|
+
lineCount: row.line_count,
|
|
282
|
+
charCount: row.char_count,
|
|
283
|
+
lastModified: row.last_modified,
|
|
284
|
+
isChunk: row.chunk_index !== null,
|
|
285
|
+
chunkIndex: row.chunk_index,
|
|
286
|
+
totalChunks: row.total_chunks,
|
|
287
|
+
originalFileId: row.original_file_id
|
|
288
|
+
},
|
|
289
|
+
content: row.content,
|
|
290
|
+
contentHash: row.content_hash,
|
|
291
|
+
embedding: input.includeEmbedding && row.embedding
|
|
292
|
+
? row.embedding.replace(/[\[\]]/g, '').split(',').map(Number)
|
|
293
|
+
: undefined
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* ListFilesTool - list indexed files with filtering
|
|
299
|
+
*/
|
|
300
|
+
export class ListFilesTool {
|
|
301
|
+
pool;
|
|
302
|
+
name = 'list_files';
|
|
303
|
+
description = 'List all indexed files with optional filtering and pagination.';
|
|
304
|
+
inputSchema = {
|
|
305
|
+
type: 'object',
|
|
306
|
+
properties: {
|
|
307
|
+
pathPattern: { type: 'string', description: 'Glob pattern for file path (e.g., "src/**/*.ts")' },
|
|
308
|
+
languageFilter: { type: 'array', items: { type: 'string' }, description: 'Filter by language IDs' },
|
|
309
|
+
limit: { type: 'number', description: 'Max results (default 100)' },
|
|
310
|
+
offset: { type: 'number', description: 'Pagination offset' },
|
|
311
|
+
orderBy: { type: 'string', enum: ['path', 'size', 'lines', 'modified'], description: 'Sort field' },
|
|
312
|
+
orderDirection: { type: 'string', enum: ['asc', 'desc'], description: 'Sort direction' }
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
constructor(pool) {
|
|
316
|
+
this.pool = pool;
|
|
317
|
+
}
|
|
318
|
+
async execute(params) {
|
|
319
|
+
const input = ListFilesInput.parse(params);
|
|
320
|
+
// Get project path for filtering
|
|
321
|
+
const projectPath = getProjectContext().getProjectPath();
|
|
322
|
+
const conditions = ['chunk_index IS NULL', 'project_path = $1']; // only list main files, not chunks, scoped by project
|
|
323
|
+
const values = [projectPath];
|
|
324
|
+
let paramIndex = 2;
|
|
325
|
+
if (input.pathPattern) {
|
|
326
|
+
conditions.push(`file_path LIKE $${paramIndex}`);
|
|
327
|
+
values.push(input.pathPattern.replace(/\*\*/g, '%').replace(/\*/g, '%'));
|
|
328
|
+
paramIndex++;
|
|
329
|
+
}
|
|
330
|
+
if (input.languageFilter?.length) {
|
|
331
|
+
conditions.push(`language_id = ANY($${paramIndex})`);
|
|
332
|
+
values.push(input.languageFilter);
|
|
333
|
+
paramIndex++;
|
|
334
|
+
}
|
|
335
|
+
const orderColumn = {
|
|
336
|
+
path: 'file_path',
|
|
337
|
+
size: 'size_bytes',
|
|
338
|
+
lines: 'line_count',
|
|
339
|
+
modified: 'last_modified'
|
|
340
|
+
}[input.orderBy];
|
|
341
|
+
// get total count
|
|
342
|
+
const countResult = await this.pool.queryWithSwag(`SELECT COUNT(*) as count FROM codebase_files WHERE ${conditions.join(' AND ')}`, values);
|
|
343
|
+
const total = parseInt(countResult.rows[0]?.count ?? '0', 10);
|
|
344
|
+
// get page
|
|
345
|
+
values.push(input.limit, input.offset);
|
|
346
|
+
const query = `
|
|
347
|
+
SELECT id, file_path, file_name, language_id, language_name,
|
|
348
|
+
size_bytes, line_count, last_modified
|
|
349
|
+
FROM codebase_files
|
|
350
|
+
WHERE ${conditions.join(' AND ')}
|
|
351
|
+
ORDER BY ${orderColumn} ${input.orderDirection.toUpperCase()}
|
|
352
|
+
LIMIT $${paramIndex} OFFSET $${paramIndex + 1}
|
|
353
|
+
`;
|
|
354
|
+
const result = await this.pool.queryWithSwag(query, values);
|
|
355
|
+
return {
|
|
356
|
+
total,
|
|
357
|
+
limit: input.limit,
|
|
358
|
+
offset: input.offset,
|
|
359
|
+
hasMore: input.offset + result.rows.length < total,
|
|
360
|
+
files: result.rows.map((row) => ({
|
|
361
|
+
id: row.id,
|
|
362
|
+
filePath: row.file_path,
|
|
363
|
+
fileName: row.file_name,
|
|
364
|
+
language: row.language_name,
|
|
365
|
+
sizeBytes: row.size_bytes,
|
|
366
|
+
lineCount: row.line_count,
|
|
367
|
+
lastModified: row.last_modified
|
|
368
|
+
}))
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* CodebaseStatsTool - codebaseStatsGoCrazy
|
|
374
|
+
* comprehensive statistics about the indexed codebase
|
|
375
|
+
*/
|
|
376
|
+
export class CodebaseStatsTool {
|
|
377
|
+
pool;
|
|
378
|
+
name = 'codebase_stats';
|
|
379
|
+
description = 'Get comprehensive statistics about the indexed codebase including language breakdown, file counts, and more.';
|
|
380
|
+
inputSchema = {
|
|
381
|
+
type: 'object',
|
|
382
|
+
properties: {
|
|
383
|
+
includeLanguageBreakdown: { type: 'boolean', description: 'Include per-language stats' },
|
|
384
|
+
includeTopFiles: { type: 'boolean', description: 'Include top files by size/lines' },
|
|
385
|
+
topFilesLimit: { type: 'number', description: 'Number of top files to include' }
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
constructor(pool) {
|
|
389
|
+
this.pool = pool;
|
|
390
|
+
}
|
|
391
|
+
async execute(params) {
|
|
392
|
+
const input = CodebaseStatsInput.parse(params);
|
|
393
|
+
// Get project path for filtering
|
|
394
|
+
const projectPath = getProjectContext().getProjectPath();
|
|
395
|
+
// basic stats - filtered by project
|
|
396
|
+
const basicStats = await this.pool.queryWithSwag(`
|
|
397
|
+
SELECT
|
|
398
|
+
COUNT(*) as total_files,
|
|
399
|
+
COUNT(*) FILTER (WHERE chunk_index IS NOT NULL) as total_chunks,
|
|
400
|
+
COUNT(*) FILTER (WHERE chunk_index IS NULL) as unique_files,
|
|
401
|
+
SUM(line_count) as total_lines,
|
|
402
|
+
SUM(size_bytes) as total_bytes
|
|
403
|
+
FROM codebase_files
|
|
404
|
+
WHERE project_path = $1
|
|
405
|
+
`, [projectPath]);
|
|
406
|
+
const stats = {
|
|
407
|
+
totalFiles: parseInt(basicStats.rows[0]?.total_files ?? '0', 10),
|
|
408
|
+
totalChunks: parseInt(basicStats.rows[0]?.total_chunks ?? '0', 10),
|
|
409
|
+
uniqueFiles: parseInt(basicStats.rows[0]?.unique_files ?? '0', 10),
|
|
410
|
+
totalLines: parseInt(basicStats.rows[0]?.total_lines ?? '0', 10),
|
|
411
|
+
totalBytes: parseInt(basicStats.rows[0]?.total_bytes ?? '0', 10)
|
|
412
|
+
};
|
|
413
|
+
// language breakdown - filtered by project
|
|
414
|
+
if (input.includeLanguageBreakdown) {
|
|
415
|
+
const langStats = await this.pool.queryWithSwag(`
|
|
416
|
+
SELECT
|
|
417
|
+
language_id,
|
|
418
|
+
COUNT(*) as file_count,
|
|
419
|
+
SUM(line_count) as line_count,
|
|
420
|
+
SUM(size_bytes) as byte_count
|
|
421
|
+
FROM codebase_files
|
|
422
|
+
WHERE chunk_index IS NULL AND project_path = $1
|
|
423
|
+
GROUP BY language_id
|
|
424
|
+
ORDER BY file_count DESC
|
|
425
|
+
`, [projectPath]);
|
|
426
|
+
stats.languageBreakdown = {};
|
|
427
|
+
for (const row of langStats.rows) {
|
|
428
|
+
stats.languageBreakdown[row.language_id] = {
|
|
429
|
+
fileCount: parseInt(row.file_count, 10),
|
|
430
|
+
lineCount: parseInt(row.line_count, 10),
|
|
431
|
+
byteCount: parseInt(row.byte_count, 10)
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
// top files - filtered by project
|
|
436
|
+
if (input.includeTopFiles) {
|
|
437
|
+
const topBySize = await this.pool.queryWithSwag(`
|
|
438
|
+
SELECT file_path, size_bytes, language_name
|
|
439
|
+
FROM codebase_files
|
|
440
|
+
WHERE chunk_index IS NULL AND project_path = $1
|
|
441
|
+
ORDER BY size_bytes DESC
|
|
442
|
+
LIMIT $2
|
|
443
|
+
`, [projectPath, input.topFilesLimit]);
|
|
444
|
+
stats.topFilesBySize = topBySize.rows.map((row) => ({
|
|
445
|
+
filePath: row.file_path,
|
|
446
|
+
sizeBytes: row.size_bytes,
|
|
447
|
+
language: row.language_name
|
|
448
|
+
}));
|
|
449
|
+
const topByLines = await this.pool.queryWithSwag(`
|
|
450
|
+
SELECT file_path, line_count, language_name
|
|
451
|
+
FROM codebase_files
|
|
452
|
+
WHERE chunk_index IS NULL AND project_path = $1
|
|
453
|
+
ORDER BY line_count DESC
|
|
454
|
+
LIMIT $2
|
|
455
|
+
`, [projectPath, input.topFilesLimit]);
|
|
456
|
+
stats.topFilesByLines = topByLines.rows.map((row) => ({
|
|
457
|
+
filePath: row.file_path,
|
|
458
|
+
lineCount: row.line_count,
|
|
459
|
+
language: row.language_name
|
|
460
|
+
}));
|
|
461
|
+
}
|
|
462
|
+
// last ingestion time - filtered by project
|
|
463
|
+
const lastMod = await this.pool.queryWithSwag(`
|
|
464
|
+
SELECT MAX(created_at) as last_mod FROM codebase_files WHERE project_path = $1
|
|
465
|
+
`, [projectPath]);
|
|
466
|
+
if (lastMod.rows[0]?.last_mod) {
|
|
467
|
+
stats.lastIngestionTime = lastMod.rows[0].last_mod;
|
|
468
|
+
}
|
|
469
|
+
logger.info({
|
|
470
|
+
uniqueFiles: stats.uniqueFiles,
|
|
471
|
+
totalLines: stats.totalLines
|
|
472
|
+
}, 'codebaseStatsGoCrazy - stats retrieved');
|
|
473
|
+
return stats;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* FindRelatedFilesTool - find files related to a given file
|
|
478
|
+
*/
|
|
479
|
+
export class FindRelatedFilesTool {
|
|
480
|
+
pool;
|
|
481
|
+
name = 'find_related_files';
|
|
482
|
+
description = 'Find files that are semantically related to a given file based on embeddings.';
|
|
483
|
+
inputSchema = {
|
|
484
|
+
type: 'object',
|
|
485
|
+
properties: {
|
|
486
|
+
fileId: { type: 'string', description: 'File ID to find related files for' },
|
|
487
|
+
filePath: { type: 'string', description: 'File path to find related files for' },
|
|
488
|
+
limit: { type: 'number', description: 'Max related files (default 10)' },
|
|
489
|
+
threshold: { type: 'number', description: 'Similarity threshold (default 0.7)' }
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
constructor(pool) {
|
|
493
|
+
this.pool = pool;
|
|
494
|
+
}
|
|
495
|
+
async execute(params) {
|
|
496
|
+
const input = FindRelatedFilesInput.parse(params);
|
|
497
|
+
// Get project path for filtering
|
|
498
|
+
const projectPath = getProjectContext().getProjectPath();
|
|
499
|
+
// first get the source file's embedding - filtered by project
|
|
500
|
+
let sourceQuery;
|
|
501
|
+
let sourceValues;
|
|
502
|
+
if (input.fileId) {
|
|
503
|
+
sourceQuery = `SELECT id, file_path, embedding FROM codebase_files WHERE id = $1 AND project_path = $2`;
|
|
504
|
+
sourceValues = [input.fileId, projectPath];
|
|
505
|
+
}
|
|
506
|
+
else {
|
|
507
|
+
sourceQuery = `SELECT id, file_path, embedding FROM codebase_files WHERE file_path = $1 AND project_path = $2`;
|
|
508
|
+
sourceValues = [input.filePath, projectPath];
|
|
509
|
+
}
|
|
510
|
+
const sourceResult = await this.pool.queryWithSwag(sourceQuery, sourceValues);
|
|
511
|
+
if (sourceResult.rows.length === 0) {
|
|
512
|
+
return {
|
|
513
|
+
found: false,
|
|
514
|
+
message: 'Source file not found in indexed codebase'
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
const source = sourceResult.rows[0];
|
|
518
|
+
if (!source.embedding) {
|
|
519
|
+
return {
|
|
520
|
+
found: true,
|
|
521
|
+
hasEmbedding: false,
|
|
522
|
+
message: 'Source file has no embedding, cannot find related files'
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
// find related files - filtered by project
|
|
526
|
+
const maxDistance = 1 - input.threshold;
|
|
527
|
+
const relatedResult = await this.pool.queryWithSwag(`
|
|
528
|
+
SELECT
|
|
529
|
+
id, file_path, file_name, language_name, line_count, size_bytes,
|
|
530
|
+
1 - (embedding <=> $1::vector) AS similarity
|
|
531
|
+
FROM codebase_files
|
|
532
|
+
WHERE id != $2
|
|
533
|
+
AND embedding IS NOT NULL
|
|
534
|
+
AND chunk_index IS NULL
|
|
535
|
+
AND project_path = $5
|
|
536
|
+
AND (embedding <=> $1::vector) < $3
|
|
537
|
+
ORDER BY embedding <=> $1::vector
|
|
538
|
+
LIMIT $4
|
|
539
|
+
`, [source.embedding, source.id, maxDistance, input.limit, projectPath]);
|
|
540
|
+
// Apply Chinese compactor for token efficiency
|
|
541
|
+
return compactResponse({
|
|
542
|
+
found: true,
|
|
543
|
+
sourceFile: {
|
|
544
|
+
id: source.id,
|
|
545
|
+
filePath: source.file_path
|
|
546
|
+
},
|
|
547
|
+
relatedCount: relatedResult.rows.length,
|
|
548
|
+
relatedFiles: relatedResult.rows.map((row) => ({
|
|
549
|
+
id: row.id,
|
|
550
|
+
filePath: row.file_path,
|
|
551
|
+
fileName: row.file_name,
|
|
552
|
+
language: row.language_name,
|
|
553
|
+
lineCount: row.line_count,
|
|
554
|
+
sizeBytes: row.size_bytes,
|
|
555
|
+
similarity: row.similarity
|
|
556
|
+
}))
|
|
557
|
+
}, 'search');
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* TextSearchInCodebaseTool - full-text search across codebase
|
|
562
|
+
*/
|
|
563
|
+
export class TextSearchInCodebaseTool {
|
|
564
|
+
pool;
|
|
565
|
+
name = 'text_search_codebase';
|
|
566
|
+
description = 'Full-text search across all indexed files. Finds exact or partial text matches.';
|
|
567
|
+
inputSchema = {
|
|
568
|
+
type: 'object',
|
|
569
|
+
properties: {
|
|
570
|
+
query: { type: 'string', description: 'Text to search for' },
|
|
571
|
+
limit: { type: 'number', description: 'Max results (default 20)' },
|
|
572
|
+
languageFilter: { type: 'array', items: { type: 'string' }, description: 'Filter by languages' },
|
|
573
|
+
caseSensitive: { type: 'boolean', description: 'Case-sensitive search' }
|
|
574
|
+
},
|
|
575
|
+
required: ['query']
|
|
576
|
+
};
|
|
577
|
+
constructor(pool) {
|
|
578
|
+
this.pool = pool;
|
|
579
|
+
}
|
|
580
|
+
async execute(params) {
|
|
581
|
+
const input = TextSearchInCodebaseInput.parse(params);
|
|
582
|
+
// Get project path for filtering
|
|
583
|
+
const projectPath = getProjectContext().getProjectPath();
|
|
584
|
+
const conditions = ['project_path = $1'];
|
|
585
|
+
const values = [projectPath];
|
|
586
|
+
let paramIndex = 2;
|
|
587
|
+
// text search condition
|
|
588
|
+
if (input.caseSensitive) {
|
|
589
|
+
conditions.push(`content LIKE $${paramIndex}`);
|
|
590
|
+
values.push(`%${input.query}%`);
|
|
591
|
+
}
|
|
592
|
+
else {
|
|
593
|
+
conditions.push(`content ILIKE $${paramIndex}`);
|
|
594
|
+
values.push(`%${input.query}%`);
|
|
595
|
+
}
|
|
596
|
+
paramIndex++;
|
|
597
|
+
if (input.languageFilter?.length) {
|
|
598
|
+
conditions.push(`language_id = ANY($${paramIndex})`);
|
|
599
|
+
values.push(input.languageFilter);
|
|
600
|
+
paramIndex++;
|
|
601
|
+
}
|
|
602
|
+
values.push(input.limit);
|
|
603
|
+
const query = `
|
|
604
|
+
SELECT
|
|
605
|
+
id, file_path, file_name, language_name,
|
|
606
|
+
line_count, size_bytes, content,
|
|
607
|
+
chunk_index, total_chunks
|
|
608
|
+
FROM codebase_files
|
|
609
|
+
WHERE ${conditions.join(' AND ')}
|
|
610
|
+
ORDER BY size_bytes ASC
|
|
611
|
+
LIMIT $${paramIndex}
|
|
612
|
+
`;
|
|
613
|
+
const result = await this.pool.queryWithSwag(query, values);
|
|
614
|
+
// extract matching lines for each result
|
|
615
|
+
const results = result.rows.map((row) => {
|
|
616
|
+
const lines = row.content.split('\n');
|
|
617
|
+
const matchingLines = [];
|
|
618
|
+
const searchLower = input.caseSensitive ? input.query : input.query.toLowerCase();
|
|
619
|
+
for (let i = 0; i < lines.length; i++) {
|
|
620
|
+
const line = lines[i] ?? '';
|
|
621
|
+
const lineToCheck = input.caseSensitive ? line : line.toLowerCase();
|
|
622
|
+
if (lineToCheck.includes(searchLower)) {
|
|
623
|
+
matchingLines.push({
|
|
624
|
+
lineNumber: i + 1,
|
|
625
|
+
content: line.slice(0, 200) + (line.length > 200 ? '...' : '')
|
|
626
|
+
});
|
|
627
|
+
if (matchingLines.length >= 5)
|
|
628
|
+
break; // limit matches per file
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
return {
|
|
632
|
+
file: {
|
|
633
|
+
id: row.id,
|
|
634
|
+
filePath: row.file_path,
|
|
635
|
+
fileName: row.file_name,
|
|
636
|
+
language: row.language_name,
|
|
637
|
+
lineCount: row.line_count,
|
|
638
|
+
sizeBytes: row.size_bytes,
|
|
639
|
+
isChunk: row.chunk_index !== null,
|
|
640
|
+
chunkIndex: row.chunk_index,
|
|
641
|
+
totalChunks: row.total_chunks
|
|
642
|
+
},
|
|
643
|
+
matchCount: matchingLines.length,
|
|
644
|
+
matchingLines
|
|
645
|
+
};
|
|
646
|
+
});
|
|
647
|
+
// Apply Chinese compactor for token efficiency
|
|
648
|
+
return compactResponse({
|
|
649
|
+
query: input.query,
|
|
650
|
+
resultCount: results.length,
|
|
651
|
+
results
|
|
652
|
+
}, 'search');
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
/**
|
|
656
|
+
* GetExclusionPatternsTool - see what patterns are being excluded
|
|
657
|
+
*/
|
|
658
|
+
export class GetExclusionPatternsTool {
|
|
659
|
+
name = 'get_exclusion_patterns';
|
|
660
|
+
description = 'Get the current exclusion patterns used during codebase ingestion.';
|
|
661
|
+
inputSchema = {
|
|
662
|
+
type: 'object',
|
|
663
|
+
properties: {}
|
|
664
|
+
};
|
|
665
|
+
async execute() {
|
|
666
|
+
return {
|
|
667
|
+
defaultPatterns: DEFAULT_EXCLUSIONS,
|
|
668
|
+
patternCount: DEFAULT_EXCLUSIONS.length,
|
|
669
|
+
description: 'These patterns are automatically excluded during codebase ingestion'
|
|
670
|
+
};
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* GetSupportedLanguagesTool - list all supported languages
|
|
675
|
+
*/
|
|
676
|
+
export class GetSupportedLanguagesTool {
|
|
677
|
+
name = 'get_supported_languages';
|
|
678
|
+
description = 'Get list of all programming languages supported for detection and indexing.';
|
|
679
|
+
inputSchema = {
|
|
680
|
+
type: 'object',
|
|
681
|
+
properties: {
|
|
682
|
+
type: {
|
|
683
|
+
type: 'string',
|
|
684
|
+
enum: ['all', 'programming', 'markup', 'data', 'config', 'prose'],
|
|
685
|
+
description: 'Filter by language type'
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
};
|
|
689
|
+
async execute(params) {
|
|
690
|
+
const filterType = params.type;
|
|
691
|
+
let languages = Object.values(LANGUAGE_REGISTRY)
|
|
692
|
+
.filter(l => l.id !== 'unknown');
|
|
693
|
+
if (filterType && filterType !== 'all') {
|
|
694
|
+
languages = languages.filter(l => l.type === filterType);
|
|
695
|
+
}
|
|
696
|
+
return {
|
|
697
|
+
count: languages.length,
|
|
698
|
+
languages: languages.map(l => ({
|
|
699
|
+
id: l.id,
|
|
700
|
+
name: l.name,
|
|
701
|
+
type: l.type,
|
|
702
|
+
extensions: l.extensions,
|
|
703
|
+
supportsEmbeddings: l.supportsEmbeddings
|
|
704
|
+
}))
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
/**
|
|
709
|
+
* GetCodePointersTool - understand how code connects
|
|
710
|
+
*
|
|
711
|
+
* answers questions like:
|
|
712
|
+
* - "what files import this file?"
|
|
713
|
+
* - "what calls this function?"
|
|
714
|
+
* - "where is this class used?"
|
|
715
|
+
*
|
|
716
|
+
* traces through dependencies and definitions to show real connections
|
|
717
|
+
*/
|
|
718
|
+
export class GetCodePointersTool {
|
|
719
|
+
pool;
|
|
720
|
+
name = 'get_code_pointers';
|
|
721
|
+
description = 'Get code pointers showing what imports, calls, or uses a file or symbol. Traces through the codebase to find all references.';
|
|
722
|
+
inputSchema = {
|
|
723
|
+
type: 'object',
|
|
724
|
+
properties: {
|
|
725
|
+
filePath: { type: 'string', description: 'File path to find references to' },
|
|
726
|
+
symbol: { type: 'string', description: 'Symbol name (function, class, variable) to find usages of' },
|
|
727
|
+
lineNumber: { type: 'number', description: 'Optional line number to narrow down the search' },
|
|
728
|
+
direction: {
|
|
729
|
+
type: 'string',
|
|
730
|
+
enum: ['incoming', 'outgoing', 'both'],
|
|
731
|
+
description: 'incoming = what imports/calls this, outgoing = what this imports/calls'
|
|
732
|
+
},
|
|
733
|
+
includeContent: { type: 'boolean', description: 'Include the actual code at each reference point' }
|
|
734
|
+
}
|
|
735
|
+
};
|
|
736
|
+
constructor(pool) {
|
|
737
|
+
this.pool = pool;
|
|
738
|
+
}
|
|
739
|
+
async execute(params) {
|
|
740
|
+
const direction = params.direction ?? 'both';
|
|
741
|
+
const includeContent = params.includeContent ?? false;
|
|
742
|
+
// Get project path for filtering
|
|
743
|
+
const projectPath = getProjectContext().getProjectPath();
|
|
744
|
+
const results = { incoming: [], outgoing: [], definitions: [] };
|
|
745
|
+
// If we have a file path, find its dependencies
|
|
746
|
+
if (params.filePath) {
|
|
747
|
+
// INCOMING: What imports this file? - filtered by project
|
|
748
|
+
if (direction === 'incoming' || direction === 'both') {
|
|
749
|
+
const incomingQuery = `
|
|
750
|
+
SELECT
|
|
751
|
+
cd.source_file_path,
|
|
752
|
+
cd.import_statement,
|
|
753
|
+
cd.imported_names,
|
|
754
|
+
cd.line_number,
|
|
755
|
+
cf.content
|
|
756
|
+
FROM code_dependencies cd
|
|
757
|
+
LEFT JOIN codebase_files cf ON cf.file_path = cd.source_file_path AND cf.project_path = $2
|
|
758
|
+
WHERE (cd.target_path LIKE $1 OR cd.resolved_path LIKE $1)
|
|
759
|
+
AND cd.project_path = $2
|
|
760
|
+
ORDER BY cd.source_file_path
|
|
761
|
+
LIMIT 50
|
|
762
|
+
`;
|
|
763
|
+
const pattern = '%' + params.filePath.replace(/^.*\//, '') + '%';
|
|
764
|
+
const incomingResult = await this.pool.queryWithSwag(incomingQuery, [pattern, projectPath]);
|
|
765
|
+
for (const row of incomingResult.rows) {
|
|
766
|
+
results.incoming.push({
|
|
767
|
+
type: 'import',
|
|
768
|
+
sourceFile: row.source_file_path,
|
|
769
|
+
sourceLine: row.line_number,
|
|
770
|
+
importStatement: row.import_statement,
|
|
771
|
+
symbol: row.imported_names?.join(', '),
|
|
772
|
+
context: includeContent && row.content
|
|
773
|
+
? this.getContextLines(row.content, row.line_number, 2)
|
|
774
|
+
: undefined
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
// OUTGOING: What does this file import? - filtered by project
|
|
779
|
+
if (direction === 'outgoing' || direction === 'both') {
|
|
780
|
+
const outgoingQuery = `
|
|
781
|
+
SELECT
|
|
782
|
+
cd.target_path,
|
|
783
|
+
cd.resolved_path,
|
|
784
|
+
cd.import_statement,
|
|
785
|
+
cd.imported_names,
|
|
786
|
+
cd.line_number,
|
|
787
|
+
cd.is_external,
|
|
788
|
+
cd.package_name
|
|
789
|
+
FROM code_dependencies cd
|
|
790
|
+
WHERE cd.source_file_path LIKE $1
|
|
791
|
+
AND cd.project_path = $2
|
|
792
|
+
ORDER BY cd.line_number
|
|
793
|
+
LIMIT 50
|
|
794
|
+
`;
|
|
795
|
+
const outgoingResult = await this.pool.queryWithSwag(outgoingQuery, ['%' + params.filePath + '%', projectPath]);
|
|
796
|
+
for (const row of outgoingResult.rows) {
|
|
797
|
+
results.outgoing.push({
|
|
798
|
+
type: row.is_external ? 'external_import' : 'local_import',
|
|
799
|
+
targetFile: row.resolved_path ?? row.target_path,
|
|
800
|
+
targetLine: row.line_number,
|
|
801
|
+
importStatement: row.import_statement,
|
|
802
|
+
symbol: row.imported_names?.join(', ') || row.package_name
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
// If we have a symbol, find where it's defined and used
|
|
808
|
+
if (params.symbol) {
|
|
809
|
+
// Find definitions - filtered by project
|
|
810
|
+
const defQuery = `
|
|
811
|
+
SELECT
|
|
812
|
+
cd.file_id,
|
|
813
|
+
cd.name,
|
|
814
|
+
cd.definition_type,
|
|
815
|
+
cd.line_number,
|
|
816
|
+
cd.signature,
|
|
817
|
+
cf.file_path,
|
|
818
|
+
cf.content
|
|
819
|
+
FROM code_definitions cd
|
|
820
|
+
JOIN codebase_files cf ON cf.id = cd.file_id
|
|
821
|
+
WHERE cd.name = $1
|
|
822
|
+
AND cd.project_path = $2
|
|
823
|
+
ORDER BY cf.file_path
|
|
824
|
+
LIMIT 20
|
|
825
|
+
`;
|
|
826
|
+
const defResult = await this.pool.queryWithSwag(defQuery, [params.symbol, projectPath]);
|
|
827
|
+
for (const row of defResult.rows) {
|
|
828
|
+
results.definitions.push({
|
|
829
|
+
file: row.file_path,
|
|
830
|
+
line: row.line_number,
|
|
831
|
+
type: row.definition_type,
|
|
832
|
+
name: row.name,
|
|
833
|
+
signature: row.signature,
|
|
834
|
+
content: includeContent && row.content
|
|
835
|
+
? this.getContextLines(row.content, row.line_number, 3)
|
|
836
|
+
: undefined
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
// Find usages via text search - filtered by project
|
|
840
|
+
const usageQuery = `
|
|
841
|
+
SELECT
|
|
842
|
+
id, file_path, content
|
|
843
|
+
FROM codebase_files
|
|
844
|
+
WHERE content ILIKE $1
|
|
845
|
+
AND chunk_index IS NULL
|
|
846
|
+
AND project_path = $2
|
|
847
|
+
LIMIT 30
|
|
848
|
+
`;
|
|
849
|
+
const usageResult = await this.pool.queryWithSwag(usageQuery, ['%' + params.symbol + '%', projectPath]);
|
|
850
|
+
for (const row of usageResult.rows) {
|
|
851
|
+
// Find the actual line numbers where symbol appears
|
|
852
|
+
const lines = row.content.split('\n');
|
|
853
|
+
for (let i = 0; i < lines.length; i++) {
|
|
854
|
+
if (lines[i]?.includes(params.symbol)) {
|
|
855
|
+
// Skip if this is the definition itself
|
|
856
|
+
const isDefinition = results.definitions.some(d => d.file === row.file_path && d.line === i + 1);
|
|
857
|
+
if (!isDefinition) {
|
|
858
|
+
results.incoming.push({
|
|
859
|
+
type: 'usage',
|
|
860
|
+
sourceFile: row.file_path,
|
|
861
|
+
sourceLine: i + 1,
|
|
862
|
+
symbol: params.symbol,
|
|
863
|
+
context: includeContent
|
|
864
|
+
? this.getContextLines(row.content, i + 1, 1)
|
|
865
|
+
: undefined
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
// Limit usages per file
|
|
869
|
+
if (results.incoming.filter(r => r.sourceFile === row.file_path).length >= 5)
|
|
870
|
+
break;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
// Apply Chinese compactor for token efficiency
|
|
876
|
+
return compactResponse({
|
|
877
|
+
query: {
|
|
878
|
+
filePath: params.filePath,
|
|
879
|
+
symbol: params.symbol,
|
|
880
|
+
lineNumber: params.lineNumber,
|
|
881
|
+
direction
|
|
882
|
+
},
|
|
883
|
+
incoming: results.incoming,
|
|
884
|
+
outgoing: results.outgoing,
|
|
885
|
+
definitions: results.definitions,
|
|
886
|
+
summary: {
|
|
887
|
+
incomingCount: results.incoming.length,
|
|
888
|
+
outgoingCount: results.outgoing.length,
|
|
889
|
+
definitionCount: results.definitions.length,
|
|
890
|
+
message: `Found ${results.incoming.length} references pointing IN, ${results.outgoing.length} pointing OUT, ${results.definitions.length} definitions`
|
|
891
|
+
}
|
|
892
|
+
}, 'search');
|
|
893
|
+
}
|
|
894
|
+
getContextLines(content, lineNumber, context) {
|
|
895
|
+
const lines = content.split('\n');
|
|
896
|
+
const start = Math.max(0, lineNumber - context - 1);
|
|
897
|
+
const end = Math.min(lines.length, lineNumber + context);
|
|
898
|
+
return lines.slice(start, end).map((line, i) => {
|
|
899
|
+
const num = start + i + 1;
|
|
900
|
+
const marker = num === lineNumber ? '>' : ' ';
|
|
901
|
+
return `${marker}${num.toString().padStart(4)}: ${line.slice(0, 150)}`;
|
|
902
|
+
}).join('\n');
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* GetRecentChangesTool - show recent file changes from history
|
|
907
|
+
*/
|
|
908
|
+
export class GetRecentChangesTool {
|
|
909
|
+
pool;
|
|
910
|
+
name = 'get_recent_changes';
|
|
911
|
+
description = 'Get recent file changes from the change history. Shows what files were modified, added, or deleted.';
|
|
912
|
+
inputSchema = {
|
|
913
|
+
type: 'object',
|
|
914
|
+
properties: {
|
|
915
|
+
limit: { type: 'number', description: 'Max changes to return (default 20)' },
|
|
916
|
+
filePath: { type: 'string', description: 'Filter to specific file path' },
|
|
917
|
+
changeType: {
|
|
918
|
+
type: 'string',
|
|
919
|
+
enum: ['add', 'modify', 'delete'],
|
|
920
|
+
description: 'Filter by change type'
|
|
921
|
+
},
|
|
922
|
+
since: { type: 'string', description: 'ISO datetime - only show changes since this time' },
|
|
923
|
+
includeContent: { type: 'boolean', description: 'Include before/after content for changes' }
|
|
924
|
+
}
|
|
925
|
+
};
|
|
926
|
+
constructor(pool) {
|
|
927
|
+
this.pool = pool;
|
|
928
|
+
}
|
|
929
|
+
async execute(params) {
|
|
930
|
+
// Get project path for filtering
|
|
931
|
+
const projectPath = getProjectContext().getProjectPath();
|
|
932
|
+
const conditions = ['project_path = $1'];
|
|
933
|
+
const values = [projectPath];
|
|
934
|
+
let paramIndex = 2;
|
|
935
|
+
if (params.filePath) {
|
|
936
|
+
conditions.push(`file_path LIKE $${paramIndex}`);
|
|
937
|
+
values.push('%' + params.filePath + '%');
|
|
938
|
+
paramIndex++;
|
|
939
|
+
}
|
|
940
|
+
if (params.changeType) {
|
|
941
|
+
conditions.push(`change_type = $${paramIndex}`);
|
|
942
|
+
values.push(params.changeType);
|
|
943
|
+
paramIndex++;
|
|
944
|
+
}
|
|
945
|
+
if (params.since) {
|
|
946
|
+
conditions.push(`detected_at > $${paramIndex}`);
|
|
947
|
+
values.push(params.since);
|
|
948
|
+
paramIndex++;
|
|
949
|
+
}
|
|
950
|
+
const limit = params.limit ?? 20;
|
|
951
|
+
values.push(limit);
|
|
952
|
+
const whereClause = 'WHERE ' + conditions.join(' AND ');
|
|
953
|
+
const query = `
|
|
954
|
+
SELECT
|
|
955
|
+
id, file_path, change_type, previous_hash, new_hash,
|
|
956
|
+
size_before, size_after, line_count_before, line_count_after,
|
|
957
|
+
lines_added, lines_removed, detected_at, file_modified_at,
|
|
958
|
+
metadata
|
|
959
|
+
${params.includeContent ? ', previous_content, new_content' : ''}
|
|
960
|
+
FROM file_change_history
|
|
961
|
+
${whereClause}
|
|
962
|
+
ORDER BY detected_at DESC
|
|
963
|
+
LIMIT $${paramIndex}
|
|
964
|
+
`;
|
|
965
|
+
const result = await this.pool.queryWithSwag(query, values);
|
|
966
|
+
// Apply Chinese compactor for token efficiency
|
|
967
|
+
return compactResponse({
|
|
968
|
+
changes: result.rows.map((row) => ({
|
|
969
|
+
id: row.id,
|
|
970
|
+
filePath: row.file_path,
|
|
971
|
+
changeType: row.change_type,
|
|
972
|
+
detectedAt: row.detected_at,
|
|
973
|
+
fileModifiedAt: row.file_modified_at,
|
|
974
|
+
sizeDiff: row.size_after - row.size_before,
|
|
975
|
+
linesDiff: row.line_count_after - row.line_count_before,
|
|
976
|
+
linesAdded: row.lines_added,
|
|
977
|
+
linesRemoved: row.lines_removed,
|
|
978
|
+
previousHash: row.previous_hash,
|
|
979
|
+
newHash: row.new_hash,
|
|
980
|
+
metadata: row.metadata,
|
|
981
|
+
previousContent: params.includeContent ? row.previous_content : undefined,
|
|
982
|
+
newContent: params.includeContent ? row.new_content : undefined
|
|
983
|
+
})),
|
|
984
|
+
count: result.rows.length,
|
|
985
|
+
hasMore: result.rows.length === limit
|
|
986
|
+
}, 'search');
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* GetFullPointerContextTool - the MEGA context tool
|
|
991
|
+
*
|
|
992
|
+
* gives you EVERYTHING about a file:
|
|
993
|
+
* - full file content
|
|
994
|
+
* - what imports this file (with their code)
|
|
995
|
+
* - what this file imports (with their code)
|
|
996
|
+
* - all definitions in the file
|
|
997
|
+
* - all usages of exported symbols
|
|
998
|
+
* - recent changes
|
|
999
|
+
*
|
|
1000
|
+
* this is the "give me full context on this file" tool
|
|
1001
|
+
*/
|
|
1002
|
+
export class GetFullPointerContextTool {
|
|
1003
|
+
pool;
|
|
1004
|
+
name = 'get_full_pointer_context';
|
|
1005
|
+
description = 'Get FULL context for a file: its content, all imports/exports, what uses it, what it uses, definitions, and recent changes. This is the mega-context tool.';
|
|
1006
|
+
inputSchema = {
|
|
1007
|
+
type: 'object',
|
|
1008
|
+
properties: {
|
|
1009
|
+
filePath: { type: 'string', description: 'File path to get full context for (required)' },
|
|
1010
|
+
includeRelatedContent: {
|
|
1011
|
+
type: 'boolean',
|
|
1012
|
+
description: 'Include actual code content of related files (default true)'
|
|
1013
|
+
},
|
|
1014
|
+
relatedContentLines: {
|
|
1015
|
+
type: 'number',
|
|
1016
|
+
description: 'How many context lines to include from related files (default 10)'
|
|
1017
|
+
},
|
|
1018
|
+
maxRelatedFiles: {
|
|
1019
|
+
type: 'number',
|
|
1020
|
+
description: 'Max related files to include (default 20)'
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
required: ['filePath']
|
|
1024
|
+
};
|
|
1025
|
+
constructor(pool) {
|
|
1026
|
+
this.pool = pool;
|
|
1027
|
+
}
|
|
1028
|
+
async execute(params) {
|
|
1029
|
+
const includeContent = params.includeRelatedContent ?? true;
|
|
1030
|
+
const contextLines = params.relatedContentLines ?? 10;
|
|
1031
|
+
const maxRelated = params.maxRelatedFiles ?? 20;
|
|
1032
|
+
// Get project path for filtering
|
|
1033
|
+
const projectPath = getProjectContext().getProjectPath();
|
|
1034
|
+
const result = {
|
|
1035
|
+
mainFile: null,
|
|
1036
|
+
imports: [],
|
|
1037
|
+
importedBy: [],
|
|
1038
|
+
definitions: [],
|
|
1039
|
+
recentChanges: [],
|
|
1040
|
+
summary: {
|
|
1041
|
+
totalRelatedFiles: 0,
|
|
1042
|
+
totalDefinitions: 0,
|
|
1043
|
+
totalImports: 0,
|
|
1044
|
+
totalImportedBy: 0,
|
|
1045
|
+
totalUsages: 0
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
// 1. Get the main file content - filtered by project
|
|
1049
|
+
const mainFileQuery = `
|
|
1050
|
+
SELECT
|
|
1051
|
+
id, file_path, content, language_name, line_count, size_bytes
|
|
1052
|
+
FROM codebase_files
|
|
1053
|
+
WHERE file_path LIKE $1
|
|
1054
|
+
AND chunk_index IS NULL
|
|
1055
|
+
AND project_path = $2
|
|
1056
|
+
LIMIT 1
|
|
1057
|
+
`;
|
|
1058
|
+
const mainFileResult = await this.pool.queryWithSwag(mainFileQuery, ['%' + params.filePath + '%', projectPath]);
|
|
1059
|
+
if (mainFileResult.rows.length === 0) {
|
|
1060
|
+
return {
|
|
1061
|
+
error: true,
|
|
1062
|
+
message: `File not found: ${params.filePath}`,
|
|
1063
|
+
suggestion: 'Try a partial path match or use list_files to find the exact path'
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
const mainFile = mainFileResult.rows[0];
|
|
1067
|
+
result.mainFile = {
|
|
1068
|
+
path: mainFile.file_path,
|
|
1069
|
+
content: mainFile.content,
|
|
1070
|
+
language: mainFile.language_name,
|
|
1071
|
+
lineCount: mainFile.line_count,
|
|
1072
|
+
sizeBytes: mainFile.size_bytes
|
|
1073
|
+
};
|
|
1074
|
+
// 2. Get what this file IMPORTS (outgoing dependencies) - filtered by project
|
|
1075
|
+
const importsQuery = `
|
|
1076
|
+
SELECT
|
|
1077
|
+
cd.target_path,
|
|
1078
|
+
cd.resolved_path,
|
|
1079
|
+
cd.import_statement,
|
|
1080
|
+
cd.imported_names,
|
|
1081
|
+
cd.line_number,
|
|
1082
|
+
cd.is_external,
|
|
1083
|
+
cd.package_name,
|
|
1084
|
+
cf.content as target_content
|
|
1085
|
+
FROM code_dependencies cd
|
|
1086
|
+
LEFT JOIN codebase_files cf ON cf.file_path = cd.resolved_path
|
|
1087
|
+
AND cf.chunk_index IS NULL AND cf.project_path = $3
|
|
1088
|
+
WHERE cd.source_file_path = $1
|
|
1089
|
+
AND cd.project_path = $3
|
|
1090
|
+
ORDER BY cd.line_number
|
|
1091
|
+
LIMIT $2
|
|
1092
|
+
`;
|
|
1093
|
+
const importsResult = await this.pool.queryWithSwag(importsQuery, [mainFile.file_path, maxRelated, projectPath]);
|
|
1094
|
+
for (const row of importsResult.rows) {
|
|
1095
|
+
result.imports.push({
|
|
1096
|
+
targetPath: row.resolved_path ?? row.target_path,
|
|
1097
|
+
importStatement: row.import_statement,
|
|
1098
|
+
importedSymbols: row.imported_names ?? [],
|
|
1099
|
+
line: row.line_number,
|
|
1100
|
+
isExternal: row.is_external ?? false,
|
|
1101
|
+
targetContent: includeContent && row.target_content
|
|
1102
|
+
? this.extractRelevantContent(row.target_content, row.imported_names, contextLines)
|
|
1103
|
+
: undefined
|
|
1104
|
+
});
|
|
1105
|
+
}
|
|
1106
|
+
result.summary.totalImports = result.imports.length;
|
|
1107
|
+
// 3. Get what IMPORTS this file (incoming dependencies) - filtered by project
|
|
1108
|
+
const importedByQuery = `
|
|
1109
|
+
SELECT
|
|
1110
|
+
cd.source_file_path,
|
|
1111
|
+
cd.import_statement,
|
|
1112
|
+
cd.imported_names,
|
|
1113
|
+
cd.line_number,
|
|
1114
|
+
cf.content as source_content
|
|
1115
|
+
FROM code_dependencies cd
|
|
1116
|
+
LEFT JOIN codebase_files cf ON cf.file_path = cd.source_file_path
|
|
1117
|
+
AND cf.chunk_index IS NULL AND cf.project_path = $3
|
|
1118
|
+
WHERE (cd.target_path LIKE $1 OR cd.resolved_path LIKE $1)
|
|
1119
|
+
AND cd.project_path = $3
|
|
1120
|
+
ORDER BY cd.source_file_path
|
|
1121
|
+
LIMIT $2
|
|
1122
|
+
`;
|
|
1123
|
+
const fileName = mainFile.file_path.split('/').pop() ?? mainFile.file_path;
|
|
1124
|
+
const importedByResult = await this.pool.queryWithSwag(importedByQuery, ['%' + fileName + '%', maxRelated, projectPath]);
|
|
1125
|
+
for (const row of importedByResult.rows) {
|
|
1126
|
+
result.importedBy.push({
|
|
1127
|
+
sourcePath: row.source_file_path,
|
|
1128
|
+
importStatement: row.import_statement,
|
|
1129
|
+
importedSymbols: row.imported_names ?? [],
|
|
1130
|
+
line: row.line_number,
|
|
1131
|
+
sourceContent: includeContent && row.source_content
|
|
1132
|
+
? this.getContextLines(row.source_content, row.line_number, contextLines)
|
|
1133
|
+
: undefined
|
|
1134
|
+
});
|
|
1135
|
+
}
|
|
1136
|
+
result.summary.totalImportedBy = result.importedBy.length;
|
|
1137
|
+
// 4. Get definitions in this file - filtered by project
|
|
1138
|
+
const definitionsQuery = `
|
|
1139
|
+
SELECT
|
|
1140
|
+
name, definition_type, line_number, signature, is_exported
|
|
1141
|
+
FROM code_definitions
|
|
1142
|
+
WHERE file_id = $1
|
|
1143
|
+
AND project_path = $2
|
|
1144
|
+
ORDER BY line_number
|
|
1145
|
+
`;
|
|
1146
|
+
const definitionsResult = await this.pool.queryWithSwag(definitionsQuery, [mainFile.id, projectPath]);
|
|
1147
|
+
let totalUsages = 0;
|
|
1148
|
+
for (const def of definitionsResult.rows) {
|
|
1149
|
+
const definition = {
|
|
1150
|
+
name: def.name,
|
|
1151
|
+
type: def.definition_type,
|
|
1152
|
+
line: def.line_number,
|
|
1153
|
+
signature: def.signature,
|
|
1154
|
+
usedBy: []
|
|
1155
|
+
};
|
|
1156
|
+
// Find usages of this definition (only if exported) - filtered by project
|
|
1157
|
+
if (def.is_exported && includeContent) {
|
|
1158
|
+
const usageQuery = `
|
|
1159
|
+
SELECT file_path, content
|
|
1160
|
+
FROM codebase_files
|
|
1161
|
+
WHERE content ILIKE $1
|
|
1162
|
+
AND file_path != $2
|
|
1163
|
+
AND chunk_index IS NULL
|
|
1164
|
+
AND project_path = $3
|
|
1165
|
+
LIMIT 10
|
|
1166
|
+
`;
|
|
1167
|
+
const usageResult = await this.pool.queryWithSwag(usageQuery, ['%' + def.name + '%', mainFile.file_path, projectPath]);
|
|
1168
|
+
for (const usage of usageResult.rows) {
|
|
1169
|
+
const lines = usage.content.split('\n');
|
|
1170
|
+
for (let i = 0; i < lines.length; i++) {
|
|
1171
|
+
if (lines[i]?.includes(def.name)) {
|
|
1172
|
+
definition.usedBy.push({
|
|
1173
|
+
file: usage.file_path,
|
|
1174
|
+
line: i + 1,
|
|
1175
|
+
context: this.getContextLines(usage.content, i + 1, 2)
|
|
1176
|
+
});
|
|
1177
|
+
totalUsages++;
|
|
1178
|
+
if (definition.usedBy.length >= 5)
|
|
1179
|
+
break;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
result.definitions.push(definition);
|
|
1185
|
+
}
|
|
1186
|
+
result.summary.totalDefinitions = result.definitions.length;
|
|
1187
|
+
result.summary.totalUsages = totalUsages;
|
|
1188
|
+
// 5. Get recent changes to this file - filtered by project
|
|
1189
|
+
const changesQuery = `
|
|
1190
|
+
SELECT
|
|
1191
|
+
change_type, detected_at,
|
|
1192
|
+
COALESCE(size_after, 0) - COALESCE(size_before, 0) as size_diff,
|
|
1193
|
+
COALESCE(line_count_after, 0) - COALESCE(line_count_before, 0) as lines_diff
|
|
1194
|
+
FROM file_change_history
|
|
1195
|
+
WHERE file_path = $1
|
|
1196
|
+
AND project_path = $2
|
|
1197
|
+
ORDER BY detected_at DESC
|
|
1198
|
+
LIMIT 5
|
|
1199
|
+
`;
|
|
1200
|
+
const changesResult = await this.pool.queryWithSwag(changesQuery, [mainFile.file_path, projectPath]);
|
|
1201
|
+
result.recentChanges = changesResult.rows.map((row) => ({
|
|
1202
|
+
changeType: row.change_type,
|
|
1203
|
+
detectedAt: row.detected_at,
|
|
1204
|
+
sizeDiff: row.size_diff,
|
|
1205
|
+
linesDiff: row.lines_diff
|
|
1206
|
+
}));
|
|
1207
|
+
// Calculate total related files
|
|
1208
|
+
const relatedPaths = new Set();
|
|
1209
|
+
result.imports.forEach(i => relatedPaths.add(i.targetPath));
|
|
1210
|
+
result.importedBy.forEach(i => relatedPaths.add(i.sourcePath));
|
|
1211
|
+
result.definitions.forEach(d => d.usedBy.forEach(u => relatedPaths.add(u.file)));
|
|
1212
|
+
result.summary.totalRelatedFiles = relatedPaths.size;
|
|
1213
|
+
// Apply Chinese compactor for token efficiency
|
|
1214
|
+
return compactResponse(result, 'search');
|
|
1215
|
+
}
|
|
1216
|
+
getContextLines(content, lineNumber, contextSize) {
|
|
1217
|
+
const lines = content.split('\n');
|
|
1218
|
+
const start = Math.max(0, lineNumber - contextSize - 1);
|
|
1219
|
+
const end = Math.min(lines.length, lineNumber + contextSize);
|
|
1220
|
+
return lines.slice(start, end).map((line, i) => {
|
|
1221
|
+
const num = start + i + 1;
|
|
1222
|
+
const marker = num === lineNumber ? '>' : ' ';
|
|
1223
|
+
return `${marker}${num.toString().padStart(4)}: ${line.slice(0, 200)}`;
|
|
1224
|
+
}).join('\n');
|
|
1225
|
+
}
|
|
1226
|
+
extractRelevantContent(content, symbolNames, contextLines) {
|
|
1227
|
+
if (!symbolNames?.length) {
|
|
1228
|
+
// Return first N lines if no specific symbols
|
|
1229
|
+
return content.split('\n').slice(0, contextLines * 2).join('\n');
|
|
1230
|
+
}
|
|
1231
|
+
// Find and extract content around each symbol
|
|
1232
|
+
const lines = content.split('\n');
|
|
1233
|
+
const relevantLines = new Set();
|
|
1234
|
+
for (const symbol of symbolNames) {
|
|
1235
|
+
for (let i = 0; i < lines.length; i++) {
|
|
1236
|
+
if (lines[i]?.includes(symbol)) {
|
|
1237
|
+
for (let j = Math.max(0, i - contextLines); j < Math.min(lines.length, i + contextLines + 1); j++) {
|
|
1238
|
+
relevantLines.add(j);
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
if (relevantLines.size === 0) {
|
|
1244
|
+
return content.split('\n').slice(0, contextLines * 2).join('\n');
|
|
1245
|
+
}
|
|
1246
|
+
const sortedLines = Array.from(relevantLines).sort((a, b) => a - b);
|
|
1247
|
+
const result = [];
|
|
1248
|
+
let lastLine = -2;
|
|
1249
|
+
for (const lineNum of sortedLines) {
|
|
1250
|
+
if (lineNum > lastLine + 1) {
|
|
1251
|
+
if (result.length > 0)
|
|
1252
|
+
result.push(' ...');
|
|
1253
|
+
}
|
|
1254
|
+
result.push(`${(lineNum + 1).toString().padStart(4)}: ${lines[lineNum]?.slice(0, 200) ?? ''}`);
|
|
1255
|
+
lastLine = lineNum;
|
|
1256
|
+
}
|
|
1257
|
+
return result.join('\n');
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Factory function to create all codebase tools
|
|
1262
|
+
*/
|
|
1263
|
+
export function createCodebaseTools(pool, embeddingProvider) {
|
|
1264
|
+
return [
|
|
1265
|
+
new IngestCodebaseTool(pool, embeddingProvider),
|
|
1266
|
+
new FindInCodebaseTool(pool, embeddingProvider),
|
|
1267
|
+
new GetFileContentTool(pool),
|
|
1268
|
+
new ListFilesTool(pool),
|
|
1269
|
+
new CodebaseStatsTool(pool),
|
|
1270
|
+
new FindRelatedFilesTool(pool),
|
|
1271
|
+
new TextSearchInCodebaseTool(pool),
|
|
1272
|
+
new GetExclusionPatternsTool(),
|
|
1273
|
+
new GetSupportedLanguagesTool(),
|
|
1274
|
+
new GetCodePointersTool(pool),
|
|
1275
|
+
new GetRecentChangesTool(pool),
|
|
1276
|
+
new GetFullPointerContextTool(pool)
|
|
1277
|
+
];
|
|
1278
|
+
}
|
|
1279
|
+
//# sourceMappingURL=codebaseTools.js.map
|