codehere 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of codehere might be problematic. Click here for more details.
- package/README.md +51 -25
- package/dist/agents/base.d.ts +107 -0
- package/dist/agents/base.d.ts.map +1 -0
- package/dist/agents/base.js +101 -0
- package/dist/agents/base.js.map +1 -0
- package/dist/agents/orchestrator-model-driven.d.ts +41 -0
- package/dist/agents/orchestrator-model-driven.d.ts.map +1 -0
- package/dist/agents/orchestrator-model-driven.js +141 -0
- package/dist/agents/orchestrator-model-driven.js.map +1 -0
- package/dist/agents/react-orchestrator-agent.d.ts +15 -0
- package/dist/agents/react-orchestrator-agent.d.ts.map +1 -0
- package/dist/agents/react-orchestrator-agent.js +54 -0
- package/dist/agents/react-orchestrator-agent.js.map +1 -0
- package/dist/application/agents/execution-agent.d.ts +68 -0
- package/dist/application/agents/execution-agent.d.ts.map +1 -0
- package/dist/application/agents/execution-agent.js +299 -0
- package/dist/application/agents/execution-agent.js.map +1 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts +65 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -0
- package/dist/application/agents/multi-agent-orchestrator.js +209 -0
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -0
- package/dist/application/agents/planning-agent.d.ts +61 -0
- package/dist/application/agents/planning-agent.d.ts.map +1 -0
- package/dist/application/agents/planning-agent.js +357 -0
- package/dist/application/agents/planning-agent.js.map +1 -0
- package/dist/application/agents/validation-agent.d.ts +64 -0
- package/dist/application/agents/validation-agent.d.ts.map +1 -0
- package/dist/application/agents/validation-agent.js +182 -0
- package/dist/application/agents/validation-agent.js.map +1 -0
- package/dist/application/architectures/plan-and-act.d.ts +94 -0
- package/dist/application/architectures/plan-and-act.d.ts.map +1 -0
- package/dist/application/architectures/plan-and-act.js +242 -0
- package/dist/application/architectures/plan-and-act.js.map +1 -0
- package/dist/application/index.d.ts +12 -0
- package/dist/application/index.d.ts.map +1 -0
- package/dist/application/index.js +12 -0
- package/dist/application/index.js.map +1 -0
- package/dist/application/services/agent-factory.d.ts +9 -0
- package/dist/application/services/agent-factory.d.ts.map +1 -0
- package/dist/application/services/agent-factory.js +28 -0
- package/dist/application/services/agent-factory.js.map +1 -0
- package/dist/application/services/dependency-container.d.ts +143 -0
- package/dist/application/services/dependency-container.d.ts.map +1 -0
- package/dist/application/services/dependency-container.js +426 -0
- package/dist/application/services/dependency-container.js.map +1 -0
- package/dist/application/services/git-context-service.d.ts +30 -0
- package/dist/application/services/git-context-service.d.ts.map +1 -0
- package/dist/application/services/git-context-service.js +83 -0
- package/dist/application/services/git-context-service.js.map +1 -0
- package/dist/application/services/intelligent-router.d.ts +74 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -0
- package/dist/application/services/intelligent-router.js +711 -0
- package/dist/application/services/intelligent-router.js.map +1 -0
- package/dist/application/services/tool-executor-service.d.ts +14 -0
- package/dist/application/services/tool-executor-service.d.ts.map +1 -0
- package/dist/application/services/tool-executor-service.js +94 -0
- package/dist/application/services/tool-executor-service.js.map +1 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts +48 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/ask-question-use-case.js +270 -0
- package/dist/application/use-cases/ask-question-use-case.js.map +1 -0
- package/dist/application/use-cases/edit-file-use-case.d.ts +76 -0
- package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/edit-file-use-case.js +752 -0
- package/dist/application/use-cases/edit-file-use-case.js.map +1 -0
- package/dist/application/use-cases/explain-file-use-case.d.ts +21 -0
- package/dist/application/use-cases/explain-file-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/explain-file-use-case.js +50 -0
- package/dist/application/use-cases/explain-file-use-case.js.map +1 -0
- package/dist/application/use-cases/index-codebase-use-case.d.ts +46 -0
- package/dist/application/use-cases/index-codebase-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/index-codebase-use-case.js +113 -0
- package/dist/application/use-cases/index-codebase-use-case.js.map +1 -0
- package/dist/application/use-cases/planning-use-case.d.ts +46 -0
- package/dist/application/use-cases/planning-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/planning-use-case.js +276 -0
- package/dist/application/use-cases/planning-use-case.js.map +1 -0
- package/dist/application/use-cases/react-orchestration-use-case.d.ts +51 -0
- package/dist/application/use-cases/react-orchestration-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/react-orchestration-use-case.js +329 -0
- package/dist/application/use-cases/react-orchestration-use-case.js.map +1 -0
- package/dist/application/use-cases/reflexion-use-case.d.ts +24 -0
- package/dist/application/use-cases/reflexion-use-case.d.ts.map +1 -0
- package/dist/application/use-cases/reflexion-use-case.js +30 -0
- package/dist/application/use-cases/reflexion-use-case.js.map +1 -0
- package/dist/application/workflows/deterministic-workflows.d.ts +61 -0
- package/dist/application/workflows/deterministic-workflows.d.ts.map +1 -0
- package/dist/application/workflows/deterministic-workflows.js +189 -0
- package/dist/application/workflows/deterministic-workflows.js.map +1 -0
- package/dist/cache.d.ts.map +1 -1
- package/dist/cache.js +1 -3
- package/dist/cache.js.map +1 -1
- package/dist/chat.js +10 -10
- package/dist/chat.js.map +1 -1
- package/dist/docs.d.ts.map +1 -1
- package/dist/docs.js +1 -2
- package/dist/docs.js.map +1 -1
- package/dist/domain/entities/code-chunk.d.ts +26 -0
- package/dist/domain/entities/code-chunk.d.ts.map +1 -0
- package/dist/domain/entities/code-chunk.js +6 -0
- package/dist/domain/entities/code-chunk.js.map +1 -0
- package/dist/domain/entities/decision.d.ts +37 -0
- package/dist/domain/entities/decision.d.ts.map +1 -0
- package/dist/domain/entities/decision.js +9 -0
- package/dist/domain/entities/decision.js.map +1 -0
- package/dist/domain/entities/edit.d.ts +35 -0
- package/dist/domain/entities/edit.d.ts.map +1 -0
- package/dist/domain/entities/edit.js +6 -0
- package/dist/domain/entities/edit.js.map +1 -0
- package/dist/domain/entities/knowledge-node.d.ts +83 -0
- package/dist/domain/entities/knowledge-node.d.ts.map +1 -0
- package/dist/domain/entities/knowledge-node.js +9 -0
- package/dist/domain/entities/knowledge-node.js.map +1 -0
- package/dist/domain/entities/knowledge-preservation.d.ts +42 -0
- package/dist/domain/entities/knowledge-preservation.d.ts.map +1 -0
- package/dist/domain/entities/knowledge-preservation.js +10 -0
- package/dist/domain/entities/knowledge-preservation.js.map +1 -0
- package/dist/domain/entities/memory.d.ts +36 -0
- package/dist/domain/entities/memory.d.ts.map +1 -0
- package/dist/domain/entities/memory.js +6 -0
- package/dist/domain/entities/memory.js.map +1 -0
- package/dist/domain/entities/pattern.d.ts +49 -0
- package/dist/domain/entities/pattern.d.ts.map +1 -0
- package/dist/domain/entities/pattern.js +7 -0
- package/dist/domain/entities/pattern.js.map +1 -0
- package/dist/domain/entities/plan.d.ts +42 -0
- package/dist/domain/entities/plan.d.ts.map +1 -0
- package/dist/domain/entities/plan.js +6 -0
- package/dist/domain/entities/plan.js.map +1 -0
- package/dist/domain/entities/query.d.ts +17 -0
- package/dist/domain/entities/query.d.ts.map +1 -0
- package/dist/domain/entities/query.js +6 -0
- package/dist/domain/entities/query.js.map +1 -0
- package/dist/domain/index.d.ts +16 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/index.js +19 -0
- package/dist/domain/index.js.map +1 -0
- package/dist/domain/interfaces/ai-service.interface.d.ts +62 -0
- package/dist/domain/interfaces/ai-service.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/ai-service.interface.js +6 -0
- package/dist/domain/interfaces/ai-service.interface.js.map +1 -0
- package/dist/domain/interfaces/code-analyzer.interface.d.ts +38 -0
- package/dist/domain/interfaces/code-analyzer.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/code-analyzer.interface.js +6 -0
- package/dist/domain/interfaces/code-analyzer.interface.js.map +1 -0
- package/dist/domain/interfaces/decision-repository.interface.d.ts +51 -0
- package/dist/domain/interfaces/decision-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/decision-repository.interface.js +9 -0
- package/dist/domain/interfaces/decision-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +28 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.js +6 -0
- package/dist/domain/interfaces/embedding-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts +91 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.js +9 -0
- package/dist/domain/interfaces/knowledge-graph-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts +50 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.js +8 -0
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/memory-repository.interface.d.ts +49 -0
- package/dist/domain/interfaces/memory-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/memory-repository.interface.js +6 -0
- package/dist/domain/interfaces/memory-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/pattern-repository.interface.d.ts +48 -0
- package/dist/domain/interfaces/pattern-repository.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/pattern-repository.interface.js +6 -0
- package/dist/domain/interfaces/pattern-repository.interface.js.map +1 -0
- package/dist/domain/interfaces/verification-service.interface.d.ts +20 -0
- package/dist/domain/interfaces/verification-service.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/verification-service.interface.js +6 -0
- package/dist/domain/interfaces/verification-service.interface.js.map +1 -0
- package/dist/domain/services/codebase-detector.d.ts +18 -0
- package/dist/domain/services/codebase-detector.d.ts.map +1 -0
- package/dist/domain/services/codebase-detector.js +91 -0
- package/dist/domain/services/codebase-detector.js.map +1 -0
- package/dist/domain/services/cross-team-pattern-sharing.d.ts +65 -0
- package/dist/domain/services/cross-team-pattern-sharing.d.ts.map +1 -0
- package/dist/domain/services/cross-team-pattern-sharing.js +125 -0
- package/dist/domain/services/cross-team-pattern-sharing.js.map +1 -0
- package/dist/domain/services/decision-recorder.d.ts +76 -0
- package/dist/domain/services/decision-recorder.d.ts.map +1 -0
- package/dist/domain/services/decision-recorder.js +223 -0
- package/dist/domain/services/decision-recorder.js.map +1 -0
- package/dist/domain/services/decision-retriever.d.ts +75 -0
- package/dist/domain/services/decision-retriever.d.ts.map +1 -0
- package/dist/domain/services/decision-retriever.js +133 -0
- package/dist/domain/services/decision-retriever.js.map +1 -0
- package/dist/domain/services/graded-memory-activation.d.ts +37 -0
- package/dist/domain/services/graded-memory-activation.d.ts.map +1 -0
- package/dist/domain/services/graded-memory-activation.js +69 -0
- package/dist/domain/services/graded-memory-activation.js.map +1 -0
- package/dist/domain/services/knowledge-access.d.ts +63 -0
- package/dist/domain/services/knowledge-access.d.ts.map +1 -0
- package/dist/domain/services/knowledge-access.js +132 -0
- package/dist/domain/services/knowledge-access.js.map +1 -0
- package/dist/domain/services/knowledge-extractor.d.ts +54 -0
- package/dist/domain/services/knowledge-extractor.d.ts.map +1 -0
- package/dist/domain/services/knowledge-extractor.js +247 -0
- package/dist/domain/services/knowledge-extractor.js.map +1 -0
- package/dist/domain/services/knowledge-graph-builder.d.ts +70 -0
- package/dist/domain/services/knowledge-graph-builder.d.ts.map +1 -0
- package/dist/domain/services/knowledge-graph-builder.js +268 -0
- package/dist/domain/services/knowledge-graph-builder.js.map +1 -0
- package/dist/domain/services/knowledge-graph-query.d.ts +69 -0
- package/dist/domain/services/knowledge-graph-query.d.ts.map +1 -0
- package/dist/domain/services/knowledge-graph-query.js +187 -0
- package/dist/domain/services/knowledge-graph-query.js.map +1 -0
- package/dist/domain/services/memory-retriever.d.ts +30 -0
- package/dist/domain/services/memory-retriever.d.ts.map +1 -0
- package/dist/domain/services/memory-retriever.js +82 -0
- package/dist/domain/services/memory-retriever.js.map +1 -0
- package/dist/domain/services/memory-synthesizer.d.ts +57 -0
- package/dist/domain/services/memory-synthesizer.d.ts.map +1 -0
- package/dist/domain/services/memory-synthesizer.js +91 -0
- package/dist/domain/services/memory-synthesizer.js.map +1 -0
- package/dist/domain/services/pattern-extractor.d.ts +108 -0
- package/dist/domain/services/pattern-extractor.d.ts.map +1 -0
- package/dist/domain/services/pattern-extractor.js +442 -0
- package/dist/domain/services/pattern-extractor.js.map +1 -0
- package/dist/domain/services/query-intent-classifier.d.ts +16 -0
- package/dist/domain/services/query-intent-classifier.d.ts.map +1 -0
- package/dist/domain/services/query-intent-classifier.js +140 -0
- package/dist/domain/services/query-intent-classifier.js.map +1 -0
- package/dist/domain/services/react-loop.d.ts +52 -0
- package/dist/domain/services/react-loop.d.ts.map +1 -0
- package/dist/domain/services/react-loop.js +186 -0
- package/dist/domain/services/react-loop.js.map +1 -0
- package/dist/edit.d.ts +0 -12
- package/dist/edit.d.ts.map +1 -1
- package/dist/edit.js +76 -351
- package/dist/edit.js.map +1 -1
- package/dist/embed.d.ts +0 -4
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.js +100 -174
- package/dist/embed.js.map +1 -1
- package/dist/error-handler.d.ts +1 -0
- package/dist/error-handler.d.ts.map +1 -1
- package/dist/error-handler.js +46 -3
- package/dist/error-handler.js.map +1 -1
- package/dist/formatter.d.ts +2 -2
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +30 -17
- package/dist/formatter.js.map +1 -1
- package/dist/index.js +355 -239
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts +56 -0
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/cohere-ai-service.js +594 -0
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -0
- package/dist/infrastructure/ai/command-r-evaluation.d.ts +42 -0
- package/dist/infrastructure/ai/command-r-evaluation.d.ts.map +1 -0
- package/dist/infrastructure/ai/command-r-evaluation.js +206 -0
- package/dist/infrastructure/ai/command-r-evaluation.js.map +1 -0
- package/dist/infrastructure/ai/model-config.d.ts +47 -0
- package/dist/infrastructure/ai/model-config.d.ts.map +1 -0
- package/dist/infrastructure/ai/model-config.js +84 -0
- package/dist/infrastructure/ai/model-config.js.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts +46 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.js +104 -0
- package/dist/infrastructure/cache/embedding-cache.js.map +1 -0
- package/dist/infrastructure/cache/query-result-cache.d.ts +68 -0
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/query-result-cache.js +138 -0
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts +57 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.js +124 -0
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -0
- package/dist/infrastructure/chunking/ast-code-chunker.d.ts +12 -0
- package/dist/infrastructure/chunking/ast-code-chunker.d.ts.map +1 -0
- package/dist/infrastructure/chunking/ast-code-chunker.js +19 -0
- package/dist/infrastructure/chunking/ast-code-chunker.js.map +1 -0
- package/dist/infrastructure/chunking/code-aware-chunker.d.ts +63 -0
- package/dist/infrastructure/chunking/code-aware-chunker.d.ts.map +1 -0
- package/dist/infrastructure/chunking/code-aware-chunker.js +397 -0
- package/dist/infrastructure/chunking/code-aware-chunker.js.map +1 -0
- package/dist/infrastructure/completion/bash-completion.d.ts +8 -0
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/bash-completion.js +101 -0
- package/dist/infrastructure/completion/bash-completion.js.map +1 -0
- package/dist/infrastructure/completion/completion-generator.d.ts +42 -0
- package/dist/infrastructure/completion/completion-generator.d.ts.map +1 -0
- package/dist/infrastructure/completion/completion-generator.js +184 -0
- package/dist/infrastructure/completion/completion-generator.js.map +1 -0
- package/dist/infrastructure/completion/fish-completion.d.ts +8 -0
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/fish-completion.js +65 -0
- package/dist/infrastructure/completion/fish-completion.js.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts +8 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.js +85 -0
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -0
- package/dist/infrastructure/config/config-manager.d.ts +79 -0
- package/dist/infrastructure/config/config-manager.d.ts.map +1 -0
- package/dist/infrastructure/config/config-manager.js +162 -0
- package/dist/infrastructure/config/config-manager.js.map +1 -0
- package/dist/infrastructure/context/context-compressor.d.ts +94 -0
- package/dist/infrastructure/context/context-compressor.d.ts.map +1 -0
- package/dist/infrastructure/context/context-compressor.js +329 -0
- package/dist/infrastructure/context/context-compressor.js.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts +90 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.js +353 -0
- package/dist/infrastructure/cost/cost-tracker.js.map +1 -0
- package/dist/infrastructure/file-scanner/file-scanner.d.ts +31 -0
- package/dist/infrastructure/file-scanner/file-scanner.d.ts.map +1 -0
- package/dist/infrastructure/file-scanner/file-scanner.js +106 -0
- package/dist/infrastructure/file-scanner/file-scanner.js.map +1 -0
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts +107 -0
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -0
- package/dist/infrastructure/governance/nist-ai-rmf.js +294 -0
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -0
- package/dist/infrastructure/governance/policy-as-code.d.ts +90 -0
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -0
- package/dist/infrastructure/governance/policy-as-code.js +259 -0
- package/dist/infrastructure/governance/policy-as-code.js.map +1 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +138 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.js +241 -0
- package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -0
- package/dist/infrastructure/index.d.ts +7 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/infrastructure/index.js +7 -0
- package/dist/infrastructure/index.js.map +1 -0
- package/dist/infrastructure/observability/execution-tracer.d.ts +108 -0
- package/dist/infrastructure/observability/execution-tracer.d.ts.map +1 -0
- package/dist/infrastructure/observability/execution-tracer.js +227 -0
- package/dist/infrastructure/observability/execution-tracer.js.map +1 -0
- package/dist/infrastructure/observability/prompt-versioner.d.ts +67 -0
- package/dist/infrastructure/observability/prompt-versioner.d.ts.map +1 -0
- package/dist/infrastructure/observability/prompt-versioner.js +145 -0
- package/dist/infrastructure/observability/prompt-versioner.js.map +1 -0
- package/dist/infrastructure/protocols/a2a-metadata.d.ts +278 -0
- package/dist/infrastructure/protocols/a2a-metadata.d.ts.map +1 -0
- package/dist/infrastructure/protocols/a2a-metadata.js +137 -0
- package/dist/infrastructure/protocols/a2a-metadata.js.map +1 -0
- package/dist/infrastructure/protocols/a2a-protocol.d.ts +132 -0
- package/dist/infrastructure/protocols/a2a-protocol.d.ts.map +1 -0
- package/dist/infrastructure/protocols/a2a-protocol.js +314 -0
- package/dist/infrastructure/protocols/a2a-protocol.js.map +1 -0
- package/dist/infrastructure/protocols/mcp-oauth.d.ts +91 -0
- package/dist/infrastructure/protocols/mcp-oauth.d.ts.map +1 -0
- package/dist/infrastructure/protocols/mcp-oauth.js +184 -0
- package/dist/infrastructure/protocols/mcp-oauth.js.map +1 -0
- package/dist/infrastructure/protocols/mcp-server.d.ts +126 -0
- package/dist/infrastructure/protocols/mcp-server.d.ts.map +1 -0
- package/dist/infrastructure/protocols/mcp-server.js +333 -0
- package/dist/infrastructure/protocols/mcp-server.js.map +1 -0
- package/dist/infrastructure/protocols/streaming-handler.d.ts +57 -0
- package/dist/infrastructure/protocols/streaming-handler.d.ts.map +1 -0
- package/dist/infrastructure/protocols/streaming-handler.js +103 -0
- package/dist/infrastructure/protocols/streaming-handler.js.map +1 -0
- package/dist/infrastructure/security/ai-sast-scanner.d.ts +59 -0
- package/dist/infrastructure/security/ai-sast-scanner.d.ts.map +1 -0
- package/dist/infrastructure/security/ai-sast-scanner.js +241 -0
- package/dist/infrastructure/security/ai-sast-scanner.js.map +1 -0
- package/dist/infrastructure/security/docker-sandbox.d.ts +57 -0
- package/dist/infrastructure/security/docker-sandbox.d.ts.map +1 -0
- package/dist/infrastructure/security/docker-sandbox.js +178 -0
- package/dist/infrastructure/security/docker-sandbox.js.map +1 -0
- package/dist/infrastructure/security/enhanced-security-gate.d.ts +53 -0
- package/dist/infrastructure/security/enhanced-security-gate.d.ts.map +1 -0
- package/dist/infrastructure/security/enhanced-security-gate.js +151 -0
- package/dist/infrastructure/security/enhanced-security-gate.js.map +1 -0
- package/dist/infrastructure/security/input-validator.d.ts +33 -0
- package/dist/infrastructure/security/input-validator.d.ts.map +1 -0
- package/dist/infrastructure/security/input-validator.js +152 -0
- package/dist/infrastructure/security/input-validator.js.map +1 -0
- package/dist/infrastructure/security/license-scanner.d.ts +55 -0
- package/dist/infrastructure/security/license-scanner.d.ts.map +1 -0
- package/dist/infrastructure/security/license-scanner.js +167 -0
- package/dist/infrastructure/security/license-scanner.js.map +1 -0
- package/dist/infrastructure/security/provider-bias-detector.d.ts +53 -0
- package/dist/infrastructure/security/provider-bias-detector.d.ts.map +1 -0
- package/dist/infrastructure/security/provider-bias-detector.js +164 -0
- package/dist/infrastructure/security/provider-bias-detector.js.map +1 -0
- package/dist/infrastructure/security/sandbox-executor.d.ts +34 -0
- package/dist/infrastructure/security/sandbox-executor.d.ts.map +1 -0
- package/dist/infrastructure/security/sandbox-executor.js +64 -0
- package/dist/infrastructure/security/sandbox-executor.js.map +1 -0
- package/dist/infrastructure/storage/memory-stream-service.d.ts +47 -0
- package/dist/infrastructure/storage/memory-stream-service.d.ts.map +1 -0
- package/dist/infrastructure/storage/memory-stream-service.js +204 -0
- package/dist/infrastructure/storage/memory-stream-service.js.map +1 -0
- package/dist/infrastructure/storage/plan-repository.d.ts +38 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/plan-repository.js +133 -0
- package/dist/infrastructure/storage/plan-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.d.ts +29 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.js +232 -0
- package/dist/infrastructure/storage/sqlite-decision-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +35 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +277 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts +41 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js +417 -0
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts +29 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js +230 -0
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.d.ts +40 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.js +229 -0
- package/dist/infrastructure/storage/sqlite-memory-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts +25 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.js +249 -0
- package/dist/infrastructure/storage/sqlite-pattern-repository.js.map +1 -0
- package/dist/infrastructure/ux/appropriate-friction.d.ts +77 -0
- package/dist/infrastructure/ux/appropriate-friction.d.ts.map +1 -0
- package/dist/infrastructure/ux/appropriate-friction.js +213 -0
- package/dist/infrastructure/ux/appropriate-friction.js.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts +109 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.js +200 -0
- package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +24 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.js +144 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -0
- package/dist/infrastructure/ux/expectation-management.d.ts +98 -0
- package/dist/infrastructure/ux/expectation-management.d.ts.map +1 -0
- package/dist/infrastructure/ux/expectation-management.js +327 -0
- package/dist/infrastructure/ux/expectation-management.js.map +1 -0
- package/dist/infrastructure/ux/feature-discovery.d.ts +47 -0
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/feature-discovery.js +190 -0
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts +47 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.js +225 -0
- package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts +104 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -0
- package/dist/infrastructure/ux/hitl-validation.js +211 -0
- package/dist/infrastructure/ux/hitl-validation.js.map +1 -0
- package/dist/infrastructure/ux/progress-indicator.d.ts +54 -0
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -0
- package/dist/infrastructure/ux/progress-indicator.js +121 -0
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -0
- package/dist/infrastructure/ux/progressive-disclosure.d.ts +84 -0
- package/dist/infrastructure/ux/progressive-disclosure.d.ts.map +1 -0
- package/dist/infrastructure/ux/progressive-disclosure.js +236 -0
- package/dist/infrastructure/ux/progressive-disclosure.js.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts +35 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.js +119 -0
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +47 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.js +144 -0
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +21 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.js +172 -0
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -0
- package/dist/infrastructure/ux/team-standards.d.ts +94 -0
- package/dist/infrastructure/ux/team-standards.d.ts.map +1 -0
- package/dist/infrastructure/ux/team-standards.js +196 -0
- package/dist/infrastructure/ux/team-standards.js.map +1 -0
- package/dist/infrastructure/verification/verification-service.d.ts +12 -0
- package/dist/infrastructure/verification/verification-service.d.ts.map +1 -0
- package/dist/infrastructure/verification/verification-service.js +47 -0
- package/dist/infrastructure/verification/verification-service.js.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts +73 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.js +174 -0
- package/dist/infrastructure/xai/attention-visualizer.js.map +1 -0
- package/dist/infrastructure/xai/cot-visualizer.d.ts +106 -0
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -0
- package/dist/infrastructure/xai/cot-visualizer.js +286 -0
- package/dist/infrastructure/xai/cot-visualizer.js.map +1 -0
- package/dist/infrastructure/xai/decision-tree-log.d.ts +104 -0
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -0
- package/dist/infrastructure/xai/decision-tree-log.js +216 -0
- package/dist/infrastructure/xai/decision-tree-log.js.map +1 -0
- package/dist/infrastructure/xai/interactive-xai.d.ts +106 -0
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -0
- package/dist/infrastructure/xai/interactive-xai.js +262 -0
- package/dist/infrastructure/xai/interactive-xai.js.map +1 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +80 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.js +201 -0
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -0
- package/dist/intelligent-retrieval.d.ts.map +1 -1
- package/dist/intelligent-retrieval.js +8 -1
- package/dist/intelligent-retrieval.js.map +1 -1
- package/dist/intent/classifier.d.ts +6 -0
- package/dist/intent/classifier.d.ts.map +1 -0
- package/dist/intent/classifier.js +2 -0
- package/dist/intent/classifier.js.map +1 -0
- package/dist/intent/context.d.ts +4 -0
- package/dist/intent/context.d.ts.map +1 -0
- package/dist/intent/context.js +2 -0
- package/dist/intent/context.js.map +1 -0
- package/dist/iterative-refinement.d.ts.map +1 -1
- package/dist/iterative-refinement.js +20 -3
- package/dist/iterative-refinement.js.map +1 -1
- package/dist/learning.d.ts.map +1 -1
- package/dist/learning.js +1 -2
- package/dist/learning.js.map +1 -1
- package/dist/monitoring.d.ts.map +1 -1
- package/dist/monitoring.js +1 -2
- package/dist/monitoring.js.map +1 -1
- package/dist/parallel-processor.d.ts +3 -2
- package/dist/parallel-processor.d.ts.map +1 -1
- package/dist/parallel-processor.js +183 -56
- package/dist/parallel-processor.js.map +1 -1
- package/dist/presentation/cli/commands/ask-command.d.ts +8 -0
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/ask-command.js +190 -0
- package/dist/presentation/cli/commands/ask-command.js.map +1 -0
- package/dist/presentation/cli/commands/config-command.d.ts +9 -0
- package/dist/presentation/cli/commands/config-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/config-command.js +123 -0
- package/dist/presentation/cli/commands/config-command.js.map +1 -0
- package/dist/presentation/cli/commands/cost-command.d.ts +8 -0
- package/dist/presentation/cli/commands/cost-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/cost-command.js +191 -0
- package/dist/presentation/cli/commands/cost-command.js.map +1 -0
- package/dist/presentation/cli/commands/decision-command.d.ts +12 -0
- package/dist/presentation/cli/commands/decision-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/decision-command.js +207 -0
- package/dist/presentation/cli/commands/decision-command.js.map +1 -0
- package/dist/presentation/cli/commands/help-command.d.ts +9 -0
- package/dist/presentation/cli/commands/help-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/help-command.js +281 -0
- package/dist/presentation/cli/commands/help-command.js.map +1 -0
- package/dist/presentation/cli/commands/knowledge-command.d.ts +13 -0
- package/dist/presentation/cli/commands/knowledge-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/knowledge-command.js +129 -0
- package/dist/presentation/cli/commands/knowledge-command.js.map +1 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.d.ts +8 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.js +183 -0
- package/dist/presentation/cli/commands/learning-dashboard-command.js.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts +9 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.js +146 -0
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -0
- package/dist/presentation/cli/commands/plan-command.d.ts +8 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/plan-command.js +166 -0
- package/dist/presentation/cli/commands/plan-command.js.map +1 -0
- package/dist/presentation/cli/commands/react-command.d.ts +8 -0
- package/dist/presentation/cli/commands/react-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/react-command.js +179 -0
- package/dist/presentation/cli/commands/react-command.js.map +1 -0
- package/dist/presentation/cli/commands/setup-command.d.ts +10 -0
- package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/setup-command.js +286 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -0
- package/dist/presentation/cli/commands/smart-command.d.ts +6 -0
- package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/smart-command.js +330 -0
- package/dist/presentation/cli/commands/smart-command.js.map +1 -0
- package/dist/presentation/cli/commands/trace-command.d.ts +8 -0
- package/dist/presentation/cli/commands/trace-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/trace-command.js +129 -0
- package/dist/presentation/cli/commands/trace-command.js.map +1 -0
- package/dist/presentation/cli/commands/undo-command.d.ts +8 -0
- package/dist/presentation/cli/commands/undo-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/undo-command.js +150 -0
- package/dist/presentation/cli/commands/undo-command.js.map +1 -0
- package/dist/presentation/cli/error-display.d.ts +25 -0
- package/dist/presentation/cli/error-display.d.ts.map +1 -0
- package/dist/presentation/cli/error-display.js +297 -0
- package/dist/presentation/cli/error-display.js.map +1 -0
- package/dist/presentation/cli/keyboard-shortcuts.d.ts +27 -0
- package/dist/presentation/cli/keyboard-shortcuts.d.ts.map +1 -0
- package/dist/presentation/cli/keyboard-shortcuts.js +77 -0
- package/dist/presentation/cli/keyboard-shortcuts.js.map +1 -0
- package/dist/refactor.d.ts.map +1 -1
- package/dist/refactor.js +2 -4
- package/dist/refactor.js.map +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +2 -63
- package/dist/search.js.map +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +72 -3
- package/dist/session.js.map +1 -1
- package/dist/testgen.d.ts.map +1 -1
- package/dist/testgen.js +1 -2
- package/dist/testgen.js.map +1 -1
- package/dist/tools/bash.d.ts +53 -0
- package/dist/tools/bash.d.ts.map +1 -0
- package/dist/tools/bash.js +213 -0
- package/dist/tools/bash.js.map +1 -0
- package/dist/tools/edit.d.ts +48 -0
- package/dist/tools/edit.d.ts.map +1 -0
- package/dist/tools/edit.js +235 -0
- package/dist/tools/edit.js.map +1 -0
- package/dist/tools/executor.d.ts +29 -0
- package/dist/tools/executor.d.ts.map +1 -0
- package/dist/tools/executor.js +153 -0
- package/dist/tools/executor.js.map +1 -0
- package/dist/tools/git-tool.d.ts +87 -0
- package/dist/tools/git-tool.d.ts.map +1 -0
- package/dist/tools/git-tool.js +292 -0
- package/dist/tools/git-tool.js.map +1 -0
- package/dist/tools/parser.d.ts +33 -0
- package/dist/tools/parser.d.ts.map +1 -0
- package/dist/tools/parser.js +158 -0
- package/dist/tools/parser.js.map +1 -0
- package/dist/tools/registry.d.ts +74 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +302 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/search.d.ts +41 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +100 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +4 -2
- package/dist/ui.js.map +1 -1
- package/dist/utils/check-api-status.d.ts +12 -0
- package/dist/utils/check-api-status.d.ts.map +1 -0
- package/dist/utils/check-api-status.js +82 -0
- package/dist/utils/check-api-status.js.map +1 -0
- package/dist/utils/diff-parser.d.ts +22 -0
- package/dist/utils/diff-parser.d.ts.map +1 -0
- package/dist/utils/diff-parser.js +160 -0
- package/dist/utils/diff-parser.js.map +1 -0
- package/dist/utils/logger.d.ts +34 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +56 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/version.d.ts +21 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +52 -0
- package/dist/utils/version.js.map +1 -0
- package/dist/verification/backup.d.ts +30 -0
- package/dist/verification/backup.d.ts.map +1 -0
- package/dist/verification/backup.js +259 -0
- package/dist/verification/backup.js.map +1 -0
- package/dist/verification/compiler.d.ts +20 -0
- package/dist/verification/compiler.d.ts.map +1 -0
- package/dist/verification/compiler.js +263 -0
- package/dist/verification/compiler.js.map +1 -0
- package/dist/verification/index.d.ts +59 -0
- package/dist/verification/index.d.ts.map +1 -0
- package/dist/verification/index.js +273 -0
- package/dist/verification/index.js.map +1 -0
- package/dist/verification/test-runner.d.ts +27 -0
- package/dist/verification/test-runner.d.ts.map +1 -0
- package/dist/verification/test-runner.js +379 -0
- package/dist/verification/test-runner.js.map +1 -0
- package/package.json +39 -14
- package/ARCHITECTURE.md +0 -240
- package/CHANGELOG.md +0 -44
- package/CONTRIBUTING.md +0 -171
- package/dist/benchmark.d.ts +0 -39
- package/dist/benchmark.d.ts.map +0 -1
- package/dist/benchmark.js +0 -195
- package/dist/benchmark.js.map +0 -1
- package/dist/scaffold.d.ts +0 -14
- package/dist/scaffold.d.ts.map +0 -1
- package/dist/scaffold.js +0 -85
- package/dist/scaffold.js.map +0 -1
- package/templates/next-page/app/layout.tsx +0 -19
- package/templates/next-page/app/page.tsx +0 -10
- package/templates/next-page/package.json +0 -22
- package/templates/node-api/index.js +0 -57
- package/templates/node-api/package.json +0 -13
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Enhanced HITL Review Portal
|
|
3
|
+
* Task 4.1: Centralized review portal for batch approval/rejection
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Display all pending checkpoints
|
|
7
|
+
* - Batch approval/rejection
|
|
8
|
+
* - Risk assessment visualization
|
|
9
|
+
* - Diff preview
|
|
10
|
+
*/
|
|
11
|
+
import { colors, separator, success, warning, error, info, createTable, createBox, } from '../../ui.js';
|
|
12
|
+
/**
|
|
13
|
+
* Display centralized HITL review portal
|
|
14
|
+
*/
|
|
15
|
+
export function displayReviewPortal(hitlValidation) {
|
|
16
|
+
const status = hitlValidation.getReviewQueueStatus();
|
|
17
|
+
const checkpoints = hitlValidation.getPendingCheckpoints();
|
|
18
|
+
if (checkpoints.length === 0) {
|
|
19
|
+
console.log(colors.green('✓ No pending checkpoints to review'));
|
|
20
|
+
return { checkpoints: [], status };
|
|
21
|
+
}
|
|
22
|
+
// Display portal header
|
|
23
|
+
console.log('');
|
|
24
|
+
console.log(separator('═', 80));
|
|
25
|
+
console.log(colors.bold('⚠️ Human-in-the-Loop Review Portal'));
|
|
26
|
+
console.log(separator('═', 80));
|
|
27
|
+
console.log('');
|
|
28
|
+
// Display queue status
|
|
29
|
+
console.log(colors.bold('Review Queue Status:'));
|
|
30
|
+
console.log(` Total checkpoints: ${status.total}`);
|
|
31
|
+
console.log(` Pending review: ${status.pending}`);
|
|
32
|
+
console.log('');
|
|
33
|
+
// Priority breakdown
|
|
34
|
+
if (status.byPriority.critical > 0) {
|
|
35
|
+
console.log(error(` 🔴 Critical: ${status.byPriority.critical}`));
|
|
36
|
+
}
|
|
37
|
+
if (status.byPriority.high > 0) {
|
|
38
|
+
console.log(warning(` 🟡 High: ${status.byPriority.high}`));
|
|
39
|
+
}
|
|
40
|
+
if (status.byPriority.normal > 0) {
|
|
41
|
+
console.log(info(` 🔵 Normal: ${status.byPriority.normal}`));
|
|
42
|
+
}
|
|
43
|
+
if (status.byPriority.low > 0) {
|
|
44
|
+
console.log(success(` 🟢 Low: ${status.byPriority.low}`));
|
|
45
|
+
}
|
|
46
|
+
console.log('');
|
|
47
|
+
// Display checkpoints summary
|
|
48
|
+
displayCheckpointsSummary(checkpoints);
|
|
49
|
+
return { checkpoints, status };
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Display summary table of all checkpoints
|
|
53
|
+
*/
|
|
54
|
+
function displayCheckpointsSummary(checkpoints) {
|
|
55
|
+
const rows = checkpoints.map(checkpoint => {
|
|
56
|
+
const priorityColor = getPriorityColor(checkpoint.priority);
|
|
57
|
+
const riskColor = getRiskColor(checkpoint.context.riskLevel);
|
|
58
|
+
return [
|
|
59
|
+
checkpoint.checkpointId.substring(checkpoint.checkpointId.length - 8),
|
|
60
|
+
checkpoint.operation.substring(0, 30),
|
|
61
|
+
priorityColor(getPriorityLabel(checkpoint.priority)),
|
|
62
|
+
riskColor(checkpoint.context.riskLevel.toUpperCase()),
|
|
63
|
+
`${checkpoint.changes.length} file(s)`,
|
|
64
|
+
checkpoint.context.uncertainty
|
|
65
|
+
? `${(checkpoint.context.uncertainty * 100).toFixed(0)}%`
|
|
66
|
+
: '-',
|
|
67
|
+
];
|
|
68
|
+
});
|
|
69
|
+
const table = createTable(['ID', 'Operation', 'Priority', 'Risk', 'Files', 'Uncertainty'], rows);
|
|
70
|
+
console.log(colors.bold('Pending Checkpoints:'));
|
|
71
|
+
console.log(table.toString());
|
|
72
|
+
console.log('');
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Display detailed checkpoint view
|
|
76
|
+
*/
|
|
77
|
+
export function displayCheckpointDetails(checkpoint) {
|
|
78
|
+
console.log('');
|
|
79
|
+
console.log(separator('═', 80));
|
|
80
|
+
console.log(colors.bold(`Review Checkpoint: ${checkpoint.checkpointId.substring(checkpoint.checkpointId.length - 8)}`));
|
|
81
|
+
console.log(separator('═', 80));
|
|
82
|
+
console.log('');
|
|
83
|
+
// Operation info
|
|
84
|
+
console.log(colors.bold('Operation:'));
|
|
85
|
+
console.log(` ${checkpoint.operation}`);
|
|
86
|
+
console.log('');
|
|
87
|
+
// Priority and risk
|
|
88
|
+
const priorityColor = getPriorityColor(checkpoint.priority);
|
|
89
|
+
const riskColor = getRiskColor(checkpoint.context.riskLevel);
|
|
90
|
+
console.log(colors.bold('Risk Assessment:'));
|
|
91
|
+
console.log(` Priority: ${priorityColor(getPriorityLabel(checkpoint.priority))}`);
|
|
92
|
+
console.log(` Risk Level: ${riskColor(checkpoint.context.riskLevel.toUpperCase())}`);
|
|
93
|
+
if (checkpoint.context.uncertainty) {
|
|
94
|
+
const uncertaintyPercent = (checkpoint.context.uncertainty * 100).toFixed(0);
|
|
95
|
+
const uncertaintyColor = checkpoint.context.uncertainty > 0.7 ? error : warning;
|
|
96
|
+
console.log(` Uncertainty: ${uncertaintyColor(`${uncertaintyPercent}%`)}`);
|
|
97
|
+
}
|
|
98
|
+
console.log('');
|
|
99
|
+
// Changes summary
|
|
100
|
+
console.log(colors.bold(`Changes (${checkpoint.changes.length} file(s)):`));
|
|
101
|
+
checkpoint.changes.forEach((change, idx) => {
|
|
102
|
+
console.log(` ${idx + 1}. ${change.type.toUpperCase()}: ${change.filepath || 'N/A'}`);
|
|
103
|
+
console.log(` ${colors.dim(change.summary)}`);
|
|
104
|
+
if (change.diff) {
|
|
105
|
+
console.log(` ${colors.cyan('View diff with --diff flag')}`);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
console.log('');
|
|
109
|
+
// Context
|
|
110
|
+
console.log(colors.bold('Context:'));
|
|
111
|
+
console.log(` Query: ${colors.cyan(checkpoint.context.query)}`);
|
|
112
|
+
if (checkpoint.context.securityFindings && checkpoint.context.securityFindings.length > 0) {
|
|
113
|
+
console.log(warning(` ⚠️ Security Findings: ${checkpoint.context.securityFindings.length}`));
|
|
114
|
+
}
|
|
115
|
+
if (checkpoint.context.licenseFindings && checkpoint.context.licenseFindings.length > 0) {
|
|
116
|
+
console.log(warning(` ⚠️ License Findings: ${checkpoint.context.licenseFindings.length}`));
|
|
117
|
+
}
|
|
118
|
+
console.log('');
|
|
119
|
+
// Decision options
|
|
120
|
+
console.log(separator('─', 80));
|
|
121
|
+
console.log(colors.bold('Decision Options:'));
|
|
122
|
+
console.log(` [A]pprove [R]eject [S]kip [D]iff [Q]uit`);
|
|
123
|
+
console.log(separator('─', 80));
|
|
124
|
+
console.log('');
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Display batch approval prompt
|
|
128
|
+
*/
|
|
129
|
+
export function displayBatchApprovalPrompt(checkpointIds) {
|
|
130
|
+
console.log('');
|
|
131
|
+
const content = [
|
|
132
|
+
`Batch Review: ${checkpointIds.length} checkpoint(s)`,
|
|
133
|
+
'',
|
|
134
|
+
`You are about to review ${checkpointIds.length} checkpoint(s).`,
|
|
135
|
+
'',
|
|
136
|
+
'Options:',
|
|
137
|
+
` [A]pprove all [R]eject all [I]ndividual review [C]ancel`,
|
|
138
|
+
].join('\n');
|
|
139
|
+
console.log(createBox(content));
|
|
140
|
+
console.log('');
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Display batch decision summary
|
|
144
|
+
*/
|
|
145
|
+
export function displayBatchDecisionSummary(decisions) {
|
|
146
|
+
const approved = decisions.filter(d => d.decision === 'approve').length;
|
|
147
|
+
const rejected = decisions.filter(d => d.decision === 'reject').length;
|
|
148
|
+
console.log('');
|
|
149
|
+
console.log(separator('═', 80));
|
|
150
|
+
console.log(colors.bold('Batch Decision Summary'));
|
|
151
|
+
console.log(separator('═', 80));
|
|
152
|
+
console.log('');
|
|
153
|
+
console.log(`Total reviewed: ${decisions.length}`);
|
|
154
|
+
console.log(success(` ✓ Approved: ${approved}`));
|
|
155
|
+
if (rejected > 0) {
|
|
156
|
+
console.log(error(` ✗ Rejected: ${rejected}`));
|
|
157
|
+
}
|
|
158
|
+
console.log('');
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Helper: Get priority color
|
|
162
|
+
*/
|
|
163
|
+
function getPriorityColor(priority) {
|
|
164
|
+
switch (priority) {
|
|
165
|
+
case 'critical':
|
|
166
|
+
return error;
|
|
167
|
+
case 'high':
|
|
168
|
+
return warning;
|
|
169
|
+
case 'normal':
|
|
170
|
+
return info;
|
|
171
|
+
case 'low':
|
|
172
|
+
return success;
|
|
173
|
+
default:
|
|
174
|
+
return colors.gray;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Helper: Get priority label
|
|
179
|
+
*/
|
|
180
|
+
function getPriorityLabel(priority) {
|
|
181
|
+
switch (priority) {
|
|
182
|
+
case 'critical':
|
|
183
|
+
return 'CRITICAL';
|
|
184
|
+
case 'high':
|
|
185
|
+
return 'HIGH';
|
|
186
|
+
case 'normal':
|
|
187
|
+
return 'NORMAL';
|
|
188
|
+
case 'low':
|
|
189
|
+
return 'LOW';
|
|
190
|
+
default:
|
|
191
|
+
return String(priority).toUpperCase();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Helper: Get risk color
|
|
196
|
+
*/
|
|
197
|
+
function getRiskColor(riskLevel) {
|
|
198
|
+
switch (riskLevel.toLowerCase()) {
|
|
199
|
+
case 'critical':
|
|
200
|
+
return error;
|
|
201
|
+
case 'high':
|
|
202
|
+
return warning;
|
|
203
|
+
case 'medium':
|
|
204
|
+
return info;
|
|
205
|
+
case 'low':
|
|
206
|
+
return success;
|
|
207
|
+
default:
|
|
208
|
+
return colors.gray;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Format checkpoint for batch display
|
|
213
|
+
*/
|
|
214
|
+
export function formatCheckpointForBatch(checkpoint) {
|
|
215
|
+
const priorityColor = getPriorityColor(checkpoint.priority);
|
|
216
|
+
const riskColor = getRiskColor(checkpoint.context.riskLevel);
|
|
217
|
+
return [
|
|
218
|
+
`${checkpoint.checkpointId.substring(checkpoint.checkpointId.length - 8)} |`,
|
|
219
|
+
`${checkpoint.operation.substring(0, 25)} |`,
|
|
220
|
+
`${priorityColor(getPriorityLabel(checkpoint.priority))} |`,
|
|
221
|
+
`${riskColor(checkpoint.context.riskLevel.toUpperCase())} |`,
|
|
222
|
+
`${checkpoint.changes.length} file(s)`,
|
|
223
|
+
].join(' ');
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=hitl-review-portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hitl-review-portal.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/hitl-review-portal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,MAAM,EACN,SAAS,EAGT,OAAO,EACP,OAAO,EACP,KAAK,EACL,IAAI,EACJ,WAAW,EACX,SAAS,GACV,MAAM,aAAa,CAAC;AAcrB;;GAEG;AACH,MAAM,UAAU,mBAAmB,CACjC,cAA8B;IAK9B,MAAM,MAAM,GAAG,cAAc,CAAC,oBAAoB,EAAE,CAAC;IACrD,MAAM,WAAW,GAAG,cAAc,CAAC,qBAAqB,EAAE,CAAC;IAE3D,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAC,CAAC;QAChE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;IACrC,CAAC;IAED,wBAAwB;IACxB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC,CAAC;IAChE,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAChC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAEhB,uBAAuB;IACvB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC;IACjD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5D,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,UAAU;KACvC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Human-in-the-Loop (HITL) Validation System
|
|
3
|
+
*
|
|
4
|
+
* Architecturally embedded human intervention points for supervision and decision-making
|
|
5
|
+
* Research: Human-in-the-Loop (HITL) validation mandatory, prevents automation bias
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Mandatory validation checkpoints
|
|
9
|
+
* - Centralized review hub
|
|
10
|
+
* - Review queue management
|
|
11
|
+
* - Approval workflow
|
|
12
|
+
*/
|
|
13
|
+
export type ReviewStatus = 'pending' | 'approved' | 'rejected' | 'needs_changes' | 'cancelled';
|
|
14
|
+
export type ReviewPriority = 'low' | 'normal' | 'high' | 'critical';
|
|
15
|
+
export interface ReviewCheckpoint {
|
|
16
|
+
checkpointId: string;
|
|
17
|
+
operation: string;
|
|
18
|
+
description: string;
|
|
19
|
+
priority: ReviewPriority;
|
|
20
|
+
status: ReviewStatus;
|
|
21
|
+
createdAt: number;
|
|
22
|
+
reviewedAt?: number;
|
|
23
|
+
reviewedBy?: string;
|
|
24
|
+
changes: {
|
|
25
|
+
type: 'edit' | 'create' | 'delete' | 'move' | 'refactor';
|
|
26
|
+
filepath?: string;
|
|
27
|
+
diff?: string;
|
|
28
|
+
summary: string;
|
|
29
|
+
}[];
|
|
30
|
+
context: {
|
|
31
|
+
query: string;
|
|
32
|
+
riskLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
33
|
+
uncertainty?: number;
|
|
34
|
+
securityFindings?: any[];
|
|
35
|
+
licenseFindings?: any[];
|
|
36
|
+
};
|
|
37
|
+
metadata: {
|
|
38
|
+
sessionId?: string;
|
|
39
|
+
userId?: string;
|
|
40
|
+
decisionTreeId?: string;
|
|
41
|
+
lineageId?: string;
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export interface ReviewDecision {
|
|
46
|
+
checkpointId: string;
|
|
47
|
+
decision: 'approve' | 'reject' | 'request_changes';
|
|
48
|
+
reviewer: string;
|
|
49
|
+
comment?: string;
|
|
50
|
+
timestamp: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Human-in-the-Loop Validation System
|
|
54
|
+
* Manages mandatory validation checkpoints for critical operations
|
|
55
|
+
*/
|
|
56
|
+
export declare class HITLValidation {
|
|
57
|
+
private checkpoints;
|
|
58
|
+
private reviewQueue;
|
|
59
|
+
/**
|
|
60
|
+
* Create review checkpoint
|
|
61
|
+
*/
|
|
62
|
+
createCheckpoint(operation: string, changes: ReviewCheckpoint['changes'], context: ReviewCheckpoint['context'], metadata?: ReviewCheckpoint['metadata']): ReviewCheckpoint;
|
|
63
|
+
/**
|
|
64
|
+
* Check if operation requires HITL validation
|
|
65
|
+
*/
|
|
66
|
+
requiresValidation(context: {
|
|
67
|
+
riskLevel: 'low' | 'medium' | 'high' | 'critical';
|
|
68
|
+
isDestructive?: boolean;
|
|
69
|
+
modifiesSecuritySensitiveCode?: boolean;
|
|
70
|
+
affectsMultipleFiles?: boolean;
|
|
71
|
+
uncertainty?: number;
|
|
72
|
+
}): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Get next checkpoint in review queue
|
|
75
|
+
*/
|
|
76
|
+
getNextCheckpoint(): ReviewCheckpoint | null;
|
|
77
|
+
/**
|
|
78
|
+
* Submit review decision
|
|
79
|
+
*/
|
|
80
|
+
submitDecision(decision: ReviewDecision): void;
|
|
81
|
+
/**
|
|
82
|
+
* Get checkpoint by ID
|
|
83
|
+
*/
|
|
84
|
+
getCheckpoint(checkpointId: string): ReviewCheckpoint | null;
|
|
85
|
+
/**
|
|
86
|
+
* Get all pending checkpoints
|
|
87
|
+
*/
|
|
88
|
+
getPendingCheckpoints(priority?: ReviewPriority): ReviewCheckpoint[];
|
|
89
|
+
/**
|
|
90
|
+
* Get review queue status
|
|
91
|
+
*/
|
|
92
|
+
getReviewQueueStatus(): {
|
|
93
|
+
total: number;
|
|
94
|
+
pending: number;
|
|
95
|
+
byPriority: Record<ReviewPriority, number>;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Format checkpoint for review
|
|
99
|
+
*/
|
|
100
|
+
formatCheckpoint(checkpoint: ReviewCheckpoint): string;
|
|
101
|
+
private addToReviewQueue;
|
|
102
|
+
private generateDescription;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=hitl-validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hitl-validation.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/hitl-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,WAAW,CAAC;AAC/F,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;QACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;IACJ,OAAO,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,SAAS,EAA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,iBAAiB,IAAI,gBAAgB,GAAG,IAAI;IAS5C;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAqB9C;;OAEG;IACH,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI;IAI5D;;OAEG;IACH,qBAAqB,CAAC,QAAQ,CAAC,EAAE,cAAc,GAAG,gBAAgB,EAAE;IAepE;;OAEG;IACH,oBAAoB,IAAI;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;KAC5C;IAyBD;;OAEG;IACH,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,GAAG,MAAM;IA0CtD,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,mBAAmB;CAQ5B"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Human-in-the-Loop (HITL) Validation System
|
|
3
|
+
*
|
|
4
|
+
* Architecturally embedded human intervention points for supervision and decision-making
|
|
5
|
+
* Research: Human-in-the-Loop (HITL) validation mandatory, prevents automation bias
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Mandatory validation checkpoints
|
|
9
|
+
* - Centralized review hub
|
|
10
|
+
* - Review queue management
|
|
11
|
+
* - Approval workflow
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Human-in-the-Loop Validation System
|
|
15
|
+
* Manages mandatory validation checkpoints for critical operations
|
|
16
|
+
*/
|
|
17
|
+
export class HITLValidation {
|
|
18
|
+
checkpoints = new Map();
|
|
19
|
+
reviewQueue = []; // Checkpoint IDs in review order
|
|
20
|
+
/**
|
|
21
|
+
* Create review checkpoint
|
|
22
|
+
*/
|
|
23
|
+
createCheckpoint(operation, changes, context, metadata) {
|
|
24
|
+
const checkpointId = `checkpoint-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
25
|
+
// Determine priority based on risk level
|
|
26
|
+
const priority = context.riskLevel === 'critical' ? 'critical' :
|
|
27
|
+
context.riskLevel === 'high' ? 'high' :
|
|
28
|
+
context.riskLevel === 'medium' ? 'normal' :
|
|
29
|
+
'low';
|
|
30
|
+
const checkpoint = {
|
|
31
|
+
checkpointId,
|
|
32
|
+
operation,
|
|
33
|
+
description: this.generateDescription(operation, changes, context),
|
|
34
|
+
priority,
|
|
35
|
+
status: 'pending',
|
|
36
|
+
createdAt: Date.now(),
|
|
37
|
+
changes,
|
|
38
|
+
context,
|
|
39
|
+
metadata: metadata || {},
|
|
40
|
+
};
|
|
41
|
+
this.checkpoints.set(checkpointId, checkpoint);
|
|
42
|
+
this.addToReviewQueue(checkpointId, priority);
|
|
43
|
+
return checkpoint;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Check if operation requires HITL validation
|
|
47
|
+
*/
|
|
48
|
+
requiresValidation(context) {
|
|
49
|
+
const { riskLevel, isDestructive = false, modifiesSecuritySensitiveCode = false, affectsMultipleFiles = false, uncertainty = 0.5, } = context;
|
|
50
|
+
// Always require validation for critical operations
|
|
51
|
+
if (riskLevel === 'critical') {
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
// Require validation for destructive operations
|
|
55
|
+
if (isDestructive) {
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
// Require validation for security-sensitive modifications
|
|
59
|
+
if (modifiesSecuritySensitiveCode) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
// Require validation for high-risk multi-file operations
|
|
63
|
+
if (affectsMultipleFiles && riskLevel === 'high') {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
// Require validation if uncertainty is very high
|
|
67
|
+
if (uncertainty > 0.8) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
// Require validation for high-risk operations
|
|
71
|
+
if (riskLevel === 'high') {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get next checkpoint in review queue
|
|
78
|
+
*/
|
|
79
|
+
getNextCheckpoint() {
|
|
80
|
+
if (this.reviewQueue.length === 0) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
const checkpointId = this.reviewQueue[0];
|
|
84
|
+
return this.checkpoints.get(checkpointId) || null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Submit review decision
|
|
88
|
+
*/
|
|
89
|
+
submitDecision(decision) {
|
|
90
|
+
const checkpoint = this.checkpoints.get(decision.checkpointId);
|
|
91
|
+
if (!checkpoint) {
|
|
92
|
+
throw new Error(`Checkpoint ${decision.checkpointId} not found`);
|
|
93
|
+
}
|
|
94
|
+
checkpoint.status =
|
|
95
|
+
decision.decision === 'approve' ? 'approved' :
|
|
96
|
+
decision.decision === 'reject' ? 'rejected' :
|
|
97
|
+
'needs_changes';
|
|
98
|
+
checkpoint.reviewedAt = decision.timestamp;
|
|
99
|
+
checkpoint.reviewedBy = decision.reviewer;
|
|
100
|
+
// Remove from review queue
|
|
101
|
+
const index = this.reviewQueue.indexOf(decision.checkpointId);
|
|
102
|
+
if (index !== -1) {
|
|
103
|
+
this.reviewQueue.splice(index, 1);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Get checkpoint by ID
|
|
108
|
+
*/
|
|
109
|
+
getCheckpoint(checkpointId) {
|
|
110
|
+
return this.checkpoints.get(checkpointId) || null;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Get all pending checkpoints
|
|
114
|
+
*/
|
|
115
|
+
getPendingCheckpoints(priority) {
|
|
116
|
+
const pending = [];
|
|
117
|
+
for (const checkpointId of this.reviewQueue) {
|
|
118
|
+
const checkpoint = this.checkpoints.get(checkpointId);
|
|
119
|
+
if (checkpoint && checkpoint.status === 'pending') {
|
|
120
|
+
if (!priority || checkpoint.priority === priority) {
|
|
121
|
+
pending.push(checkpoint);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return pending;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get review queue status
|
|
129
|
+
*/
|
|
130
|
+
getReviewQueueStatus() {
|
|
131
|
+
const byPriority = {
|
|
132
|
+
low: 0,
|
|
133
|
+
normal: 0,
|
|
134
|
+
high: 0,
|
|
135
|
+
critical: 0,
|
|
136
|
+
};
|
|
137
|
+
let pending = 0;
|
|
138
|
+
for (const checkpointId of this.reviewQueue) {
|
|
139
|
+
const checkpoint = this.checkpoints.get(checkpointId);
|
|
140
|
+
if (checkpoint && checkpoint.status === 'pending') {
|
|
141
|
+
pending++;
|
|
142
|
+
byPriority[checkpoint.priority]++;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return {
|
|
146
|
+
total: this.checkpoints.size,
|
|
147
|
+
pending,
|
|
148
|
+
byPriority,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Format checkpoint for review
|
|
153
|
+
*/
|
|
154
|
+
formatCheckpoint(checkpoint) {
|
|
155
|
+
let output = '';
|
|
156
|
+
output += `\n${'═'.repeat(80)}\n`;
|
|
157
|
+
output += `Review Checkpoint: ${checkpoint.checkpointId}\n`;
|
|
158
|
+
output += `${'═'.repeat(80)}\n\n`;
|
|
159
|
+
output += `Operation: ${checkpoint.operation}\n`;
|
|
160
|
+
output += `Priority: ${checkpoint.priority.toUpperCase()}\n`;
|
|
161
|
+
output += `Status: ${checkpoint.status}\n`;
|
|
162
|
+
output += `Created: ${new Date(checkpoint.createdAt).toISOString()}\n\n`;
|
|
163
|
+
output += `Description:\n${checkpoint.description}\n\n`;
|
|
164
|
+
output += `Changes (${checkpoint.changes.length}):\n`;
|
|
165
|
+
for (const change of checkpoint.changes) {
|
|
166
|
+
output += ` • ${change.type}: ${change.summary}\n`;
|
|
167
|
+
if (change.filepath) {
|
|
168
|
+
output += ` File: ${change.filepath}\n`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
output += '\n';
|
|
172
|
+
output += `Context:\n`;
|
|
173
|
+
output += ` Query: ${checkpoint.context.query}\n`;
|
|
174
|
+
output += ` Risk Level: ${checkpoint.context.riskLevel}\n`;
|
|
175
|
+
if (checkpoint.context.uncertainty) {
|
|
176
|
+
output += ` Uncertainty: ${(checkpoint.context.uncertainty * 100).toFixed(1)}%\n`;
|
|
177
|
+
}
|
|
178
|
+
if (checkpoint.context.securityFindings && checkpoint.context.securityFindings.length > 0) {
|
|
179
|
+
output += ` ⚠️ Security Findings: ${checkpoint.context.securityFindings.length}\n`;
|
|
180
|
+
}
|
|
181
|
+
if (checkpoint.context.licenseFindings && checkpoint.context.licenseFindings.length > 0) {
|
|
182
|
+
output += ` ⚠️ License Findings: ${checkpoint.context.licenseFindings.length}\n`;
|
|
183
|
+
}
|
|
184
|
+
output += `\n${'═'.repeat(80)}\n`;
|
|
185
|
+
return output;
|
|
186
|
+
}
|
|
187
|
+
// Private helpers
|
|
188
|
+
addToReviewQueue(checkpointId, priority) {
|
|
189
|
+
// Insert based on priority (critical first)
|
|
190
|
+
const priorityOrder = ['critical', 'high', 'normal', 'low'];
|
|
191
|
+
const priorityIndex = priorityOrder.indexOf(priority);
|
|
192
|
+
let insertIndex = 0;
|
|
193
|
+
for (let i = 0; i < this.reviewQueue.length; i++) {
|
|
194
|
+
const existingCheckpoint = this.checkpoints.get(this.reviewQueue[i]);
|
|
195
|
+
if (existingCheckpoint) {
|
|
196
|
+
const existingPriorityIndex = priorityOrder.indexOf(existingCheckpoint.priority);
|
|
197
|
+
if (priorityIndex <= existingPriorityIndex) {
|
|
198
|
+
insertIndex = i;
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
insertIndex = i + 1;
|
|
203
|
+
}
|
|
204
|
+
this.reviewQueue.splice(insertIndex, 0, checkpointId);
|
|
205
|
+
}
|
|
206
|
+
generateDescription(operation, changes, context) {
|
|
207
|
+
const changeSummary = changes.map(c => `${c.type} ${c.filepath || ''}`).join(', ');
|
|
208
|
+
return `${operation}: ${changeSummary}. Risk level: ${context.riskLevel}.`;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
//# sourceMappingURL=hitl-validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hitl-validation.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/hitl-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AA4CH;;;GAGG;AACH,MAAM,OAAO,cAAc;IACjB,WAAW,GAAkC,IAAI,GAAG,EAAE,CAAC;IACvD,WAAW,GAAa,EAAE,CAAC,CAAC,iCAAiC;IAErE;;OAEG;IACH,gBAAgB,CACd,SAAiB,EACjB,OAAoC,EACpC,OAAoC,EACpC,QAAuC;QAEvC,MAAM,YAAY,GAAG,cAAc,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QAE3F,yCAAyC;QACzC,MAAM,QAAQ,GACZ,OAAO,CAAC,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;YAC/C,OAAO,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;gBACvC,OAAO,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;oBAC3C,KAAK,CAAC;QAER,MAAM,UAAU,GAAqB;YACnC,YAAY;YACZ,SAAS;YACT,WAAW,EAAE,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC;YAClE,QAAQ;YACR,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,OAAO;YACP,OAAO;YACP,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,IAAI,CAAC,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnF,OAAO,GAAG,SAAS,KAAK,aAAa,iBAAiB,OAAO,CAAC,SAAS,GAAG,CAAC;IAC7E,CAAC;CACF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress Indicator Utilities
|
|
3
|
+
* Provides progress indicators for long-running operations
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Progress bars for operations with known total
|
|
7
|
+
* - Spinners for operations with unknown duration
|
|
8
|
+
* - Context-aware progress messages
|
|
9
|
+
*/
|
|
10
|
+
export interface ProgressOptions {
|
|
11
|
+
total?: number;
|
|
12
|
+
message?: string;
|
|
13
|
+
showPercentage?: boolean;
|
|
14
|
+
showCount?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class ProgressIndicator {
|
|
17
|
+
private spinner;
|
|
18
|
+
private progressBar;
|
|
19
|
+
private operationStartTime;
|
|
20
|
+
private currentValue;
|
|
21
|
+
/**
|
|
22
|
+
* Start progress indicator
|
|
23
|
+
*/
|
|
24
|
+
start(options?: ProgressOptions): void;
|
|
25
|
+
/**
|
|
26
|
+
* Update progress
|
|
27
|
+
*/
|
|
28
|
+
update(value: number, message?: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Increment progress
|
|
31
|
+
*/
|
|
32
|
+
increment(delta?: number, message?: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Stop progress indicator
|
|
35
|
+
*/
|
|
36
|
+
stop(success?: boolean, finalMessage?: string): void;
|
|
37
|
+
/**
|
|
38
|
+
* Get elapsed time
|
|
39
|
+
*/
|
|
40
|
+
getElapsedTime(): number;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create progress indicator for embedding search
|
|
44
|
+
*/
|
|
45
|
+
export declare function createEmbeddingSearchProgress(total: number): ProgressIndicator;
|
|
46
|
+
/**
|
|
47
|
+
* Create progress indicator for plan generation
|
|
48
|
+
*/
|
|
49
|
+
export declare function createPlanGenerationProgress(): ProgressIndicator;
|
|
50
|
+
/**
|
|
51
|
+
* Create progress indicator for memory synthesis
|
|
52
|
+
*/
|
|
53
|
+
export declare function createMemorySynthesisProgress(): ProgressIndicator;
|
|
54
|
+
//# sourceMappingURL=progress-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-indicator.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/progress-indicator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,WAAW,CAAsC;IACzD,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,YAAY,CAAa;IAEjC;;OAEG;IACH,KAAK,CAAC,OAAO,GAAE,eAAoB,GAAG,IAAI;IAmB1C;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAe7C;;OAEG;IACH,SAAS,CAAC,KAAK,GAAE,MAAU,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAIpD;;OAEG;IACH,IAAI,CAAC,OAAO,GAAE,OAAc,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI;IAmB1D;;OAEG;IACH,cAAc,IAAI,MAAM;CAGzB;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAS9E;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,iBAAiB,CAMhE;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,iBAAiB,CAMjE"}
|