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,1299 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// ============================================================================
|
|
4
|
+
// CLAUDE LIVE SCREEN - Full-Screen Claude Live View with ANSI Color Preservation
|
|
5
|
+
// ============================================================================
|
|
6
|
+
//
|
|
7
|
+
// The #1 most important feature of the SpecMem TUI. When the user presses Tab 2,
|
|
8
|
+
// they see Claude's terminal output in FULL SCREEN with ALL COLORS PRESERVED,
|
|
9
|
+
// and can interact with it directly (send keystrokes, accept/reject permissions,
|
|
10
|
+
// type prompts).
|
|
11
|
+
//
|
|
12
|
+
// Features:
|
|
13
|
+
// - Full ANSI color passthrough (truecolor, 256-color, basic)
|
|
14
|
+
// - Scrollback buffer with PgUp/PgDn navigation
|
|
15
|
+
// - Auto-follow mode (scrolls with new output when at bottom)
|
|
16
|
+
// - Interactive mode (forward all keystrokes to Claude's screen session)
|
|
17
|
+
// - Quick accept/reject for permission prompts
|
|
18
|
+
// - Session status indicator (alive/dead)
|
|
19
|
+
// - Graceful resize handling
|
|
20
|
+
// - AEGIS theme integration with fallback
|
|
21
|
+
//
|
|
22
|
+
// Usage:
|
|
23
|
+
// const ClaudeLiveScreen = require('./ClaudeLiveScreen.cjs');
|
|
24
|
+
// const screen = new ClaudeLiveScreen({
|
|
25
|
+
// projectPath: '/path/to/project',
|
|
26
|
+
// theme: aegisThemeInstance, // optional
|
|
27
|
+
// capture: liveScreenCaptureInstance // optional, creates one if not provided
|
|
28
|
+
// });
|
|
29
|
+
// screen.onActivate();
|
|
30
|
+
// const rows = screen.render(120, 40);
|
|
31
|
+
// screen.handleInput(key);
|
|
32
|
+
//
|
|
33
|
+
// @author SpecMem TUI Team
|
|
34
|
+
// ============================================================================
|
|
35
|
+
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
// Imports with graceful fallbacks
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
let AegisTheme = null;
|
|
41
|
+
let AEGIS_COLORS = null;
|
|
42
|
+
let AEGIS_ICONS = null;
|
|
43
|
+
try {
|
|
44
|
+
const aegis = require('./AegisTheme.cjs');
|
|
45
|
+
AegisTheme = aegis.AegisTheme || null;
|
|
46
|
+
AEGIS_COLORS = aegis.AEGIS_COLORS || null;
|
|
47
|
+
AEGIS_ICONS = aegis.AEGIS_ICONS || null;
|
|
48
|
+
} catch (_err) {
|
|
49
|
+
// AegisTheme not available - will fall back to basic ANSI colors
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let LiveScreenCapture = null;
|
|
53
|
+
let filterMCPNoise = null;
|
|
54
|
+
try {
|
|
55
|
+
const lsc = require('./LiveScreenCapture.cjs');
|
|
56
|
+
LiveScreenCapture = lsc.LiveScreenCapture;
|
|
57
|
+
filterMCPNoise = lsc.filterMCPNoise || null;
|
|
58
|
+
} catch (_err) {
|
|
59
|
+
// LiveScreenCapture not available
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
let AnsiRenderer = null;
|
|
63
|
+
let AnsiString = null;
|
|
64
|
+
try {
|
|
65
|
+
const ar = require('./AnsiRenderer.cjs');
|
|
66
|
+
AnsiRenderer = ar.AnsiRenderer;
|
|
67
|
+
AnsiString = ar.AnsiString;
|
|
68
|
+
} catch (_err) {
|
|
69
|
+
// AnsiRenderer not available
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
// Constants
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
|
|
76
|
+
const RESET = '\x1b[0m';
|
|
77
|
+
const BOLD = '\x1b[1m';
|
|
78
|
+
const DIM = '\x1b[2m';
|
|
79
|
+
const ITALIC = '\x1b[3m';
|
|
80
|
+
const UNDERLINE = '\x1b[4m';
|
|
81
|
+
const INVERSE = '\x1b[7m';
|
|
82
|
+
|
|
83
|
+
// Basic ANSI color fallbacks (used when AegisTheme is not available)
|
|
84
|
+
const COLORS = {
|
|
85
|
+
cyan: '\x1b[36m',
|
|
86
|
+
cyanBright: '\x1b[96m',
|
|
87
|
+
green: '\x1b[32m',
|
|
88
|
+
greenBright:'\x1b[92m',
|
|
89
|
+
red: '\x1b[31m',
|
|
90
|
+
redBright: '\x1b[91m',
|
|
91
|
+
yellow: '\x1b[33m',
|
|
92
|
+
white: '\x1b[37m',
|
|
93
|
+
gray: '\x1b[90m',
|
|
94
|
+
magenta: '\x1b[35m',
|
|
95
|
+
blue: '\x1b[34m',
|
|
96
|
+
blackBg: '\x1b[40m',
|
|
97
|
+
greenBg: '\x1b[42m',
|
|
98
|
+
redBg: '\x1b[41m',
|
|
99
|
+
cyanBg: '\x1b[46m'
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// AEGIS color palette (hex fallbacks for truecolor terminals)
|
|
103
|
+
const AEGIS_HEX = {
|
|
104
|
+
cyan: '#00d4ff',
|
|
105
|
+
cyanDark: '#0099cc',
|
|
106
|
+
green: '#00ff88',
|
|
107
|
+
greenDark: '#00cc66',
|
|
108
|
+
red: '#ff3366',
|
|
109
|
+
yellow: '#ffaa00',
|
|
110
|
+
orange: '#ff6633',
|
|
111
|
+
magenta: '#cc33ff',
|
|
112
|
+
text: '#c8d6e5',
|
|
113
|
+
textDim: '#6b7b8d',
|
|
114
|
+
bg: '#0a0f1a',
|
|
115
|
+
bgSurface: '#131924',
|
|
116
|
+
border: '#2a3a4a',
|
|
117
|
+
borderFocus:'#00d4ff'
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
// Box-drawing characters
|
|
121
|
+
const BOX = {
|
|
122
|
+
tl: '\u256D', tr: '\u256E', bl: '\u2570', br: '\u256F',
|
|
123
|
+
h: '\u2500', v: '\u2502',
|
|
124
|
+
// T-junctions
|
|
125
|
+
teeL: '\u251C', teeR: '\u2524'
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
// Scroll indicators
|
|
129
|
+
const SCROLL_UP = '\u25B2'; // Black up-pointing triangle
|
|
130
|
+
const SCROLL_DOWN = '\u25BC'; // Black down-pointing triangle
|
|
131
|
+
const SCROLL_THUMB = '\u2588'; // Full block (for scrollbar thumb)
|
|
132
|
+
const SCROLL_TRACK = '\u2591'; // Light shade (for scrollbar track)
|
|
133
|
+
|
|
134
|
+
// Default scroll page size
|
|
135
|
+
const DEFAULT_PAGE_SIZE = 20;
|
|
136
|
+
|
|
137
|
+
// Double-ESC exit detection timeout (ms)
|
|
138
|
+
const DOUBLE_ESC_TIMEOUT = 300;
|
|
139
|
+
|
|
140
|
+
// Default capture poll intervals
|
|
141
|
+
const ACTIVE_POLL_MS = 250; // When tab is active
|
|
142
|
+
const INACTIVE_POLL_MS = 2000; // When tab is inactive (reduced frequency)
|
|
143
|
+
|
|
144
|
+
// Default ring buffer capacity for scrollback
|
|
145
|
+
const DEFAULT_SCROLLBACK = 2000;
|
|
146
|
+
|
|
147
|
+
// ---------------------------------------------------------------------------
|
|
148
|
+
// Helper functions
|
|
149
|
+
// ---------------------------------------------------------------------------
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Convert a hex color (#RRGGBB) to truecolor foreground ANSI escape.
|
|
153
|
+
* @param {string} hex - Hex color e.g. '#00d4ff'
|
|
154
|
+
* @returns {string} ANSI escape sequence
|
|
155
|
+
*/
|
|
156
|
+
function hexFg(hex) {
|
|
157
|
+
if (AegisTheme && typeof AegisTheme.fg === 'function') {
|
|
158
|
+
try {
|
|
159
|
+
const resolved = AegisTheme.fg(hex);
|
|
160
|
+
if (resolved && resolved !== hex) return resolved;
|
|
161
|
+
} catch (_e) { /* fall through */ }
|
|
162
|
+
}
|
|
163
|
+
if (!hex || typeof hex !== 'string' || hex.length < 7) return '';
|
|
164
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
165
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
166
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
167
|
+
if (isNaN(r) || isNaN(g) || isNaN(b)) return '';
|
|
168
|
+
return `\x1b[38;2;${r};${g};${b}m`;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Convert a hex color (#RRGGBB) to truecolor background ANSI escape.
|
|
173
|
+
* @param {string} hex - Hex color e.g. '#131924'
|
|
174
|
+
* @returns {string} ANSI escape sequence
|
|
175
|
+
*/
|
|
176
|
+
function hexBg(hex) {
|
|
177
|
+
if (AegisTheme && typeof AegisTheme.bg === 'function') {
|
|
178
|
+
try {
|
|
179
|
+
const resolved = AegisTheme.bg(hex);
|
|
180
|
+
if (resolved && resolved !== hex) return resolved;
|
|
181
|
+
} catch (_e) { /* fall through */ }
|
|
182
|
+
}
|
|
183
|
+
if (!hex || typeof hex !== 'string' || hex.length < 7) return '';
|
|
184
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
185
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
186
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
187
|
+
if (isNaN(r) || isNaN(g) || isNaN(b)) return '';
|
|
188
|
+
return `\x1b[48;2;${r};${g};${b}m`;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Get the visible (display) width of a string, excluding ANSI escapes.
|
|
193
|
+
* Uses AnsiRenderer if available, otherwise a simple regex strip.
|
|
194
|
+
* @param {string} str
|
|
195
|
+
* @returns {number}
|
|
196
|
+
*/
|
|
197
|
+
function visWidth(str) {
|
|
198
|
+
if (!str) return 0;
|
|
199
|
+
if (AnsiRenderer && typeof AnsiRenderer.visibleWidth === 'function') {
|
|
200
|
+
return AnsiRenderer.visibleWidth(str);
|
|
201
|
+
}
|
|
202
|
+
// Fallback: strip ANSI and return length (does not handle CJK/emoji)
|
|
203
|
+
return str.replace(/\x1b\[[0-9;]*[A-Za-z]/g, '').length;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Pad or truncate a string to exactly targetWidth visible columns.
|
|
208
|
+
* Preserves ANSI color codes.
|
|
209
|
+
* @param {string} str - Input string
|
|
210
|
+
* @param {number} targetWidth - Desired visible width
|
|
211
|
+
* @param {string} [padChar=' '] - Character to pad with
|
|
212
|
+
* @returns {string}
|
|
213
|
+
*/
|
|
214
|
+
function fitWidth(str, targetWidth, padChar = ' ') {
|
|
215
|
+
if (AnsiRenderer) {
|
|
216
|
+
const truncated = AnsiRenderer.truncate(str || '', targetWidth, '');
|
|
217
|
+
return AnsiRenderer.pad(truncated, targetWidth, padChar);
|
|
218
|
+
}
|
|
219
|
+
// Fallback: simple approach (strips ANSI for measurement)
|
|
220
|
+
const plain = (str || '').replace(/\x1b\[[0-9;]*[A-Za-z]/g, '');
|
|
221
|
+
if (plain.length >= targetWidth) {
|
|
222
|
+
return (str || '').slice(0, targetWidth);
|
|
223
|
+
}
|
|
224
|
+
return (str || '') + padChar.repeat(targetWidth - plain.length);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Format a timestamp as HH:MM:SS.
|
|
229
|
+
* @param {number} ts - Unix timestamp in ms
|
|
230
|
+
* @returns {string}
|
|
231
|
+
*/
|
|
232
|
+
function formatTime(ts) {
|
|
233
|
+
if (!ts) return '--:--:--';
|
|
234
|
+
const d = new Date(ts);
|
|
235
|
+
const hh = String(d.getHours()).padStart(2, '0');
|
|
236
|
+
const mm = String(d.getMinutes()).padStart(2, '0');
|
|
237
|
+
const ss = String(d.getSeconds()).padStart(2, '0');
|
|
238
|
+
return `${hh}:${mm}:${ss}`;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Format a date-time as YYYY-MM-DD HH:MM.
|
|
243
|
+
* @param {number} [ts] - Unix timestamp in ms (defaults to now)
|
|
244
|
+
* @returns {string}
|
|
245
|
+
*/
|
|
246
|
+
function formatDateTime(ts) {
|
|
247
|
+
const d = ts ? new Date(ts) : new Date();
|
|
248
|
+
const yyyy = d.getFullYear();
|
|
249
|
+
const mo = String(d.getMonth() + 1).padStart(2, '0');
|
|
250
|
+
const dd = String(d.getDate()).padStart(2, '0');
|
|
251
|
+
const hh = String(d.getHours()).padStart(2, '0');
|
|
252
|
+
const mm = String(d.getMinutes()).padStart(2, '0');
|
|
253
|
+
return `${yyyy}-${mo}-${dd} ${hh}:${mm}`;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// ---------------------------------------------------------------------------
|
|
257
|
+
// ClaudeLiveScreen Class
|
|
258
|
+
// ---------------------------------------------------------------------------
|
|
259
|
+
|
|
260
|
+
class ClaudeLiveScreen {
|
|
261
|
+
/**
|
|
262
|
+
* @param {Object} options
|
|
263
|
+
* @param {string} [options.projectPath] - Project working directory
|
|
264
|
+
* @param {Object} [options.theme] - AegisTheme instance (optional)
|
|
265
|
+
* @param {Object} [options.capture] - LiveScreenCapture instance (optional; creates one if not provided)
|
|
266
|
+
* @param {string} [options.sessionName] - Screen session name to attach to
|
|
267
|
+
* @param {number} [options.scrollback] - Max scrollback lines (default: 2000)
|
|
268
|
+
* @param {boolean} [options.filterMcp] - Whether to filter MCP XML noise (default: true)
|
|
269
|
+
*/
|
|
270
|
+
constructor(options = {}) {
|
|
271
|
+
this.projectPath = options.projectPath || process.cwd();
|
|
272
|
+
this.theme = options.theme || AegisTheme || null;
|
|
273
|
+
this.sessionName = options.sessionName || null;
|
|
274
|
+
this.scrollback = options.scrollback || DEFAULT_SCROLLBACK;
|
|
275
|
+
this.filterMcp = options.filterMcp !== false;
|
|
276
|
+
|
|
277
|
+
// Capture instance
|
|
278
|
+
this._capture = options.capture || null;
|
|
279
|
+
this._ownCapture = false; // Whether we created the capture (and should destroy it)
|
|
280
|
+
|
|
281
|
+
// Content state
|
|
282
|
+
this._lines = []; // All captured lines (scrollback buffer)
|
|
283
|
+
this._scrollOffset = 0; // Lines scrolled up from bottom (0 = at bottom)
|
|
284
|
+
this._autoFollow = true; // Auto-scroll when new content arrives
|
|
285
|
+
this._lastLineCount = 0; // For detecting new content
|
|
286
|
+
|
|
287
|
+
// Interactive mode state
|
|
288
|
+
this._interactive = false;
|
|
289
|
+
this._lastEscTime = 0; // For double-ESC exit detection
|
|
290
|
+
|
|
291
|
+
// Session state
|
|
292
|
+
this._sessionAlive = false;
|
|
293
|
+
this._lastUpdateTime = 0;
|
|
294
|
+
this._captureMethod = 'none';
|
|
295
|
+
this._activated = false;
|
|
296
|
+
|
|
297
|
+
// Render cache (avoid re-rendering when nothing changed)
|
|
298
|
+
this._lastRenderWidth = 0;
|
|
299
|
+
this._lastRenderHeight = 0;
|
|
300
|
+
this._lastRenderLineCount = 0;
|
|
301
|
+
this._lastRenderScroll = -1;
|
|
302
|
+
this._lastRenderInteractive = false;
|
|
303
|
+
this._cachedRows = null;
|
|
304
|
+
|
|
305
|
+
// Input buffer for interactive mode prompt
|
|
306
|
+
this._inputBuffer = '';
|
|
307
|
+
|
|
308
|
+
// Session discovery
|
|
309
|
+
this._discoveredSession = null;
|
|
310
|
+
this._lastDiscoveryTime = 0;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// =========================================================================
|
|
314
|
+
// Lifecycle
|
|
315
|
+
// =========================================================================
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Called when this tab becomes active.
|
|
319
|
+
* Starts or resumes capture, enables auto-follow.
|
|
320
|
+
*/
|
|
321
|
+
onActivate() {
|
|
322
|
+
this._activated = true;
|
|
323
|
+
|
|
324
|
+
// Auto-discover session if none set
|
|
325
|
+
if (!this.sessionName) {
|
|
326
|
+
this._discoverSession();
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// Create capture instance if needed
|
|
330
|
+
if (!this._capture && LiveScreenCapture && this.sessionName) {
|
|
331
|
+
this._capture = new LiveScreenCapture({
|
|
332
|
+
sessionName: this.sessionName,
|
|
333
|
+
maxLines: this.scrollback,
|
|
334
|
+
pollInterval: ACTIVE_POLL_MS,
|
|
335
|
+
projectPath: this.projectPath
|
|
336
|
+
});
|
|
337
|
+
this._ownCapture = true;
|
|
338
|
+
|
|
339
|
+
// Wire up event handlers
|
|
340
|
+
this._capture.on('data', () => {
|
|
341
|
+
this._onNewData();
|
|
342
|
+
});
|
|
343
|
+
this._capture.on('sessionDead', () => {
|
|
344
|
+
this._sessionAlive = false;
|
|
345
|
+
});
|
|
346
|
+
this._capture.on('error', () => {
|
|
347
|
+
// Silently handle capture errors (session not found, PTY failures, etc.)
|
|
348
|
+
// The UI will show "Offline" status instead of crashing
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
// Attempt to start capture (may fail if session doesn't exist yet)
|
|
352
|
+
try {
|
|
353
|
+
this._capture.startCapture();
|
|
354
|
+
} catch (_e) {
|
|
355
|
+
// Session may not exist yet - that's fine, we'll show offline status
|
|
356
|
+
}
|
|
357
|
+
} else if (this._capture) {
|
|
358
|
+
// Resume existing capture at active poll rate
|
|
359
|
+
this._capture.resume();
|
|
360
|
+
if (this._capture.pollInterval !== ACTIVE_POLL_MS) {
|
|
361
|
+
this._capture.pollInterval = ACTIVE_POLL_MS;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// Check session status
|
|
366
|
+
this._checkSessionAlive();
|
|
367
|
+
|
|
368
|
+
// Invalidate render cache
|
|
369
|
+
this._invalidateCache();
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Called when this tab loses focus.
|
|
374
|
+
* Reduces capture frequency to save resources.
|
|
375
|
+
*/
|
|
376
|
+
onDeactivate() {
|
|
377
|
+
this._activated = false;
|
|
378
|
+
|
|
379
|
+
// Exit interactive mode if active
|
|
380
|
+
if (this._interactive) {
|
|
381
|
+
this.exitInteractiveMode();
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// Reduce capture frequency (don't stop completely - we still want data)
|
|
385
|
+
if (this._capture) {
|
|
386
|
+
if (this._capture.pollInterval !== INACTIVE_POLL_MS) {
|
|
387
|
+
this._capture.pollInterval = INACTIVE_POLL_MS;
|
|
388
|
+
}
|
|
389
|
+
this._capture.pause();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Destroy this screen and clean up resources.
|
|
395
|
+
*/
|
|
396
|
+
destroy() {
|
|
397
|
+
this._activated = false;
|
|
398
|
+
if (this._ownCapture && this._capture) {
|
|
399
|
+
this._capture.destroy();
|
|
400
|
+
this._capture = null;
|
|
401
|
+
}
|
|
402
|
+
this._lines = [];
|
|
403
|
+
this._cachedRows = null;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// =========================================================================
|
|
407
|
+
// Rendering
|
|
408
|
+
// =========================================================================
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Render the full screen view.
|
|
412
|
+
* Returns an array of strings (one per terminal row), with ANSI colors.
|
|
413
|
+
*
|
|
414
|
+
* Layout:
|
|
415
|
+
* Row 0: Header bar with session info
|
|
416
|
+
* Rows 1 to height-2: Claude output content (ANSI colors preserved)
|
|
417
|
+
* Row height-1: Footer bar with keybindings
|
|
418
|
+
*
|
|
419
|
+
* @param {number} width - Terminal width in columns
|
|
420
|
+
* @param {number} height - Terminal height in rows
|
|
421
|
+
* @returns {string[]} Array of exactly `height` strings
|
|
422
|
+
*/
|
|
423
|
+
render(width, height) {
|
|
424
|
+
if (width < 10) width = 10;
|
|
425
|
+
if (height < 5) height = 5;
|
|
426
|
+
|
|
427
|
+
// Update content from capture
|
|
428
|
+
this.update();
|
|
429
|
+
|
|
430
|
+
// Check if we can use cached render
|
|
431
|
+
if (this._cachedRows &&
|
|
432
|
+
this._lastRenderWidth === width &&
|
|
433
|
+
this._lastRenderHeight === height &&
|
|
434
|
+
this._lastRenderLineCount === this._lines.length &&
|
|
435
|
+
this._lastRenderScroll === this._scrollOffset &&
|
|
436
|
+
this._lastRenderInteractive === this._interactive) {
|
|
437
|
+
return this._cachedRows;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
const rows = new Array(height);
|
|
441
|
+
|
|
442
|
+
// Row 0: Header bar
|
|
443
|
+
rows[0] = this._renderHeader(width);
|
|
444
|
+
|
|
445
|
+
// Rows 1 to height-2: Content area
|
|
446
|
+
const contentHeight = height - 2;
|
|
447
|
+
const contentRows = this._renderContent(width, contentHeight);
|
|
448
|
+
for (let i = 0; i < contentHeight; i++) {
|
|
449
|
+
rows[i + 1] = contentRows[i] || '';
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
// Last row: Footer bar
|
|
453
|
+
rows[height - 1] = this._renderFooter(width);
|
|
454
|
+
|
|
455
|
+
// Cache the result
|
|
456
|
+
this._cachedRows = rows;
|
|
457
|
+
this._lastRenderWidth = width;
|
|
458
|
+
this._lastRenderHeight = height;
|
|
459
|
+
this._lastRenderLineCount = this._lines.length;
|
|
460
|
+
this._lastRenderScroll = this._scrollOffset;
|
|
461
|
+
this._lastRenderInteractive = this._interactive;
|
|
462
|
+
|
|
463
|
+
return rows;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Render the header bar.
|
|
468
|
+
* Format: +-- Claude Live -- session: <name> -- . Online -- YYYY-MM-DD HH:MM --+
|
|
469
|
+
* @param {number} width - Available width
|
|
470
|
+
* @returns {string}
|
|
471
|
+
*/
|
|
472
|
+
_renderHeader(width) {
|
|
473
|
+
const innerWidth = width - 2; // Account for border chars
|
|
474
|
+
|
|
475
|
+
// Colors
|
|
476
|
+
const borderColor = hexFg(AEGIS_HEX.border) || COLORS.gray;
|
|
477
|
+
const cyanColor = hexFg(AEGIS_HEX.cyan) || COLORS.cyanBright;
|
|
478
|
+
const textColor = hexFg(AEGIS_HEX.text) || COLORS.white;
|
|
479
|
+
const dimColor = hexFg(AEGIS_HEX.textDim) || COLORS.gray;
|
|
480
|
+
|
|
481
|
+
// Status dot
|
|
482
|
+
let statusDot, statusLabel;
|
|
483
|
+
if (this._sessionAlive) {
|
|
484
|
+
const greenColor = hexFg(AEGIS_HEX.green) || COLORS.greenBright;
|
|
485
|
+
statusDot = `${greenColor}\u25CF${RESET}`;
|
|
486
|
+
statusLabel = `${greenColor}Online${RESET}`;
|
|
487
|
+
} else {
|
|
488
|
+
const redColor = hexFg(AEGIS_HEX.red) || COLORS.redBright;
|
|
489
|
+
statusDot = `${redColor}\u25CF${RESET}`;
|
|
490
|
+
statusLabel = `${redColor}Offline${RESET}`;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
// Session name display
|
|
494
|
+
const sessionDisplay = this.sessionName || 'no session';
|
|
495
|
+
|
|
496
|
+
// Timestamp
|
|
497
|
+
const timeStr = formatDateTime();
|
|
498
|
+
|
|
499
|
+
// Capture method indicator
|
|
500
|
+
const methodStr = this._captureMethod !== 'none'
|
|
501
|
+
? ` ${dimColor}[${this._captureMethod}]${RESET}`
|
|
502
|
+
: '';
|
|
503
|
+
|
|
504
|
+
// Build title segments
|
|
505
|
+
const titleParts = [
|
|
506
|
+
`${BOX.h}${BOX.h} `,
|
|
507
|
+
`${cyanColor}${BOLD}Claude Live${RESET}`,
|
|
508
|
+
` ${borderColor}${BOX.h}${BOX.h}${RESET} `,
|
|
509
|
+
`${textColor}${sessionDisplay}${RESET}`,
|
|
510
|
+
` ${borderColor}${BOX.h}${BOX.h}${RESET} `,
|
|
511
|
+
`${statusDot} ${statusLabel}`,
|
|
512
|
+
methodStr,
|
|
513
|
+
` ${borderColor}${BOX.h}${BOX.h}${RESET} `,
|
|
514
|
+
`${dimColor}${timeStr}${RESET}`,
|
|
515
|
+
` `
|
|
516
|
+
];
|
|
517
|
+
|
|
518
|
+
// Calculate visible width of title content
|
|
519
|
+
let titleContent = titleParts.join('');
|
|
520
|
+
let titleVisWidth = visWidth(titleContent);
|
|
521
|
+
|
|
522
|
+
// If title is wider than available space, truncate it
|
|
523
|
+
if (titleVisWidth > innerWidth) {
|
|
524
|
+
if (AnsiRenderer) {
|
|
525
|
+
titleContent = AnsiRenderer.truncate(titleContent, innerWidth, '');
|
|
526
|
+
}
|
|
527
|
+
titleVisWidth = visWidth(titleContent);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
// Fill remaining with horizontal line
|
|
531
|
+
const fillCount = Math.max(0, innerWidth - titleVisWidth);
|
|
532
|
+
const fill = `${borderColor}${BOX.h.repeat(fillCount)}${RESET}`;
|
|
533
|
+
|
|
534
|
+
return `${borderColor}${BOX.tl}${RESET}${titleContent}${fill}${borderColor}${BOX.tr}${RESET}`;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Render the content area (Claude output with ANSI colors preserved).
|
|
539
|
+
* @param {number} width - Available width (including border columns)
|
|
540
|
+
* @param {number} height - Number of content rows
|
|
541
|
+
* @returns {string[]} Array of content row strings
|
|
542
|
+
*/
|
|
543
|
+
_renderContent(width, height) {
|
|
544
|
+
const borderColor = hexFg(AEGIS_HEX.border) || COLORS.gray;
|
|
545
|
+
const innerWidth = width - 2; // Left border + Right border
|
|
546
|
+
const rows = new Array(height);
|
|
547
|
+
|
|
548
|
+
// Determine which lines to show
|
|
549
|
+
const totalLines = this._lines.length;
|
|
550
|
+
let startLine;
|
|
551
|
+
|
|
552
|
+
if (totalLines <= height) {
|
|
553
|
+
// All content fits on screen - show everything from the top
|
|
554
|
+
startLine = 0;
|
|
555
|
+
this._scrollOffset = 0;
|
|
556
|
+
} else if (this._autoFollow) {
|
|
557
|
+
// Auto-follow: show the latest lines
|
|
558
|
+
startLine = totalLines - height;
|
|
559
|
+
this._scrollOffset = 0;
|
|
560
|
+
} else {
|
|
561
|
+
// Manual scroll position
|
|
562
|
+
startLine = Math.max(0, totalLines - height - this._scrollOffset);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
// Are we at the very bottom?
|
|
566
|
+
const atBottom = (startLine + height >= totalLines) || totalLines <= height;
|
|
567
|
+
// Are we at the very top?
|
|
568
|
+
const atTop = startLine === 0;
|
|
569
|
+
|
|
570
|
+
// Render visible lines
|
|
571
|
+
for (let i = 0; i < height; i++) {
|
|
572
|
+
const lineIdx = startLine + i;
|
|
573
|
+
let lineContent;
|
|
574
|
+
|
|
575
|
+
if (lineIdx < totalLines) {
|
|
576
|
+
// Get the raw line with ANSI colors intact
|
|
577
|
+
lineContent = this._lines[lineIdx] || '';
|
|
578
|
+
|
|
579
|
+
// Fit to inner width, preserving ANSI
|
|
580
|
+
lineContent = fitWidth(lineContent, innerWidth);
|
|
581
|
+
} else {
|
|
582
|
+
// Empty line (beyond content)
|
|
583
|
+
lineContent = ' '.repeat(innerWidth);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
// Add scroll indicators on the right border
|
|
587
|
+
let rightBorder = `${borderColor}${BOX.v}${RESET}`;
|
|
588
|
+
|
|
589
|
+
if (totalLines > height && !atBottom) {
|
|
590
|
+
// Show scroll indicators when scrolled up from bottom
|
|
591
|
+
if (i === 0 && !atTop) {
|
|
592
|
+
// Top indicator: more content above
|
|
593
|
+
rightBorder = `${borderColor}${SCROLL_UP}${RESET}`;
|
|
594
|
+
} else if (i === height - 1) {
|
|
595
|
+
// Bottom indicator: more content below
|
|
596
|
+
rightBorder = `${borderColor}${SCROLL_DOWN}${RESET}`;
|
|
597
|
+
}
|
|
598
|
+
} else if (totalLines > height && !atTop && atBottom) {
|
|
599
|
+
// At bottom but scrollable content above
|
|
600
|
+
if (i === 0) {
|
|
601
|
+
rightBorder = `${borderColor}${SCROLL_UP}${RESET}`;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
// Scrollbar track (optional - when content is scrollable)
|
|
606
|
+
if (totalLines > height && height > 4) {
|
|
607
|
+
const scrollbarHeight = Math.max(1, Math.floor((height / totalLines) * height));
|
|
608
|
+
const scrollbarPos = Math.floor(((startLine) / Math.max(1, totalLines - height)) * (height - scrollbarHeight));
|
|
609
|
+
|
|
610
|
+
if (i >= scrollbarPos && i < scrollbarPos + scrollbarHeight) {
|
|
611
|
+
// Scrollbar thumb
|
|
612
|
+
const thumbColor = hexFg(AEGIS_HEX.cyanDark) || COLORS.cyan;
|
|
613
|
+
rightBorder = `${thumbColor}${SCROLL_THUMB}${RESET}`;
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
rows[i] = `${borderColor}${BOX.v}${RESET}${lineContent}${RESET}${rightBorder}`;
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return rows;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Render the footer bar with keybindings.
|
|
625
|
+
* Changes when in interactive mode.
|
|
626
|
+
* @param {number} width - Available width
|
|
627
|
+
* @returns {string}
|
|
628
|
+
*/
|
|
629
|
+
_renderFooter(width) {
|
|
630
|
+
const innerWidth = width - 2;
|
|
631
|
+
const borderColor = hexFg(AEGIS_HEX.border) || COLORS.gray;
|
|
632
|
+
const cyanColor = hexFg(AEGIS_HEX.cyan) || COLORS.cyanBright;
|
|
633
|
+
const dimColor = hexFg(AEGIS_HEX.textDim) || COLORS.gray;
|
|
634
|
+
const greenColor = hexFg(AEGIS_HEX.green) || COLORS.greenBright;
|
|
635
|
+
|
|
636
|
+
let footerContent;
|
|
637
|
+
|
|
638
|
+
if (this._interactive) {
|
|
639
|
+
// Interactive mode footer
|
|
640
|
+
const greenBg = hexBg('#004422') || COLORS.greenBg;
|
|
641
|
+
const brightText = hexFg('#ffffff') || COLORS.white;
|
|
642
|
+
const modeLabel = `${greenBg}${brightText}${BOLD} INTERACTIVE MODE ${RESET}`;
|
|
643
|
+
const hint = `${dimColor}All keys sent to Claude${RESET}`;
|
|
644
|
+
const exitHint = `${cyanColor}[ESC+ESC]${RESET}${dimColor}Exit${RESET}`;
|
|
645
|
+
|
|
646
|
+
footerContent = ` ${modeLabel} ${borderColor}${BOX.h}${BOX.h}${RESET} ${hint} ${borderColor}${BOX.h}${BOX.h}${RESET} ${exitHint} `;
|
|
647
|
+
} else {
|
|
648
|
+
// Normal mode footer - build key hints that fit within width
|
|
649
|
+
// Full set of key hints, progressively reduced if too wide
|
|
650
|
+
const allKeys = [
|
|
651
|
+
{ key: 'i', label: 'Interactive' },
|
|
652
|
+
{ key: 'a', label: 'Accept' },
|
|
653
|
+
{ key: 'x', label: 'Reject' },
|
|
654
|
+
{ key: 'PgUp/PgDn', label: 'Scroll' },
|
|
655
|
+
{ key: 'Home', label: 'Top' },
|
|
656
|
+
{ key: 'End', label: 'Bottom' },
|
|
657
|
+
{ key: 'ESC', label: 'Back' }
|
|
658
|
+
];
|
|
659
|
+
|
|
660
|
+
// Compact set for narrow terminals
|
|
661
|
+
const compactKeys = [
|
|
662
|
+
{ key: 'i', label: 'Type' },
|
|
663
|
+
{ key: 'a', label: 'Yes' },
|
|
664
|
+
{ key: 'x', label: 'No' },
|
|
665
|
+
{ key: '\u2191\u2193', label: 'Scroll' },
|
|
666
|
+
{ key: 'ESC', label: 'Back' }
|
|
667
|
+
];
|
|
668
|
+
|
|
669
|
+
// Scroll position indicator
|
|
670
|
+
let scrollInfo = '';
|
|
671
|
+
if (this._lines.length > 0) {
|
|
672
|
+
const totalLines = this._lines.length;
|
|
673
|
+
if (this._autoFollow) {
|
|
674
|
+
scrollInfo = ` ${dimColor}${totalLines}L${RESET}`;
|
|
675
|
+
} else {
|
|
676
|
+
const viewBottom = totalLines - this._scrollOffset;
|
|
677
|
+
const viewTop = Math.max(1, viewBottom - 20); // approximate
|
|
678
|
+
scrollInfo = ` ${dimColor}${viewTop}-${viewBottom}/${totalLines}${RESET}`;
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
// Try full keys first, fall back to compact
|
|
683
|
+
let keys = allKeys;
|
|
684
|
+
let keyHints = keys.map(k =>
|
|
685
|
+
`${cyanColor}[${k.key}]${RESET}${dimColor}${k.label}${RESET}`
|
|
686
|
+
).join(' ');
|
|
687
|
+
let testContent = ` ${keyHints}${scrollInfo} `;
|
|
688
|
+
|
|
689
|
+
if (visWidth(testContent) > innerWidth) {
|
|
690
|
+
keys = compactKeys;
|
|
691
|
+
keyHints = keys.map(k =>
|
|
692
|
+
`${cyanColor}[${k.key}]${RESET}${dimColor}${k.label}${RESET}`
|
|
693
|
+
).join(' ');
|
|
694
|
+
testContent = ` ${keyHints}${scrollInfo} `;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
footerContent = testContent;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
// Calculate fill - if content is wider than innerWidth, truncate
|
|
701
|
+
let contentVisWidth = visWidth(footerContent);
|
|
702
|
+
if (contentVisWidth > innerWidth) {
|
|
703
|
+
// Truncate using AnsiRenderer if available
|
|
704
|
+
if (AnsiRenderer) {
|
|
705
|
+
footerContent = AnsiRenderer.truncate(footerContent, innerWidth, '');
|
|
706
|
+
} else {
|
|
707
|
+
// Simple truncation fallback
|
|
708
|
+
footerContent = footerContent.slice(0, innerWidth);
|
|
709
|
+
}
|
|
710
|
+
contentVisWidth = visWidth(footerContent);
|
|
711
|
+
}
|
|
712
|
+
const fillCount = Math.max(0, innerWidth - contentVisWidth);
|
|
713
|
+
const fill = `${borderColor}${BOX.h.repeat(fillCount)}${RESET}`;
|
|
714
|
+
|
|
715
|
+
return `${borderColor}${BOX.bl}${RESET}${footerContent}${fill}${borderColor}${BOX.br}${RESET}`;
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
// =========================================================================
|
|
719
|
+
// Content Update
|
|
720
|
+
// =========================================================================
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Pull the latest content from the LiveScreenCapture instance.
|
|
724
|
+
* Called automatically during render(), but can also be called manually.
|
|
725
|
+
*/
|
|
726
|
+
update() {
|
|
727
|
+
if (!this._capture) {
|
|
728
|
+
// No capture instance - try to discover and connect
|
|
729
|
+
if (this._activated && !this.sessionName) {
|
|
730
|
+
this._discoverSession();
|
|
731
|
+
}
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
// Get content from capture (all ANSI codes preserved)
|
|
736
|
+
const content = this._capture.getContent();
|
|
737
|
+
|
|
738
|
+
if (content && content.lines) {
|
|
739
|
+
// Optionally filter MCP noise
|
|
740
|
+
let lines = content.lines;
|
|
741
|
+
if (this.filterMcp && filterMCPNoise) {
|
|
742
|
+
lines = lines.map(line => filterMCPNoise(line));
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
// Detect new content
|
|
746
|
+
const newLineCount = lines.length;
|
|
747
|
+
const hadNewContent = newLineCount !== this._lastLineCount;
|
|
748
|
+
|
|
749
|
+
// Store all lines
|
|
750
|
+
this._lines = lines;
|
|
751
|
+
this._lastLineCount = newLineCount;
|
|
752
|
+
this._lastUpdateTime = content.timestamp || Date.now();
|
|
753
|
+
this._captureMethod = content.method || 'unknown';
|
|
754
|
+
|
|
755
|
+
// If new content arrived and auto-follow is on, stay at bottom
|
|
756
|
+
if (hadNewContent && this._autoFollow) {
|
|
757
|
+
this._scrollOffset = 0;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
// Invalidate render cache when content changes
|
|
761
|
+
if (hadNewContent) {
|
|
762
|
+
this._invalidateCache();
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
// Check session status periodically
|
|
767
|
+
this._checkSessionAlive();
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Handle new data event from capture.
|
|
772
|
+
* @private
|
|
773
|
+
*/
|
|
774
|
+
_onNewData() {
|
|
775
|
+
if (this._autoFollow) {
|
|
776
|
+
this._scrollOffset = 0;
|
|
777
|
+
}
|
|
778
|
+
this._invalidateCache();
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
// =========================================================================
|
|
782
|
+
// Keyboard Input Handling
|
|
783
|
+
// =========================================================================
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Handle keyboard input.
|
|
787
|
+
* Returns true if the key was consumed by this screen.
|
|
788
|
+
*
|
|
789
|
+
* Normal mode keybindings:
|
|
790
|
+
* 'i' - Enter interactive mode
|
|
791
|
+
* 'a' - Send 'y' + Enter (accept permission)
|
|
792
|
+
* 'x' - Send 'n' + Enter (reject permission)
|
|
793
|
+
* PageUp - Scroll up one page
|
|
794
|
+
* PageDown - Scroll down one page
|
|
795
|
+
* Up arrow - Scroll up one line
|
|
796
|
+
* Down arrow- Scroll down one line
|
|
797
|
+
* Home - Scroll to top
|
|
798
|
+
* End - Scroll to bottom (resume auto-follow)
|
|
799
|
+
* ESC - Exit back to tab bar (return false to let parent handle)
|
|
800
|
+
*
|
|
801
|
+
* Interactive mode keybindings:
|
|
802
|
+
* ESC+ESC - Exit interactive mode (double-tap ESC within 300ms)
|
|
803
|
+
* All other keys are forwarded to the screen session
|
|
804
|
+
*
|
|
805
|
+
* @param {string|Object} key - Key string or key object from readline
|
|
806
|
+
* @returns {boolean} True if the key was consumed
|
|
807
|
+
*/
|
|
808
|
+
handleInput(key) {
|
|
809
|
+
// Normalize key input
|
|
810
|
+
const keyInfo = this._normalizeKey(key);
|
|
811
|
+
|
|
812
|
+
if (this._interactive) {
|
|
813
|
+
return this._handleInteractiveInput(keyInfo);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
return this._handleNormalInput(keyInfo);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Handle input in normal (non-interactive) mode.
|
|
821
|
+
* @param {Object} keyInfo - Normalized key info
|
|
822
|
+
* @returns {boolean}
|
|
823
|
+
* @private
|
|
824
|
+
*/
|
|
825
|
+
_handleNormalInput(keyInfo) {
|
|
826
|
+
const { name, ch, ctrl, meta, shift, sequence } = keyInfo;
|
|
827
|
+
|
|
828
|
+
// Single character commands
|
|
829
|
+
if (!ctrl && !meta) {
|
|
830
|
+
switch (name || ch) {
|
|
831
|
+
case 'i':
|
|
832
|
+
this.enterInteractiveMode();
|
|
833
|
+
return true;
|
|
834
|
+
|
|
835
|
+
case 'a':
|
|
836
|
+
// Accept permission: send 'y' + Enter
|
|
837
|
+
this._sendToSession('y', true);
|
|
838
|
+
return true;
|
|
839
|
+
|
|
840
|
+
case 'x':
|
|
841
|
+
// Reject permission: send 'n' + Enter
|
|
842
|
+
this._sendToSession('n', true);
|
|
843
|
+
return true;
|
|
844
|
+
|
|
845
|
+
case 'pageup':
|
|
846
|
+
this.scrollUp(DEFAULT_PAGE_SIZE);
|
|
847
|
+
return true;
|
|
848
|
+
|
|
849
|
+
case 'pagedown':
|
|
850
|
+
this.scrollDown(DEFAULT_PAGE_SIZE);
|
|
851
|
+
return true;
|
|
852
|
+
|
|
853
|
+
case 'up':
|
|
854
|
+
this.scrollUp(1);
|
|
855
|
+
return true;
|
|
856
|
+
|
|
857
|
+
case 'down':
|
|
858
|
+
this.scrollDown(1);
|
|
859
|
+
return true;
|
|
860
|
+
|
|
861
|
+
case 'home':
|
|
862
|
+
this.scrollToTop();
|
|
863
|
+
return true;
|
|
864
|
+
|
|
865
|
+
case 'end':
|
|
866
|
+
this.scrollToBottom();
|
|
867
|
+
return true;
|
|
868
|
+
|
|
869
|
+
case 'escape':
|
|
870
|
+
// ESC in normal mode - let parent handle (switch tab/exit)
|
|
871
|
+
return false;
|
|
872
|
+
|
|
873
|
+
case 'c':
|
|
874
|
+
// Ctrl+C in normal mode should be forwarded if shift held
|
|
875
|
+
if (ctrl) {
|
|
876
|
+
this._sendKeyToSession('ctrl-c');
|
|
877
|
+
return true;
|
|
878
|
+
}
|
|
879
|
+
return false;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
// Space bar scrolls down a page
|
|
884
|
+
if (ch === ' ' && !ctrl && !meta) {
|
|
885
|
+
this.scrollDown(DEFAULT_PAGE_SIZE);
|
|
886
|
+
return true;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
// Ctrl+Home / Ctrl+End for top/bottom
|
|
890
|
+
if (ctrl && name === 'home') {
|
|
891
|
+
this.scrollToTop();
|
|
892
|
+
return true;
|
|
893
|
+
}
|
|
894
|
+
if (ctrl && name === 'end') {
|
|
895
|
+
this.scrollToBottom();
|
|
896
|
+
return true;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
return false;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Handle input in interactive mode.
|
|
904
|
+
* All keys are forwarded to the screen session except double-ESC to exit.
|
|
905
|
+
* @param {Object} keyInfo - Normalized key info
|
|
906
|
+
* @returns {boolean}
|
|
907
|
+
* @private
|
|
908
|
+
*/
|
|
909
|
+
_handleInteractiveInput(keyInfo) {
|
|
910
|
+
const { name, ch, ctrl, sequence } = keyInfo;
|
|
911
|
+
const now = Date.now();
|
|
912
|
+
|
|
913
|
+
// Double-ESC detection to exit interactive mode
|
|
914
|
+
if (name === 'escape' || sequence === '\x1b') {
|
|
915
|
+
if (now - this._lastEscTime < DOUBLE_ESC_TIMEOUT) {
|
|
916
|
+
// Double-ESC: exit interactive mode
|
|
917
|
+
this._lastEscTime = 0;
|
|
918
|
+
this.exitInteractiveMode();
|
|
919
|
+
return true;
|
|
920
|
+
}
|
|
921
|
+
this._lastEscTime = now;
|
|
922
|
+
// Don't send the first ESC yet - wait to see if it's a double
|
|
923
|
+
// We'll send it on the next non-ESC key or after timeout
|
|
924
|
+
return true;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
// If we had a pending single ESC (timed out), send it first
|
|
928
|
+
if (this._lastEscTime > 0 && now - this._lastEscTime >= DOUBLE_ESC_TIMEOUT) {
|
|
929
|
+
this._sendKeyToSession('esc');
|
|
930
|
+
this._lastEscTime = 0;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
// Forward special keys
|
|
934
|
+
if (ctrl && ch) {
|
|
935
|
+
const ctrlKey = 'ctrl-' + ch;
|
|
936
|
+
this._sendKeyToSession(ctrlKey);
|
|
937
|
+
return true;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
// Forward named keys
|
|
941
|
+
if (name) {
|
|
942
|
+
switch (name) {
|
|
943
|
+
case 'return':
|
|
944
|
+
this._sendKeyToSession('enter');
|
|
945
|
+
return true;
|
|
946
|
+
case 'backspace':
|
|
947
|
+
this._sendKeyToSession('backspace');
|
|
948
|
+
return true;
|
|
949
|
+
case 'delete':
|
|
950
|
+
this._sendKeyToSession('delete');
|
|
951
|
+
return true;
|
|
952
|
+
case 'tab':
|
|
953
|
+
this._sendKeyToSession('tab');
|
|
954
|
+
return true;
|
|
955
|
+
case 'up':
|
|
956
|
+
this._sendKeyToSession('up');
|
|
957
|
+
return true;
|
|
958
|
+
case 'down':
|
|
959
|
+
this._sendKeyToSession('down');
|
|
960
|
+
return true;
|
|
961
|
+
case 'left':
|
|
962
|
+
this._sendKeyToSession('left');
|
|
963
|
+
return true;
|
|
964
|
+
case 'right':
|
|
965
|
+
this._sendKeyToSession('right');
|
|
966
|
+
return true;
|
|
967
|
+
case 'home':
|
|
968
|
+
this._sendKeyToSession('home');
|
|
969
|
+
return true;
|
|
970
|
+
case 'end':
|
|
971
|
+
this._sendKeyToSession('end');
|
|
972
|
+
return true;
|
|
973
|
+
case 'pageup':
|
|
974
|
+
this._sendKeyToSession('page-up');
|
|
975
|
+
return true;
|
|
976
|
+
case 'pagedown':
|
|
977
|
+
this._sendKeyToSession('page-down');
|
|
978
|
+
return true;
|
|
979
|
+
case 'insert':
|
|
980
|
+
this._sendKeyToSession('insert');
|
|
981
|
+
return true;
|
|
982
|
+
case 'f1': case 'f2': case 'f3': case 'f4':
|
|
983
|
+
case 'f5': case 'f6': case 'f7': case 'f8':
|
|
984
|
+
case 'f9': case 'f10': case 'f11': case 'f12':
|
|
985
|
+
this._sendKeyToSession(name);
|
|
986
|
+
return true;
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
// Forward printable characters as text
|
|
991
|
+
if (ch && ch.length === 1 && ch.charCodeAt(0) >= 32) {
|
|
992
|
+
this._sendToSession(ch, false);
|
|
993
|
+
return true;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
// Forward raw sequence if available
|
|
997
|
+
if (sequence && sequence.length > 0) {
|
|
998
|
+
this._sendToSession(sequence, false);
|
|
999
|
+
return true;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
return true; // Consume everything in interactive mode
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* Normalize key input from various sources.
|
|
1007
|
+
* Handles both string input and readline-style key objects.
|
|
1008
|
+
* @param {string|Object} key
|
|
1009
|
+
* @returns {Object} Normalized key info: { name, ch, ctrl, meta, shift, sequence }
|
|
1010
|
+
* @private
|
|
1011
|
+
*/
|
|
1012
|
+
_normalizeKey(key) {
|
|
1013
|
+
if (typeof key === 'string') {
|
|
1014
|
+
// Raw string input - interpret common sequences
|
|
1015
|
+
if (key === '\x1b') return { name: 'escape', ch: '', ctrl: false, meta: false, shift: false, sequence: '\x1b' };
|
|
1016
|
+
if (key === '\r' || key === '\n') return { name: 'return', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1017
|
+
if (key === '\x7f' || key === '\b') return { name: 'backspace', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1018
|
+
if (key === '\t') return { name: 'tab', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1019
|
+
if (key === ' ') return { name: '', ch: ' ', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1020
|
+
|
|
1021
|
+
// Arrow keys and special sequences
|
|
1022
|
+
if (key === '\x1b[A') return { name: 'up', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1023
|
+
if (key === '\x1b[B') return { name: 'down', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1024
|
+
if (key === '\x1b[C') return { name: 'right', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1025
|
+
if (key === '\x1b[D') return { name: 'left', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1026
|
+
if (key === '\x1b[5~') return { name: 'pageup', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1027
|
+
if (key === '\x1b[6~') return { name: 'pagedown', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1028
|
+
if (key === '\x1b[H' || key === '\x1b[1~') return { name: 'home', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1029
|
+
if (key === '\x1b[F' || key === '\x1b[4~') return { name: 'end', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1030
|
+
if (key === '\x1b[3~') return { name: 'delete', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1031
|
+
if (key === '\x1b[2~') return { name: 'insert', ch: '', ctrl: false, meta: false, shift: false, sequence: key };
|
|
1032
|
+
|
|
1033
|
+
// Ctrl+key (ASCII 1-26)
|
|
1034
|
+
const code = key.charCodeAt(0);
|
|
1035
|
+
if (code >= 1 && code <= 26) {
|
|
1036
|
+
return {
|
|
1037
|
+
name: '',
|
|
1038
|
+
ch: String.fromCharCode(code + 96), // ctrl-a = 1 -> 'a'
|
|
1039
|
+
ctrl: true,
|
|
1040
|
+
meta: false,
|
|
1041
|
+
shift: false,
|
|
1042
|
+
sequence: key
|
|
1043
|
+
};
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
// Regular printable character
|
|
1047
|
+
return { name: '', ch: key, ctrl: false, meta: false, shift: false, sequence: key };
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
// Object key input (readline-style)
|
|
1051
|
+
if (key && typeof key === 'object') {
|
|
1052
|
+
return {
|
|
1053
|
+
name: key.name || '',
|
|
1054
|
+
ch: key.ch || key.character || '',
|
|
1055
|
+
ctrl: !!key.ctrl,
|
|
1056
|
+
meta: !!key.meta,
|
|
1057
|
+
shift: !!key.shift,
|
|
1058
|
+
sequence: key.sequence || ''
|
|
1059
|
+
};
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
return { name: '', ch: '', ctrl: false, meta: false, shift: false, sequence: '' };
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
// =========================================================================
|
|
1066
|
+
// Scroll Control
|
|
1067
|
+
// =========================================================================
|
|
1068
|
+
|
|
1069
|
+
/**
|
|
1070
|
+
* Scroll up by the given number of lines.
|
|
1071
|
+
* Disables auto-follow when scrolling up.
|
|
1072
|
+
* @param {number} [lines=1] - Number of lines to scroll
|
|
1073
|
+
*/
|
|
1074
|
+
scrollUp(lines = 1) {
|
|
1075
|
+
if (lines < 1) return;
|
|
1076
|
+
this._autoFollow = false;
|
|
1077
|
+
this._scrollOffset = Math.min(
|
|
1078
|
+
this._scrollOffset + lines,
|
|
1079
|
+
Math.max(0, this._lines.length - 1) // Don't scroll beyond top
|
|
1080
|
+
);
|
|
1081
|
+
this._invalidateCache();
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Scroll down by the given number of lines.
|
|
1086
|
+
* Re-enables auto-follow when reaching the bottom.
|
|
1087
|
+
* @param {number} [lines=1] - Number of lines to scroll
|
|
1088
|
+
*/
|
|
1089
|
+
scrollDown(lines = 1) {
|
|
1090
|
+
if (lines < 1) return;
|
|
1091
|
+
this._scrollOffset = Math.max(0, this._scrollOffset - lines);
|
|
1092
|
+
if (this._scrollOffset === 0) {
|
|
1093
|
+
this._autoFollow = true;
|
|
1094
|
+
}
|
|
1095
|
+
this._invalidateCache();
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
/**
|
|
1099
|
+
* Scroll to the very top of the buffer.
|
|
1100
|
+
*/
|
|
1101
|
+
scrollToTop() {
|
|
1102
|
+
this._autoFollow = false;
|
|
1103
|
+
this._scrollOffset = Math.max(0, this._lines.length - 1);
|
|
1104
|
+
this._invalidateCache();
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
/**
|
|
1108
|
+
* Scroll to the bottom and resume auto-follow.
|
|
1109
|
+
*/
|
|
1110
|
+
scrollToBottom() {
|
|
1111
|
+
this._scrollOffset = 0;
|
|
1112
|
+
this._autoFollow = true;
|
|
1113
|
+
this._invalidateCache();
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
// =========================================================================
|
|
1117
|
+
// Interactive Mode
|
|
1118
|
+
// =========================================================================
|
|
1119
|
+
|
|
1120
|
+
/**
|
|
1121
|
+
* Enter interactive mode.
|
|
1122
|
+
* All subsequent keystrokes are forwarded to the screen session.
|
|
1123
|
+
*/
|
|
1124
|
+
enterInteractiveMode() {
|
|
1125
|
+
this._interactive = true;
|
|
1126
|
+
this._lastEscTime = 0;
|
|
1127
|
+
this._inputBuffer = '';
|
|
1128
|
+
|
|
1129
|
+
// Ensure we're at the bottom and following
|
|
1130
|
+
this.scrollToBottom();
|
|
1131
|
+
this._invalidateCache();
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Exit interactive mode.
|
|
1136
|
+
* Keystrokes resume normal TUI navigation.
|
|
1137
|
+
*/
|
|
1138
|
+
exitInteractiveMode() {
|
|
1139
|
+
this._interactive = false;
|
|
1140
|
+
this._lastEscTime = 0;
|
|
1141
|
+
this._inputBuffer = '';
|
|
1142
|
+
this._invalidateCache();
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Check if interactive mode is currently active.
|
|
1147
|
+
* @returns {boolean}
|
|
1148
|
+
*/
|
|
1149
|
+
isInteractive() {
|
|
1150
|
+
return this._interactive;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
// =========================================================================
|
|
1154
|
+
// Session Management
|
|
1155
|
+
// =========================================================================
|
|
1156
|
+
|
|
1157
|
+
/**
|
|
1158
|
+
* Set the screen session to attach to.
|
|
1159
|
+
* @param {string} sessionName - GNU Screen session name
|
|
1160
|
+
*/
|
|
1161
|
+
setSession(sessionName) {
|
|
1162
|
+
if (this.sessionName === sessionName) return;
|
|
1163
|
+
|
|
1164
|
+
this.sessionName = sessionName;
|
|
1165
|
+
this._lines = [];
|
|
1166
|
+
this._scrollOffset = 0;
|
|
1167
|
+
this._autoFollow = true;
|
|
1168
|
+
|
|
1169
|
+
if (this._capture) {
|
|
1170
|
+
this._capture.switchSession(sessionName);
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
this._checkSessionAlive();
|
|
1174
|
+
this._invalidateCache();
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Get the current session name.
|
|
1179
|
+
* @returns {string|null}
|
|
1180
|
+
*/
|
|
1181
|
+
getSessionName() {
|
|
1182
|
+
return this.sessionName;
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
/**
|
|
1186
|
+
* Check if the screen session is alive.
|
|
1187
|
+
* @returns {boolean}
|
|
1188
|
+
*/
|
|
1189
|
+
isSessionAlive() {
|
|
1190
|
+
return this._sessionAlive;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* Get session and capture statistics.
|
|
1195
|
+
* @returns {Object}
|
|
1196
|
+
*/
|
|
1197
|
+
getStats() {
|
|
1198
|
+
const captureStats = this._capture ? this._capture.getStats() : null;
|
|
1199
|
+
return {
|
|
1200
|
+
sessionName: this.sessionName,
|
|
1201
|
+
sessionAlive: this._sessionAlive,
|
|
1202
|
+
interactive: this._interactive,
|
|
1203
|
+
autoFollow: this._autoFollow,
|
|
1204
|
+
scrollOffset: this._scrollOffset,
|
|
1205
|
+
totalLines: this._lines.length,
|
|
1206
|
+
captureMethod: this._captureMethod,
|
|
1207
|
+
lastUpdate: this._lastUpdateTime,
|
|
1208
|
+
capture: captureStats
|
|
1209
|
+
};
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
// =========================================================================
|
|
1213
|
+
// Private Methods
|
|
1214
|
+
// =========================================================================
|
|
1215
|
+
|
|
1216
|
+
/**
|
|
1217
|
+
* Send text to the screen session.
|
|
1218
|
+
* @param {string} text - Text to send
|
|
1219
|
+
* @param {boolean} [pressEnter=false] - Whether to append Enter
|
|
1220
|
+
* @returns {boolean}
|
|
1221
|
+
* @private
|
|
1222
|
+
*/
|
|
1223
|
+
_sendToSession(text, pressEnter = false) {
|
|
1224
|
+
if (!this._capture) return false;
|
|
1225
|
+
return this._capture.sendInput(text, pressEnter);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* Send a special key to the screen session.
|
|
1230
|
+
* @param {string} keyName - Key name from LiveScreenCapture.KEY_MAP
|
|
1231
|
+
* @returns {boolean}
|
|
1232
|
+
* @private
|
|
1233
|
+
*/
|
|
1234
|
+
_sendKeyToSession(keyName) {
|
|
1235
|
+
if (!this._capture) return false;
|
|
1236
|
+
return this._capture.sendKey(keyName);
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
/**
|
|
1240
|
+
* Check if the session is alive and update status.
|
|
1241
|
+
* @private
|
|
1242
|
+
*/
|
|
1243
|
+
_checkSessionAlive() {
|
|
1244
|
+
if (this._capture && typeof this._capture.isSessionAlive === 'function') {
|
|
1245
|
+
this._sessionAlive = this._capture.isSessionAlive();
|
|
1246
|
+
} else if (LiveScreenCapture && this.sessionName) {
|
|
1247
|
+
this._sessionAlive = LiveScreenCapture.sessionExists(this.sessionName);
|
|
1248
|
+
} else {
|
|
1249
|
+
this._sessionAlive = false;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* Auto-discover a Claude screen session for the current project.
|
|
1255
|
+
* @private
|
|
1256
|
+
*/
|
|
1257
|
+
_discoverSession() {
|
|
1258
|
+
const now = Date.now();
|
|
1259
|
+
// Rate-limit discovery to once every 5 seconds
|
|
1260
|
+
if (now - this._lastDiscoveryTime < 5000) return;
|
|
1261
|
+
this._lastDiscoveryTime = now;
|
|
1262
|
+
|
|
1263
|
+
if (!LiveScreenCapture) return;
|
|
1264
|
+
|
|
1265
|
+
// Look for Claude sessions
|
|
1266
|
+
const sessions = LiveScreenCapture.findClaudeSessions();
|
|
1267
|
+
|
|
1268
|
+
if (sessions.length > 0) {
|
|
1269
|
+
// Prefer a session matching the project path
|
|
1270
|
+
const projectName = this.projectPath.split('/').filter(Boolean).pop();
|
|
1271
|
+
let bestSession = sessions[0];
|
|
1272
|
+
|
|
1273
|
+
for (const s of sessions) {
|
|
1274
|
+
if (projectName && s.name.includes(projectName)) {
|
|
1275
|
+
bestSession = s;
|
|
1276
|
+
break;
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
this._discoveredSession = bestSession.name;
|
|
1281
|
+
this.setSession(bestSession.name);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Invalidate the render cache, forcing a re-render on next call.
|
|
1287
|
+
* @private
|
|
1288
|
+
*/
|
|
1289
|
+
_invalidateCache() {
|
|
1290
|
+
this._cachedRows = null;
|
|
1291
|
+
this._lastRenderScroll = -1;
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
// ---------------------------------------------------------------------------
|
|
1296
|
+
// Exports
|
|
1297
|
+
// ---------------------------------------------------------------------------
|
|
1298
|
+
|
|
1299
|
+
module.exports = ClaudeLiveScreen;
|