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,355 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Ask
|
|
3
|
+
* Uses clean architecture - AskQuestionUseCase
|
|
4
|
+
*/
|
|
5
|
+
import { container } from '../../../application/services/dependency-container.js';
|
|
6
|
+
import { colors, sectionHeader, formatNumber, formatPath, formatScore, createTable, newline, warning, info, separator, isMinimalStyle, printMinimalHeader, printSafetyNote, printContextSummary, } from '../../../ui.js';
|
|
7
|
+
import { cleanResponse } from '../../../formatter.js';
|
|
8
|
+
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
9
|
+
import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
|
|
10
|
+
import { displayError } from '../error-display.js';
|
|
11
|
+
export async function executeAskCommand(question, options) {
|
|
12
|
+
// Track start time for summary statistics
|
|
13
|
+
const startTime = Date.now();
|
|
14
|
+
// Capability Boundaries: Check for unsupported operations
|
|
15
|
+
try {
|
|
16
|
+
const { CapabilityBoundaryDetector, displayCapabilityBoundary } = await import('../../../infrastructure/ux/capability-boundaries.js');
|
|
17
|
+
const detector = new CapabilityBoundaryDetector();
|
|
18
|
+
const boundary = detector.detectUnsupported(question);
|
|
19
|
+
if (boundary) {
|
|
20
|
+
displayCapabilityBoundary(boundary);
|
|
21
|
+
executionTracer.endRun();
|
|
22
|
+
return; // Don't proceed with unsupported operation
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
// Capability boundary check failed - continue anyway (non-blocking)
|
|
27
|
+
}
|
|
28
|
+
// Start execution tracing
|
|
29
|
+
const codebaseInfo = findCodebaseRoot(process.cwd());
|
|
30
|
+
const runId = executionTracer.startRun('ask', {
|
|
31
|
+
query: question,
|
|
32
|
+
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
33
|
+
});
|
|
34
|
+
// Get user ID for Progressive Disclosure (use codebase path or default)
|
|
35
|
+
const userId = codebaseInfo?.rootPath || process.cwd() || 'cli-user';
|
|
36
|
+
// Progressive Disclosure: Record feature usage
|
|
37
|
+
const progressiveDisclosure = container.progressiveDisclosure;
|
|
38
|
+
if (progressiveDisclosure) {
|
|
39
|
+
progressiveDisclosure.recordFeatureUsage(userId, 'ask_question');
|
|
40
|
+
}
|
|
41
|
+
// Expectation Management: Assess capability for asking questions
|
|
42
|
+
const expectationManagement = container.expectationManagement;
|
|
43
|
+
let capabilityAssessment = null;
|
|
44
|
+
if (expectationManagement) {
|
|
45
|
+
// Show first-time AI disclaimer if needed
|
|
46
|
+
if (expectationManagement.shouldShowFirstTimeDisclaimer()) {
|
|
47
|
+
console.log(warning(expectationManagement.formatDisclaimerForConsole()));
|
|
48
|
+
newline();
|
|
49
|
+
expectationManagement.markDisclaimerShown();
|
|
50
|
+
}
|
|
51
|
+
capabilityAssessment = expectationManagement.assessCapability('ask_question', {
|
|
52
|
+
complexity: question.split(' ').length > 20 ? 'complex' : question.split(' ').length > 10 ? 'moderate' : 'simple',
|
|
53
|
+
uncertainty: undefined, // Will be filled from result if available
|
|
54
|
+
});
|
|
55
|
+
// Show expectation message if available (only once)
|
|
56
|
+
const expectationMessage = expectationManagement.getExpectationMessage('ask_question');
|
|
57
|
+
if (expectationMessage && expectationMessage.severity === 'warning') {
|
|
58
|
+
console.log(warning(`\n${expectationMessage.message}\n`));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
try {
|
|
62
|
+
// Check if embeddings exist for this repository (skip check if using fake AI, local provider, or quick mode)
|
|
63
|
+
if (process.env.CODEHERE_FAKE_AI !== '1' && process.env.CODEHERE_AI_PROVIDER !== 'local' && options?.quick !== true) {
|
|
64
|
+
const embeddingRepo = container.getEmbeddingRepository(process.cwd());
|
|
65
|
+
const hasEmbeddings = await embeddingRepo.hasEmbeddings();
|
|
66
|
+
if (!hasEmbeddings) {
|
|
67
|
+
newline();
|
|
68
|
+
console.error(colors.red('No embeddings found for this repository.'));
|
|
69
|
+
newline();
|
|
70
|
+
console.log('Run:');
|
|
71
|
+
console.log(colors.cyan(' codehere index'));
|
|
72
|
+
console.log('');
|
|
73
|
+
console.log('then re-run this command.');
|
|
74
|
+
console.log('');
|
|
75
|
+
console.log('Or use:');
|
|
76
|
+
console.log(colors.cyan(' codehere ask "your question" --quick'));
|
|
77
|
+
console.log('');
|
|
78
|
+
console.log('to work without indexing.');
|
|
79
|
+
newline();
|
|
80
|
+
executionTracer.endRun();
|
|
81
|
+
process.exit(1);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Use per-repo embedding repository for codebase isolation
|
|
85
|
+
const useCase = container.getAskQuestionUseCase(process.cwd());
|
|
86
|
+
const minimal = isMinimalStyle();
|
|
87
|
+
// Print minimal header
|
|
88
|
+
if (minimal) {
|
|
89
|
+
printMinimalHeader('ask', question);
|
|
90
|
+
console.log(colors.bold('Answer:'));
|
|
91
|
+
}
|
|
92
|
+
// Enable streaming by default for better UX - disable in minimal mode for cleaner output
|
|
93
|
+
const enableStreaming = !minimal && options?.stream !== false;
|
|
94
|
+
let streamingAnswer = '';
|
|
95
|
+
// Set up streaming handler (only in verbose mode)
|
|
96
|
+
const streamHandler = enableStreaming ? {
|
|
97
|
+
onToken: (token) => {
|
|
98
|
+
process.stdout.write(token);
|
|
99
|
+
streamingAnswer += token;
|
|
100
|
+
},
|
|
101
|
+
onComplete: (fullText) => {
|
|
102
|
+
streamingAnswer = fullText;
|
|
103
|
+
},
|
|
104
|
+
onError: (error) => {
|
|
105
|
+
console.error(colors.red(`\nStreaming error: ${error.message}`));
|
|
106
|
+
},
|
|
107
|
+
} : undefined;
|
|
108
|
+
// Resolve references in query (simple implementation - could enhance later)
|
|
109
|
+
const resolvedQuestion = question; // TODO: Add reference resolution
|
|
110
|
+
// Display search results first (before streaming answer)
|
|
111
|
+
// TODO: Implement conversation history feature
|
|
112
|
+
const result = await useCase.execute({
|
|
113
|
+
query: resolvedQuestion,
|
|
114
|
+
maxResults: 15,
|
|
115
|
+
streamHandler,
|
|
116
|
+
conversationHistory: [], // Conversation history not yet implemented
|
|
117
|
+
});
|
|
118
|
+
// Check if this is a git status response (has answer but no chunks)
|
|
119
|
+
const isGitResponse = result.answer && result.answer.includes('Git Repository Status');
|
|
120
|
+
// With FAKE_AI, we still want to show structured output even if chunks are empty
|
|
121
|
+
// Only show "No relevant code found" for real providers when there are truly no chunks
|
|
122
|
+
if (result.chunks.length === 0 && !isGitResponse && process.env.CODEHERE_FAKE_AI !== '1') {
|
|
123
|
+
console.log('No relevant code found. Run "codehere index" first.');
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
// If git response, display it directly
|
|
127
|
+
if (isGitResponse) {
|
|
128
|
+
if (!minimal)
|
|
129
|
+
sectionHeader('Response');
|
|
130
|
+
const formattedResponse = cleanResponse(result.answer);
|
|
131
|
+
console.log(formattedResponse);
|
|
132
|
+
newline();
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const retrievedFiles = [...new Set(result.chunks.map(r => r.filepath))];
|
|
136
|
+
// With FAKE_AI, show at least a placeholder context even if chunks are empty
|
|
137
|
+
// This ensures tests can verify the structured output format
|
|
138
|
+
const showContext = retrievedFiles.length > 0 || process.env.CODEHERE_FAKE_AI === '1';
|
|
139
|
+
// Minimal style: skip verbose search results table
|
|
140
|
+
if (!minimal) {
|
|
141
|
+
// Display search results
|
|
142
|
+
sectionHeader('Search Results');
|
|
143
|
+
const fileTable = createTable(['File', 'Relevance', 'Preview'], result.chunks.slice(0, 10).map(r => [
|
|
144
|
+
formatPath(r.filepath),
|
|
145
|
+
formatScore(r.score),
|
|
146
|
+
colors.dim(r.content.substring(0, 50) + '...'),
|
|
147
|
+
]));
|
|
148
|
+
console.log(fileTable.toString());
|
|
149
|
+
console.log(colors.dim(`\nFound ${formatNumber(result.chunks.length)} chunks from ${formatNumber(retrievedFiles.length)} file(s)`));
|
|
150
|
+
if (result.tokenEstimate) {
|
|
151
|
+
console.log(colors.dim(`Token estimate: ${formatNumber(result.tokenEstimate)}`));
|
|
152
|
+
}
|
|
153
|
+
console.log();
|
|
154
|
+
}
|
|
155
|
+
// Display response
|
|
156
|
+
if (minimal) {
|
|
157
|
+
// In minimal mode, "Answer:" was already printed before the query
|
|
158
|
+
// Just print the response content
|
|
159
|
+
const formattedResponse = cleanResponse(result.answer || '');
|
|
160
|
+
console.log(formattedResponse);
|
|
161
|
+
newline();
|
|
162
|
+
if (showContext) {
|
|
163
|
+
// Show context even if empty (for FAKE_AI tests) or with actual files
|
|
164
|
+
if (retrievedFiles.length > 0) {
|
|
165
|
+
printContextSummary(retrievedFiles);
|
|
166
|
+
}
|
|
167
|
+
else if (process.env.CODEHERE_FAKE_AI === '1') {
|
|
168
|
+
// For FAKE_AI tests, show a placeholder context to maintain output structure
|
|
169
|
+
console.log(colors.dim('Context:'));
|
|
170
|
+
console.log(colors.dim(' - (Using test mode - no real embeddings)'));
|
|
171
|
+
}
|
|
172
|
+
newline();
|
|
173
|
+
}
|
|
174
|
+
printSafetyNote();
|
|
175
|
+
newline();
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
// Verbose mode
|
|
179
|
+
sectionHeader('Response');
|
|
180
|
+
if (enableStreaming && streamingAnswer) {
|
|
181
|
+
// Streaming already displayed, just add newline
|
|
182
|
+
console.log();
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
const { formatContent } = await import('../../../infrastructure/ux/comprehensive-formatter.js');
|
|
186
|
+
const formattedResponse = formatContent(result.answer || '', { indent: 0, maxWidth: 76 });
|
|
187
|
+
console.log(formattedResponse);
|
|
188
|
+
}
|
|
189
|
+
newline();
|
|
190
|
+
}
|
|
191
|
+
// Verbose style: show summary statistics
|
|
192
|
+
if (!minimal) {
|
|
193
|
+
const executionTime = ((Date.now() - startTime) / 1000).toFixed(2);
|
|
194
|
+
const summaryRows = [];
|
|
195
|
+
summaryRows.push(['Execution Time', `${executionTime}s`]);
|
|
196
|
+
// Performance metrics breakdown (if available)
|
|
197
|
+
if (result.performanceMetrics) {
|
|
198
|
+
const pm = result.performanceMetrics;
|
|
199
|
+
if (pm.embeddingGenTime && pm.embeddingGenTime > 0) {
|
|
200
|
+
summaryRows.push([' Embedding Generation', `${(pm.embeddingGenTime / 1000).toFixed(2)}s`]);
|
|
201
|
+
}
|
|
202
|
+
if (pm.searchTime && pm.searchTime > 0) {
|
|
203
|
+
summaryRows.push([' Code Search', `${(pm.searchTime / 1000).toFixed(2)}s`]);
|
|
204
|
+
}
|
|
205
|
+
if (pm.rerankTime && pm.rerankTime > 0) {
|
|
206
|
+
summaryRows.push([' Rerank', `${(pm.rerankTime / 1000).toFixed(2)}s`]);
|
|
207
|
+
}
|
|
208
|
+
if (pm.chatTime && pm.chatTime > 0) {
|
|
209
|
+
summaryRows.push([' AI Chat', `${(pm.chatTime / 1000).toFixed(2)}s`]);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (result.chunks.length > 0) {
|
|
213
|
+
summaryRows.push(['Files Found', formatNumber(result.chunks.length)]);
|
|
214
|
+
summaryRows.push(['Chunks Retrieved', formatNumber(result.chunks.length)]);
|
|
215
|
+
}
|
|
216
|
+
if (result.tokenEstimate) {
|
|
217
|
+
summaryRows.push(['Tokens', formatNumber(result.tokenEstimate)]);
|
|
218
|
+
}
|
|
219
|
+
if (result.memories && result.memories.length > 0) {
|
|
220
|
+
summaryRows.push(['Memories Used', formatNumber(result.memories.length)]);
|
|
221
|
+
}
|
|
222
|
+
if (result.compressionMetrics && result.compressionMetrics.reductionPercent > 0) {
|
|
223
|
+
summaryRows.push(['Context Compression', `${result.compressionMetrics.reductionPercent.toFixed(1)}% reduction`]);
|
|
224
|
+
summaryRows.push([' Original Tokens', formatNumber(result.compressionMetrics.originalTokens)]);
|
|
225
|
+
summaryRows.push([' Compressed Tokens', formatNumber(result.compressionMetrics.compressedTokens)]);
|
|
226
|
+
}
|
|
227
|
+
// Display confidence scores from uncertainty quantifier
|
|
228
|
+
if (result.uncertainty) {
|
|
229
|
+
const confidence = Math.round((1 - result.uncertainty.combined.value) * 100);
|
|
230
|
+
const confidenceLabel = result.uncertainty.isHallucinationRisk
|
|
231
|
+
? colors.yellow(`${confidence}% ⚠️`)
|
|
232
|
+
: confidence >= 80
|
|
233
|
+
? colors.green(`${confidence}%`)
|
|
234
|
+
: colors.yellow(`${confidence}%`);
|
|
235
|
+
summaryRows.push(['Response Confidence', confidenceLabel]);
|
|
236
|
+
// Show epistemic uncertainty (model's knowledge uncertainty)
|
|
237
|
+
const epistemicPct = Math.round(result.uncertainty.epistemic.value * 100);
|
|
238
|
+
if (epistemicPct > 30) {
|
|
239
|
+
summaryRows.push([' Model Uncertainty', `${epistemicPct}% (verify carefully)`]);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
if (summaryRows.length > 1) {
|
|
243
|
+
console.log(separator('─', 80));
|
|
244
|
+
sectionHeader('Summary');
|
|
245
|
+
const summaryTable = createTable(['Metric', 'Value'], summaryRows);
|
|
246
|
+
console.log(summaryTable.toString());
|
|
247
|
+
newline();
|
|
248
|
+
}
|
|
249
|
+
// Expectation Management: Show warnings if uncertainty is high
|
|
250
|
+
if (result.uncertainty && expectationManagement) {
|
|
251
|
+
if (result.uncertainty.isHallucinationRisk) {
|
|
252
|
+
console.log(warning('\n⚠️ High uncertainty detected - please verify the response carefully.'));
|
|
253
|
+
}
|
|
254
|
+
// Update capability assessment with actual uncertainty
|
|
255
|
+
if (capabilityAssessment) {
|
|
256
|
+
const updatedAssessment = expectationManagement.assessCapability('ask_question', {
|
|
257
|
+
complexity: question.split(' ').length > 20 ? 'complex' : question.split(' ').length > 10 ? 'moderate' : 'simple',
|
|
258
|
+
uncertainty: result.uncertainty.combined.value,
|
|
259
|
+
});
|
|
260
|
+
if (updatedAssessment.warnings.length > 0 && updatedAssessment.capability === 'risky') {
|
|
261
|
+
console.log(warning(`\n⚠️ ${updatedAssessment.warnings[0]}\n`));
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
// Contextual Feature Discovery: Show relevant features based on query (Task 2.2)
|
|
266
|
+
const { shouldShowContextualSuggestion } = await import('../../../infrastructure/ux/contextual-feature-discovery.js');
|
|
267
|
+
const contextualSuggestion = shouldShowContextualSuggestion(question, 'ask');
|
|
268
|
+
if (contextualSuggestion) {
|
|
269
|
+
newline();
|
|
270
|
+
console.log(colors.bold(`💡 Tip: ${contextualSuggestion.reason}`));
|
|
271
|
+
console.log(colors.dim(` Try: ${colors.cyan(contextualSuggestion.command)}`));
|
|
272
|
+
console.log(colors.dim(` ${contextualSuggestion.description}`));
|
|
273
|
+
newline();
|
|
274
|
+
}
|
|
275
|
+
else {
|
|
276
|
+
// Progressive Disclosure: Suggest next features for beginner users (fallback)
|
|
277
|
+
if (progressiveDisclosure) {
|
|
278
|
+
const profile = progressiveDisclosure.getUserProfile(userId);
|
|
279
|
+
if (profile.level === 'beginner' || profile.level === 'intermediate') {
|
|
280
|
+
const nextFeatures = progressiveDisclosure.getNextSuggestedFeatures(userId, 1);
|
|
281
|
+
if (nextFeatures.length > 0) {
|
|
282
|
+
const feature = nextFeatures[0];
|
|
283
|
+
console.log(info(`💡 Tip: Try "${feature.featureName}" - ${feature.description}`));
|
|
284
|
+
console.log(colors.dim(` Run: codehere ${feature.featureId === 'edit_file' ? 'edit' : feature.featureId === 'react_loop' ? 'react' : 'help'} for more info\n`));
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
// Task 6.1: Explicit Feedback Mechanisms - Prompt for feedback after response
|
|
290
|
+
try {
|
|
291
|
+
const { promptForFeedback, storeFeedback, displayFeedbackConfirmation } = await import('../../../infrastructure/ux/feedback-prompt.js');
|
|
292
|
+
const { BiDirectionalLearning } = await import('../../../infrastructure/ux/bi-directional-learning.js');
|
|
293
|
+
// Get learning system from container (or create instance if not available)
|
|
294
|
+
const learningSystem = container.biDirectionalLearning || new BiDirectionalLearning();
|
|
295
|
+
const userId = process.env.USER || 'default-user';
|
|
296
|
+
const feedback = await promptForFeedback('ask', {
|
|
297
|
+
query: question,
|
|
298
|
+
response: result.answer,
|
|
299
|
+
sessionId: executionTracer.getCurrentRunId(),
|
|
300
|
+
});
|
|
301
|
+
if (feedback) {
|
|
302
|
+
storeFeedback(learningSystem, userId, feedback, {
|
|
303
|
+
operation: 'ask',
|
|
304
|
+
query: question,
|
|
305
|
+
response: result.answer,
|
|
306
|
+
sessionId: executionTracer.getCurrentRunId(),
|
|
307
|
+
});
|
|
308
|
+
displayFeedbackConfirmation(feedback);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
catch (feedbackError) {
|
|
312
|
+
// Don't fail the command if feedback collection fails
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
// Record success for Trust Dashboard
|
|
316
|
+
const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
|
|
317
|
+
agentFeedbackManager.recordFeedback({
|
|
318
|
+
runId: runId,
|
|
319
|
+
agentName: 'ask',
|
|
320
|
+
operation: 'ask_question',
|
|
321
|
+
query: question,
|
|
322
|
+
outcome: 'success',
|
|
323
|
+
metrics: {
|
|
324
|
+
executionTime: Date.now() - startTime,
|
|
325
|
+
chunksRetrieved: result.chunks.length,
|
|
326
|
+
memoriesUsed: result.memories?.length || 0,
|
|
327
|
+
},
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
catch (err) {
|
|
331
|
+
// Record failure for Trust Dashboard
|
|
332
|
+
try {
|
|
333
|
+
const { agentFeedbackManager } = await import('../../../infrastructure/validation/agent-feedback.js');
|
|
334
|
+
agentFeedbackManager.recordFeedback({
|
|
335
|
+
runId: runId,
|
|
336
|
+
agentName: 'ask',
|
|
337
|
+
operation: 'ask_question',
|
|
338
|
+
query: question,
|
|
339
|
+
outcome: 'failure',
|
|
340
|
+
errors: [err instanceof Error ? err.message : String(err)],
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
catch { /* ignore feedback errors */ }
|
|
344
|
+
displayError(err, {
|
|
345
|
+
operation: 'ask',
|
|
346
|
+
query: question,
|
|
347
|
+
showSuggestions: true,
|
|
348
|
+
});
|
|
349
|
+
throw err;
|
|
350
|
+
}
|
|
351
|
+
finally {
|
|
352
|
+
executionTracer.endRun();
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
//# sourceMappingURL=ask-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/ask-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,uDAAuD,CAAC;AAClF,OAAO,EACL,MAAM,EACN,aAAa,EACb,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,OAAO,EACP,OAAO,EACP,IAAI,EACJ,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,2DAA2D,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;A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AC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Security Audit Export
|
|
3
|
+
* P1 Security: Compliance-ready audit trail export
|
|
4
|
+
*/
|
|
5
|
+
export declare function executeAuditCommand(action: 'export' | 'list', options: {
|
|
6
|
+
format?: 'json' | 'jsonl' | 'csv';
|
|
7
|
+
startDate?: string;
|
|
8
|
+
endDate?: string;
|
|
9
|
+
includeInputs?: boolean;
|
|
10
|
+
includeOutputs?: boolean;
|
|
11
|
+
outputPath?: string;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=audit-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/audit-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,QAAQ,GAAG,MAAM,EACzB,OAAO,EAAE;IACP,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GACA,OAAO,CAAC,IAAI,CAAC,CAiGf"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Security Audit Export
|
|
3
|
+
* P1 Security: Compliance-ready audit trail export
|
|
4
|
+
*/
|
|
5
|
+
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
6
|
+
import { colors, success, error, info, newline, createBanner } from '../../../ui.js';
|
|
7
|
+
export async function executeAuditCommand(action, options) {
|
|
8
|
+
if (action === 'export') {
|
|
9
|
+
// Parse date strings if provided
|
|
10
|
+
const startDate = options.startDate ? new Date(options.startDate) : undefined;
|
|
11
|
+
const endDate = options.endDate ? new Date(options.endDate) : undefined;
|
|
12
|
+
if (startDate && isNaN(startDate.getTime())) {
|
|
13
|
+
console.error(error('Invalid start date format. Use ISO 8601 format (e.g., 2025-01-15T00:00:00Z)'));
|
|
14
|
+
process.exit(1);
|
|
15
|
+
}
|
|
16
|
+
if (endDate && isNaN(endDate.getTime())) {
|
|
17
|
+
console.error(error('Invalid end date format. Use ISO 8601 format (e.g., 2025-01-15T23:59:59Z)'));
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
const format = options.format || 'json';
|
|
21
|
+
const includeInputs = options.includeInputs || false;
|
|
22
|
+
const includeOutputs = options.includeOutputs || false;
|
|
23
|
+
console.log(createBanner('Security Audit Export', 'Compliance-ready audit trail'));
|
|
24
|
+
newline();
|
|
25
|
+
info(`Format: ${format.toUpperCase()}`);
|
|
26
|
+
if (startDate)
|
|
27
|
+
info(`Start Date: ${startDate.toISOString()}`);
|
|
28
|
+
if (endDate)
|
|
29
|
+
info(`End Date: ${endDate.toISOString()}`);
|
|
30
|
+
if (includeInputs)
|
|
31
|
+
info('Including inputs');
|
|
32
|
+
if (includeOutputs)
|
|
33
|
+
info('Including outputs');
|
|
34
|
+
newline();
|
|
35
|
+
try {
|
|
36
|
+
const exportPath = executionTracer.exportSecurityAuditTrail({
|
|
37
|
+
format,
|
|
38
|
+
startDate,
|
|
39
|
+
endDate,
|
|
40
|
+
includeInputs,
|
|
41
|
+
includeOutputs,
|
|
42
|
+
outputPath: options.outputPath,
|
|
43
|
+
});
|
|
44
|
+
console.log(success(`Security audit trail exported to:`));
|
|
45
|
+
console.log(colors.bold(exportPath));
|
|
46
|
+
newline();
|
|
47
|
+
info('This file contains all security-relevant operations including:');
|
|
48
|
+
info(' • Prompt injection detection results');
|
|
49
|
+
info(' • Security scan results (SAST, License, Provider Bias)');
|
|
50
|
+
info(' • LLM call traces with security metadata');
|
|
51
|
+
info(' • File operations and code generation');
|
|
52
|
+
newline();
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
console.error(error('Export failed:'), err instanceof Error ? err.message : String(err));
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else if (action === 'list') {
|
|
60
|
+
console.log(createBanner('Security Audit Runs', 'List all security-relevant runs'));
|
|
61
|
+
newline();
|
|
62
|
+
try {
|
|
63
|
+
const runs = executionTracer.listAllRuns();
|
|
64
|
+
if (runs.length === 0) {
|
|
65
|
+
info('No runs found');
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
// Filter to security-relevant runs
|
|
69
|
+
const securityRuns = runs.filter(run => run.operation.includes('edit') ||
|
|
70
|
+
run.operation.includes('fix') ||
|
|
71
|
+
run.operation.includes('refactor'));
|
|
72
|
+
if (securityRuns.length === 0) {
|
|
73
|
+
info('No security-relevant runs found');
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
console.log(colors.bold(`Found ${securityRuns.length} security-relevant runs:\n`));
|
|
77
|
+
for (const run of securityRuns.slice(0, 20)) {
|
|
78
|
+
const date = new Date(run.timestamp).toISOString();
|
|
79
|
+
console.log(`${colors.dim(run.runId)}`);
|
|
80
|
+
console.log(` Operation: ${run.operation}`);
|
|
81
|
+
console.log(` Timestamp: ${date}`);
|
|
82
|
+
console.log(` Traces: ${run.traceCount}`);
|
|
83
|
+
newline();
|
|
84
|
+
}
|
|
85
|
+
if (securityRuns.length > 20) {
|
|
86
|
+
info(`... and ${securityRuns.length - 20} more runs`);
|
|
87
|
+
info('Use "codehere audit export" to export all runs');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (err) {
|
|
91
|
+
console.error(error('List failed:'), err instanceof Error ? err.message : String(err));
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=audit-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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ACxC,OAAO,CAAC,GAAG,CAAC,gBAAgB,GAAG,CAAC,SAAS,EAAE,CAAC,CAAC;gBAC7C,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;gBACpC,OAAO,CAAC,GAAG,CAAC,aAAa,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;gBAC3C,OAAO,EAAE,CAAC;YACZ,CAAC;YAED,IAAI,YAAY,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;gBAC7B,IAAI,CAAC,WAAW,YAAY,CAAC,MAAM,GAAG,EAAE,YAAY,CAAC,CAAC;gBACtD,IAAI,CAAC,gDAAgD,CAAC,CAAC;YACzD,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YACvF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Command
|
|
3
|
+
* Manage Codehere configuration and preferences
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Execute config command
|
|
7
|
+
*/
|
|
8
|
+
export declare function executeConfigCommand(action?: string, key?: string, value?: string): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=config-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/config-command.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsDH;;GAEG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAmFvG"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Config Command
|
|
3
|
+
* Manage Codehere configuration and preferences
|
|
4
|
+
*/
|
|
5
|
+
import { colors, separator, newline, sectionHeader, success, error, createTable, isMinimalStyle, } from '../../../ui.js';
|
|
6
|
+
import { getConfigManager } from '../../../infrastructure/config/config-manager.js';
|
|
7
|
+
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
8
|
+
import { findCodebaseRoot } from '../../../domain/services/codebase-detector.js';
|
|
9
|
+
/**
|
|
10
|
+
* Display current configuration
|
|
11
|
+
*/
|
|
12
|
+
function displayConfig(config) {
|
|
13
|
+
sectionHeader('Current Configuration');
|
|
14
|
+
const configRows = [
|
|
15
|
+
['Preference', 'Value'],
|
|
16
|
+
['Auto Commit', config.preferences.autoCommit ? 'Yes' : 'No'],
|
|
17
|
+
['Ask Before Destructive', config.preferences.askBeforeDestructive ? 'Yes' : 'No'],
|
|
18
|
+
['Cross-Team Learning', config.preferences.enableCrossTeamLearning ? 'Enabled' : 'Disabled'],
|
|
19
|
+
['Default Model', config.preferences.defaultModel || '(provider default)'],
|
|
20
|
+
['Max Tokens', String(config.preferences.maxTokens || 4096)],
|
|
21
|
+
['Temperature', String(config.preferences.temperature || 0.3)],
|
|
22
|
+
['Streaming', config.preferences.enableStreaming ? 'Enabled' : 'Disabled'],
|
|
23
|
+
['Output Format', config.ui.outputFormat || 'full'],
|
|
24
|
+
['Show Progress', config.ui.showProgress ? 'Yes' : 'No'],
|
|
25
|
+
['Show Summary', config.ui.showSummary ? 'Yes' : 'No'],
|
|
26
|
+
];
|
|
27
|
+
if (config.codebase.root) {
|
|
28
|
+
configRows.push(['Codebase Root', config.codebase.root]);
|
|
29
|
+
if (config.codebase.lastIndexed) {
|
|
30
|
+
const date = new Date(config.codebase.lastIndexed);
|
|
31
|
+
configRows.push(['Last Indexed', date.toLocaleString()]);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
const table = createTable(['Preference', 'Value'], configRows.slice(1));
|
|
35
|
+
console.log(table.toString());
|
|
36
|
+
newline();
|
|
37
|
+
console.log(colors.dim(`Config file: ${getConfigManager().getConfigPath()}`));
|
|
38
|
+
newline();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Execute config command
|
|
42
|
+
*/
|
|
43
|
+
export async function executeConfigCommand(action, key, value) {
|
|
44
|
+
// Start execution tracing
|
|
45
|
+
const codebaseInfo = findCodebaseRoot(process.cwd());
|
|
46
|
+
const runId = executionTracer.startRun('config', {
|
|
47
|
+
codebaseId: codebaseInfo?.rootPath || process.cwd(),
|
|
48
|
+
});
|
|
49
|
+
try {
|
|
50
|
+
if (!isMinimalStyle()) {
|
|
51
|
+
newline();
|
|
52
|
+
console.log(separator('═', 80));
|
|
53
|
+
console.log(colors.bold('Codehere - Configuration Manager'));
|
|
54
|
+
console.log(separator('═', 80));
|
|
55
|
+
newline();
|
|
56
|
+
}
|
|
57
|
+
const configManager = getConfigManager();
|
|
58
|
+
const config = configManager.getAll();
|
|
59
|
+
// No action - show current config
|
|
60
|
+
if (!action || action === 'show' || action === 'list') {
|
|
61
|
+
displayConfig(config);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Get value
|
|
65
|
+
if (action === 'get' && key) {
|
|
66
|
+
const preference = configManager.getPreference(key);
|
|
67
|
+
if (preference !== undefined) {
|
|
68
|
+
console.log(preference);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
console.error(error(`Preference '${key}' not found.`));
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
// Set value
|
|
77
|
+
if (action === 'set' && key && value !== undefined) {
|
|
78
|
+
try {
|
|
79
|
+
// Parse value (boolean, number, or string)
|
|
80
|
+
let parsedValue = value;
|
|
81
|
+
if (value.toLowerCase() === 'true')
|
|
82
|
+
parsedValue = true;
|
|
83
|
+
else if (value.toLowerCase() === 'false')
|
|
84
|
+
parsedValue = false;
|
|
85
|
+
else if (!isNaN(Number(value)))
|
|
86
|
+
parsedValue = Number(value);
|
|
87
|
+
configManager.setPreference(key, parsedValue);
|
|
88
|
+
configManager.saveConfig();
|
|
89
|
+
console.log(success(`Set ${key} = ${parsedValue}`));
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
console.error(error(`Failed to set preference: ${err instanceof Error ? err.message : String(err)}`));
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
// Reset to defaults
|
|
98
|
+
if (action === 'reset') {
|
|
99
|
+
configManager.reset();
|
|
100
|
+
console.log(success('Configuration reset to defaults'));
|
|
101
|
+
newline();
|
|
102
|
+
displayConfig(configManager.getAll());
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
// Invalid action
|
|
106
|
+
console.error(error(`Unknown action: ${action}`));
|
|
107
|
+
newline();
|
|
108
|
+
console.log(colors.bold('Usage:'));
|
|
109
|
+
console.log(colors.cyan(' codehere config Show current configuration'));
|
|
110
|
+
console.log(colors.cyan(' codehere config get <key> Get a preference value'));
|
|
111
|
+
console.log(colors.cyan(' codehere config set <key> <value> Set a preference value'));
|
|
112
|
+
console.log(colors.cyan(' codehere config reset Reset to defaults'));
|
|
113
|
+
newline();
|
|
114
|
+
console.log(colors.bold('Examples:'));
|
|
115
|
+
console.log(colors.dim(' codehere config set autoCommit true'));
|
|
116
|
+
console.log(colors.dim(' codehere config set temperature 0.5'));
|
|
117
|
+
console.log(colors.dim(' codehere config get defaultModel'));
|
|
118
|
+
newline();
|
|
119
|
+
process.exit(1);
|
|
120
|
+
}
|
|
121
|
+
finally {
|
|
122
|
+
executionTracer.endRun();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
//# sourceMappingURL=config-command.js.map
|