codehere 0.1.1
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 +22 -0
- package/README.md +378 -0
- 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 +79 -0
- package/dist/application/agents/execution-agent.d.ts.map +1 -0
- package/dist/application/agents/execution-agent.js +534 -0
- package/dist/application/agents/execution-agent.js.map +1 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts +69 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -0
- package/dist/application/agents/multi-agent-orchestrator.js +296 -0
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -0
- package/dist/application/agents/planning-agent.d.ts +65 -0
- package/dist/application/agents/planning-agent.d.ts.map +1 -0
- package/dist/application/agents/planning-agent.js +553 -0
- package/dist/application/agents/planning-agent.js.map +1 -0
- package/dist/application/agents/validation-agent.d.ts +68 -0
- package/dist/application/agents/validation-agent.d.ts.map +1 -0
- package/dist/application/agents/validation-agent.js +317 -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/context-importer.d.ts +71 -0
- package/dist/application/services/context-importer.d.ts.map +1 -0
- package/dist/application/services/context-importer.js +436 -0
- package/dist/application/services/context-importer.js.map +1 -0
- package/dist/application/services/context-manager.d.ts +132 -0
- package/dist/application/services/context-manager.d.ts.map +1 -0
- package/dist/application/services/context-manager.js +369 -0
- package/dist/application/services/context-manager.js.map +1 -0
- package/dist/application/services/dependency-container.d.ts +187 -0
- package/dist/application/services/dependency-container.d.ts.map +1 -0
- package/dist/application/services/dependency-container.js +607 -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 +90 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -0
- package/dist/application/services/intelligent-router.js +942 -0
- package/dist/application/services/intelligent-router.js.map +1 -0
- package/dist/application/services/token-counting-service.d.ts +87 -0
- package/dist/application/services/token-counting-service.d.ts.map +1 -0
- package/dist/application/services/token-counting-service.js +196 -0
- package/dist/application/services/token-counting-service.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 +67 -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 +437 -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 +92 -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 +819 -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 +362 -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/ast-parser.d 2.ts +55 -0
- package/dist/ast-parser.d.ts +55 -0
- package/dist/ast-parser.d.ts.map +1 -0
- package/dist/ast-parser.js +331 -0
- package/dist/ast-parser.js.map +1 -0
- package/dist/cache.d.ts +45 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +180 -0
- package/dist/cache.js.map +1 -0
- package/dist/chat.d.ts +4 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +175 -0
- package/dist/chat.js.map +1 -0
- package/dist/code-analysis 2.js +327 -0
- package/dist/code-analysis.d.ts +50 -0
- package/dist/code-analysis.d.ts.map +1 -0
- package/dist/code-analysis.js +327 -0
- package/dist/code-analysis.js.map +1 -0
- package/dist/context.d.ts +44 -0
- package/dist/context.d.ts 2.map +1 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +187 -0
- package/dist/context.js.map +1 -0
- package/dist/docs.d.ts +21 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +146 -0
- package/dist/docs.js.map +1 -0
- 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/conversation-context.d.ts +245 -0
- package/dist/domain/entities/conversation-context.d.ts.map +1 -0
- package/dist/domain/entities/conversation-context.js +50 -0
- package/dist/domain/entities/conversation-context.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/entities/task.d.ts +152 -0
- package/dist/domain/entities/task.d.ts.map +1 -0
- package/dist/domain/entities/task.js +61 -0
- package/dist/domain/entities/task.js.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.js +13 -0
- package/dist/domain/errors/embeddings-not-found-error.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 +72 -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/context-repository.interface.d.ts +71 -0
- package/dist/domain/interfaces/context-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/context-repository.interface.js +10 -0
- package/dist/domain/interfaces/context-repository.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 +33 -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/environment-mode-manager.d.ts +12 -0
- package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
- package/dist/domain/services/environment-mode-manager.js +22 -0
- package/dist/domain/services/environment-mode-manager.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 +173 -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/domain/services/risk-tier-detector.d.ts +17 -0
- package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
- package/dist/domain/services/risk-tier-detector.js +78 -0
- package/dist/domain/services/risk-tier-detector.js.map +1 -0
- package/dist/edit.d.ts +26 -0
- package/dist/edit.d.ts 2.map +1 -0
- package/dist/edit.d.ts.map +1 -0
- package/dist/edit.js +319 -0
- package/dist/edit.js.map +1 -0
- package/dist/embed.d 2.ts +14 -0
- package/dist/embed.d.ts +14 -0
- package/dist/embed.d.ts.map +1 -0
- package/dist/embed.js +472 -0
- package/dist/embed.js.map +1 -0
- package/dist/error-handler.d 2.ts +77 -0
- package/dist/error-handler.d.ts +77 -0
- package/dist/error-handler.d.ts.map +1 -0
- package/dist/error-handler.js +256 -0
- package/dist/error-handler.js.map +1 -0
- package/dist/formatter 2.js +168 -0
- package/dist/formatter.d.ts +25 -0
- package/dist/formatter.d.ts 2.map +1 -0
- package/dist/formatter.d.ts.map +1 -0
- package/dist/formatter.js +168 -0
- package/dist/formatter.js.map +1 -0
- package/dist/git 2.js +198 -0
- package/dist/git.d 2.ts +55 -0
- package/dist/git.d.ts +55 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/git.js +198 -0
- package/dist/git.js.map +1 -0
- package/dist/index 2.d.ts +16 -0
- package/dist/index 2.d.ts.map +1 -0
- package/dist/index 2.js +429 -0
- package/dist/index 2.js.map +1 -0
- package/dist/index-backup-before-lazy-loading.d.ts +3 -0
- package/dist/index-backup-before-lazy-loading.d.ts.map +1 -0
- package/dist/index-backup-before-lazy-loading.js +1551 -0
- package/dist/index-backup-before-lazy-loading.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts 2.map +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +489 -0
- package/dist/index.js 2.map +1 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/ai/cohere-ai-service.d.ts +71 -0
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/cohere-ai-service.js +676 -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/ai/provider-ai-service.d.ts +67 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.js +580 -0
- package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts +58 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.js +175 -0
- package/dist/infrastructure/cache/embedding-cache.js.map +1 -0
- package/dist/infrastructure/cache/query-result-cache.d.ts +27 -0
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/query-result-cache.js +66 -0
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -0
- package/dist/infrastructure/cache/response-cache.d.ts +18 -0
- package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/response-cache.js +48 -0
- package/dist/infrastructure/cache/response-cache.js.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts +16 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.js +47 -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 +7 -0
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/bash-completion.js +25 -0
- package/dist/infrastructure/completion/bash-completion.js.map +1 -0
- package/dist/infrastructure/completion/fish-completion.d.ts +7 -0
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/fish-completion.js +22 -0
- package/dist/infrastructure/completion/fish-completion.js.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts +7 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.js +30 -0
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -0
- package/dist/infrastructure/config/config-manager.d.ts +158 -0
- package/dist/infrastructure/config/config-manager.d.ts.map +1 -0
- package/dist/infrastructure/config/config-manager.js +294 -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/context/conversation-context.d.ts +82 -0
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
- package/dist/infrastructure/context/conversation-context.js +213 -0
- package/dist/infrastructure/context/conversation-context.js.map +1 -0
- package/dist/infrastructure/context/direct-context-provider.d.ts +18 -0
- package/dist/infrastructure/context/direct-context-provider.d.ts.map +1 -0
- package/dist/infrastructure/context/direct-context-provider.js +222 -0
- package/dist/infrastructure/context/direct-context-provider.js.map +1 -0
- package/dist/infrastructure/context/git-context-provider.d.ts +30 -0
- package/dist/infrastructure/context/git-context-provider.d.ts.map +1 -0
- package/dist/infrastructure/context/git-context-provider.js +140 -0
- package/dist/infrastructure/context/git-context-provider.js.map +1 -0
- package/dist/infrastructure/context/project-context-loader.d.ts +35 -0
- package/dist/infrastructure/context/project-context-loader.d.ts.map +1 -0
- package/dist/infrastructure/context/project-context-loader.js +184 -0
- package/dist/infrastructure/context/project-context-loader.js.map +1 -0
- package/dist/infrastructure/context/session-manager.d.ts +42 -0
- package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
- package/dist/infrastructure/context/session-manager.js +94 -0
- package/dist/infrastructure/context/session-manager.js.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts +91 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.js +361 -0
- package/dist/infrastructure/cost/cost-tracker.js.map +1 -0
- package/dist/infrastructure/cost/session-token-tracker.d.ts +68 -0
- package/dist/infrastructure/cost/session-token-tracker.d.ts.map +1 -0
- package/dist/infrastructure/cost/session-token-tracker.js +178 -0
- package/dist/infrastructure/cost/session-token-tracker.js.map +1 -0
- package/dist/infrastructure/cost-calculator.d.ts +34 -0
- package/dist/infrastructure/cost-calculator.d.ts.map +1 -0
- package/dist/infrastructure/cost-calculator.js +145 -0
- package/dist/infrastructure/cost-calculator.js.map +1 -0
- package/dist/infrastructure/cost-estimator.d.ts +48 -0
- package/dist/infrastructure/cost-estimator.d.ts.map +1 -0
- package/dist/infrastructure/cost-estimator.js +201 -0
- package/dist/infrastructure/cost-estimator.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 +105 -0
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -0
- package/dist/infrastructure/governance/nist-ai-rmf.js +292 -0
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -0
- package/dist/infrastructure/governance/policy-as-code.d.ts +88 -0
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -0
- package/dist/infrastructure/governance/policy-as-code.js +257 -0
- package/dist/infrastructure/governance/policy-as-code.js.map +1 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +136 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.js +239 -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 +130 -0
- package/dist/infrastructure/observability/execution-tracer.d.ts.map +1 -0
- package/dist/infrastructure/observability/execution-tracer.js +400 -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/providers/cohere-provider.d.ts +39 -0
- package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/cohere-provider.js +470 -0
- package/dist/infrastructure/providers/cohere-provider.js.map +1 -0
- package/dist/infrastructure/providers/fake-provider.d.ts +43 -0
- package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/fake-provider.js +138 -0
- package/dist/infrastructure/providers/fake-provider.js.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts +49 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.js +336 -0
- package/dist/infrastructure/providers/local-llm-provider.js.map +1 -0
- package/dist/infrastructure/providers/model-config.types.d.ts +70 -0
- package/dist/infrastructure/providers/model-config.types.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-config.types.js +9 -0
- package/dist/infrastructure/providers/model-config.types.js.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts +113 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.js +8 -0
- package/dist/infrastructure/providers/model-provider.interface.js.map +1 -0
- package/dist/infrastructure/providers/openai-provider.d.ts +38 -0
- package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openai-provider.js +445 -0
- package/dist/infrastructure/providers/openai-provider.js.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.js +407 -0
- package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts +48 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js +105 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts +37 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.js +120 -0
- package/dist/infrastructure/providers/provider-config-loader.js.map +1 -0
- package/dist/infrastructure/providers/provider-registry.d.ts +53 -0
- package/dist/infrastructure/providers/provider-registry.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-registry.js +88 -0
- package/dist/infrastructure/providers/provider-registry.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 +66 -0
- package/dist/infrastructure/security/enhanced-security-gate.d.ts.map +1 -0
- package/dist/infrastructure/security/enhanced-security-gate.js +210 -0
- package/dist/infrastructure/security/enhanced-security-gate.js.map +1 -0
- package/dist/infrastructure/security/input-validator.d.ts +46 -0
- package/dist/infrastructure/security/input-validator.d.ts.map +1 -0
- package/dist/infrastructure/security/input-validator.js +269 -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/serialization/toon-serializer.d.ts +45 -0
- package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
- package/dist/infrastructure/serialization/toon-serializer.js +119 -0
- package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.js +47 -0
- package/dist/infrastructure/storage/embeddings-path.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 +40 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/plan-repository.js +95 -0
- package/dist/infrastructure/storage/plan-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-context-repository.d.ts +95 -0
- package/dist/infrastructure/storage/sqlite-context-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-context-repository.js +467 -0
- package/dist/infrastructure/storage/sqlite-context-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 +228 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +47 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +323 -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 +413 -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 +226 -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 +225 -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 +245 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.js.map +1 -0
- package/dist/infrastructure/storage/task-helpers.d.ts +69 -0
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-helpers.js +197 -0
- package/dist/infrastructure/storage/task-helpers.js.map +1 -0
- package/dist/infrastructure/storage/task-repository.d.ts +67 -0
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-repository.js +205 -0
- package/dist/infrastructure/storage/task-repository.js.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts +74 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.js +167 -0
- package/dist/infrastructure/telemetry/telemetry-service.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 +131 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.js +337 -0
- package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -0
- package/dist/infrastructure/ux/capability-boundaries.d.ts +22 -0
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
- package/dist/infrastructure/ux/capability-boundaries.js +42 -0
- package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
- package/dist/infrastructure/ux/cli-style-guide.d.ts +105 -0
- package/dist/infrastructure/ux/cli-style-guide.d.ts.map +1 -0
- package/dist/infrastructure/ux/cli-style-guide.js +220 -0
- package/dist/infrastructure/ux/cli-style-guide.js.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +21 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js +117 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +11 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.js +10 -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 +17 -0
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/feature-discovery.js +14 -0
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts +26 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.js +45 -0
- package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts +139 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -0
- package/dist/infrastructure/ux/hitl-validation.js +297 -0
- package/dist/infrastructure/ux/hitl-validation.js.map +1 -0
- package/dist/infrastructure/ux/progress-indicator.d.ts +53 -0
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -0
- package/dist/infrastructure/ux/progress-indicator.js +116 -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 +37 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.js +72 -0
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +22 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.js +24 -0
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +20 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.js +91 -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/validation/agent-feedback.d.ts +57 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.js +100 -0
- package/dist/infrastructure/validation/agent-feedback.js.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts +75 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.js +137 -0
- package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -0
- package/dist/infrastructure/validation/hallucination-detector.d.ts +121 -0
- package/dist/infrastructure/validation/hallucination-detector.d.ts.map +1 -0
- package/dist/infrastructure/validation/hallucination-detector.js +388 -0
- package/dist/infrastructure/validation/hallucination-detector.js.map +1 -0
- package/dist/infrastructure/validation/review-handler.d.ts +26 -0
- package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
- package/dist/infrastructure/validation/review-handler.js +40 -0
- package/dist/infrastructure/validation/review-handler.js.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts +45 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.js +70 -0
- package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts +24 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.js +45 -0
- package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
- package/dist/infrastructure/validation/trace-summary.d.ts +45 -0
- package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
- package/dist/infrastructure/validation/trace-summary.js +52 -0
- package/dist/infrastructure/validation/trace-summary.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 +71 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.js +172 -0
- package/dist/infrastructure/xai/attention-visualizer.js.map +1 -0
- package/dist/infrastructure/xai/cot-visualizer.d.ts +103 -0
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -0
- package/dist/infrastructure/xai/cot-visualizer.js +283 -0
- package/dist/infrastructure/xai/cot-visualizer.js.map +1 -0
- package/dist/infrastructure/xai/decision-tree-log.d.ts +100 -0
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -0
- package/dist/infrastructure/xai/decision-tree-log.js +212 -0
- package/dist/infrastructure/xai/decision-tree-log.js.map +1 -0
- package/dist/infrastructure/xai/interactive-xai.d.ts +104 -0
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -0
- package/dist/infrastructure/xai/interactive-xai.js +260 -0
- package/dist/infrastructure/xai/interactive-xai.js.map +1 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +77 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.js +198 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -0
- package/dist/intelligent-retrieval 2.js +272 -0
- package/dist/intelligent-retrieval.d.ts +41 -0
- package/dist/intelligent-retrieval.d.ts 2.map +1 -0
- package/dist/intelligent-retrieval.d.ts.map +1 -0
- package/dist/intelligent-retrieval.js +272 -0
- package/dist/intelligent-retrieval.js.map +1 -0
- 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 +31 -0
- package/dist/iterative-refinement.d.ts.map +1 -0
- package/dist/iterative-refinement.js +189 -0
- package/dist/iterative-refinement.js.map +1 -0
- package/dist/learning.d.ts +69 -0
- package/dist/learning.d.ts.map +1 -0
- package/dist/learning.js +232 -0
- package/dist/learning.js.map +1 -0
- package/dist/log.d.ts +4 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +31 -0
- package/dist/log.js 2.map +1 -0
- package/dist/log.js.map +1 -0
- package/dist/migrate.d.ts +33 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +133 -0
- package/dist/migrate.js 2.map +1 -0
- package/dist/migrate.js.map +1 -0
- package/dist/monitoring.d.ts +75 -0
- package/dist/monitoring.d.ts.map +1 -0
- package/dist/monitoring.js +250 -0
- package/dist/monitoring.js.map +1 -0
- package/dist/parallel-processor.d 2.ts +44 -0
- package/dist/parallel-processor.d.ts +44 -0
- package/dist/parallel-processor.d.ts.map +1 -0
- package/dist/parallel-processor.js +606 -0
- package/dist/parallel-processor.js.map +1 -0
- package/dist/planner.d.ts +47 -0
- package/dist/planner.d.ts.map +1 -0
- package/dist/planner.js +198 -0
- package/dist/planner.js.map +1 -0
- package/dist/policy.d 2.ts +3 -0
- package/dist/policy.d.ts +3 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +26 -0
- package/dist/policy.js.map +1 -0
- package/dist/presentation/cli/commands/ask-command.d.ts +9 -0
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/ask-command.js +355 -0
- package/dist/presentation/cli/commands/ask-command.js.map +1 -0
- package/dist/presentation/cli/commands/audit-command.d.ts +13 -0
- package/dist/presentation/cli/commands/audit-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/audit-command.js +96 -0
- package/dist/presentation/cli/commands/audit-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 +125 -0
- package/dist/presentation/cli/commands/config-command.js.map +1 -0
- package/dist/presentation/cli/commands/context-command.d.ts +32 -0
- package/dist/presentation/cli/commands/context-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/context-command.js +295 -0
- package/dist/presentation/cli/commands/context-command.js.map +1 -0
- package/dist/presentation/cli/commands/context-helper.d.ts +16 -0
- package/dist/presentation/cli/commands/context-helper.d.ts.map +1 -0
- package/dist/presentation/cli/commands/context-helper.js +88 -0
- package/dist/presentation/cli/commands/context-helper.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/docs-command.d.ts +14 -0
- package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/docs-command.js +25 -0
- package/dist/presentation/cli/commands/docs-command.js.map +1 -0
- package/dist/presentation/cli/commands/fix-command.d.ts +15 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/fix-command.js +93 -0
- package/dist/presentation/cli/commands/fix-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 +283 -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/models-command.d.ts +13 -0
- package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/models-command.js +194 -0
- package/dist/presentation/cli/commands/models-command.js.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts +10 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.js +249 -0
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -0
- package/dist/presentation/cli/commands/plan-command.d.ts +9 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/plan-command.js +246 -0
- package/dist/presentation/cli/commands/plan-command.js.map +1 -0
- package/dist/presentation/cli/commands/product-command.d.ts +14 -0
- package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/product-command.js +22 -0
- package/dist/presentation/cli/commands/product-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 +181 -0
- package/dist/presentation/cli/commands/react-command.js.map +1 -0
- package/dist/presentation/cli/commands/review-command.d.ts +14 -0
- package/dist/presentation/cli/commands/review-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/review-command.js +154 -0
- package/dist/presentation/cli/commands/review-command.js.map +1 -0
- package/dist/presentation/cli/commands/run-command.d.ts +13 -0
- package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/run-command.js +188 -0
- package/dist/presentation/cli/commands/run-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 +301 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -0
- package/dist/presentation/cli/commands/smart-command.d.ts +11 -0
- package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/smart-command.js +517 -0
- package/dist/presentation/cli/commands/smart-command.js.map +1 -0
- package/dist/presentation/cli/commands/status-command.d.ts +14 -0
- package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/status-command.js +167 -0
- package/dist/presentation/cli/commands/status-command.js.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts +11 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.js +138 -0
- package/dist/presentation/cli/commands/suggest-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/trust-command.d.ts +28 -0
- package/dist/presentation/cli/commands/trust-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/trust-command.js +301 -0
- package/dist/presentation/cli/commands/trust-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 +340 -0
- package/dist/presentation/cli/error-display.js.map +1 -0
- package/dist/query-optimizer.d.ts +32 -0
- package/dist/query-optimizer.d.ts.map +1 -0
- package/dist/query-optimizer.js +205 -0
- package/dist/query-optimizer.js.map +1 -0
- package/dist/refactor.d.ts +27 -0
- package/dist/refactor.d.ts.map +1 -0
- package/dist/refactor.js +116 -0
- package/dist/refactor.js.map +1 -0
- package/dist/review 2.js +206 -0
- package/dist/review.d.ts +31 -0
- package/dist/review.d.ts.map +1 -0
- package/dist/review.js +206 -0
- package/dist/review.js.map +1 -0
- package/dist/search.d.ts +19 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +193 -0
- package/dist/search.js 2.map +1 -0
- package/dist/search.js.map +1 -0
- package/dist/session 2.js +593 -0
- package/dist/session.d.ts +17 -0
- package/dist/session.d.ts 2.map +1 -0
- package/dist/session.d.ts.map +1 -0
- package/dist/session.js +593 -0
- package/dist/session.js.map +1 -0
- package/dist/task-verification 2.js +336 -0
- package/dist/task-verification.d.ts +39 -0
- package/dist/task-verification.d.ts 2.map +1 -0
- package/dist/task-verification.d.ts.map +1 -0
- package/dist/task-verification.js +336 -0
- package/dist/task-verification.js.map +1 -0
- package/dist/test-minimal.d.ts +2 -0
- package/dist/test-minimal.d.ts.map +1 -0
- package/dist/test-minimal.js +2 -0
- package/dist/test-minimal.js.map +1 -0
- package/dist/testgen.d.ts +24 -0
- package/dist/testgen.d.ts.map +1 -0
- package/dist/testgen.js +166 -0
- package/dist/testgen.js 2.map +1 -0
- package/dist/testgen.js.map +1 -0
- package/dist/token-optimizer.d 2.ts +20 -0
- package/dist/token-optimizer.d.ts +20 -0
- package/dist/token-optimizer.d.ts.map +1 -0
- package/dist/token-optimizer.js +282 -0
- package/dist/token-optimizer.js.map +1 -0
- 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/types.d.ts +36 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/ui.d.ts +60 -0
- package/dist/ui.d.ts 2.map +1 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +334 -0
- package/dist/ui.js.map +1 -0
- 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/debug.d.ts +7 -0
- package/dist/utils/debug.d.ts.map +1 -0
- package/dist/utils/debug.js +24 -0
- package/dist/utils/debug.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 +192 -0
- package/dist/utils/diff-parser.js.map +1 -0
- package/dist/utils/provider-check.d.ts +21 -0
- package/dist/utils/provider-check.d.ts.map +1 -0
- package/dist/utils/provider-check.js +124 -0
- package/dist/utils/provider-check.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/dist/verify_db.d.ts +2 -0
- package/dist/verify_db.d.ts.map +1 -0
- package/dist/verify_db.js +52 -0
- package/dist/verify_db.js 2.map +1 -0
- package/dist/verify_db.js.map +1 -0
- package/package.json +125 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Help Command
|
|
3
|
+
* Provides contextual help for Codehere commands
|
|
4
|
+
*/
|
|
5
|
+
import { colors, separator, newline, sectionHeader, createTable, } from '../../../ui.js';
|
|
6
|
+
const COMMAND_INFO = {
|
|
7
|
+
'ask': {
|
|
8
|
+
name: 'ask',
|
|
9
|
+
description: 'Ask questions about your codebase using natural language',
|
|
10
|
+
usage: 'codehere ask "<question>"',
|
|
11
|
+
examples: [
|
|
12
|
+
'codehere ask "How does authentication work?"',
|
|
13
|
+
'codehere ask "What design patterns are used in this codebase?"',
|
|
14
|
+
'codehere ask "How is the database connection managed?"',
|
|
15
|
+
],
|
|
16
|
+
related: ['explain', 'smart'],
|
|
17
|
+
},
|
|
18
|
+
'explain': {
|
|
19
|
+
name: 'explain',
|
|
20
|
+
description: 'Get detailed explanations of specific code files or functions',
|
|
21
|
+
usage: 'codehere explain <filepath> [context]',
|
|
22
|
+
examples: [
|
|
23
|
+
'codehere explain src/utils.ts',
|
|
24
|
+
'codehere explain src/services/auth.ts',
|
|
25
|
+
'codehere explain src/api/users.ts "focus on error handling"',
|
|
26
|
+
],
|
|
27
|
+
related: ['ask', 'smart'],
|
|
28
|
+
},
|
|
29
|
+
'plan': {
|
|
30
|
+
name: 'plan',
|
|
31
|
+
description: 'Generate a hierarchical plan for complex multi-step tasks',
|
|
32
|
+
usage: 'codehere plan "<goal>" [options]',
|
|
33
|
+
examples: [
|
|
34
|
+
'codehere plan "implement user authentication system"',
|
|
35
|
+
'codehere plan "refactor user service to use dependency injection"',
|
|
36
|
+
'codehere plan "add comprehensive logging" --execute',
|
|
37
|
+
],
|
|
38
|
+
options: [
|
|
39
|
+
{ flag: '--execute', description: 'Execute the plan after generation' },
|
|
40
|
+
{ flag: '--review', description: 'Enable review & feedback capture (used for trust scoring and Validation Mode)' },
|
|
41
|
+
],
|
|
42
|
+
related: ['orchestrate', 'smart'],
|
|
43
|
+
},
|
|
44
|
+
'orchestrate': {
|
|
45
|
+
name: 'orchestrate',
|
|
46
|
+
description: 'Orchestrate multi-agent workflows (plan, execute, validate)',
|
|
47
|
+
usage: 'codehere orchestrate "<goal>" [options]',
|
|
48
|
+
examples: [
|
|
49
|
+
'codehere orchestrate "implement user authentication system"',
|
|
50
|
+
'codehere orchestrate "add comprehensive logging across services"',
|
|
51
|
+
'codehere orchestrate "refactor authentication to JWT" --mode full',
|
|
52
|
+
],
|
|
53
|
+
options: [
|
|
54
|
+
{ flag: '--mode <mode>', description: 'Orchestration mode: plan, execute, full (default: full)' },
|
|
55
|
+
{ flag: '--review', description: 'Enable review & feedback capture (used for trust scoring and Validation Mode)' },
|
|
56
|
+
],
|
|
57
|
+
related: ['plan', 'smart'],
|
|
58
|
+
},
|
|
59
|
+
'react': {
|
|
60
|
+
name: 'react',
|
|
61
|
+
description: 'Use ReAct reasoning loop for complex problem-solving',
|
|
62
|
+
usage: 'codehere react "<query>"',
|
|
63
|
+
examples: [
|
|
64
|
+
'codehere react "debug why login is failing"',
|
|
65
|
+
'codehere react "find and fix the memory leak"',
|
|
66
|
+
'codehere react "optimize the slow query in user service"',
|
|
67
|
+
],
|
|
68
|
+
related: ['ask', 'orchestrate'],
|
|
69
|
+
},
|
|
70
|
+
'setup': {
|
|
71
|
+
name: 'setup',
|
|
72
|
+
description: 'Interactive setup wizard for first-time users',
|
|
73
|
+
usage: 'codehere setup [options]',
|
|
74
|
+
examples: [
|
|
75
|
+
'codehere setup',
|
|
76
|
+
'codehere setup --force',
|
|
77
|
+
],
|
|
78
|
+
options: [
|
|
79
|
+
{ flag: '--force, -f', description: 'Force reconfiguration even if already set up' },
|
|
80
|
+
],
|
|
81
|
+
related: ['config'],
|
|
82
|
+
},
|
|
83
|
+
'config': {
|
|
84
|
+
name: 'config',
|
|
85
|
+
description: 'Manage configuration and preferences',
|
|
86
|
+
usage: 'codehere config [action] [key] [value]',
|
|
87
|
+
examples: [
|
|
88
|
+
'codehere config',
|
|
89
|
+
'codehere config get autoCommit',
|
|
90
|
+
'codehere config set autoCommit true',
|
|
91
|
+
'codehere config set temperature 0.5',
|
|
92
|
+
'codehere config reset',
|
|
93
|
+
],
|
|
94
|
+
related: ['setup'],
|
|
95
|
+
},
|
|
96
|
+
'index': {
|
|
97
|
+
name: 'index',
|
|
98
|
+
description: 'Build semantic embeddings index of your codebase',
|
|
99
|
+
usage: 'codehere index [options]',
|
|
100
|
+
examples: [
|
|
101
|
+
'codehere index',
|
|
102
|
+
'codehere index --repo ./my-project',
|
|
103
|
+
],
|
|
104
|
+
options: [
|
|
105
|
+
{ flag: '--repo <path>, -r <path>', description: 'Repository path (default: current directory)' },
|
|
106
|
+
],
|
|
107
|
+
related: [],
|
|
108
|
+
},
|
|
109
|
+
'smart': {
|
|
110
|
+
name: 'smart',
|
|
111
|
+
description: 'Unified intelligent command that routes to the right tool automatically',
|
|
112
|
+
usage: 'codehere "<query>"',
|
|
113
|
+
examples: [
|
|
114
|
+
'codehere "How does authentication work?"',
|
|
115
|
+
'codehere "add error handling to src/utils.ts"',
|
|
116
|
+
'codehere "implement user authentication system"',
|
|
117
|
+
'codehere "refactor user service to use dependency injection"',
|
|
118
|
+
],
|
|
119
|
+
related: ['ask', 'plan', 'orchestrate'],
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
const ALL_COMMANDS = Object.keys(COMMAND_INFO);
|
|
123
|
+
/**
|
|
124
|
+
* Find similar commands (for typo detection)
|
|
125
|
+
*/
|
|
126
|
+
function findSimilarCommands(input, maxResults = 3) {
|
|
127
|
+
const lowerInput = input.toLowerCase();
|
|
128
|
+
// Exact match
|
|
129
|
+
if (COMMAND_INFO[lowerInput]) {
|
|
130
|
+
return [lowerInput];
|
|
131
|
+
}
|
|
132
|
+
// Calculate similarity scores
|
|
133
|
+
const scores = ALL_COMMANDS.map(cmd => {
|
|
134
|
+
const lowerCmd = cmd.toLowerCase();
|
|
135
|
+
// Exact substring match
|
|
136
|
+
if (lowerCmd.includes(lowerInput) || lowerInput.includes(lowerCmd)) {
|
|
137
|
+
return { cmd, score: 10 };
|
|
138
|
+
}
|
|
139
|
+
// Levenshtein distance (simple)
|
|
140
|
+
const distance = levenshteinDistance(lowerInput, lowerCmd);
|
|
141
|
+
const maxLen = Math.max(lowerInput.length, lowerCmd.length);
|
|
142
|
+
const similarity = (maxLen - distance) / maxLen;
|
|
143
|
+
return { cmd, score: similarity * 5 };
|
|
144
|
+
});
|
|
145
|
+
// Sort by score and return top matches
|
|
146
|
+
return scores
|
|
147
|
+
.filter(s => s.score > 0.3)
|
|
148
|
+
.sort((a, b) => b.score - a.score)
|
|
149
|
+
.slice(0, maxResults)
|
|
150
|
+
.map(s => s.cmd);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Simple Levenshtein distance calculation
|
|
154
|
+
*/
|
|
155
|
+
function levenshteinDistance(str1, str2) {
|
|
156
|
+
const m = str1.length;
|
|
157
|
+
const n = str2.length;
|
|
158
|
+
const dp = Array(m + 1).fill(null).map(() => Array(n + 1).fill(0));
|
|
159
|
+
for (let i = 0; i <= m; i++)
|
|
160
|
+
dp[i][0] = i;
|
|
161
|
+
for (let j = 0; j <= n; j++)
|
|
162
|
+
dp[0][j] = j;
|
|
163
|
+
for (let i = 1; i <= m; i++) {
|
|
164
|
+
for (let j = 1; j <= n; j++) {
|
|
165
|
+
if (str1[i - 1] === str2[j - 1]) {
|
|
166
|
+
dp[i][j] = dp[i - 1][j - 1];
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
dp[i][j] = Math.min(dp[i - 1][j] + 1, // deletion
|
|
170
|
+
dp[i][j - 1] + 1, // insertion
|
|
171
|
+
dp[i - 1][j - 1] + 1 // substitution
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return dp[m][n];
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Display help for a specific command
|
|
180
|
+
*/
|
|
181
|
+
function displayCommandHelp(commandName) {
|
|
182
|
+
const command = COMMAND_INFO[commandName.toLowerCase()];
|
|
183
|
+
if (!command) {
|
|
184
|
+
const suggestions = findSimilarCommands(commandName);
|
|
185
|
+
newline();
|
|
186
|
+
console.error(colors.red(`Command '${commandName}' not found.`));
|
|
187
|
+
if (suggestions.length > 0) {
|
|
188
|
+
newline();
|
|
189
|
+
console.log(colors.bold('Did you mean:'));
|
|
190
|
+
suggestions.forEach(cmd => {
|
|
191
|
+
console.log(` ${colors.cyan(`codehere help ${cmd}`)}`);
|
|
192
|
+
});
|
|
193
|
+
newline();
|
|
194
|
+
}
|
|
195
|
+
console.log(colors.dim('Run') + ' ' + colors.cyan('codehere --help') + ' ' + colors.dim('to see all commands.'));
|
|
196
|
+
newline();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
newline();
|
|
200
|
+
console.log(separator('═', 80));
|
|
201
|
+
console.log(colors.bold(`Codehere - Help: ${command.name}`));
|
|
202
|
+
console.log(separator('═', 80));
|
|
203
|
+
newline();
|
|
204
|
+
// Description
|
|
205
|
+
sectionHeader('Description');
|
|
206
|
+
console.log(colors.dim(command.description));
|
|
207
|
+
newline();
|
|
208
|
+
// Usage
|
|
209
|
+
sectionHeader('Usage');
|
|
210
|
+
console.log(colors.cyan(command.usage));
|
|
211
|
+
newline();
|
|
212
|
+
// Examples
|
|
213
|
+
sectionHeader('Examples');
|
|
214
|
+
command.examples.forEach(example => {
|
|
215
|
+
console.log(colors.dim(' $ ') + colors.cyan(example));
|
|
216
|
+
});
|
|
217
|
+
newline();
|
|
218
|
+
// Options
|
|
219
|
+
if (command.options && command.options.length > 0) {
|
|
220
|
+
sectionHeader('Options');
|
|
221
|
+
const optionRows = command.options.map(opt => [opt.flag, opt.description]);
|
|
222
|
+
const optionsTable = createTable(['Flag', 'Description'], optionRows);
|
|
223
|
+
console.log(optionsTable.toString());
|
|
224
|
+
newline();
|
|
225
|
+
}
|
|
226
|
+
// Related commands
|
|
227
|
+
if (command.related && command.related.length > 0) {
|
|
228
|
+
sectionHeader('Related Commands');
|
|
229
|
+
command.related.forEach(related => {
|
|
230
|
+
console.log(colors.dim(' • ') + colors.cyan(`codehere help ${related}`));
|
|
231
|
+
});
|
|
232
|
+
newline();
|
|
233
|
+
}
|
|
234
|
+
// Additional help
|
|
235
|
+
console.log(colors.dim(`For more information, run: ${colors.cyan('codehere --help')}`));
|
|
236
|
+
newline();
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Display general help (all commands overview)
|
|
240
|
+
*/
|
|
241
|
+
function displayGeneralHelp() {
|
|
242
|
+
newline();
|
|
243
|
+
console.log(separator('═', 80));
|
|
244
|
+
console.log(colors.bold('Codehere - AI Coding Assistant'));
|
|
245
|
+
console.log(separator('═', 80));
|
|
246
|
+
newline();
|
|
247
|
+
console.log(colors.bold('Usage:'));
|
|
248
|
+
console.log(colors.cyan(' codehere [command] [options]'));
|
|
249
|
+
console.log(colors.cyan(' codehere "<query>" # Unified intelligent command'));
|
|
250
|
+
newline();
|
|
251
|
+
sectionHeader('Commands');
|
|
252
|
+
const commandRows = ALL_COMMANDS.map(cmd => {
|
|
253
|
+
const info = COMMAND_INFO[cmd];
|
|
254
|
+
return [cmd, info.description];
|
|
255
|
+
});
|
|
256
|
+
const commandsTable = createTable(['Command', 'Description'], commandRows);
|
|
257
|
+
console.log(commandsTable.toString());
|
|
258
|
+
newline();
|
|
259
|
+
sectionHeader('Getting Started');
|
|
260
|
+
console.log(colors.dim(' 1. ') + colors.cyan('codehere setup') + colors.dim(' - Configure your environment'));
|
|
261
|
+
console.log(colors.dim(' 2. ') + colors.cyan('codehere index') + colors.dim(' - Index your codebase'));
|
|
262
|
+
console.log(colors.dim(' 3. ') + colors.cyan('codehere "your question"') + colors.dim(' - Start using Codehere'));
|
|
263
|
+
newline();
|
|
264
|
+
sectionHeader('Getting Help');
|
|
265
|
+
console.log(colors.dim(' • ') + colors.cyan('codehere --help') + colors.dim(' - Show this help message'));
|
|
266
|
+
console.log(colors.dim(' • ') + colors.cyan('codehere help <command>') + colors.dim(' - Get help for a specific command'));
|
|
267
|
+
console.log(colors.dim(' • ') + colors.cyan('codehere help setup') + colors.dim(' - Example: Setup wizard help'));
|
|
268
|
+
newline();
|
|
269
|
+
console.log(colors.dim('For comprehensive documentation, see: ') + colors.cyan('docs/GETTING_STARTED.md'));
|
|
270
|
+
newline();
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Execute help command
|
|
274
|
+
*/
|
|
275
|
+
export async function executeHelpCommand(commandName) {
|
|
276
|
+
if (commandName) {
|
|
277
|
+
displayCommandHelp(commandName);
|
|
278
|
+
}
|
|
279
|
+
else {
|
|
280
|
+
displayGeneralHelp();
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
//# sourceMappingURL=help-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/help-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,MAAM,EACN,SAAS,EACT,OAAO,EACP,aAAa,EAEb,WAAW,GACZ,MAAM,gBAAgB,CAAC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G,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC,CAAC;IAC9H,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC,CAAC;IACvI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC,CAAC;IACnI,OAAO,EAAE,CAAC;IAEV,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,wCAAwC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC;IAC3G,OAAO,EAAE,CAAC;AACZ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,WAAoB;IAC3D,IAAI,WAAW,EAAE,CAAC;QAChB,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,kBAAkB,EAAE,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Knowledge
|
|
3
|
+
* Query and manage preserved knowledge
|
|
4
|
+
*
|
|
5
|
+
* Clean Architecture: Presentation Layer
|
|
6
|
+
*/
|
|
7
|
+
export declare function executeKnowledgeCommand(action: 'query' | 'list' | 'summary' | 'extract', args: string[], options?: {
|
|
8
|
+
codebase?: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
tags?: string;
|
|
11
|
+
limit?: number;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=knowledge-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/knowledge-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,EAChD,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CACX,GACL,OAAO,CAAC,IAAI,CAAC,CAuIf"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Knowledge
|
|
3
|
+
* Query and manage preserved knowledge
|
|
4
|
+
*
|
|
5
|
+
* Clean Architecture: Presentation Layer
|
|
6
|
+
*/
|
|
7
|
+
import { container } from '../../../application/services/dependency-container.js';
|
|
8
|
+
import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
|
|
9
|
+
import { colors, sectionHeader, success, error, warning, info, newline, createBanner, } from '../../../ui.js';
|
|
10
|
+
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
11
|
+
export async function executeKnowledgeCommand(action, args, options = {}) {
|
|
12
|
+
// Start execution tracing
|
|
13
|
+
const codebasePath = options.codebase || process.cwd();
|
|
14
|
+
const codebaseInfo = findCodebaseRoot(codebasePath);
|
|
15
|
+
if (!codebaseInfo) {
|
|
16
|
+
console.log(error('No codebase detected. Please run from a git repository or project directory.'));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const runId = executionTracer.startRun('knowledge', {
|
|
20
|
+
query: args.join(' '),
|
|
21
|
+
codebaseId: codebaseInfo.rootPath,
|
|
22
|
+
});
|
|
23
|
+
try {
|
|
24
|
+
console.log(createBanner('Knowledge Management', 'Preserved knowledge from codebase'));
|
|
25
|
+
newline();
|
|
26
|
+
const codebaseId = codebaseInfo.codebaseId;
|
|
27
|
+
console.log(colors.dim(`Codebase: ${codebaseInfo.rootPath} (${codebaseInfo.type})`));
|
|
28
|
+
newline();
|
|
29
|
+
const knowledgeAccess = container.knowledgeAccess;
|
|
30
|
+
const knowledgeExtractor = container.knowledgeExtractor;
|
|
31
|
+
switch (action) {
|
|
32
|
+
case 'query': {
|
|
33
|
+
const query = args.join(' ');
|
|
34
|
+
if (!query) {
|
|
35
|
+
console.log(error('Query required. Usage: codehere knowledge query <search term>'));
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
console.log(colors.bold('Searching knowledge...'));
|
|
39
|
+
const knowledge = await knowledgeAccess.query(codebaseId, query, options.limit || 10);
|
|
40
|
+
if (knowledge.length === 0) {
|
|
41
|
+
console.log(warning('No knowledge found matching your query.'));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
console.log(success(`Found ${knowledge.length} knowledge item(s):\n`));
|
|
45
|
+
knowledge.forEach((k, i) => {
|
|
46
|
+
console.log(colors.bold(`${i + 1}. ${k.title}`));
|
|
47
|
+
console.log(colors.dim(` Type: ${k.type}`));
|
|
48
|
+
console.log(colors.dim(` Source: ${k.source.type}${k.source.filepath ? ` (${k.source.filepath})` : ''}`));
|
|
49
|
+
console.log(` ${k.content.substring(0, 200)}${k.content.length > 200 ? '...' : ''}`);
|
|
50
|
+
if (k.relevanceScore) {
|
|
51
|
+
console.log(colors.dim(` Relevance: ${(k.relevanceScore * 100).toFixed(0)}%`));
|
|
52
|
+
}
|
|
53
|
+
newline();
|
|
54
|
+
});
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
case 'list': {
|
|
58
|
+
const type = options.type;
|
|
59
|
+
console.log(colors.bold(type ? `Listing ${type} knowledge...` : 'Listing all knowledge...'));
|
|
60
|
+
const knowledge = type
|
|
61
|
+
? await knowledgeAccess.getByType(codebaseId, type, options.limit || 20)
|
|
62
|
+
: await knowledgeAccess.query(codebaseId, '', options.limit || 20);
|
|
63
|
+
if (knowledge.length === 0) {
|
|
64
|
+
console.log(warning('No knowledge found.'));
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
console.log(success(`Found ${knowledge.length} knowledge item(s):\n`));
|
|
68
|
+
knowledge.forEach((k, i) => {
|
|
69
|
+
console.log(colors.bold(`${i + 1}. ${k.title}`));
|
|
70
|
+
console.log(colors.dim(` Type: ${k.type} | Extracted: ${k.extractedAt.toLocaleDateString()}`));
|
|
71
|
+
console.log(` ${k.content.substring(0, 100)}${k.content.length > 100 ? '...' : ''}`);
|
|
72
|
+
newline();
|
|
73
|
+
});
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
case 'summary': {
|
|
77
|
+
console.log(colors.bold('Generating knowledge summary...'));
|
|
78
|
+
const summary = await knowledgeAccess.getSummary(codebaseId);
|
|
79
|
+
console.log(sectionHeader('Knowledge Summary'));
|
|
80
|
+
console.log(`Total Knowledge: ${summary.totalKnowledge}`);
|
|
81
|
+
console.log('\nBy Type:');
|
|
82
|
+
Object.entries(summary.byType).forEach(([type, count]) => {
|
|
83
|
+
console.log(` ${type}: ${count}`);
|
|
84
|
+
});
|
|
85
|
+
if (summary.mostAccessed.length > 0) {
|
|
86
|
+
console.log('\nMost Accessed:');
|
|
87
|
+
summary.mostAccessed.forEach((k, i) => {
|
|
88
|
+
console.log(` ${i + 1}. ${k.title}`);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (summary.recent.length > 0) {
|
|
92
|
+
console.log('\nRecent:');
|
|
93
|
+
summary.recent.forEach((k, i) => {
|
|
94
|
+
console.log(` ${i + 1}. ${k.title} (${k.extractedAt.toLocaleDateString()})`);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
console.log(`\n${summary.summary}`);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
case 'extract': {
|
|
101
|
+
const filepath = args[0];
|
|
102
|
+
if (!filepath) {
|
|
103
|
+
console.log(error('Filepath required. Usage: codehere knowledge extract <filepath>'));
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
console.log(colors.bold(`Extracting knowledge from ${filepath}...`));
|
|
107
|
+
await knowledgeExtractor.extractFromFile(filepath, codebaseId, codebaseInfo.rootPath);
|
|
108
|
+
console.log(success('Knowledge extraction complete.'));
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
default:
|
|
112
|
+
console.log(error(`Unknown action: ${action}`));
|
|
113
|
+
console.log(info('Available actions: query, list, summary, extract'));
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
catch (err) {
|
|
117
|
+
const { displayError } = await import('../error-display.js');
|
|
118
|
+
displayError(err, {
|
|
119
|
+
operation: `knowledge-${action}`,
|
|
120
|
+
showSuggestions: true,
|
|
121
|
+
showStack: false,
|
|
122
|
+
});
|
|
123
|
+
throw err;
|
|
124
|
+
}
|
|
125
|
+
finally {
|
|
126
|
+
executionTracer.endRun();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=knowledge-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/knowledge-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,OAAO,EACP,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAE5F,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,MAAgD,EAChD,IAAc,EACd,UAKI,EAAE;IAEN,0BAA0B;IAC1B,MAAM,Y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AAC;QAC7D,YAAY,CAAC,GAAG,EAAE;YAChB,SAAS,EAAE,aAAa,MAAM,EAAE;YAChC,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,KAAK;SACjB,CAAC,CAAC;QACH,MAAM,GAAG,CAAC;IACZ,CAAC;YAAS,CAAC;QACT,eAAe,CAAC,MAAM,EAAE,CAAC;IAC3B,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Learning Dashboard
|
|
3
|
+
* View patterns learned, knowledge accumulated, cross-team insights
|
|
4
|
+
*
|
|
5
|
+
* Clean Architecture: Presentation Layer
|
|
6
|
+
*/
|
|
7
|
+
export declare function executeLearningDashboardCommand(action: 'overview' | 'patterns' | 'knowledge' | 'insights', codebasePath?: string): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=learning-dashboard-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"learning-dashboard-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/learning-dashboard-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,EAC1D,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC,CAwDf"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Learning Dashboard
|
|
3
|
+
* View patterns learned, knowledge accumulated, cross-team insights
|
|
4
|
+
*
|
|
5
|
+
* Clean Architecture: Presentation Layer
|
|
6
|
+
*/
|
|
7
|
+
import { container } from '../../../application/services/dependency-container.js';
|
|
8
|
+
import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
|
|
9
|
+
import { colors, sectionHeader, error, warning, info, newline, createBanner, } from '../../../ui.js';
|
|
10
|
+
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
11
|
+
export async function executeLearningDashboardCommand(action, codebasePath) {
|
|
12
|
+
// Start execution tracing
|
|
13
|
+
const detectedPath = codebasePath || process.cwd();
|
|
14
|
+
const codebaseInfo = findCodebaseRoot(detectedPath);
|
|
15
|
+
if (!codebaseInfo) {
|
|
16
|
+
console.log(error('No codebase detected. Please run from a git repository or project directory.'));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const runId = executionTracer.startRun('learning-dashboard', {
|
|
20
|
+
codebaseId: codebaseInfo.rootPath,
|
|
21
|
+
});
|
|
22
|
+
try {
|
|
23
|
+
console.log(createBanner('Learning Dashboard', 'Cross-team learning insights'));
|
|
24
|
+
newline();
|
|
25
|
+
const codebaseId = codebaseInfo.codebaseId;
|
|
26
|
+
console.log(colors.dim(`Codebase: ${codebaseInfo.rootPath} (${codebaseInfo.type})`));
|
|
27
|
+
newline();
|
|
28
|
+
switch (action) {
|
|
29
|
+
case 'overview': {
|
|
30
|
+
await showOverview(codebaseId);
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
case 'patterns': {
|
|
34
|
+
await showPatterns(codebaseId);
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
case 'knowledge': {
|
|
38
|
+
await showKnowledge(codebaseId);
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
case 'insights': {
|
|
42
|
+
await showInsights(codebaseId);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
default:
|
|
46
|
+
console.log(error(`Unknown action: ${action}`));
|
|
47
|
+
console.log(info('Available actions: overview, patterns, knowledge, insights'));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
const { displayError } = await import('../error-display.js');
|
|
52
|
+
displayError(err, {
|
|
53
|
+
operation: `learning-dashboard-${action}`,
|
|
54
|
+
showSuggestions: true,
|
|
55
|
+
});
|
|
56
|
+
throw err;
|
|
57
|
+
}
|
|
58
|
+
finally {
|
|
59
|
+
executionTracer.endRun();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async function showOverview(codebaseId) {
|
|
63
|
+
console.log(sectionHeader('Learning Overview'));
|
|
64
|
+
// Patterns
|
|
65
|
+
const patternRepository = container.patternRepository;
|
|
66
|
+
const patterns = await patternRepository.findByCodebase(codebaseId);
|
|
67
|
+
// Knowledge
|
|
68
|
+
const knowledgeAccess = container.knowledgeAccess;
|
|
69
|
+
const knowledgeSummary = await knowledgeAccess.getSummary(codebaseId);
|
|
70
|
+
// Decisions
|
|
71
|
+
const decisionRepository = container.decisionRepository;
|
|
72
|
+
const decisions = await decisionRepository.findByCodebase(codebaseId, 10);
|
|
73
|
+
// Memory
|
|
74
|
+
const memoryRepository = container.memoryRepository;
|
|
75
|
+
const memories = await memoryRepository.findRecentByCodebase(codebaseId, 100);
|
|
76
|
+
console.log(colors.bold('\nPatterns Learned:'));
|
|
77
|
+
console.log(` Total: ${patterns.length}`);
|
|
78
|
+
const byType = patterns.reduce((acc, p) => {
|
|
79
|
+
acc[p.type] = (acc[p.type] || 0) + 1;
|
|
80
|
+
return acc;
|
|
81
|
+
}, {});
|
|
82
|
+
Object.entries(byType).forEach(([type, count]) => {
|
|
83
|
+
console.log(` ${type}: ${count}`);
|
|
84
|
+
});
|
|
85
|
+
console.log(colors.bold('\nKnowledge Preserved:'));
|
|
86
|
+
console.log(` Total: ${knowledgeSummary.totalKnowledge}`);
|
|
87
|
+
Object.entries(knowledgeSummary.byType).forEach(([type, count]) => {
|
|
88
|
+
console.log(` ${type}: ${count}`);
|
|
89
|
+
});
|
|
90
|
+
console.log(colors.bold('\nDecisions Recorded:'));
|
|
91
|
+
console.log(` Total: ${decisions.length}`);
|
|
92
|
+
const byDecisionType = decisions.reduce((acc, d) => {
|
|
93
|
+
acc[d.type] = (acc[d.type] || 0) + 1;
|
|
94
|
+
return acc;
|
|
95
|
+
}, {});
|
|
96
|
+
Object.entries(byDecisionType).forEach(([type, count]) => {
|
|
97
|
+
const countNum = count;
|
|
98
|
+
console.log(` ${type}: ${count}`);
|
|
99
|
+
});
|
|
100
|
+
console.log(colors.bold('\nMemory Items:'));
|
|
101
|
+
console.log(` Recent: ${memories.length}`);
|
|
102
|
+
const byMemoryType = memories.reduce((acc, m) => {
|
|
103
|
+
acc[m.type] = (acc[m.type] || 0) + 1;
|
|
104
|
+
return acc;
|
|
105
|
+
}, {});
|
|
106
|
+
Object.entries(byMemoryType).forEach(([type, count]) => {
|
|
107
|
+
console.log(` ${type}: ${count}`);
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
async function showPatterns(codebaseId) {
|
|
111
|
+
console.log(sectionHeader('Patterns Learned'));
|
|
112
|
+
const patternRepository = container.patternRepository;
|
|
113
|
+
const patterns = await patternRepository.findByCodebase(codebaseId);
|
|
114
|
+
if (patterns.length === 0) {
|
|
115
|
+
console.log(warning('No patterns found. Patterns are extracted during codebase indexing.'));
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
// Group by type
|
|
119
|
+
const byType = {};
|
|
120
|
+
patterns.forEach(p => {
|
|
121
|
+
if (!byType[p.type])
|
|
122
|
+
byType[p.type] = [];
|
|
123
|
+
byType[p.type].push(p);
|
|
124
|
+
});
|
|
125
|
+
Object.entries(byType).forEach(([type, typePatterns]) => {
|
|
126
|
+
console.log(colors.bold(`\n${type.toUpperCase()} (${typePatterns.length}):`));
|
|
127
|
+
typePatterns
|
|
128
|
+
.sort((a, b) => (b.usageCount || 0) - (a.usageCount || 0))
|
|
129
|
+
.slice(0, 10)
|
|
130
|
+
.forEach((p, i) => {
|
|
131
|
+
console.log(` ${i + 1}. ${p.name}`);
|
|
132
|
+
console.log(colors.dim(` ${p.description.substring(0, 80)}...`));
|
|
133
|
+
console.log(colors.dim(` Used ${p.usageCount || 0} times`));
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
async function showKnowledge(codebaseId) {
|
|
138
|
+
console.log(sectionHeader('Knowledge Preserved'));
|
|
139
|
+
const knowledgeAccess = container.knowledgeAccess;
|
|
140
|
+
const summary = await knowledgeAccess.getSummary(codebaseId);
|
|
141
|
+
console.log(colors.bold('\nSummary:'));
|
|
142
|
+
console.log(` ${summary.summary}`);
|
|
143
|
+
if (summary.mostAccessed.length > 0) {
|
|
144
|
+
console.log(colors.bold('\nMost Accessed Knowledge:'));
|
|
145
|
+
summary.mostAccessed.forEach((k, i) => {
|
|
146
|
+
console.log(` ${i + 1}. ${k.title}`);
|
|
147
|
+
console.log(colors.dim(` ${k.content.substring(0, 80)}...`));
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (summary.recent.length > 0) {
|
|
151
|
+
console.log(colors.bold('\nRecent Knowledge:'));
|
|
152
|
+
summary.recent.forEach((k, i) => {
|
|
153
|
+
console.log(` ${i + 1}. ${k.title} (${k.extractedAt.toLocaleDateString()})`);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
async function showInsights(codebaseId) {
|
|
158
|
+
console.log(sectionHeader('Learning Insights'));
|
|
159
|
+
const patternRepository = container.patternRepository;
|
|
160
|
+
const patterns = await patternRepository.findByCodebase(codebaseId);
|
|
161
|
+
const knowledgeAccess = container.knowledgeAccess;
|
|
162
|
+
const knowledgeSummary = await knowledgeAccess.getSummary(codebaseId);
|
|
163
|
+
console.log(colors.bold('\nPattern Insights:'));
|
|
164
|
+
const mostUsed = patterns
|
|
165
|
+
.sort((a, b) => (b.usageCount || 0) - (a.usageCount || 0))
|
|
166
|
+
.slice(0, 5);
|
|
167
|
+
if (mostUsed.length > 0) {
|
|
168
|
+
console.log(' Most reused patterns:');
|
|
169
|
+
mostUsed.forEach((p, i) => {
|
|
170
|
+
console.log(` ${i + 1}. ${p.name} (${p.usageCount || 0} uses)`);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
console.log(colors.bold('\nKnowledge Insights:'));
|
|
174
|
+
console.log(` Knowledge items preserved: ${knowledgeSummary.totalKnowledge}`);
|
|
175
|
+
console.log(` Most common types: ${Object.keys(knowledgeSummary.byType).join(', ')}`);
|
|
176
|
+
console.log(colors.bold('\nLearning Velocity:'));
|
|
177
|
+
const recentPatterns = patterns.filter(p => {
|
|
178
|
+
const daysSinceCreation = (Date.now() - p.createdAt.getTime()) / (1000 * 60 * 60 * 24);
|
|
179
|
+
return daysSinceCreation <= 7;
|
|
180
|
+
});
|
|
181
|
+
console.log(` Patterns learned this week: ${recentPatterns.length}`);
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=learning-dashboard-command.js.map
|