codehere 0.1.0 → 0.3.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.
Potentially problematic release.
This version of codehere might be problematic. Click here for more details.
- package/README.md +51 -25
- package/dist/agents/base.d.ts +107 -0
- package/dist/agents/base.d.ts.map +1 -0
- package/dist/agents/base.js +101 -0
- package/dist/agents/base.js.map +1 -0
- package/dist/agents/orchestrator-model-driven.d.ts +41 -0
- package/dist/agents/orchestrator-model-driven.d.ts.map +1 -0
- package/dist/agents/orchestrator-model-driven.js +141 -0
- package/dist/agents/orchestrator-model-driven.js.map +1 -0
- package/dist/agents/react-orchestrator-agent.d.ts +15 -0
- package/dist/agents/react-orchestrator-agent.d.ts.map +1 -0
- package/dist/agents/react-orchestrator-agent.js +54 -0
- package/dist/agents/react-orchestrator-agent.js.map +1 -0
- package/dist/application/agents/execution-agent.d.ts +68 -0
- package/dist/application/agents/execution-agent.d.ts.map +1 -0
- package/dist/application/agents/execution-agent.js +299 -0
- package/dist/application/agents/execution-agent.js.map +1 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts +65 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -0
- package/dist/application/agents/multi-agent-orchestrator.js +209 -0
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -0
- package/dist/application/agents/planning-agent.d.ts +61 -0
- package/dist/application/agents/planning-agent.d.ts.map +1 -0
- package/dist/application/agents/planning-agent.js +357 -0
- package/dist/application/agents/planning-agent.js.map +1 -0
- package/dist/application/agents/validation-agent.d.ts +64 -0
- package/dist/application/agents/validation-agent.d.ts.map +1 -0
- package/dist/application/agents/validation-agent.js +182 -0
- package/dist/application/agents/validation-agent.js.map +1 -0
- package/dist/application/architectures/plan-and-act.d.ts +94 -0
- package/dist/application/architectures/plan-and-act.d.ts.map +1 -0
- package/dist/application/architectures/plan-and-act.js +242 -0
- package/dist/application/architectures/plan-and-act.js.map +1 -0
- package/dist/application/index.d.ts +12 -0
- package/dist/application/index.d.ts.map +1 -0
- package/dist/application/index.js +12 -0
- package/dist/application/index.js.map +1 -0
- package/dist/application/services/agent-factory.d.ts +9 -0
- package/dist/application/services/agent-factory.d.ts.map +1 -0
- package/dist/application/services/agent-factory.js +28 -0
- package/dist/application/services/agent-factory.js.map +1 -0
- package/dist/application/services/dependency-container.d.ts +143 -0
- package/dist/application/services/dependency-container.d.ts.map +1 -0
- package/dist/application/services/dependency-container.js +426 -0
- package/dist/application/services/dependency-container.js.map +1 -0
- package/dist/application/services/git-context-service.d.ts +30 -0
- package/dist/application/services/git-context-service.d.ts.map +1 -0
- package/dist/application/services/git-context-service.js +83 -0
- package/dist/application/services/git-context-service.js.map +1 -0
- package/dist/application/services/intelligent-router.d.ts +74 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -0
- package/dist/application/services/intelligent-router.js +711 -0
- package/dist/application/services/intelligent-router.js.map +1 -0
- package/dist/application/services/tool-executor-service.d.ts +14 -0
- package/dist/application/services/tool-executor-service.d.ts.map +1 -0
- package/dist/application/services/tool-executor-service.js +94 -0
- package/dist/application/services/tool-executor-service.js.map +1 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts +48 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/ask-question-use-case.js +270 -0
- package/dist/application/use-cases/ask-question-use-case.js.map +1 -0
- package/dist/application/use-cases/edit-file-use-case.d.ts +76 -0
- package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/edit-file-use-case.js +752 -0
- package/dist/application/use-cases/edit-file-use-case.js.map +1 -0
- package/dist/application/use-cases/explain-file-use-case.d.ts +21 -0
- package/dist/application/use-cases/explain-file-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/explain-file-use-case.js +50 -0
- package/dist/application/use-cases/explain-file-use-case.js.map +1 -0
- package/dist/application/use-cases/index-codebase-use-case.d.ts +46 -0
- package/dist/application/use-cases/index-codebase-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/index-codebase-use-case.js +113 -0
- package/dist/application/use-cases/index-codebase-use-case.js.map +1 -0
- package/dist/application/use-cases/planning-use-case.d.ts +46 -0
- package/dist/application/use-cases/planning-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/planning-use-case.js +276 -0
- package/dist/application/use-cases/planning-use-case.js.map +1 -0
- package/dist/application/use-cases/react-orchestration-use-case.d.ts +51 -0
- package/dist/application/use-cases/react-orchestration-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/react-orchestration-use-case.js +329 -0
- package/dist/application/use-cases/react-orchestration-use-case.js.map +1 -0
- package/dist/application/use-cases/reflexion-use-case.d.ts +24 -0
- package/dist/application/use-cases/reflexion-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/reflexion-use-case.js +30 -0
- package/dist/application/use-cases/reflexion-use-case.js.map +1 -0
- package/dist/application/workflows/deterministic-workflows.d.ts +61 -0
- package/dist/application/workflows/deterministic-workflows.d.ts.map +1 -0
- package/dist/application/workflows/deterministic-workflows.js +189 -0
- package/dist/application/workflows/deterministic-workflows.js.map +1 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +1 -3
- package/dist/cache.js.map +1 -1
- package/dist/chat.js +10 -10
- package/dist/chat.js.map +1 -1
- package/dist/docs.d.ts.map +1 -1
- package/dist/docs.js +1 -2
- package/dist/docs.js.map +1 -1
- package/dist/domain/entities/code-chunk.d.ts +26 -0
- package/dist/domain/entities/code-chunk.d.ts.map +1 -0
- package/dist/domain/entities/code-chunk.js +6 -0
- package/dist/domain/entities/code-chunk.js.map +1 -0
- package/dist/domain/entities/decision.d.ts +37 -0
- package/dist/domain/entities/decision.d.ts.map +1 -0
- package/dist/domain/entities/decision.js +9 -0
- package/dist/domain/entities/decision.js.map +1 -0
- package/dist/domain/entities/edit.d.ts +35 -0
- package/dist/domain/entities/edit.d.ts.map +1 -0
- package/dist/domain/entities/edit.js +6 -0
- package/dist/domain/entities/edit.js.map +1 -0
- package/dist/domain/entities/knowledge-node.d.ts +83 -0
- package/dist/domain/entities/knowledge-node.d.ts.map +1 -0
- package/dist/domain/entities/knowledge-node.js +9 -0
- package/dist/domain/entities/knowledge-node.js.map +1 -0
- package/dist/domain/entities/knowledge-preservation.d.ts +42 -0
- package/dist/domain/entities/knowledge-preservation.d.ts.map +1 -0
- package/dist/domain/entities/knowledge-preservation.js +10 -0
- package/dist/domain/entities/knowledge-preservation.js.map +1 -0
- package/dist/domain/entities/memory.d.ts +36 -0
- package/dist/domain/entities/memory.d.ts.map +1 -0
- package/dist/domain/entities/memory.js +6 -0
- package/dist/domain/entities/memory.js.map +1 -0
- package/dist/domain/entities/pattern.d.ts +49 -0
- package/dist/domain/entities/pattern.d.ts.map +1 -0
- package/dist/domain/entities/pattern.js +7 -0
- package/dist/domain/entities/pattern.js.map +1 -0
- package/dist/domain/entities/plan.d.ts +42 -0
- package/dist/domain/entities/plan.d.ts.map +1 -0
- package/dist/domain/entities/plan.js +6 -0
- package/dist/domain/entities/plan.js.map +1 -0
- package/dist/domain/entities/query.d.ts +17 -0
- package/dist/domain/entities/query.d.ts.map +1 -0
- package/dist/domain/entities/query.js +6 -0
- package/dist/domain/entities/query.js.map +1 -0
- package/dist/domain/index.d.ts +16 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +19 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/interfaces/ai-service.interface.d.ts +62 -0
- package/dist/domain/interfaces/ai-service.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/ai-service.interface.js +6 -0
- package/dist/domain/interfaces/ai-service.interface.js.map +1 -0
- package/dist/domain/interfaces/code-analyzer.interface.d.ts +38 -0
- package/dist/domain/interfaces/code-analyzer.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/code-analyzer.interface.js +6 -0
- package/dist/domain/interfaces/code-analyzer.interface.js.map +1 -0
- package/dist/domain/interfaces/decision-repository.interface.d.ts +51 -0
- package/dist/domain/interfaces/decision-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/decision-repository.interface.js +9 -0
- package/dist/domain/interfaces/decision-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +28 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.js +6 -0
- package/dist/domain/interfaces/embedding-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts +91 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.js +9 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts +50 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.js +8 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/memory-repository.interface.d.ts +49 -0
- package/dist/domain/interfaces/memory-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/memory-repository.interface.js +6 -0
- package/dist/domain/interfaces/memory-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/pattern-repository.interface.d.ts +48 -0
- package/dist/domain/interfaces/pattern-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/pattern-repository.interface.js +6 -0
- package/dist/domain/interfaces/pattern-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/verification-service.interface.d.ts +20 -0
- package/dist/domain/interfaces/verification-service.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/verification-service.interface.js +6 -0
- package/dist/domain/interfaces/verification-service.interface.js.map +1 -0
- package/dist/domain/services/codebase-detector.d.ts +18 -0
- package/dist/domain/services/codebase-detector.d.ts.map +1 -0
- package/dist/domain/services/codebase-detector.js +91 -0
- package/dist/domain/services/codebase-detector.js.map +1 -0
- package/dist/domain/services/cross-team-pattern-sharing.d.ts +65 -0
- package/dist/domain/services/cross-team-pattern-sharing.d.ts.map +1 -0
- package/dist/domain/services/cross-team-pattern-sharing.js +125 -0
- package/dist/domain/services/cross-team-pattern-sharing.js.map +1 -0
- package/dist/domain/services/decision-recorder.d.ts +76 -0
- package/dist/domain/services/decision-recorder.d.ts.map +1 -0
- package/dist/domain/services/decision-recorder.js +223 -0
- package/dist/domain/services/decision-recorder.js.map +1 -0
- package/dist/domain/services/decision-retriever.d.ts +75 -0
- package/dist/domain/services/decision-retriever.d.ts.map +1 -0
- package/dist/domain/services/decision-retriever.js +133 -0
- package/dist/domain/services/decision-retriever.js.map +1 -0
- package/dist/domain/services/graded-memory-activation.d.ts +37 -0
- package/dist/domain/services/graded-memory-activation.d.ts.map +1 -0
- package/dist/domain/services/graded-memory-activation.js +69 -0
- package/dist/domain/services/graded-memory-activation.js.map +1 -0
- package/dist/domain/services/knowledge-access.d.ts +63 -0
- package/dist/domain/services/knowledge-access.d.ts.map +1 -0
- package/dist/domain/services/knowledge-access.js +132 -0
- package/dist/domain/services/knowledge-access.js.map +1 -0
- package/dist/domain/services/knowledge-extractor.d.ts +54 -0
- package/dist/domain/services/knowledge-extractor.d.ts.map +1 -0
- package/dist/domain/services/knowledge-extractor.js +247 -0
- package/dist/domain/services/knowledge-extractor.js.map +1 -0
- package/dist/domain/services/knowledge-graph-builder.d.ts +70 -0
- package/dist/domain/services/knowledge-graph-builder.d.ts.map +1 -0
- package/dist/domain/services/knowledge-graph-builder.js +268 -0
- package/dist/domain/services/knowledge-graph-builder.js.map +1 -0
- package/dist/domain/services/knowledge-graph-query.d.ts +69 -0
- package/dist/domain/services/knowledge-graph-query.d.ts.map +1 -0
- package/dist/domain/services/knowledge-graph-query.js +187 -0
- package/dist/domain/services/knowledge-graph-query.js.map +1 -0
- package/dist/domain/services/memory-retriever.d.ts +30 -0
- package/dist/domain/services/memory-retriever.d.ts.map +1 -0
- package/dist/domain/services/memory-retriever.js +82 -0
- package/dist/domain/services/memory-retriever.js.map +1 -0
- package/dist/domain/services/memory-synthesizer.d.ts +57 -0
- package/dist/domain/services/memory-synthesizer.d.ts.map +1 -0
- package/dist/domain/services/memory-synthesizer.js +91 -0
- package/dist/domain/services/memory-synthesizer.js.map +1 -0
- package/dist/domain/services/pattern-extractor.d.ts +108 -0
- package/dist/domain/services/pattern-extractor.d.ts.map +1 -0
- package/dist/domain/services/pattern-extractor.js +442 -0
- package/dist/domain/services/pattern-extractor.js.map +1 -0
- package/dist/domain/services/query-intent-classifier.d.ts +16 -0
- package/dist/domain/services/query-intent-classifier.d.ts.map +1 -0
- package/dist/domain/services/query-intent-classifier.js +140 -0
- package/dist/domain/services/query-intent-classifier.js.map +1 -0
- package/dist/domain/services/react-loop.d.ts +52 -0
- package/dist/domain/services/react-loop.d.ts.map +1 -0
- package/dist/domain/services/react-loop.js +186 -0
- package/dist/domain/services/react-loop.js.map +1 -0
- package/dist/edit.d.ts +0 -12
- package/dist/edit.d.ts.map +1 -1
- package/dist/edit.js +76 -351
- package/dist/edit.js.map +1 -1
- package/dist/embed.d.ts +0 -4
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.js +100 -174
- package/dist/embed.js.map +1 -1
- package/dist/error-handler.d.ts +1 -0
- package/dist/error-handler.d.ts.map +1 -1
- package/dist/error-handler.js +46 -3
- package/dist/error-handler.js.map +1 -1
- package/dist/formatter.d.ts +2 -2
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +30 -17
- package/dist/formatter.js.map +1 -1
- package/dist/index.js +355 -239
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts +56 -0
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/cohere-ai-service.js +594 -0
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -0
- package/dist/infrastructure/ai/command-r-evaluation.d.ts +42 -0
- package/dist/infrastructure/ai/command-r-evaluation.d.ts.map +1 -0
- package/dist/infrastructure/ai/command-r-evaluation.js +206 -0
- package/dist/infrastructure/ai/command-r-evaluation.js.map +1 -0
- package/dist/infrastructure/ai/model-config.d.ts +47 -0
- package/dist/infrastructure/ai/model-config.d.ts.map +1 -0
- package/dist/infrastructure/ai/model-config.js +84 -0
- package/dist/infrastructure/ai/model-config.js.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts +46 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.js +104 -0
- package/dist/infrastructure/cache/embedding-cache.js.map +1 -0
- package/dist/infrastructure/cache/query-result-cache.d.ts +68 -0
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/query-result-cache.js +138 -0
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts +57 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.js +124 -0
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -0
- package/dist/infrastructure/chunking/ast-code-chunker.d.ts +12 -0
- package/dist/infrastructure/chunking/ast-code-chunker.d.ts.map +1 -0
- package/dist/infrastructure/chunking/ast-code-chunker.js +19 -0
- package/dist/infrastructure/chunking/ast-code-chunker.js.map +1 -0
- package/dist/infrastructure/chunking/code-aware-chunker.d.ts +63 -0
- package/dist/infrastructure/chunking/code-aware-chunker.d.ts.map +1 -0
- package/dist/infrastructure/chunking/code-aware-chunker.js +397 -0
- package/dist/infrastructure/chunking/code-aware-chunker.js.map +1 -0
- package/dist/infrastructure/completion/bash-completion.d.ts +8 -0
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/bash-completion.js +101 -0
- package/dist/infrastructure/completion/bash-completion.js.map +1 -0
- package/dist/infrastructure/completion/completion-generator.d.ts +42 -0
- package/dist/infrastructure/completion/completion-generator.d.ts.map +1 -0
- package/dist/infrastructure/completion/completion-generator.js +184 -0
- package/dist/infrastructure/completion/completion-generator.js.map +1 -0
- package/dist/infrastructure/completion/fish-completion.d.ts +8 -0
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/fish-completion.js +65 -0
- package/dist/infrastructure/completion/fish-completion.js.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts +8 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.js +85 -0
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -0
- package/dist/infrastructure/config/config-manager.d.ts +79 -0
- package/dist/infrastructure/config/config-manager.d.ts.map +1 -0
- package/dist/infrastructure/config/config-manager.js +162 -0
- package/dist/infrastructure/config/config-manager.js.map +1 -0
- package/dist/infrastructure/context/context-compressor.d.ts +94 -0
- package/dist/infrastructure/context/context-compressor.d.ts.map +1 -0
- package/dist/infrastructure/context/context-compressor.js +329 -0
- package/dist/infrastructure/context/context-compressor.js.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts +90 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.js +353 -0
- package/dist/infrastructure/cost/cost-tracker.js.map +1 -0
- package/dist/infrastructure/file-scanner/file-scanner.d.ts +31 -0
- package/dist/infrastructure/file-scanner/file-scanner.d.ts.map +1 -0
- package/dist/infrastructure/file-scanner/file-scanner.js +106 -0
- package/dist/infrastructure/file-scanner/file-scanner.js.map +1 -0
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts +107 -0
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -0
- package/dist/infrastructure/governance/nist-ai-rmf.js +294 -0
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -0
- package/dist/infrastructure/governance/policy-as-code.d.ts +90 -0
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -0
- package/dist/infrastructure/governance/policy-as-code.js +259 -0
- package/dist/infrastructure/governance/policy-as-code.js.map +1 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +138 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.js +241 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -0
- package/dist/infrastructure/index.d.ts +7 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +7 -0
- package/dist/infrastructure/index.js.map +1 -0
- package/dist/infrastructure/observability/execution-tracer.d.ts +108 -0
- package/dist/infrastructure/observability/execution-tracer.d.ts.map +1 -0
- package/dist/infrastructure/observability/execution-tracer.js +227 -0
- package/dist/infrastructure/observability/execution-tracer.js.map +1 -0
- package/dist/infrastructure/observability/prompt-versioner.d.ts +67 -0
- package/dist/infrastructure/observability/prompt-versioner.d.ts.map +1 -0
- package/dist/infrastructure/observability/prompt-versioner.js +145 -0
- package/dist/infrastructure/observability/prompt-versioner.js.map +1 -0
- package/dist/infrastructure/protocols/a2a-metadata.d.ts +278 -0
- package/dist/infrastructure/protocols/a2a-metadata.d.ts.map +1 -0
- package/dist/infrastructure/protocols/a2a-metadata.js +137 -0
- package/dist/infrastructure/protocols/a2a-metadata.js.map +1 -0
- package/dist/infrastructure/protocols/a2a-protocol.d.ts +132 -0
- package/dist/infrastructure/protocols/a2a-protocol.d.ts.map +1 -0
- package/dist/infrastructure/protocols/a2a-protocol.js +314 -0
- package/dist/infrastructure/protocols/a2a-protocol.js.map +1 -0
- package/dist/infrastructure/protocols/mcp-oauth.d.ts +91 -0
- package/dist/infrastructure/protocols/mcp-oauth.d.ts.map +1 -0
- package/dist/infrastructure/protocols/mcp-oauth.js +184 -0
- package/dist/infrastructure/protocols/mcp-oauth.js.map +1 -0
- package/dist/infrastructure/protocols/mcp-server.d.ts +126 -0
- package/dist/infrastructure/protocols/mcp-server.d.ts.map +1 -0
- package/dist/infrastructure/protocols/mcp-server.js +333 -0
- package/dist/infrastructure/protocols/mcp-server.js.map +1 -0
- package/dist/infrastructure/protocols/streaming-handler.d.ts +57 -0
- package/dist/infrastructure/protocols/streaming-handler.d.ts.map +1 -0
- package/dist/infrastructure/protocols/streaming-handler.js +103 -0
- package/dist/infrastructure/protocols/streaming-handler.js.map +1 -0
- package/dist/infrastructure/security/ai-sast-scanner.d.ts +59 -0
- package/dist/infrastructure/security/ai-sast-scanner.d.ts.map +1 -0
- package/dist/infrastructure/security/ai-sast-scanner.js +241 -0
- package/dist/infrastructure/security/ai-sast-scanner.js.map +1 -0
- package/dist/infrastructure/security/docker-sandbox.d.ts +57 -0
- package/dist/infrastructure/security/docker-sandbox.d.ts.map +1 -0
- package/dist/infrastructure/security/docker-sandbox.js +178 -0
- package/dist/infrastructure/security/docker-sandbox.js.map +1 -0
- package/dist/infrastructure/security/enhanced-security-gate.d.ts +53 -0
- package/dist/infrastructure/security/enhanced-security-gate.d.ts.map +1 -0
- package/dist/infrastructure/security/enhanced-security-gate.js +151 -0
- package/dist/infrastructure/security/enhanced-security-gate.js.map +1 -0
- package/dist/infrastructure/security/input-validator.d.ts +33 -0
- package/dist/infrastructure/security/input-validator.d.ts.map +1 -0
- package/dist/infrastructure/security/input-validator.js +152 -0
- package/dist/infrastructure/security/input-validator.js.map +1 -0
- package/dist/infrastructure/security/license-scanner.d.ts +55 -0
- package/dist/infrastructure/security/license-scanner.d.ts.map +1 -0
- package/dist/infrastructure/security/license-scanner.js +167 -0
- package/dist/infrastructure/security/license-scanner.js.map +1 -0
- package/dist/infrastructure/security/provider-bias-detector.d.ts +53 -0
- package/dist/infrastructure/security/provider-bias-detector.d.ts.map +1 -0
- package/dist/infrastructure/security/provider-bias-detector.js +164 -0
- package/dist/infrastructure/security/provider-bias-detector.js.map +1 -0
- package/dist/infrastructure/security/sandbox-executor.d.ts +34 -0
- package/dist/infrastructure/security/sandbox-executor.d.ts.map +1 -0
- package/dist/infrastructure/security/sandbox-executor.js +64 -0
- package/dist/infrastructure/security/sandbox-executor.js.map +1 -0
- package/dist/infrastructure/storage/memory-stream-service.d.ts +47 -0
- package/dist/infrastructure/storage/memory-stream-service.d.ts.map +1 -0
- package/dist/infrastructure/storage/memory-stream-service.js +204 -0
- package/dist/infrastructure/storage/memory-stream-service.js.map +1 -0
- package/dist/infrastructure/storage/plan-repository.d.ts +38 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/plan-repository.js +133 -0
- package/dist/infrastructure/storage/plan-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.d.ts +29 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.js +232 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +35 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +277 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts +41 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js +417 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts +29 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js +230 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.d.ts +40 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.js +229 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts +25 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.js +249 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.js.map +1 -0
- package/dist/infrastructure/ux/appropriate-friction.d.ts +77 -0
- package/dist/infrastructure/ux/appropriate-friction.d.ts.map +1 -0
- package/dist/infrastructure/ux/appropriate-friction.js +213 -0
- package/dist/infrastructure/ux/appropriate-friction.js.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts +109 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.js +200 -0
- package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +24 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.js +144 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -0
- package/dist/infrastructure/ux/expectation-management.d.ts +98 -0
- package/dist/infrastructure/ux/expectation-management.d.ts.map +1 -0
- package/dist/infrastructure/ux/expectation-management.js +327 -0
- package/dist/infrastructure/ux/expectation-management.js.map +1 -0
- package/dist/infrastructure/ux/feature-discovery.d.ts +47 -0
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/feature-discovery.js +190 -0
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts +47 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.js +225 -0
- package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts +104 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -0
- package/dist/infrastructure/ux/hitl-validation.js +211 -0
- package/dist/infrastructure/ux/hitl-validation.js.map +1 -0
- package/dist/infrastructure/ux/progress-indicator.d.ts +54 -0
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -0
- package/dist/infrastructure/ux/progress-indicator.js +121 -0
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -0
- package/dist/infrastructure/ux/progressive-disclosure.d.ts +84 -0
- package/dist/infrastructure/ux/progressive-disclosure.d.ts.map +1 -0
- package/dist/infrastructure/ux/progressive-disclosure.js +236 -0
- package/dist/infrastructure/ux/progressive-disclosure.js.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts +35 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.js +119 -0
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +47 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.js +144 -0
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +21 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.js +172 -0
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -0
- package/dist/infrastructure/ux/team-standards.d.ts +94 -0
- package/dist/infrastructure/ux/team-standards.d.ts.map +1 -0
- package/dist/infrastructure/ux/team-standards.js +196 -0
- package/dist/infrastructure/ux/team-standards.js.map +1 -0
- package/dist/infrastructure/verification/verification-service.d.ts +12 -0
- package/dist/infrastructure/verification/verification-service.d.ts.map +1 -0
- package/dist/infrastructure/verification/verification-service.js +47 -0
- package/dist/infrastructure/verification/verification-service.js.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts +73 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.js +174 -0
- package/dist/infrastructure/xai/attention-visualizer.js.map +1 -0
- package/dist/infrastructure/xai/cot-visualizer.d.ts +106 -0
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -0
- package/dist/infrastructure/xai/cot-visualizer.js +286 -0
- package/dist/infrastructure/xai/cot-visualizer.js.map +1 -0
- package/dist/infrastructure/xai/decision-tree-log.d.ts +104 -0
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -0
- package/dist/infrastructure/xai/decision-tree-log.js +216 -0
- package/dist/infrastructure/xai/decision-tree-log.js.map +1 -0
- package/dist/infrastructure/xai/interactive-xai.d.ts +106 -0
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -0
- package/dist/infrastructure/xai/interactive-xai.js +262 -0
- package/dist/infrastructure/xai/interactive-xai.js.map +1 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +80 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.js +201 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -0
- package/dist/intelligent-retrieval.d.ts.map +1 -1
- package/dist/intelligent-retrieval.js +8 -1
- package/dist/intelligent-retrieval.js.map +1 -1
- package/dist/intent/classifier.d.ts +6 -0
- package/dist/intent/classifier.d.ts.map +1 -0
- package/dist/intent/classifier.js +2 -0
- package/dist/intent/classifier.js.map +1 -0
- package/dist/intent/context.d.ts +4 -0
- package/dist/intent/context.d.ts.map +1 -0
- package/dist/intent/context.js +2 -0
- package/dist/intent/context.js.map +1 -0
- package/dist/iterative-refinement.d.ts.map +1 -1
- package/dist/iterative-refinement.js +20 -3
- package/dist/iterative-refinement.js.map +1 -1
- package/dist/learning.d.ts.map +1 -1
- package/dist/learning.js +1 -2
- package/dist/learning.js.map +1 -1
- package/dist/monitoring.d.ts.map +1 -1
- package/dist/monitoring.js +1 -2
- package/dist/monitoring.js.map +1 -1
- package/dist/parallel-processor.d.ts +3 -2
- package/dist/parallel-processor.d.ts.map +1 -1
- package/dist/parallel-processor.js +183 -56
- package/dist/parallel-processor.js.map +1 -1
- package/dist/presentation/cli/commands/ask-command.d.ts +8 -0
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/ask-command.js +190 -0
- package/dist/presentation/cli/commands/ask-command.js.map +1 -0
- package/dist/presentation/cli/commands/config-command.d.ts +9 -0
- package/dist/presentation/cli/commands/config-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/config-command.js +123 -0
- package/dist/presentation/cli/commands/config-command.js.map +1 -0
- package/dist/presentation/cli/commands/cost-command.d.ts +8 -0
- package/dist/presentation/cli/commands/cost-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/cost-command.js +191 -0
- package/dist/presentation/cli/commands/cost-command.js.map +1 -0
- package/dist/presentation/cli/commands/decision-command.d.ts +12 -0
- package/dist/presentation/cli/commands/decision-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/decision-command.js +207 -0
- package/dist/presentation/cli/commands/decision-command.js.map +1 -0
- package/dist/presentation/cli/commands/help-command.d.ts +9 -0
- package/dist/presentation/cli/commands/help-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/help-command.js +281 -0
- package/dist/presentation/cli/commands/help-command.js.map +1 -0
- package/dist/presentation/cli/commands/knowledge-command.d.ts +13 -0
- package/dist/presentation/cli/commands/knowledge-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/knowledge-command.js +129 -0
- package/dist/presentation/cli/commands/knowledge-command.js.map +1 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.d.ts +8 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.js +183 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.js.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts +9 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.js +146 -0
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -0
- package/dist/presentation/cli/commands/plan-command.d.ts +8 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/plan-command.js +166 -0
- package/dist/presentation/cli/commands/plan-command.js.map +1 -0
- package/dist/presentation/cli/commands/react-command.d.ts +8 -0
- package/dist/presentation/cli/commands/react-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/react-command.js +179 -0
- package/dist/presentation/cli/commands/react-command.js.map +1 -0
- package/dist/presentation/cli/commands/setup-command.d.ts +10 -0
- package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/setup-command.js +286 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -0
- package/dist/presentation/cli/commands/smart-command.d.ts +6 -0
- package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/smart-command.js +330 -0
- package/dist/presentation/cli/commands/smart-command.js.map +1 -0
- package/dist/presentation/cli/commands/trace-command.d.ts +8 -0
- package/dist/presentation/cli/commands/trace-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/trace-command.js +129 -0
- package/dist/presentation/cli/commands/trace-command.js.map +1 -0
- package/dist/presentation/cli/commands/undo-command.d.ts +8 -0
- package/dist/presentation/cli/commands/undo-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/undo-command.js +150 -0
- package/dist/presentation/cli/commands/undo-command.js.map +1 -0
- package/dist/presentation/cli/error-display.d.ts +25 -0
- package/dist/presentation/cli/error-display.d.ts.map +1 -0
- package/dist/presentation/cli/error-display.js +297 -0
- package/dist/presentation/cli/error-display.js.map +1 -0
- package/dist/presentation/cli/keyboard-shortcuts.d.ts +27 -0
- package/dist/presentation/cli/keyboard-shortcuts.d.ts.map +1 -0
- package/dist/presentation/cli/keyboard-shortcuts.js +77 -0
- package/dist/presentation/cli/keyboard-shortcuts.js.map +1 -0
- package/dist/refactor.d.ts.map +1 -1
- package/dist/refactor.js +2 -4
- package/dist/refactor.js.map +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +2 -63
- package/dist/search.js.map +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +72 -3
- package/dist/session.js.map +1 -1
- package/dist/testgen.d.ts.map +1 -1
- package/dist/testgen.js +1 -2
- package/dist/testgen.js.map +1 -1
- package/dist/tools/bash.d.ts +53 -0
- package/dist/tools/bash.d.ts.map +1 -0
- package/dist/tools/bash.js +213 -0
- package/dist/tools/bash.js.map +1 -0
- package/dist/tools/edit.d.ts +48 -0
- package/dist/tools/edit.d.ts.map +1 -0
- package/dist/tools/edit.js +235 -0
- package/dist/tools/edit.js.map +1 -0
- package/dist/tools/executor.d.ts +29 -0
- package/dist/tools/executor.d.ts.map +1 -0
- package/dist/tools/executor.js +153 -0
- package/dist/tools/executor.js.map +1 -0
- package/dist/tools/git-tool.d.ts +87 -0
- package/dist/tools/git-tool.d.ts.map +1 -0
- package/dist/tools/git-tool.js +292 -0
- package/dist/tools/git-tool.js.map +1 -0
- package/dist/tools/parser.d.ts +33 -0
- package/dist/tools/parser.d.ts.map +1 -0
- package/dist/tools/parser.js +158 -0
- package/dist/tools/parser.js.map +1 -0
- package/dist/tools/registry.d.ts +74 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +302 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/search.d.ts +41 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +100 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +4 -2
- package/dist/ui.js.map +1 -1
- package/dist/utils/check-api-status.d.ts +12 -0
- package/dist/utils/check-api-status.d.ts.map +1 -0
- package/dist/utils/check-api-status.js +82 -0
- package/dist/utils/check-api-status.js.map +1 -0
- package/dist/utils/diff-parser.d.ts +22 -0
- package/dist/utils/diff-parser.d.ts.map +1 -0
- package/dist/utils/diff-parser.js +160 -0
- package/dist/utils/diff-parser.js.map +1 -0
- package/dist/utils/logger.d.ts +34 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +56 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/version.d.ts +21 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +52 -0
- package/dist/utils/version.js.map +1 -0
- package/dist/verification/backup.d.ts +30 -0
- package/dist/verification/backup.d.ts.map +1 -0
- package/dist/verification/backup.js +259 -0
- package/dist/verification/backup.js.map +1 -0
- package/dist/verification/compiler.d.ts +20 -0
- package/dist/verification/compiler.d.ts.map +1 -0
- package/dist/verification/compiler.js +263 -0
- package/dist/verification/compiler.js.map +1 -0
- package/dist/verification/index.d.ts +59 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +273 -0
- package/dist/verification/index.js.map +1 -0
- package/dist/verification/test-runner.d.ts +27 -0
- package/dist/verification/test-runner.d.ts.map +1 -0
- package/dist/verification/test-runner.js +379 -0
- package/dist/verification/test-runner.js.map +1 -0
- package/package.json +39 -14
- package/ARCHITECTURE.md +0 -240
- package/CHANGELOG.md +0 -44
- package/CONTRIBUTING.md +0 -171
- package/dist/benchmark.d.ts +0 -39
- package/dist/benchmark.d.ts.map +0 -1
- package/dist/benchmark.js +0 -195
- package/dist/benchmark.js.map +0 -1
- package/dist/scaffold.d.ts +0 -14
- package/dist/scaffold.d.ts.map +0 -1
- package/dist/scaffold.js +0 -85
- package/dist/scaffold.js.map +0 -1
- package/templates/next-page/app/layout.tsx +0 -19
- package/templates/next-page/app/page.tsx +0 -10
- package/templates/next-page/package.json +0 -22
- package/templates/node-api/index.js +0 -57
- package/templates/node-api/package.json +0 -13
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized Error Display Utility
|
|
3
|
+
* Provides consistent, helpful error messages with recovery suggestions
|
|
4
|
+
*
|
|
5
|
+
* Clean Architecture: Presentation Layer
|
|
6
|
+
*/
|
|
7
|
+
import { ErrorType, classifyError, EnterpriseError } from '../../error-handler.js';
|
|
8
|
+
import { colors, separator, newline, symbols } from '../../ui.js';
|
|
9
|
+
/**
|
|
10
|
+
* Determine error severity based on error type
|
|
11
|
+
*/
|
|
12
|
+
function getErrorSeverity(errorType) {
|
|
13
|
+
switch (errorType) {
|
|
14
|
+
case ErrorType.FATAL:
|
|
15
|
+
case ErrorType.POLICY:
|
|
16
|
+
return 'critical';
|
|
17
|
+
case ErrorType.RATE_LIMIT:
|
|
18
|
+
case ErrorType.API_ERROR:
|
|
19
|
+
case ErrorType.VALIDATION:
|
|
20
|
+
return 'warning';
|
|
21
|
+
case ErrorType.NETWORK:
|
|
22
|
+
case ErrorType.RETRYABLE:
|
|
23
|
+
return 'info';
|
|
24
|
+
default:
|
|
25
|
+
return 'warning';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get severity label (text-based, enterprise-grade)
|
|
30
|
+
*/
|
|
31
|
+
function getSeverityLabel(severity) {
|
|
32
|
+
switch (severity) {
|
|
33
|
+
case 'critical':
|
|
34
|
+
return colors.red('[CRITICAL] Error:');
|
|
35
|
+
case 'warning':
|
|
36
|
+
return colors.yellow('[WARNING] Error:');
|
|
37
|
+
case 'info':
|
|
38
|
+
return colors.cyan('[INFO] Error:');
|
|
39
|
+
default:
|
|
40
|
+
return colors.red('Error:');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Extract file path from error message
|
|
45
|
+
*/
|
|
46
|
+
function extractFilePath(errorMessage) {
|
|
47
|
+
// Patterns: "File not found: path/to/file", "in path/to/file", "at path/to/file"
|
|
48
|
+
const patterns = [
|
|
49
|
+
/(?:File|file)\s+(?:not found|error|issue)[:\s]+([^\s]+)/i,
|
|
50
|
+
/(?:in|at)\s+([^\s]+\.(ts|js|py|json|md|yaml|yml))/i,
|
|
51
|
+
/([^\s]+\.(ts|js|py|json|md|yaml|yml)(?::\d+)?)/i,
|
|
52
|
+
];
|
|
53
|
+
for (const pattern of patterns) {
|
|
54
|
+
const match = errorMessage.match(pattern);
|
|
55
|
+
if (match && match[1]) {
|
|
56
|
+
return match[1].replace(/^["']|["']$/g, ''); // Remove quotes
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return undefined;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Extract line number from error message
|
|
63
|
+
*/
|
|
64
|
+
function extractLineNumber(errorMessage) {
|
|
65
|
+
// Patterns: "line 42", ":42", "at line 42"
|
|
66
|
+
const patterns = [
|
|
67
|
+
/(?:line|Line)\s+(\d+)/i,
|
|
68
|
+
/:(\d+):/,
|
|
69
|
+
/\((\d+)\)/,
|
|
70
|
+
];
|
|
71
|
+
for (const pattern of patterns) {
|
|
72
|
+
const match = errorMessage.match(pattern);
|
|
73
|
+
if (match && match[1]) {
|
|
74
|
+
const line = parseInt(match[1], 10);
|
|
75
|
+
if (!isNaN(line) && line > 0) {
|
|
76
|
+
return line;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get recovery commands based on error type and context
|
|
84
|
+
*/
|
|
85
|
+
function getRecoveryCommands(errorType, errorMessage, context) {
|
|
86
|
+
const commands = [];
|
|
87
|
+
const lowerMessage = errorMessage.toLowerCase();
|
|
88
|
+
switch (errorType) {
|
|
89
|
+
case ErrorType.VALIDATION:
|
|
90
|
+
if (lowerMessage.includes('file') || lowerMessage.includes('not found')) {
|
|
91
|
+
if (context.filepath) {
|
|
92
|
+
commands.push(`codehere explain ${context.filepath}${context.lineNumber ? `:${context.lineNumber}` : ''}`);
|
|
93
|
+
}
|
|
94
|
+
commands.push('codehere index');
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
case ErrorType.API_ERROR:
|
|
98
|
+
if (lowerMessage.includes('api') || lowerMessage.includes('key')) {
|
|
99
|
+
commands.push('codehere setup');
|
|
100
|
+
commands.push('codehere config --help');
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
case ErrorType.POLICY:
|
|
104
|
+
if (context.filepath) {
|
|
105
|
+
commands.push(`codehere explain ${context.filepath}`);
|
|
106
|
+
commands.push('codehere config policies');
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
case ErrorType.RATE_LIMIT:
|
|
110
|
+
commands.push('codehere config --help');
|
|
111
|
+
break;
|
|
112
|
+
default:
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
return commands;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Get documentation link for error type
|
|
119
|
+
*/
|
|
120
|
+
function getDocumentationLink(errorType) {
|
|
121
|
+
const baseUrl = 'https://docs.codehere.dev';
|
|
122
|
+
switch (errorType) {
|
|
123
|
+
case ErrorType.POLICY:
|
|
124
|
+
return `${baseUrl}/security-policies`;
|
|
125
|
+
case ErrorType.API_ERROR:
|
|
126
|
+
case ErrorType.RATE_LIMIT:
|
|
127
|
+
return `${baseUrl}/setup/api-keys`;
|
|
128
|
+
case ErrorType.VALIDATION:
|
|
129
|
+
return `${baseUrl}/troubleshooting`;
|
|
130
|
+
case ErrorType.NETWORK:
|
|
131
|
+
return `${baseUrl}/troubleshooting/network`;
|
|
132
|
+
default:
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Generate error code for troubleshooting
|
|
138
|
+
*/
|
|
139
|
+
function generateErrorCode(errorType, errorMessage) {
|
|
140
|
+
const prefix = errorType.toUpperCase().substring(0, 3);
|
|
141
|
+
const hash = errorMessage.split('').reduce((acc, char) => {
|
|
142
|
+
return ((acc << 5) - acc) + char.charCodeAt(0);
|
|
143
|
+
}, 0);
|
|
144
|
+
const code = Math.abs(hash).toString(16).substring(0, 4).toUpperCase();
|
|
145
|
+
return `${prefix}-${code}`;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Display error with helpful context and recovery suggestions
|
|
149
|
+
*/
|
|
150
|
+
export function displayError(error, options = {}) {
|
|
151
|
+
const { operation = 'operation', query, showSuggestions = true, showStack = false, } = options;
|
|
152
|
+
const errorType = classifyError(error);
|
|
153
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
154
|
+
const isEnterpriseError = error instanceof EnterpriseError;
|
|
155
|
+
// Generate error code for troubleshooting
|
|
156
|
+
const errorCode = generateErrorCode(errorType, errorMessage);
|
|
157
|
+
// Determine error severity (based on error type)
|
|
158
|
+
const severity = getErrorSeverity(errorType);
|
|
159
|
+
// Extract file/line context from error message or options
|
|
160
|
+
const fileContext = options.filepath || extractFilePath(errorMessage);
|
|
161
|
+
const lineContext = options.lineNumber || extractLineNumber(errorMessage);
|
|
162
|
+
// Display error header
|
|
163
|
+
newline();
|
|
164
|
+
console.log(separator('═', 80));
|
|
165
|
+
// Show severity indicator (text-based, no emojis for enterprise)
|
|
166
|
+
const severityLabel = getSeverityLabel(severity);
|
|
167
|
+
if (severityLabel) {
|
|
168
|
+
console.log(severityLabel + ` ${errorMessage}`);
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
console.log(colors.red(`Error: ${errorMessage}`));
|
|
172
|
+
}
|
|
173
|
+
if (errorCode) {
|
|
174
|
+
console.log(colors.dim(`Error Code: ${errorCode}`));
|
|
175
|
+
}
|
|
176
|
+
// Show file/line context if available
|
|
177
|
+
if (fileContext) {
|
|
178
|
+
console.log(colors.dim(`File: ${fileContext}${lineContext ? `:${lineContext}` : ''}`));
|
|
179
|
+
}
|
|
180
|
+
console.log(separator('═', 80));
|
|
181
|
+
newline();
|
|
182
|
+
// Show error type if it's an EnterpriseError
|
|
183
|
+
if (isEnterpriseError) {
|
|
184
|
+
console.log(colors.dim(`Type: ${errorType}`));
|
|
185
|
+
if (error.context?.attempt !== undefined) {
|
|
186
|
+
console.log(colors.dim(`Attempt: ${error.context.attempt + 1}/${error.context.maxRetries || '?'}`));
|
|
187
|
+
}
|
|
188
|
+
newline();
|
|
189
|
+
}
|
|
190
|
+
// Show suggestions based on error type
|
|
191
|
+
if (showSuggestions) {
|
|
192
|
+
const suggestions = getErrorSuggestions(errorType, errorMessage, { operation, query, filepath: fileContext });
|
|
193
|
+
if (suggestions.length > 0) {
|
|
194
|
+
console.log(colors.bold('Suggestions:'));
|
|
195
|
+
suggestions.forEach(suggestion => {
|
|
196
|
+
console.log(colors.dim(` ${symbols.bullet} ${suggestion}`));
|
|
197
|
+
});
|
|
198
|
+
newline();
|
|
199
|
+
}
|
|
200
|
+
// Show recovery commands for certain error types
|
|
201
|
+
const recoveryCommands = getRecoveryCommands(errorType, errorMessage, { operation, query, filepath: fileContext, lineNumber: lineContext });
|
|
202
|
+
if (recoveryCommands.length > 0) {
|
|
203
|
+
console.log(colors.bold('Recovery Commands:'));
|
|
204
|
+
recoveryCommands.forEach(cmd => {
|
|
205
|
+
console.log(colors.cyan(` $ ${cmd}`));
|
|
206
|
+
});
|
|
207
|
+
newline();
|
|
208
|
+
}
|
|
209
|
+
// Show documentation link for complex errors
|
|
210
|
+
const docLink = getDocumentationLink(errorType);
|
|
211
|
+
if (docLink) {
|
|
212
|
+
console.log(colors.dim(`Learn More: ${docLink}`));
|
|
213
|
+
newline();
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// Show stack trace if requested (for debugging)
|
|
217
|
+
if (showStack && error instanceof Error && error.stack) {
|
|
218
|
+
console.log(colors.dim('Stack trace:'));
|
|
219
|
+
console.log(colors.dim(error.stack));
|
|
220
|
+
newline();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Get recovery suggestions based on error type
|
|
225
|
+
*/
|
|
226
|
+
function getErrorSuggestions(errorType, errorMessage, context) {
|
|
227
|
+
const suggestions = [];
|
|
228
|
+
const lowerMessage = errorMessage.toLowerCase();
|
|
229
|
+
switch (errorType) {
|
|
230
|
+
case ErrorType.RATE_LIMIT:
|
|
231
|
+
suggestions.push('You\'ve reached the API rate limit or monthly quota');
|
|
232
|
+
suggestions.push('Wait a moment and try again');
|
|
233
|
+
suggestions.push('Check your API key limits at: https://dashboard.cohere.com/api-keys');
|
|
234
|
+
suggestions.push('Consider upgrading your API key for higher limits');
|
|
235
|
+
break;
|
|
236
|
+
case ErrorType.API_ERROR:
|
|
237
|
+
case ErrorType.VALIDATION:
|
|
238
|
+
if (lowerMessage.includes('api') || lowerMessage.includes('key')) {
|
|
239
|
+
suggestions.push('Check your COHERE_API_KEY is set correctly');
|
|
240
|
+
suggestions.push('Verify your API key at: https://dashboard.cohere.com/api-keys');
|
|
241
|
+
suggestions.push('Make sure .env file exists in your project root');
|
|
242
|
+
suggestions.push('Run "codehere setup" to configure your API key');
|
|
243
|
+
suggestions.push('For troubleshooting, include the error code when reporting issues');
|
|
244
|
+
}
|
|
245
|
+
else if (lowerMessage.includes('not found') || lowerMessage.includes('missing')) {
|
|
246
|
+
if (context.query) {
|
|
247
|
+
suggestions.push(`Try searching: codehere "find ${context.query.split(' ').slice(0, 3).join(' ')}"`);
|
|
248
|
+
}
|
|
249
|
+
suggestions.push('Make sure you\'re in the correct directory');
|
|
250
|
+
suggestions.push('Run "codehere index" to build search index');
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
suggestions.push('Check the error message above for specific details');
|
|
254
|
+
suggestions.push('Run "codehere setup" to verify your configuration');
|
|
255
|
+
}
|
|
256
|
+
break;
|
|
257
|
+
case ErrorType.NETWORK:
|
|
258
|
+
suggestions.push('Check your internet connection');
|
|
259
|
+
suggestions.push('Verify the API service is accessible');
|
|
260
|
+
suggestions.push('Try again in a few moments');
|
|
261
|
+
break;
|
|
262
|
+
case ErrorType.POLICY:
|
|
263
|
+
suggestions.push('The operation was blocked by safety policies');
|
|
264
|
+
suggestions.push('Review the policy reason above');
|
|
265
|
+
suggestions.push('Modify your request to comply with safety rules');
|
|
266
|
+
break;
|
|
267
|
+
case ErrorType.FATAL:
|
|
268
|
+
suggestions.push('This is a fatal error that cannot be recovered');
|
|
269
|
+
suggestions.push('Check the error message for details');
|
|
270
|
+
suggestions.push('If this persists, please report the issue');
|
|
271
|
+
break;
|
|
272
|
+
default:
|
|
273
|
+
// Generic suggestions for retryable errors
|
|
274
|
+
if (lowerMessage.includes('file') || lowerMessage.includes('path')) {
|
|
275
|
+
suggestions.push('Verify the file path is correct');
|
|
276
|
+
suggestions.push('Check file permissions');
|
|
277
|
+
}
|
|
278
|
+
else if (lowerMessage.includes('memory') || lowerMessage.includes('database')) {
|
|
279
|
+
suggestions.push('The memory system may need initialization');
|
|
280
|
+
suggestions.push('Try running "codehere index" to rebuild the index');
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
suggestions.push('This error may be temporary - try again');
|
|
284
|
+
suggestions.push('Check the error message for specific details');
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return suggestions;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Display error and exit with appropriate code
|
|
291
|
+
*/
|
|
292
|
+
export function displayErrorAndExit(error, options = {}) {
|
|
293
|
+
const { exitCode = 1, ...displayOptions } = options;
|
|
294
|
+
displayError(error, displayOptions);
|
|
295
|
+
process.exit(exitCode);
|
|
296
|
+
}
|
|
297
|
+
//# sourceMappingURL=error-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-display.js","sourceRoot":"","sources":["../../../src/presentation/cli/error-display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAWlE;;GAEG;AACH,SAAS,gBAAgB,CAAC,SAAoB;IAC5C,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,SAAS,CAAC,KAAK,CAAC;Q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A2C;YAC3C,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBACnE,WAAW,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;gBACpD,WAAW,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;YAC7C,CAAC;iBAAM,IAAI,YAAY,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;gBAChF,WAAW,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;gBAC9D,WAAW,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAC;YACxE,CAAC;iBAAM,CAAC;gBACN,WAAW,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;gBAC5D,WAAW,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;YACnE,CAAC;IACL,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAc,EACd,UAAuD,EAAE;IAEzD,MAAM,EAAE,QAAQ,GAAG,CAAC,EAAE,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC;IACpD,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,CAAC;IACpC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard Shortcuts and Navigation
|
|
3
|
+
* Enhanced keyboard navigation for interactive sessions - Task 7.5
|
|
4
|
+
*/
|
|
5
|
+
import * as readline from 'readline';
|
|
6
|
+
export interface CommandHistory {
|
|
7
|
+
commands: string[];
|
|
8
|
+
currentIndex: number;
|
|
9
|
+
searchTerm: string;
|
|
10
|
+
isSearching: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Setup enhanced keyboard navigation for readline interface
|
|
14
|
+
*/
|
|
15
|
+
export declare function setupKeyboardNavigation(rl: readline.Interface, history: string[]): CommandHistory;
|
|
16
|
+
/**
|
|
17
|
+
* Get keyboard shortcuts help text
|
|
18
|
+
*/
|
|
19
|
+
export declare function getKeyboardShortcutsHelp(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Enhanced readline configuration with history support
|
|
22
|
+
*/
|
|
23
|
+
export declare function createEnhancedReadline(config?: {
|
|
24
|
+
prompt?: string;
|
|
25
|
+
history?: string[];
|
|
26
|
+
}): readline.Interface;
|
|
27
|
+
//# sourceMappingURL=keyboard-shortcuts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-shortcuts.d.ts","sourceRoot":"","sources":["../../../src/presentation/cli/keyboard-shortcuts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,EAAE,EAAE,QAAQ,CAAC,SAAS,EACtB,OAAO,EAAE,MAAM,EAAE,GAChB,cAAc,CAsChB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAWjD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,GAAE;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACf,GAAG,QAAQ,CAAC,SAAS,CAiB1B"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyboard Shortcuts and Navigation
|
|
3
|
+
* Enhanced keyboard navigation for interactive sessions - Task 7.5
|
|
4
|
+
*/
|
|
5
|
+
import * as readline from 'readline';
|
|
6
|
+
import { colors } from '../../ui.js';
|
|
7
|
+
/**
|
|
8
|
+
* Setup enhanced keyboard navigation for readline interface
|
|
9
|
+
*/
|
|
10
|
+
export function setupKeyboardNavigation(rl, history) {
|
|
11
|
+
const commandHistory = {
|
|
12
|
+
commands: [...history],
|
|
13
|
+
currentIndex: history.length,
|
|
14
|
+
searchTerm: '',
|
|
15
|
+
isSearching: false,
|
|
16
|
+
};
|
|
17
|
+
// Handle history navigation and shortcuts
|
|
18
|
+
if (process.stdin.isTTY) {
|
|
19
|
+
const stdin = process.stdin;
|
|
20
|
+
// Enable raw mode for advanced key handling (if supported)
|
|
21
|
+
if (stdin.setRawMode) {
|
|
22
|
+
stdin.setRawMode(true);
|
|
23
|
+
}
|
|
24
|
+
stdin.on('keypress', (str, key) => {
|
|
25
|
+
// Handle Ctrl+C gracefully
|
|
26
|
+
if (key && key.ctrl && key.name === 'c') {
|
|
27
|
+
console.log(colors.dim('\n\nOperation cancelled. Press Ctrl+D to exit or continue typing.'));
|
|
28
|
+
rl.prompt();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// Handle Ctrl+L (clear screen)
|
|
32
|
+
if (key && key.ctrl && key.name === 'l') {
|
|
33
|
+
console.clear();
|
|
34
|
+
rl.prompt();
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// Handle Ctrl+R (search history) - would require more complex implementation
|
|
38
|
+
// For now, basic arrow key navigation is handled by readline
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return commandHistory;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get keyboard shortcuts help text
|
|
45
|
+
*/
|
|
46
|
+
export function getKeyboardShortcutsHelp() {
|
|
47
|
+
return `
|
|
48
|
+
Keyboard Shortcuts:
|
|
49
|
+
${colors.cyan('↑/↓')} Navigate command history
|
|
50
|
+
${colors.cyan('Tab')} Autocomplete (when available)
|
|
51
|
+
${colors.cyan('Ctrl+C')} Cancel current operation
|
|
52
|
+
${colors.cyan('Ctrl+D')} Exit session
|
|
53
|
+
${colors.cyan('Ctrl+L')} Clear screen
|
|
54
|
+
${colors.cyan('Esc')} Cancel current input
|
|
55
|
+
${colors.cyan('Enter')} Execute command
|
|
56
|
+
`;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Enhanced readline configuration with history support
|
|
60
|
+
*/
|
|
61
|
+
export function createEnhancedReadline(config = {}) {
|
|
62
|
+
const rl = readline.createInterface({
|
|
63
|
+
input: process.stdin,
|
|
64
|
+
output: process.stdout,
|
|
65
|
+
prompt: config.prompt || colors.cyan('codehere> '),
|
|
66
|
+
historySize: 100, // Store up to 100 commands
|
|
67
|
+
completer: undefined, // Can be enhanced with tab completion
|
|
68
|
+
});
|
|
69
|
+
// Load history if provided
|
|
70
|
+
if (config.history && config.history.length > 0) {
|
|
71
|
+
// Readline history is managed internally, but we can prepopulate
|
|
72
|
+
// by simulating key presses (complex, skip for now)
|
|
73
|
+
// History navigation will work automatically via arrow keys
|
|
74
|
+
}
|
|
75
|
+
return rl;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=keyboard-shortcuts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard-shortcuts.js","sourceRoot":"","sources":["../../../src/presentation/cli/keyboard-shortcuts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASrC;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,EAAsB,EACtB,OAAiB;IAEjB,MAAM,cAAc,GAAmB;QACrC,QAAQ,EAAE,CAAC,GAAG,OAAO,CAAC;QACtB,YAAY,EAAE,OAAO,CAAC,MAAM;QAC5B,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,KAAK;KACnB,CAAC;IAEF,0CAA0C;IAC1C,IAAI,OAAO,CAAC,KAAK,CA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B;AAGD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,MAAsB,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"refactor.d.ts","sourceRoot":"","sources":["../src/refactor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,EAAE,SAAS,CAAC;IACxB,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACzC,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,MAAM,EAAE,EACf,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE;IACP,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACd,GACL,OAAO,CAAC,cAAc,CAAC,CAkFzB;AAGD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,MAAsB,GAAG,MAAM,EAAE,CAmC7F"}
|
package/dist/refactor.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Multi-File Refactoring System
|
|
3
3
|
* Enterprise-grade cross-file operations
|
|
4
4
|
*/
|
|
5
|
-
import { readFileSync, writeFileSync, existsSync } from 'fs';
|
|
6
|
-
import { join } from 'path';
|
|
5
|
+
import { readFileSync, writeFileSync, existsSync, readdirSync, statSync } from 'fs';
|
|
6
|
+
import { join, relative } from 'path';
|
|
7
7
|
import { generateDiff } from './chat.js';
|
|
8
8
|
import { checkPolicy } from './policy.js';
|
|
9
9
|
import { applyUnifiedDiff, parseDiffStats } from './edit.js';
|
|
@@ -85,8 +85,6 @@ export async function refactorMultiFile(files, instruction, options = {}) {
|
|
|
85
85
|
export function findFilesByPattern(pattern, baseDir = process.cwd()) {
|
|
86
86
|
// Simple glob pattern matching
|
|
87
87
|
// For production, consider using a proper glob library
|
|
88
|
-
const { readdirSync, statSync } = require('fs');
|
|
89
|
-
const { join, relative } = require('path');
|
|
90
88
|
const files = [];
|
|
91
89
|
const regex = new RegExp(pattern.replace(/\*/g, '.*'));
|
|
92
90
|
function walkDir(dir) {
|
package/dist/refactor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refactor.js","sourceRoot":"","sources":["../src/refactor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"refactor.js","sourceRoot":"","sources":["../src/refactor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACpF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAe,MAAM,oBAAoB,CAAC;AAWnE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAAe,EACf,WAAmB,EACnB,UAGI,EAAE;IAEN,MAAM,EAAE,MAAM,GAAG,KAAK,EAAE,QAAQ,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IAElD,IAAI,KAAK,CAAC,MAA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":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAS,MAAM,YAAY,CAAC;AAqDtD;;;GAGG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAW,GAChB,OAAO,CAAC,YAAY,EAAE,CAAC,CA2EzB;
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../src/search.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAS,MAAM,YAAY,CAAC;AAqDtD;;;GAGG;AACH,wBAAsB,aAAa,CACjC,KAAK,EAAE,MAAM,EACb,IAAI,GAAE,MAAW,GAChB,OAAO,CAAC,YAAY,EAAE,CAAC,CA2EzB;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CACb,GACL,OAAO,CAAC;IACT,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC,CA4BD"}
|
package/dist/search.js
CHANGED
|
@@ -66,7 +66,7 @@ export async function searchSimilar(query, topK = 15) {
|
|
|
66
66
|
const queryEmbedding = embeddings[0] || [];
|
|
67
67
|
// Load database
|
|
68
68
|
if (!existsSync(DB_PATH)) {
|
|
69
|
-
|
|
69
|
+
return [];
|
|
70
70
|
}
|
|
71
71
|
const SQL = await initSqlJs();
|
|
72
72
|
const buffer = readFileSync(DB_PATH);
|
|
@@ -110,26 +110,6 @@ export async function searchSimilar(query, topK = 15) {
|
|
|
110
110
|
score: result.score,
|
|
111
111
|
}));
|
|
112
112
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Check if file is a source code file (not documentation)
|
|
115
|
-
*/
|
|
116
|
-
function isSourceFile(filepath) {
|
|
117
|
-
const ext = filepath.split('.').pop()?.toLowerCase();
|
|
118
|
-
const sourceExtensions = ['js', 'jsx', 'ts', 'tsx', 'py', 'java', 'cpp', 'c', 'h', 'hpp', 'go', 'rs', 'rb', 'php', 'swift', 'kt', 'scala', 'sh', 'bash', 'zsh'];
|
|
119
|
-
return sourceExtensions.includes(ext || '');
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Check if file is documentation
|
|
123
|
-
*/
|
|
124
|
-
function isDocumentation(filepath) {
|
|
125
|
-
const ext = filepath.split('.').pop()?.toLowerCase();
|
|
126
|
-
const docExtensions = ['md', 'txt', 'rst', 'adoc'];
|
|
127
|
-
const docPatterns = ['readme', 'changelog', 'license', 'contributing', 'docs/', 'documentation'];
|
|
128
|
-
if (docExtensions.includes(ext || ''))
|
|
129
|
-
return true;
|
|
130
|
-
const lowerPath = filepath.toLowerCase();
|
|
131
|
-
return docPatterns.some(pattern => lowerPath.includes(pattern));
|
|
132
|
-
}
|
|
133
113
|
/**
|
|
134
114
|
* NEW: Intelligent search with AST-based understanding
|
|
135
115
|
* Uses searchSimilar internally to avoid circular dependency
|
|
@@ -146,49 +126,8 @@ export async function searchIntelligent(query, options = {}) {
|
|
|
146
126
|
reductionPercent: 0,
|
|
147
127
|
};
|
|
148
128
|
}
|
|
149
|
-
// Extract filename from query if mentioned
|
|
150
|
-
const queryLower = query.toLowerCase();
|
|
151
|
-
const filenameMatch = queryLower.match(/(\w+\.(js|ts|jsx|tsx|py|java|cpp|go|rs|rb|php|swift|kt|scala|sh|bash|zsh))/);
|
|
152
|
-
const mentionedFilename = filenameMatch ? filenameMatch[1] : null;
|
|
153
|
-
// Boost source files, penalize documentation, apply path heuristics
|
|
154
|
-
const boostedResults = initialResults.map(result => {
|
|
155
|
-
let score = result.score;
|
|
156
|
-
// HUGE boost if query mentions this exact file
|
|
157
|
-
if (mentionedFilename) {
|
|
158
|
-
const resultFilename = result.filepath.split('/').pop()?.toLowerCase();
|
|
159
|
-
if (resultFilename === mentionedFilename.toLowerCase()) {
|
|
160
|
-
score *= 3.0; // 200% boost for exact filename match
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
// Path heuristics: prefer src/ over test/ or node_modules/
|
|
164
|
-
const lowerPath = result.filepath.toLowerCase();
|
|
165
|
-
if (lowerPath.includes('src/') || lowerPath.startsWith('src/')) {
|
|
166
|
-
score *= 1.2; // 20% boost for src/ files
|
|
167
|
-
}
|
|
168
|
-
else if (lowerPath.includes('test/') || lowerPath.includes('__tests__/')) {
|
|
169
|
-
score *= 0.8; // 20% penalty for test files (unless explicitly asked)
|
|
170
|
-
}
|
|
171
|
-
else if (lowerPath.includes('node_modules/') || lowerPath.includes('dist/')) {
|
|
172
|
-
score *= 0.1; // 90% penalty for dependencies/build files
|
|
173
|
-
}
|
|
174
|
-
// Boost source files significantly
|
|
175
|
-
if (isSourceFile(result.filepath)) {
|
|
176
|
-
score *= 1.5; // 50% boost for source files
|
|
177
|
-
}
|
|
178
|
-
// Penalize documentation when query seems code-focused
|
|
179
|
-
const isCodeQuery = /function|class|import|export|def|const|let|var|interface|type/.test(queryLower);
|
|
180
|
-
if (isCodeQuery && isDocumentation(result.filepath)) {
|
|
181
|
-
score *= 0.3; // 70% penalty for docs when query is about code
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
...result,
|
|
185
|
-
score,
|
|
186
|
-
};
|
|
187
|
-
});
|
|
188
|
-
// Re-sort by boosted scores
|
|
189
|
-
boostedResults.sort((a, b) => b.score - a.score);
|
|
190
129
|
// Optimize context tokens
|
|
191
|
-
const optimized = optimizeContext(
|
|
130
|
+
const optimized = optimizeContext(initialResults, optimizedQuery, strategy.maxTokens, strategy.contextStrategy);
|
|
192
131
|
return {
|
|
193
132
|
chunks: optimized.chunks,
|
|
194
133
|
tokenEstimate: optimized.totalTokens,
|
package/dist/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../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C,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ;QAC/B,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO;QAC7B,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,KAAa,EACb,UAGI,EAAE;IAMN,uBAAuB;IACvB,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAE1D,6CAA6C;IAC7C,MAAM,cAAc,GAAG,MAAM,aAAa,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAE/D,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO;YACL,MAAM,EAAE,EAAE;YACV,aAAa,EAAE,CAAC;YAChB,gBAAgB,EAAE,CAAC;SACpB,CAAC;IACJ,CAAC;IAED,0BAA0B;IAC1B,MAAM,SAAS,GAAG,eAAe,CAC/B,cAAc,EACd,cAAc,EACd,QAAQ,CAAC,SAAS,EAClB,QAAQ,CAAC,eAAe,CACzB,CAAC;IAEF,OAAO;QACL,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,aAAa,EAAE,SAAS,CAAC,WAAW;QACpC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;KAC7C,CAAC;AACJ,CAAC"}
|
package/dist/session.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+BH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzE,OAAO,EAAE,GAAG,CAAC;CACd;AAED;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAyElD"}
|