codeseeker 1.4.0
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/LICENSE +21 -0
- package/README.md +388 -0
- package/bin/codeseeker.js +171 -0
- package/dist/cli/analyzers/change-analyzer.d.ts +7 -0
- package/dist/cli/analyzers/change-analyzer.d.ts.map +1 -0
- package/dist/cli/analyzers/change-analyzer.js +22 -0
- package/dist/cli/analyzers/change-analyzer.js.map +1 -0
- package/dist/cli/analyzers/configuration-analyzer.d.ts +7 -0
- package/dist/cli/analyzers/configuration-analyzer.d.ts.map +1 -0
- package/dist/cli/analyzers/configuration-analyzer.js +67 -0
- package/dist/cli/analyzers/configuration-analyzer.js.map +1 -0
- package/dist/cli/analyzers/documentation-analyzer.d.ts +7 -0
- package/dist/cli/analyzers/documentation-analyzer.d.ts.map +1 -0
- package/dist/cli/analyzers/documentation-analyzer.js +59 -0
- package/dist/cli/analyzers/documentation-analyzer.js.map +1 -0
- package/dist/cli/analyzers/project-structure-analyzer.d.ts +7 -0
- package/dist/cli/analyzers/project-structure-analyzer.d.ts.map +1 -0
- package/dist/cli/analyzers/project-structure-analyzer.js +68 -0
- package/dist/cli/analyzers/project-structure-analyzer.js.map +1 -0
- package/dist/cli/codemind-workflow-orchestrator.d.ts +19 -0
- package/dist/cli/codemind-workflow-orchestrator.d.ts.map +1 -0
- package/dist/cli/codemind-workflow-orchestrator.js +26 -0
- package/dist/cli/codemind-workflow-orchestrator.js.map +1 -0
- package/dist/cli/codeseeker-cli.d.ts +156 -0
- package/dist/cli/codeseeker-cli.d.ts.map +1 -0
- package/dist/cli/codeseeker-cli.js +937 -0
- package/dist/cli/codeseeker-cli.js.map +1 -0
- package/dist/cli/codeseeker-workflow-orchestrator.d.ts +19 -0
- package/dist/cli/codeseeker-workflow-orchestrator.d.ts.map +1 -0
- package/dist/cli/codeseeker-workflow-orchestrator.js +26 -0
- package/dist/cli/codeseeker-workflow-orchestrator.js.map +1 -0
- package/dist/cli/commands/base-command-handler.d.ts +31 -0
- package/dist/cli/commands/base-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/base-command-handler.js +110 -0
- package/dist/cli/commands/base-command-handler.js.map +1 -0
- package/dist/cli/commands/command-context.d.ts +27 -0
- package/dist/cli/commands/command-context.d.ts.map +1 -0
- package/dist/cli/commands/command-context.js +8 -0
- package/dist/cli/commands/command-context.js.map +1 -0
- package/dist/cli/commands/command-router.d.ts +135 -0
- package/dist/cli/commands/command-router.d.ts.map +1 -0
- package/dist/cli/commands/command-router.js +497 -0
- package/dist/cli/commands/command-router.js.map +1 -0
- package/dist/cli/commands/handlers/analyze-command-handler.d.ts +99 -0
- package/dist/cli/commands/handlers/analyze-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/analyze-command-handler.js +704 -0
- package/dist/cli/commands/handlers/analyze-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/dedup-command-handler.d.ts +10 -0
- package/dist/cli/commands/handlers/dedup-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/dedup-command-handler.js +19 -0
- package/dist/cli/commands/handlers/dedup-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/docs-command-handler.d.ts +10 -0
- package/dist/cli/commands/handlers/docs-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/docs-command-handler.js +19 -0
- package/dist/cli/commands/handlers/docs-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/infrastructure-setup-handler.d.ts +21 -0
- package/dist/cli/commands/handlers/infrastructure-setup-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/infrastructure-setup-handler.js +71 -0
- package/dist/cli/commands/handlers/infrastructure-setup-handler.js.map +1 -0
- package/dist/cli/commands/handlers/install-command-handler.d.ts +80 -0
- package/dist/cli/commands/handlers/install-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/install-command-handler.js +466 -0
- package/dist/cli/commands/handlers/install-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/instructions-command-handler.d.ts +10 -0
- package/dist/cli/commands/handlers/instructions-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/instructions-command-handler.js +19 -0
- package/dist/cli/commands/handlers/instructions-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/project-command-handler.d.ts +42 -0
- package/dist/cli/commands/handlers/project-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/project-command-handler.js +257 -0
- package/dist/cli/commands/handlers/project-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/search-command-handler.d.ts +50 -0
- package/dist/cli/commands/handlers/search-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/search-command-handler.js +500 -0
- package/dist/cli/commands/handlers/search-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/setup-command-handler.d.ts +103 -0
- package/dist/cli/commands/handlers/setup-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/setup-command-handler.js +1135 -0
- package/dist/cli/commands/handlers/setup-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/solid-command-handler.d.ts +10 -0
- package/dist/cli/commands/handlers/solid-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/solid-command-handler.js +19 -0
- package/dist/cli/commands/handlers/solid-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/sync-command-handler.d.ts +10 -0
- package/dist/cli/commands/handlers/sync-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/sync-command-handler.js +19 -0
- package/dist/cli/commands/handlers/sync-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/synonyms-command-handler.d.ts +23 -0
- package/dist/cli/commands/handlers/synonyms-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/synonyms-command-handler.js +201 -0
- package/dist/cli/commands/handlers/synonyms-command-handler.js.map +1 -0
- package/dist/cli/commands/handlers/watcher-command-handler.d.ts +10 -0
- package/dist/cli/commands/handlers/watcher-command-handler.d.ts.map +1 -0
- package/dist/cli/commands/handlers/watcher-command-handler.js +19 -0
- package/dist/cli/commands/handlers/watcher-command-handler.js.map +1 -0
- package/dist/cli/commands/reconcile.d.ts +8 -0
- package/dist/cli/commands/reconcile.d.ts.map +1 -0
- package/dist/cli/commands/reconcile.js +220 -0
- package/dist/cli/commands/reconcile.js.map +1 -0
- package/dist/cli/commands/semantic-search.d.ts +8 -0
- package/dist/cli/commands/semantic-search.d.ts.map +1 -0
- package/dist/cli/commands/semantic-search.js +219 -0
- package/dist/cli/commands/semantic-search.js.map +1 -0
- package/dist/cli/commands/services/claude-intent-analyzer.d.ts +109 -0
- package/dist/cli/commands/services/claude-intent-analyzer.d.ts.map +1 -0
- package/dist/cli/commands/services/claude-intent-analyzer.js +405 -0
- package/dist/cli/commands/services/claude-intent-analyzer.js.map +1 -0
- package/dist/cli/commands/services/context-aware-clarification-service.d.ts +99 -0
- package/dist/cli/commands/services/context-aware-clarification-service.d.ts.map +1 -0
- package/dist/cli/commands/services/context-aware-clarification-service.js +414 -0
- package/dist/cli/commands/services/context-aware-clarification-service.js.map +1 -0
- package/dist/cli/commands/services/context-builder.d.ts +90 -0
- package/dist/cli/commands/services/context-builder.d.ts.map +1 -0
- package/dist/cli/commands/services/context-builder.js +330 -0
- package/dist/cli/commands/services/context-builder.js.map +1 -0
- package/dist/cli/commands/services/graph-analysis-service.d.ts +157 -0
- package/dist/cli/commands/services/graph-analysis-service.d.ts.map +1 -0
- package/dist/cli/commands/services/graph-analysis-service.js +722 -0
- package/dist/cli/commands/services/graph-analysis-service.js.map +1 -0
- package/dist/cli/commands/services/natural-language-processor.d.ts +41 -0
- package/dist/cli/commands/services/natural-language-processor.d.ts.map +1 -0
- package/dist/cli/commands/services/natural-language-processor.js +77 -0
- package/dist/cli/commands/services/natural-language-processor.js.map +1 -0
- package/dist/cli/commands/services/search-quality-metrics.d.ts +85 -0
- package/dist/cli/commands/services/search-quality-metrics.d.ts.map +1 -0
- package/dist/cli/commands/services/search-quality-metrics.js +214 -0
- package/dist/cli/commands/services/search-quality-metrics.js.map +1 -0
- package/dist/cli/commands/services/semantic-search-orchestrator.d.ts +85 -0
- package/dist/cli/commands/services/semantic-search-orchestrator.d.ts.map +1 -0
- package/dist/cli/commands/services/semantic-search-orchestrator.js +331 -0
- package/dist/cli/commands/services/semantic-search-orchestrator.js.map +1 -0
- package/dist/cli/commands/services/task-decomposition-service.d.ts +114 -0
- package/dist/cli/commands/services/task-decomposition-service.d.ts.map +1 -0
- package/dist/cli/commands/services/task-decomposition-service.js +364 -0
- package/dist/cli/commands/services/task-decomposition-service.js.map +1 -0
- package/dist/cli/commands/services/unified-query-analyzer.d.ts +75 -0
- package/dist/cli/commands/services/unified-query-analyzer.d.ts.map +1 -0
- package/dist/cli/commands/services/unified-query-analyzer.js +282 -0
- package/dist/cli/commands/services/unified-query-analyzer.js.map +1 -0
- package/dist/cli/commands/services/user-interaction-service.d.ts +326 -0
- package/dist/cli/commands/services/user-interaction-service.d.ts.map +1 -0
- package/dist/cli/commands/services/user-interaction-service.js +1987 -0
- package/dist/cli/commands/services/user-interaction-service.js.map +1 -0
- package/dist/cli/commands/services/workflow-orchestrator.d.ts +171 -0
- package/dist/cli/commands/services/workflow-orchestrator.d.ts.map +1 -0
- package/dist/cli/commands/services/workflow-orchestrator.js +660 -0
- package/dist/cli/commands/services/workflow-orchestrator.js.map +1 -0
- package/dist/cli/context-optimizer.d.ts +96 -0
- package/dist/cli/context-optimizer.d.ts.map +1 -0
- package/dist/cli/context-optimizer.js +582 -0
- package/dist/cli/context-optimizer.js.map +1 -0
- package/dist/cli/features/code-graph/graph-builder.d.ts +119 -0
- package/dist/cli/features/code-graph/graph-builder.d.ts.map +1 -0
- package/dist/cli/features/code-graph/graph-builder.js +532 -0
- package/dist/cli/features/code-graph/graph-builder.js.map +1 -0
- package/dist/cli/features/compilation/verifier.d.ts +69 -0
- package/dist/cli/features/compilation/verifier.d.ts.map +1 -0
- package/dist/cli/features/compilation/verifier.js +431 -0
- package/dist/cli/features/compilation/verifier.js.map +1 -0
- package/dist/cli/features/database/database-documentation-generator.d.ts +103 -0
- package/dist/cli/features/database/database-documentation-generator.d.ts.map +1 -0
- package/dist/cli/features/database/database-documentation-generator.js +386 -0
- package/dist/cli/features/database/database-documentation-generator.js.map +1 -0
- package/dist/cli/features/database/database-schema-tool.d.ts +160 -0
- package/dist/cli/features/database/database-schema-tool.d.ts.map +1 -0
- package/dist/cli/features/database/database-schema-tool.js +437 -0
- package/dist/cli/features/database/database-schema-tool.js.map +1 -0
- package/dist/cli/features/documentation/map-analyzer.d.ts +95 -0
- package/dist/cli/features/documentation/map-analyzer.d.ts.map +1 -0
- package/dist/cli/features/documentation/map-analyzer.js +320 -0
- package/dist/cli/features/documentation/map-analyzer.js.map +1 -0
- package/dist/cli/features/duplication/detector.d.ts +28 -0
- package/dist/cli/features/duplication/detector.d.ts.map +1 -0
- package/dist/cli/features/duplication/detector.js +228 -0
- package/dist/cli/features/duplication/detector.js.map +1 -0
- package/dist/cli/features/duplication/interfaces/index.d.ts +134 -0
- package/dist/cli/features/duplication/interfaces/index.d.ts.map +1 -0
- package/dist/cli/features/duplication/interfaces/index.js +31 -0
- package/dist/cli/features/duplication/interfaces/index.js.map +1 -0
- package/dist/cli/features/duplication/services/duplication-detection-service.d.ts +27 -0
- package/dist/cli/features/duplication/services/duplication-detection-service.d.ts.map +1 -0
- package/dist/cli/features/duplication/services/duplication-detection-service.js +316 -0
- package/dist/cli/features/duplication/services/duplication-detection-service.js.map +1 -0
- package/dist/cli/features/duplication/services/file-analysis-service.d.ts +24 -0
- package/dist/cli/features/duplication/services/file-analysis-service.d.ts.map +1 -0
- package/dist/cli/features/duplication/services/file-analysis-service.js +340 -0
- package/dist/cli/features/duplication/services/file-analysis-service.js.map +1 -0
- package/dist/cli/features/duplication/services/refactoring-advisor-service.d.ts +33 -0
- package/dist/cli/features/duplication/services/refactoring-advisor-service.d.ts.map +1 -0
- package/dist/cli/features/duplication/services/refactoring-advisor-service.js +378 -0
- package/dist/cli/features/duplication/services/refactoring-advisor-service.js.map +1 -0
- package/dist/cli/features/duplication/services/statistics-service.d.ts +24 -0
- package/dist/cli/features/duplication/services/statistics-service.d.ts.map +1 -0
- package/dist/cli/features/duplication/services/statistics-service.js +285 -0
- package/dist/cli/features/duplication/services/statistics-service.js.map +1 -0
- package/dist/cli/features/semantic-graph/semantic-graph-tool.d.ts +38 -0
- package/dist/cli/features/semantic-graph/semantic-graph-tool.d.ts.map +1 -0
- package/dist/cli/features/semantic-graph/semantic-graph-tool.js +340 -0
- package/dist/cli/features/semantic-graph/semantic-graph-tool.js.map +1 -0
- package/dist/cli/features/solid-principles/analyzer.d.ts +40 -0
- package/dist/cli/features/solid-principles/analyzer.d.ts.map +1 -0
- package/dist/cli/features/solid-principles/analyzer.js +163 -0
- package/dist/cli/features/solid-principles/analyzer.js.map +1 -0
- package/dist/cli/features/tree-navigation/navigator.d.ts +23 -0
- package/dist/cli/features/tree-navigation/navigator.d.ts.map +1 -0
- package/dist/cli/features/tree-navigation/navigator.js +94 -0
- package/dist/cli/features/tree-navigation/navigator.js.map +1 -0
- package/dist/cli/git/change-detector.d.ts +61 -0
- package/dist/cli/git/change-detector.d.ts.map +1 -0
- package/dist/cli/git/change-detector.js +380 -0
- package/dist/cli/git/change-detector.js.map +1 -0
- package/dist/cli/git/git-commit-utils.d.ts +12 -0
- package/dist/cli/git/git-commit-utils.d.ts.map +1 -0
- package/dist/cli/git/git-commit-utils.js +210 -0
- package/dist/cli/git/git-commit-utils.js.map +1 -0
- package/dist/cli/git/git-database-utils.d.ts +10 -0
- package/dist/cli/git/git-database-utils.d.ts.map +1 -0
- package/dist/cli/git/git-database-utils.js +105 -0
- package/dist/cli/git/git-database-utils.js.map +1 -0
- package/dist/cli/git/git-integration.d.ts +53 -0
- package/dist/cli/git/git-integration.d.ts.map +1 -0
- package/dist/cli/git/git-integration.js +152 -0
- package/dist/cli/git/git-integration.js.map +1 -0
- package/dist/cli/git/in-memory-git-store.d.ts +10 -0
- package/dist/cli/git/in-memory-git-store.d.ts.map +1 -0
- package/dist/cli/git/in-memory-git-store.js +35 -0
- package/dist/cli/git/in-memory-git-store.js.map +1 -0
- package/dist/cli/git/interfaces.d.ts +82 -0
- package/dist/cli/git/interfaces.d.ts.map +1 -0
- package/dist/cli/git/interfaces.js +7 -0
- package/dist/cli/git/interfaces.js.map +1 -0
- package/dist/cli/git/services/git-analysis-service.d.ts +21 -0
- package/dist/cli/git/services/git-analysis-service.d.ts.map +1 -0
- package/dist/cli/git/services/git-analysis-service.js +169 -0
- package/dist/cli/git/services/git-analysis-service.js.map +1 -0
- package/dist/cli/git/services/git-autocommit-service.d.ts +19 -0
- package/dist/cli/git/services/git-autocommit-service.d.ts.map +1 -0
- package/dist/cli/git/services/git-autocommit-service.js +205 -0
- package/dist/cli/git/services/git-autocommit-service.js.map +1 -0
- package/dist/cli/git/services/git-database-service.d.ts +23 -0
- package/dist/cli/git/services/git-database-service.d.ts.map +1 -0
- package/dist/cli/git/services/git-database-service.js +255 -0
- package/dist/cli/git/services/git-database-service.js.map +1 -0
- package/dist/cli/git/services/git-operations-service.d.ts +22 -0
- package/dist/cli/git/services/git-operations-service.d.ts.map +1 -0
- package/dist/cli/git/services/git-operations-service.js +237 -0
- package/dist/cli/git/services/git-operations-service.js.map +1 -0
- package/dist/cli/integration/context-builder.d.ts +8 -0
- package/dist/cli/integration/context-builder.d.ts.map +1 -0
- package/dist/cli/integration/context-builder.js +103 -0
- package/dist/cli/integration/context-builder.js.map +1 -0
- package/dist/cli/integration/knowledge-base-updater.d.ts +12 -0
- package/dist/cli/integration/knowledge-base-updater.d.ts.map +1 -0
- package/dist/cli/integration/knowledge-base-updater.js +156 -0
- package/dist/cli/integration/knowledge-base-updater.js.map +1 -0
- package/dist/cli/integration/result-improver.d.ts +7 -0
- package/dist/cli/integration/result-improver.d.ts.map +1 -0
- package/dist/cli/integration/result-improver.js +26 -0
- package/dist/cli/integration/result-improver.js.map +1 -0
- package/dist/cli/integration/result-integrator.d.ts +7 -0
- package/dist/cli/integration/result-integrator.d.ts.map +1 -0
- package/dist/cli/integration/result-integrator.js +31 -0
- package/dist/cli/integration/result-integrator.js.map +1 -0
- package/dist/cli/integration/task-decomposer.d.ts +10 -0
- package/dist/cli/integration/task-decomposer.d.ts.map +1 -0
- package/dist/cli/integration/task-decomposer.js +32 -0
- package/dist/cli/integration/task-decomposer.js.map +1 -0
- package/dist/cli/integration/task-executor.d.ts +12 -0
- package/dist/cli/integration/task-executor.d.ts.map +1 -0
- package/dist/cli/integration/task-executor.js +76 -0
- package/dist/cli/integration/task-executor.js.map +1 -0
- package/dist/cli/knowledge/analyzers/interfaces.d.ts +55 -0
- package/dist/cli/knowledge/analyzers/interfaces.d.ts.map +1 -0
- package/dist/cli/knowledge/analyzers/interfaces.js +8 -0
- package/dist/cli/knowledge/analyzers/interfaces.js.map +1 -0
- package/dist/cli/knowledge/analyzers/semantic-analyzer.d.ts +27 -0
- package/dist/cli/knowledge/analyzers/semantic-analyzer.d.ts.map +1 -0
- package/dist/cli/knowledge/analyzers/semantic-analyzer.js +227 -0
- package/dist/cli/knowledge/analyzers/semantic-analyzer.js.map +1 -0
- package/dist/cli/knowledge/analyzers/services/ast-analysis-service.d.ts +23 -0
- package/dist/cli/knowledge/analyzers/services/ast-analysis-service.d.ts.map +1 -0
- package/dist/cli/knowledge/analyzers/services/ast-analysis-service.js +137 -0
- package/dist/cli/knowledge/analyzers/services/ast-analysis-service.js.map +1 -0
- package/dist/cli/knowledge/analyzers/services/file-discovery-service.d.ts +15 -0
- package/dist/cli/knowledge/analyzers/services/file-discovery-service.d.ts.map +1 -0
- package/dist/cli/knowledge/analyzers/services/file-discovery-service.js +110 -0
- package/dist/cli/knowledge/analyzers/services/file-discovery-service.js.map +1 -0
- package/dist/cli/knowledge/analyzers/services/pattern-detection-service.d.ts +21 -0
- package/dist/cli/knowledge/analyzers/services/pattern-detection-service.d.ts.map +1 -0
- package/dist/cli/knowledge/analyzers/services/pattern-detection-service.js +190 -0
- package/dist/cli/knowledge/analyzers/services/pattern-detection-service.js.map +1 -0
- package/dist/cli/knowledge/graph/knowledge-graph.d.ts +109 -0
- package/dist/cli/knowledge/graph/knowledge-graph.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/knowledge-graph.js +281 -0
- package/dist/cli/knowledge/graph/knowledge-graph.js.map +1 -0
- package/dist/cli/knowledge/graph/managers/graph-mutation-manager.d.ts +69 -0
- package/dist/cli/knowledge/graph/managers/graph-mutation-manager.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/managers/graph-mutation-manager.js +445 -0
- package/dist/cli/knowledge/graph/managers/graph-mutation-manager.js.map +1 -0
- package/dist/cli/knowledge/graph/managers/graph-query-manager.d.ts +86 -0
- package/dist/cli/knowledge/graph/managers/graph-query-manager.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/managers/graph-query-manager.js +306 -0
- package/dist/cli/knowledge/graph/managers/graph-query-manager.js.map +1 -0
- package/dist/cli/knowledge/graph/managers/graph-state-manager.d.ts +70 -0
- package/dist/cli/knowledge/graph/managers/graph-state-manager.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/managers/graph-state-manager.js +249 -0
- package/dist/cli/knowledge/graph/managers/graph-state-manager.js.map +1 -0
- package/dist/cli/knowledge/graph/managers/graph-traversal-manager.d.ts +72 -0
- package/dist/cli/knowledge/graph/managers/graph-traversal-manager.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/managers/graph-traversal-manager.js +414 -0
- package/dist/cli/knowledge/graph/managers/graph-traversal-manager.js.map +1 -0
- package/dist/cli/knowledge/graph/services/architectural-insight-detector.d.ts +43 -0
- package/dist/cli/knowledge/graph/services/architectural-insight-detector.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/services/architectural-insight-detector.js +536 -0
- package/dist/cli/knowledge/graph/services/architectural-insight-detector.js.map +1 -0
- package/dist/cli/knowledge/graph/services/graph-analyzer.d.ts +24 -0
- package/dist/cli/knowledge/graph/services/graph-analyzer.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/services/graph-analyzer.js +262 -0
- package/dist/cli/knowledge/graph/services/graph-analyzer.js.map +1 -0
- package/dist/cli/knowledge/graph/services/graph-database-service.d.ts +61 -0
- package/dist/cli/knowledge/graph/services/graph-database-service.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/services/graph-database-service.js +593 -0
- package/dist/cli/knowledge/graph/services/graph-database-service.js.map +1 -0
- package/dist/cli/knowledge/graph/services/graph-utility-service.d.ts +41 -0
- package/dist/cli/knowledge/graph/services/graph-utility-service.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/services/graph-utility-service.js +208 -0
- package/dist/cli/knowledge/graph/services/graph-utility-service.js.map +1 -0
- package/dist/cli/knowledge/graph/types.d.ts +272 -0
- package/dist/cli/knowledge/graph/types.d.ts.map +1 -0
- package/dist/cli/knowledge/graph/types.js +127 -0
- package/dist/cli/knowledge/graph/types.js.map +1 -0
- package/dist/cli/knowledge/repository/knowledge-repository.d.ts +121 -0
- package/dist/cli/knowledge/repository/knowledge-repository.d.ts.map +1 -0
- package/dist/cli/knowledge/repository/knowledge-repository.js +642 -0
- package/dist/cli/knowledge/repository/knowledge-repository.js.map +1 -0
- package/dist/cli/managers/claude-code-forwarder.d.ts +68 -0
- package/dist/cli/managers/claude-code-forwarder.d.ts.map +1 -0
- package/dist/cli/managers/claude-code-forwarder.js +214 -0
- package/dist/cli/managers/claude-code-forwarder.js.map +1 -0
- package/dist/cli/managers/command-processor.d.ts +75 -0
- package/dist/cli/managers/command-processor.d.ts.map +1 -0
- package/dist/cli/managers/command-processor.js +117 -0
- package/dist/cli/managers/command-processor.js.map +1 -0
- package/dist/cli/managers/database-manager.d.ts +147 -0
- package/dist/cli/managers/database-manager.d.ts.map +1 -0
- package/dist/cli/managers/database-manager.js +218 -0
- package/dist/cli/managers/database-manager.js.map +1 -0
- package/dist/cli/managers/interrupt-manager.d.ts +75 -0
- package/dist/cli/managers/interrupt-manager.d.ts.map +1 -0
- package/dist/cli/managers/interrupt-manager.js +197 -0
- package/dist/cli/managers/interrupt-manager.js.map +1 -0
- package/dist/cli/managers/project-manager.d.ts +82 -0
- package/dist/cli/managers/project-manager.d.ts.map +1 -0
- package/dist/cli/managers/project-manager.js +257 -0
- package/dist/cli/managers/project-manager.js.map +1 -0
- package/dist/cli/managers/user-interface.d.ts +74 -0
- package/dist/cli/managers/user-interface.d.ts.map +1 -0
- package/dist/cli/managers/user-interface.js +529 -0
- package/dist/cli/managers/user-interface.js.map +1 -0
- package/dist/cli/managers/workflow-orchestration-adapter.d.ts +24 -0
- package/dist/cli/managers/workflow-orchestration-adapter.d.ts.map +1 -0
- package/dist/cli/managers/workflow-orchestration-adapter.js +136 -0
- package/dist/cli/managers/workflow-orchestration-adapter.js.map +1 -0
- package/dist/cli/orchestration/cli-orchestrator.d.ts +92 -0
- package/dist/cli/orchestration/cli-orchestrator.d.ts.map +1 -0
- package/dist/cli/orchestration/cli-orchestrator.js +195 -0
- package/dist/cli/orchestration/cli-orchestrator.js.map +1 -0
- package/dist/cli/quality/compilation-checker.d.ts +13 -0
- package/dist/cli/quality/compilation-checker.d.ts.map +1 -0
- package/dist/cli/quality/compilation-checker.js +78 -0
- package/dist/cli/quality/compilation-checker.js.map +1 -0
- package/dist/cli/quality/interfaces/index.d.ts +104 -0
- package/dist/cli/quality/interfaces/index.d.ts.map +1 -0
- package/dist/cli/quality/interfaces/index.js +7 -0
- package/dist/cli/quality/interfaces/index.js.map +1 -0
- package/dist/cli/quality/interfaces.d.ts +79 -0
- package/dist/cli/quality/interfaces.d.ts.map +1 -0
- package/dist/cli/quality/interfaces.js +7 -0
- package/dist/cli/quality/interfaces.js.map +1 -0
- package/dist/cli/quality/quality-orchestrator.d.ts +19 -0
- package/dist/cli/quality/quality-orchestrator.d.ts.map +1 -0
- package/dist/cli/quality/quality-orchestrator.js +109 -0
- package/dist/cli/quality/quality-orchestrator.js.map +1 -0
- package/dist/cli/quality/services/architecture-service.d.ts +17 -0
- package/dist/cli/quality/services/architecture-service.d.ts.map +1 -0
- package/dist/cli/quality/services/architecture-service.js +267 -0
- package/dist/cli/quality/services/architecture-service.js.map +1 -0
- package/dist/cli/quality/services/compilation-service.d.ts +16 -0
- package/dist/cli/quality/services/compilation-service.d.ts.map +1 -0
- package/dist/cli/quality/services/compilation-service.js +177 -0
- package/dist/cli/quality/services/compilation-service.js.map +1 -0
- package/dist/cli/quality/services/quality-score-calculator.d.ts +12 -0
- package/dist/cli/quality/services/quality-score-calculator.d.ts.map +1 -0
- package/dist/cli/quality/services/quality-score-calculator.js +120 -0
- package/dist/cli/quality/services/quality-score-calculator.js.map +1 -0
- package/dist/cli/quality/services/security-service.d.ts +15 -0
- package/dist/cli/quality/services/security-service.d.ts.map +1 -0
- package/dist/cli/quality/services/security-service.js +214 -0
- package/dist/cli/quality/services/security-service.js.map +1 -0
- package/dist/cli/quality/services/testing-service.d.ts +19 -0
- package/dist/cli/quality/services/testing-service.d.ts.map +1 -0
- package/dist/cli/quality/services/testing-service.js +251 -0
- package/dist/cli/quality/services/testing-service.js.map +1 -0
- package/dist/cli/quality/test-runner.d.ts +15 -0
- package/dist/cli/quality/test-runner.d.ts.map +1 -0
- package/dist/cli/quality/test-runner.js +148 -0
- package/dist/cli/quality/test-runner.js.map +1 -0
- package/dist/cli/quality-checker.d.ts +41 -0
- package/dist/cli/quality-checker.d.ts.map +1 -0
- package/dist/cli/quality-checker.js +216 -0
- package/dist/cli/quality-checker.js.map +1 -0
- package/dist/cli/scripts/start-tool-api.d.ts +7 -0
- package/dist/cli/scripts/start-tool-api.d.ts.map +1 -0
- package/dist/cli/scripts/start-tool-api.js +44 -0
- package/dist/cli/scripts/start-tool-api.js.map +1 -0
- package/dist/cli/services/analysis/coding-patterns-analyzer.d.ts +78 -0
- package/dist/cli/services/analysis/coding-patterns-analyzer.d.ts.map +1 -0
- package/dist/cli/services/analysis/coding-patterns-analyzer.js +588 -0
- package/dist/cli/services/analysis/coding-patterns-analyzer.js.map +1 -0
- package/dist/cli/services/analysis/coding-standards-generator.d.ts +66 -0
- package/dist/cli/services/analysis/coding-standards-generator.d.ts.map +1 -0
- package/dist/cli/services/analysis/coding-standards-generator.js +223 -0
- package/dist/cli/services/analysis/coding-standards-generator.js.map +1 -0
- package/dist/cli/services/analysis/deduplication/code-consolidation-handler.d.ts +70 -0
- package/dist/cli/services/analysis/deduplication/code-consolidation-handler.d.ts.map +1 -0
- package/dist/cli/services/analysis/deduplication/code-consolidation-handler.js +326 -0
- package/dist/cli/services/analysis/deduplication/code-consolidation-handler.js.map +1 -0
- package/dist/cli/services/analysis/deduplication/dedup-detector.d.ts +77 -0
- package/dist/cli/services/analysis/deduplication/dedup-detector.d.ts.map +1 -0
- package/dist/cli/services/analysis/deduplication/dedup-detector.js +302 -0
- package/dist/cli/services/analysis/deduplication/dedup-detector.js.map +1 -0
- package/dist/cli/services/analysis/deduplication/deduplication-service.d.ts +107 -0
- package/dist/cli/services/analysis/deduplication/deduplication-service.d.ts.map +1 -0
- package/dist/cli/services/analysis/deduplication/deduplication-service.js +380 -0
- package/dist/cli/services/analysis/deduplication/deduplication-service.js.map +1 -0
- package/dist/cli/services/analysis/deduplication/duplicate-code-detector.d.ts +100 -0
- package/dist/cli/services/analysis/deduplication/duplicate-code-detector.d.ts.map +1 -0
- package/dist/cli/services/analysis/deduplication/duplicate-code-detector.js +406 -0
- package/dist/cli/services/analysis/deduplication/duplicate-code-detector.js.map +1 -0
- package/dist/cli/services/analysis/deduplication/hash-change-detector.d.ts +57 -0
- package/dist/cli/services/analysis/deduplication/hash-change-detector.d.ts.map +1 -0
- package/dist/cli/services/analysis/deduplication/hash-change-detector.js +185 -0
- package/dist/cli/services/analysis/deduplication/hash-change-detector.js.map +1 -0
- package/dist/cli/services/analysis/solid/solid-analyzer-service.d.ts +87 -0
- package/dist/cli/services/analysis/solid/solid-analyzer-service.d.ts.map +1 -0
- package/dist/cli/services/analysis/solid/solid-analyzer-service.js +426 -0
- package/dist/cli/services/analysis/solid/solid-analyzer-service.js.map +1 -0
- package/dist/cli/services/analysis/user-intentions/assumption-detector.d.ts +76 -0
- package/dist/cli/services/analysis/user-intentions/assumption-detector.d.ts.map +1 -0
- package/dist/cli/services/analysis/user-intentions/assumption-detector.js +394 -0
- package/dist/cli/services/analysis/user-intentions/assumption-detector.js.map +1 -0
- package/dist/cli/services/analysis/user-intentions/intent-analyzer.d.ts +41 -0
- package/dist/cli/services/analysis/user-intentions/intent-analyzer.d.ts.map +1 -0
- package/dist/cli/services/analysis/user-intentions/intent-analyzer.js +257 -0
- package/dist/cli/services/analysis/user-intentions/intent-analyzer.js.map +1 -0
- package/dist/cli/services/analysis/user-intentions/intention-clarification-service.d.ts +73 -0
- package/dist/cli/services/analysis/user-intentions/intention-clarification-service.d.ts.map +1 -0
- package/dist/cli/services/analysis/user-intentions/intention-clarification-service.js +246 -0
- package/dist/cli/services/analysis/user-intentions/intention-clarification-service.js.map +1 -0
- package/dist/cli/services/analysis/user-intentions/llm-intention-detector.d.ts +64 -0
- package/dist/cli/services/analysis/user-intentions/llm-intention-detector.d.ts.map +1 -0
- package/dist/cli/services/analysis/user-intentions/llm-intention-detector.js +269 -0
- package/dist/cli/services/analysis/user-intentions/llm-intention-detector.js.map +1 -0
- package/dist/cli/services/analysis/user-intentions/user-clarification-service.d.ts +52 -0
- package/dist/cli/services/analysis/user-intentions/user-clarification-service.d.ts.map +1 -0
- package/dist/cli/services/analysis/user-intentions/user-clarification-service.js +239 -0
- package/dist/cli/services/analysis/user-intentions/user-clarification-service.js.map +1 -0
- package/dist/cli/services/claude/claude-code-executor.d.ts +37 -0
- package/dist/cli/services/claude/claude-code-executor.d.ts.map +1 -0
- package/dist/cli/services/claude/claude-code-executor.js +190 -0
- package/dist/cli/services/claude/claude-code-executor.js.map +1 -0
- package/dist/cli/services/data/code-parsing/file-parser.d.ts +27 -0
- package/dist/cli/services/data/code-parsing/file-parser.d.ts.map +1 -0
- package/dist/cli/services/data/code-parsing/file-parser.js +336 -0
- package/dist/cli/services/data/code-parsing/file-parser.js.map +1 -0
- package/dist/cli/services/data/code-parsing/interfaces/index.d.ts +102 -0
- package/dist/cli/services/data/code-parsing/interfaces/index.d.ts.map +1 -0
- package/dist/cli/services/data/code-parsing/interfaces/index.js +7 -0
- package/dist/cli/services/data/code-parsing/interfaces/index.js.map +1 -0
- package/dist/cli/services/data/code-parsing/interfaces.d.ts +77 -0
- package/dist/cli/services/data/code-parsing/interfaces.d.ts.map +1 -0
- package/dist/cli/services/data/code-parsing/interfaces.js +7 -0
- package/dist/cli/services/data/code-parsing/interfaces.js.map +1 -0
- package/dist/cli/services/data/code-parsing/relationship-analyzer.d.ts +13 -0
- package/dist/cli/services/data/code-parsing/relationship-analyzer.d.ts.map +1 -0
- package/dist/cli/services/data/code-parsing/relationship-analyzer.js +118 -0
- package/dist/cli/services/data/code-parsing/relationship-analyzer.js.map +1 -0
- package/dist/cli/services/data/code-parsing/services/file-parsing-service.d.ts +21 -0
- package/dist/cli/services/data/code-parsing/services/file-parsing-service.d.ts.map +1 -0
- package/dist/cli/services/data/code-parsing/services/file-parsing-service.js +394 -0
- package/dist/cli/services/data/code-parsing/services/file-parsing-service.js.map +1 -0
- package/dist/cli/services/data/code-parsing/services/graph-population-service.d.ts +21 -0
- package/dist/cli/services/data/code-parsing/services/graph-population-service.d.ts.map +1 -0
- package/dist/cli/services/data/code-parsing/services/graph-population-service.js +426 -0
- package/dist/cli/services/data/code-parsing/services/graph-population-service.js.map +1 -0
- package/dist/cli/services/data/code-parsing/services/project-structure-service.d.ts +33 -0
- package/dist/cli/services/data/code-parsing/services/project-structure-service.d.ts.map +1 -0
- package/dist/cli/services/data/code-parsing/services/project-structure-service.js +310 -0
- package/dist/cli/services/data/code-parsing/services/project-structure-service.js.map +1 -0
- package/dist/cli/services/data/code-relationship-parser.d.ts +58 -0
- package/dist/cli/services/data/code-relationship-parser.d.ts.map +1 -0
- package/dist/cli/services/data/code-relationship-parser.js +204 -0
- package/dist/cli/services/data/code-relationship-parser.js.map +1 -0
- package/dist/cli/services/data/content-processing/content-processor.d.ts +141 -0
- package/dist/cli/services/data/content-processing/content-processor.d.ts.map +1 -0
- package/dist/cli/services/data/content-processing/content-processor.js +661 -0
- package/dist/cli/services/data/content-processing/content-processor.js.map +1 -0
- package/dist/cli/services/data/database/postgresql-initializer.d.ts +67 -0
- package/dist/cli/services/data/database/postgresql-initializer.d.ts.map +1 -0
- package/dist/cli/services/data/database/postgresql-initializer.js +612 -0
- package/dist/cli/services/data/database/postgresql-initializer.js.map +1 -0
- package/dist/cli/services/data/documentation-service.d.ts +123 -0
- package/dist/cli/services/data/documentation-service.d.ts.map +1 -0
- package/dist/cli/services/data/documentation-service.js +531 -0
- package/dist/cli/services/data/documentation-service.js.map +1 -0
- package/dist/cli/services/data/embedding/embedding-service.d.ts +67 -0
- package/dist/cli/services/data/embedding/embedding-service.d.ts.map +1 -0
- package/dist/cli/services/data/embedding/embedding-service.js +258 -0
- package/dist/cli/services/data/embedding/embedding-service.js.map +1 -0
- package/dist/cli/services/data/embedding/interfaces.d.ts +104 -0
- package/dist/cli/services/data/embedding/interfaces.d.ts.map +1 -0
- package/dist/cli/services/data/embedding/interfaces.js +8 -0
- package/dist/cli/services/data/embedding/interfaces.js.map +1 -0
- package/dist/cli/services/data/embedding/providers/local-provider.d.ts +15 -0
- package/dist/cli/services/data/embedding/providers/local-provider.d.ts.map +1 -0
- package/dist/cli/services/data/embedding/providers/local-provider.js +99 -0
- package/dist/cli/services/data/embedding/providers/local-provider.js.map +1 -0
- package/dist/cli/services/data/embedding/providers/openai-provider.d.ts +16 -0
- package/dist/cli/services/data/embedding/providers/openai-provider.d.ts.map +1 -0
- package/dist/cli/services/data/embedding/providers/openai-provider.js +70 -0
- package/dist/cli/services/data/embedding/providers/openai-provider.js.map +1 -0
- package/dist/cli/services/data/embedding/providers/xenova-provider.d.ts +17 -0
- package/dist/cli/services/data/embedding/providers/xenova-provider.d.ts.map +1 -0
- package/dist/cli/services/data/embedding/providers/xenova-provider.js +95 -0
- package/dist/cli/services/data/embedding/providers/xenova-provider.js.map +1 -0
- package/dist/cli/services/data/embedding/services/file-processor.d.ts +20 -0
- package/dist/cli/services/data/embedding/services/file-processor.d.ts.map +1 -0
- package/dist/cli/services/data/embedding/services/file-processor.js +306 -0
- package/dist/cli/services/data/embedding/services/file-processor.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/builders/node-builder.d.ts +54 -0
- package/dist/cli/services/data/semantic-graph/builders/node-builder.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/builders/node-builder.js +209 -0
- package/dist/cli/services/data/semantic-graph/builders/node-builder.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/builders/relationship-builder.d.ts +61 -0
- package/dist/cli/services/data/semantic-graph/builders/relationship-builder.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/builders/relationship-builder.js +316 -0
- package/dist/cli/services/data/semantic-graph/builders/relationship-builder.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/claude-code-proxy.d.ts +43 -0
- package/dist/cli/services/data/semantic-graph/claude-code-proxy.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/claude-code-proxy.js +296 -0
- package/dist/cli/services/data/semantic-graph/claude-code-proxy.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/code-relationship-orchestrator.d.ts +63 -0
- package/dist/cli/services/data/semantic-graph/code-relationship-orchestrator.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/code-relationship-orchestrator.js +340 -0
- package/dist/cli/services/data/semantic-graph/code-relationship-orchestrator.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/interfaces/index.d.ts +134 -0
- package/dist/cli/services/data/semantic-graph/interfaces/index.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/interfaces/index.js +7 -0
- package/dist/cli/services/data/semantic-graph/interfaces/index.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/language-detector.d.ts +60 -0
- package/dist/cli/services/data/semantic-graph/language-detector.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/language-detector.js +345 -0
- package/dist/cli/services/data/semantic-graph/language-detector.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/neo4j-graph-storage.d.ts +68 -0
- package/dist/cli/services/data/semantic-graph/neo4j-graph-storage.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/neo4j-graph-storage.js +298 -0
- package/dist/cli/services/data/semantic-graph/neo4j-graph-storage.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/csharp-parser.d.ts +19 -0
- package/dist/cli/services/data/semantic-graph/parsers/csharp-parser.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/csharp-parser.js +220 -0
- package/dist/cli/services/data/semantic-graph/parsers/csharp-parser.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/generic-parser.d.ts +20 -0
- package/dist/cli/services/data/semantic-graph/parsers/generic-parser.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/generic-parser.js +193 -0
- package/dist/cli/services/data/semantic-graph/parsers/generic-parser.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/go-parser.d.ts +20 -0
- package/dist/cli/services/data/semantic-graph/parsers/go-parser.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/go-parser.js +192 -0
- package/dist/cli/services/data/semantic-graph/parsers/go-parser.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/ilanguage-parser.d.ts +71 -0
- package/dist/cli/services/data/semantic-graph/parsers/ilanguage-parser.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/ilanguage-parser.js +35 -0
- package/dist/cli/services/data/semantic-graph/parsers/ilanguage-parser.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/java-parser.d.ts +18 -0
- package/dist/cli/services/data/semantic-graph/parsers/java-parser.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/java-parser.js +164 -0
- package/dist/cli/services/data/semantic-graph/parsers/java-parser.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/python-parser.d.ts +15 -0
- package/dist/cli/services/data/semantic-graph/parsers/python-parser.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/python-parser.js +172 -0
- package/dist/cli/services/data/semantic-graph/parsers/python-parser.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/tree-sitter-java-parser.d.ts +26 -0
- package/dist/cli/services/data/semantic-graph/parsers/tree-sitter-java-parser.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/tree-sitter-java-parser.js +312 -0
- package/dist/cli/services/data/semantic-graph/parsers/tree-sitter-java-parser.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/tree-sitter-python-parser.d.ts +29 -0
- package/dist/cli/services/data/semantic-graph/parsers/tree-sitter-python-parser.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/tree-sitter-python-parser.js +346 -0
- package/dist/cli/services/data/semantic-graph/parsers/tree-sitter-python-parser.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/typescript-parser.d.ts +19 -0
- package/dist/cli/services/data/semantic-graph/parsers/typescript-parser.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/parsers/typescript-parser.js +258 -0
- package/dist/cli/services/data/semantic-graph/parsers/typescript-parser.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/processors/index.d.ts +24 -0
- package/dist/cli/services/data/semantic-graph/processors/index.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/processors/index.js +153 -0
- package/dist/cli/services/data/semantic-graph/processors/index.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/semantic-graph.d.ts +75 -0
- package/dist/cli/services/data/semantic-graph/semantic-graph.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/semantic-graph.js +191 -0
- package/dist/cli/services/data/semantic-graph/semantic-graph.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/services/file-processing-service.d.ts +29 -0
- package/dist/cli/services/data/semantic-graph/services/file-processing-service.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/services/file-processing-service.js +175 -0
- package/dist/cli/services/data/semantic-graph/services/file-processing-service.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/services/graph-query-service.d.ts +34 -0
- package/dist/cli/services/data/semantic-graph/services/graph-query-service.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/services/graph-query-service.js +285 -0
- package/dist/cli/services/data/semantic-graph/services/graph-query-service.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/services/graph-storage-service.d.ts +35 -0
- package/dist/cli/services/data/semantic-graph/services/graph-storage-service.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/services/graph-storage-service.js +321 -0
- package/dist/cli/services/data/semantic-graph/services/graph-storage-service.js.map +1 -0
- package/dist/cli/services/data/semantic-graph/tree-sitter-semantic-builder.d.ts +85 -0
- package/dist/cli/services/data/semantic-graph/tree-sitter-semantic-builder.d.ts.map +1 -0
- package/dist/cli/services/data/semantic-graph/tree-sitter-semantic-builder.js +375 -0
- package/dist/cli/services/data/semantic-graph/tree-sitter-semantic-builder.js.map +1 -0
- package/dist/cli/services/integration/codemind-instruction-service.d.ts +76 -0
- package/dist/cli/services/integration/codemind-instruction-service.d.ts.map +1 -0
- package/dist/cli/services/integration/codemind-instruction-service.js +331 -0
- package/dist/cli/services/integration/codemind-instruction-service.js.map +1 -0
- package/dist/cli/services/integration/codeseeker-instruction-service.d.ts +82 -0
- package/dist/cli/services/integration/codeseeker-instruction-service.d.ts.map +1 -0
- package/dist/cli/services/integration/codeseeker-instruction-service.js +372 -0
- package/dist/cli/services/integration/codeseeker-instruction-service.js.map +1 -0
- package/dist/cli/services/integration/workflow-integration/claude-context-enhancer.d.ts +135 -0
- package/dist/cli/services/integration/workflow-integration/claude-context-enhancer.d.ts.map +1 -0
- package/dist/cli/services/integration/workflow-integration/claude-context-enhancer.js +298 -0
- package/dist/cli/services/integration/workflow-integration/claude-context-enhancer.js.map +1 -0
- package/dist/cli/services/llm/claude-llm-executor.d.ts +84 -0
- package/dist/cli/services/llm/claude-llm-executor.d.ts.map +1 -0
- package/dist/cli/services/llm/claude-llm-executor.js +448 -0
- package/dist/cli/services/llm/claude-llm-executor.js.map +1 -0
- package/dist/cli/services/llm/index.d.ts +41 -0
- package/dist/cli/services/llm/index.d.ts.map +1 -0
- package/dist/cli/services/llm/index.js +53 -0
- package/dist/cli/services/llm/index.js.map +1 -0
- package/dist/cli/services/llm/interfaces/index.d.ts +211 -0
- package/dist/cli/services/llm/interfaces/index.d.ts.map +1 -0
- package/dist/cli/services/llm/interfaces/index.js +15 -0
- package/dist/cli/services/llm/interfaces/index.js.map +1 -0
- package/dist/cli/services/llm/llm-executor-registry.d.ts +118 -0
- package/dist/cli/services/llm/llm-executor-registry.d.ts.map +1 -0
- package/dist/cli/services/llm/llm-executor-registry.js +226 -0
- package/dist/cli/services/llm/llm-executor-registry.js.map +1 -0
- package/dist/cli/services/llm/mock-llm-executor.d.ts +118 -0
- package/dist/cli/services/llm/mock-llm-executor.d.ts.map +1 -0
- package/dist/cli/services/llm/mock-llm-executor.js +324 -0
- package/dist/cli/services/llm/mock-llm-executor.js.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/configurable-exclusion-filter.d.ts +49 -0
- package/dist/cli/services/monitoring/file-scanning/configurable-exclusion-filter.d.ts.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/configurable-exclusion-filter.js +172 -0
- package/dist/cli/services/monitoring/file-scanning/configurable-exclusion-filter.js.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/directory-scanner.d.ts +12 -0
- package/dist/cli/services/monitoring/file-scanning/directory-scanner.d.ts.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/directory-scanner.js +126 -0
- package/dist/cli/services/monitoring/file-scanning/directory-scanner.js.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/file-scanner-interfaces.d.ts +33 -0
- package/dist/cli/services/monitoring/file-scanning/file-scanner-interfaces.d.ts.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/file-scanner-interfaces.js +7 -0
- package/dist/cli/services/monitoring/file-scanning/file-scanner-interfaces.js.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/file-type-detector.d.ts +17 -0
- package/dist/cli/services/monitoring/file-scanning/file-type-detector.d.ts.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/file-type-detector.js +109 -0
- package/dist/cli/services/monitoring/file-scanning/file-type-detector.js.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/index.d.ts +10 -0
- package/dist/cli/services/monitoring/file-scanning/index.d.ts.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/index.js +34 -0
- package/dist/cli/services/monitoring/file-scanning/index.js.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/project-file-scanner.d.ts +31 -0
- package/dist/cli/services/monitoring/file-scanning/project-file-scanner.d.ts.map +1 -0
- package/dist/cli/services/monitoring/file-scanning/project-file-scanner.js +52 -0
- package/dist/cli/services/monitoring/file-scanning/project-file-scanner.js.map +1 -0
- package/dist/cli/services/monitoring/file-watcher-service.d.ts +82 -0
- package/dist/cli/services/monitoring/file-watcher-service.d.ts.map +1 -0
- package/dist/cli/services/monitoring/file-watcher-service.js +314 -0
- package/dist/cli/services/monitoring/file-watcher-service.js.map +1 -0
- package/dist/cli/services/monitoring/initialization/initialization-status-tracker.d.ts +72 -0
- package/dist/cli/services/monitoring/initialization/initialization-status-tracker.d.ts.map +1 -0
- package/dist/cli/services/monitoring/initialization/initialization-status-tracker.js +242 -0
- package/dist/cli/services/monitoring/initialization/initialization-status-tracker.js.map +1 -0
- package/dist/cli/services/platform-detector.d.ts +41 -0
- package/dist/cli/services/platform-detector.d.ts.map +1 -0
- package/dist/cli/services/platform-detector.js +302 -0
- package/dist/cli/services/platform-detector.js.map +1 -0
- package/dist/cli/services/project/language-manager.d.ts +16 -0
- package/dist/cli/services/project/language-manager.d.ts.map +1 -0
- package/dist/cli/services/project/language-manager.js +149 -0
- package/dist/cli/services/project/language-manager.js.map +1 -0
- package/dist/cli/services/project/language-support-service.d.ts +63 -0
- package/dist/cli/services/project/language-support-service.d.ts.map +1 -0
- package/dist/cli/services/project/language-support-service.js +357 -0
- package/dist/cli/services/project/language-support-service.js.map +1 -0
- package/dist/cli/services/project/project-detector.d.ts +10 -0
- package/dist/cli/services/project/project-detector.d.ts.map +1 -0
- package/dist/cli/services/project/project-detector.js +92 -0
- package/dist/cli/services/project/project-detector.js.map +1 -0
- package/dist/cli/services/project/project-registry.d.ts +16 -0
- package/dist/cli/services/project/project-registry.d.ts.map +1 -0
- package/dist/cli/services/project/project-registry.js +103 -0
- package/dist/cli/services/project/project-registry.js.map +1 -0
- package/dist/cli/services/project-identity-service.d.ts +87 -0
- package/dist/cli/services/project-identity-service.d.ts.map +1 -0
- package/dist/cli/services/project-identity-service.js +332 -0
- package/dist/cli/services/project-identity-service.js.map +1 -0
- package/dist/cli/services/search/content-chunker.d.ts +23 -0
- package/dist/cli/services/search/content-chunker.d.ts.map +1 -0
- package/dist/cli/services/search/content-chunker.js +265 -0
- package/dist/cli/services/search/content-chunker.js.map +1 -0
- package/dist/cli/services/search/embedding-generator-adapter.d.ts +17 -0
- package/dist/cli/services/search/embedding-generator-adapter.d.ts.map +1 -0
- package/dist/cli/services/search/embedding-generator-adapter.js +61 -0
- package/dist/cli/services/search/embedding-generator-adapter.js.map +1 -0
- package/dist/cli/services/search/search-index-storage.d.ts +22 -0
- package/dist/cli/services/search/search-index-storage.d.ts.map +1 -0
- package/dist/cli/services/search/search-index-storage.js +154 -0
- package/dist/cli/services/search/search-index-storage.js.map +1 -0
- package/dist/cli/services/search/search-query-processor.d.ts +16 -0
- package/dist/cli/services/search/search-query-processor.d.ts.map +1 -0
- package/dist/cli/services/search/search-query-processor.js +125 -0
- package/dist/cli/services/search/search-query-processor.js.map +1 -0
- package/dist/cli/services/search/semantic-search.d.ts +86 -0
- package/dist/cli/services/search/semantic-search.d.ts.map +1 -0
- package/dist/cli/services/search/semantic-search.js +300 -0
- package/dist/cli/services/search/semantic-search.js.map +1 -0
- package/dist/cli/services/setup/container-detector.d.ts +15 -0
- package/dist/cli/services/setup/container-detector.d.ts.map +1 -0
- package/dist/cli/services/setup/container-detector.js +175 -0
- package/dist/cli/services/setup/container-detector.js.map +1 -0
- package/dist/cli/services/setup/container-manager.d.ts +14 -0
- package/dist/cli/services/setup/container-manager.d.ts.map +1 -0
- package/dist/cli/services/setup/container-manager.js +147 -0
- package/dist/cli/services/setup/container-manager.js.map +1 -0
- package/dist/cli/services/setup/database-initializer.d.ts +24 -0
- package/dist/cli/services/setup/database-initializer.d.ts.map +1 -0
- package/dist/cli/services/setup/database-initializer.js +291 -0
- package/dist/cli/services/setup/database-initializer.js.map +1 -0
- package/dist/cli/services/setup/interfaces/setup-interfaces.d.ts +72 -0
- package/dist/cli/services/setup/interfaces/setup-interfaces.d.ts.map +1 -0
- package/dist/cli/services/setup/interfaces/setup-interfaces.js +7 -0
- package/dist/cli/services/setup/interfaces/setup-interfaces.js.map +1 -0
- package/dist/cli/services/setup/prerequisite-checker.d.ts +10 -0
- package/dist/cli/services/setup/prerequisite-checker.d.ts.map +1 -0
- package/dist/cli/services/setup/prerequisite-checker.js +119 -0
- package/dist/cli/services/setup/prerequisite-checker.js.map +1 -0
- package/dist/cli/services/setup/setup-orchestrator.d.ts +27 -0
- package/dist/cli/services/setup/setup-orchestrator.d.ts.map +1 -0
- package/dist/cli/services/setup/setup-orchestrator.js +230 -0
- package/dist/cli/services/setup/setup-orchestrator.js.map +1 -0
- package/dist/cli/services/setup/setup-reporter.d.ts +14 -0
- package/dist/cli/services/setup/setup-reporter.d.ts.map +1 -0
- package/dist/cli/services/setup/setup-reporter.js +143 -0
- package/dist/cli/services/setup/setup-reporter.js.map +1 -0
- package/dist/cli/services/setup/setup-service-factory.d.ts +19 -0
- package/dist/cli/services/setup/setup-service-factory.d.ts.map +1 -0
- package/dist/cli/services/setup/setup-service-factory.js +43 -0
- package/dist/cli/services/setup/setup-service-factory.js.map +1 -0
- package/dist/cli/services/setup/unified-database-initializer.d.ts +61 -0
- package/dist/cli/services/setup/unified-database-initializer.d.ts.map +1 -0
- package/dist/cli/services/setup/unified-database-initializer.js +264 -0
- package/dist/cli/services/setup/unified-database-initializer.js.map +1 -0
- package/dist/cli/task-splitter.d.ts +59 -0
- package/dist/cli/task-splitter.d.ts.map +1 -0
- package/dist/cli/task-splitter.js +556 -0
- package/dist/cli/task-splitter.js.map +1 -0
- package/dist/cli/tools/context-optimizer-tool.d.ts +25 -0
- package/dist/cli/tools/context-optimizer-tool.d.ts.map +1 -0
- package/dist/cli/tools/context-optimizer-tool.js +169 -0
- package/dist/cli/tools/context-optimizer-tool.js.map +1 -0
- package/dist/cli/ui/theme.d.ts +148 -0
- package/dist/cli/ui/theme.d.ts.map +1 -0
- package/dist/cli/ui/theme.js +302 -0
- package/dist/cli/ui/theme.js.map +1 -0
- package/dist/cli/ui/welcome-display.d.ts +20 -0
- package/dist/cli/ui/welcome-display.d.ts.map +1 -0
- package/dist/cli/ui/welcome-display.js +50 -0
- package/dist/cli/ui/welcome-display.js.map +1 -0
- package/dist/cli/workflow/interfaces/index.d.ts +191 -0
- package/dist/cli/workflow/interfaces/index.d.ts.map +1 -0
- package/dist/cli/workflow/interfaces/index.js +7 -0
- package/dist/cli/workflow/interfaces/index.js.map +1 -0
- package/dist/cli/workflow/services/context-gathering-service.d.ts +23 -0
- package/dist/cli/workflow/services/context-gathering-service.d.ts.map +1 -0
- package/dist/cli/workflow/services/context-gathering-service.js +145 -0
- package/dist/cli/workflow/services/context-gathering-service.js.map +1 -0
- package/dist/cli/workflow/services/database-sync-service.d.ts +63 -0
- package/dist/cli/workflow/services/database-sync-service.d.ts.map +1 -0
- package/dist/cli/workflow/services/database-sync-service.js +250 -0
- package/dist/cli/workflow/services/database-sync-service.js.map +1 -0
- package/dist/cli/workflow/services/git-workflow-service.d.ts +29 -0
- package/dist/cli/workflow/services/git-workflow-service.d.ts.map +1 -0
- package/dist/cli/workflow/services/git-workflow-service.js +226 -0
- package/dist/cli/workflow/services/git-workflow-service.js.map +1 -0
- package/dist/cli/workflow/services/intent-analysis-service.d.ts +20 -0
- package/dist/cli/workflow/services/intent-analysis-service.d.ts.map +1 -0
- package/dist/cli/workflow/services/intent-analysis-service.js +137 -0
- package/dist/cli/workflow/services/intent-analysis-service.js.map +1 -0
- package/dist/cli/workflow/services/quality-assurance-service.d.ts +41 -0
- package/dist/cli/workflow/services/quality-assurance-service.d.ts.map +1 -0
- package/dist/cli/workflow/services/quality-assurance-service.js +341 -0
- package/dist/cli/workflow/services/quality-assurance-service.js.map +1 -0
- package/dist/cli/workflow/services/task-orchestration-service.d.ts +31 -0
- package/dist/cli/workflow/services/task-orchestration-service.d.ts.map +1 -0
- package/dist/cli/workflow/services/task-orchestration-service.js +254 -0
- package/dist/cli/workflow/services/task-orchestration-service.js.map +1 -0
- package/dist/cli/workflow/workflow-orchestrator.d.ts +47 -0
- package/dist/cli/workflow/workflow-orchestrator.d.ts.map +1 -0
- package/dist/cli/workflow/workflow-orchestrator.js +248 -0
- package/dist/cli/workflow/workflow-orchestrator.js.map +1 -0
- package/dist/config/database-config.d.ts +40 -0
- package/dist/config/database-config.d.ts.map +1 -0
- package/dist/config/database-config.js +192 -0
- package/dist/config/database-config.js.map +1 -0
- package/dist/core/factories/command-service-factory.d.ts +26 -0
- package/dist/core/factories/command-service-factory.d.ts.map +1 -0
- package/dist/core/factories/command-service-factory.js +72 -0
- package/dist/core/factories/command-service-factory.js.map +1 -0
- package/dist/core/factories/error-factory.d.ts +19 -0
- package/dist/core/factories/error-factory.d.ts.map +1 -0
- package/dist/core/factories/error-factory.js +100 -0
- package/dist/core/factories/error-factory.js.map +1 -0
- package/dist/core/factories/error-handling-factory.d.ts +33 -0
- package/dist/core/factories/error-handling-factory.d.ts.map +1 -0
- package/dist/core/factories/error-handling-factory.js +59 -0
- package/dist/core/factories/error-handling-factory.js.map +1 -0
- package/dist/core/factories/project-service-factory.d.ts +38 -0
- package/dist/core/factories/project-service-factory.d.ts.map +1 -0
- package/dist/core/factories/project-service-factory.js +66 -0
- package/dist/core/factories/project-service-factory.js.map +1 -0
- package/dist/core/factories/search-service-factory.d.ts +42 -0
- package/dist/core/factories/search-service-factory.d.ts.map +1 -0
- package/dist/core/factories/search-service-factory.js +76 -0
- package/dist/core/factories/search-service-factory.js.map +1 -0
- package/dist/core/interfaces/command-interfaces.d.ts +82 -0
- package/dist/core/interfaces/command-interfaces.d.ts.map +1 -0
- package/dist/core/interfaces/command-interfaces.js +7 -0
- package/dist/core/interfaces/command-interfaces.js.map +1 -0
- package/dist/core/interfaces/error-interfaces.d.ts +95 -0
- package/dist/core/interfaces/error-interfaces.d.ts.map +1 -0
- package/dist/core/interfaces/error-interfaces.js +8 -0
- package/dist/core/interfaces/error-interfaces.js.map +1 -0
- package/dist/core/interfaces/orchestrator-interfaces.d.ts +62 -0
- package/dist/core/interfaces/orchestrator-interfaces.d.ts.map +1 -0
- package/dist/core/interfaces/orchestrator-interfaces.js +8 -0
- package/dist/core/interfaces/orchestrator-interfaces.js.map +1 -0
- package/dist/core/interfaces/project-interfaces.d.ts +57 -0
- package/dist/core/interfaces/project-interfaces.d.ts.map +1 -0
- package/dist/core/interfaces/project-interfaces.js +7 -0
- package/dist/core/interfaces/project-interfaces.js.map +1 -0
- package/dist/core/interfaces/search-interfaces.d.ts +76 -0
- package/dist/core/interfaces/search-interfaces.d.ts.map +1 -0
- package/dist/core/interfaces/search-interfaces.js +6 -0
- package/dist/core/interfaces/search-interfaces.js.map +1 -0
- package/dist/core/interfaces.d.ts +109 -0
- package/dist/core/interfaces.d.ts.map +1 -0
- package/dist/core/interfaces.js +6 -0
- package/dist/core/interfaces.js.map +1 -0
- package/dist/core/services/error-handler.d.ts +33 -0
- package/dist/core/services/error-handler.d.ts.map +1 -0
- package/dist/core/services/error-handler.js +187 -0
- package/dist/core/services/error-handler.js.map +1 -0
- package/dist/core/types.d.ts +197 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +89 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/utils/error-utils.d.ts +36 -0
- package/dist/core/utils/error-utils.d.ts.map +1 -0
- package/dist/core/utils/error-utils.js +173 -0
- package/dist/core/utils/error-utils.js.map +1 -0
- package/dist/database/adapters/base.d.ts +88 -0
- package/dist/database/adapters/base.d.ts.map +1 -0
- package/dist/database/adapters/base.js +27 -0
- package/dist/database/adapters/base.js.map +1 -0
- package/dist/database/adapters/interfaces.d.ts +64 -0
- package/dist/database/adapters/interfaces.d.ts.map +1 -0
- package/dist/database/adapters/interfaces.js +7 -0
- package/dist/database/adapters/interfaces.js.map +1 -0
- package/dist/database/adapters/postgresql.d.ts +54 -0
- package/dist/database/adapters/postgresql.d.ts.map +1 -0
- package/dist/database/adapters/postgresql.js +838 -0
- package/dist/database/adapters/postgresql.js.map +1 -0
- package/dist/database/adapters/services/connection-manager.d.ts +22 -0
- package/dist/database/adapters/services/connection-manager.d.ts.map +1 -0
- package/dist/database/adapters/services/connection-manager.js +107 -0
- package/dist/database/adapters/services/connection-manager.js.map +1 -0
- package/dist/database/adapters/services/project-service.d.ts +22 -0
- package/dist/database/adapters/services/project-service.d.ts.map +1 -0
- package/dist/database/adapters/services/project-service.js +193 -0
- package/dist/database/adapters/services/project-service.js.map +1 -0
- package/dist/database/database.d.ts +71 -0
- package/dist/database/database.d.ts.map +1 -0
- package/dist/database/database.js +312 -0
- package/dist/database/database.js.map +1 -0
- package/dist/database/factory.d.ts +10 -0
- package/dist/database/factory.d.ts.map +1 -0
- package/dist/database/factory.js +38 -0
- package/dist/database/factory.js.map +1 -0
- package/dist/database/migrations/002_phase2_features.d.ts +24 -0
- package/dist/database/migrations/002_phase2_features.d.ts.map +1 -0
- package/dist/database/migrations/002_phase2_features.js +224 -0
- package/dist/database/migrations/002_phase2_features.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +58 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/claude/claude-cli-integration.d.ts +85 -0
- package/dist/integrations/claude/claude-cli-integration.d.ts.map +1 -0
- package/dist/integrations/claude/claude-cli-integration.js +278 -0
- package/dist/integrations/claude/claude-cli-integration.js.map +1 -0
- package/dist/integrations/claude/conversation-manager.d.ts +81 -0
- package/dist/integrations/claude/conversation-manager.d.ts.map +1 -0
- package/dist/integrations/claude/conversation-manager.js +378 -0
- package/dist/integrations/claude/conversation-manager.js.map +1 -0
- package/dist/integrations/claude/interceptor.d.ts +75 -0
- package/dist/integrations/claude/interceptor.d.ts.map +1 -0
- package/dist/integrations/claude/interceptor.js +173 -0
- package/dist/integrations/claude/interceptor.js.map +1 -0
- package/dist/integrations/claude/interfaces/index.d.ts +128 -0
- package/dist/integrations/claude/interfaces/index.d.ts.map +1 -0
- package/dist/integrations/claude/interfaces/index.js +7 -0
- package/dist/integrations/claude/interfaces/index.js.map +1 -0
- package/dist/integrations/claude/outcome-analyzer.d.ts +90 -0
- package/dist/integrations/claude/outcome-analyzer.d.ts.map +1 -0
- package/dist/integrations/claude/outcome-analyzer.js +394 -0
- package/dist/integrations/claude/outcome-analyzer.js.map +1 -0
- package/dist/integrations/claude/services/claude-execution-service.d.ts +26 -0
- package/dist/integrations/claude/services/claude-execution-service.d.ts.map +1 -0
- package/dist/integrations/claude/services/claude-execution-service.js +136 -0
- package/dist/integrations/claude/services/claude-execution-service.js.map +1 -0
- package/dist/integrations/claude/services/claude-response-parser.d.ts +30 -0
- package/dist/integrations/claude/services/claude-response-parser.d.ts.map +1 -0
- package/dist/integrations/claude/services/claude-response-parser.js +235 -0
- package/dist/integrations/claude/services/claude-response-parser.js.map +1 -0
- package/dist/integrations/claude/services/project-analysis-service.d.ts +22 -0
- package/dist/integrations/claude/services/project-analysis-service.d.ts.map +1 -0
- package/dist/integrations/claude/services/project-analysis-service.js +298 -0
- package/dist/integrations/claude/services/project-analysis-service.js.map +1 -0
- package/dist/integrations/claude/services/project-context-builder.d.ts +34 -0
- package/dist/integrations/claude/services/project-context-builder.d.ts.map +1 -0
- package/dist/integrations/claude/services/project-context-builder.js +304 -0
- package/dist/integrations/claude/services/project-context-builder.js.map +1 -0
- package/dist/integrations/claude/services/prompt-processing-service.d.ts +24 -0
- package/dist/integrations/claude/services/prompt-processing-service.d.ts.map +1 -0
- package/dist/integrations/claude/services/prompt-processing-service.js +266 -0
- package/dist/integrations/claude/services/prompt-processing-service.js.map +1 -0
- package/dist/integrations/claude/services/request-processing-service.d.ts +34 -0
- package/dist/integrations/claude/services/request-processing-service.d.ts.map +1 -0
- package/dist/integrations/claude/services/request-processing-service.js +254 -0
- package/dist/integrations/claude/services/request-processing-service.js.map +1 -0
- package/dist/integrations/claude/services/session-management-service.d.ts +49 -0
- package/dist/integrations/claude/services/session-management-service.d.ts.map +1 -0
- package/dist/integrations/claude/services/session-management-service.js +214 -0
- package/dist/integrations/claude/services/session-management-service.js.map +1 -0
- package/dist/mcp/index.d.ts +8 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +13 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/indexing-service.d.ts +137 -0
- package/dist/mcp/indexing-service.d.ts.map +1 -0
- package/dist/mcp/indexing-service.js +961 -0
- package/dist/mcp/indexing-service.js.map +1 -0
- package/dist/mcp/mcp-server.d.ts +100 -0
- package/dist/mcp/mcp-server.d.ts.map +1 -0
- package/dist/mcp/mcp-server.js +1827 -0
- package/dist/mcp/mcp-server.js.map +1 -0
- package/dist/orchestrator/claude-tool-orchestrator.d.ts +128 -0
- package/dist/orchestrator/claude-tool-orchestrator.d.ts.map +1 -0
- package/dist/orchestrator/claude-tool-orchestrator.js +490 -0
- package/dist/orchestrator/claude-tool-orchestrator.js.map +1 -0
- package/dist/orchestrator/intelligent-task-orchestrator.d.ts +131 -0
- package/dist/orchestrator/intelligent-task-orchestrator.d.ts.map +1 -0
- package/dist/orchestrator/intelligent-task-orchestrator.js +493 -0
- package/dist/orchestrator/intelligent-task-orchestrator.js.map +1 -0
- package/dist/orchestrator/interfaces.d.ts +59 -0
- package/dist/orchestrator/interfaces.d.ts.map +1 -0
- package/dist/orchestrator/interfaces.js +7 -0
- package/dist/orchestrator/interfaces.js.map +1 -0
- package/dist/orchestrator/messaging/redis-messaging.d.ts +84 -0
- package/dist/orchestrator/messaging/redis-messaging.d.ts.map +1 -0
- package/dist/orchestrator/messaging/redis-messaging.js +384 -0
- package/dist/orchestrator/messaging/redis-messaging.js.map +1 -0
- package/dist/orchestrator/messaging/redis-queue.d.ts +89 -0
- package/dist/orchestrator/messaging/redis-queue.d.ts.map +1 -0
- package/dist/orchestrator/messaging/redis-queue.js +243 -0
- package/dist/orchestrator/messaging/redis-queue.js.map +1 -0
- package/dist/orchestrator/semantic-orchestrator.d.ts +43 -0
- package/dist/orchestrator/semantic-orchestrator.d.ts.map +1 -0
- package/dist/orchestrator/semantic-orchestrator.js +285 -0
- package/dist/orchestrator/semantic-orchestrator.js.map +1 -0
- package/dist/orchestrator/sequential-workflow-orchestrator.d.ts +128 -0
- package/dist/orchestrator/sequential-workflow-orchestrator.d.ts.map +1 -0
- package/dist/orchestrator/sequential-workflow-orchestrator.js +406 -0
- package/dist/orchestrator/sequential-workflow-orchestrator.js.map +1 -0
- package/dist/orchestrator/services/code-duplications-service.d.ts +14 -0
- package/dist/orchestrator/services/code-duplications-service.d.ts.map +1 -0
- package/dist/orchestrator/services/code-duplications-service.js +116 -0
- package/dist/orchestrator/services/code-duplications-service.js.map +1 -0
- package/dist/orchestrator/services/database-connection-service.d.ts +14 -0
- package/dist/orchestrator/services/database-connection-service.d.ts.map +1 -0
- package/dist/orchestrator/services/database-connection-service.js +46 -0
- package/dist/orchestrator/services/database-connection-service.js.map +1 -0
- package/dist/orchestrator/services/semantic-search-service.d.ts +15 -0
- package/dist/orchestrator/services/semantic-search-service.d.ts.map +1 -0
- package/dist/orchestrator/services/semantic-search-service.js +154 -0
- package/dist/orchestrator/services/semantic-search-service.js.map +1 -0
- package/dist/orchestrator/services/tool-data-service.d.ts +14 -0
- package/dist/orchestrator/services/tool-data-service.d.ts.map +1 -0
- package/dist/orchestrator/services/tool-data-service.js +76 -0
- package/dist/orchestrator/services/tool-data-service.js.map +1 -0
- package/dist/orchestrator/tool-database-api.d.ts +47 -0
- package/dist/orchestrator/tool-database-api.d.ts.map +1 -0
- package/dist/orchestrator/tool-database-api.js +200 -0
- package/dist/orchestrator/tool-database-api.js.map +1 -0
- package/dist/orchestrator/types.d.ts +98 -0
- package/dist/orchestrator/types.d.ts.map +1 -0
- package/dist/orchestrator/types.js +6 -0
- package/dist/orchestrator/types.js.map +1 -0
- package/dist/orchestrator/workflow-definitions.d.ts +9 -0
- package/dist/orchestrator/workflow-definitions.d.ts.map +1 -0
- package/dist/orchestrator/workflow-definitions.js +169 -0
- package/dist/orchestrator/workflow-definitions.js.map +1 -0
- package/dist/orchestrator/workflow-visualizer.d.ts +54 -0
- package/dist/orchestrator/workflow-visualizer.d.ts.map +1 -0
- package/dist/orchestrator/workflow-visualizer.js +355 -0
- package/dist/orchestrator/workflow-visualizer.js.map +1 -0
- package/dist/services/managers/quality-manager.d.ts +108 -0
- package/dist/services/managers/quality-manager.d.ts.map +1 -0
- package/dist/services/managers/quality-manager.js +763 -0
- package/dist/services/managers/quality-manager.js.map +1 -0
- package/dist/services/managers/sync-manager.d.ts +106 -0
- package/dist/services/managers/sync-manager.d.ts.map +1 -0
- package/dist/services/managers/sync-manager.js +573 -0
- package/dist/services/managers/sync-manager.js.map +1 -0
- package/dist/shared/analysis-repository-consolidated.d.ts +155 -0
- package/dist/shared/analysis-repository-consolidated.d.ts.map +1 -0
- package/dist/shared/analysis-repository-consolidated.js +587 -0
- package/dist/shared/analysis-repository-consolidated.js.map +1 -0
- package/dist/shared/analysis-repository.d.ts +48 -0
- package/dist/shared/analysis-repository.d.ts.map +1 -0
- package/dist/shared/analysis-repository.js +183 -0
- package/dist/shared/analysis-repository.js.map +1 -0
- package/dist/shared/analytics-export-pipeline.d.ts +32 -0
- package/dist/shared/analytics-export-pipeline.d.ts.map +1 -0
- package/dist/shared/analytics-export-pipeline.js +307 -0
- package/dist/shared/analytics-export-pipeline.js.map +1 -0
- package/dist/shared/ast/analyzer.d.ts +59 -0
- package/dist/shared/ast/analyzer.d.ts.map +1 -0
- package/dist/shared/ast/analyzer.js +202 -0
- package/dist/shared/ast/analyzer.js.map +1 -0
- package/dist/shared/change-assessment-system.d.ts +111 -0
- package/dist/shared/change-assessment-system.d.ts.map +1 -0
- package/dist/shared/change-assessment-system.js +465 -0
- package/dist/shared/change-assessment-system.js.map +1 -0
- package/dist/shared/codebase-analyzer.d.ts +41 -0
- package/dist/shared/codebase-analyzer.d.ts.map +1 -0
- package/dist/shared/codebase-analyzer.js +60 -0
- package/dist/shared/codebase-analyzer.js.map +1 -0
- package/dist/shared/codemind-memory-system.d.ts +75 -0
- package/dist/shared/codemind-memory-system.d.ts.map +1 -0
- package/dist/shared/codemind-memory-system.js +222 -0
- package/dist/shared/codemind-memory-system.js.map +1 -0
- package/dist/shared/codeseeker-memory-system.d.ts +75 -0
- package/dist/shared/codeseeker-memory-system.d.ts.map +1 -0
- package/dist/shared/codeseeker-memory-system.js +222 -0
- package/dist/shared/codeseeker-memory-system.js.map +1 -0
- package/dist/shared/comprehensive-impact-analyzer.d.ts +94 -0
- package/dist/shared/comprehensive-impact-analyzer.d.ts.map +1 -0
- package/dist/shared/comprehensive-impact-analyzer.js +534 -0
- package/dist/shared/comprehensive-impact-analyzer.js.map +1 -0
- package/dist/shared/context-provider.d.ts +110 -0
- package/dist/shared/context-provider.d.ts.map +1 -0
- package/dist/shared/context-provider.js +392 -0
- package/dist/shared/context-provider.js.map +1 -0
- package/dist/shared/database-responsibility-guide.d.ts +183 -0
- package/dist/shared/database-responsibility-guide.d.ts.map +1 -0
- package/dist/shared/database-responsibility-guide.js +201 -0
- package/dist/shared/database-responsibility-guide.js.map +1 -0
- package/dist/shared/documentation-rag-service.d.ts +149 -0
- package/dist/shared/documentation-rag-service.d.ts.map +1 -0
- package/dist/shared/documentation-rag-service.js +586 -0
- package/dist/shared/documentation-rag-service.js.map +1 -0
- package/dist/shared/file-hash-tracker.d.ts +145 -0
- package/dist/shared/file-hash-tracker.d.ts.map +1 -0
- package/dist/shared/file-hash-tracker.js +387 -0
- package/dist/shared/file-hash-tracker.js.map +1 -0
- package/dist/shared/file-synchronization-system.d.ts +143 -0
- package/dist/shared/file-synchronization-system.d.ts.map +1 -0
- package/dist/shared/file-synchronization-system.js +642 -0
- package/dist/shared/file-synchronization-system.js.map +1 -0
- package/dist/shared/four-layer-memory-architecture.d.ts +372 -0
- package/dist/shared/four-layer-memory-architecture.d.ts.map +1 -0
- package/dist/shared/four-layer-memory-architecture.js +353 -0
- package/dist/shared/four-layer-memory-architecture.js.map +1 -0
- package/dist/shared/hybrid-file-discovery.d.ts +86 -0
- package/dist/shared/hybrid-file-discovery.d.ts.map +1 -0
- package/dist/shared/hybrid-file-discovery.js +270 -0
- package/dist/shared/hybrid-file-discovery.js.map +1 -0
- package/dist/shared/intelligent-cycle/interfaces.d.ts +73 -0
- package/dist/shared/intelligent-cycle/interfaces.d.ts.map +1 -0
- package/dist/shared/intelligent-cycle/interfaces.js +7 -0
- package/dist/shared/intelligent-cycle/interfaces.js.map +1 -0
- package/dist/shared/intelligent-cycle/services/code-extraction-service.d.ts +29 -0
- package/dist/shared/intelligent-cycle/services/code-extraction-service.d.ts.map +1 -0
- package/dist/shared/intelligent-cycle/services/code-extraction-service.js +191 -0
- package/dist/shared/intelligent-cycle/services/code-extraction-service.js.map +1 -0
- package/dist/shared/intelligent-cycle/services/intent-analysis-service.d.ts +17 -0
- package/dist/shared/intelligent-cycle/services/intent-analysis-service.d.ts.map +1 -0
- package/dist/shared/intelligent-cycle/services/intent-analysis-service.js +151 -0
- package/dist/shared/intelligent-cycle/services/intent-analysis-service.js.map +1 -0
- package/dist/shared/intelligent-cycle/services/security-scanning-service.d.ts +16 -0
- package/dist/shared/intelligent-cycle/services/security-scanning-service.d.ts.map +1 -0
- package/dist/shared/intelligent-cycle/services/security-scanning-service.js +171 -0
- package/dist/shared/intelligent-cycle/services/security-scanning-service.js.map +1 -0
- package/dist/shared/intelligent-cycle/services/semantic-deduplication-service.d.ts +15 -0
- package/dist/shared/intelligent-cycle/services/semantic-deduplication-service.d.ts.map +1 -0
- package/dist/shared/intelligent-cycle/services/semantic-deduplication-service.js +116 -0
- package/dist/shared/intelligent-cycle/services/semantic-deduplication-service.js.map +1 -0
- package/dist/shared/intelligent-cycle/services/similarity-matching-service.d.ts +13 -0
- package/dist/shared/intelligent-cycle/services/similarity-matching-service.d.ts.map +1 -0
- package/dist/shared/intelligent-cycle/services/similarity-matching-service.js +64 -0
- package/dist/shared/intelligent-cycle/services/similarity-matching-service.js.map +1 -0
- package/dist/shared/intelligent-cycle-features.d.ts +41 -0
- package/dist/shared/intelligent-cycle-features.d.ts.map +1 -0
- package/dist/shared/intelligent-cycle-features.js +102 -0
- package/dist/shared/intelligent-cycle-features.js.map +1 -0
- package/dist/shared/intelligent-tool-selector.d.ts +90 -0
- package/dist/shared/intelligent-tool-selector.d.ts.map +1 -0
- package/dist/shared/intelligent-tool-selector.js +357 -0
- package/dist/shared/intelligent-tool-selector.js.map +1 -0
- package/dist/shared/logger.d.ts +2 -0
- package/dist/shared/logger.d.ts.map +1 -0
- package/dist/shared/logger.js +9 -0
- package/dist/shared/logger.js.map +1 -0
- package/dist/shared/managers/cache-manager.d.ts +147 -0
- package/dist/shared/managers/cache-manager.d.ts.map +1 -0
- package/dist/shared/managers/cache-manager.js +408 -0
- package/dist/shared/managers/cache-manager.js.map +1 -0
- package/dist/shared/managers/database-update-manager.d.ts +142 -0
- package/dist/shared/managers/database-update-manager.d.ts.map +1 -0
- package/dist/shared/managers/database-update-manager.js +747 -0
- package/dist/shared/managers/database-update-manager.js.map +1 -0
- package/dist/shared/managers/git-branch-manager.d.ts +104 -0
- package/dist/shared/managers/git-branch-manager.d.ts.map +1 -0
- package/dist/shared/managers/git-branch-manager.js +435 -0
- package/dist/shared/managers/git-branch-manager.js.map +1 -0
- package/dist/shared/memory-architecture-integration.d.ts +124 -0
- package/dist/shared/memory-architecture-integration.d.ts.map +1 -0
- package/dist/shared/memory-architecture-integration.js +247 -0
- package/dist/shared/memory-architecture-integration.js.map +1 -0
- package/dist/shared/memory-orchestrator-integration.d.ts +86 -0
- package/dist/shared/memory-orchestrator-integration.d.ts.map +1 -0
- package/dist/shared/memory-orchestrator-integration.js +325 -0
- package/dist/shared/memory-orchestrator-integration.js.map +1 -0
- package/dist/shared/memory-system/interfaces/index.d.ts +255 -0
- package/dist/shared/memory-system/interfaces/index.d.ts.map +1 -0
- package/dist/shared/memory-system/interfaces/index.js +7 -0
- package/dist/shared/memory-system/interfaces/index.js.map +1 -0
- package/dist/shared/memory-system/memory-system.d.ts +69 -0
- package/dist/shared/memory-system/memory-system.d.ts.map +1 -0
- package/dist/shared/memory-system/memory-system.js +219 -0
- package/dist/shared/memory-system/memory-system.js.map +1 -0
- package/dist/shared/memory-system/services/memory-analytics-service.d.ts +26 -0
- package/dist/shared/memory-system/services/memory-analytics-service.d.ts.map +1 -0
- package/dist/shared/memory-system/services/memory-analytics-service.js +101 -0
- package/dist/shared/memory-system/services/memory-analytics-service.js.map +1 -0
- package/dist/shared/memory-system/services/memory-optimization-service.d.ts +21 -0
- package/dist/shared/memory-system/services/memory-optimization-service.d.ts.map +1 -0
- package/dist/shared/memory-system/services/memory-optimization-service.js +282 -0
- package/dist/shared/memory-system/services/memory-optimization-service.js.map +1 -0
- package/dist/shared/memory-system/services/memory-retrieval-service.d.ts +30 -0
- package/dist/shared/memory-system/services/memory-retrieval-service.d.ts.map +1 -0
- package/dist/shared/memory-system/services/memory-retrieval-service.js +430 -0
- package/dist/shared/memory-system/services/memory-retrieval-service.js.map +1 -0
- package/dist/shared/memory-system/services/memory-storage-service.d.ts +47 -0
- package/dist/shared/memory-system/services/memory-storage-service.d.ts.map +1 -0
- package/dist/shared/memory-system/services/memory-storage-service.js +450 -0
- package/dist/shared/memory-system/services/memory-storage-service.js.map +1 -0
- package/dist/shared/multi-level-cache.d.ts +106 -0
- package/dist/shared/multi-level-cache.d.ts.map +1 -0
- package/dist/shared/multi-level-cache.js +423 -0
- package/dist/shared/multi-level-cache.js.map +1 -0
- package/dist/shared/offline-first-cache.d.ts +69 -0
- package/dist/shared/offline-first-cache.d.ts.map +1 -0
- package/dist/shared/offline-first-cache.js +312 -0
- package/dist/shared/offline-first-cache.js.map +1 -0
- package/dist/shared/performance-monitor.d.ts +69 -0
- package/dist/shared/performance-monitor.d.ts.map +1 -0
- package/dist/shared/performance-monitor.js +226 -0
- package/dist/shared/performance-monitor.js.map +1 -0
- package/dist/shared/platform-utils.d.ts +105 -0
- package/dist/shared/platform-utils.d.ts.map +1 -0
- package/dist/shared/platform-utils.js +299 -0
- package/dist/shared/platform-utils.js.map +1 -0
- package/dist/shared/post-execution-integration.d.ts +99 -0
- package/dist/shared/post-execution-integration.d.ts.map +1 -0
- package/dist/shared/post-execution-integration.js +504 -0
- package/dist/shared/post-execution-integration.js.map +1 -0
- package/dist/shared/postgresql-analytics-database.d.ts +54 -0
- package/dist/shared/postgresql-analytics-database.d.ts.map +1 -0
- package/dist/shared/postgresql-analytics-database.js +333 -0
- package/dist/shared/postgresql-analytics-database.js.map +1 -0
- package/dist/shared/project-intelligence.d.ts +45 -0
- package/dist/shared/project-intelligence.d.ts.map +1 -0
- package/dist/shared/project-intelligence.js +176 -0
- package/dist/shared/project-intelligence.js.map +1 -0
- package/dist/shared/prompt-chunking-system.d.ts +39 -0
- package/dist/shared/prompt-chunking-system.d.ts.map +1 -0
- package/dist/shared/prompt-chunking-system.js +233 -0
- package/dist/shared/prompt-chunking-system.js.map +1 -0
- package/dist/shared/reconciliation-system.d.ts +105 -0
- package/dist/shared/reconciliation-system.d.ts.map +1 -0
- package/dist/shared/reconciliation-system.js +430 -0
- package/dist/shared/reconciliation-system.js.map +1 -0
- package/dist/shared/redis-cache-adapter.d.ts +73 -0
- package/dist/shared/redis-cache-adapter.d.ts.map +1 -0
- package/dist/shared/redis-cache-adapter.js +294 -0
- package/dist/shared/redis-cache-adapter.js.map +1 -0
- package/dist/shared/redis-file-change-sync.d.ts +126 -0
- package/dist/shared/redis-file-change-sync.d.ts.map +1 -0
- package/dist/shared/redis-file-change-sync.js +779 -0
- package/dist/shared/redis-file-change-sync.js.map +1 -0
- package/dist/shared/semantic-enhancement-engine.d.ts +70 -0
- package/dist/shared/semantic-enhancement-engine.d.ts.map +1 -0
- package/dist/shared/semantic-enhancement-engine.js +127 -0
- package/dist/shared/semantic-enhancement-engine.js.map +1 -0
- package/dist/shared/task-specific-file-orchestrator.d.ts +107 -0
- package/dist/shared/task-specific-file-orchestrator.d.ts.map +1 -0
- package/dist/shared/task-specific-file-orchestrator.js +492 -0
- package/dist/shared/task-specific-file-orchestrator.js.map +1 -0
- package/dist/shared/tool-adapter.d.ts +27 -0
- package/dist/shared/tool-adapter.d.ts.map +1 -0
- package/dist/shared/tool-adapter.js +147 -0
- package/dist/shared/tool-adapter.js.map +1 -0
- package/dist/shared/tool-config-repository.d.ts +41 -0
- package/dist/shared/tool-config-repository.d.ts.map +1 -0
- package/dist/shared/tool-config-repository.js +178 -0
- package/dist/shared/tool-config-repository.js.map +1 -0
- package/dist/shared/tool-interface.d.ts +220 -0
- package/dist/shared/tool-interface.d.ts.map +1 -0
- package/dist/shared/tool-interface.js +357 -0
- package/dist/shared/tool-interface.js.map +1 -0
- package/dist/shared/tool-registry-initializer.d.ts +32 -0
- package/dist/shared/tool-registry-initializer.d.ts.map +1 -0
- package/dist/shared/tool-registry-initializer.js +173 -0
- package/dist/shared/tool-registry-initializer.js.map +1 -0
- package/dist/shared/types.d.ts +48 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +6 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/shared/validation-cycle/interfaces/index.d.ts +102 -0
- package/dist/shared/validation-cycle/interfaces/index.d.ts.map +1 -0
- package/dist/shared/validation-cycle/interfaces/index.js +7 -0
- package/dist/shared/validation-cycle/interfaces/index.js.map +1 -0
- package/dist/shared/validation-cycle/services/core-safety-service.d.ts +21 -0
- package/dist/shared/validation-cycle/services/core-safety-service.d.ts.map +1 -0
- package/dist/shared/validation-cycle/services/core-safety-service.js +339 -0
- package/dist/shared/validation-cycle/services/core-safety-service.js.map +1 -0
- package/dist/shared/validation-cycle/services/quality-validation-service.d.ts +24 -0
- package/dist/shared/validation-cycle/services/quality-validation-service.d.ts.map +1 -0
- package/dist/shared/validation-cycle/services/quality-validation-service.js +368 -0
- package/dist/shared/validation-cycle/services/quality-validation-service.js.map +1 -0
- package/dist/shared/validation-cycle/services/validation-aggregator-service.d.ts +28 -0
- package/dist/shared/validation-cycle/services/validation-aggregator-service.d.ts.map +1 -0
- package/dist/shared/validation-cycle/services/validation-aggregator-service.js +214 -0
- package/dist/shared/validation-cycle/services/validation-aggregator-service.js.map +1 -0
- package/dist/shared/validation-cycle/services/validation-report-service.d.ts +29 -0
- package/dist/shared/validation-cycle/services/validation-report-service.d.ts.map +1 -0
- package/dist/shared/validation-cycle/services/validation-report-service.js +304 -0
- package/dist/shared/validation-cycle/services/validation-report-service.js.map +1 -0
- package/dist/shared/validation-cycle/validation-cycle.d.ts +64 -0
- package/dist/shared/validation-cycle/validation-cycle.d.ts.map +1 -0
- package/dist/shared/validation-cycle/validation-cycle.js +226 -0
- package/dist/shared/validation-cycle/validation-cycle.js.map +1 -0
- package/dist/shared/validation-cycle.d.ts +12 -0
- package/dist/shared/validation-cycle.d.ts.map +1 -0
- package/dist/shared/validation-cycle.js +20 -0
- package/dist/shared/validation-cycle.js.map +1 -0
- package/dist/storage/embedded/graphology-graph-store.d.ts +39 -0
- package/dist/storage/embedded/graphology-graph-store.d.ts.map +1 -0
- package/dist/storage/embedded/graphology-graph-store.js +357 -0
- package/dist/storage/embedded/graphology-graph-store.js.map +1 -0
- package/dist/storage/embedded/index.d.ts +40 -0
- package/dist/storage/embedded/index.d.ts.map +1 -0
- package/dist/storage/embedded/index.js +154 -0
- package/dist/storage/embedded/index.js.map +1 -0
- package/dist/storage/embedded/lru-cache-store.d.ts +44 -0
- package/dist/storage/embedded/lru-cache-store.d.ts.map +1 -0
- package/dist/storage/embedded/lru-cache-store.js +232 -0
- package/dist/storage/embedded/lru-cache-store.js.map +1 -0
- package/dist/storage/embedded/minisearch-text-store.d.ts +62 -0
- package/dist/storage/embedded/minisearch-text-store.d.ts.map +1 -0
- package/dist/storage/embedded/minisearch-text-store.js +521 -0
- package/dist/storage/embedded/minisearch-text-store.js.map +1 -0
- package/dist/storage/embedded/sqlite-project-store.d.ts +29 -0
- package/dist/storage/embedded/sqlite-project-store.d.ts.map +1 -0
- package/dist/storage/embedded/sqlite-project-store.js +193 -0
- package/dist/storage/embedded/sqlite-project-store.js.map +1 -0
- package/dist/storage/embedded/sqlite-vector-store.d.ts +48 -0
- package/dist/storage/embedded/sqlite-vector-store.d.ts.map +1 -0
- package/dist/storage/embedded/sqlite-vector-store.js +462 -0
- package/dist/storage/embedded/sqlite-vector-store.js.map +1 -0
- package/dist/storage/index.d.ts +64 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +84 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/interfaces.d.ts +259 -0
- package/dist/storage/interfaces.d.ts.map +1 -0
- package/dist/storage/interfaces.js +12 -0
- package/dist/storage/interfaces.js.map +1 -0
- package/dist/storage/server/elasticsearch-text-store.d.ts +82 -0
- package/dist/storage/server/elasticsearch-text-store.d.ts.map +1 -0
- package/dist/storage/server/elasticsearch-text-store.js +177 -0
- package/dist/storage/server/elasticsearch-text-store.js.map +1 -0
- package/dist/storage/server/index.d.ts +42 -0
- package/dist/storage/server/index.d.ts.map +1 -0
- package/dist/storage/server/index.js +109 -0
- package/dist/storage/server/index.js.map +1 -0
- package/dist/storage/server/neo4j-graph-store.d.ts +49 -0
- package/dist/storage/server/neo4j-graph-store.d.ts.map +1 -0
- package/dist/storage/server/neo4j-graph-store.js +357 -0
- package/dist/storage/server/neo4j-graph-store.js.map +1 -0
- package/dist/storage/server/postgres-project-store.d.ts +30 -0
- package/dist/storage/server/postgres-project-store.d.ts.map +1 -0
- package/dist/storage/server/postgres-project-store.js +146 -0
- package/dist/storage/server/postgres-project-store.js.map +1 -0
- package/dist/storage/server/postgres-vector-store.d.ts +51 -0
- package/dist/storage/server/postgres-vector-store.d.ts.map +1 -0
- package/dist/storage/server/postgres-vector-store.js +306 -0
- package/dist/storage/server/postgres-vector-store.js.map +1 -0
- package/dist/storage/server/redis-cache-store.d.ts +61 -0
- package/dist/storage/server/redis-cache-store.d.ts.map +1 -0
- package/dist/storage/server/redis-cache-store.js +209 -0
- package/dist/storage/server/redis-cache-store.js.map +1 -0
- package/dist/storage/storage-manager.d.ts +121 -0
- package/dist/storage/storage-manager.d.ts.map +1 -0
- package/dist/storage/storage-manager.js +444 -0
- package/dist/storage/storage-manager.js.map +1 -0
- package/dist/storage/storage-provider.d.ts +62 -0
- package/dist/storage/storage-provider.d.ts.map +1 -0
- package/dist/storage/storage-provider.js +257 -0
- package/dist/storage/storage-provider.js.map +1 -0
- package/dist/utils/cache.d.ts +66 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +254 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/cli-logger.d.ts +75 -0
- package/dist/utils/cli-logger.d.ts.map +1 -0
- package/dist/utils/cli-logger.js +217 -0
- package/dist/utils/cli-logger.js.map +1 -0
- package/dist/utils/colored-logger.d.ts +40 -0
- package/dist/utils/colored-logger.d.ts.map +1 -0
- package/dist/utils/colored-logger.js +233 -0
- package/dist/utils/colored-logger.js.map +1 -0
- package/dist/utils/config.d.ts +61 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +230 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/file-system.d.ts +30 -0
- package/dist/utils/file-system.d.ts.map +1 -0
- package/dist/utils/file-system.js +207 -0
- package/dist/utils/file-system.js.map +1 -0
- package/dist/utils/hash.d.ts +79 -0
- package/dist/utils/hash.d.ts.map +1 -0
- package/dist/utils/hash.js +172 -0
- package/dist/utils/hash.js.map +1 -0
- package/dist/utils/logger.d.ts +39 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +106 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +150 -0
|
@@ -0,0 +1,1987 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* User Interaction Service
|
|
4
|
+
* Single Responsibility: Handle user interactions and Claude Code detection
|
|
5
|
+
* Manages user clarification prompts and Claude Code command execution
|
|
6
|
+
*/
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.UserInteractionService = void 0;
|
|
12
|
+
const platform_utils_1 = require("../../../shared/platform-utils");
|
|
13
|
+
const child_process_1 = require("child_process");
|
|
14
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
15
|
+
const theme_1 = require("../../ui/theme");
|
|
16
|
+
const logger_1 = require("../../../utils/logger");
|
|
17
|
+
class UserInteractionService {
|
|
18
|
+
rl;
|
|
19
|
+
skipApproval = false; // When true, auto-approve changes (user selected "Yes, always")
|
|
20
|
+
verboseMode = false; // When true, show full debug output (files, relationships, prompt)
|
|
21
|
+
activeChild = null; // Track active child process for cancellation
|
|
22
|
+
isCancelled = false; // Flag to track user cancellation
|
|
23
|
+
searchModeEnabled = true; // Toggle for semantic search (default: enabled, persists between prompts)
|
|
24
|
+
keyInputHandler = null; // Handler for key passthrough
|
|
25
|
+
constructor() {
|
|
26
|
+
// No initialization needed - we pipe directly to claude stdin
|
|
27
|
+
// Set up SIGINT (Ctrl+C) handler for graceful cancellation
|
|
28
|
+
process.on('SIGINT', () => {
|
|
29
|
+
if (this.activeChild) {
|
|
30
|
+
console.log(theme_1.Theme.colors.warning('\n\n ⚠️ Cancelling... (press Ctrl+C again to force quit)'));
|
|
31
|
+
this.isCancelled = true;
|
|
32
|
+
this.activeChild.kill('SIGTERM');
|
|
33
|
+
this.activeChild = null;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// If no active child, let the default handler take over
|
|
37
|
+
process.exit(0);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Set verbose mode (when user uses -v/--verbose flag)
|
|
43
|
+
*/
|
|
44
|
+
setVerboseMode(enabled) {
|
|
45
|
+
this.verboseMode = enabled;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Check if verbose mode is enabled
|
|
49
|
+
*/
|
|
50
|
+
isVerboseMode() {
|
|
51
|
+
return this.verboseMode;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Set skip approval mode (when user selects "Yes, always")
|
|
55
|
+
*/
|
|
56
|
+
setSkipApproval(skip) {
|
|
57
|
+
this.skipApproval = skip;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Set the readline interface (passed from main CLI)
|
|
61
|
+
*/
|
|
62
|
+
setReadlineInterface(rl) {
|
|
63
|
+
this.rl = rl;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Pause readline before inquirer prompts to avoid conflicts
|
|
67
|
+
*/
|
|
68
|
+
pauseReadline() {
|
|
69
|
+
if (this.rl) {
|
|
70
|
+
this.rl.pause();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Resume readline after inquirer prompts
|
|
75
|
+
*/
|
|
76
|
+
resumeReadline() {
|
|
77
|
+
if (this.rl) {
|
|
78
|
+
this.rl.resume();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Set up key input passthrough to forward Escape key to Claude
|
|
83
|
+
* This enables users to interrupt Claude's processing just like using Claude directly
|
|
84
|
+
*/
|
|
85
|
+
setupKeyPassthrough(childStdin) {
|
|
86
|
+
if (!childStdin || !process.stdin.isTTY) {
|
|
87
|
+
return; // Can't set up raw mode if not a TTY or no stdin
|
|
88
|
+
}
|
|
89
|
+
// Save current raw mode state and enable raw mode
|
|
90
|
+
const wasRaw = process.stdin.isRaw;
|
|
91
|
+
if (!wasRaw) {
|
|
92
|
+
process.stdin.setRawMode(true);
|
|
93
|
+
}
|
|
94
|
+
process.stdin.resume();
|
|
95
|
+
// Handler for key input - forward Escape key to Claude
|
|
96
|
+
this.keyInputHandler = (data) => {
|
|
97
|
+
// Check for Escape key (0x1B)
|
|
98
|
+
if (data[0] === 0x1B) {
|
|
99
|
+
// Forward Escape to Claude's stdin
|
|
100
|
+
try {
|
|
101
|
+
childStdin.write(data);
|
|
102
|
+
}
|
|
103
|
+
catch {
|
|
104
|
+
// Child stdin may already be closed
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
// Check for Ctrl+C (0x03) - let SIGINT handler deal with it
|
|
108
|
+
else if (data[0] === 0x03) {
|
|
109
|
+
process.emit('SIGINT', 'SIGINT');
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
process.stdin.on('data', this.keyInputHandler);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Clean up key input passthrough
|
|
116
|
+
*/
|
|
117
|
+
cleanupKeyPassthrough() {
|
|
118
|
+
if (this.keyInputHandler) {
|
|
119
|
+
process.stdin.removeListener('data', this.keyInputHandler);
|
|
120
|
+
this.keyInputHandler = null;
|
|
121
|
+
}
|
|
122
|
+
// Restore stdin state
|
|
123
|
+
if (process.stdin.isTTY) {
|
|
124
|
+
try {
|
|
125
|
+
process.stdin.setRawMode(false);
|
|
126
|
+
process.stdin.pause();
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
// Ignore errors during cleanup
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Prompt user for clarifications based on detected assumptions and ambiguities
|
|
135
|
+
*/
|
|
136
|
+
async promptForClarifications(queryAnalysis) {
|
|
137
|
+
const clarifications = [];
|
|
138
|
+
// Create questions based on assumptions and ambiguities
|
|
139
|
+
const questions = this.generateClarificationQuestions(queryAnalysis);
|
|
140
|
+
if (questions.length === 0) {
|
|
141
|
+
return clarifications;
|
|
142
|
+
}
|
|
143
|
+
console.log(theme_1.Theme.sectionTitle('Clarification Needed', '❓'));
|
|
144
|
+
console.log(theme_1.Theme.colors.warning(' CodeSeeker detected some assumptions and ambiguities in your request.'));
|
|
145
|
+
console.log(theme_1.Theme.colors.highlight(' Please help clarify the following questions:\n'));
|
|
146
|
+
this.pauseReadline();
|
|
147
|
+
logger_1.Logger.mute();
|
|
148
|
+
try {
|
|
149
|
+
for (let i = 0; i < questions.length; i++) {
|
|
150
|
+
const question = questions[i];
|
|
151
|
+
try {
|
|
152
|
+
const answer = await inquirer_1.default.prompt([
|
|
153
|
+
{
|
|
154
|
+
type: 'input',
|
|
155
|
+
name: 'response',
|
|
156
|
+
message: `${i + 1}. ${question}`,
|
|
157
|
+
validate: (input) => input.trim().length > 0 || 'Please provide an answer or type "skip" to skip this question'
|
|
158
|
+
}
|
|
159
|
+
]);
|
|
160
|
+
if (answer.response && answer.response.toLowerCase() !== 'skip') {
|
|
161
|
+
clarifications.push(`${question} → ${answer.response}`);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
// Handle Ctrl+C gracefully - skip remaining questions
|
|
166
|
+
if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
|
|
167
|
+
console.log('\n⚠️ Prompt cancelled - skipping remaining questions');
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
throw error;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
finally {
|
|
175
|
+
logger_1.Logger.unmute();
|
|
176
|
+
this.resumeReadline();
|
|
177
|
+
}
|
|
178
|
+
return clarifications;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Execute Claude Code with enhanced prompt
|
|
182
|
+
* When running inside Claude Code, outputs context transparently for the current Claude instance
|
|
183
|
+
* @param enhancedPrompt The prompt to send to Claude
|
|
184
|
+
* @param options.autoApprove If true, auto-approve all file changes (for automated fix tasks)
|
|
185
|
+
*/
|
|
186
|
+
async executeClaudeCode(enhancedPrompt, options) {
|
|
187
|
+
// For automated tasks like build fixes, enable auto-approval
|
|
188
|
+
if (options?.autoApprove) {
|
|
189
|
+
this.skipApproval = true;
|
|
190
|
+
}
|
|
191
|
+
try {
|
|
192
|
+
// Check if running inside Claude Code
|
|
193
|
+
if (platform_utils_1.PlatformUtils.isRunningInClaudeCode()) {
|
|
194
|
+
// TRANSPARENT MODE: Pass enhanced context to Claude
|
|
195
|
+
// For auto-approve tasks (build fixes, test fixes), add execution directive
|
|
196
|
+
let promptToSend = enhancedPrompt;
|
|
197
|
+
if (options?.autoApprove) {
|
|
198
|
+
// Add directive to execute immediately without showing a plan
|
|
199
|
+
promptToSend = `<codeseeker-directive>
|
|
200
|
+
EXECUTE IMMEDIATELY - DO NOT SHOW A PLAN
|
|
201
|
+
This is an automated fix task. Execute the fix directly without asking for approval or showing a plan.
|
|
202
|
+
Just make the necessary changes to fix the issue.
|
|
203
|
+
</codeseeker-directive>
|
|
204
|
+
|
|
205
|
+
${enhancedPrompt}`;
|
|
206
|
+
}
|
|
207
|
+
// Output the context in a clear, visible format that Claude will process
|
|
208
|
+
console.log(theme_1.Theme.sectionTitle('CodeSeeker Enhanced Context', '📤'));
|
|
209
|
+
console.log(theme_1.Theme.colors.muted(' The following context is being provided to Claude Code:\n'));
|
|
210
|
+
// Show a summary of what's being provided
|
|
211
|
+
const lines = promptToSend.split('\n');
|
|
212
|
+
const contextPreview = lines.slice(0, 15).join('\n');
|
|
213
|
+
console.log(contextPreview);
|
|
214
|
+
if (lines.length > 15) {
|
|
215
|
+
console.log(`\n... (${lines.length - 15} more lines of context)`);
|
|
216
|
+
}
|
|
217
|
+
// Output the full context in the special tags for Claude to process
|
|
218
|
+
console.log('\n<codeseeker-context>');
|
|
219
|
+
console.log(promptToSend);
|
|
220
|
+
console.log('</codeseeker-context>\n');
|
|
221
|
+
if (options?.autoApprove) {
|
|
222
|
+
console.log(theme_1.Theme.colors.warning('\n ⚡ Auto-Execute Mode'));
|
|
223
|
+
console.log(theme_1.Theme.colors.muted(' Claude will execute the fix immediately without showing a plan.\n'));
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
console.log(theme_1.Theme.colors.info('\n ℹ️ Transparent Mode Active'));
|
|
227
|
+
console.log(theme_1.Theme.divider('─', 55));
|
|
228
|
+
console.log(theme_1.Theme.colors.muted(' CodeSeeker detected it\'s running inside Claude Code.'));
|
|
229
|
+
console.log(theme_1.Theme.colors.muted(' The enhanced context above will inform Claude\'s response.'));
|
|
230
|
+
console.log(theme_1.Theme.colors.muted(' Claude Code will now continue with this additional context.\n'));
|
|
231
|
+
}
|
|
232
|
+
// Return success - Claude (already running) will process this context
|
|
233
|
+
return {
|
|
234
|
+
response: 'Context provided to Claude Code - see enhanced context above',
|
|
235
|
+
filesToModify: [],
|
|
236
|
+
summary: 'Transparent mode: context provided to running Claude Code instance'
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
// EXTERNAL MODE: Execute Claude CLI with streaming output
|
|
240
|
+
return await this.executeClaudeCodeWithStreaming(enhancedPrompt);
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
console.error('❌ Failed to execute Claude Code:', error);
|
|
244
|
+
return {
|
|
245
|
+
response: 'Failed to execute Claude Code command',
|
|
246
|
+
filesToModify: [],
|
|
247
|
+
summary: 'Execution failed'
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Execute a direct Claude command for autonomous fix tasks (build/test fixes)
|
|
253
|
+
* This method bypasses the full workflow orchestrator and executes immediately.
|
|
254
|
+
*
|
|
255
|
+
* In transparent mode: Outputs a plain instruction for Claude to process without
|
|
256
|
+
* triggering the CodeSeeker workflow (no <codeseeker-context> tags).
|
|
257
|
+
*
|
|
258
|
+
* In external mode: Runs Claude CLI with auto-approval for immediate execution.
|
|
259
|
+
*/
|
|
260
|
+
async executeDirectFixCommand(fixPrompt, taskType) {
|
|
261
|
+
const taskLabels = {
|
|
262
|
+
'build': '🔨 Build Fix',
|
|
263
|
+
'test': '🧪 Test Fix',
|
|
264
|
+
'general': '🔧 Fix'
|
|
265
|
+
};
|
|
266
|
+
const label = taskLabels[taskType];
|
|
267
|
+
if (platform_utils_1.PlatformUtils.isRunningInClaudeCode()) {
|
|
268
|
+
// TRANSPARENT MODE: Output as a simple instruction for the running Claude instance
|
|
269
|
+
// Use a special format that doesn't trigger CodeSeeker workflow
|
|
270
|
+
console.log(theme_1.Theme.colors.info(`\n ${label} - Direct Execution`));
|
|
271
|
+
console.log(theme_1.Theme.colors.muted(' ─────────────────────────────────────────────'));
|
|
272
|
+
// Output the instruction directly (Claude will see this as instruction to follow)
|
|
273
|
+
console.log(theme_1.Theme.colors.claudeCode(`\n INSTRUCTION: ${fixPrompt.split('\n')[0]}`));
|
|
274
|
+
if (fixPrompt.split('\n').length > 1) {
|
|
275
|
+
console.log(theme_1.Theme.colors.muted(` ... (${fixPrompt.split('\n').length - 1} more lines of context)`));
|
|
276
|
+
}
|
|
277
|
+
// Output completion message
|
|
278
|
+
console.log(theme_1.Theme.colors.muted('\n Claude will now execute this fix directly.\n'));
|
|
279
|
+
// Return success - the current Claude session will process this
|
|
280
|
+
return { success: true, output: 'Instruction provided to Claude' };
|
|
281
|
+
}
|
|
282
|
+
// EXTERNAL MODE: Run Claude CLI with streaming and auto-approval
|
|
283
|
+
return new Promise((resolve) => {
|
|
284
|
+
const userCwd = process.env.CODESEEKER_USER_CWD || process.cwd();
|
|
285
|
+
// Use --dangerously-skip-permissions for auto-approved fix execution
|
|
286
|
+
// Note: --verbose is required when using --output-format stream-json with -p (--print)
|
|
287
|
+
const claudeArgs = ['-p', '--verbose', '--output-format', 'stream-json', '--dangerously-skip-permissions'];
|
|
288
|
+
console.log(theme_1.Theme.colors.info(`\n ${label} - Executing...`));
|
|
289
|
+
const child = (0, child_process_1.spawn)('claude', claudeArgs, {
|
|
290
|
+
cwd: userCwd,
|
|
291
|
+
env: { ...process.env },
|
|
292
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
293
|
+
shell: true
|
|
294
|
+
});
|
|
295
|
+
let buffer = '';
|
|
296
|
+
let lastDisplayedText = '';
|
|
297
|
+
let isFirstOutput = true;
|
|
298
|
+
let finalOutput = '';
|
|
299
|
+
child.stdin?.write(fixPrompt);
|
|
300
|
+
child.stdin?.end();
|
|
301
|
+
child.stdout?.on('data', (data) => {
|
|
302
|
+
buffer += data.toString();
|
|
303
|
+
const lines = buffer.split('\n');
|
|
304
|
+
buffer = lines.pop() || '';
|
|
305
|
+
for (const line of lines) {
|
|
306
|
+
if (!line.trim())
|
|
307
|
+
continue;
|
|
308
|
+
try {
|
|
309
|
+
const event = JSON.parse(line);
|
|
310
|
+
if (event.type === 'assistant') {
|
|
311
|
+
if (event.message?.content) {
|
|
312
|
+
for (const block of event.message.content) {
|
|
313
|
+
if (block.type === 'text') {
|
|
314
|
+
const newText = block.text || '';
|
|
315
|
+
if (newText.length > lastDisplayedText.length) {
|
|
316
|
+
const delta = newText.substring(lastDisplayedText.length);
|
|
317
|
+
if (isFirstOutput) {
|
|
318
|
+
process.stdout.write(theme_1.Theme.colors.claudeCode('\n │ '));
|
|
319
|
+
isFirstOutput = false;
|
|
320
|
+
}
|
|
321
|
+
const formattedDelta = delta.replace(/\n/g, theme_1.Theme.colors.claudeCode('\n │ '));
|
|
322
|
+
process.stdout.write(theme_1.Theme.colors.claudeCode(formattedDelta));
|
|
323
|
+
lastDisplayedText = newText;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
else if (event.type === 'result') {
|
|
330
|
+
if (!isFirstOutput) {
|
|
331
|
+
process.stdout.write('\n');
|
|
332
|
+
}
|
|
333
|
+
finalOutput = event.result || '';
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
catch {
|
|
337
|
+
// Skip non-JSON lines
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
});
|
|
341
|
+
child.stderr?.on('data', (data) => {
|
|
342
|
+
const errorText = data.toString();
|
|
343
|
+
if (errorText.includes('Error') || errorText.includes('error')) {
|
|
344
|
+
console.error(theme_1.Theme.colors.error(` Error: ${errorText}`));
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
child.on('close', (code) => {
|
|
348
|
+
if (code === 0) {
|
|
349
|
+
console.log(theme_1.Theme.colors.success(` ✓ ${label} completed`));
|
|
350
|
+
resolve({ success: true, output: finalOutput || lastDisplayedText });
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
console.log(theme_1.Theme.colors.error(` ✗ ${label} failed (exit code: ${code})`));
|
|
354
|
+
resolve({ success: false, output: finalOutput || lastDisplayedText });
|
|
355
|
+
}
|
|
356
|
+
});
|
|
357
|
+
child.on('error', (err) => {
|
|
358
|
+
console.error(theme_1.Theme.colors.error(` ✗ Failed to start Claude: ${err.message}`));
|
|
359
|
+
resolve({ success: false, output: err.message });
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Execute Claude Code with two-phase permission handling and feedback loop
|
|
365
|
+
* Phase 1: Run Claude and collect proposed changes (permission denials)
|
|
366
|
+
* Phase 2: If user approves, resume session with permissions to execute changes
|
|
367
|
+
* Feedback Loop: If user provides feedback, retry with modified prompt
|
|
368
|
+
*/
|
|
369
|
+
async executeClaudeCodeWithStreaming(enhancedPrompt) {
|
|
370
|
+
let currentPrompt = enhancedPrompt;
|
|
371
|
+
let allModifiedFiles = [];
|
|
372
|
+
let iterationCount = 0;
|
|
373
|
+
const MAX_ITERATIONS = 10; // Safety limit
|
|
374
|
+
// Main feedback loop
|
|
375
|
+
while (iterationCount < MAX_ITERATIONS) {
|
|
376
|
+
iterationCount++;
|
|
377
|
+
// Show compact context summary (only on first iteration or when prompt changes significantly)
|
|
378
|
+
if (iterationCount === 1) {
|
|
379
|
+
this.showCompactContextSummary(currentPrompt);
|
|
380
|
+
}
|
|
381
|
+
// Phase 1: Run Claude and collect proposed changes (with real-time streaming output)
|
|
382
|
+
console.log(theme_1.Theme.colors.info(iterationCount === 1 ? '\n 🤖 Claude is thinking...' : '\n 🤖 Claude is re-analyzing with your feedback...'));
|
|
383
|
+
const firstPhase = await this.executeClaudeFirstPhase(currentPrompt);
|
|
384
|
+
// Note: Claude's response is already shown during streaming (real-time output)
|
|
385
|
+
// The "Plan" box was removed to avoid showing the same content twice
|
|
386
|
+
// If there are proposed changes, show them and ask for approval
|
|
387
|
+
if (firstPhase.hasPermissionDenials && firstPhase.proposedChanges.length > 0) {
|
|
388
|
+
// Deduplicate changes (same file path should only appear once)
|
|
389
|
+
const uniqueChanges = this.deduplicateChanges(firstPhase.proposedChanges);
|
|
390
|
+
const approval = await this.showProposedChangesAndConfirm(uniqueChanges);
|
|
391
|
+
if (approval.choice === 'yes' || approval.choice === 'yes_always') {
|
|
392
|
+
if (approval.choice === 'yes_always') {
|
|
393
|
+
this.skipApproval = true;
|
|
394
|
+
}
|
|
395
|
+
// Phase 2: Resume session with permissions to execute changes
|
|
396
|
+
console.log(theme_1.Theme.colors.muted('\n Applying changes...'));
|
|
397
|
+
const finalResponse = await this.executeClaudeSecondPhase(firstPhase.sessionId);
|
|
398
|
+
// Show what was modified
|
|
399
|
+
this.showAppliedChanges(uniqueChanges);
|
|
400
|
+
// Add to total modified files
|
|
401
|
+
allModifiedFiles = [...allModifiedFiles, ...uniqueChanges.map(c => c.filePath)];
|
|
402
|
+
return {
|
|
403
|
+
response: finalResponse,
|
|
404
|
+
filesToModify: [...new Set(allModifiedFiles)], // Deduplicate
|
|
405
|
+
summary: `Applied ${uniqueChanges.length} file change(s)`
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
else if (approval.choice === 'no_feedback' && approval.feedback) {
|
|
409
|
+
// User provided feedback - incorporate into prompt and retry
|
|
410
|
+
console.log(theme_1.Theme.colors.info('\n Retrying with your feedback...'));
|
|
411
|
+
// Build new prompt with feedback
|
|
412
|
+
currentPrompt = this.incorporateFeedback(enhancedPrompt, approval.feedback, iterationCount);
|
|
413
|
+
// Continue loop to retry
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
else if (approval.choice === 'new_command' && approval.newCommand) {
|
|
417
|
+
// User wants to enter a different command entirely
|
|
418
|
+
// Return with special flag so caller can handle re-execution with new command
|
|
419
|
+
console.log(theme_1.Theme.colors.info('\n Starting new command...'));
|
|
420
|
+
return {
|
|
421
|
+
response: firstPhase.response,
|
|
422
|
+
filesToModify: allModifiedFiles,
|
|
423
|
+
summary: `new_command:${approval.newCommand}` // Special marker for caller to detect
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
else if (approval.choice === 'cancelled') {
|
|
427
|
+
// User explicitly cancelled (Ctrl+C)
|
|
428
|
+
console.log(theme_1.Theme.colors.muted('\n Operation cancelled.'));
|
|
429
|
+
return {
|
|
430
|
+
response: firstPhase.response,
|
|
431
|
+
filesToModify: allModifiedFiles,
|
|
432
|
+
summary: 'Operation cancelled by user'
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
// No file changes proposed - check if this is expected or needs retry
|
|
438
|
+
if (iterationCount === 1) {
|
|
439
|
+
// First attempt, no changes - this is fine
|
|
440
|
+
return {
|
|
441
|
+
response: firstPhase.response,
|
|
442
|
+
filesToModify: [],
|
|
443
|
+
summary: 'Claude Code has processed the request (no file changes needed)'
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
// After feedback, still no changes - ask if user wants to try again
|
|
448
|
+
console.log(theme_1.Theme.colors.warning('\n Claude didn\'t propose any file changes this time.'));
|
|
449
|
+
const continueChoice = await this.askToContinue();
|
|
450
|
+
if (continueChoice.choice === 'no_feedback' && continueChoice.feedback) {
|
|
451
|
+
currentPrompt = this.incorporateFeedback(enhancedPrompt, continueChoice.feedback, iterationCount);
|
|
452
|
+
continue;
|
|
453
|
+
}
|
|
454
|
+
else {
|
|
455
|
+
return {
|
|
456
|
+
response: firstPhase.response,
|
|
457
|
+
filesToModify: allModifiedFiles,
|
|
458
|
+
summary: 'No additional changes proposed'
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
// Max iterations reached
|
|
465
|
+
console.log(theme_1.Theme.colors.warning('\n Maximum retry attempts reached.'));
|
|
466
|
+
return {
|
|
467
|
+
response: 'Maximum retry attempts reached',
|
|
468
|
+
filesToModify: allModifiedFiles,
|
|
469
|
+
summary: 'Feedback loop exhausted after maximum iterations'
|
|
470
|
+
};
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* Incorporate user feedback into the prompt for retry
|
|
474
|
+
*/
|
|
475
|
+
incorporateFeedback(originalPrompt, feedback, iteration) {
|
|
476
|
+
return `${originalPrompt}
|
|
477
|
+
|
|
478
|
+
# User Feedback (Iteration ${iteration})
|
|
479
|
+
The user reviewed the proposed changes and requested modifications:
|
|
480
|
+
"${feedback}"
|
|
481
|
+
|
|
482
|
+
Please revise your approach based on this feedback and propose new changes.`;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Ask user if they want to continue with more feedback
|
|
486
|
+
*/
|
|
487
|
+
async askToContinue() {
|
|
488
|
+
this.pauseReadline();
|
|
489
|
+
logger_1.Logger.mute();
|
|
490
|
+
try {
|
|
491
|
+
const answer = await inquirer_1.default.prompt([
|
|
492
|
+
{
|
|
493
|
+
type: 'list',
|
|
494
|
+
name: 'choice',
|
|
495
|
+
message: 'What would you like to do?',
|
|
496
|
+
choices: [
|
|
497
|
+
{ name: 'Provide more guidance', value: 'no_feedback' },
|
|
498
|
+
{ name: 'Done (accept current state)', value: 'yes' }
|
|
499
|
+
],
|
|
500
|
+
default: 'yes'
|
|
501
|
+
}
|
|
502
|
+
]);
|
|
503
|
+
if (answer.choice === 'no_feedback') {
|
|
504
|
+
const feedbackAnswer = await inquirer_1.default.prompt([
|
|
505
|
+
{
|
|
506
|
+
type: 'input',
|
|
507
|
+
name: 'feedback',
|
|
508
|
+
message: 'What should Claude do?',
|
|
509
|
+
validate: (input) => input.trim().length > 0 || 'Please provide guidance'
|
|
510
|
+
}
|
|
511
|
+
]);
|
|
512
|
+
return { choice: 'no_feedback', feedback: feedbackAnswer.feedback };
|
|
513
|
+
}
|
|
514
|
+
return { choice: answer.choice };
|
|
515
|
+
}
|
|
516
|
+
catch (error) {
|
|
517
|
+
if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
|
|
518
|
+
return { choice: 'cancelled' };
|
|
519
|
+
}
|
|
520
|
+
throw error;
|
|
521
|
+
}
|
|
522
|
+
finally {
|
|
523
|
+
logger_1.Logger.unmute();
|
|
524
|
+
this.resumeReadline();
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Show compact context summary - just a single line showing what's being sent
|
|
529
|
+
* In verbose mode, shows full context details
|
|
530
|
+
*/
|
|
531
|
+
showCompactContextSummary(prompt) {
|
|
532
|
+
const lines = prompt.split('\n');
|
|
533
|
+
const totalChars = prompt.length;
|
|
534
|
+
// Extract file count from the prompt
|
|
535
|
+
const filesMatch = prompt.match(/## Relevant Files\n([\s\S]*?)(?=\n##|\n#|$)/);
|
|
536
|
+
const fileSection = filesMatch ? filesMatch[1] : '';
|
|
537
|
+
const fileMatches = fileSection.match(/\*\*([^*]+)\*\*/g) || [];
|
|
538
|
+
const fileCount = fileMatches.length;
|
|
539
|
+
// Single compact line
|
|
540
|
+
console.log(theme_1.Theme.colors.muted(`\n 📤 Sending: ${fileCount} files, ${lines.length} lines (${totalChars} chars)`));
|
|
541
|
+
// In verbose mode, show full details
|
|
542
|
+
if (this.verboseMode) {
|
|
543
|
+
console.log(theme_1.Theme.colors.info('\n ┌─ 🔍 Verbose: Full Context Details ─────────────────────────┐'));
|
|
544
|
+
// Show files found
|
|
545
|
+
if (fileMatches.length > 0) {
|
|
546
|
+
console.log(theme_1.Theme.colors.muted(' │'));
|
|
547
|
+
console.log(theme_1.Theme.colors.info(' │ Files:'));
|
|
548
|
+
fileMatches.forEach(match => {
|
|
549
|
+
const fileName = String(match).replace(/\*\*/g, '');
|
|
550
|
+
console.log(theme_1.Theme.colors.muted(' │ ') + theme_1.Theme.colors.highlight(fileName));
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
// Extract and show relationships
|
|
554
|
+
const relMatch = prompt.match(/## Dependencies\n([\s\S]*?)(?=\n##|\n#|$)/);
|
|
555
|
+
if (relMatch) {
|
|
556
|
+
const relSection = relMatch[1];
|
|
557
|
+
const relLines = relSection.split('\n').filter(l => l.trim().startsWith('-'));
|
|
558
|
+
if (relLines.length > 0) {
|
|
559
|
+
console.log(theme_1.Theme.colors.muted(' │'));
|
|
560
|
+
console.log(theme_1.Theme.colors.info(' │ Relationships:'));
|
|
561
|
+
relLines.slice(0, 10).forEach(line => {
|
|
562
|
+
console.log(theme_1.Theme.colors.muted(' │ ') + theme_1.Theme.colors.muted(line.trim()));
|
|
563
|
+
});
|
|
564
|
+
if (relLines.length > 10) {
|
|
565
|
+
console.log(theme_1.Theme.colors.muted(` │ ... and ${relLines.length - 10} more`));
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
// Extract and show components
|
|
570
|
+
const compMatch = prompt.match(/## Components\n([\s\S]*?)(?=\n##|\n#|$)/);
|
|
571
|
+
if (compMatch) {
|
|
572
|
+
const compSection = compMatch[1];
|
|
573
|
+
const compLines = compSection.split('\n').filter(l => l.trim().startsWith('-'));
|
|
574
|
+
if (compLines.length > 0) {
|
|
575
|
+
console.log(theme_1.Theme.colors.muted(' │'));
|
|
576
|
+
console.log(theme_1.Theme.colors.info(' │ Components:'));
|
|
577
|
+
compLines.slice(0, 8).forEach(line => {
|
|
578
|
+
console.log(theme_1.Theme.colors.muted(' │ ') + theme_1.Theme.colors.muted(line.trim()));
|
|
579
|
+
});
|
|
580
|
+
if (compLines.length > 8) {
|
|
581
|
+
console.log(theme_1.Theme.colors.muted(` │ ... and ${compLines.length - 8} more`));
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
console.log(theme_1.Theme.colors.muted(' │'));
|
|
586
|
+
console.log(theme_1.Theme.colors.info(' │ Full Prompt:'));
|
|
587
|
+
// Show full prompt with line numbers
|
|
588
|
+
lines.forEach((line, i) => {
|
|
589
|
+
const lineNum = String(i + 1).padStart(4, ' ');
|
|
590
|
+
console.log(theme_1.Theme.colors.muted(` │ ${lineNum} │ `) + line);
|
|
591
|
+
});
|
|
592
|
+
console.log(theme_1.Theme.colors.info(' └──────────────────────────────────────────────────────────────┘'));
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Deduplicate proposed changes (same file path should only appear once)
|
|
597
|
+
*/
|
|
598
|
+
deduplicateChanges(changes) {
|
|
599
|
+
const seen = new Map();
|
|
600
|
+
for (const change of changes) {
|
|
601
|
+
// Keep the last change for each file path
|
|
602
|
+
seen.set(change.filePath, change);
|
|
603
|
+
}
|
|
604
|
+
return Array.from(seen.values());
|
|
605
|
+
}
|
|
606
|
+
/**
|
|
607
|
+
* Show what changes were applied
|
|
608
|
+
*/
|
|
609
|
+
showAppliedChanges(changes) {
|
|
610
|
+
console.log(theme_1.Theme.colors.success('\n✓ Changes applied:'));
|
|
611
|
+
changes.forEach((change, i) => {
|
|
612
|
+
const fileName = change.filePath.split(/[/\\]/).pop() || change.filePath;
|
|
613
|
+
const operation = change.tool === 'Write' ? 'Created' : 'Modified';
|
|
614
|
+
console.log(theme_1.Theme.colors.success(` ${i + 1}. ${operation}: ${fileName}`));
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Phase 1: Execute Claude and collect proposed changes without applying them
|
|
619
|
+
* Uses stream-json format to show Claude's thinking in real-time
|
|
620
|
+
*/
|
|
621
|
+
async executeClaudeFirstPhase(prompt) {
|
|
622
|
+
return new Promise((resolve) => {
|
|
623
|
+
const userCwd = process.env.CODESEEKER_USER_CWD || process.cwd();
|
|
624
|
+
// Use stream-json for real-time output with partial messages
|
|
625
|
+
// Note: --verbose is required when using --output-format stream-json with -p (--print)
|
|
626
|
+
const claudeArgs = ['-p', '--verbose', '--output-format', 'stream-json', '--include-partial-messages'];
|
|
627
|
+
const child = (0, child_process_1.spawn)('claude', claudeArgs, {
|
|
628
|
+
cwd: userCwd,
|
|
629
|
+
env: { ...process.env },
|
|
630
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
631
|
+
shell: true
|
|
632
|
+
});
|
|
633
|
+
let buffer = '';
|
|
634
|
+
let sessionId = '';
|
|
635
|
+
let finalResult = '';
|
|
636
|
+
const proposedChanges = [];
|
|
637
|
+
let lastDisplayedText = '';
|
|
638
|
+
let lastDisplayedThinking = '';
|
|
639
|
+
let isFirstOutput = true;
|
|
640
|
+
let currentToolName = '';
|
|
641
|
+
let lastToolStatus = '';
|
|
642
|
+
// Spinner configuration - only show briefly before Claude responds
|
|
643
|
+
const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
644
|
+
let spinnerIdx = 0;
|
|
645
|
+
let hasReceivedOutput = false;
|
|
646
|
+
let stderrBuffer = '';
|
|
647
|
+
const isTTY = process.stdout.isTTY;
|
|
648
|
+
// Show a brief waiting indicator until Claude starts responding
|
|
649
|
+
// Once Claude sends data, we'll show its actual thinking messages
|
|
650
|
+
let spinnerInterval = null;
|
|
651
|
+
if (isTTY) {
|
|
652
|
+
// Interactive terminal: minimal spinner just until Claude responds
|
|
653
|
+
spinnerInterval = setInterval(() => {
|
|
654
|
+
if (!hasReceivedOutput) {
|
|
655
|
+
const spinner = spinnerFrames[spinnerIdx++ % spinnerFrames.length];
|
|
656
|
+
// Simple spinner without verb - Claude will show its own thinking messages
|
|
657
|
+
process.stdout.write(`\r ${spinner} Waiting for Claude...`);
|
|
658
|
+
}
|
|
659
|
+
}, 100);
|
|
660
|
+
}
|
|
661
|
+
else {
|
|
662
|
+
// Non-interactive: show static message
|
|
663
|
+
process.stdout.write(' ⏳ Waiting for Claude...\n');
|
|
664
|
+
}
|
|
665
|
+
const stopSpinner = () => {
|
|
666
|
+
if (spinnerInterval) {
|
|
667
|
+
clearInterval(spinnerInterval);
|
|
668
|
+
spinnerInterval = null;
|
|
669
|
+
// Clear the spinner line in TTY mode
|
|
670
|
+
if (isTTY && !hasReceivedOutput) {
|
|
671
|
+
process.stdout.write('\r' + ' '.repeat(30) + '\r');
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
};
|
|
675
|
+
// Track active child for cancellation and key passthrough
|
|
676
|
+
this.activeChild = child;
|
|
677
|
+
// Write prompt to stdin but keep it open for Escape key passthrough
|
|
678
|
+
child.stdin?.write(prompt);
|
|
679
|
+
// Note: We don't call child.stdin?.end() here - Claude reads until newline
|
|
680
|
+
// and we need stdin open to forward Escape key presses
|
|
681
|
+
// Set up key passthrough for Escape key interruption
|
|
682
|
+
this.setupKeyPassthrough(child.stdin);
|
|
683
|
+
child.stdout?.on('data', (data) => {
|
|
684
|
+
// Stop the initial spinner once we receive any stdout data
|
|
685
|
+
if (!hasReceivedOutput) {
|
|
686
|
+
hasReceivedOutput = true;
|
|
687
|
+
stopSpinner();
|
|
688
|
+
}
|
|
689
|
+
buffer += data.toString();
|
|
690
|
+
// Process complete JSON lines
|
|
691
|
+
const lines = buffer.split('\n');
|
|
692
|
+
buffer = lines.pop() || ''; // Keep incomplete line in buffer
|
|
693
|
+
for (const line of lines) {
|
|
694
|
+
if (!line.trim())
|
|
695
|
+
continue;
|
|
696
|
+
try {
|
|
697
|
+
const event = JSON.parse(line);
|
|
698
|
+
// Handle different event types
|
|
699
|
+
if (event.type === 'assistant') {
|
|
700
|
+
// Partial assistant message - show Claude's thinking and reasoning
|
|
701
|
+
if (event.message?.content) {
|
|
702
|
+
for (const block of event.message.content) {
|
|
703
|
+
// Handle thinking/reasoning blocks (Claude's internal reasoning)
|
|
704
|
+
if (block.type === 'thinking') {
|
|
705
|
+
const thinkingText = block.thinking || '';
|
|
706
|
+
if (thinkingText.length > lastDisplayedThinking.length) {
|
|
707
|
+
const delta = thinkingText.substring(lastDisplayedThinking.length);
|
|
708
|
+
// First thinking block - show header with spinner
|
|
709
|
+
if (lastDisplayedThinking === '') {
|
|
710
|
+
const spinner = spinnerFrames[spinnerIdx++ % spinnerFrames.length];
|
|
711
|
+
process.stdout.write(theme_1.Theme.colors.muted(`\n ${spinner} Claude is thinking...\n`));
|
|
712
|
+
}
|
|
713
|
+
// Show Claude's actual thinking/reasoning in muted color
|
|
714
|
+
const formattedDelta = delta.replace(/\n/g, theme_1.Theme.colors.muted('\n │ '));
|
|
715
|
+
process.stdout.write(theme_1.Theme.colors.muted(` │ ${formattedDelta}`));
|
|
716
|
+
lastDisplayedThinking = thinkingText;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
// Handle regular text output
|
|
720
|
+
else if (block.type === 'text') {
|
|
721
|
+
const newText = block.text || '';
|
|
722
|
+
// Only show new text (delta)
|
|
723
|
+
if (newText.length > lastDisplayedText.length) {
|
|
724
|
+
const delta = newText.substring(lastDisplayedText.length);
|
|
725
|
+
if (isFirstOutput) {
|
|
726
|
+
// Start with Claude-themed bar prefix
|
|
727
|
+
process.stdout.write(theme_1.Theme.colors.claudeCode('\n │ '));
|
|
728
|
+
isFirstOutput = false;
|
|
729
|
+
}
|
|
730
|
+
// Show Claude's thinking with Claude theme color and handle newlines
|
|
731
|
+
const formattedDelta = delta.replace(/\n/g, theme_1.Theme.colors.claudeCode('\n │ '));
|
|
732
|
+
process.stdout.write(theme_1.Theme.colors.claudeCode(formattedDelta));
|
|
733
|
+
lastDisplayedText = newText;
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
// Handle tool use blocks (Read, Edit, Write, Bash, etc.)
|
|
737
|
+
else if (block.type === 'tool_use') {
|
|
738
|
+
const toolName = block.name || 'Tool';
|
|
739
|
+
currentToolName = toolName;
|
|
740
|
+
// Show tool invocation with spinner
|
|
741
|
+
const spinner = spinnerFrames[spinnerIdx++ % spinnerFrames.length];
|
|
742
|
+
const toolDisplay = this.formatToolDisplay(toolName, block.input);
|
|
743
|
+
// Skip permission denial notices - we handle these with our own prompt
|
|
744
|
+
if (toolDisplay.includes('permission') || toolDisplay.includes("haven't")) {
|
|
745
|
+
continue;
|
|
746
|
+
}
|
|
747
|
+
if (toolDisplay !== lastToolStatus) {
|
|
748
|
+
process.stdout.write(theme_1.Theme.colors.info(`\n ${spinner} ${toolDisplay}`));
|
|
749
|
+
lastToolStatus = toolDisplay;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
// Handle content_block_start events (tool starts)
|
|
756
|
+
else if (event.type === 'content_block_start') {
|
|
757
|
+
if (event.content_block?.type === 'tool_use') {
|
|
758
|
+
const toolName = event.content_block.name || 'Tool';
|
|
759
|
+
currentToolName = toolName;
|
|
760
|
+
const spinner = spinnerFrames[spinnerIdx++ % spinnerFrames.length];
|
|
761
|
+
process.stdout.write(theme_1.Theme.colors.info(`\n ${spinner} Using ${toolName}...`));
|
|
762
|
+
}
|
|
763
|
+
else if (event.content_block?.type === 'thinking') {
|
|
764
|
+
const spinner = spinnerFrames[spinnerIdx++ % spinnerFrames.length];
|
|
765
|
+
process.stdout.write(theme_1.Theme.colors.muted(`\n ${spinner} Claude is thinking...`));
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
// Handle tool result events (can come as 'tool_result' or nested in 'user' message)
|
|
769
|
+
else if (event.type === 'tool_result') {
|
|
770
|
+
if (currentToolName) {
|
|
771
|
+
// Show tool output using formatted display
|
|
772
|
+
const output = event.content || event.output || '';
|
|
773
|
+
const outputStr = typeof output === 'string' ? output : JSON.stringify(output);
|
|
774
|
+
const formattedResult = this.formatToolResult(currentToolName, outputStr);
|
|
775
|
+
if (formattedResult) {
|
|
776
|
+
process.stdout.write(formattedResult);
|
|
777
|
+
}
|
|
778
|
+
else {
|
|
779
|
+
process.stdout.write(theme_1.Theme.colors.success(' ✓'));
|
|
780
|
+
}
|
|
781
|
+
currentToolName = '';
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
// Handle 'user' type events which contain tool results in Claude Code stream-json
|
|
785
|
+
else if (event.type === 'user' && event.message?.content) {
|
|
786
|
+
for (const block of event.message.content) {
|
|
787
|
+
if (block.type === 'tool_result') {
|
|
788
|
+
// Extract tool result content
|
|
789
|
+
let resultContent = '';
|
|
790
|
+
if (typeof block.content === 'string') {
|
|
791
|
+
resultContent = block.content;
|
|
792
|
+
}
|
|
793
|
+
else if (Array.isArray(block.content)) {
|
|
794
|
+
resultContent = block.content
|
|
795
|
+
.map((c) => c.type === 'text' ? c.text : '')
|
|
796
|
+
.filter(Boolean)
|
|
797
|
+
.join('\n');
|
|
798
|
+
}
|
|
799
|
+
if (resultContent && currentToolName) {
|
|
800
|
+
const formattedResult = this.formatToolResult(currentToolName, resultContent);
|
|
801
|
+
if (formattedResult) {
|
|
802
|
+
process.stdout.write(formattedResult);
|
|
803
|
+
}
|
|
804
|
+
currentToolName = '';
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
else if (event.type === 'content_block_stop') {
|
|
810
|
+
// Just mark as complete if no result shown
|
|
811
|
+
if (currentToolName) {
|
|
812
|
+
process.stdout.write(theme_1.Theme.colors.success(' ✓'));
|
|
813
|
+
currentToolName = '';
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
else if (event.type === 'result') {
|
|
817
|
+
// Final result - extract session_id and permission_denials
|
|
818
|
+
if (!isFirstOutput) {
|
|
819
|
+
process.stdout.write('\n');
|
|
820
|
+
}
|
|
821
|
+
sessionId = event.session_id || '';
|
|
822
|
+
finalResult = event.result || '';
|
|
823
|
+
// Extract proposed changes from permission_denials
|
|
824
|
+
const denials = event.permission_denials || [];
|
|
825
|
+
for (const denial of denials) {
|
|
826
|
+
const isFileOperation = denial.tool_name === 'Write' || denial.tool_name === 'Edit';
|
|
827
|
+
const hasFilePath = denial.tool_input?.file_path;
|
|
828
|
+
if (isFileOperation && hasFilePath) {
|
|
829
|
+
const change = {
|
|
830
|
+
tool: denial.tool_name,
|
|
831
|
+
filePath: denial.tool_input.file_path
|
|
832
|
+
};
|
|
833
|
+
if (denial.tool_name === 'Write') {
|
|
834
|
+
change.content = denial.tool_input.content;
|
|
835
|
+
}
|
|
836
|
+
else if (denial.tool_name === 'Edit') {
|
|
837
|
+
change.oldString = denial.tool_input.old_string;
|
|
838
|
+
change.newString = denial.tool_input.new_string;
|
|
839
|
+
}
|
|
840
|
+
proposedChanges.push(change);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
catch {
|
|
846
|
+
// Ignore parse errors for incomplete lines
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
});
|
|
850
|
+
child.stderr?.on('data', (data) => {
|
|
851
|
+
const text = data.toString().trim();
|
|
852
|
+
stderrBuffer += text + '\n';
|
|
853
|
+
if (text) {
|
|
854
|
+
// Filter out Claude's permission denial messages - we handle these ourselves
|
|
855
|
+
if (text.includes('requested permissions') && text.includes("haven't")) {
|
|
856
|
+
return;
|
|
857
|
+
}
|
|
858
|
+
if (text.includes('permission') && text.includes('denied')) {
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
// Don't show raw stderr during normal operation - we'll analyze it on close
|
|
862
|
+
}
|
|
863
|
+
});
|
|
864
|
+
child.on('close', (code) => {
|
|
865
|
+
// Always stop spinner and clean up
|
|
866
|
+
stopSpinner();
|
|
867
|
+
this.cleanupKeyPassthrough();
|
|
868
|
+
this.activeChild = null;
|
|
869
|
+
// Check for Claude CLI specific errors in stderr
|
|
870
|
+
const claudeError = this.parseClaudeError(stderrBuffer, code);
|
|
871
|
+
if (claudeError) {
|
|
872
|
+
console.error(theme_1.Theme.colors.error(`\n ${claudeError}`));
|
|
873
|
+
resolve({
|
|
874
|
+
sessionId: '',
|
|
875
|
+
response: claudeError,
|
|
876
|
+
proposedChanges: [],
|
|
877
|
+
hasPermissionDenials: false
|
|
878
|
+
});
|
|
879
|
+
return;
|
|
880
|
+
}
|
|
881
|
+
// Process any remaining buffer
|
|
882
|
+
if (buffer.trim()) {
|
|
883
|
+
try {
|
|
884
|
+
const event = JSON.parse(buffer);
|
|
885
|
+
if (event.type === 'result') {
|
|
886
|
+
sessionId = event.session_id || sessionId;
|
|
887
|
+
finalResult = event.result || finalResult;
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
catch {
|
|
891
|
+
// Ignore
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
// Parse and display test results if any (language-agnostic)
|
|
895
|
+
const testResults = this.parseTestResults(lastDisplayedText);
|
|
896
|
+
if (testResults) {
|
|
897
|
+
this.displayTestSummary(testResults);
|
|
898
|
+
}
|
|
899
|
+
resolve({
|
|
900
|
+
sessionId,
|
|
901
|
+
response: finalResult,
|
|
902
|
+
proposedChanges,
|
|
903
|
+
hasPermissionDenials: proposedChanges.length > 0
|
|
904
|
+
});
|
|
905
|
+
});
|
|
906
|
+
child.on('error', (err) => {
|
|
907
|
+
// Stop spinner and clean up on error
|
|
908
|
+
stopSpinner();
|
|
909
|
+
this.cleanupKeyPassthrough();
|
|
910
|
+
this.activeChild = null;
|
|
911
|
+
// Handle specific spawn errors
|
|
912
|
+
let errorMessage = `Error: ${err.message}`;
|
|
913
|
+
if (err.message.includes('ENOENT') || err.message.includes('not found')) {
|
|
914
|
+
errorMessage = '❌ Claude CLI not found. Please install it with: npm install -g @anthropic-ai/claude-code';
|
|
915
|
+
}
|
|
916
|
+
console.error(theme_1.Theme.colors.error(`\n ${errorMessage}`));
|
|
917
|
+
resolve({
|
|
918
|
+
sessionId: '',
|
|
919
|
+
response: errorMessage,
|
|
920
|
+
proposedChanges: [],
|
|
921
|
+
hasPermissionDenials: false
|
|
922
|
+
});
|
|
923
|
+
});
|
|
924
|
+
// Timeout after 5 minutes
|
|
925
|
+
setTimeout(() => {
|
|
926
|
+
child.kill('SIGTERM');
|
|
927
|
+
}, 300000);
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* Phase 2: Resume the session with permissions to apply changes
|
|
932
|
+
* Uses streaming output to show Claude's reasoning and progress in real-time
|
|
933
|
+
*/
|
|
934
|
+
async executeClaudeSecondPhase(sessionId) {
|
|
935
|
+
return new Promise((resolve) => {
|
|
936
|
+
const userCwd = process.env.CODESEEKER_USER_CWD || process.cwd();
|
|
937
|
+
// Resume the session with permission mode to apply changes
|
|
938
|
+
// Use stream-json for real-time output
|
|
939
|
+
const claudeArgs = [
|
|
940
|
+
'-p',
|
|
941
|
+
'--verbose',
|
|
942
|
+
'--resume', sessionId,
|
|
943
|
+
'--permission-mode', 'acceptEdits',
|
|
944
|
+
'--output-format', 'stream-json',
|
|
945
|
+
'--include-partial-messages'
|
|
946
|
+
];
|
|
947
|
+
const child = (0, child_process_1.spawn)('claude', claudeArgs, {
|
|
948
|
+
cwd: userCwd,
|
|
949
|
+
env: { ...process.env },
|
|
950
|
+
stdio: ['pipe', 'pipe', 'pipe'],
|
|
951
|
+
shell: true
|
|
952
|
+
});
|
|
953
|
+
let buffer = '';
|
|
954
|
+
let finalResult = '';
|
|
955
|
+
let lastDisplayedText = '';
|
|
956
|
+
let isFirstOutput = true;
|
|
957
|
+
let currentToolName = '';
|
|
958
|
+
// Rotating spinner characters
|
|
959
|
+
const spinnerFrames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
960
|
+
let spinnerIdx = 0;
|
|
961
|
+
// Track active child for cancellation and key passthrough
|
|
962
|
+
this.activeChild = child;
|
|
963
|
+
// Send a simple "proceed" message but keep stdin open for Escape key passthrough
|
|
964
|
+
child.stdin?.write('Please proceed with the file changes.');
|
|
965
|
+
// Note: We don't call child.stdin?.end() here - we need stdin open for Escape key
|
|
966
|
+
// Set up key passthrough for Escape key interruption
|
|
967
|
+
this.setupKeyPassthrough(child.stdin);
|
|
968
|
+
child.stdout?.on('data', (data) => {
|
|
969
|
+
buffer += data.toString();
|
|
970
|
+
// Process complete JSON lines
|
|
971
|
+
const lines = buffer.split('\n');
|
|
972
|
+
buffer = lines.pop() || '';
|
|
973
|
+
for (const line of lines) {
|
|
974
|
+
if (!line.trim())
|
|
975
|
+
continue;
|
|
976
|
+
try {
|
|
977
|
+
const event = JSON.parse(line);
|
|
978
|
+
if (event.type === 'assistant') {
|
|
979
|
+
// Show Claude's reasoning during changes
|
|
980
|
+
if (event.message?.content) {
|
|
981
|
+
for (const block of event.message.content) {
|
|
982
|
+
if (block.type === 'text') {
|
|
983
|
+
const newText = block.text || '';
|
|
984
|
+
if (newText.length > lastDisplayedText.length) {
|
|
985
|
+
const delta = newText.substring(lastDisplayedText.length);
|
|
986
|
+
if (isFirstOutput) {
|
|
987
|
+
process.stdout.write(theme_1.Theme.colors.claudeCode('\n │ '));
|
|
988
|
+
isFirstOutput = false;
|
|
989
|
+
}
|
|
990
|
+
const formattedDelta = delta.replace(/\n/g, theme_1.Theme.colors.claudeCode('\n │ '));
|
|
991
|
+
process.stdout.write(theme_1.Theme.colors.claudeCode(formattedDelta));
|
|
992
|
+
lastDisplayedText = newText;
|
|
993
|
+
}
|
|
994
|
+
}
|
|
995
|
+
else if (block.type === 'tool_use') {
|
|
996
|
+
// Show tool invocations (Write, Edit, etc.)
|
|
997
|
+
const toolName = block.name || 'Tool';
|
|
998
|
+
currentToolName = toolName;
|
|
999
|
+
const spinner = spinnerFrames[spinnerIdx++ % spinnerFrames.length];
|
|
1000
|
+
const toolDisplay = this.formatToolDisplay(toolName, block.input);
|
|
1001
|
+
process.stdout.write(theme_1.Theme.colors.info(`\n ${spinner} ${toolDisplay}`));
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
else if (event.type === 'content_block_start') {
|
|
1007
|
+
if (event.content_block?.type === 'tool_use') {
|
|
1008
|
+
const toolName = event.content_block.name || 'Tool';
|
|
1009
|
+
currentToolName = toolName;
|
|
1010
|
+
const spinner = spinnerFrames[spinnerIdx++ % spinnerFrames.length];
|
|
1011
|
+
process.stdout.write(theme_1.Theme.colors.info(`\n ${spinner} Using ${toolName}...`));
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
else if (event.type === 'tool_result') {
|
|
1015
|
+
if (currentToolName) {
|
|
1016
|
+
// Show tool output using formatted display
|
|
1017
|
+
const output = event.content || event.output || '';
|
|
1018
|
+
const outputStr = typeof output === 'string' ? output : JSON.stringify(output);
|
|
1019
|
+
const formattedResult = this.formatToolResult(currentToolName, outputStr);
|
|
1020
|
+
if (formattedResult) {
|
|
1021
|
+
process.stdout.write(formattedResult);
|
|
1022
|
+
}
|
|
1023
|
+
else {
|
|
1024
|
+
process.stdout.write(theme_1.Theme.colors.success(' ✓'));
|
|
1025
|
+
}
|
|
1026
|
+
currentToolName = '';
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
// Handle 'user' type events which contain tool results in Claude Code stream-json
|
|
1030
|
+
else if (event.type === 'user' && event.message?.content) {
|
|
1031
|
+
for (const block of event.message.content) {
|
|
1032
|
+
if (block.type === 'tool_result') {
|
|
1033
|
+
// Extract tool result content
|
|
1034
|
+
let resultContent = '';
|
|
1035
|
+
if (typeof block.content === 'string') {
|
|
1036
|
+
resultContent = block.content;
|
|
1037
|
+
}
|
|
1038
|
+
else if (Array.isArray(block.content)) {
|
|
1039
|
+
resultContent = block.content
|
|
1040
|
+
.map((c) => c.type === 'text' ? c.text : '')
|
|
1041
|
+
.filter(Boolean)
|
|
1042
|
+
.join('\n');
|
|
1043
|
+
}
|
|
1044
|
+
if (resultContent && currentToolName) {
|
|
1045
|
+
const formattedResult = this.formatToolResult(currentToolName, resultContent);
|
|
1046
|
+
if (formattedResult) {
|
|
1047
|
+
process.stdout.write(formattedResult);
|
|
1048
|
+
}
|
|
1049
|
+
currentToolName = '';
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
else if (event.type === 'content_block_stop') {
|
|
1055
|
+
if (currentToolName) {
|
|
1056
|
+
process.stdout.write(theme_1.Theme.colors.success(' ✓'));
|
|
1057
|
+
currentToolName = '';
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
else if (event.type === 'result') {
|
|
1061
|
+
if (!isFirstOutput) {
|
|
1062
|
+
process.stdout.write('\n');
|
|
1063
|
+
}
|
|
1064
|
+
finalResult = event.result || '';
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
catch {
|
|
1068
|
+
// Ignore parse errors for incomplete lines
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
});
|
|
1072
|
+
child.stderr?.on('data', (data) => {
|
|
1073
|
+
const text = data.toString().trim();
|
|
1074
|
+
if (text && (text.includes('Error') || text.includes('error'))) {
|
|
1075
|
+
console.error(theme_1.Theme.colors.error(`\n ${text}`));
|
|
1076
|
+
}
|
|
1077
|
+
});
|
|
1078
|
+
child.on('close', () => {
|
|
1079
|
+
// Clean up key passthrough and active child reference
|
|
1080
|
+
this.cleanupKeyPassthrough();
|
|
1081
|
+
this.activeChild = null;
|
|
1082
|
+
// Process any remaining buffer
|
|
1083
|
+
if (buffer.trim()) {
|
|
1084
|
+
try {
|
|
1085
|
+
const event = JSON.parse(buffer);
|
|
1086
|
+
if (event.type === 'result') {
|
|
1087
|
+
finalResult = event.result || finalResult;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
catch {
|
|
1091
|
+
// Ignore
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
resolve(finalResult || lastDisplayedText || 'Changes applied');
|
|
1095
|
+
});
|
|
1096
|
+
child.on('error', (err) => {
|
|
1097
|
+
// Clean up on error too
|
|
1098
|
+
this.cleanupKeyPassthrough();
|
|
1099
|
+
this.activeChild = null;
|
|
1100
|
+
resolve(`Error applying changes: ${err.message}`);
|
|
1101
|
+
});
|
|
1102
|
+
// Timeout after 5 minutes
|
|
1103
|
+
setTimeout(() => {
|
|
1104
|
+
child.kill('SIGTERM');
|
|
1105
|
+
}, 300000);
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* Show proposed changes to user and ask for confirmation
|
|
1110
|
+
* Uses list-style prompt like Claude Code with Yes/Yes always/No/No with feedback options
|
|
1111
|
+
*/
|
|
1112
|
+
async showProposedChangesAndConfirm(changes) {
|
|
1113
|
+
// If skip approval is enabled, auto-approve
|
|
1114
|
+
if (this.skipApproval) {
|
|
1115
|
+
console.log(theme_1.Theme.colors.muted(`\n Auto-approving ${changes.length} change(s)...`));
|
|
1116
|
+
return { choice: 'yes' };
|
|
1117
|
+
}
|
|
1118
|
+
// Show full changes - no truncation
|
|
1119
|
+
console.log(theme_1.Theme.colors.warning('\n┌─ 📝 Proposed Changes ───────────────────────────��─────────┐'));
|
|
1120
|
+
for (let i = 0; i < changes.length; i++) {
|
|
1121
|
+
const change = changes[i];
|
|
1122
|
+
const fileName = change.filePath.split(/[/\\]/).pop() || change.filePath;
|
|
1123
|
+
const operation = change.tool === 'Write' ? '+ Create' : '~ Modify';
|
|
1124
|
+
const opColor = change.tool === 'Write' ? theme_1.Theme.colors.success : theme_1.Theme.colors.warning;
|
|
1125
|
+
console.log(theme_1.Theme.colors.muted('│'));
|
|
1126
|
+
console.log(theme_1.Theme.colors.muted('│ ') + opColor(`${operation}: ${change.filePath}`));
|
|
1127
|
+
if (change.tool === 'Write' && change.content) {
|
|
1128
|
+
// Show full file content for new files
|
|
1129
|
+
const contentLines = change.content.split('\n');
|
|
1130
|
+
console.log(theme_1.Theme.colors.muted('│'));
|
|
1131
|
+
contentLines.forEach(line => {
|
|
1132
|
+
console.log(theme_1.Theme.colors.muted('│ ') + theme_1.Theme.colors.success(`+ ${line}`));
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
else if (change.tool === 'Edit') {
|
|
1136
|
+
// Show full diff view
|
|
1137
|
+
if (change.oldString) {
|
|
1138
|
+
console.log(theme_1.Theme.colors.muted('│'));
|
|
1139
|
+
const oldLines = change.oldString.split('\n');
|
|
1140
|
+
oldLines.forEach(line => {
|
|
1141
|
+
console.log(theme_1.Theme.colors.muted('│ ') + theme_1.Theme.colors.error(`- ${line}`));
|
|
1142
|
+
});
|
|
1143
|
+
}
|
|
1144
|
+
if (change.newString) {
|
|
1145
|
+
console.log(theme_1.Theme.colors.muted('│'));
|
|
1146
|
+
const newLines = change.newString.split('\n');
|
|
1147
|
+
newLines.forEach(line => {
|
|
1148
|
+
console.log(theme_1.Theme.colors.muted('│ ') + theme_1.Theme.colors.success(`+ ${line}`));
|
|
1149
|
+
});
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
console.log(theme_1.Theme.colors.muted('│'));
|
|
1154
|
+
console.log(theme_1.Theme.colors.warning('└───────────────────────────────────────────────────────────┘'));
|
|
1155
|
+
console.log(theme_1.Theme.colors.muted(' Tip: Use ↑↓ to select, Enter to confirm, Ctrl+C to cancel'));
|
|
1156
|
+
// Ask for confirmation with list-style prompt (like Claude Code)
|
|
1157
|
+
// Options: Yes, Yes always, Modify request, Enter new command, or Ctrl+C to cancel
|
|
1158
|
+
this.pauseReadline();
|
|
1159
|
+
logger_1.Logger.mute();
|
|
1160
|
+
try {
|
|
1161
|
+
const answer = await inquirer_1.default.prompt([
|
|
1162
|
+
{
|
|
1163
|
+
type: 'list',
|
|
1164
|
+
name: 'choice',
|
|
1165
|
+
message: `Apply ${changes.length} change(s)?`,
|
|
1166
|
+
choices: [
|
|
1167
|
+
{ name: 'Yes', value: 'yes' },
|
|
1168
|
+
{ name: 'Yes, and don\'t ask again', value: 'yes_always' },
|
|
1169
|
+
{ name: 'No, enter new request', value: 'no_feedback' }
|
|
1170
|
+
],
|
|
1171
|
+
default: 'yes'
|
|
1172
|
+
}
|
|
1173
|
+
]);
|
|
1174
|
+
// If user wants to enter a new request (keeps context)
|
|
1175
|
+
if (answer.choice === 'no_feedback') {
|
|
1176
|
+
const feedbackAnswer = await inquirer_1.default.prompt([
|
|
1177
|
+
{
|
|
1178
|
+
type: 'input',
|
|
1179
|
+
name: 'feedback',
|
|
1180
|
+
message: 'Enter your request:',
|
|
1181
|
+
validate: (input) => input.trim().length > 0 || 'Please enter a request (or Ctrl+C to cancel)'
|
|
1182
|
+
}
|
|
1183
|
+
]);
|
|
1184
|
+
return { choice: 'no_feedback', feedback: feedbackAnswer.feedback };
|
|
1185
|
+
}
|
|
1186
|
+
return { choice: answer.choice };
|
|
1187
|
+
}
|
|
1188
|
+
catch (error) {
|
|
1189
|
+
if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
|
|
1190
|
+
console.log('\n⚠️ Cancelled');
|
|
1191
|
+
return { choice: 'cancelled' };
|
|
1192
|
+
}
|
|
1193
|
+
throw error;
|
|
1194
|
+
}
|
|
1195
|
+
finally {
|
|
1196
|
+
logger_1.Logger.unmute();
|
|
1197
|
+
this.resumeReadline();
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
/**
|
|
1201
|
+
* This method is now deprecated - file changes are confirmed before being applied
|
|
1202
|
+
* via showProposedChangesAndConfirm. Keeping for backwards compatibility.
|
|
1203
|
+
*/
|
|
1204
|
+
async confirmFileModifications(_filesToModify) {
|
|
1205
|
+
// Changes are now confirmed via showProposedChangesAndConfirm before being applied
|
|
1206
|
+
// This method is kept for backwards compatibility but no longer prompts
|
|
1207
|
+
return { approved: true, dontAskAgain: true };
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Ask user what verification steps to run after changes
|
|
1211
|
+
*/
|
|
1212
|
+
async confirmBuildAndTest() {
|
|
1213
|
+
if (this.skipApproval) {
|
|
1214
|
+
return { runBuild: true, runTests: true, generateTests: false };
|
|
1215
|
+
}
|
|
1216
|
+
this.pauseReadline();
|
|
1217
|
+
logger_1.Logger.mute();
|
|
1218
|
+
try {
|
|
1219
|
+
console.log(theme_1.Theme.sectionTitle('Verification Options', '🔍'));
|
|
1220
|
+
const answer = await inquirer_1.default.prompt([
|
|
1221
|
+
{
|
|
1222
|
+
type: 'checkbox',
|
|
1223
|
+
name: 'options',
|
|
1224
|
+
message: 'Select verification steps to run:',
|
|
1225
|
+
choices: [
|
|
1226
|
+
{ name: '🔨 Run build (npm run build)', value: 'build', checked: true },
|
|
1227
|
+
{ name: '🧪 Run existing tests (npm test)', value: 'test', checked: true },
|
|
1228
|
+
{ name: '📝 Generate new tests for changed files', value: 'generate_tests', checked: false }
|
|
1229
|
+
]
|
|
1230
|
+
}
|
|
1231
|
+
]);
|
|
1232
|
+
const options = {
|
|
1233
|
+
runBuild: answer.options.includes('build'),
|
|
1234
|
+
runTests: answer.options.includes('test'),
|
|
1235
|
+
generateTests: answer.options.includes('generate_tests')
|
|
1236
|
+
};
|
|
1237
|
+
// If generate tests is selected, ask for test type
|
|
1238
|
+
if (options.generateTests) {
|
|
1239
|
+
const testTypeAnswer = await inquirer_1.default.prompt([
|
|
1240
|
+
{
|
|
1241
|
+
type: 'list',
|
|
1242
|
+
name: 'testType',
|
|
1243
|
+
message: 'What type of tests to generate?',
|
|
1244
|
+
choices: [
|
|
1245
|
+
{ name: '🔬 Unit tests (test individual functions/classes in isolation)', value: 'unit' },
|
|
1246
|
+
{ name: '🔗 Integration tests (test component interactions)', value: 'integration' },
|
|
1247
|
+
{ name: '🖥️ E2E tests (test full user workflows)', value: 'e2e' }
|
|
1248
|
+
],
|
|
1249
|
+
default: 'unit'
|
|
1250
|
+
}
|
|
1251
|
+
]);
|
|
1252
|
+
options.testType = testTypeAnswer.testType;
|
|
1253
|
+
}
|
|
1254
|
+
// If nothing selected, confirm skip
|
|
1255
|
+
if (!options.runBuild && !options.runTests && !options.generateTests) {
|
|
1256
|
+
const skipConfirm = await inquirer_1.default.prompt([
|
|
1257
|
+
{
|
|
1258
|
+
type: 'confirm',
|
|
1259
|
+
name: 'skip',
|
|
1260
|
+
message: 'Skip all verification?',
|
|
1261
|
+
default: false
|
|
1262
|
+
}
|
|
1263
|
+
]);
|
|
1264
|
+
if (!skipConfirm.skip) {
|
|
1265
|
+
logger_1.Logger.unmute();
|
|
1266
|
+
this.resumeReadline();
|
|
1267
|
+
return this.confirmBuildAndTest();
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1270
|
+
return options;
|
|
1271
|
+
}
|
|
1272
|
+
catch (error) {
|
|
1273
|
+
if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
|
|
1274
|
+
console.log('\n⚠️ Prompt cancelled');
|
|
1275
|
+
return { runBuild: false, runTests: false, generateTests: false, cancelled: true };
|
|
1276
|
+
}
|
|
1277
|
+
throw error;
|
|
1278
|
+
}
|
|
1279
|
+
finally {
|
|
1280
|
+
logger_1.Logger.unmute();
|
|
1281
|
+
this.resumeReadline();
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
/**
|
|
1285
|
+
* Ask user how to handle build/test failure
|
|
1286
|
+
*/
|
|
1287
|
+
async promptFailureAction(failureType, errorMessage) {
|
|
1288
|
+
this.pauseReadline();
|
|
1289
|
+
logger_1.Logger.mute();
|
|
1290
|
+
try {
|
|
1291
|
+
console.log(theme_1.Theme.colors.error(`\n ❌ ${failureType === 'build' ? 'Build' : 'Test'} failed`));
|
|
1292
|
+
console.log(theme_1.Theme.colors.muted(` Error: ${errorMessage.substring(0, 200)}${errorMessage.length > 200 ? '...' : ''}\n`));
|
|
1293
|
+
const answer = await inquirer_1.default.prompt([
|
|
1294
|
+
{
|
|
1295
|
+
type: 'list',
|
|
1296
|
+
name: 'action',
|
|
1297
|
+
message: `How would you like to handle the ${failureType} failure?`,
|
|
1298
|
+
choices: [
|
|
1299
|
+
{ name: `🔧 Ask Claude to fix the ${failureType} error`, value: 'fix' },
|
|
1300
|
+
{ name: '⏭️ Continue anyway (skip this step)', value: 'continue' },
|
|
1301
|
+
{ name: '📋 Show full error output', value: 'show_error' },
|
|
1302
|
+
{ name: '❌ Abort workflow', value: 'abort' }
|
|
1303
|
+
]
|
|
1304
|
+
}
|
|
1305
|
+
]);
|
|
1306
|
+
return { action: answer.action, errorMessage };
|
|
1307
|
+
}
|
|
1308
|
+
catch (error) {
|
|
1309
|
+
if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
|
|
1310
|
+
return { action: 'abort', errorMessage };
|
|
1311
|
+
}
|
|
1312
|
+
throw error;
|
|
1313
|
+
}
|
|
1314
|
+
finally {
|
|
1315
|
+
logger_1.Logger.unmute();
|
|
1316
|
+
this.resumeReadline();
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* Ask user how to continue after an interruption
|
|
1321
|
+
* Used when user provides new input while a Claude session is active
|
|
1322
|
+
* @param hasActiveSession Whether there's an active Claude session that can be resumed
|
|
1323
|
+
* @returns The user's choice: continue (forward to Claude), new_search (fresh CodeSeeker search), or cancel
|
|
1324
|
+
*/
|
|
1325
|
+
async promptContinuationChoice(hasActiveSession) {
|
|
1326
|
+
this.pauseReadline();
|
|
1327
|
+
logger_1.Logger.mute();
|
|
1328
|
+
try {
|
|
1329
|
+
const choices = hasActiveSession
|
|
1330
|
+
? [
|
|
1331
|
+
{ name: 'Continue conversation (forward to Claude)', value: 'continue' },
|
|
1332
|
+
{ name: 'New search (find relevant files first)', value: 'new_search' },
|
|
1333
|
+
{ name: 'Cancel', value: 'cancel' }
|
|
1334
|
+
]
|
|
1335
|
+
: [
|
|
1336
|
+
{ name: 'New search (find relevant files first)', value: 'new_search' },
|
|
1337
|
+
{ name: 'Skip search (pass directly to Claude)', value: 'continue' },
|
|
1338
|
+
{ name: 'Cancel', value: 'cancel' }
|
|
1339
|
+
];
|
|
1340
|
+
const answer = await inquirer_1.default.prompt([
|
|
1341
|
+
{
|
|
1342
|
+
type: 'list',
|
|
1343
|
+
name: 'choice',
|
|
1344
|
+
message: 'How should I continue?',
|
|
1345
|
+
choices,
|
|
1346
|
+
default: hasActiveSession ? 'continue' : 'new_search'
|
|
1347
|
+
}
|
|
1348
|
+
]);
|
|
1349
|
+
return answer.choice;
|
|
1350
|
+
}
|
|
1351
|
+
catch (error) {
|
|
1352
|
+
if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
|
|
1353
|
+
return 'cancel';
|
|
1354
|
+
}
|
|
1355
|
+
throw error;
|
|
1356
|
+
}
|
|
1357
|
+
finally {
|
|
1358
|
+
logger_1.Logger.unmute();
|
|
1359
|
+
this.resumeReadline();
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
/**
|
|
1363
|
+
* Check if cancellation was requested
|
|
1364
|
+
*/
|
|
1365
|
+
wasCancelled() {
|
|
1366
|
+
return this.isCancelled;
|
|
1367
|
+
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Reset cancellation flag
|
|
1370
|
+
*/
|
|
1371
|
+
resetCancellation() {
|
|
1372
|
+
this.isCancelled = false;
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
* Get current search mode status
|
|
1376
|
+
*/
|
|
1377
|
+
isSearchEnabled() {
|
|
1378
|
+
return this.searchModeEnabled;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Set search mode enabled/disabled
|
|
1382
|
+
*/
|
|
1383
|
+
setSearchMode(enabled) {
|
|
1384
|
+
this.searchModeEnabled = enabled;
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Toggle search mode on/off
|
|
1388
|
+
*/
|
|
1389
|
+
toggleSearchMode() {
|
|
1390
|
+
this.searchModeEnabled = !this.searchModeEnabled;
|
|
1391
|
+
return this.searchModeEnabled;
|
|
1392
|
+
}
|
|
1393
|
+
/**
|
|
1394
|
+
* Prepare search mode for a new prompt
|
|
1395
|
+
*
|
|
1396
|
+
* NEW BEHAVIOR (simpler):
|
|
1397
|
+
* - Search mode PERSISTS between prompts (respects user's manual toggle)
|
|
1398
|
+
* - Default is ON (enabled at session start)
|
|
1399
|
+
* - User can toggle with /s at any time
|
|
1400
|
+
* - Only --no-search flag overrides this (handled in command-router.ts)
|
|
1401
|
+
*
|
|
1402
|
+
* @param forceOn If true, always enable search (used for -c mode)
|
|
1403
|
+
*/
|
|
1404
|
+
prepareForNewPrompt(forceOn = false) {
|
|
1405
|
+
if (forceOn) {
|
|
1406
|
+
// -c mode: always search
|
|
1407
|
+
this.searchModeEnabled = true;
|
|
1408
|
+
}
|
|
1409
|
+
// Otherwise: preserve current searchModeEnabled state
|
|
1410
|
+
// User can manually toggle with /s, and that preference persists
|
|
1411
|
+
}
|
|
1412
|
+
/**
|
|
1413
|
+
* Mark a conversation as complete (for REPL mode)
|
|
1414
|
+
* NOTE: This no longer changes search mode - search persists between prompts
|
|
1415
|
+
*/
|
|
1416
|
+
markConversationComplete() {
|
|
1417
|
+
// No-op - search mode persists between prompts
|
|
1418
|
+
// Users can toggle manually with /s if needed
|
|
1419
|
+
}
|
|
1420
|
+
/**
|
|
1421
|
+
* Reset session state (for new REPL sessions)
|
|
1422
|
+
*/
|
|
1423
|
+
resetSession() {
|
|
1424
|
+
this.searchModeEnabled = true;
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
* Show a compact pre-prompt menu for search mode toggle
|
|
1428
|
+
* Returns the user's choice and their prompt
|
|
1429
|
+
* @param hasActiveSession Whether there's an active Claude session (for context)
|
|
1430
|
+
*/
|
|
1431
|
+
async promptWithSearchToggle(hasActiveSession = false) {
|
|
1432
|
+
this.pauseReadline();
|
|
1433
|
+
logger_1.Logger.mute();
|
|
1434
|
+
try {
|
|
1435
|
+
// Show current mode status
|
|
1436
|
+
const modeIndicator = this.searchModeEnabled
|
|
1437
|
+
? theme_1.Theme.colors.success('🔍 Search: ON')
|
|
1438
|
+
: theme_1.Theme.colors.muted('🔍 Search: OFF');
|
|
1439
|
+
console.log(`\n ${modeIndicator}`);
|
|
1440
|
+
const answer = await inquirer_1.default.prompt([
|
|
1441
|
+
{
|
|
1442
|
+
type: 'list',
|
|
1443
|
+
name: 'action',
|
|
1444
|
+
message: 'Options:',
|
|
1445
|
+
choices: [
|
|
1446
|
+
{
|
|
1447
|
+
name: `Enter prompt ${this.searchModeEnabled ? '(with search)' : '(direct to Claude)'}`,
|
|
1448
|
+
value: 'prompt'
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
name: this.searchModeEnabled
|
|
1452
|
+
? 'Turn OFF search (skip file discovery)'
|
|
1453
|
+
: 'Turn ON search (find relevant files first)',
|
|
1454
|
+
value: 'toggle'
|
|
1455
|
+
},
|
|
1456
|
+
{ name: 'Cancel', value: 'cancel' }
|
|
1457
|
+
],
|
|
1458
|
+
default: 'prompt'
|
|
1459
|
+
}
|
|
1460
|
+
]);
|
|
1461
|
+
// Handle toggle action - recursively call to show updated menu
|
|
1462
|
+
if (answer.action === 'toggle') {
|
|
1463
|
+
this.toggleSearchMode();
|
|
1464
|
+
logger_1.Logger.unmute();
|
|
1465
|
+
this.resumeReadline();
|
|
1466
|
+
return this.promptWithSearchToggle(hasActiveSession);
|
|
1467
|
+
}
|
|
1468
|
+
// Handle cancel
|
|
1469
|
+
if (answer.action === 'cancel') {
|
|
1470
|
+
return { searchEnabled: this.searchModeEnabled, prompt: '', cancelled: true };
|
|
1471
|
+
}
|
|
1472
|
+
// Get the user's prompt
|
|
1473
|
+
const promptAnswer = await inquirer_1.default.prompt([
|
|
1474
|
+
{
|
|
1475
|
+
type: 'input',
|
|
1476
|
+
name: 'userPrompt',
|
|
1477
|
+
message: '💬',
|
|
1478
|
+
validate: (input) => input.trim().length > 0 || 'Please enter a prompt (or Ctrl+C to cancel)'
|
|
1479
|
+
}
|
|
1480
|
+
]);
|
|
1481
|
+
return {
|
|
1482
|
+
searchEnabled: this.searchModeEnabled,
|
|
1483
|
+
prompt: promptAnswer.userPrompt.trim(),
|
|
1484
|
+
cancelled: false
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
catch (error) {
|
|
1488
|
+
if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
|
|
1489
|
+
return { searchEnabled: this.searchModeEnabled, prompt: '', cancelled: true };
|
|
1490
|
+
}
|
|
1491
|
+
throw error;
|
|
1492
|
+
}
|
|
1493
|
+
finally {
|
|
1494
|
+
logger_1.Logger.unmute();
|
|
1495
|
+
this.resumeReadline();
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
/**
|
|
1499
|
+
* Show a minimal inline search toggle (single key press style)
|
|
1500
|
+
* For quick mode switching without a full menu
|
|
1501
|
+
* Format: "[S] Search: ON/OFF | Enter prompt:"
|
|
1502
|
+
*/
|
|
1503
|
+
async promptWithInlineToggle() {
|
|
1504
|
+
this.pauseReadline();
|
|
1505
|
+
logger_1.Logger.mute();
|
|
1506
|
+
try {
|
|
1507
|
+
// Compact inline display
|
|
1508
|
+
const searchStatus = this.searchModeEnabled ? 'ON' : 'OFF';
|
|
1509
|
+
const statusColor = this.searchModeEnabled ? theme_1.Theme.colors.success : theme_1.Theme.colors.muted;
|
|
1510
|
+
console.log(theme_1.Theme.colors.muted(`\n /s to toggle search | `) + statusColor(`Search: ${searchStatus}`));
|
|
1511
|
+
const answer = await inquirer_1.default.prompt([
|
|
1512
|
+
{
|
|
1513
|
+
type: 'input',
|
|
1514
|
+
name: 'input',
|
|
1515
|
+
message: '›',
|
|
1516
|
+
validate: (input) => {
|
|
1517
|
+
const trimmed = input.trim().toLowerCase();
|
|
1518
|
+
// Allow '/s' to toggle, empty is not allowed, anything else is the prompt
|
|
1519
|
+
if (trimmed === '') {
|
|
1520
|
+
return 'Enter your prompt, or type /s to toggle search mode';
|
|
1521
|
+
}
|
|
1522
|
+
return true;
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
]);
|
|
1526
|
+
const input = answer.input.trim();
|
|
1527
|
+
// Check if user wants to toggle (accepts /s or just s for convenience)
|
|
1528
|
+
if (input.toLowerCase() === '/s' || input.toLowerCase() === 's') {
|
|
1529
|
+
this.toggleSearchMode();
|
|
1530
|
+
logger_1.Logger.unmute();
|
|
1531
|
+
this.resumeReadline();
|
|
1532
|
+
// Recursively show the prompt again with updated status
|
|
1533
|
+
return this.promptWithInlineToggle();
|
|
1534
|
+
}
|
|
1535
|
+
return {
|
|
1536
|
+
searchEnabled: this.searchModeEnabled,
|
|
1537
|
+
prompt: input,
|
|
1538
|
+
cancelled: false
|
|
1539
|
+
};
|
|
1540
|
+
}
|
|
1541
|
+
catch (error) {
|
|
1542
|
+
if (error.name === 'ExitPromptError' || error.message?.includes('force closed')) {
|
|
1543
|
+
return { searchEnabled: this.searchModeEnabled, prompt: '', cancelled: true };
|
|
1544
|
+
}
|
|
1545
|
+
throw error;
|
|
1546
|
+
}
|
|
1547
|
+
finally {
|
|
1548
|
+
logger_1.Logger.unmute();
|
|
1549
|
+
this.resumeReadline();
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
/**
|
|
1553
|
+
* Get the search toggle indicator string for display
|
|
1554
|
+
* Returns a radio-button style indicator like "( * ) Search files" or "( ) Search files"
|
|
1555
|
+
* @param enabled Optional override for the search state, defaults to current state
|
|
1556
|
+
*/
|
|
1557
|
+
getSearchToggleIndicator(enabled) {
|
|
1558
|
+
const isEnabled = enabled !== undefined ? enabled : this.searchModeEnabled;
|
|
1559
|
+
const radioButton = isEnabled ? '(*)' : '( )';
|
|
1560
|
+
const color = isEnabled ? theme_1.Theme.colors.success : theme_1.Theme.colors.muted;
|
|
1561
|
+
return color(`${radioButton} Search files and knowledge graph`);
|
|
1562
|
+
}
|
|
1563
|
+
/**
|
|
1564
|
+
* Display the search toggle indicator (for use before prompts)
|
|
1565
|
+
* Shows: "( * ) Search files and knowledge graph" or "( ) Search files and knowledge graph"
|
|
1566
|
+
* Also shows toggle hint: "/s to toggle"
|
|
1567
|
+
*/
|
|
1568
|
+
displaySearchToggleIndicator() {
|
|
1569
|
+
const indicator = this.getSearchToggleIndicator();
|
|
1570
|
+
const toggleHint = theme_1.Theme.colors.muted('/s toggle');
|
|
1571
|
+
console.log(`\n ${indicator} ${toggleHint}`);
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Check if input is a search toggle command
|
|
1575
|
+
* Returns true if input is 's' or '/s' (toggle search)
|
|
1576
|
+
*/
|
|
1577
|
+
isSearchToggleCommand(input) {
|
|
1578
|
+
const trimmed = input.trim().toLowerCase();
|
|
1579
|
+
return trimmed === 's' || trimmed === '/s';
|
|
1580
|
+
}
|
|
1581
|
+
/**
|
|
1582
|
+
* Display execution summary
|
|
1583
|
+
*/
|
|
1584
|
+
displayExecutionSummary(summary, stats) {
|
|
1585
|
+
console.log('\n✅ CodeSeeker Execution Summary');
|
|
1586
|
+
console.log('━'.repeat(50));
|
|
1587
|
+
console.log(summary);
|
|
1588
|
+
if (stats) {
|
|
1589
|
+
console.log('\n📊 Analysis Statistics:');
|
|
1590
|
+
console.log(` • Files analyzed: ${stats.filesFound}`);
|
|
1591
|
+
console.log(` • Relationships found: ${stats.relationshipsFound}`);
|
|
1592
|
+
console.log(` • Assumptions detected: ${stats.assumptionsDetected}`);
|
|
1593
|
+
console.log(` • Clarifications provided: ${stats.clarificationsProvided}`);
|
|
1594
|
+
}
|
|
1595
|
+
console.log('');
|
|
1596
|
+
}
|
|
1597
|
+
/**
|
|
1598
|
+
* Generate clarification questions based on analysis
|
|
1599
|
+
*/
|
|
1600
|
+
generateClarificationQuestions(queryAnalysis) {
|
|
1601
|
+
const questions = [];
|
|
1602
|
+
// Questions based on assumptions
|
|
1603
|
+
queryAnalysis.assumptions.forEach(assumption => {
|
|
1604
|
+
if (assumption.includes('authentication')) {
|
|
1605
|
+
questions.push('What authentication method should be used? (JWT, session-based, OAuth, etc.)');
|
|
1606
|
+
}
|
|
1607
|
+
if (assumption.includes('database')) {
|
|
1608
|
+
questions.push('Which database tables/models should be involved in this operation?');
|
|
1609
|
+
}
|
|
1610
|
+
if (assumption.includes('API')) {
|
|
1611
|
+
questions.push('Should this be a REST endpoint, GraphQL resolver, or other API pattern?');
|
|
1612
|
+
}
|
|
1613
|
+
if (assumption.includes('testing')) {
|
|
1614
|
+
questions.push('What type of tests are needed? (unit, integration, e2e)');
|
|
1615
|
+
}
|
|
1616
|
+
});
|
|
1617
|
+
// Questions based on ambiguities
|
|
1618
|
+
queryAnalysis.ambiguities.forEach(ambiguity => {
|
|
1619
|
+
if (ambiguity.includes('Pronouns detected')) {
|
|
1620
|
+
questions.push('Which specific files or components should be modified?');
|
|
1621
|
+
}
|
|
1622
|
+
if (ambiguity.includes('Improvement request')) {
|
|
1623
|
+
questions.push('What specific improvements are you looking for? (performance, readability, security, etc.)');
|
|
1624
|
+
}
|
|
1625
|
+
if (ambiguity.includes('Comparison requested')) {
|
|
1626
|
+
questions.push('What should this be similar to? Please provide a reference example.');
|
|
1627
|
+
}
|
|
1628
|
+
});
|
|
1629
|
+
// Remove duplicates and limit to 3 questions to avoid overwhelming user
|
|
1630
|
+
return [...new Set(questions)].slice(0, 3);
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Parse test results from Claude's output (language-agnostic)
|
|
1634
|
+
* Supports: Jest, Mocha, pytest, Go test, Cargo test, PHPUnit, RSpec, JUnit, etc.
|
|
1635
|
+
*/
|
|
1636
|
+
parseTestResults(output) {
|
|
1637
|
+
if (!output)
|
|
1638
|
+
return null;
|
|
1639
|
+
// Pattern matchers for different test frameworks
|
|
1640
|
+
const patterns = [
|
|
1641
|
+
// Jest/Vitest: "Tests: 5 passed, 2 failed, 7 total" or "Tests: 42 passed, 42 total"
|
|
1642
|
+
{
|
|
1643
|
+
regex: /Tests:\s*(\d+)\s*passed(?:,\s*(\d+)\s*failed)?(?:,\s*(\d+)\s*skipped)?(?:,\s*(\d+)\s*total)?/i,
|
|
1644
|
+
framework: 'jest',
|
|
1645
|
+
extractor: (m) => ({
|
|
1646
|
+
passed: parseInt(m[1]) || 0,
|
|
1647
|
+
failed: parseInt(m[2]) || 0,
|
|
1648
|
+
skipped: parseInt(m[3]) || 0,
|
|
1649
|
+
total: parseInt(m[4]) || (parseInt(m[1]) || 0) + (parseInt(m[2]) || 0) + (parseInt(m[3]) || 0),
|
|
1650
|
+
framework: 'jest'
|
|
1651
|
+
})
|
|
1652
|
+
},
|
|
1653
|
+
// Mocha: "5 passing" / "2 failing" / "1 pending"
|
|
1654
|
+
{
|
|
1655
|
+
regex: /(\d+)\s*passing.*?(?:(\d+)\s*failing)?.*?(?:(\d+)\s*pending)?/is,
|
|
1656
|
+
framework: 'mocha',
|
|
1657
|
+
extractor: (m) => ({
|
|
1658
|
+
passed: parseInt(m[1]) || 0,
|
|
1659
|
+
failed: parseInt(m[2]) || 0,
|
|
1660
|
+
skipped: parseInt(m[3]) || 0,
|
|
1661
|
+
total: (parseInt(m[1]) || 0) + (parseInt(m[2]) || 0) + (parseInt(m[3]) || 0),
|
|
1662
|
+
framework: 'mocha'
|
|
1663
|
+
})
|
|
1664
|
+
},
|
|
1665
|
+
// pytest: "5 passed, 2 failed, 1 skipped" or "===== 5 passed in 0.12s ====="
|
|
1666
|
+
{
|
|
1667
|
+
regex: /(?:=+\s*)?(\d+)\s*passed(?:[,\s]+(\d+)\s*failed)?(?:[,\s]+(\d+)\s*skipped)?/i,
|
|
1668
|
+
framework: 'pytest',
|
|
1669
|
+
extractor: (m) => ({
|
|
1670
|
+
passed: parseInt(m[1]) || 0,
|
|
1671
|
+
failed: parseInt(m[2]) || 0,
|
|
1672
|
+
skipped: parseInt(m[3]) || 0,
|
|
1673
|
+
total: (parseInt(m[1]) || 0) + (parseInt(m[2]) || 0) + (parseInt(m[3]) || 0),
|
|
1674
|
+
framework: 'pytest'
|
|
1675
|
+
})
|
|
1676
|
+
},
|
|
1677
|
+
// Go test: "ok package 0.123s" (counts ok lines) or "PASS" / "FAIL"
|
|
1678
|
+
{
|
|
1679
|
+
regex: /(?:^|\n)(?:ok\s+|PASS\s*$)/gm,
|
|
1680
|
+
framework: 'go',
|
|
1681
|
+
extractor: (m) => {
|
|
1682
|
+
// For Go, we need to count all matches
|
|
1683
|
+
const okMatches = output.match(/(?:^|\n)ok\s+/gm) || [];
|
|
1684
|
+
const failMatches = output.match(/(?:^|\n)FAIL\s+/gm) || [];
|
|
1685
|
+
const passed = okMatches.length || (output.includes('PASS') ? 1 : 0);
|
|
1686
|
+
const failed = failMatches.length;
|
|
1687
|
+
return {
|
|
1688
|
+
passed,
|
|
1689
|
+
failed,
|
|
1690
|
+
total: passed + failed,
|
|
1691
|
+
framework: 'go'
|
|
1692
|
+
};
|
|
1693
|
+
}
|
|
1694
|
+
},
|
|
1695
|
+
// Cargo test (Rust): "test result: ok. 5 passed; 0 failed; 0 ignored"
|
|
1696
|
+
{
|
|
1697
|
+
regex: /test result:\s*(?:ok|FAILED)\.\s*(\d+)\s*passed;\s*(\d+)\s*failed;\s*(\d+)\s*ignored/i,
|
|
1698
|
+
framework: 'cargo',
|
|
1699
|
+
extractor: (m) => ({
|
|
1700
|
+
passed: parseInt(m[1]) || 0,
|
|
1701
|
+
failed: parseInt(m[2]) || 0,
|
|
1702
|
+
skipped: parseInt(m[3]) || 0,
|
|
1703
|
+
total: (parseInt(m[1]) || 0) + (parseInt(m[2]) || 0) + (parseInt(m[3]) || 0),
|
|
1704
|
+
framework: 'cargo'
|
|
1705
|
+
})
|
|
1706
|
+
},
|
|
1707
|
+
// PHPUnit: "OK (5 tests, 10 assertions)" or "FAILURES! Tests: 5, Failures: 2"
|
|
1708
|
+
{
|
|
1709
|
+
regex: /(?:OK\s*\((\d+)\s*tests?|Tests:\s*(\d+),\s*(?:Assertions:\s*\d+,\s*)?Failures:\s*(\d+))/i,
|
|
1710
|
+
framework: 'phpunit',
|
|
1711
|
+
extractor: (m) => {
|
|
1712
|
+
if (m[1]) {
|
|
1713
|
+
// OK case
|
|
1714
|
+
return { passed: parseInt(m[1]), failed: 0, total: parseInt(m[1]), framework: 'phpunit' };
|
|
1715
|
+
}
|
|
1716
|
+
// FAILURES case
|
|
1717
|
+
const total = parseInt(m[2]) || 0;
|
|
1718
|
+
const failed = parseInt(m[3]) || 0;
|
|
1719
|
+
return { passed: total - failed, failed, total, framework: 'phpunit' };
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
|
+
// RSpec (Ruby): "5 examples, 2 failures, 1 pending"
|
|
1723
|
+
{
|
|
1724
|
+
regex: /(\d+)\s*examples?,\s*(\d+)\s*failures?(?:,\s*(\d+)\s*pending)?/i,
|
|
1725
|
+
framework: 'rspec',
|
|
1726
|
+
extractor: (m) => ({
|
|
1727
|
+
passed: (parseInt(m[1]) || 0) - (parseInt(m[2]) || 0) - (parseInt(m[3]) || 0),
|
|
1728
|
+
failed: parseInt(m[2]) || 0,
|
|
1729
|
+
skipped: parseInt(m[3]) || 0,
|
|
1730
|
+
total: parseInt(m[1]) || 0,
|
|
1731
|
+
framework: 'rspec'
|
|
1732
|
+
})
|
|
1733
|
+
},
|
|
1734
|
+
// JUnit/Maven/Gradle: "Tests run: 5, Failures: 1, Errors: 0, Skipped: 1"
|
|
1735
|
+
{
|
|
1736
|
+
regex: /Tests run:\s*(\d+),\s*Failures:\s*(\d+),\s*Errors:\s*(\d+)(?:,\s*Skipped:\s*(\d+))?/i,
|
|
1737
|
+
framework: 'junit',
|
|
1738
|
+
extractor: (m) => {
|
|
1739
|
+
const total = parseInt(m[1]) || 0;
|
|
1740
|
+
const failures = parseInt(m[2]) || 0;
|
|
1741
|
+
const errors = parseInt(m[3]) || 0;
|
|
1742
|
+
const skipped = parseInt(m[4]) || 0;
|
|
1743
|
+
return {
|
|
1744
|
+
passed: total - failures - errors - skipped,
|
|
1745
|
+
failed: failures + errors,
|
|
1746
|
+
skipped,
|
|
1747
|
+
total,
|
|
1748
|
+
framework: 'junit'
|
|
1749
|
+
};
|
|
1750
|
+
}
|
|
1751
|
+
},
|
|
1752
|
+
// .NET/NUnit/xUnit: "Passed: 5, Failed: 2, Skipped: 1, Total: 8"
|
|
1753
|
+
{
|
|
1754
|
+
regex: /(?:Passed|Passed!):\s*(\d+)(?:.*?Failed:\s*(\d+))?(?:.*?Skipped:\s*(\d+))?(?:.*?Total:\s*(\d+))?/i,
|
|
1755
|
+
framework: 'dotnet',
|
|
1756
|
+
extractor: (m) => ({
|
|
1757
|
+
passed: parseInt(m[1]) || 0,
|
|
1758
|
+
failed: parseInt(m[2]) || 0,
|
|
1759
|
+
skipped: parseInt(m[3]) || 0,
|
|
1760
|
+
total: parseInt(m[4]) || (parseInt(m[1]) || 0) + (parseInt(m[2]) || 0) + (parseInt(m[3]) || 0),
|
|
1761
|
+
framework: 'dotnet'
|
|
1762
|
+
})
|
|
1763
|
+
}
|
|
1764
|
+
];
|
|
1765
|
+
// Try each pattern
|
|
1766
|
+
for (const { regex, extractor } of patterns) {
|
|
1767
|
+
const match = output.match(regex);
|
|
1768
|
+
if (match) {
|
|
1769
|
+
const result = extractor(match);
|
|
1770
|
+
// Validate we got meaningful results
|
|
1771
|
+
if (result.total > 0 || result.passed > 0 || result.failed > 0) {
|
|
1772
|
+
return result;
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
return null;
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* Parse Claude CLI stderr output to detect specific errors
|
|
1780
|
+
* Returns user-friendly error message or null if no error detected
|
|
1781
|
+
*/
|
|
1782
|
+
parseClaudeError(stderr, exitCode) {
|
|
1783
|
+
const lowerStderr = stderr.toLowerCase();
|
|
1784
|
+
// Check for authentication/login errors
|
|
1785
|
+
if (lowerStderr.includes('not logged in') || lowerStderr.includes('authentication') ||
|
|
1786
|
+
lowerStderr.includes('api key') || lowerStderr.includes('unauthorized') ||
|
|
1787
|
+
lowerStderr.includes('login required')) {
|
|
1788
|
+
return '❌ Claude authentication required. Please run: claude login';
|
|
1789
|
+
}
|
|
1790
|
+
// Check for rate limiting
|
|
1791
|
+
if (lowerStderr.includes('rate limit') || lowerStderr.includes('too many requests') ||
|
|
1792
|
+
lowerStderr.includes('429')) {
|
|
1793
|
+
return '⏳ Claude rate limit exceeded. Please wait a moment and try again.';
|
|
1794
|
+
}
|
|
1795
|
+
// Check for usage/quota exceeded
|
|
1796
|
+
if (lowerStderr.includes('usage limit') || lowerStderr.includes('quota exceeded') ||
|
|
1797
|
+
lowerStderr.includes('billing') || lowerStderr.includes('maximum usage')) {
|
|
1798
|
+
return '💳 Claude usage limit reached. Please check your subscription or wait for reset.';
|
|
1799
|
+
}
|
|
1800
|
+
// Check for network/connectivity issues
|
|
1801
|
+
if (lowerStderr.includes('network') || lowerStderr.includes('connection') ||
|
|
1802
|
+
lowerStderr.includes('timeout') || lowerStderr.includes('econnrefused') ||
|
|
1803
|
+
lowerStderr.includes('offline') || lowerStderr.includes('dns')) {
|
|
1804
|
+
return '🌐 Network error connecting to Claude. Please check your internet connection.';
|
|
1805
|
+
}
|
|
1806
|
+
// Check for server errors
|
|
1807
|
+
if (lowerStderr.includes('500') || lowerStderr.includes('502') ||
|
|
1808
|
+
lowerStderr.includes('503') || lowerStderr.includes('service unavailable') ||
|
|
1809
|
+
lowerStderr.includes('server error')) {
|
|
1810
|
+
return '🔧 Claude server temporarily unavailable. Please try again in a few minutes.';
|
|
1811
|
+
}
|
|
1812
|
+
// Check for model not available
|
|
1813
|
+
if (lowerStderr.includes('model not found') || lowerStderr.includes('model unavailable')) {
|
|
1814
|
+
return '🤖 Requested Claude model is not available. Try updating Claude CLI.';
|
|
1815
|
+
}
|
|
1816
|
+
// Generic error with non-zero exit code and stderr content
|
|
1817
|
+
if (exitCode !== 0 && stderr.trim() && !stderr.includes('permission')) {
|
|
1818
|
+
// Only show first line of error to keep it clean
|
|
1819
|
+
const firstLine = stderr.trim().split('\n')[0];
|
|
1820
|
+
if (firstLine.length > 100) {
|
|
1821
|
+
return `❌ Claude error: ${firstLine.substring(0, 100)}...`;
|
|
1822
|
+
}
|
|
1823
|
+
return `❌ Claude error: ${firstLine}`;
|
|
1824
|
+
}
|
|
1825
|
+
return null;
|
|
1826
|
+
}
|
|
1827
|
+
/**
|
|
1828
|
+
* Display test result summary in a user-friendly format
|
|
1829
|
+
*/
|
|
1830
|
+
displayTestSummary(summary) {
|
|
1831
|
+
const { passed, failed, skipped, framework } = summary;
|
|
1832
|
+
if (failed === 0) {
|
|
1833
|
+
// All tests passed
|
|
1834
|
+
console.log(theme_1.Theme.colors.success(`\n ✅ ${passed} test${passed !== 1 ? 's' : ''} passed`));
|
|
1835
|
+
}
|
|
1836
|
+
else {
|
|
1837
|
+
// Some tests failed
|
|
1838
|
+
console.log(theme_1.Theme.colors.error(`\n ❌ ${failed} test${failed !== 1 ? 's' : ''} failed, ${passed} passed`));
|
|
1839
|
+
}
|
|
1840
|
+
// Show skipped if any
|
|
1841
|
+
if (skipped && skipped > 0) {
|
|
1842
|
+
console.log(theme_1.Theme.colors.warning(` ⏭️ ${skipped} skipped`));
|
|
1843
|
+
}
|
|
1844
|
+
// Show framework if detected
|
|
1845
|
+
if (framework) {
|
|
1846
|
+
console.log(theme_1.Theme.colors.muted(` (${framework})`));
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* Format tool invocation for display
|
|
1851
|
+
* Shows detailed tool info with IN/OUT style display like Claude Code
|
|
1852
|
+
*/
|
|
1853
|
+
formatToolDisplay(toolName, input) {
|
|
1854
|
+
const filePath = input?.file_path || input?.path || '';
|
|
1855
|
+
const muted = theme_1.Theme.colors.muted;
|
|
1856
|
+
switch (toolName.toLowerCase()) {
|
|
1857
|
+
case 'read':
|
|
1858
|
+
return filePath ? `Read ${filePath}` : 'Read file...';
|
|
1859
|
+
case 'edit':
|
|
1860
|
+
if (filePath && input?.old_string) {
|
|
1861
|
+
const preview = input.old_string.substring(0, 60).replace(/\n/g, '↵');
|
|
1862
|
+
return `Edit ${filePath}\n${muted(' ├─ old: "' + preview + (input.old_string.length > 60 ? '...' : '') + '"')}`;
|
|
1863
|
+
}
|
|
1864
|
+
return filePath ? `Edit ${filePath}` : 'Edit file...';
|
|
1865
|
+
case 'write':
|
|
1866
|
+
if (filePath && input?.content) {
|
|
1867
|
+
const lineCount = (input.content.match(/\n/g) || []).length + 1;
|
|
1868
|
+
return `Write ${filePath} (${lineCount} lines)`;
|
|
1869
|
+
}
|
|
1870
|
+
return filePath ? `Write ${filePath}` : 'Write file...';
|
|
1871
|
+
case 'bash':
|
|
1872
|
+
const cmd = input?.command || '';
|
|
1873
|
+
const desc = input?.description || '';
|
|
1874
|
+
const cmdPreview = cmd.length > 80 ? cmd.substring(0, 80) + '...' : cmd;
|
|
1875
|
+
if (desc) {
|
|
1876
|
+
return `Bash: ${desc}\n${muted(' ├─ $ ' + cmdPreview)}`;
|
|
1877
|
+
}
|
|
1878
|
+
return cmd ? `Bash\n${muted(' ├─ $ ' + cmdPreview)}` : 'Bash...';
|
|
1879
|
+
case 'glob':
|
|
1880
|
+
const pattern = input?.pattern || '';
|
|
1881
|
+
const globPath = input?.path || '.';
|
|
1882
|
+
return pattern ? `Glob "${pattern}" in ${globPath}` : 'Glob...';
|
|
1883
|
+
case 'grep':
|
|
1884
|
+
const grepPattern = input?.pattern || '';
|
|
1885
|
+
const grepPath = input?.path || '.';
|
|
1886
|
+
return grepPattern ? `Grep "${grepPattern}" in ${grepPath}` : 'Grep...';
|
|
1887
|
+
case 'todowrite':
|
|
1888
|
+
const todoCount = input?.todos?.length || 0;
|
|
1889
|
+
return `TodoWrite (${todoCount} items)`;
|
|
1890
|
+
case 'task':
|
|
1891
|
+
const agentType = input?.subagent_type || 'general';
|
|
1892
|
+
const taskDesc = input?.description || '';
|
|
1893
|
+
return taskDesc ? `Task [${agentType}]: ${taskDesc}` : `Task launching ${agentType} agent`;
|
|
1894
|
+
case 'webfetch':
|
|
1895
|
+
return input?.url ? `WebFetch ${input.url}` : 'WebFetch...';
|
|
1896
|
+
case 'websearch':
|
|
1897
|
+
return input?.query ? `WebSearch "${input.query}"` : 'WebSearch...';
|
|
1898
|
+
default:
|
|
1899
|
+
return `${toolName}`;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
/**
|
|
1903
|
+
* Format tool result output for display (abbreviated)
|
|
1904
|
+
*/
|
|
1905
|
+
formatToolResult(toolName, output) {
|
|
1906
|
+
if (!output || !output.trim())
|
|
1907
|
+
return '';
|
|
1908
|
+
// Filter out permission denial messages - we handle these separately
|
|
1909
|
+
if (output.includes('requested permissions') && output.includes("haven't")) {
|
|
1910
|
+
return '';
|
|
1911
|
+
}
|
|
1912
|
+
if (output.includes('permission') && output.includes('denied')) {
|
|
1913
|
+
return '';
|
|
1914
|
+
}
|
|
1915
|
+
const lines = output.split('\n').filter(l => l.trim());
|
|
1916
|
+
const muted = theme_1.Theme.colors.muted;
|
|
1917
|
+
// In verbose mode, show more content
|
|
1918
|
+
const maxLines = this.verboseMode ? 15 : 8;
|
|
1919
|
+
const summaryLines = this.verboseMode ? 10 : 5;
|
|
1920
|
+
// For file reads, show content preview
|
|
1921
|
+
if (toolName.toLowerCase() === 'read') {
|
|
1922
|
+
if (lines.length > maxLines) {
|
|
1923
|
+
const preview = lines.slice(0, summaryLines).map(l => l.substring(0, 120)).join('\n ');
|
|
1924
|
+
return `\n${muted(' └─ ' + preview)}\n${muted(' ... (' + (lines.length - summaryLines) + ' more lines)')}`;
|
|
1925
|
+
}
|
|
1926
|
+
const preview = lines.slice(0, maxLines).map(l => l.substring(0, 120)).join('\n ');
|
|
1927
|
+
return `\n${muted(' └─ ' + preview)}`;
|
|
1928
|
+
}
|
|
1929
|
+
// For glob/grep, show files found
|
|
1930
|
+
if (toolName.toLowerCase() === 'glob' || toolName.toLowerCase() === 'grep') {
|
|
1931
|
+
const fileCount = lines.length;
|
|
1932
|
+
if (fileCount > maxLines) {
|
|
1933
|
+
const preview = lines.slice(0, summaryLines).join('\n ');
|
|
1934
|
+
return `\n${muted(' └─ ' + preview)}\n${muted(' ... (' + (fileCount - summaryLines) + ' more matches)')}`;
|
|
1935
|
+
}
|
|
1936
|
+
return `\n${muted(' └─ ' + lines.join('\n '))}`;
|
|
1937
|
+
}
|
|
1938
|
+
// For bash, show command output
|
|
1939
|
+
if (toolName.toLowerCase() === 'bash') {
|
|
1940
|
+
if (lines.length > maxLines) {
|
|
1941
|
+
const preview = lines.slice(0, summaryLines).map(l => l.substring(0, 120)).join('\n ');
|
|
1942
|
+
return `\n${muted(' └─ ' + preview)}\n${muted(' ... (' + (lines.length - summaryLines) + ' more lines)')}`;
|
|
1943
|
+
}
|
|
1944
|
+
const preview = lines.map(l => l.substring(0, 120)).join('\n ');
|
|
1945
|
+
return `\n${muted(' └─ ' + preview)}`;
|
|
1946
|
+
}
|
|
1947
|
+
// For Task (subagent), show agent output
|
|
1948
|
+
if (toolName.toLowerCase() === 'task') {
|
|
1949
|
+
if (lines.length > maxLines) {
|
|
1950
|
+
const preview = lines.slice(0, summaryLines).map(l => l.substring(0, 120)).join('\n ');
|
|
1951
|
+
return `\n${muted(' └─ ' + preview)}\n${muted(' ... (' + (lines.length - summaryLines) + ' more lines)')}`;
|
|
1952
|
+
}
|
|
1953
|
+
const preview = lines.map(l => l.substring(0, 120)).join('\n ');
|
|
1954
|
+
return `\n${muted(' └─ ' + preview)}`;
|
|
1955
|
+
}
|
|
1956
|
+
// Default: show abbreviated with reasonable limits
|
|
1957
|
+
if (lines.length > summaryLines) {
|
|
1958
|
+
const preview = lines.slice(0, summaryLines - 1).map(l => l.substring(0, 120)).join('\n ');
|
|
1959
|
+
return `\n${muted(' └─ ' + preview)}${muted('\n ... (' + (lines.length - summaryLines + 1) + ' more)')}`;
|
|
1960
|
+
}
|
|
1961
|
+
if (output.length < 100) {
|
|
1962
|
+
return ` → ${output.trim()}`;
|
|
1963
|
+
}
|
|
1964
|
+
const preview = lines.map(l => l.substring(0, 120)).join('\n ');
|
|
1965
|
+
return `\n${muted(' └─ ' + preview)}`;
|
|
1966
|
+
}
|
|
1967
|
+
/**
|
|
1968
|
+
* Parse Claude Code response to extract files and summary
|
|
1969
|
+
*/
|
|
1970
|
+
parseClaudeResponse(output) {
|
|
1971
|
+
// In a real implementation, this would parse Claude's structured output
|
|
1972
|
+
// For now, return a basic structure
|
|
1973
|
+
const filesToModify = [];
|
|
1974
|
+
// Look for file mentions in the output
|
|
1975
|
+
const fileMatches = output.match(/(?:src\/|\.\/)[a-zA-Z0-9\/_-]+\.[a-zA-Z]{2,4}/g);
|
|
1976
|
+
if (fileMatches) {
|
|
1977
|
+
filesToModify.push(...fileMatches);
|
|
1978
|
+
}
|
|
1979
|
+
return {
|
|
1980
|
+
response: output,
|
|
1981
|
+
filesToModify: [...new Set(filesToModify)], // Remove duplicates
|
|
1982
|
+
summary: 'Claude Code has processed the request and provided implementation suggestions'
|
|
1983
|
+
};
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
exports.UserInteractionService = UserInteractionService;
|
|
1987
|
+
//# sourceMappingURL=user-interaction-service.js.map
|