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,593 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive Session System
|
|
3
|
+
* Seamless REPL-like interface for natural interaction
|
|
4
|
+
*/
|
|
5
|
+
import * as readline from 'readline';
|
|
6
|
+
import { chatWithContext } from './chat.js';
|
|
7
|
+
import { searchIntelligent } from './search.js';
|
|
8
|
+
import { generateAndApplyEdit } from './edit.js';
|
|
9
|
+
import { reviewFile } from './review.js';
|
|
10
|
+
import { planTask, formatPlan } from './planner.js';
|
|
11
|
+
import { IntelligentRouter } from './application/services/intelligent-router.js';
|
|
12
|
+
import { colors, success, error, warning, info, newline, formatNumber, formatPercent, createWelcomeMessage, createSessionWelcome, } from './ui.js';
|
|
13
|
+
import { sessionTokenTracker } from './infrastructure/cost/session-token-tracker.js';
|
|
14
|
+
import { cleanResponse } from './formatter.js';
|
|
15
|
+
/**
|
|
16
|
+
* Start interactive session
|
|
17
|
+
*/
|
|
18
|
+
export async function startSession() {
|
|
19
|
+
// Show welcome
|
|
20
|
+
console.clear();
|
|
21
|
+
console.log(createSessionWelcome());
|
|
22
|
+
newline();
|
|
23
|
+
console.log(colors.dim('Type your questions naturally, or use /commands. Type /help for all commands, exit to quit.'));
|
|
24
|
+
newline();
|
|
25
|
+
console.log(colors.dim('Keyboard Shortcuts: ↑/↓ for history, Ctrl+C to cancel, Ctrl+D to exit, Ctrl+L to clear'));
|
|
26
|
+
newline();
|
|
27
|
+
console.log(colors.dim('────────────────────────────────────────────────────'));
|
|
28
|
+
newline();
|
|
29
|
+
const rl = readline.createInterface({
|
|
30
|
+
input: process.stdin,
|
|
31
|
+
output: process.stdout,
|
|
32
|
+
prompt: colors.cyan('codehere> '),
|
|
33
|
+
historySize: 100, // Enhanced: Store up to 100 commands for history navigation
|
|
34
|
+
});
|
|
35
|
+
const state = {
|
|
36
|
+
history: [],
|
|
37
|
+
context: null,
|
|
38
|
+
};
|
|
39
|
+
rl.prompt();
|
|
40
|
+
rl.on('line', async (input) => {
|
|
41
|
+
const trimmed = input.trim();
|
|
42
|
+
if (!trimmed) {
|
|
43
|
+
rl.prompt();
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
// Handle exit
|
|
47
|
+
if (trimmed.toLowerCase() === 'exit' || trimmed.toLowerCase() === 'quit' || trimmed === 'q') {
|
|
48
|
+
console.log(info('Goodbye! 👋'));
|
|
49
|
+
rl.close();
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
// Handle help
|
|
53
|
+
if (trimmed.toLowerCase() === 'help' || trimmed === '?') {
|
|
54
|
+
showHelp();
|
|
55
|
+
showKeyboardShortcuts();
|
|
56
|
+
rl.prompt();
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
// Handle clear
|
|
60
|
+
if (trimmed.toLowerCase() === 'clear') {
|
|
61
|
+
console.clear();
|
|
62
|
+
console.log(createWelcomeMessage());
|
|
63
|
+
newline();
|
|
64
|
+
rl.prompt();
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
// Parse and execute command
|
|
68
|
+
try {
|
|
69
|
+
await executeCommand(trimmed, state, rl);
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
console.error(error('Error:'), err instanceof Error ? err.message : String(err));
|
|
73
|
+
}
|
|
74
|
+
rl.prompt();
|
|
75
|
+
});
|
|
76
|
+
rl.on('close', () => {
|
|
77
|
+
console.log(newline());
|
|
78
|
+
console.log(colors.dim('Session ended.'));
|
|
79
|
+
process.exit(0);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Execute command in session
|
|
84
|
+
*/
|
|
85
|
+
async function executeCommand(input, state, rl) {
|
|
86
|
+
const lower = input.toLowerCase().trim();
|
|
87
|
+
// SLASH COMMANDS - /command syntax for better discoverability
|
|
88
|
+
// Support both /command and command syntax
|
|
89
|
+
if (lower.startsWith('/')) {
|
|
90
|
+
await handleSlashCommand(input.substring(1), state, rl);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
// Detect command type (legacy syntax without slash)
|
|
94
|
+
if (lower.startsWith('explain ') || lower.startsWith('e ')) {
|
|
95
|
+
const file = input.substring(lower.startsWith('explain ') ? 8 : 2).trim();
|
|
96
|
+
await handleExplain(file, rl);
|
|
97
|
+
}
|
|
98
|
+
else if (lower.startsWith('fix ') || lower.startsWith('edit ')) {
|
|
99
|
+
const parts = input.substring(lower.startsWith('fix ') ? 4 : 5).trim().split(' ');
|
|
100
|
+
const file = parts[0];
|
|
101
|
+
const instruction = parts.slice(1).join(' ');
|
|
102
|
+
await handleFix(file, instruction, rl);
|
|
103
|
+
}
|
|
104
|
+
else if (lower.startsWith('review ')) {
|
|
105
|
+
const file = input.substring(7).trim();
|
|
106
|
+
await handleReview(file, rl);
|
|
107
|
+
}
|
|
108
|
+
else if (lower.startsWith('plan ')) {
|
|
109
|
+
const instruction = input.substring(5).trim();
|
|
110
|
+
await handlePlan(instruction, rl);
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
// Default: use intelligent router - understands any query
|
|
114
|
+
await handleSmartQuery(input, state, rl);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Handle slash commands (/fix, /explain, /review, etc.)
|
|
119
|
+
*/
|
|
120
|
+
async function handleSlashCommand(input, state, rl) {
|
|
121
|
+
const parts = input.trim().split(/\s+/);
|
|
122
|
+
const command = parts[0].toLowerCase();
|
|
123
|
+
const args = parts.slice(1).join(' ');
|
|
124
|
+
switch (command) {
|
|
125
|
+
case 'fix':
|
|
126
|
+
case 'edit': {
|
|
127
|
+
// /fix <file> <instruction>
|
|
128
|
+
const fixParts = args.split(/\s+/);
|
|
129
|
+
if (fixParts.length < 2) {
|
|
130
|
+
console.log(warning('Usage: /fix <file> <instruction>'));
|
|
131
|
+
console.log(colors.dim('Example: /fix src/utils.ts "add error handling"'));
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const file = fixParts[0];
|
|
135
|
+
const instruction = fixParts.slice(1).join(' ');
|
|
136
|
+
await handleFix(file, instruction, rl);
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
case 'explain':
|
|
140
|
+
case 'e': {
|
|
141
|
+
// /explain <file>
|
|
142
|
+
if (!args) {
|
|
143
|
+
console.log(warning('Usage: /explain <file>'));
|
|
144
|
+
console.log(colors.dim('Example: /explain src/auth.ts'));
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
await handleExplain(args.split(/\s+/)[0], rl);
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
case 'review':
|
|
151
|
+
case 'r': {
|
|
152
|
+
// /review <file>
|
|
153
|
+
if (!args) {
|
|
154
|
+
console.log(warning('Usage: /review <file>'));
|
|
155
|
+
console.log(colors.dim('Example: /review src/auth.ts'));
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
await handleReview(args.split(/\s+/)[0], rl);
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
case 'plan':
|
|
162
|
+
case 'p': {
|
|
163
|
+
// /plan <instruction>
|
|
164
|
+
if (!args) {
|
|
165
|
+
console.log(warning('Usage: /plan <instruction>'));
|
|
166
|
+
console.log(colors.dim('Example: /plan "add user authentication"'));
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
await handlePlan(args, rl);
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
case 'cost': {
|
|
173
|
+
// /cost - show instant session token stats (like Claude Code)
|
|
174
|
+
showSessionCostDisplay();
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
177
|
+
case 'trust': {
|
|
178
|
+
// /trust - show trust dashboard
|
|
179
|
+
try {
|
|
180
|
+
const { executeTrustCommand } = await import('./presentation/cli/commands/trust-command.js');
|
|
181
|
+
await executeTrustCommand('status');
|
|
182
|
+
}
|
|
183
|
+
catch (err) {
|
|
184
|
+
console.log(error('Failed to get trust status'));
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
case 'undo': {
|
|
189
|
+
// /undo - undo last edit
|
|
190
|
+
try {
|
|
191
|
+
const { executeUndoCommand } = await import('./presentation/cli/commands/undo-command.js');
|
|
192
|
+
await executeUndoCommand('undo');
|
|
193
|
+
}
|
|
194
|
+
catch (err) {
|
|
195
|
+
console.log(error('Failed to undo'));
|
|
196
|
+
}
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
case 'status': {
|
|
200
|
+
// /status - show project status
|
|
201
|
+
try {
|
|
202
|
+
const { executeStatusCommand } = await import('./presentation/cli/commands/status-command.js');
|
|
203
|
+
await executeStatusCommand();
|
|
204
|
+
}
|
|
205
|
+
catch (err) {
|
|
206
|
+
console.log(error('Failed to get status'));
|
|
207
|
+
}
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
case 'history':
|
|
211
|
+
case 'h': {
|
|
212
|
+
// /history - show command history
|
|
213
|
+
if (state.history.length === 0) {
|
|
214
|
+
console.log(colors.dim('No command history yet.'));
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
console.log(colors.bold('Recent Commands:'));
|
|
218
|
+
state.history.slice(-10).forEach((h, i) => {
|
|
219
|
+
console.log(colors.dim(` ${i + 1}. ${h.command.substring(0, 60)}${h.command.length > 60 ? '...' : ''}`));
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
case 'clear': {
|
|
225
|
+
// /clear - clear screen
|
|
226
|
+
console.clear();
|
|
227
|
+
console.log(createWelcomeMessage());
|
|
228
|
+
newline();
|
|
229
|
+
break;
|
|
230
|
+
}
|
|
231
|
+
case 'help':
|
|
232
|
+
case '?': {
|
|
233
|
+
// /help - show help
|
|
234
|
+
showSlashCommandHelp();
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
default:
|
|
238
|
+
console.log(warning(`Unknown command: /${command}`));
|
|
239
|
+
console.log(colors.dim('Type /help to see available commands'));
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Show instant session cost display (like Claude Code)
|
|
244
|
+
*/
|
|
245
|
+
function showSessionCostDisplay() {
|
|
246
|
+
newline();
|
|
247
|
+
console.log(colors.bold('Session Usage'));
|
|
248
|
+
console.log(colors.dim('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
249
|
+
newline();
|
|
250
|
+
const stats = sessionTokenTracker.getStats();
|
|
251
|
+
const formatTokens = (n) => {
|
|
252
|
+
if (n >= 1000000)
|
|
253
|
+
return `${(n / 1000000).toFixed(2)}M`;
|
|
254
|
+
if (n >= 1000)
|
|
255
|
+
return `${(n / 1000).toFixed(1)}k`;
|
|
256
|
+
return n.toLocaleString();
|
|
257
|
+
};
|
|
258
|
+
// Token display like Claude Code
|
|
259
|
+
console.log(colors.bold(' Tokens'));
|
|
260
|
+
console.log(` Input: ${colors.cyan('↓ ' + formatTokens(stats.inputTokens).padStart(10))}`);
|
|
261
|
+
console.log(` Output: ${colors.green('↑ ' + formatTokens(stats.outputTokens).padStart(10))}`);
|
|
262
|
+
if (stats.cacheReads > 0) {
|
|
263
|
+
console.log(` Cache: ${colors.dim(' ' + formatTokens(stats.cacheReads).padStart(10))}`);
|
|
264
|
+
}
|
|
265
|
+
newline();
|
|
266
|
+
// Cost display
|
|
267
|
+
console.log(colors.bold(' Cost'));
|
|
268
|
+
console.log(` Session: ${colors.yellow('$' + stats.totalCost.toFixed(4))}`);
|
|
269
|
+
newline();
|
|
270
|
+
// Requests count
|
|
271
|
+
const requests = sessionTokenTracker.getRequests();
|
|
272
|
+
console.log(colors.dim(` ${requests.length} API calls this session`));
|
|
273
|
+
newline();
|
|
274
|
+
// Quick summary line (like Claude Code)
|
|
275
|
+
console.log(colors.dim(' ─────────────────────────────'));
|
|
276
|
+
console.log(colors.bold(' ') + sessionTokenTracker.getDisplayString());
|
|
277
|
+
newline();
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Show slash command help
|
|
281
|
+
*/
|
|
282
|
+
function showSlashCommandHelp() {
|
|
283
|
+
newline();
|
|
284
|
+
console.log(colors.bold('Slash Commands'));
|
|
285
|
+
console.log(colors.dim('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
286
|
+
newline();
|
|
287
|
+
const commands = [
|
|
288
|
+
['/fix <file> <instruction>', 'Apply AI-generated edit to a file'],
|
|
289
|
+
['/explain <file>', 'Get AI explanation of a file'],
|
|
290
|
+
['/review <file>', 'Review code quality and get suggestions'],
|
|
291
|
+
['/plan <instruction>', 'Create an implementation plan'],
|
|
292
|
+
['/cost', 'Show cost tracking status'],
|
|
293
|
+
['/trust', 'Show agent trust/reliability dashboard'],
|
|
294
|
+
['/undo', 'Undo last edit'],
|
|
295
|
+
['/status', 'Show project status'],
|
|
296
|
+
['/history', 'Show command history'],
|
|
297
|
+
['/clear', 'Clear the screen'],
|
|
298
|
+
['/help', 'Show this help message'],
|
|
299
|
+
];
|
|
300
|
+
commands.forEach(([cmd, desc]) => {
|
|
301
|
+
console.log(` ${colors.cyan(cmd.padEnd(30))} ${colors.dim(desc)}`);
|
|
302
|
+
});
|
|
303
|
+
newline();
|
|
304
|
+
console.log(colors.dim('Tip: You can also just type your question naturally!'));
|
|
305
|
+
console.log(colors.dim('Example: "how does authentication work?"'));
|
|
306
|
+
newline();
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Handle smart query (intelligent routing)
|
|
310
|
+
*/
|
|
311
|
+
async function handleSmartQuery(query, state, rl) {
|
|
312
|
+
if (!process.env.COHERE_API_KEY) {
|
|
313
|
+
console.error(error('COHERE_API_KEY not found. Please set it in .env file.'));
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
process.stdout.write(colors.dim(' Processing...\r'));
|
|
317
|
+
try {
|
|
318
|
+
// Use memory-aware router
|
|
319
|
+
const { container } = await import('./application/services/dependency-container.js');
|
|
320
|
+
const router = new IntelligentRouter(undefined, // Use default QueryIntentClassifier
|
|
321
|
+
container.aiService, container.memoryStreamService);
|
|
322
|
+
// Get conversation context for this session
|
|
323
|
+
const { conversationContextManager } = await import('./infrastructure/context/conversation-context.js');
|
|
324
|
+
const { sessionManager } = await import('./infrastructure/context/session-manager.js');
|
|
325
|
+
const sessionId = sessionManager.getSessionId(process.cwd());
|
|
326
|
+
const history = conversationContextManager.getHistory(sessionId, 5);
|
|
327
|
+
const result = await router.route({
|
|
328
|
+
query,
|
|
329
|
+
context: {
|
|
330
|
+
currentDirectory: process.cwd(),
|
|
331
|
+
conversationHistory: history.map(turn => ({
|
|
332
|
+
query: turn.query,
|
|
333
|
+
response: turn.response,
|
|
334
|
+
timestamp: typeof turn.timestamp === 'string' ? Date.parse(turn.timestamp) : turn.timestamp,
|
|
335
|
+
})),
|
|
336
|
+
sessionId,
|
|
337
|
+
},
|
|
338
|
+
});
|
|
339
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
340
|
+
if (result.success) {
|
|
341
|
+
newline();
|
|
342
|
+
if (result.message) {
|
|
343
|
+
const formatted = cleanResponse(result.message);
|
|
344
|
+
console.log(formatted);
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
else {
|
|
348
|
+
newline();
|
|
349
|
+
if (result.error) {
|
|
350
|
+
console.log(error(result.error));
|
|
351
|
+
}
|
|
352
|
+
else if (result.message) {
|
|
353
|
+
console.log(warning(result.message));
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
newline();
|
|
357
|
+
// Save to history
|
|
358
|
+
const response = result.message || result.error || 'Processed';
|
|
359
|
+
state.history.push({
|
|
360
|
+
command: query,
|
|
361
|
+
response,
|
|
362
|
+
timestamp: new Date().toISOString(),
|
|
363
|
+
});
|
|
364
|
+
// Update conversation context (reuse variables from above)
|
|
365
|
+
const entities = conversationContextManager.extractEntities(query);
|
|
366
|
+
conversationContextManager.addTurn(sessionId, query, response, entities, result.intent);
|
|
367
|
+
}
|
|
368
|
+
catch (err) {
|
|
369
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
370
|
+
throw err;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Handle ask command (legacy - kept for compatibility)
|
|
375
|
+
*/
|
|
376
|
+
async function handleAsk(question, state, rl) {
|
|
377
|
+
if (!process.env.COHERE_API_KEY) {
|
|
378
|
+
console.error(error('COHERE_API_KEY not found. Please set it in .env file.'));
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
// Show thinking indicator
|
|
382
|
+
process.stdout.write(colors.dim(' Thinking...\r'));
|
|
383
|
+
try {
|
|
384
|
+
// NEW: Use intelligent search
|
|
385
|
+
const searchResult = await searchIntelligent(question, {
|
|
386
|
+
baseDir: process.cwd(),
|
|
387
|
+
});
|
|
388
|
+
if (searchResult.chunks.length === 0) {
|
|
389
|
+
console.log(warning('No relevant code found. Run "codehere index" first.'));
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
// Clear thinking indicator
|
|
393
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
394
|
+
// Show context summary
|
|
395
|
+
const retrievedFiles = [...new Set(searchResult.chunks.map(r => r.filepath))];
|
|
396
|
+
console.log(colors.dim(` Found ${formatNumber(searchResult.chunks.length)} optimized chunks from ${formatNumber(retrievedFiles.length)} file(s)`));
|
|
397
|
+
console.log(colors.dim(` Token reduction: ${formatPercent(searchResult.reductionPercent)}`));
|
|
398
|
+
// Generate response
|
|
399
|
+
process.stdout.write(colors.dim(' Generating response...\r'));
|
|
400
|
+
const response = await chatWithContext(question, searchResult.chunks);
|
|
401
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
402
|
+
// Display response (formatted)
|
|
403
|
+
newline();
|
|
404
|
+
const formattedResponse = cleanResponse(response);
|
|
405
|
+
console.log(formattedResponse);
|
|
406
|
+
newline();
|
|
407
|
+
// Save to history
|
|
408
|
+
state.history.push({
|
|
409
|
+
command: question,
|
|
410
|
+
response,
|
|
411
|
+
timestamp: new Date().toISOString(),
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
catch (err) {
|
|
415
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
416
|
+
throw err;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Handle explain command
|
|
421
|
+
*/
|
|
422
|
+
async function handleExplain(file, rl) {
|
|
423
|
+
if (!process.env.COHERE_API_KEY) {
|
|
424
|
+
console.error(error('COHERE_API_KEY not found.'));
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
process.stdout.write(colors.dim(' Reading file...\r'));
|
|
428
|
+
try {
|
|
429
|
+
const { readFileSync, existsSync } = await import('fs');
|
|
430
|
+
const { join } = await import('path');
|
|
431
|
+
const fullPath = join(process.cwd(), file);
|
|
432
|
+
if (!existsSync(fullPath)) {
|
|
433
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
434
|
+
console.error(error(`File not found: ${file}`));
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
const content = readFileSync(fullPath, 'utf-8');
|
|
438
|
+
process.stdout.write(colors.dim(' Generating explanation...\r'));
|
|
439
|
+
const context = [{
|
|
440
|
+
filepath: file,
|
|
441
|
+
content: content,
|
|
442
|
+
score: 1.0,
|
|
443
|
+
}];
|
|
444
|
+
const question = `Explain this file: ${file}`;
|
|
445
|
+
const response = await chatWithContext(question, context);
|
|
446
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
447
|
+
newline();
|
|
448
|
+
console.log(colors.bold(`Explanation for ${file}:`));
|
|
449
|
+
const formattedResponse = cleanResponse(response);
|
|
450
|
+
console.log(formattedResponse);
|
|
451
|
+
newline();
|
|
452
|
+
}
|
|
453
|
+
catch (err) {
|
|
454
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
455
|
+
throw err;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Handle fix command
|
|
460
|
+
*/
|
|
461
|
+
async function handleFix(file, instruction, rl) {
|
|
462
|
+
if (!process.env.COHERE_API_KEY) {
|
|
463
|
+
console.error(error('COHERE_API_KEY not found.'));
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
if (!instruction) {
|
|
467
|
+
console.error(error('Please provide an instruction. Example: fix file.js "Add error handling"'));
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
process.stdout.write(colors.dim(' Generating edit...\r'));
|
|
471
|
+
try {
|
|
472
|
+
const result = await generateAndApplyEdit(file, instruction);
|
|
473
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
474
|
+
if (result.success) {
|
|
475
|
+
newline();
|
|
476
|
+
console.log(success('Edit applied successfully'));
|
|
477
|
+
if (result.diffStats) {
|
|
478
|
+
console.log(colors.dim(` ${result.diffStats.linesAdded} added, ${result.diffStats.linesRemoved} removed`));
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
else {
|
|
482
|
+
newline();
|
|
483
|
+
console.log(error('Edit failed'));
|
|
484
|
+
if (result.error) {
|
|
485
|
+
console.log(colors.red(` ${result.error}`));
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
newline();
|
|
489
|
+
}
|
|
490
|
+
catch (err) {
|
|
491
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
492
|
+
throw err;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Handle review command
|
|
497
|
+
*/
|
|
498
|
+
async function handleReview(file, rl) {
|
|
499
|
+
if (!process.env.COHERE_API_KEY) {
|
|
500
|
+
console.error(error('COHERE_API_KEY not found.'));
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
process.stdout.write(colors.dim(' Reviewing code...\r'));
|
|
504
|
+
try {
|
|
505
|
+
const review = await reviewFile(file);
|
|
506
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
507
|
+
newline();
|
|
508
|
+
console.log(colors.bold(`Review for ${file}:`));
|
|
509
|
+
console.log(`Score: ${review.score}/100`);
|
|
510
|
+
console.log(`Issues: ${review.issues.length}`);
|
|
511
|
+
if (review.issues.length > 0) {
|
|
512
|
+
newline();
|
|
513
|
+
review.issues.slice(0, 5).forEach(issue => {
|
|
514
|
+
const icon = issue.severity === 'error' ? '✗' : issue.severity === 'warning' ? '⚠' : '→';
|
|
515
|
+
console.log(` ${icon} ${issue.message}`);
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
newline();
|
|
519
|
+
}
|
|
520
|
+
catch (err) {
|
|
521
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
522
|
+
throw err;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Handle plan command
|
|
527
|
+
*/
|
|
528
|
+
async function handlePlan(instruction, rl) {
|
|
529
|
+
if (!process.env.COHERE_API_KEY) {
|
|
530
|
+
console.error(error('COHERE_API_KEY not found.'));
|
|
531
|
+
return;
|
|
532
|
+
}
|
|
533
|
+
process.stdout.write(colors.dim(' Planning...\r'));
|
|
534
|
+
try {
|
|
535
|
+
const plan = await planTask(instruction);
|
|
536
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
537
|
+
newline();
|
|
538
|
+
console.log(colors.bold('Execution Plan:'));
|
|
539
|
+
console.log(formatPlan(plan));
|
|
540
|
+
newline();
|
|
541
|
+
}
|
|
542
|
+
catch (err) {
|
|
543
|
+
process.stdout.write(' '.repeat(50) + '\r');
|
|
544
|
+
throw err;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Show help
|
|
549
|
+
*/
|
|
550
|
+
function showHelp() {
|
|
551
|
+
newline();
|
|
552
|
+
console.log(colors.bold('Slash Commands (recommended):'));
|
|
553
|
+
newline();
|
|
554
|
+
console.log(colors.cyan(' /fix <file> <instruction>') + ' Apply AI-generated edit');
|
|
555
|
+
console.log(colors.cyan(' /explain <file>') + ' Get AI explanation');
|
|
556
|
+
console.log(colors.cyan(' /review <file>') + ' Review code quality');
|
|
557
|
+
console.log(colors.cyan(' /plan <instruction>') + ' Create implementation plan');
|
|
558
|
+
console.log(colors.cyan(' /cost') + ' Show cost tracking');
|
|
559
|
+
console.log(colors.cyan(' /trust') + ' Show trust dashboard');
|
|
560
|
+
console.log(colors.cyan(' /undo') + ' Undo last edit');
|
|
561
|
+
console.log(colors.cyan(' /status') + ' Show project status');
|
|
562
|
+
console.log(colors.cyan(' /history') + ' Show command history');
|
|
563
|
+
console.log(colors.cyan(' /help') + ' Show all commands');
|
|
564
|
+
newline();
|
|
565
|
+
console.log(colors.bold('Quick Commands:'));
|
|
566
|
+
newline();
|
|
567
|
+
console.log(colors.cyan(' <question>') + ' Ask anything about your codebase');
|
|
568
|
+
console.log(colors.cyan(' clear') + ' Clear screen');
|
|
569
|
+
console.log(colors.cyan(' exit') + ' Exit session (or: quit, q)');
|
|
570
|
+
newline();
|
|
571
|
+
console.log(colors.dim('Examples:'));
|
|
572
|
+
console.log(colors.dim(' How does authentication work?'));
|
|
573
|
+
console.log(colors.dim(' /explain src/auth.ts'));
|
|
574
|
+
console.log(colors.dim(' /fix src/utils.js "Add error handling"'));
|
|
575
|
+
newline();
|
|
576
|
+
}
|
|
577
|
+
/**
|
|
578
|
+
* Show keyboard shortcuts (Task 7.5)
|
|
579
|
+
*/
|
|
580
|
+
function showKeyboardShortcuts() {
|
|
581
|
+
newline();
|
|
582
|
+
console.log(colors.bold('Keyboard Shortcuts:'));
|
|
583
|
+
newline();
|
|
584
|
+
console.log(colors.cyan(' ↑/↓') + ' Navigate command history');
|
|
585
|
+
console.log(colors.cyan(' Tab') + ' Autocomplete (when available)');
|
|
586
|
+
console.log(colors.cyan(' Ctrl+C') + ' Cancel current operation');
|
|
587
|
+
console.log(colors.cyan(' Ctrl+D') + ' Exit session');
|
|
588
|
+
console.log(colors.cyan(' Ctrl+L') + ' Clear screen');
|
|
589
|
+
console.log(colors.cyan(' Esc') + ' Cancel current input');
|
|
590
|
+
console.log(colors.cyan(' Enter') + ' Execute command');
|
|
591
|
+
newline();
|
|
592
|
+
}
|
|
593
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive Session System
|
|
3
|
+
* Seamless REPL-like interface for natural interaction
|
|
4
|
+
*/
|
|
5
|
+
export interface SessionState {
|
|
6
|
+
history: Array<{
|
|
7
|
+
command: string;
|
|
8
|
+
response: string;
|
|
9
|
+
timestamp: string;
|
|
10
|
+
}>;
|
|
11
|
+
context: any;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Start interactive session
|
|
15
|
+
*/
|
|
16
|
+
export declare function startSession(): Promise<void>;
|
|
17
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgCH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzE,OAAO,EAAE,GAAG,CAAC;CACd;AAED;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAyElD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../src/session.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgCH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzE,OAAO,EAAE,GAAG,CAAC;CACd;AAED;;GAEG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAyElD"}
|