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,301 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Trust Dashboard
|
|
3
|
+
* Shows agent reliability metrics and trust scores
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
6
|
+
*/
|
|
7
|
+
import { colors, sectionHeader, success, error, warning, info, newline, createBanner, createTable, formatNumber, separator, } from '../../../ui.js';
|
|
8
|
+
import { agentFeedbackManager } from '../../../infrastructure/validation/agent-feedback.js';
|
|
9
|
+
export async function executeTrustCommand(action = 'status', options = {}) {
|
|
10
|
+
console.log(createBanner('Trust Dashboard', 'Agent reliability and performance metrics'));
|
|
11
|
+
newline();
|
|
12
|
+
switch (action) {
|
|
13
|
+
case 'status':
|
|
14
|
+
await showTrustStatus(options);
|
|
15
|
+
break;
|
|
16
|
+
case 'history':
|
|
17
|
+
await showTrustHistory(options.limit || 20);
|
|
18
|
+
break;
|
|
19
|
+
case 'reset':
|
|
20
|
+
console.log(warning('Reset not implemented in alpha. Feedback is stored in memory only.'));
|
|
21
|
+
break;
|
|
22
|
+
default:
|
|
23
|
+
console.log(error(`Unknown action: ${action}`));
|
|
24
|
+
console.log(info('Available actions: status, history, reset'));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
async function showTrustStatus(options = {}) {
|
|
28
|
+
const metrics = calculateTrustMetrics();
|
|
29
|
+
if (options.json) {
|
|
30
|
+
console.log(JSON.stringify(metrics, null, 2));
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
// Overall Trust Score
|
|
34
|
+
sectionHeader('Overall Trust Score');
|
|
35
|
+
newline();
|
|
36
|
+
const trustScore = Math.round(metrics.successRate * 100);
|
|
37
|
+
const trustBar = createTrustBar(trustScore);
|
|
38
|
+
const trustColor = getTrustColor(trustScore);
|
|
39
|
+
console.log(` ${trustBar} ${trustColor(`${trustScore}%`)}`);
|
|
40
|
+
console.log(colors.dim(` Based on ${metrics.totalOperations} operations`));
|
|
41
|
+
newline();
|
|
42
|
+
// Trust Level
|
|
43
|
+
const trustLevel = getTrustLevel(trustScore);
|
|
44
|
+
console.log(` Trust Level: ${trustColor(trustLevel.name)}`);
|
|
45
|
+
console.log(colors.dim(` ${trustLevel.description}`));
|
|
46
|
+
newline();
|
|
47
|
+
// Trend
|
|
48
|
+
const trendIcon = getTrendIcon(metrics.recentTrend);
|
|
49
|
+
console.log(` Recent Trend: ${trendIcon} ${metrics.recentTrend.replace('_', ' ')}`);
|
|
50
|
+
newline();
|
|
51
|
+
// Breakdown by Operation
|
|
52
|
+
if (Object.keys(metrics.byOperation).length > 0) {
|
|
53
|
+
sectionHeader('Trust by Operation');
|
|
54
|
+
const operationRows = Object.entries(metrics.byOperation)
|
|
55
|
+
.sort((a, b) => b[1].total - a[1].total)
|
|
56
|
+
.map(([op, data]) => {
|
|
57
|
+
const rate = Math.round(data.rate * 100);
|
|
58
|
+
const rateColor = getTrustColor(rate);
|
|
59
|
+
return [
|
|
60
|
+
op,
|
|
61
|
+
formatNumber(data.success),
|
|
62
|
+
formatNumber(data.total),
|
|
63
|
+
rateColor(`${rate}%`),
|
|
64
|
+
];
|
|
65
|
+
});
|
|
66
|
+
const operationTable = createTable(['Operation', 'Success', 'Total', 'Trust'], operationRows);
|
|
67
|
+
console.log(operationTable.toString());
|
|
68
|
+
newline();
|
|
69
|
+
}
|
|
70
|
+
// Breakdown by Agent
|
|
71
|
+
if (Object.keys(metrics.byAgent).length > 0) {
|
|
72
|
+
sectionHeader('Trust by Agent');
|
|
73
|
+
const agentRows = Object.entries(metrics.byAgent)
|
|
74
|
+
.sort((a, b) => b[1].total - a[1].total)
|
|
75
|
+
.map(([agent, data]) => {
|
|
76
|
+
const rate = Math.round(data.rate * 100);
|
|
77
|
+
const rateColor = getTrustColor(rate);
|
|
78
|
+
return [
|
|
79
|
+
agent,
|
|
80
|
+
formatNumber(data.success),
|
|
81
|
+
formatNumber(data.total),
|
|
82
|
+
rateColor(`${rate}%`),
|
|
83
|
+
];
|
|
84
|
+
});
|
|
85
|
+
const agentTable = createTable(['Agent', 'Success', 'Total', 'Trust'], agentRows);
|
|
86
|
+
console.log(agentTable.toString());
|
|
87
|
+
newline();
|
|
88
|
+
}
|
|
89
|
+
// Recommendations
|
|
90
|
+
sectionHeader('Recommendations');
|
|
91
|
+
const recommendations = getRecommendations(metrics);
|
|
92
|
+
if (recommendations.length === 0) {
|
|
93
|
+
console.log(success('All systems operating within expected parameters.'));
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
recommendations.forEach(rec => {
|
|
97
|
+
console.log(` ${rec.icon} ${rec.message}`);
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
newline();
|
|
101
|
+
// Tips
|
|
102
|
+
console.log(separator('─', 60));
|
|
103
|
+
console.log(colors.dim('Tips:'));
|
|
104
|
+
console.log(colors.dim(' • Use --review flag for destructive operations'));
|
|
105
|
+
console.log(colors.dim(' • Lower trust scores may indicate need for more context'));
|
|
106
|
+
console.log(colors.dim(' • Run "codehere trust history" to see recent operations'));
|
|
107
|
+
newline();
|
|
108
|
+
}
|
|
109
|
+
async function showTrustHistory(limit) {
|
|
110
|
+
const records = agentFeedbackManager.getAllFeedback(limit);
|
|
111
|
+
if (records.length === 0) {
|
|
112
|
+
console.log(info('No operation history yet.'));
|
|
113
|
+
console.log(colors.dim('Run some commands to start building trust metrics.'));
|
|
114
|
+
newline();
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
sectionHeader(`Recent Operations (${records.length})`);
|
|
118
|
+
newline();
|
|
119
|
+
const historyRows = records.slice(0, limit).map(record => {
|
|
120
|
+
const outcomeIcon = getOutcomeIcon(record.outcome);
|
|
121
|
+
const time = record.timestamp
|
|
122
|
+
? new Date(record.timestamp).toLocaleString()
|
|
123
|
+
: 'Unknown';
|
|
124
|
+
return [
|
|
125
|
+
outcomeIcon,
|
|
126
|
+
record.operation || record.agentName,
|
|
127
|
+
truncate(record.query || '-', 30),
|
|
128
|
+
record.outcome,
|
|
129
|
+
time,
|
|
130
|
+
];
|
|
131
|
+
});
|
|
132
|
+
const historyTable = createTable(['', 'Operation', 'Query', 'Outcome', 'Time'], historyRows);
|
|
133
|
+
console.log(historyTable.toString());
|
|
134
|
+
newline();
|
|
135
|
+
}
|
|
136
|
+
function calculateTrustMetrics() {
|
|
137
|
+
const records = agentFeedbackManager.getAllFeedback(500);
|
|
138
|
+
if (records.length === 0) {
|
|
139
|
+
return {
|
|
140
|
+
totalOperations: 0,
|
|
141
|
+
successRate: 1,
|
|
142
|
+
approvalRate: 1,
|
|
143
|
+
byOperation: {},
|
|
144
|
+
byAgent: {},
|
|
145
|
+
recentTrend: 'insufficient_data',
|
|
146
|
+
lastUpdated: Date.now(),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
let successCount = 0;
|
|
150
|
+
let approvalCount = 0;
|
|
151
|
+
let reviewedCount = 0;
|
|
152
|
+
const byOperation = {};
|
|
153
|
+
const byAgent = {};
|
|
154
|
+
for (const record of records) {
|
|
155
|
+
const isSuccess = record.outcome === 'success';
|
|
156
|
+
// Overall
|
|
157
|
+
if (isSuccess)
|
|
158
|
+
successCount++;
|
|
159
|
+
// By operation
|
|
160
|
+
const op = record.operation || 'unknown';
|
|
161
|
+
if (!byOperation[op]) {
|
|
162
|
+
byOperation[op] = { success: 0, total: 0, rate: 0 };
|
|
163
|
+
}
|
|
164
|
+
byOperation[op].total++;
|
|
165
|
+
if (isSuccess)
|
|
166
|
+
byOperation[op].success++;
|
|
167
|
+
// By agent
|
|
168
|
+
const agent = record.agentName || 'unknown';
|
|
169
|
+
if (!byAgent[agent]) {
|
|
170
|
+
byAgent[agent] = { success: 0, total: 0, rate: 0 };
|
|
171
|
+
}
|
|
172
|
+
byAgent[agent].total++;
|
|
173
|
+
if (isSuccess)
|
|
174
|
+
byAgent[agent].success++;
|
|
175
|
+
// Approvals
|
|
176
|
+
if (record.userAction === 'approved' || record.userAction === 'rejected') {
|
|
177
|
+
reviewedCount++;
|
|
178
|
+
if (record.userAction === 'approved')
|
|
179
|
+
approvalCount++;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
// Calculate rates
|
|
183
|
+
Object.values(byOperation).forEach(data => {
|
|
184
|
+
data.rate = data.total > 0 ? data.success / data.total : 0;
|
|
185
|
+
});
|
|
186
|
+
Object.values(byAgent).forEach(data => {
|
|
187
|
+
data.rate = data.total > 0 ? data.success / data.total : 0;
|
|
188
|
+
});
|
|
189
|
+
// Calculate trend
|
|
190
|
+
const recentTrend = calculateTrend(records);
|
|
191
|
+
return {
|
|
192
|
+
totalOperations: records.length,
|
|
193
|
+
successRate: records.length > 0 ? successCount / records.length : 1,
|
|
194
|
+
approvalRate: reviewedCount > 0 ? approvalCount / reviewedCount : 1,
|
|
195
|
+
byOperation,
|
|
196
|
+
byAgent,
|
|
197
|
+
recentTrend,
|
|
198
|
+
lastUpdated: Date.now(),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
function calculateTrend(records) {
|
|
202
|
+
if (records.length < 10)
|
|
203
|
+
return 'insufficient_data';
|
|
204
|
+
const recent = records.slice(0, Math.min(10, records.length));
|
|
205
|
+
const older = records.slice(Math.min(10, records.length), Math.min(20, records.length));
|
|
206
|
+
if (older.length < 5)
|
|
207
|
+
return 'insufficient_data';
|
|
208
|
+
const recentSuccess = recent.filter(r => r.outcome === 'success').length / recent.length;
|
|
209
|
+
const olderSuccess = older.filter(r => r.outcome === 'success').length / older.length;
|
|
210
|
+
const diff = recentSuccess - olderSuccess;
|
|
211
|
+
if (diff > 0.1)
|
|
212
|
+
return 'improving';
|
|
213
|
+
if (diff < -0.1)
|
|
214
|
+
return 'declining';
|
|
215
|
+
return 'stable';
|
|
216
|
+
}
|
|
217
|
+
function createTrustBar(percentage) {
|
|
218
|
+
const width = 30;
|
|
219
|
+
const filled = Math.round((percentage / 100) * width);
|
|
220
|
+
const empty = width - filled;
|
|
221
|
+
let bar = '';
|
|
222
|
+
const color = getTrustColor(percentage);
|
|
223
|
+
bar = color('█'.repeat(filled)) + colors.dim('░'.repeat(empty));
|
|
224
|
+
return `[${bar}]`;
|
|
225
|
+
}
|
|
226
|
+
function getTrustColor(percentage) {
|
|
227
|
+
if (percentage >= 80)
|
|
228
|
+
return colors.green;
|
|
229
|
+
if (percentage >= 60)
|
|
230
|
+
return colors.yellow;
|
|
231
|
+
return colors.red;
|
|
232
|
+
}
|
|
233
|
+
function getTrustLevel(percentage) {
|
|
234
|
+
if (percentage >= 90) {
|
|
235
|
+
return { name: 'HIGH', description: 'Agent operations are highly reliable' };
|
|
236
|
+
}
|
|
237
|
+
if (percentage >= 75) {
|
|
238
|
+
return { name: 'GOOD', description: 'Agent operations are generally reliable' };
|
|
239
|
+
}
|
|
240
|
+
if (percentage >= 60) {
|
|
241
|
+
return { name: 'MODERATE', description: 'Consider using --review for important operations' };
|
|
242
|
+
}
|
|
243
|
+
if (percentage >= 40) {
|
|
244
|
+
return { name: 'LOW', description: 'Recommend using --review flag for all operations' };
|
|
245
|
+
}
|
|
246
|
+
return { name: 'CRITICAL', description: 'Agent requires review - check recent errors' };
|
|
247
|
+
}
|
|
248
|
+
function getTrendIcon(trend) {
|
|
249
|
+
switch (trend) {
|
|
250
|
+
case 'improving': return colors.green('↑');
|
|
251
|
+
case 'declining': return colors.red('↓');
|
|
252
|
+
case 'stable': return colors.blue('→');
|
|
253
|
+
default: return colors.dim('?');
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
function getOutcomeIcon(outcome) {
|
|
257
|
+
switch (outcome) {
|
|
258
|
+
case 'success': return colors.green('✓');
|
|
259
|
+
case 'failure': return colors.red('✗');
|
|
260
|
+
case 'cancelled': return colors.yellow('○');
|
|
261
|
+
case 'partial': return colors.yellow('◐');
|
|
262
|
+
default: return colors.dim('?');
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
function getRecommendations(metrics) {
|
|
266
|
+
const recommendations = [];
|
|
267
|
+
if (metrics.totalOperations < 10) {
|
|
268
|
+
recommendations.push({
|
|
269
|
+
icon: colors.blue('ℹ'),
|
|
270
|
+
message: 'Run more operations to build reliable trust metrics',
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
if (metrics.successRate < 0.6) {
|
|
274
|
+
recommendations.push({
|
|
275
|
+
icon: colors.yellow('⚠'),
|
|
276
|
+
message: 'Low success rate - consider providing more context in queries',
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
if (metrics.recentTrend === 'declining') {
|
|
280
|
+
recommendations.push({
|
|
281
|
+
icon: colors.red('!'),
|
|
282
|
+
message: 'Trust declining - review recent failures for patterns',
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
// Check for problematic operations
|
|
286
|
+
Object.entries(metrics.byOperation).forEach(([op, data]) => {
|
|
287
|
+
if (data.total >= 5 && data.rate < 0.5) {
|
|
288
|
+
recommendations.push({
|
|
289
|
+
icon: colors.yellow('⚠'),
|
|
290
|
+
message: `"${op}" has low success rate (${Math.round(data.rate * 100)}%) - may need more specific queries`,
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
return recommendations;
|
|
295
|
+
}
|
|
296
|
+
function truncate(str, maxLen) {
|
|
297
|
+
if (str.length <= maxLen)
|
|
298
|
+
return str;
|
|
299
|
+
return str.substring(0, maxLen - 1) + '…';
|
|
300
|
+
}
|
|
301
|
+
//# sourceMappingURL=trust-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trust-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/trust-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,sDAAsD,CAAC;AAY5F,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,SAAyC,QAAQ,EACjD,UAA8C,EAAE;IAEhD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,iBAAiB,EAAE,2CAA2C,CAAC,CAAC,CAAC;IAC1F,OAAO,EAAE,CAAC;IAEV,QAAQ,MAAM,EAAE,CAAC;QACf,KAAK,QAAQ;YACX,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC;YAC/B,MAAM;QACR,KAAK,SAAS;YACZ,MAAM,gBAAgB,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;YAC5C,MAAM;QACR,KAAK,OAAO;YACV,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,oEAAoE,CAAC,CAAC,CAAC;YAC3F,MAAM;QACR;YACE,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,mBAAmB,MAAM,EAAE,CAAC,CAAC,CAAC;YAChD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC,CAAC;IACnE,CAAC;AACH,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,UAA8B,EAAE;IAC7D,MAAM,OAAO,GAAG,qBAAqB,EA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,GAAW,EAAE,MAAc;IAC3C,IAAI,GAAG,CAAC,MAAM,IAAI,MAAM;QAAE,OAAO,GAAG,CAAC;IACrC,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Undo
|
|
3
|
+
* Undo file changes by restoring from backups
|
|
4
|
+
*
|
|
5
|
+
* Clean Architecture: Presentation Layer
|
|
6
|
+
*/
|
|
7
|
+
export declare function executeUndoCommand(action: 'undo' | 'list' | 'restore', filepath?: string, backupPath?: string): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=undo-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undo-command.d.ts","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/undo-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EACnC,QAAQ,CAAC,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAsDf"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI Command: Undo
|
|
3
|
+
* Undo file changes by restoring from backups
|
|
4
|
+
*
|
|
5
|
+
* Clean Architecture: Presentation Layer
|
|
6
|
+
*/
|
|
7
|
+
import { rollbackFile, listBackups, findLatestBackup } from '../../../verification/backup.js';
|
|
8
|
+
import { colors, sectionHeader, success, error, warning, info, newline, createBanner, createTable, } from '../../../ui.js';
|
|
9
|
+
import { displayError } from '../error-display.js';
|
|
10
|
+
import { executionTracer } from '../../../infrastructure/observability/execution-tracer.js';
|
|
11
|
+
export async function executeUndoCommand(action, filepath, backupPath) {
|
|
12
|
+
// Start execution tracing
|
|
13
|
+
const runId = executionTracer.startRun('undo', {
|
|
14
|
+
codebaseId: process.cwd(),
|
|
15
|
+
});
|
|
16
|
+
try {
|
|
17
|
+
console.log(createBanner('Undo System', 'File recovery and rollback'));
|
|
18
|
+
newline();
|
|
19
|
+
switch (action) {
|
|
20
|
+
case 'undo': {
|
|
21
|
+
if (!filepath) {
|
|
22
|
+
console.log(error('File path is required for undo'));
|
|
23
|
+
console.log(info('Usage: codehere undo <filepath>'));
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
await undoFile(filepath);
|
|
27
|
+
break;
|
|
28
|
+
}
|
|
29
|
+
case 'list': {
|
|
30
|
+
if (!filepath) {
|
|
31
|
+
console.log(error('File path is required for list'));
|
|
32
|
+
console.log(info('Usage: codehere undo list <filepath>'));
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
await listFileBackups(filepath);
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
case 'restore': {
|
|
39
|
+
if (!filepath || !backupPath) {
|
|
40
|
+
console.log(error('File path and backup path are required for restore'));
|
|
41
|
+
console.log(info('Usage: codehere undo restore <filepath> <backupPath>'));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
await restoreFromBackup(filepath, backupPath);
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
default:
|
|
48
|
+
console.log(error(`Unknown action: ${action}`));
|
|
49
|
+
console.log(info('Available actions: undo, list, restore'));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
displayError(err, {
|
|
54
|
+
operation: `undo-${action}`,
|
|
55
|
+
showSuggestions: true,
|
|
56
|
+
});
|
|
57
|
+
throw err;
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
executionTracer.endRun();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
async function undoFile(filepath) {
|
|
64
|
+
const { join } = await import('path');
|
|
65
|
+
const fullPath = join(process.cwd(), filepath);
|
|
66
|
+
sectionHeader('Undo File Changes');
|
|
67
|
+
newline();
|
|
68
|
+
try {
|
|
69
|
+
const latestBackup = await findLatestBackup(fullPath);
|
|
70
|
+
if (!latestBackup) {
|
|
71
|
+
console.log(warning(`No backup found for: ${filepath}`));
|
|
72
|
+
console.log(colors.dim(' Backups are created automatically before edits.'));
|
|
73
|
+
console.log(colors.dim(' If you haven\'t made any edits, there may be no backup.'));
|
|
74
|
+
newline();
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
console.log(colors.bold('Restoring from backup:'));
|
|
78
|
+
console.log(colors.dim(` File: ${filepath}`));
|
|
79
|
+
console.log(colors.dim(` Backup: ${latestBackup}`));
|
|
80
|
+
newline();
|
|
81
|
+
await rollbackFile(fullPath, latestBackup);
|
|
82
|
+
console.log(success('File restored successfully'));
|
|
83
|
+
newline();
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
displayError(err, {
|
|
87
|
+
operation: 'undo',
|
|
88
|
+
filepath: filepath,
|
|
89
|
+
showSuggestions: true,
|
|
90
|
+
});
|
|
91
|
+
throw err;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
async function listFileBackups(filepath) {
|
|
95
|
+
const { join } = await import('path');
|
|
96
|
+
const fullPath = join(process.cwd(), filepath);
|
|
97
|
+
sectionHeader('Available Backups');
|
|
98
|
+
newline();
|
|
99
|
+
try {
|
|
100
|
+
const backups = await listBackups(fullPath);
|
|
101
|
+
if (backups.length === 0) {
|
|
102
|
+
console.log(warning(`No backups found for: ${filepath}`));
|
|
103
|
+
newline();
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const backupRows = backups.map((backup, index) => [
|
|
107
|
+
String(index + 1),
|
|
108
|
+
backup.timestamp.toISOString(),
|
|
109
|
+
backup.backupPath,
|
|
110
|
+
]);
|
|
111
|
+
const table = createTable(['#', 'Timestamp', 'Backup Path'], backupRows);
|
|
112
|
+
console.log(table.toString());
|
|
113
|
+
newline();
|
|
114
|
+
console.log(colors.dim(`Total backups: ${backups.length}`));
|
|
115
|
+
console.log(colors.dim(`Use: codehere undo restore <filepath> <backupPath> to restore a specific backup`));
|
|
116
|
+
newline();
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
displayError(err, {
|
|
120
|
+
operation: 'undo-list',
|
|
121
|
+
filepath: filepath,
|
|
122
|
+
showSuggestions: true,
|
|
123
|
+
});
|
|
124
|
+
throw err;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
async function restoreFromBackup(filepath, backupPath) {
|
|
128
|
+
const { join } = await import('path');
|
|
129
|
+
const fullPath = join(process.cwd(), filepath);
|
|
130
|
+
sectionHeader('Restore from Backup');
|
|
131
|
+
newline();
|
|
132
|
+
try {
|
|
133
|
+
console.log(colors.bold('Restoring:'));
|
|
134
|
+
console.log(colors.dim(` File: ${filepath}`));
|
|
135
|
+
console.log(colors.dim(` Backup: ${backupPath}`));
|
|
136
|
+
newline();
|
|
137
|
+
await rollbackFile(fullPath, backupPath);
|
|
138
|
+
console.log(success('File restored successfully'));
|
|
139
|
+
newline();
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
displayError(err, {
|
|
143
|
+
operation: 'undo-restore',
|
|
144
|
+
filepath: filepath,
|
|
145
|
+
showSuggestions: true,
|
|
146
|
+
});
|
|
147
|
+
throw err;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=undo-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"undo-command.js","sourceRoot":"","sources":["../../../../src/presentation/cli/commands/undo-command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAmB,MAAM,iCAAiC,CAAC;AAC/G,OAAO,EACL,MAAM,EACN,aAAa,EACb,OAAO,EACP,KAAK,EACL,OAAO,EACP,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,WAAW,GACZ,MAAM,gBAAg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C,MAAM,CAAC,GAAG,CAAC,WAAW,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC/C,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,UAAU,EAAE,CAAC,CAAC,CAAC;QACnD,OAAO,EAAE,CAAC;QAEV,MAAM,YAAY,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAEzC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,4BAA4B,CAAC,CAAC,CAAC;QACnD,OAAO,EAAE,CAAC;IACZ,CAAC;IAAC,OAAO,GAAQ,EAAE,CAAC;QAClB,YAAY,CAAC,GAAG,EAAE;YAChB,SAAS,EAAE,cAAc;YACzB,QAAQ,EAAE,QAAQ;YAClB,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;QACH,MAAM,GAAG,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized Error Display Utility
|
|
3
|
+
* Provides consistent, helpful error messages with recovery suggestions
|
|
4
|
+
*
|
|
5
|
+
* Clean Architecture: Presentation Layer
|
|
6
|
+
*/
|
|
7
|
+
export interface ErrorDisplayOptions {
|
|
8
|
+
operation?: string;
|
|
9
|
+
query?: string;
|
|
10
|
+
showSuggestions?: boolean;
|
|
11
|
+
showStack?: boolean;
|
|
12
|
+
filepath?: string;
|
|
13
|
+
lineNumber?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Display error with helpful context and recovery suggestions
|
|
17
|
+
*/
|
|
18
|
+
export declare function displayError(error: unknown, options?: ErrorDisplayOptions): void;
|
|
19
|
+
/**
|
|
20
|
+
* Display error and exit with appropriate code
|
|
21
|
+
*/
|
|
22
|
+
export declare function displayErrorAndExit(error: unknown, options?: ErrorDisplayOptions & {
|
|
23
|
+
exitCode?: number;
|
|
24
|
+
}): never;
|
|
25
|
+
//# sourceMappingURL=error-display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-display.d.ts","sourceRoot":"","sources":["../../../src/presentation/cli/error-display.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAwMD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,mBAAwB,GAChC,IAAI,CAmGN;AA4ED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE,mBAAmB,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GACxD,KAAK,CAIP"}
|