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,1028 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sessionParser.ts - Code Session File Parser
|
|
3
|
+
*
|
|
4
|
+
* Parses Code session files to extract conversations:
|
|
5
|
+
* - Reads from ~/.claude/history.jsonl (user prompts with metadata)
|
|
6
|
+
* - Reads from ~/.claude/projects/ directories (full conversations)
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Parses both history.jsonl and project session files (JSONL format)
|
|
10
|
+
* - Extracts USER messages and ASSISTANT messages
|
|
11
|
+
* - Extracts thinking blocks from 's responses
|
|
12
|
+
* - Extracts tool_use blocks for context
|
|
13
|
+
* - Tags messages properly: role:user, role:assistant, has-thinking
|
|
14
|
+
* - Formats content: [USER] prefix or [CLAUDE] prefix with [THINKING] blocks
|
|
15
|
+
* - Hash-based deduplication using session_id + timestamp
|
|
16
|
+
* - Chunked loading with ACK verification
|
|
17
|
+
*
|
|
18
|
+
* DEDUPLICATION STRATEGY (FIX MED-44):
|
|
19
|
+
* All entry points use standardized deduplication:
|
|
20
|
+
* - generateEntryHash: sessionId + timestamp (for session-level dedup)
|
|
21
|
+
* - generateContentHash: role + content (for content-level dedup)
|
|
22
|
+
* - CASE-SENSITIVE: Do NOT lowercase content (FIX MED-28)
|
|
23
|
+
*
|
|
24
|
+
* USER/CLAUDE PAIRING METADATA:
|
|
25
|
+
* convertToMemoryParams() sets these fields for find_memory pairing:
|
|
26
|
+
* - sessionId: Same for all messages in a session (enables grouping)
|
|
27
|
+
* - timestamp: ISO string from JSONL entry (when message was sent)
|
|
28
|
+
* - timestampMs: Numeric ms since epoch (efficient comparison/ordering)
|
|
29
|
+
* - role: 'user' or 'assistant' (message direction)
|
|
30
|
+
* - messageId: Unique ID for this message (from uuid field in JSONL)
|
|
31
|
+
*/
|
|
32
|
+
import { promises as fs } from 'fs';
|
|
33
|
+
import { statSync } from 'fs';
|
|
34
|
+
import { join, basename } from 'path';
|
|
35
|
+
import * as os from 'os';
|
|
36
|
+
import { createHash } from 'crypto';
|
|
37
|
+
import { logger } from '../utils/logger.js';
|
|
38
|
+
/**
|
|
39
|
+
* Generate hash for deduplication based on session_id + timestamp
|
|
40
|
+
* LEGACY: Used for backwards compatibility with existing hashes
|
|
41
|
+
*/
|
|
42
|
+
export function generateEntryHash(sessionId, timestamp) {
|
|
43
|
+
const ts = typeof timestamp === 'string' ? new Date(timestamp).getTime() : timestamp;
|
|
44
|
+
// FIX HIGH-31: Validate timestamp to prevent NaN hash collisions
|
|
45
|
+
if (isNaN(ts)) {
|
|
46
|
+
throw new Error(`Invalid timestamp value: ${timestamp} - cannot generate hash for session ${sessionId}`);
|
|
47
|
+
}
|
|
48
|
+
return createHash('sha256')
|
|
49
|
+
.update(`${sessionId}:${ts}`)
|
|
50
|
+
.digest('hex')
|
|
51
|
+
.slice(0, 16); // 16 char hash is sufficient
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Generate content hash for deduplication based on actual content
|
|
55
|
+
* This prevents storing the same message multiple times even if from different sources
|
|
56
|
+
*
|
|
57
|
+
* FIX MED-28: Removed .toLowerCase() - case normalization caused false deduplication
|
|
58
|
+
* where "Fix bug" and "FIX BUG" would be treated as the same message.
|
|
59
|
+
* We still normalize whitespace and remove prefixes but preserve case.
|
|
60
|
+
*/
|
|
61
|
+
export function generateContentHash(content, role) {
|
|
62
|
+
// Normalize content: trim whitespace, remove common prefixes
|
|
63
|
+
// FIX MED-28: Do NOT lowercase - case differences are meaningful!
|
|
64
|
+
const normalized = content
|
|
65
|
+
.trim()
|
|
66
|
+
.replace(/^\[user\]\s*/i, '')
|
|
67
|
+
.replace(/^\[claude\]\s*/i, '');
|
|
68
|
+
return createHash('sha256')
|
|
69
|
+
.update(`${role}:${normalized}`)
|
|
70
|
+
.digest('hex')
|
|
71
|
+
.slice(0, 16);
|
|
72
|
+
}
|
|
73
|
+
const DEFAULT_CHUNKING_CONFIG = {
|
|
74
|
+
targetBytesPerSecond: 104857600, // 100MB/s
|
|
75
|
+
chunkDelayMs: 10, // 10ms delay between chunks
|
|
76
|
+
batchSize: 100 // 100 entries per batch
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* SessionParser - parses Code session files
|
|
80
|
+
*
|
|
81
|
+
* Reads from:
|
|
82
|
+
* - ~/.claude/history.jsonl (user prompts)
|
|
83
|
+
* - ~/.claude/projects/ directories (full conversations with assistant responses)
|
|
84
|
+
*
|
|
85
|
+
* PROJECT FILTERING (FIX Task #13):
|
|
86
|
+
* When projectPathFilter is provided, only parses session files that match the project.
|
|
87
|
+
* This prevents wasted parsing of sessions from other projects.
|
|
88
|
+
*/
|
|
89
|
+
export class SessionParser {
|
|
90
|
+
claudeDir;
|
|
91
|
+
projectsDir;
|
|
92
|
+
historyPath;
|
|
93
|
+
projectPathFilter;
|
|
94
|
+
constructor(claudeDir = join(os.homedir(), '.claude'), projectPathFilter = null) {
|
|
95
|
+
this.claudeDir = claudeDir;
|
|
96
|
+
this.projectsDir = join(claudeDir, 'projects');
|
|
97
|
+
this.historyPath = join(claudeDir, 'history.jsonl');
|
|
98
|
+
this.projectPathFilter = projectPathFilter;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* FIX Task #13: Set project path filter after construction
|
|
102
|
+
* Allows updating the filter for existing parser instances
|
|
103
|
+
*/
|
|
104
|
+
setProjectPathFilter(projectPath) {
|
|
105
|
+
this.projectPathFilter = projectPath;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get all project directories containing session files
|
|
109
|
+
*
|
|
110
|
+
* FIX Task #13: When projectPathFilter is set, only returns directories
|
|
111
|
+
* that match the current project path (encoded in directory name).
|
|
112
|
+
* This enables early filtering BEFORE parsing files.
|
|
113
|
+
*/
|
|
114
|
+
async getProjectDirectories() {
|
|
115
|
+
const dirs = [];
|
|
116
|
+
try {
|
|
117
|
+
await fs.access(this.projectsDir);
|
|
118
|
+
const entries = await fs.readdir(this.projectsDir, { withFileTypes: true });
|
|
119
|
+
for (const entry of entries) {
|
|
120
|
+
if (entry.isDirectory()) {
|
|
121
|
+
const dirPath = join(this.projectsDir, entry.name);
|
|
122
|
+
// FIX Task #13: Early filtering by project path if filter is set
|
|
123
|
+
if (this.projectPathFilter) {
|
|
124
|
+
// encodes project paths in directory names by replacing / with -
|
|
125
|
+
// e.g., /specmem becomes -specmem or specmem
|
|
126
|
+
// Check if this directory could belong to our project
|
|
127
|
+
const encodedFilter = this.projectPathFilter.replace(/\//g, '-').replace(/^-/, '');
|
|
128
|
+
const dirName = entry.name;
|
|
129
|
+
// Match if dir name starts with or contains the encoded project path
|
|
130
|
+
const couldMatch = dirName.includes(encodedFilter) ||
|
|
131
|
+
encodedFilter.includes(dirName) ||
|
|
132
|
+
dirName.startsWith(encodedFilter.slice(0, 20)); // prefix match for long paths
|
|
133
|
+
if (!couldMatch) {
|
|
134
|
+
logger.debug({
|
|
135
|
+
skippedDir: dirName,
|
|
136
|
+
projectFilter: this.projectPathFilter
|
|
137
|
+
}, 'Task #13: skipping project dir (does not match filter)');
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
dirs.push(dirPath);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (error) {
|
|
146
|
+
if (error.code !== 'ENOENT') {
|
|
147
|
+
logger.warn({ error, path: this.projectsDir }, 'failed to read projects directory');
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return dirs;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Get all session files from all project directories
|
|
154
|
+
* SORTED BY MODIFICATION TIME (newest first) for efficient catch-up
|
|
155
|
+
*/
|
|
156
|
+
async getAllSessionFiles() {
|
|
157
|
+
const filesWithMtime = [];
|
|
158
|
+
// Add history.jsonl if it exists
|
|
159
|
+
try {
|
|
160
|
+
await fs.access(this.historyPath);
|
|
161
|
+
const stat = statSync(this.historyPath);
|
|
162
|
+
filesWithMtime.push({ path: this.historyPath, mtime: stat.mtimeMs });
|
|
163
|
+
}
|
|
164
|
+
catch {
|
|
165
|
+
// history.jsonl doesn't exist, skip
|
|
166
|
+
}
|
|
167
|
+
// Get all project directories and their session files
|
|
168
|
+
const projectDirs = await this.getProjectDirectories();
|
|
169
|
+
for (const dir of projectDirs) {
|
|
170
|
+
try {
|
|
171
|
+
const dirFiles = await fs.readdir(dir);
|
|
172
|
+
for (const file of dirFiles) {
|
|
173
|
+
if (file.endsWith('.jsonl')) {
|
|
174
|
+
const filePath = join(dir, file);
|
|
175
|
+
try {
|
|
176
|
+
const stat = statSync(filePath);
|
|
177
|
+
filesWithMtime.push({ path: filePath, mtime: stat.mtimeMs });
|
|
178
|
+
}
|
|
179
|
+
catch {
|
|
180
|
+
// Skip if can't stat
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
catch {
|
|
186
|
+
// Skip inaccessible directories
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
// Sort by modification time DESCENDING (newest first)
|
|
190
|
+
filesWithMtime.sort((a, b) => b.mtime - a.mtime);
|
|
191
|
+
logger.debug({
|
|
192
|
+
fileCount: filesWithMtime.length,
|
|
193
|
+
newestFile: filesWithMtime[0]?.path,
|
|
194
|
+
oldestFile: filesWithMtime[filesWithMtime.length - 1]?.path
|
|
195
|
+
}, 'session files sorted by mtime (newest first)');
|
|
196
|
+
return filesWithMtime.map(f => f.path);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* parseAllSessions - reads ALL session files from history.jsonl and project directories
|
|
200
|
+
*
|
|
201
|
+
* Reads both user prompts and 's responses including thinking blocks
|
|
202
|
+
*/
|
|
203
|
+
async parseAllSessions() {
|
|
204
|
+
logger.info({ historyPath: this.historyPath, projectsDir: this.projectsDir }, 'parsing session files');
|
|
205
|
+
try {
|
|
206
|
+
const allFiles = await this.getAllSessionFiles();
|
|
207
|
+
logger.info({ fileCount: allFiles.length }, 'found session files');
|
|
208
|
+
const allSessions = [];
|
|
209
|
+
for (const filePath of allFiles) {
|
|
210
|
+
// Determine if this is history.jsonl or a project session file
|
|
211
|
+
const isHistoryFile = filePath === this.historyPath;
|
|
212
|
+
const sessions = isHistoryFile
|
|
213
|
+
? await this.parseHistoryJsonl(filePath)
|
|
214
|
+
: await this.parseSessionFile(filePath);
|
|
215
|
+
allSessions.push(...sessions);
|
|
216
|
+
}
|
|
217
|
+
logger.info({ totalMessages: allSessions.length }, 'session parsing complete');
|
|
218
|
+
return allSessions;
|
|
219
|
+
}
|
|
220
|
+
catch (error) {
|
|
221
|
+
logger.error({ error }, 'failed to parse session files');
|
|
222
|
+
throw error;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* parseHistoryJsonl - parses the history.jsonl file (user prompts only)
|
|
227
|
+
*
|
|
228
|
+
* FIX HIGH-30: Added parse error stats and warning logs instead of silent skip
|
|
229
|
+
* FIX Task #13: Added early project filtering at entry level
|
|
230
|
+
*/
|
|
231
|
+
async parseHistoryJsonl(filePath) {
|
|
232
|
+
const sessions = [];
|
|
233
|
+
// FIX HIGH-30: Track parse error stats
|
|
234
|
+
let parseErrors = 0;
|
|
235
|
+
let totalLines = 0;
|
|
236
|
+
let projectFiltered = 0;
|
|
237
|
+
try {
|
|
238
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
239
|
+
const lines = content.split('\n').filter(line => line.trim());
|
|
240
|
+
totalLines = lines.length;
|
|
241
|
+
for (let i = 0; i < lines.length; i++) {
|
|
242
|
+
const line = lines[i];
|
|
243
|
+
try {
|
|
244
|
+
const entry = JSON.parse(line);
|
|
245
|
+
// FIX Task #13: Early project filtering at entry level
|
|
246
|
+
if (this.projectPathFilter && entry.project) {
|
|
247
|
+
if (!this.matchesProjectFilter(entry.project)) {
|
|
248
|
+
projectFiltered++;
|
|
249
|
+
continue;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const parsed = this.convertHistoryEntry(entry);
|
|
253
|
+
if (parsed) {
|
|
254
|
+
sessions.push(parsed);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
catch (parseError) {
|
|
258
|
+
// FIX HIGH-30: Log warning instead of silent skip
|
|
259
|
+
parseErrors++;
|
|
260
|
+
if (parseErrors <= 5) {
|
|
261
|
+
// Only log first 5 errors to avoid spam
|
|
262
|
+
logger.warn({
|
|
263
|
+
filePath,
|
|
264
|
+
lineNumber: i + 1,
|
|
265
|
+
error: parseError instanceof Error ? parseError.message : String(parseError),
|
|
266
|
+
linePreview: line.substring(0, 100) + (line.length > 100 ? '...' : '')
|
|
267
|
+
}, 'HIGH-30: Failed to parse JSON line in history.jsonl');
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
// FIX Task #13: Log if we filtered entries
|
|
272
|
+
if (projectFiltered > 0) {
|
|
273
|
+
logger.debug({
|
|
274
|
+
filePath: basename(filePath),
|
|
275
|
+
projectFiltered,
|
|
276
|
+
kept: sessions.length,
|
|
277
|
+
projectFilter: this.projectPathFilter
|
|
278
|
+
}, 'Task #13: filtered history entries by project path');
|
|
279
|
+
}
|
|
280
|
+
// FIX HIGH-30: Log summary if there were parse errors
|
|
281
|
+
if (parseErrors > 0) {
|
|
282
|
+
logger.warn({
|
|
283
|
+
filePath,
|
|
284
|
+
parseErrors,
|
|
285
|
+
totalLines,
|
|
286
|
+
successRate: ((totalLines - parseErrors) / totalLines * 100).toFixed(1) + '%'
|
|
287
|
+
}, 'HIGH-30: JSON parse errors in history.jsonl');
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
catch (error) {
|
|
291
|
+
logger.warn({ error, filePath }, 'failed to parse history.jsonl');
|
|
292
|
+
}
|
|
293
|
+
return sessions;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* convertHistoryEntry - converts a history.jsonl entry to ParsedSession
|
|
297
|
+
*/
|
|
298
|
+
convertHistoryEntry(entry) {
|
|
299
|
+
if (!entry.display || !entry.display.trim() || !entry.sessionId || !entry.timestamp) {
|
|
300
|
+
return null;
|
|
301
|
+
}
|
|
302
|
+
const hash = generateEntryHash(entry.sessionId, entry.timestamp);
|
|
303
|
+
const content = entry.display.trim();
|
|
304
|
+
const formattedContent = `[USER] ${content}`;
|
|
305
|
+
// Detect context restoration summaries
|
|
306
|
+
const contextRestoration = isContextRestoration(content);
|
|
307
|
+
return {
|
|
308
|
+
id: `${entry.sessionId}-${entry.timestamp}-user`,
|
|
309
|
+
hash,
|
|
310
|
+
content,
|
|
311
|
+
formattedContent,
|
|
312
|
+
role: 'user',
|
|
313
|
+
timestamp: new Date(entry.timestamp),
|
|
314
|
+
project: entry.project || 'unknown',
|
|
315
|
+
sessionId: entry.sessionId,
|
|
316
|
+
pastedContent: entry.pastedContents,
|
|
317
|
+
isContextRestoration: contextRestoration,
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* parseSessionFile - reads and parses a single session file
|
|
322
|
+
*
|
|
323
|
+
* FIX HIGH-30: Added parse error stats and warning logs instead of silent skip
|
|
324
|
+
* FIX Task #13: Added early project filtering at entry level
|
|
325
|
+
*/
|
|
326
|
+
async parseSessionFile(filePath) {
|
|
327
|
+
const sessions = [];
|
|
328
|
+
// FIX HIGH-30: Track parse error stats
|
|
329
|
+
let parseErrors = 0;
|
|
330
|
+
let totalLines = 0;
|
|
331
|
+
let projectFiltered = 0;
|
|
332
|
+
try {
|
|
333
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
334
|
+
const lines = content.split('\n').filter(line => line.trim());
|
|
335
|
+
totalLines = lines.length;
|
|
336
|
+
for (let i = 0; i < lines.length; i++) {
|
|
337
|
+
const line = lines[i];
|
|
338
|
+
try {
|
|
339
|
+
const entry = JSON.parse(line);
|
|
340
|
+
// skip file-history-snapshot entries
|
|
341
|
+
if (entry.type === 'file-history-snapshot')
|
|
342
|
+
continue;
|
|
343
|
+
// FIX Task #13: Early project filtering at entry level
|
|
344
|
+
if (this.projectPathFilter) {
|
|
345
|
+
const entryProject = entry.cwd || entry.project;
|
|
346
|
+
if (entryProject && !this.matchesProjectFilter(entryProject)) {
|
|
347
|
+
projectFiltered++;
|
|
348
|
+
continue;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
const parsed = this.convertMessageEntry(entry);
|
|
352
|
+
if (parsed) {
|
|
353
|
+
sessions.push(parsed);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
catch (parseError) {
|
|
357
|
+
// FIX HIGH-30: Log warning instead of silent skip
|
|
358
|
+
parseErrors++;
|
|
359
|
+
if (parseErrors <= 3) {
|
|
360
|
+
// Only log first 3 errors per file to avoid spam
|
|
361
|
+
logger.debug({
|
|
362
|
+
filePath,
|
|
363
|
+
lineNumber: i + 1,
|
|
364
|
+
error: parseError instanceof Error ? parseError.message : String(parseError),
|
|
365
|
+
linePreview: line.substring(0, 80) + (line.length > 80 ? '...' : '')
|
|
366
|
+
}, 'HIGH-30: Failed to parse JSON line in session file');
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
// FIX Task #13: Log if we filtered entries
|
|
371
|
+
if (projectFiltered > 0) {
|
|
372
|
+
logger.debug({
|
|
373
|
+
filePath: basename(filePath),
|
|
374
|
+
projectFiltered,
|
|
375
|
+
kept: sessions.length,
|
|
376
|
+
projectFilter: this.projectPathFilter
|
|
377
|
+
}, 'Task #13: filtered entries by project path');
|
|
378
|
+
}
|
|
379
|
+
// FIX HIGH-30: Log summary if there were significant parse errors
|
|
380
|
+
if (parseErrors > 0 && parseErrors > totalLines * 0.1) {
|
|
381
|
+
// Only warn if more than 10% of lines failed
|
|
382
|
+
logger.warn({
|
|
383
|
+
filePath,
|
|
384
|
+
parseErrors,
|
|
385
|
+
totalLines,
|
|
386
|
+
successRate: ((totalLines - parseErrors) / totalLines * 100).toFixed(1) + '%'
|
|
387
|
+
}, 'HIGH-30: Significant JSON parse errors in session file');
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
catch (error) {
|
|
391
|
+
logger.warn({ error, filePath }, 'failed to parse session file');
|
|
392
|
+
}
|
|
393
|
+
return sessions;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* FIX Task #13: Check if a project path matches the filter
|
|
397
|
+
* Handles exact match, subdirectory match, and parent directory match
|
|
398
|
+
*/
|
|
399
|
+
matchesProjectFilter(projectPath) {
|
|
400
|
+
if (!this.projectPathFilter)
|
|
401
|
+
return true;
|
|
402
|
+
// Exact match
|
|
403
|
+
if (projectPath === this.projectPathFilter)
|
|
404
|
+
return true;
|
|
405
|
+
// Session from subdirectory of current project
|
|
406
|
+
if (projectPath.startsWith(this.projectPathFilter + '/'))
|
|
407
|
+
return true;
|
|
408
|
+
// Current project is subdirectory of session's project
|
|
409
|
+
if (this.projectPathFilter.startsWith(projectPath + '/'))
|
|
410
|
+
return true;
|
|
411
|
+
return false;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* streamAllSessions - streams all session files with chunked loading and rate limiting
|
|
415
|
+
*
|
|
416
|
+
* Features:
|
|
417
|
+
* - NEWEST FIRST: Files sorted by mtime, entries reversed within each file
|
|
418
|
+
* - Memory-efficient: processes files in chunks
|
|
419
|
+
* - Rate limited: 100MB/s throughput via QOMS
|
|
420
|
+
* - Hash-based deduplication: skips entries with matching session_id + timestamp hash
|
|
421
|
+
* - EARLY EXIT: Stops processing a file after N consecutive duplicates (already indexed)
|
|
422
|
+
* - ACK logging: logs SKIP or INSERT for each entry
|
|
423
|
+
*/
|
|
424
|
+
async streamAllSessions(existingHashes, onBatch, batchSize = 100, config = DEFAULT_CHUNKING_CONFIG) {
|
|
425
|
+
// FIX HIGH-30: Added parseErrors to stats tracking
|
|
426
|
+
const stats = { total: 0, processed: 0, skipped: 0, bytesProcessed: 0, earlyExitFiles: 0, parseErrors: 0 };
|
|
427
|
+
const startTime = Date.now();
|
|
428
|
+
// Early exit threshold: if we hit this many consecutive duplicates, stop processing file
|
|
429
|
+
const EARLY_EXIT_THRESHOLD = 50;
|
|
430
|
+
try {
|
|
431
|
+
const allFiles = await this.getAllSessionFiles();
|
|
432
|
+
logger.info({ fileCount: allFiles.length }, 'streaming session files for catch-up (newest first)');
|
|
433
|
+
let batch = [];
|
|
434
|
+
let chunkBytes = 0;
|
|
435
|
+
let lastThrottleTime = Date.now();
|
|
436
|
+
for (const filePath of allFiles) {
|
|
437
|
+
const isHistoryFile = filePath === this.historyPath;
|
|
438
|
+
// Get file size for rate limiting calculations
|
|
439
|
+
let fileSize = 0;
|
|
440
|
+
try {
|
|
441
|
+
const stat = statSync(filePath);
|
|
442
|
+
fileSize = stat.size;
|
|
443
|
+
}
|
|
444
|
+
catch {
|
|
445
|
+
// Skip if can't stat
|
|
446
|
+
continue;
|
|
447
|
+
}
|
|
448
|
+
// Read entire file and reverse entries (so newest come first)
|
|
449
|
+
// This is more memory-intensive but ensures newest-first processing
|
|
450
|
+
let fileLines;
|
|
451
|
+
try {
|
|
452
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
453
|
+
fileLines = content.split('\n').filter(line => line.trim());
|
|
454
|
+
// REVERSE: Process newest entries first (last line = newest)
|
|
455
|
+
fileLines.reverse();
|
|
456
|
+
stats.bytesProcessed += Buffer.byteLength(content, 'utf-8');
|
|
457
|
+
}
|
|
458
|
+
catch {
|
|
459
|
+
continue;
|
|
460
|
+
}
|
|
461
|
+
// Track consecutive duplicates for early exit
|
|
462
|
+
let consecutiveDuplicates = 0;
|
|
463
|
+
let earlyExited = false;
|
|
464
|
+
for (const line of fileLines) {
|
|
465
|
+
if (!line.trim())
|
|
466
|
+
continue;
|
|
467
|
+
stats.total++;
|
|
468
|
+
chunkBytes += Buffer.byteLength(line, 'utf-8');
|
|
469
|
+
try {
|
|
470
|
+
let parsed = null;
|
|
471
|
+
if (isHistoryFile) {
|
|
472
|
+
// Parse history.jsonl format
|
|
473
|
+
const entry = JSON.parse(line);
|
|
474
|
+
parsed = this.convertHistoryEntry(entry);
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
// Parse project session file format
|
|
478
|
+
const entry = JSON.parse(line);
|
|
479
|
+
if (entry.type === 'file-history-snapshot')
|
|
480
|
+
continue;
|
|
481
|
+
parsed = this.convertMessageEntry(entry);
|
|
482
|
+
}
|
|
483
|
+
if (!parsed)
|
|
484
|
+
continue;
|
|
485
|
+
// Check if hash already exists (deduplication + ACK verification)
|
|
486
|
+
if (existingHashes.has(parsed.hash)) {
|
|
487
|
+
stats.skipped++;
|
|
488
|
+
consecutiveDuplicates++;
|
|
489
|
+
logger.debug({ hash: parsed.hash, role: parsed.role, consecutive: consecutiveDuplicates }, 'ACK SKIP: entry already exists');
|
|
490
|
+
// EARLY EXIT: If we've hit N consecutive duplicates, assume rest of file is indexed
|
|
491
|
+
if (consecutiveDuplicates >= EARLY_EXIT_THRESHOLD) {
|
|
492
|
+
logger.info({
|
|
493
|
+
filePath: basename(filePath),
|
|
494
|
+
consecutiveDuplicates,
|
|
495
|
+
remainingLines: fileLines.length - stats.total
|
|
496
|
+
}, 'EARLY EXIT: file already indexed, skipping rest');
|
|
497
|
+
stats.earlyExitFiles++;
|
|
498
|
+
earlyExited = true;
|
|
499
|
+
break;
|
|
500
|
+
}
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
// Reset consecutive counter on new entry
|
|
504
|
+
consecutiveDuplicates = 0;
|
|
505
|
+
batch.push(parsed);
|
|
506
|
+
stats.processed++;
|
|
507
|
+
// Process batch when full
|
|
508
|
+
if (batch.length >= batchSize) {
|
|
509
|
+
await onBatch(batch);
|
|
510
|
+
batch = [];
|
|
511
|
+
// Rate limiting: throttle based on bytes processed
|
|
512
|
+
const elapsed = Date.now() - lastThrottleTime;
|
|
513
|
+
const targetTime = (chunkBytes / config.targetBytesPerSecond) * 1000;
|
|
514
|
+
if (elapsed < targetTime) {
|
|
515
|
+
await new Promise(resolve => setTimeout(resolve, config.chunkDelayMs));
|
|
516
|
+
}
|
|
517
|
+
chunkBytes = 0;
|
|
518
|
+
lastThrottleTime = Date.now();
|
|
519
|
+
// Log progress every 10 batches
|
|
520
|
+
if (stats.processed % (batchSize * 10) === 0) {
|
|
521
|
+
const mbProcessed = (stats.bytesProcessed / 1024 / 1024).toFixed(2);
|
|
522
|
+
const elapsedSec = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
523
|
+
logger.info({
|
|
524
|
+
processed: stats.processed,
|
|
525
|
+
skipped: stats.skipped,
|
|
526
|
+
earlyExitFiles: stats.earlyExitFiles,
|
|
527
|
+
mbProcessed,
|
|
528
|
+
elapsedSec
|
|
529
|
+
}, 'catch-up progress (newest first)');
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
catch (parseError) {
|
|
534
|
+
// FIX HIGH-30: Track parse errors instead of silent skip
|
|
535
|
+
stats.parseErrors++;
|
|
536
|
+
if (stats.parseErrors <= 10) {
|
|
537
|
+
// Only log first 10 errors across all files to avoid spam
|
|
538
|
+
logger.debug({
|
|
539
|
+
filePath: basename(filePath),
|
|
540
|
+
error: parseError instanceof Error ? parseError.message : String(parseError),
|
|
541
|
+
linePreview: line.substring(0, 60) + (line.length > 60 ? '...' : '')
|
|
542
|
+
}, 'HIGH-30: Failed to parse JSON line during streaming');
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
// Log if file was fully processed vs early-exited
|
|
547
|
+
if (!earlyExited && fileLines.length > 100) {
|
|
548
|
+
logger.debug({ filePath: basename(filePath), entriesProcessed: fileLines.length }, 'file fully processed');
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
// Process remaining batch
|
|
552
|
+
if (batch.length > 0) {
|
|
553
|
+
await onBatch(batch);
|
|
554
|
+
}
|
|
555
|
+
const totalElapsed = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
556
|
+
const mbTotal = (stats.bytesProcessed / 1024 / 1024).toFixed(2);
|
|
557
|
+
logger.info({
|
|
558
|
+
...stats,
|
|
559
|
+
mbTotal,
|
|
560
|
+
elapsedSec: totalElapsed,
|
|
561
|
+
throughputMBps: (stats.bytesProcessed / 1024 / 1024 / parseFloat(totalElapsed)).toFixed(2)
|
|
562
|
+
}, 'streaming session catch-up complete (newest first with early exit)');
|
|
563
|
+
return stats;
|
|
564
|
+
}
|
|
565
|
+
catch (error) {
|
|
566
|
+
logger.error({ error }, 'streaming catch-up failed');
|
|
567
|
+
throw error;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* convertMessageEntry - converts a session entry to ParsedSession
|
|
572
|
+
*/
|
|
573
|
+
convertMessageEntry(entry) {
|
|
574
|
+
// must have type and timestamp
|
|
575
|
+
if (!entry.type || !entry.timestamp || !entry.sessionId) {
|
|
576
|
+
return null;
|
|
577
|
+
}
|
|
578
|
+
// CRITICAL: Skip subagent/team member outputs - they pollute the memory database
|
|
579
|
+
// These are internal Code agent responses, not user conversations
|
|
580
|
+
if (entry.teamMemberId) {
|
|
581
|
+
return null;
|
|
582
|
+
}
|
|
583
|
+
const hash = generateEntryHash(entry.sessionId, entry.timestamp);
|
|
584
|
+
// user messages
|
|
585
|
+
if (entry.type === 'user') {
|
|
586
|
+
// user messages can have content as string OR array
|
|
587
|
+
let content = '';
|
|
588
|
+
const msgContent = entry.message?.content;
|
|
589
|
+
if (typeof msgContent === 'string') {
|
|
590
|
+
content = msgContent;
|
|
591
|
+
}
|
|
592
|
+
else if (Array.isArray(msgContent) && msgContent[0]?.text) {
|
|
593
|
+
content = msgContent[0].text;
|
|
594
|
+
}
|
|
595
|
+
else {
|
|
596
|
+
content = entry.display || '';
|
|
597
|
+
}
|
|
598
|
+
if (!content.trim())
|
|
599
|
+
return null;
|
|
600
|
+
const cleanContent = content.trim();
|
|
601
|
+
const formattedContent = `[USER] ${cleanContent}`;
|
|
602
|
+
// Detect context restoration summaries - these should be tagged differently
|
|
603
|
+
const contextRestoration = isContextRestoration(cleanContent);
|
|
604
|
+
return {
|
|
605
|
+
id: `${entry.sessionId}-${entry.timestamp}-user`,
|
|
606
|
+
hash,
|
|
607
|
+
content: cleanContent,
|
|
608
|
+
formattedContent,
|
|
609
|
+
role: 'user',
|
|
610
|
+
timestamp: new Date(entry.timestamp),
|
|
611
|
+
project: entry.cwd || entry.project || 'unknown',
|
|
612
|
+
sessionId: entry.sessionId,
|
|
613
|
+
messageId: entry.uuid,
|
|
614
|
+
isContextRestoration: contextRestoration,
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
// assistant messages
|
|
618
|
+
if (entry.type === 'assistant' && entry.message) {
|
|
619
|
+
const msg = entry.message;
|
|
620
|
+
// extract text content, thinking, and tool calls
|
|
621
|
+
let textContent = '';
|
|
622
|
+
let thinking = '';
|
|
623
|
+
const toolCalls = [];
|
|
624
|
+
if (msg.content && Array.isArray(msg.content)) {
|
|
625
|
+
for (const block of msg.content) {
|
|
626
|
+
if (block.type === 'text' && block.text) {
|
|
627
|
+
textContent += block.text + '\n';
|
|
628
|
+
}
|
|
629
|
+
else if (block.type === 'thinking' && block.thinking) {
|
|
630
|
+
thinking = block.thinking;
|
|
631
|
+
}
|
|
632
|
+
else if (block.type === 'tool_use' && block.name) {
|
|
633
|
+
toolCalls.push({ name: block.name, input: block.input });
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
textContent = textContent.trim();
|
|
638
|
+
// skip if no actual content at all
|
|
639
|
+
if (!textContent && toolCalls.length === 0 && !thinking)
|
|
640
|
+
return null;
|
|
641
|
+
// SKIP tool-only responses - they pollute the memory database
|
|
642
|
+
// These are just tool call metadata, not meaningful content to remember
|
|
643
|
+
if (!textContent && toolCalls.length > 0) {
|
|
644
|
+
return null;
|
|
645
|
+
}
|
|
646
|
+
// SKIP thinking-only responses - they pollute the memory database
|
|
647
|
+
// These are internal reasoning, not meaningful content to remember
|
|
648
|
+
if (!textContent && thinking) {
|
|
649
|
+
return null;
|
|
650
|
+
}
|
|
651
|
+
// Final validation - skip if content is still empty or garbage
|
|
652
|
+
if (!textContent || !textContent.trim())
|
|
653
|
+
return null;
|
|
654
|
+
// Skip if content is essentially just "undefined" or similar garbage
|
|
655
|
+
const cleanCheck = textContent.replace(/[\[\]:\s]/g, '');
|
|
656
|
+
if (cleanCheck === 'Tools' || cleanCheck === 'undefined' || cleanCheck.length < 5)
|
|
657
|
+
return null;
|
|
658
|
+
// CRITICAL: Skip Task agent outputs - they pollute the memory database
|
|
659
|
+
// These are subagent responses that shouldn't be stored as memories
|
|
660
|
+
if (textContent.includes('Task tool') ||
|
|
661
|
+
textContent.includes('subagent') ||
|
|
662
|
+
textContent.startsWith('Agent ') ||
|
|
663
|
+
textContent.includes('agent completed') ||
|
|
664
|
+
textContent.includes('agent returned')) {
|
|
665
|
+
return null;
|
|
666
|
+
}
|
|
667
|
+
// Build formatted content with [CLAUDE] prefix and [THINKING] block
|
|
668
|
+
let formattedContent = `[CLAUDE] ${textContent}`;
|
|
669
|
+
if (thinking) {
|
|
670
|
+
formattedContent += ` [THINKING] ${thinking}`;
|
|
671
|
+
}
|
|
672
|
+
return {
|
|
673
|
+
id: `${entry.sessionId}-${entry.timestamp}-assistant`,
|
|
674
|
+
hash,
|
|
675
|
+
content: textContent,
|
|
676
|
+
formattedContent,
|
|
677
|
+
role: 'assistant',
|
|
678
|
+
timestamp: new Date(entry.timestamp),
|
|
679
|
+
project: entry.cwd || 'unknown',
|
|
680
|
+
sessionId: entry.sessionId,
|
|
681
|
+
messageId: entry.uuid || msg.id,
|
|
682
|
+
model: msg.model,
|
|
683
|
+
thinking: thinking || undefined,
|
|
684
|
+
toolCalls: toolCalls.length > 0 ? toolCalls : undefined
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
return null;
|
|
688
|
+
}
|
|
689
|
+
/**
|
|
690
|
+
* parseHistoryFile - LEGACY: reads history.jsonl for backwards compatibility
|
|
691
|
+
* Now uses convertHistoryEntry for consistent formatting
|
|
692
|
+
*/
|
|
693
|
+
async parseHistoryFile() {
|
|
694
|
+
logger.info({ path: this.historyPath }, 'parsing legacy history.jsonl');
|
|
695
|
+
try {
|
|
696
|
+
await fs.access(this.historyPath);
|
|
697
|
+
const content = await fs.readFile(this.historyPath, 'utf-8');
|
|
698
|
+
const lines = content.split('\n').filter(line => line.trim());
|
|
699
|
+
const sessions = [];
|
|
700
|
+
for (const line of lines) {
|
|
701
|
+
try {
|
|
702
|
+
const entry = JSON.parse(line);
|
|
703
|
+
const parsed = this.convertHistoryEntry(entry);
|
|
704
|
+
if (parsed) {
|
|
705
|
+
sessions.push(parsed);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
catch {
|
|
709
|
+
// skip invalid
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
return sessions;
|
|
713
|
+
}
|
|
714
|
+
catch (error) {
|
|
715
|
+
if (error.code === 'ENOENT') {
|
|
716
|
+
return [];
|
|
717
|
+
}
|
|
718
|
+
throw error;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
/**
|
|
722
|
+
* parseNewEntries - reads only new entries since a given timestamp
|
|
723
|
+
*
|
|
724
|
+
* FIX MED-47: Optimized to only parse files modified after sinceTimestamp
|
|
725
|
+
* Uses file mtime filtering + streaming with early exit to avoid re-parsing all sessions
|
|
726
|
+
*/
|
|
727
|
+
async parseNewEntries(sinceTimestamp) {
|
|
728
|
+
logger.info({ sinceTimestamp: new Date(sinceTimestamp) }, 'parsing new session entries (optimized)');
|
|
729
|
+
const newSessions = [];
|
|
730
|
+
try {
|
|
731
|
+
// FIX MED-47: Get files with modification times, filter to only those modified since sinceTimestamp
|
|
732
|
+
const filesWithMtime = [];
|
|
733
|
+
// Check history.jsonl
|
|
734
|
+
try {
|
|
735
|
+
await fs.access(this.historyPath);
|
|
736
|
+
const stat = statSync(this.historyPath);
|
|
737
|
+
if (stat.mtimeMs > sinceTimestamp) {
|
|
738
|
+
filesWithMtime.push({ path: this.historyPath, mtime: stat.mtimeMs });
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
catch {
|
|
742
|
+
// history.jsonl doesn't exist, skip
|
|
743
|
+
}
|
|
744
|
+
// Check project session files
|
|
745
|
+
const projectDirs = await this.getProjectDirectories();
|
|
746
|
+
for (const dir of projectDirs) {
|
|
747
|
+
try {
|
|
748
|
+
const dirFiles = await fs.readdir(dir);
|
|
749
|
+
for (const file of dirFiles) {
|
|
750
|
+
if (file.endsWith('.jsonl')) {
|
|
751
|
+
const filePath = join(dir, file);
|
|
752
|
+
try {
|
|
753
|
+
const stat = statSync(filePath);
|
|
754
|
+
// Only include files modified after sinceTimestamp
|
|
755
|
+
if (stat.mtimeMs > sinceTimestamp) {
|
|
756
|
+
filesWithMtime.push({ path: filePath, mtime: stat.mtimeMs });
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
catch {
|
|
760
|
+
// Skip if can't stat
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
catch {
|
|
766
|
+
// Skip inaccessible directories
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
// Sort by modification time DESCENDING (newest first) for early exit
|
|
770
|
+
filesWithMtime.sort((a, b) => b.mtime - a.mtime);
|
|
771
|
+
logger.debug({
|
|
772
|
+
totalFiles: filesWithMtime.length,
|
|
773
|
+
sinceTimestamp: new Date(sinceTimestamp).toISOString()
|
|
774
|
+
}, 'MED-47: only parsing files modified since timestamp');
|
|
775
|
+
// Parse only the modified files
|
|
776
|
+
for (const { path: filePath } of filesWithMtime) {
|
|
777
|
+
const isHistoryFile = filePath === this.historyPath;
|
|
778
|
+
const sessions = isHistoryFile
|
|
779
|
+
? await this.parseHistoryJsonl(filePath)
|
|
780
|
+
: await this.parseSessionFile(filePath);
|
|
781
|
+
// Filter to entries after sinceTimestamp (file mtime is not exact, entries could be older)
|
|
782
|
+
for (const session of sessions) {
|
|
783
|
+
if (session.timestamp.getTime() > sinceTimestamp) {
|
|
784
|
+
newSessions.push(session);
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
logger.info({ newCount: newSessions.length, filesChecked: filesWithMtime.length }, 'found new session entries (optimized)');
|
|
789
|
+
return newSessions;
|
|
790
|
+
}
|
|
791
|
+
catch (error) {
|
|
792
|
+
logger.warn({ error }, 'MED-47: optimized parseNewEntries failed, falling back to full scan');
|
|
793
|
+
// Fallback to full scan on error
|
|
794
|
+
const allSessions = await this.parseAllSessions();
|
|
795
|
+
return allSessions.filter(session => session.timestamp.getTime() > sinceTimestamp);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* getSessionStats - analyzes session files and returns stats
|
|
800
|
+
*/
|
|
801
|
+
async getSessionStats() {
|
|
802
|
+
const sessions = await this.parseAllSessions();
|
|
803
|
+
const stats = {
|
|
804
|
+
totalEntries: sessions.length,
|
|
805
|
+
validEntries: sessions.length,
|
|
806
|
+
invalidEntries: 0,
|
|
807
|
+
uniqueSessions: new Set(sessions.map(s => s.sessionId)).size,
|
|
808
|
+
userMessages: sessions.filter(s => s.role === 'user').length,
|
|
809
|
+
assistantMessages: sessions.filter(s => s.role === 'assistant').length,
|
|
810
|
+
oldestEntry: null,
|
|
811
|
+
newestEntry: null,
|
|
812
|
+
projectsFound: new Set(sessions.map(s => s.project))
|
|
813
|
+
};
|
|
814
|
+
if (sessions.length > 0) {
|
|
815
|
+
const sorted = [...sessions].sort((a, b) => a.timestamp.getTime() - b.timestamp.getTime());
|
|
816
|
+
stats.oldestEntry = sorted[0].timestamp;
|
|
817
|
+
stats.newestEntry = sorted[sorted.length - 1].timestamp;
|
|
818
|
+
}
|
|
819
|
+
return stats;
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* convertToMemoryParams - converts parsed sessions to memory storage params
|
|
823
|
+
*
|
|
824
|
+
* Uses formattedContent which includes:
|
|
825
|
+
* - [USER] prefix for user messages
|
|
826
|
+
* - [CLAUDE] prefix for assistant messages with [THINKING] blocks
|
|
827
|
+
*
|
|
828
|
+
* Tags include:
|
|
829
|
+
* - role:user or role:assistant
|
|
830
|
+
* - has-thinking for messages with thinking blocks
|
|
831
|
+
*/
|
|
832
|
+
convertToMemoryParams(sessions, options = {}) {
|
|
833
|
+
const { importance = 'medium', memoryType = 'episodic', additionalTags = [] } = options;
|
|
834
|
+
// Filter out sessions with tool/thinking content BEFORE conversion
|
|
835
|
+
const filteredSessions = sessions.filter(session => {
|
|
836
|
+
// Check both content and formattedContent for tool/thinking patterns
|
|
837
|
+
if (isToolOrThinkingContent(session.content))
|
|
838
|
+
return false;
|
|
839
|
+
if (isToolOrThinkingContent(session.formattedContent))
|
|
840
|
+
return false;
|
|
841
|
+
return true;
|
|
842
|
+
});
|
|
843
|
+
return filteredSessions.map(session => {
|
|
844
|
+
// create tags from metadata - includes role!
|
|
845
|
+
const tags = [
|
|
846
|
+
'claude-session',
|
|
847
|
+
'conversation',
|
|
848
|
+
`role:${session.role}`,
|
|
849
|
+
`session:${session.sessionId.slice(0, 8)}`,
|
|
850
|
+
...additionalTags
|
|
851
|
+
];
|
|
852
|
+
// add specific tags based on role
|
|
853
|
+
if (session.role === 'user') {
|
|
854
|
+
if (session.isContextRestoration) {
|
|
855
|
+
// Context restorations are system-generated summaries, NOT real user prompts
|
|
856
|
+
// Tag them separately so find_memory can exclude them from "what did the user say" searches
|
|
857
|
+
tags.push('context-restoration');
|
|
858
|
+
}
|
|
859
|
+
else {
|
|
860
|
+
tags.push('user-prompt');
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
else {
|
|
864
|
+
tags.push('claude-response');
|
|
865
|
+
if (session.model) {
|
|
866
|
+
tags.push(`model:${session.model.split('-').slice(0, 2).join('-')}`);
|
|
867
|
+
}
|
|
868
|
+
if (session.thinking) {
|
|
869
|
+
tags.push('has-thinking');
|
|
870
|
+
}
|
|
871
|
+
if (session.toolCalls && session.toolCalls.length > 0) {
|
|
872
|
+
tags.push('has-tool-calls');
|
|
873
|
+
// add tool-specific tags
|
|
874
|
+
for (const tc of session.toolCalls.slice(0, 3)) { // limit to 3
|
|
875
|
+
tags.push(`tool:${tc.name}`);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
// add project tag
|
|
880
|
+
if (session.project && session.project !== 'unknown') {
|
|
881
|
+
const projectName = session.project.split('/').pop() || 'unknown';
|
|
882
|
+
tags.push(`project:${projectName}`);
|
|
883
|
+
}
|
|
884
|
+
// build metadata - include hash for deduplication verification
|
|
885
|
+
// project_path is used for namespacing/filtering, project is the original project identifier
|
|
886
|
+
//
|
|
887
|
+
// PAIRING FIELDS (for find_memory user/claude pairing):
|
|
888
|
+
// - sessionId: same for all messages in a session, used to group related messages
|
|
889
|
+
// - timestamp: ISO string of when the message was sent (from JSONL entry)
|
|
890
|
+
// - timestampMs: numeric milliseconds since epoch (for efficient comparison/ordering)
|
|
891
|
+
// - role: 'user' or 'assistant' - determines message direction
|
|
892
|
+
// - messageId: unique ID for this specific message in the session
|
|
893
|
+
//
|
|
894
|
+
// Pairing works by: same sessionId + close timestamps + opposite roles
|
|
895
|
+
const metadata = {
|
|
896
|
+
sessionId: session.sessionId,
|
|
897
|
+
hash: session.hash, // Hash for deduplication
|
|
898
|
+
project: session.project,
|
|
899
|
+
project_path: session.project, // For project namespacing filtering
|
|
900
|
+
timestamp: session.timestamp.toISOString(),
|
|
901
|
+
timestampMs: session.timestamp.getTime(), // Numeric timestamp for efficient pairing queries
|
|
902
|
+
source: 'claude-code',
|
|
903
|
+
entryId: session.id,
|
|
904
|
+
role: session.role,
|
|
905
|
+
messageId: session.messageId
|
|
906
|
+
};
|
|
907
|
+
// include additional data for assistant messages
|
|
908
|
+
if (session.role === 'assistant') {
|
|
909
|
+
if (session.model)
|
|
910
|
+
metadata.model = session.model;
|
|
911
|
+
if (session.thinking)
|
|
912
|
+
metadata.hasThinking = true;
|
|
913
|
+
if (session.toolCalls)
|
|
914
|
+
metadata.toolCalls = session.toolCalls.map(t => t.name);
|
|
915
|
+
}
|
|
916
|
+
// Mark context restorations in metadata for easy filtering
|
|
917
|
+
if (session.isContextRestoration) {
|
|
918
|
+
metadata.isContextRestoration = true;
|
|
919
|
+
}
|
|
920
|
+
// include pasted content if present
|
|
921
|
+
if (session.pastedContent && Object.keys(session.pastedContent).length > 0) {
|
|
922
|
+
metadata.pastedContent = session.pastedContent;
|
|
923
|
+
tags.push('has-pasted-content');
|
|
924
|
+
}
|
|
925
|
+
return {
|
|
926
|
+
// Use formattedContent with [USER] or [CLAUDE][THINKING] prefixes
|
|
927
|
+
content: session.formattedContent,
|
|
928
|
+
memoryType,
|
|
929
|
+
importance,
|
|
930
|
+
tags,
|
|
931
|
+
metadata
|
|
932
|
+
};
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
/**
|
|
936
|
+
* getLastProcessedTimestamp - helper to get the last processed timestamp from DB
|
|
937
|
+
*/
|
|
938
|
+
async getLastProcessedTimestamp(db) {
|
|
939
|
+
try {
|
|
940
|
+
const result = await db.query(`
|
|
941
|
+
SELECT metadata->>'timestamp' as last_timestamp
|
|
942
|
+
FROM memories
|
|
943
|
+
WHERE tags @> ARRAY['claude-session']
|
|
944
|
+
ORDER BY (metadata->>'timestamp')::timestamp DESC
|
|
945
|
+
LIMIT 1
|
|
946
|
+
`);
|
|
947
|
+
if (result.rows.length > 0 && result.rows[0].last_timestamp) {
|
|
948
|
+
return new Date(result.rows[0].last_timestamp).getTime();
|
|
949
|
+
}
|
|
950
|
+
return 0;
|
|
951
|
+
}
|
|
952
|
+
catch (error) {
|
|
953
|
+
logger.warn({ error }, 'failed to get last processed timestamp');
|
|
954
|
+
return 0;
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
isValidLegacyEntry(entry) {
|
|
958
|
+
if (!entry.display || typeof entry.display !== 'string' || !entry.display.trim()) {
|
|
959
|
+
return false;
|
|
960
|
+
}
|
|
961
|
+
if (!entry.timestamp || typeof entry.timestamp !== 'number') {
|
|
962
|
+
return false;
|
|
963
|
+
}
|
|
964
|
+
if (!entry.sessionId || typeof entry.sessionId !== 'string') {
|
|
965
|
+
return false;
|
|
966
|
+
}
|
|
967
|
+
return true;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Helper function to create parser with default config
|
|
972
|
+
*
|
|
973
|
+
* FIX Task #13: Now accepts optional projectPathFilter for early filtering.
|
|
974
|
+
* When provided, the parser will only process session files from directories
|
|
975
|
+
* that could match the specified project path, avoiding wasteful parsing.
|
|
976
|
+
*/
|
|
977
|
+
export function createSessionParser(claudeDir, projectPathFilter) {
|
|
978
|
+
return new SessionParser(claudeDir, projectPathFilter ?? null);
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* isToolOrThinkingContent - checks if content is a tool call
|
|
982
|
+
* These should be SKIPPED from memory storage as they pollute the database
|
|
983
|
+
*
|
|
984
|
+
* Patterns to skip:
|
|
985
|
+
* - [Tools: ...] - tool call descriptions
|
|
986
|
+
* - [Tool: ...] - individual tool patterns
|
|
987
|
+
*
|
|
988
|
+
* NOTE: We KEEP thinking blocks - they contain valuable reasoning!
|
|
989
|
+
*/
|
|
990
|
+
export function isToolOrThinkingContent(content) {
|
|
991
|
+
if (!content || typeof content !== 'string')
|
|
992
|
+
return false;
|
|
993
|
+
const trimmed = content.trim();
|
|
994
|
+
// Check for tool call patterns ONLY
|
|
995
|
+
if (trimmed.startsWith('[Tools:'))
|
|
996
|
+
return true;
|
|
997
|
+
if (trimmed.startsWith('[Tool:'))
|
|
998
|
+
return true;
|
|
999
|
+
// Check for [CLAUDE] prefixed tool versions
|
|
1000
|
+
if (trimmed.startsWith('[CLAUDE] [Tools:'))
|
|
1001
|
+
return true;
|
|
1002
|
+
if (trimmed.startsWith('[CLAUDE] [Tool:'))
|
|
1003
|
+
return true;
|
|
1004
|
+
return false;
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* isContextRestoration - detects context restoration summaries
|
|
1008
|
+
*
|
|
1009
|
+
* Context restorations are injected when 's context window overflows.
|
|
1010
|
+
* They look like user messages but are actually system-generated summaries.
|
|
1011
|
+
*
|
|
1012
|
+
* These should be tagged differently so they don't pollute find_memory results
|
|
1013
|
+
* for actual user prompts.
|
|
1014
|
+
*/
|
|
1015
|
+
export function isContextRestoration(content) {
|
|
1016
|
+
if (!content || typeof content !== 'string')
|
|
1017
|
+
return false;
|
|
1018
|
+
// These are the key markers Code uses for context restorations
|
|
1019
|
+
const markers = [
|
|
1020
|
+
'This session is being continued from a previous conversation',
|
|
1021
|
+
'conversation is summarized below',
|
|
1022
|
+
'previous conversation that ran out of context',
|
|
1023
|
+
'Context Restore',
|
|
1024
|
+
'session continued from',
|
|
1025
|
+
];
|
|
1026
|
+
return markers.some(marker => content.includes(marker));
|
|
1027
|
+
}
|
|
1028
|
+
//# sourceMappingURL=sessionParser.js.map
|