codehere 0.1.1 → 0.2.2
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/README.md +68 -329
- package/dist/application/agents/execution-agent.js +4 -30
- package/dist/application/agents/multi-agent-orchestrator.js +0 -1
- package/dist/application/agents/planning-agent.js +79 -199
- package/dist/application/services/dependency-container.js +9 -20
- package/dist/application/services/intelligent-router.js +56 -64
- package/dist/application/use-cases/ask-question-use-case.js +22 -121
- package/dist/application/use-cases/edit-file-use-case.js +171 -160
- package/dist/application/use-cases/react-orchestration-use-case.js +10 -43
- package/dist/chat.js +130 -54
- package/dist/domain/services/query-intent-classifier.js +3 -36
- package/dist/embed.js +61 -74
- package/dist/index.js +1299 -259
- package/dist/infrastructure/ai/cohere-ai-service.js +9 -78
- package/dist/infrastructure/ai/provider-ai-service.js +18 -121
- package/dist/infrastructure/config/config-manager.js +14 -135
- package/dist/infrastructure/config/product-context.js +66 -0
- package/dist/infrastructure/context/conversation-context.js +1 -86
- package/dist/infrastructure/cost/cost-router.js +104 -0
- package/dist/infrastructure/cost/cost-tracker.js +2 -3
- package/dist/infrastructure/governance/policy-as-code.js +2 -1
- package/dist/infrastructure/hooks/claude-sdk-hook.js +253 -0
- package/dist/infrastructure/hooks/session-analyzer.js +111 -0
- package/dist/infrastructure/observability/execution-tracer.js +7 -180
- package/dist/infrastructure/protocols/mcp-helpers.js +45 -0
- package/dist/infrastructure/protocols/mcp-server-impl.js +286 -0
- package/dist/infrastructure/providers/cohere-provider.js +5 -31
- package/dist/infrastructure/providers/fake-provider.js +0 -8
- package/dist/infrastructure/providers/local-llm-provider.js +2 -8
- package/dist/infrastructure/providers/openai-provider.js +5 -37
- package/dist/infrastructure/providers/openrouter-provider.js +3 -11
- package/dist/infrastructure/safety/pattern-detector.js +133 -0
- package/dist/infrastructure/security/ai-sast-scanner.js +62 -13
- package/dist/infrastructure/security/enhanced-security-gate.js +2 -61
- package/dist/infrastructure/security/input-validator.js +29 -146
- package/dist/infrastructure/security/trust-scorer.js +337 -0
- package/dist/infrastructure/storage/embeddings-path.js +4 -14
- package/dist/infrastructure/storage/plan-repository.js +5 -4
- package/dist/infrastructure/storage/sqlite-decision-repository.js +8 -4
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +11 -23
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js +8 -4
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js +8 -4
- package/dist/infrastructure/storage/sqlite-memory-repository.js +8 -4
- package/dist/infrastructure/storage/sqlite-pattern-repository.js +8 -4
- package/dist/infrastructure/ux/stream-markdown.js +151 -0
- package/dist/infrastructure/ux/transparency.js +71 -0
- package/dist/infrastructure/validation/agent-feedback.js +12 -57
- package/dist/monitoring.js +8 -17
- package/dist/parallel-processor.js +50 -122
- package/dist/presentation/cli/commands/ask-command.js +39 -80
- package/dist/presentation/cli/commands/config-command.js +1 -1
- package/dist/presentation/cli/commands/cost-command.js +6 -6
- package/dist/presentation/cli/commands/decision-command.js +5 -5
- package/dist/presentation/cli/commands/fix-command.js +4 -44
- package/dist/presentation/cli/commands/help-command.js +151 -100
- package/dist/presentation/cli/commands/hook-command.js +272 -0
- package/dist/presentation/cli/commands/knowledge-command.js +4 -4
- package/dist/presentation/cli/commands/learning-dashboard-command.js +3 -3
- package/dist/presentation/cli/commands/orchestrate-command.js +6 -48
- package/dist/presentation/cli/commands/plan-command.js +1 -1
- package/dist/presentation/cli/commands/product-command.js +193 -16
- package/dist/presentation/cli/commands/report-command.js +353 -0
- package/dist/presentation/cli/commands/run-command.js +3 -3
- package/dist/presentation/cli/commands/scan-tool-command.js +65 -0
- package/dist/presentation/cli/commands/setup-command.js +34 -81
- package/dist/presentation/cli/commands/smart-command.js +50 -172
- package/dist/presentation/cli/commands/status-command.js +304 -119
- package/dist/presentation/cli/commands/trust-command.js +267 -274
- package/dist/presentation/cli/commands/undo-command.js +2 -2
- package/dist/search.js +37 -67
- package/dist/session.js +595 -484
- package/dist/task-verification.js +4 -4
- package/dist/token-optimizer.js +1 -6
- package/dist/ui.js +132 -16
- package/dist/utils/check-api-status.js +30 -12
- package/dist/utils/diff-parser.js +18 -48
- package/dist/verification/compiler.js +12 -11
- package/package.json +36 -43
- package/dist/agents/base.d.ts +0 -107
- package/dist/agents/base.d.ts.map +0 -1
- package/dist/agents/base.js.map +0 -1
- package/dist/agents/orchestrator-model-driven.d.ts +0 -41
- package/dist/agents/orchestrator-model-driven.d.ts.map +0 -1
- package/dist/agents/orchestrator-model-driven.js.map +0 -1
- package/dist/agents/react-orchestrator-agent.d.ts +0 -15
- package/dist/agents/react-orchestrator-agent.d.ts.map +0 -1
- package/dist/agents/react-orchestrator-agent.js.map +0 -1
- package/dist/application/agents/execution-agent.d.ts +0 -79
- package/dist/application/agents/execution-agent.d.ts.map +0 -1
- package/dist/application/agents/execution-agent.js.map +0 -1
- package/dist/application/agents/multi-agent-orchestrator.d.ts +0 -69
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +0 -1
- package/dist/application/agents/multi-agent-orchestrator.js.map +0 -1
- package/dist/application/agents/planning-agent.d.ts +0 -65
- package/dist/application/agents/planning-agent.d.ts.map +0 -1
- package/dist/application/agents/planning-agent.js.map +0 -1
- package/dist/application/agents/validation-agent.d.ts +0 -68
- package/dist/application/agents/validation-agent.d.ts.map +0 -1
- package/dist/application/agents/validation-agent.js.map +0 -1
- package/dist/application/architectures/plan-and-act.d.ts +0 -94
- package/dist/application/architectures/plan-and-act.d.ts.map +0 -1
- package/dist/application/architectures/plan-and-act.js.map +0 -1
- package/dist/application/index.d.ts +0 -12
- package/dist/application/index.d.ts.map +0 -1
- package/dist/application/index.js.map +0 -1
- package/dist/application/services/agent-factory.d.ts +0 -9
- package/dist/application/services/agent-factory.d.ts.map +0 -1
- package/dist/application/services/agent-factory.js.map +0 -1
- package/dist/application/services/context-importer.d.ts +0 -71
- package/dist/application/services/context-importer.d.ts.map +0 -1
- package/dist/application/services/context-importer.js +0 -436
- package/dist/application/services/context-importer.js.map +0 -1
- package/dist/application/services/context-manager.d.ts +0 -132
- package/dist/application/services/context-manager.d.ts.map +0 -1
- package/dist/application/services/context-manager.js +0 -369
- package/dist/application/services/context-manager.js.map +0 -1
- package/dist/application/services/dependency-container.d.ts +0 -187
- package/dist/application/services/dependency-container.d.ts.map +0 -1
- package/dist/application/services/dependency-container.js.map +0 -1
- package/dist/application/services/git-context-service.d.ts +0 -30
- package/dist/application/services/git-context-service.d.ts.map +0 -1
- package/dist/application/services/git-context-service.js.map +0 -1
- package/dist/application/services/intelligent-router.d.ts +0 -90
- package/dist/application/services/intelligent-router.d.ts.map +0 -1
- package/dist/application/services/intelligent-router.js.map +0 -1
- package/dist/application/services/token-counting-service.d.ts +0 -87
- package/dist/application/services/token-counting-service.d.ts.map +0 -1
- package/dist/application/services/token-counting-service.js +0 -196
- package/dist/application/services/token-counting-service.js.map +0 -1
- package/dist/application/services/tool-executor-service.d.ts +0 -14
- package/dist/application/services/tool-executor-service.d.ts.map +0 -1
- package/dist/application/services/tool-executor-service.js.map +0 -1
- package/dist/application/use-cases/ask-question-use-case.d.ts +0 -67
- package/dist/application/use-cases/ask-question-use-case.d.ts.map +0 -1
- package/dist/application/use-cases/ask-question-use-case.js.map +0 -1
- package/dist/application/use-cases/edit-file-use-case.d.ts +0 -92
- package/dist/application/use-cases/edit-file-use-case.d.ts.map +0 -1
- package/dist/application/use-cases/edit-file-use-case.js.map +0 -1
- package/dist/application/use-cases/explain-file-use-case.d.ts +0 -21
- package/dist/application/use-cases/explain-file-use-case.d.ts.map +0 -1
- package/dist/application/use-cases/explain-file-use-case.js.map +0 -1
- package/dist/application/use-cases/index-codebase-use-case.d.ts +0 -46
- package/dist/application/use-cases/index-codebase-use-case.d.ts.map +0 -1
- package/dist/application/use-cases/index-codebase-use-case.js.map +0 -1
- package/dist/application/use-cases/planning-use-case.d.ts +0 -46
- package/dist/application/use-cases/planning-use-case.d.ts.map +0 -1
- package/dist/application/use-cases/planning-use-case.js.map +0 -1
- package/dist/application/use-cases/react-orchestration-use-case.d.ts +0 -51
- package/dist/application/use-cases/react-orchestration-use-case.d.ts.map +0 -1
- package/dist/application/use-cases/react-orchestration-use-case.js.map +0 -1
- package/dist/application/use-cases/reflexion-use-case.d.ts +0 -24
- package/dist/application/use-cases/reflexion-use-case.d.ts.map +0 -1
- package/dist/application/use-cases/reflexion-use-case.js.map +0 -1
- package/dist/application/workflows/deterministic-workflows.d.ts +0 -61
- package/dist/application/workflows/deterministic-workflows.d.ts.map +0 -1
- package/dist/application/workflows/deterministic-workflows.js.map +0 -1
- package/dist/ast-parser.d 2.ts +0 -55
- package/dist/ast-parser.d.ts +0 -55
- package/dist/ast-parser.d.ts.map +0 -1
- package/dist/ast-parser.js.map +0 -1
- package/dist/cache.d.ts +0 -45
- package/dist/cache.d.ts.map +0 -1
- package/dist/cache.js.map +0 -1
- package/dist/chat.d.ts +0 -4
- package/dist/chat.d.ts.map +0 -1
- package/dist/chat.js.map +0 -1
- package/dist/code-analysis 2.js +0 -327
- package/dist/code-analysis.d.ts +0 -50
- package/dist/code-analysis.d.ts.map +0 -1
- package/dist/code-analysis.js.map +0 -1
- package/dist/context.d.ts +0 -44
- package/dist/context.d.ts 2.map +0 -1
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js.map +0 -1
- package/dist/docs.d.ts +0 -21
- package/dist/docs.d.ts.map +0 -1
- package/dist/docs.js.map +0 -1
- package/dist/domain/entities/code-chunk.d.ts +0 -26
- package/dist/domain/entities/code-chunk.d.ts.map +0 -1
- package/dist/domain/entities/code-chunk.js.map +0 -1
- package/dist/domain/entities/conversation-context.d.ts +0 -245
- package/dist/domain/entities/conversation-context.d.ts.map +0 -1
- package/dist/domain/entities/conversation-context.js +0 -50
- package/dist/domain/entities/conversation-context.js.map +0 -1
- package/dist/domain/entities/decision.d.ts +0 -37
- package/dist/domain/entities/decision.d.ts.map +0 -1
- package/dist/domain/entities/decision.js.map +0 -1
- package/dist/domain/entities/edit.d.ts +0 -35
- package/dist/domain/entities/edit.d.ts.map +0 -1
- package/dist/domain/entities/edit.js.map +0 -1
- package/dist/domain/entities/knowledge-node.d.ts +0 -83
- package/dist/domain/entities/knowledge-node.d.ts.map +0 -1
- package/dist/domain/entities/knowledge-node.js.map +0 -1
- package/dist/domain/entities/knowledge-preservation.d.ts +0 -42
- package/dist/domain/entities/knowledge-preservation.d.ts.map +0 -1
- package/dist/domain/entities/knowledge-preservation.js.map +0 -1
- package/dist/domain/entities/memory.d.ts +0 -36
- package/dist/domain/entities/memory.d.ts.map +0 -1
- package/dist/domain/entities/memory.js.map +0 -1
- package/dist/domain/entities/pattern.d.ts +0 -49
- package/dist/domain/entities/pattern.d.ts.map +0 -1
- package/dist/domain/entities/pattern.js.map +0 -1
- package/dist/domain/entities/plan.d.ts +0 -42
- package/dist/domain/entities/plan.d.ts.map +0 -1
- package/dist/domain/entities/plan.js.map +0 -1
- package/dist/domain/entities/query.d.ts +0 -17
- package/dist/domain/entities/query.d.ts.map +0 -1
- package/dist/domain/entities/query.js.map +0 -1
- package/dist/domain/entities/task.d.ts +0 -152
- package/dist/domain/entities/task.d.ts.map +0 -1
- package/dist/domain/entities/task.js.map +0 -1
- package/dist/domain/errors/embeddings-not-found-error.d.ts +0 -9
- package/dist/domain/errors/embeddings-not-found-error.d.ts.map +0 -1
- package/dist/domain/errors/embeddings-not-found-error.js.map +0 -1
- package/dist/domain/index.d.ts +0 -16
- package/dist/domain/index.d.ts.map +0 -1
- package/dist/domain/index.js.map +0 -1
- package/dist/domain/interfaces/ai-service.interface.d.ts +0 -72
- package/dist/domain/interfaces/ai-service.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/ai-service.interface.js.map +0 -1
- package/dist/domain/interfaces/code-analyzer.interface.d.ts +0 -38
- package/dist/domain/interfaces/code-analyzer.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/code-analyzer.interface.js.map +0 -1
- package/dist/domain/interfaces/context-repository.interface.d.ts +0 -71
- package/dist/domain/interfaces/context-repository.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/context-repository.interface.js +0 -10
- package/dist/domain/interfaces/context-repository.interface.js.map +0 -1
- package/dist/domain/interfaces/decision-repository.interface.d.ts +0 -51
- package/dist/domain/interfaces/decision-repository.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/decision-repository.interface.js.map +0 -1
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +0 -33
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/embedding-repository.interface.js.map +0 -1
- package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts +0 -91
- package/dist/domain/interfaces/knowledge-graph-repository.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/knowledge-graph-repository.interface.js.map +0 -1
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts +0 -50
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/knowledge-preservation-repository.interface.js.map +0 -1
- package/dist/domain/interfaces/memory-repository.interface.d.ts +0 -49
- package/dist/domain/interfaces/memory-repository.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/memory-repository.interface.js.map +0 -1
- package/dist/domain/interfaces/pattern-repository.interface.d.ts +0 -48
- package/dist/domain/interfaces/pattern-repository.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/pattern-repository.interface.js.map +0 -1
- package/dist/domain/interfaces/verification-service.interface.d.ts +0 -20
- package/dist/domain/interfaces/verification-service.interface.d.ts.map +0 -1
- package/dist/domain/interfaces/verification-service.interface.js.map +0 -1
- package/dist/domain/services/codebase-detector.d.ts +0 -18
- package/dist/domain/services/codebase-detector.d.ts.map +0 -1
- package/dist/domain/services/codebase-detector.js.map +0 -1
- package/dist/domain/services/cross-team-pattern-sharing.d.ts +0 -65
- package/dist/domain/services/cross-team-pattern-sharing.d.ts.map +0 -1
- package/dist/domain/services/cross-team-pattern-sharing.js.map +0 -1
- package/dist/domain/services/decision-recorder.d.ts +0 -76
- package/dist/domain/services/decision-recorder.d.ts.map +0 -1
- package/dist/domain/services/decision-recorder.js.map +0 -1
- package/dist/domain/services/decision-retriever.d.ts +0 -75
- package/dist/domain/services/decision-retriever.d.ts.map +0 -1
- package/dist/domain/services/decision-retriever.js.map +0 -1
- package/dist/domain/services/environment-mode-manager.d.ts +0 -12
- package/dist/domain/services/environment-mode-manager.d.ts.map +0 -1
- package/dist/domain/services/environment-mode-manager.js.map +0 -1
- package/dist/domain/services/graded-memory-activation.d.ts +0 -37
- package/dist/domain/services/graded-memory-activation.d.ts.map +0 -1
- package/dist/domain/services/graded-memory-activation.js.map +0 -1
- package/dist/domain/services/knowledge-access.d.ts +0 -63
- package/dist/domain/services/knowledge-access.d.ts.map +0 -1
- package/dist/domain/services/knowledge-access.js.map +0 -1
- package/dist/domain/services/knowledge-extractor.d.ts +0 -54
- package/dist/domain/services/knowledge-extractor.d.ts.map +0 -1
- package/dist/domain/services/knowledge-extractor.js.map +0 -1
- package/dist/domain/services/knowledge-graph-builder.d.ts +0 -70
- package/dist/domain/services/knowledge-graph-builder.d.ts.map +0 -1
- package/dist/domain/services/knowledge-graph-builder.js.map +0 -1
- package/dist/domain/services/knowledge-graph-query.d.ts +0 -69
- package/dist/domain/services/knowledge-graph-query.d.ts.map +0 -1
- package/dist/domain/services/knowledge-graph-query.js.map +0 -1
- package/dist/domain/services/memory-retriever.d.ts +0 -30
- package/dist/domain/services/memory-retriever.d.ts.map +0 -1
- package/dist/domain/services/memory-retriever.js.map +0 -1
- package/dist/domain/services/memory-synthesizer.d.ts +0 -57
- package/dist/domain/services/memory-synthesizer.d.ts.map +0 -1
- package/dist/domain/services/memory-synthesizer.js.map +0 -1
- package/dist/domain/services/pattern-extractor.d.ts +0 -108
- package/dist/domain/services/pattern-extractor.d.ts.map +0 -1
- package/dist/domain/services/pattern-extractor.js.map +0 -1
- package/dist/domain/services/query-intent-classifier.d.ts +0 -16
- package/dist/domain/services/query-intent-classifier.d.ts.map +0 -1
- package/dist/domain/services/query-intent-classifier.js.map +0 -1
- package/dist/domain/services/react-loop.d.ts +0 -52
- package/dist/domain/services/react-loop.d.ts.map +0 -1
- package/dist/domain/services/react-loop.js.map +0 -1
- package/dist/domain/services/risk-tier-detector.d.ts +0 -17
- package/dist/domain/services/risk-tier-detector.d.ts.map +0 -1
- package/dist/domain/services/risk-tier-detector.js.map +0 -1
- package/dist/edit.d.ts +0 -26
- package/dist/edit.d.ts 2.map +0 -1
- package/dist/edit.d.ts.map +0 -1
- package/dist/edit.js.map +0 -1
- package/dist/embed.d 2.ts +0 -14
- package/dist/embed.d.ts +0 -14
- package/dist/embed.d.ts.map +0 -1
- package/dist/embed.js.map +0 -1
- package/dist/error-handler.d 2.ts +0 -77
- package/dist/error-handler.d.ts +0 -77
- package/dist/error-handler.d.ts.map +0 -1
- package/dist/error-handler.js.map +0 -1
- package/dist/formatter 2.js +0 -168
- package/dist/formatter.d.ts +0 -25
- package/dist/formatter.d.ts 2.map +0 -1
- package/dist/formatter.d.ts.map +0 -1
- package/dist/formatter.js.map +0 -1
- package/dist/git 2.js +0 -198
- package/dist/git.d 2.ts +0 -55
- package/dist/git.d.ts +0 -55
- package/dist/git.d.ts.map +0 -1
- package/dist/git.js.map +0 -1
- package/dist/index 2.d.ts +0 -16
- package/dist/index 2.d.ts.map +0 -1
- package/dist/index 2.js +0 -429
- package/dist/index 2.js.map +0 -1
- package/dist/index-backup-before-lazy-loading.d.ts +0 -3
- package/dist/index-backup-before-lazy-loading.d.ts.map +0 -1
- package/dist/index-backup-before-lazy-loading.js +0 -1551
- package/dist/index-backup-before-lazy-loading.js.map +0 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.d.ts 2.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js 2.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts +0 -71
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +0 -1
- package/dist/infrastructure/ai/cohere-ai-service.js.map +0 -1
- package/dist/infrastructure/ai/command-r-evaluation.d.ts +0 -42
- package/dist/infrastructure/ai/command-r-evaluation.d.ts.map +0 -1
- package/dist/infrastructure/ai/command-r-evaluation.js.map +0 -1
- package/dist/infrastructure/ai/model-config.d.ts +0 -47
- package/dist/infrastructure/ai/model-config.d.ts.map +0 -1
- package/dist/infrastructure/ai/model-config.js.map +0 -1
- package/dist/infrastructure/ai/provider-ai-service.d.ts +0 -67
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +0 -1
- package/dist/infrastructure/ai/provider-ai-service.js.map +0 -1
- package/dist/infrastructure/cache/embedding-cache.d.ts +0 -58
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +0 -1
- package/dist/infrastructure/cache/embedding-cache.js.map +0 -1
- package/dist/infrastructure/cache/query-result-cache.d.ts +0 -27
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +0 -1
- package/dist/infrastructure/cache/query-result-cache.js.map +0 -1
- package/dist/infrastructure/cache/response-cache.d.ts +0 -18
- package/dist/infrastructure/cache/response-cache.d.ts.map +0 -1
- package/dist/infrastructure/cache/response-cache.js.map +0 -1
- package/dist/infrastructure/cache/security-scan-cache.d.ts +0 -16
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +0 -1
- package/dist/infrastructure/cache/security-scan-cache.js.map +0 -1
- package/dist/infrastructure/chunking/ast-code-chunker.d.ts +0 -12
- package/dist/infrastructure/chunking/ast-code-chunker.d.ts.map +0 -1
- package/dist/infrastructure/chunking/ast-code-chunker.js.map +0 -1
- package/dist/infrastructure/chunking/code-aware-chunker.d.ts +0 -63
- package/dist/infrastructure/chunking/code-aware-chunker.d.ts.map +0 -1
- package/dist/infrastructure/chunking/code-aware-chunker.js.map +0 -1
- package/dist/infrastructure/completion/bash-completion.d.ts +0 -7
- package/dist/infrastructure/completion/bash-completion.d.ts.map +0 -1
- package/dist/infrastructure/completion/bash-completion.js.map +0 -1
- package/dist/infrastructure/completion/fish-completion.d.ts +0 -7
- package/dist/infrastructure/completion/fish-completion.d.ts.map +0 -1
- package/dist/infrastructure/completion/fish-completion.js.map +0 -1
- package/dist/infrastructure/completion/zsh-completion.d.ts +0 -7
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +0 -1
- package/dist/infrastructure/completion/zsh-completion.js.map +0 -1
- package/dist/infrastructure/config/config-manager.d.ts +0 -158
- package/dist/infrastructure/config/config-manager.d.ts.map +0 -1
- package/dist/infrastructure/config/config-manager.js.map +0 -1
- package/dist/infrastructure/context/context-compressor.d.ts +0 -94
- package/dist/infrastructure/context/context-compressor.d.ts.map +0 -1
- package/dist/infrastructure/context/context-compressor.js.map +0 -1
- package/dist/infrastructure/context/conversation-context.d.ts +0 -82
- package/dist/infrastructure/context/conversation-context.d.ts.map +0 -1
- package/dist/infrastructure/context/conversation-context.js.map +0 -1
- package/dist/infrastructure/context/direct-context-provider.d.ts +0 -18
- package/dist/infrastructure/context/direct-context-provider.d.ts.map +0 -1
- package/dist/infrastructure/context/direct-context-provider.js +0 -222
- package/dist/infrastructure/context/direct-context-provider.js.map +0 -1
- package/dist/infrastructure/context/git-context-provider.d.ts +0 -30
- package/dist/infrastructure/context/git-context-provider.d.ts.map +0 -1
- package/dist/infrastructure/context/git-context-provider.js +0 -140
- package/dist/infrastructure/context/git-context-provider.js.map +0 -1
- package/dist/infrastructure/context/project-context-loader.d.ts +0 -35
- package/dist/infrastructure/context/project-context-loader.d.ts.map +0 -1
- package/dist/infrastructure/context/project-context-loader.js +0 -184
- package/dist/infrastructure/context/project-context-loader.js.map +0 -1
- package/dist/infrastructure/context/session-manager.d.ts +0 -42
- package/dist/infrastructure/context/session-manager.d.ts.map +0 -1
- package/dist/infrastructure/context/session-manager.js.map +0 -1
- package/dist/infrastructure/cost/cost-tracker.d.ts +0 -91
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +0 -1
- package/dist/infrastructure/cost/cost-tracker.js.map +0 -1
- package/dist/infrastructure/cost/session-token-tracker.d.ts +0 -68
- package/dist/infrastructure/cost/session-token-tracker.d.ts.map +0 -1
- package/dist/infrastructure/cost/session-token-tracker.js +0 -178
- package/dist/infrastructure/cost/session-token-tracker.js.map +0 -1
- package/dist/infrastructure/cost-calculator.d.ts +0 -34
- package/dist/infrastructure/cost-calculator.d.ts.map +0 -1
- package/dist/infrastructure/cost-calculator.js +0 -145
- package/dist/infrastructure/cost-calculator.js.map +0 -1
- package/dist/infrastructure/cost-estimator.d.ts +0 -48
- package/dist/infrastructure/cost-estimator.d.ts.map +0 -1
- package/dist/infrastructure/cost-estimator.js +0 -201
- package/dist/infrastructure/cost-estimator.js.map +0 -1
- package/dist/infrastructure/file-scanner/file-scanner.d.ts +0 -31
- package/dist/infrastructure/file-scanner/file-scanner.d.ts.map +0 -1
- package/dist/infrastructure/file-scanner/file-scanner.js.map +0 -1
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts +0 -105
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +0 -1
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +0 -1
- package/dist/infrastructure/governance/policy-as-code.d.ts +0 -88
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +0 -1
- package/dist/infrastructure/governance/policy-as-code.js.map +0 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +0 -136
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +0 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +0 -1
- package/dist/infrastructure/index.d.ts +0 -7
- package/dist/infrastructure/index.d.ts.map +0 -1
- package/dist/infrastructure/index.js.map +0 -1
- package/dist/infrastructure/observability/execution-tracer.d.ts +0 -130
- package/dist/infrastructure/observability/execution-tracer.d.ts.map +0 -1
- package/dist/infrastructure/observability/execution-tracer.js.map +0 -1
- package/dist/infrastructure/observability/prompt-versioner.d.ts +0 -67
- package/dist/infrastructure/observability/prompt-versioner.d.ts.map +0 -1
- package/dist/infrastructure/observability/prompt-versioner.js.map +0 -1
- package/dist/infrastructure/protocols/a2a-metadata.d.ts +0 -278
- package/dist/infrastructure/protocols/a2a-metadata.d.ts.map +0 -1
- package/dist/infrastructure/protocols/a2a-metadata.js.map +0 -1
- package/dist/infrastructure/protocols/a2a-protocol.d.ts +0 -132
- package/dist/infrastructure/protocols/a2a-protocol.d.ts.map +0 -1
- package/dist/infrastructure/protocols/a2a-protocol.js.map +0 -1
- package/dist/infrastructure/protocols/mcp-oauth.d.ts +0 -91
- package/dist/infrastructure/protocols/mcp-oauth.d.ts.map +0 -1
- package/dist/infrastructure/protocols/mcp-oauth.js.map +0 -1
- package/dist/infrastructure/protocols/mcp-server.d.ts +0 -126
- package/dist/infrastructure/protocols/mcp-server.d.ts.map +0 -1
- package/dist/infrastructure/protocols/mcp-server.js.map +0 -1
- package/dist/infrastructure/protocols/streaming-handler.d.ts +0 -57
- package/dist/infrastructure/protocols/streaming-handler.d.ts.map +0 -1
- package/dist/infrastructure/protocols/streaming-handler.js.map +0 -1
- package/dist/infrastructure/providers/cohere-provider.d.ts +0 -39
- package/dist/infrastructure/providers/cohere-provider.d.ts.map +0 -1
- package/dist/infrastructure/providers/cohere-provider.js.map +0 -1
- package/dist/infrastructure/providers/fake-provider.d.ts +0 -43
- package/dist/infrastructure/providers/fake-provider.d.ts.map +0 -1
- package/dist/infrastructure/providers/fake-provider.js.map +0 -1
- package/dist/infrastructure/providers/local-llm-provider.d.ts +0 -49
- package/dist/infrastructure/providers/local-llm-provider.d.ts.map +0 -1
- package/dist/infrastructure/providers/local-llm-provider.js.map +0 -1
- package/dist/infrastructure/providers/model-config.types.d.ts +0 -70
- package/dist/infrastructure/providers/model-config.types.d.ts.map +0 -1
- package/dist/infrastructure/providers/model-config.types.js.map +0 -1
- package/dist/infrastructure/providers/model-provider.interface.d.ts +0 -113
- package/dist/infrastructure/providers/model-provider.interface.d.ts.map +0 -1
- package/dist/infrastructure/providers/model-provider.interface.js.map +0 -1
- package/dist/infrastructure/providers/openai-provider.d.ts +0 -38
- package/dist/infrastructure/providers/openai-provider.d.ts.map +0 -1
- package/dist/infrastructure/providers/openai-provider.js.map +0 -1
- package/dist/infrastructure/providers/openrouter-provider.d.ts +0 -42
- package/dist/infrastructure/providers/openrouter-provider.d.ts.map +0 -1
- package/dist/infrastructure/providers/openrouter-provider.js.map +0 -1
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts +0 -48
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +0 -1
- package/dist/infrastructure/providers/operation-provider-resolver.js.map +0 -1
- package/dist/infrastructure/providers/provider-config-loader.d.ts +0 -37
- package/dist/infrastructure/providers/provider-config-loader.d.ts.map +0 -1
- package/dist/infrastructure/providers/provider-config-loader.js.map +0 -1
- package/dist/infrastructure/providers/provider-registry.d.ts +0 -53
- package/dist/infrastructure/providers/provider-registry.d.ts.map +0 -1
- package/dist/infrastructure/providers/provider-registry.js.map +0 -1
- package/dist/infrastructure/security/ai-sast-scanner.d.ts +0 -59
- package/dist/infrastructure/security/ai-sast-scanner.d.ts.map +0 -1
- package/dist/infrastructure/security/ai-sast-scanner.js.map +0 -1
- package/dist/infrastructure/security/docker-sandbox.d.ts +0 -57
- package/dist/infrastructure/security/docker-sandbox.d.ts.map +0 -1
- package/dist/infrastructure/security/docker-sandbox.js.map +0 -1
- package/dist/infrastructure/security/enhanced-security-gate.d.ts +0 -66
- package/dist/infrastructure/security/enhanced-security-gate.d.ts.map +0 -1
- package/dist/infrastructure/security/enhanced-security-gate.js.map +0 -1
- package/dist/infrastructure/security/input-validator.d.ts +0 -46
- package/dist/infrastructure/security/input-validator.d.ts.map +0 -1
- package/dist/infrastructure/security/input-validator.js.map +0 -1
- package/dist/infrastructure/security/license-scanner.d.ts +0 -55
- package/dist/infrastructure/security/license-scanner.d.ts.map +0 -1
- package/dist/infrastructure/security/license-scanner.js.map +0 -1
- package/dist/infrastructure/security/provider-bias-detector.d.ts +0 -53
- package/dist/infrastructure/security/provider-bias-detector.d.ts.map +0 -1
- package/dist/infrastructure/security/provider-bias-detector.js.map +0 -1
- package/dist/infrastructure/security/sandbox-executor.d.ts +0 -34
- package/dist/infrastructure/security/sandbox-executor.d.ts.map +0 -1
- package/dist/infrastructure/security/sandbox-executor.js.map +0 -1
- package/dist/infrastructure/serialization/toon-serializer.d.ts +0 -45
- package/dist/infrastructure/serialization/toon-serializer.d.ts.map +0 -1
- package/dist/infrastructure/serialization/toon-serializer.js.map +0 -1
- package/dist/infrastructure/storage/embeddings-path.d.ts +0 -18
- package/dist/infrastructure/storage/embeddings-path.d.ts.map +0 -1
- package/dist/infrastructure/storage/embeddings-path.js.map +0 -1
- package/dist/infrastructure/storage/memory-stream-service.d.ts +0 -47
- package/dist/infrastructure/storage/memory-stream-service.d.ts.map +0 -1
- package/dist/infrastructure/storage/memory-stream-service.js.map +0 -1
- package/dist/infrastructure/storage/plan-repository.d.ts +0 -40
- package/dist/infrastructure/storage/plan-repository.d.ts.map +0 -1
- package/dist/infrastructure/storage/plan-repository.js.map +0 -1
- package/dist/infrastructure/storage/sqlite-context-repository.d.ts +0 -95
- package/dist/infrastructure/storage/sqlite-context-repository.d.ts.map +0 -1
- package/dist/infrastructure/storage/sqlite-context-repository.js +0 -467
- package/dist/infrastructure/storage/sqlite-context-repository.js.map +0 -1
- package/dist/infrastructure/storage/sqlite-decision-repository.d.ts +0 -29
- package/dist/infrastructure/storage/sqlite-decision-repository.d.ts.map +0 -1
- package/dist/infrastructure/storage/sqlite-decision-repository.js.map +0 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +0 -47
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +0 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +0 -1
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts +0 -41
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.d.ts.map +0 -1
- package/dist/infrastructure/storage/sqlite-knowledge-graph-repository.js.map +0 -1
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts +0 -29
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.d.ts.map +0 -1
- package/dist/infrastructure/storage/sqlite-knowledge-preservation-repository.js.map +0 -1
- package/dist/infrastructure/storage/sqlite-memory-repository.d.ts +0 -40
- package/dist/infrastructure/storage/sqlite-memory-repository.d.ts.map +0 -1
- package/dist/infrastructure/storage/sqlite-memory-repository.js.map +0 -1
- package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts +0 -25
- package/dist/infrastructure/storage/sqlite-pattern-repository.d.ts.map +0 -1
- package/dist/infrastructure/storage/sqlite-pattern-repository.js.map +0 -1
- package/dist/infrastructure/storage/task-helpers.d.ts +0 -69
- package/dist/infrastructure/storage/task-helpers.d.ts.map +0 -1
- package/dist/infrastructure/storage/task-helpers.js.map +0 -1
- package/dist/infrastructure/storage/task-repository.d.ts +0 -67
- package/dist/infrastructure/storage/task-repository.d.ts.map +0 -1
- package/dist/infrastructure/storage/task-repository.js.map +0 -1
- package/dist/infrastructure/telemetry/telemetry-service.d.ts +0 -74
- package/dist/infrastructure/telemetry/telemetry-service.d.ts.map +0 -1
- package/dist/infrastructure/telemetry/telemetry-service.js.map +0 -1
- package/dist/infrastructure/ux/appropriate-friction.d.ts +0 -77
- package/dist/infrastructure/ux/appropriate-friction.d.ts.map +0 -1
- package/dist/infrastructure/ux/appropriate-friction.js.map +0 -1
- package/dist/infrastructure/ux/bi-directional-learning.d.ts +0 -131
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +0 -1
- package/dist/infrastructure/ux/bi-directional-learning.js.map +0 -1
- package/dist/infrastructure/ux/capability-boundaries.d.ts +0 -22
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +0 -1
- package/dist/infrastructure/ux/capability-boundaries.js.map +0 -1
- package/dist/infrastructure/ux/cli-style-guide.d.ts +0 -105
- package/dist/infrastructure/ux/cli-style-guide.d.ts.map +0 -1
- package/dist/infrastructure/ux/cli-style-guide.js +0 -220
- package/dist/infrastructure/ux/cli-style-guide.js.map +0 -1
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +0 -21
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +0 -1
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +0 -1
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +0 -11
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +0 -1
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +0 -1
- package/dist/infrastructure/ux/expectation-management.d.ts +0 -98
- package/dist/infrastructure/ux/expectation-management.d.ts.map +0 -1
- package/dist/infrastructure/ux/expectation-management.js.map +0 -1
- package/dist/infrastructure/ux/feature-discovery.d.ts +0 -17
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +0 -1
- package/dist/infrastructure/ux/feature-discovery.js.map +0 -1
- package/dist/infrastructure/ux/feedback-prompt.d.ts +0 -26
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +0 -1
- package/dist/infrastructure/ux/feedback-prompt.js.map +0 -1
- package/dist/infrastructure/ux/hitl-validation.d.ts +0 -139
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +0 -1
- package/dist/infrastructure/ux/hitl-validation.js.map +0 -1
- package/dist/infrastructure/ux/progress-indicator.d.ts +0 -53
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +0 -1
- package/dist/infrastructure/ux/progress-indicator.js.map +0 -1
- package/dist/infrastructure/ux/progressive-disclosure.d.ts +0 -84
- package/dist/infrastructure/ux/progressive-disclosure.d.ts.map +0 -1
- package/dist/infrastructure/ux/progressive-disclosure.js.map +0 -1
- package/dist/infrastructure/ux/review-checkpoint.d.ts +0 -37
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +0 -1
- package/dist/infrastructure/ux/review-checkpoint.js.map +0 -1
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +0 -22
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +0 -1
- package/dist/infrastructure/ux/staged-feature-intro.js.map +0 -1
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +0 -20
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +0 -1
- package/dist/infrastructure/ux/syntax-highlighter.js.map +0 -1
- package/dist/infrastructure/ux/team-standards.d.ts +0 -94
- package/dist/infrastructure/ux/team-standards.d.ts.map +0 -1
- package/dist/infrastructure/ux/team-standards.js.map +0 -1
- package/dist/infrastructure/validation/agent-feedback.d.ts +0 -57
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +0 -1
- package/dist/infrastructure/validation/agent-feedback.js.map +0 -1
- package/dist/infrastructure/validation/agent-validation-helper.d.ts +0 -75
- package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +0 -1
- package/dist/infrastructure/validation/agent-validation-helper.js.map +0 -1
- package/dist/infrastructure/validation/hallucination-detector.d.ts +0 -121
- package/dist/infrastructure/validation/hallucination-detector.d.ts.map +0 -1
- package/dist/infrastructure/validation/hallucination-detector.js +0 -388
- package/dist/infrastructure/validation/hallucination-detector.js.map +0 -1
- package/dist/infrastructure/validation/review-handler.d.ts +0 -26
- package/dist/infrastructure/validation/review-handler.d.ts.map +0 -1
- package/dist/infrastructure/validation/review-handler.js.map +0 -1
- package/dist/infrastructure/validation/summary-aggregator.d.ts +0 -45
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +0 -1
- package/dist/infrastructure/validation/summary-aggregator.js.map +0 -1
- package/dist/infrastructure/validation/summary-extractor.d.ts +0 -24
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +0 -1
- package/dist/infrastructure/validation/summary-extractor.js.map +0 -1
- package/dist/infrastructure/validation/trace-summary.d.ts +0 -45
- package/dist/infrastructure/validation/trace-summary.d.ts.map +0 -1
- package/dist/infrastructure/validation/trace-summary.js.map +0 -1
- package/dist/infrastructure/verification/verification-service.d.ts +0 -12
- package/dist/infrastructure/verification/verification-service.d.ts.map +0 -1
- package/dist/infrastructure/verification/verification-service.js.map +0 -1
- package/dist/infrastructure/xai/attention-visualizer.d.ts +0 -71
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +0 -1
- package/dist/infrastructure/xai/attention-visualizer.js.map +0 -1
- package/dist/infrastructure/xai/cot-visualizer.d.ts +0 -103
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +0 -1
- package/dist/infrastructure/xai/cot-visualizer.js.map +0 -1
- package/dist/infrastructure/xai/decision-tree-log.d.ts +0 -100
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +0 -1
- package/dist/infrastructure/xai/decision-tree-log.js.map +0 -1
- package/dist/infrastructure/xai/interactive-xai.d.ts +0 -104
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +0 -1
- package/dist/infrastructure/xai/interactive-xai.js.map +0 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +0 -77
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +0 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +0 -1
- package/dist/intelligent-retrieval 2.js +0 -272
- package/dist/intelligent-retrieval.d.ts +0 -41
- package/dist/intelligent-retrieval.d.ts 2.map +0 -1
- package/dist/intelligent-retrieval.d.ts.map +0 -1
- package/dist/intelligent-retrieval.js.map +0 -1
- package/dist/intent/classifier.d.ts +0 -6
- package/dist/intent/classifier.d.ts.map +0 -1
- package/dist/intent/classifier.js.map +0 -1
- package/dist/intent/context.d.ts +0 -4
- package/dist/intent/context.d.ts.map +0 -1
- package/dist/intent/context.js.map +0 -1
- package/dist/iterative-refinement.d.ts +0 -31
- package/dist/iterative-refinement.d.ts.map +0 -1
- package/dist/iterative-refinement.js.map +0 -1
- package/dist/learning.d.ts +0 -69
- package/dist/learning.d.ts.map +0 -1
- package/dist/learning.js.map +0 -1
- package/dist/log.d.ts +0 -4
- package/dist/log.d.ts.map +0 -1
- package/dist/log.js 2.map +0 -1
- package/dist/log.js.map +0 -1
- package/dist/migrate.d.ts +0 -33
- package/dist/migrate.d.ts.map +0 -1
- package/dist/migrate.js 2.map +0 -1
- package/dist/migrate.js.map +0 -1
- package/dist/monitoring.d.ts +0 -75
- package/dist/monitoring.d.ts.map +0 -1
- package/dist/monitoring.js.map +0 -1
- package/dist/parallel-processor.d 2.ts +0 -44
- package/dist/parallel-processor.d.ts +0 -44
- package/dist/parallel-processor.d.ts.map +0 -1
- package/dist/parallel-processor.js.map +0 -1
- package/dist/planner.d.ts +0 -47
- package/dist/planner.d.ts.map +0 -1
- package/dist/planner.js.map +0 -1
- package/dist/policy.d 2.ts +0 -3
- package/dist/policy.d.ts +0 -3
- package/dist/policy.d.ts.map +0 -1
- package/dist/policy.js.map +0 -1
- package/dist/presentation/cli/commands/ask-command.d.ts +0 -9
- package/dist/presentation/cli/commands/ask-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/ask-command.js.map +0 -1
- package/dist/presentation/cli/commands/audit-command.d.ts +0 -13
- package/dist/presentation/cli/commands/audit-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/audit-command.js +0 -96
- package/dist/presentation/cli/commands/audit-command.js.map +0 -1
- package/dist/presentation/cli/commands/config-command.d.ts +0 -9
- package/dist/presentation/cli/commands/config-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/config-command.js.map +0 -1
- package/dist/presentation/cli/commands/context-command.d.ts +0 -32
- package/dist/presentation/cli/commands/context-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/context-command.js +0 -295
- package/dist/presentation/cli/commands/context-command.js.map +0 -1
- package/dist/presentation/cli/commands/context-helper.d.ts +0 -16
- package/dist/presentation/cli/commands/context-helper.d.ts.map +0 -1
- package/dist/presentation/cli/commands/context-helper.js +0 -88
- package/dist/presentation/cli/commands/context-helper.js.map +0 -1
- package/dist/presentation/cli/commands/cost-command.d.ts +0 -8
- package/dist/presentation/cli/commands/cost-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/cost-command.js.map +0 -1
- package/dist/presentation/cli/commands/decision-command.d.ts +0 -12
- package/dist/presentation/cli/commands/decision-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/decision-command.js.map +0 -1
- package/dist/presentation/cli/commands/docs-command.d.ts +0 -14
- package/dist/presentation/cli/commands/docs-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/docs-command.js.map +0 -1
- package/dist/presentation/cli/commands/fix-command.d.ts +0 -15
- package/dist/presentation/cli/commands/fix-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/fix-command.js.map +0 -1
- package/dist/presentation/cli/commands/help-command.d.ts +0 -9
- package/dist/presentation/cli/commands/help-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/help-command.js.map +0 -1
- package/dist/presentation/cli/commands/knowledge-command.d.ts +0 -13
- package/dist/presentation/cli/commands/knowledge-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/knowledge-command.js.map +0 -1
- package/dist/presentation/cli/commands/learning-dashboard-command.d.ts +0 -8
- package/dist/presentation/cli/commands/learning-dashboard-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/learning-dashboard-command.js.map +0 -1
- package/dist/presentation/cli/commands/models-command.d.ts +0 -13
- package/dist/presentation/cli/commands/models-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/models-command.js.map +0 -1
- package/dist/presentation/cli/commands/orchestrate-command.d.ts +0 -10
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/orchestrate-command.js.map +0 -1
- package/dist/presentation/cli/commands/plan-command.d.ts +0 -9
- package/dist/presentation/cli/commands/plan-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/plan-command.js.map +0 -1
- package/dist/presentation/cli/commands/product-command.d.ts +0 -14
- package/dist/presentation/cli/commands/product-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/product-command.js.map +0 -1
- package/dist/presentation/cli/commands/react-command.d.ts +0 -8
- package/dist/presentation/cli/commands/react-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/react-command.js.map +0 -1
- package/dist/presentation/cli/commands/review-command.d.ts +0 -14
- package/dist/presentation/cli/commands/review-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/review-command.js.map +0 -1
- package/dist/presentation/cli/commands/run-command.d.ts +0 -13
- package/dist/presentation/cli/commands/run-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/run-command.js.map +0 -1
- package/dist/presentation/cli/commands/setup-command.d.ts +0 -10
- package/dist/presentation/cli/commands/setup-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/setup-command.js.map +0 -1
- package/dist/presentation/cli/commands/smart-command.d.ts +0 -11
- package/dist/presentation/cli/commands/smart-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/smart-command.js.map +0 -1
- package/dist/presentation/cli/commands/status-command.d.ts +0 -14
- package/dist/presentation/cli/commands/status-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/status-command.js.map +0 -1
- package/dist/presentation/cli/commands/suggest-command.d.ts +0 -11
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/suggest-command.js.map +0 -1
- package/dist/presentation/cli/commands/trace-command.d.ts +0 -8
- package/dist/presentation/cli/commands/trace-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/trace-command.js.map +0 -1
- package/dist/presentation/cli/commands/trust-command.d.ts +0 -28
- package/dist/presentation/cli/commands/trust-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/trust-command.js.map +0 -1
- package/dist/presentation/cli/commands/undo-command.d.ts +0 -8
- package/dist/presentation/cli/commands/undo-command.d.ts.map +0 -1
- package/dist/presentation/cli/commands/undo-command.js.map +0 -1
- package/dist/presentation/cli/error-display.d.ts +0 -25
- package/dist/presentation/cli/error-display.d.ts.map +0 -1
- package/dist/presentation/cli/error-display.js.map +0 -1
- package/dist/query-optimizer.d.ts +0 -32
- package/dist/query-optimizer.d.ts.map +0 -1
- package/dist/query-optimizer.js.map +0 -1
- package/dist/refactor.d.ts +0 -27
- package/dist/refactor.d.ts.map +0 -1
- package/dist/refactor.js.map +0 -1
- package/dist/review 2.js +0 -206
- package/dist/review.d.ts +0 -31
- package/dist/review.d.ts.map +0 -1
- package/dist/review.js.map +0 -1
- package/dist/search.d.ts +0 -19
- package/dist/search.d.ts.map +0 -1
- package/dist/search.js 2.map +0 -1
- package/dist/search.js.map +0 -1
- package/dist/session 2.js +0 -593
- package/dist/session.d.ts +0 -17
- package/dist/session.d.ts 2.map +0 -1
- package/dist/session.d.ts.map +0 -1
- package/dist/session.js.map +0 -1
- package/dist/task-verification 2.js +0 -336
- package/dist/task-verification.d.ts +0 -39
- package/dist/task-verification.d.ts 2.map +0 -1
- package/dist/task-verification.d.ts.map +0 -1
- package/dist/task-verification.js.map +0 -1
- package/dist/test-minimal.d.ts +0 -2
- package/dist/test-minimal.d.ts.map +0 -1
- package/dist/test-minimal.js +0 -2
- package/dist/test-minimal.js.map +0 -1
- package/dist/testgen.d.ts +0 -24
- package/dist/testgen.d.ts.map +0 -1
- package/dist/testgen.js 2.map +0 -1
- package/dist/testgen.js.map +0 -1
- package/dist/token-optimizer.d 2.ts +0 -20
- package/dist/token-optimizer.d.ts +0 -20
- package/dist/token-optimizer.d.ts.map +0 -1
- package/dist/token-optimizer.js.map +0 -1
- package/dist/tools/bash.d.ts +0 -53
- package/dist/tools/bash.d.ts.map +0 -1
- package/dist/tools/bash.js.map +0 -1
- package/dist/tools/edit.d.ts +0 -48
- package/dist/tools/edit.d.ts.map +0 -1
- package/dist/tools/edit.js.map +0 -1
- package/dist/tools/executor.d.ts +0 -29
- package/dist/tools/executor.d.ts.map +0 -1
- package/dist/tools/executor.js.map +0 -1
- package/dist/tools/git-tool.d.ts +0 -87
- package/dist/tools/git-tool.d.ts.map +0 -1
- package/dist/tools/git-tool.js.map +0 -1
- package/dist/tools/parser.d.ts +0 -33
- package/dist/tools/parser.d.ts.map +0 -1
- package/dist/tools/parser.js.map +0 -1
- package/dist/tools/registry.d.ts +0 -74
- package/dist/tools/registry.d.ts.map +0 -1
- package/dist/tools/registry.js.map +0 -1
- package/dist/tools/search.d.ts +0 -41
- package/dist/tools/search.d.ts.map +0 -1
- package/dist/tools/search.js.map +0 -1
- package/dist/types.d.ts +0 -36
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/ui.d.ts +0 -60
- package/dist/ui.d.ts 2.map +0 -1
- package/dist/ui.d.ts.map +0 -1
- package/dist/ui.js.map +0 -1
- package/dist/utils/check-api-status.d.ts +0 -12
- package/dist/utils/check-api-status.d.ts.map +0 -1
- package/dist/utils/check-api-status.js.map +0 -1
- package/dist/utils/debug.d.ts +0 -7
- package/dist/utils/debug.d.ts.map +0 -1
- package/dist/utils/debug.js +0 -24
- package/dist/utils/debug.js.map +0 -1
- package/dist/utils/diff-parser.d.ts +0 -22
- package/dist/utils/diff-parser.d.ts.map +0 -1
- package/dist/utils/diff-parser.js.map +0 -1
- package/dist/utils/provider-check.d.ts +0 -21
- package/dist/utils/provider-check.d.ts.map +0 -1
- package/dist/utils/provider-check.js +0 -124
- package/dist/utils/provider-check.js.map +0 -1
- package/dist/utils/version.d.ts +0 -21
- package/dist/utils/version.d.ts.map +0 -1
- package/dist/utils/version.js.map +0 -1
- package/dist/verification/backup.d.ts +0 -30
- package/dist/verification/backup.d.ts.map +0 -1
- package/dist/verification/backup.js.map +0 -1
- package/dist/verification/compiler.d.ts +0 -20
- package/dist/verification/compiler.d.ts.map +0 -1
- package/dist/verification/compiler.js.map +0 -1
- package/dist/verification/index.d.ts +0 -59
- package/dist/verification/index.d.ts.map +0 -1
- package/dist/verification/index.js.map +0 -1
- package/dist/verification/test-runner.d.ts +0 -27
- package/dist/verification/test-runner.d.ts.map +0 -1
- package/dist/verification/test-runner.js.map +0 -1
- package/dist/verify_db.d.ts +0 -2
- package/dist/verify_db.d.ts.map +0 -1
- package/dist/verify_db.js +0 -52
- package/dist/verify_db.js 2.map +0 -1
- package/dist/verify_db.js.map +0 -1
|
@@ -1,32 +1,204 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLI Command:
|
|
3
|
-
* Show a concise agent reliability snapshot
|
|
2
|
+
* CLI Command: status
|
|
4
3
|
*
|
|
5
|
-
*
|
|
4
|
+
* Growth/audit surface — personal security dashboard.
|
|
5
|
+
* Shows what Claude Code has been doing, what got blocked, and how your project is doing.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* codehere status # full dashboard
|
|
9
|
+
* codehere status --json # machine-readable output
|
|
10
|
+
* codehere status --trust # include a quick trust scan
|
|
6
11
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
12
|
+
import { readFileSync, existsSync } from 'fs';
|
|
13
|
+
import { join } from 'path';
|
|
14
|
+
import { homedir } from 'os';
|
|
15
|
+
import { colors, newline, sectionHeader } from '../../../ui.js';
|
|
9
16
|
import { getVersion } from '../../../utils/version.js';
|
|
10
|
-
import {
|
|
11
|
-
|
|
17
|
+
import { loadProductContext } from '../../../infrastructure/config/product-context.js';
|
|
18
|
+
import { AUDIT_FILE } from '../../../infrastructure/hooks/claude-sdk-hook.js';
|
|
19
|
+
import { analyzeSessions, detectAmplificationAlerts, formatDuration } from '../../../infrastructure/hooks/session-analyzer.js';
|
|
20
|
+
function readAuditLog(maxLines = 5000) {
|
|
21
|
+
if (!existsSync(AUDIT_FILE))
|
|
22
|
+
return [];
|
|
23
|
+
try {
|
|
24
|
+
const lines = readFileSync(AUDIT_FILE, 'utf-8').split('\n').filter(Boolean);
|
|
25
|
+
const recent = lines.slice(-maxLines);
|
|
26
|
+
return recent.map(l => {
|
|
27
|
+
try {
|
|
28
|
+
return JSON.parse(l);
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
}).filter(Boolean);
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return [];
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function withinHours(timestamp, hours) {
|
|
40
|
+
return Date.now() - new Date(timestamp).getTime() < hours * 3600 * 1000;
|
|
41
|
+
}
|
|
42
|
+
function timeAgo(timestamp) {
|
|
43
|
+
const ms = Date.now() - new Date(timestamp).getTime();
|
|
44
|
+
const mins = Math.floor(ms / 60000);
|
|
45
|
+
if (mins < 60)
|
|
46
|
+
return `${mins}m ago`;
|
|
47
|
+
const hours = Math.floor(mins / 60);
|
|
48
|
+
if (hours < 24)
|
|
49
|
+
return `${hours}h ago`;
|
|
50
|
+
return `${Math.floor(hours / 24)}d ago`;
|
|
51
|
+
}
|
|
52
|
+
// ── helpers ───────────────────────────────────────────────────────────────────
|
|
53
|
+
function extractBlockReason(entry) {
|
|
54
|
+
try {
|
|
55
|
+
const input = JSON.parse(entry.toolInput);
|
|
56
|
+
// Bash: show command description or first 50 chars of command
|
|
57
|
+
if (input.description)
|
|
58
|
+
return String(input.description).substring(0, 50);
|
|
59
|
+
if (input.command)
|
|
60
|
+
return String(input.command).replace(/\n/g, ' ').substring(0, 50);
|
|
61
|
+
// Edit/Write: show filename
|
|
62
|
+
if (input.file_path) {
|
|
63
|
+
const parts = String(input.file_path).split('/');
|
|
64
|
+
return parts.slice(-2).join('/');
|
|
65
|
+
}
|
|
66
|
+
// MultiEdit: show first filename
|
|
67
|
+
if (Array.isArray(input.edits) && input.edits[0]?.file_path) {
|
|
68
|
+
const parts = String(input.edits[0].file_path).split('/');
|
|
69
|
+
return parts.slice(-2).join('/');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
catch { /* parse failed — truncated JSON, try regex */ }
|
|
73
|
+
// Fallback: extract file_path or command from truncated JSON via regex
|
|
74
|
+
const fpMatch = entry.toolInput.match(/"file_path"\s*:\s*"([^"]+)"/);
|
|
75
|
+
if (fpMatch) {
|
|
76
|
+
const parts = fpMatch[1].split('/');
|
|
77
|
+
return parts.slice(-2).join('/');
|
|
78
|
+
}
|
|
79
|
+
const cmdMatch = entry.toolInput.match(/"command"\s*:\s*"([^"]{0,60})"/);
|
|
80
|
+
if (cmdMatch)
|
|
81
|
+
return cmdMatch[1].replace(/\\n/g, ' ').substring(0, 50);
|
|
82
|
+
return 'tool call';
|
|
83
|
+
}
|
|
84
|
+
// ── main command ──────────────────────────────────────────────────────────────
|
|
85
|
+
// ── session drill-down ────────────────────────────────────────────────────────
|
|
86
|
+
function renderSessionDrillDown(sessionId, entries) {
|
|
87
|
+
const sessionEntries = entries.filter(e => e.sessionId === sessionId || e.sessionId?.startsWith(sessionId));
|
|
88
|
+
if (sessionEntries.length === 0) {
|
|
89
|
+
console.log(colors.yellow(`No entries found for session: ${sessionId}`));
|
|
90
|
+
console.log(colors.dim(' Tip: use the first 8+ characters of a session ID from `codehere status --sessions`'));
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const sorted = [...sessionEntries].sort((a, b) => new Date(a.timestamp).getTime() - new Date(b.timestamp).getTime());
|
|
94
|
+
const blocked = sorted.filter(e => e.blocked);
|
|
95
|
+
const critical = sorted.filter(e => e.criticalFindings > 0);
|
|
96
|
+
const durationMs = new Date(sorted[sorted.length - 1].timestamp).getTime() - new Date(sorted[0].timestamp).getTime();
|
|
97
|
+
const toolCounts = {};
|
|
98
|
+
for (const e of sorted) {
|
|
99
|
+
toolCounts[e.toolName] = (toolCounts[e.toolName] ?? 0) + 1;
|
|
100
|
+
}
|
|
101
|
+
sectionHeader(`Session: ${sessionId.substring(0, 16)}…`);
|
|
102
|
+
newline();
|
|
103
|
+
console.log(` ${sorted.length} tool calls · ${blocked.length} blocked · ${critical.length} critical`);
|
|
104
|
+
console.log(` Duration: ${Math.round(durationMs / 1000)}s · Started ${timeAgo(sorted[0].timestamp)}`);
|
|
105
|
+
newline();
|
|
106
|
+
// Tool breakdown
|
|
107
|
+
console.log(colors.bold('Tool breakdown:'));
|
|
108
|
+
const sorted_tools = Object.entries(toolCounts).sort((a, b) => b[1] - a[1]);
|
|
109
|
+
for (const [tool, count] of sorted_tools) {
|
|
110
|
+
const bar = '█'.repeat(Math.min(count, 20));
|
|
111
|
+
const pct = Math.round((count / sorted.length) * 100);
|
|
112
|
+
console.log(` ${tool.padEnd(12)} ${String(count).padStart(3)} ${colors.dim(bar)} ${colors.dim(pct + '%')}`);
|
|
113
|
+
}
|
|
114
|
+
newline();
|
|
115
|
+
// Timeline of blocked calls
|
|
116
|
+
if (blocked.length > 0) {
|
|
117
|
+
console.log(colors.bold('Blocked calls:'));
|
|
118
|
+
for (const entry of blocked) {
|
|
119
|
+
const time = colors.dim(new Date(entry.timestamp).toLocaleTimeString());
|
|
120
|
+
const tool = colors.cyan(entry.toolName.padEnd(12));
|
|
121
|
+
const reason = extractBlockReason(entry);
|
|
122
|
+
const risk = entry.riskScore > 70 ? colors.red(`risk:${entry.riskScore}`) : colors.yellow(`risk:${entry.riskScore}`);
|
|
123
|
+
console.log(` ${colors.red('✗')} ${time} ${tool} ${risk} ${colors.dim(reason)}`);
|
|
124
|
+
}
|
|
125
|
+
newline();
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
console.log(` ${colors.green('✓')} No blocked calls in this session.`);
|
|
129
|
+
newline();
|
|
130
|
+
}
|
|
131
|
+
// Full timeline (last 20)
|
|
132
|
+
const toShow = sorted.slice(-20);
|
|
133
|
+
if (sorted.length > 20) {
|
|
134
|
+
console.log(colors.dim(` (showing last 20 of ${sorted.length} calls)`));
|
|
135
|
+
}
|
|
136
|
+
console.log(colors.bold('Timeline:'));
|
|
137
|
+
for (const entry of toShow) {
|
|
138
|
+
const time = colors.dim(new Date(entry.timestamp).toLocaleTimeString());
|
|
139
|
+
const tool = (entry.blocked ? colors.red : colors.cyan)(entry.toolName.padEnd(12));
|
|
140
|
+
const icon = entry.blocked ? colors.red('✗') : entry.criticalFindings > 0 ? colors.yellow('!') : colors.green('✓');
|
|
141
|
+
const reason = extractBlockReason(entry);
|
|
142
|
+
console.log(` ${icon} ${time} ${tool} ${colors.dim(reason)}`);
|
|
143
|
+
}
|
|
144
|
+
newline();
|
|
145
|
+
// Verdict
|
|
146
|
+
if (blocked.length > 2 && sorted.length > 20) {
|
|
147
|
+
console.log(colors.red(' ⚠ High block rate in a long session — possible prompt injection in multi-agent chain.'));
|
|
148
|
+
}
|
|
149
|
+
else if (blocked.length > 0) {
|
|
150
|
+
console.log(colors.yellow(` ${blocked.length} blocked call${blocked.length !== 1 ? 's' : ''} — review the blocked entries above.`));
|
|
151
|
+
}
|
|
152
|
+
else if (sorted.length > 50) {
|
|
153
|
+
console.log(colors.yellow(` ${sorted.length} calls in one session — check for amplification.`));
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
console.log(colors.green(' Session looks clean.'));
|
|
157
|
+
}
|
|
158
|
+
newline();
|
|
159
|
+
}
|
|
160
|
+
export async function executeStatusCommand(options = {}) {
|
|
161
|
+
const cwd = process.cwd();
|
|
12
162
|
const version = getVersion();
|
|
13
|
-
|
|
163
|
+
const entries = readAuditLog();
|
|
164
|
+
// Session drill-down mode
|
|
165
|
+
if (options.session) {
|
|
166
|
+
renderSessionDrillDown(options.session, entries);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
const last24h = entries.filter(e => withinHours(e.timestamp, 24));
|
|
170
|
+
const last7d = entries.filter(e => withinHours(e.timestamp, 24 * 7));
|
|
171
|
+
const stats = (subset) => ({
|
|
172
|
+
total: subset.length,
|
|
173
|
+
blocked: subset.filter(e => e.blocked).length,
|
|
174
|
+
critical: subset.filter(e => e.criticalFindings > 0).length,
|
|
175
|
+
});
|
|
176
|
+
const s24 = stats(last24h);
|
|
177
|
+
const s7d = stats(last7d);
|
|
178
|
+
const sAll = stats(entries);
|
|
179
|
+
const productCtx = loadProductContext(cwd);
|
|
180
|
+
const hookRunning = existsSync(join(homedir(), '.claude', 'settings.json'));
|
|
181
|
+
const hasSkills = existsSync(join(homedir(), '.claude', 'commands', 'codehere'));
|
|
182
|
+
// ── JSON mode ──────────────────────────────────────────────────────────────
|
|
183
|
+
if (options.json) {
|
|
14
184
|
const result = {
|
|
15
|
-
status: 'ok',
|
|
16
185
|
version,
|
|
186
|
+
status: 'ok',
|
|
187
|
+
hooks: {
|
|
188
|
+
running: hookRunning,
|
|
189
|
+
stats: { last24h: s24, last7d: s7d, allTime: sAll },
|
|
190
|
+
},
|
|
191
|
+
skills: { installed: hasSkills },
|
|
192
|
+
product: productCtx,
|
|
17
193
|
};
|
|
18
|
-
if (options
|
|
194
|
+
if (options.tasks) {
|
|
19
195
|
try {
|
|
196
|
+
const { getTaskRepository } = await import('../../../infrastructure/storage/task-repository.js');
|
|
20
197
|
const taskRepo = getTaskRepository();
|
|
21
198
|
const tasks = await taskRepo.getAll();
|
|
22
199
|
result.tasks = tasks.slice(0, 20).map(t => ({
|
|
23
|
-
id: t.id,
|
|
24
|
-
|
|
25
|
-
status: t.status,
|
|
26
|
-
riskTier: t.riskTier,
|
|
27
|
-
environment: t.environment,
|
|
28
|
-
goal: t.goal,
|
|
29
|
-
createdAt: t.createdAt,
|
|
200
|
+
id: t.id, mode: t.mode, status: t.status,
|
|
201
|
+
riskTier: t.riskTier, environment: t.environment, goal: t.goal, createdAt: t.createdAt,
|
|
30
202
|
}));
|
|
31
203
|
result.taskCount = tasks.length;
|
|
32
204
|
}
|
|
@@ -38,50 +210,128 @@ export async function executeStatusCommand(options) {
|
|
|
38
210
|
console.log(JSON.stringify(result, null, 2));
|
|
39
211
|
return;
|
|
40
212
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
213
|
+
// ── Human dashboard ────────────────────────────────────────────────────────
|
|
214
|
+
sectionHeader('Codehere Status');
|
|
215
|
+
newline();
|
|
216
|
+
// Version + hooks
|
|
217
|
+
const hookStatus = hookRunning
|
|
218
|
+
? colors.green('✓') + ' Hooks running'
|
|
219
|
+
: colors.yellow('⚠') + ' Hooks not installed';
|
|
220
|
+
console.log(` Version: ${version} · Status: Running · ${hookStatus}`);
|
|
221
|
+
newline();
|
|
222
|
+
// Product brain
|
|
223
|
+
if (productCtx) {
|
|
224
|
+
const riskColor = productCtx.riskLevel === 'critical' ? colors.red
|
|
225
|
+
: productCtx.riskLevel === 'high' ? colors.yellow
|
|
226
|
+
: productCtx.riskLevel === 'medium' ? colors.cyan
|
|
227
|
+
: colors.green;
|
|
228
|
+
const parts = [
|
|
229
|
+
colors.bold(productCtx.name),
|
|
230
|
+
`risk: ${riskColor(productCtx.riskLevel)}`,
|
|
231
|
+
productCtx.productionApp ? colors.yellow('production') : '',
|
|
232
|
+
].filter(Boolean);
|
|
233
|
+
console.log(' ' + parts.join(colors.dim(' · ')));
|
|
234
|
+
newline();
|
|
235
|
+
}
|
|
236
|
+
if (entries.length === 0) {
|
|
237
|
+
console.log(colors.dim(' No activity yet. Run Claude Code with hooks installed to start tracking.'));
|
|
238
|
+
newline();
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
// Activity table
|
|
242
|
+
// Pad number BEFORE applying color, so ANSI codes don't break alignment
|
|
243
|
+
const fmtNum = (n, color) => {
|
|
244
|
+
const padded = String(n).padStart(10);
|
|
245
|
+
return color && n > 0 ? color(padded) : colors.dim(padded);
|
|
246
|
+
};
|
|
247
|
+
const labelW = 12;
|
|
248
|
+
const label = (s) => s.padEnd(labelW);
|
|
249
|
+
const header = ` ${label('')}${'Last 24h'.padStart(10)}${'This week'.padStart(10)}${'All time'.padStart(10)}`;
|
|
250
|
+
console.log(colors.dim(header));
|
|
251
|
+
console.log(colors.dim(` ${'-'.repeat(labelW + 30)}`));
|
|
252
|
+
console.log(` ${label('Scans')}${fmtNum(s24.total)}${fmtNum(s7d.total)}${fmtNum(sAll.total)}`);
|
|
253
|
+
console.log(` ${label('Blocked')}${fmtNum(s24.blocked, colors.red)}${fmtNum(s7d.blocked, colors.red)}${fmtNum(sAll.blocked, colors.red)}`);
|
|
254
|
+
if (sAll.critical > 0) {
|
|
255
|
+
console.log(` ${label('Critical')}${fmtNum(s24.critical, colors.red)}${fmtNum(s7d.critical, colors.red)}${fmtNum(sAll.critical, colors.red)}`);
|
|
256
|
+
}
|
|
257
|
+
newline();
|
|
258
|
+
// Recent blocks
|
|
259
|
+
const recentBlocked = [...entries].reverse().filter(e => e.blocked).slice(0, 5);
|
|
260
|
+
if (recentBlocked.length > 0) {
|
|
261
|
+
console.log(colors.dim(' RECENT BLOCKS'));
|
|
262
|
+
for (const entry of recentBlocked) {
|
|
263
|
+
const tool = colors.cyan(entry.toolName.padEnd(10));
|
|
264
|
+
const time = colors.dim(timeAgo(entry.timestamp).padEnd(8));
|
|
265
|
+
const reason = extractBlockReason(entry);
|
|
266
|
+
console.log(` ${colors.red('✗')} ${time} ${tool} ${colors.dim(reason)}`);
|
|
267
|
+
}
|
|
268
|
+
newline();
|
|
269
|
+
}
|
|
270
|
+
// If nothing was ever blocked, celebrate
|
|
271
|
+
if (sAll.blocked === 0) {
|
|
272
|
+
console.log(` ${colors.green('✓')} Nothing blocked yet — all scans clean.`);
|
|
273
|
+
newline();
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
// Skills status
|
|
277
|
+
console.log(colors.dim(' ─────'));
|
|
278
|
+
if (hasSkills) {
|
|
279
|
+
console.log(colors.dim(' /codehere:trust /codehere:report /codehere:audit /codehere:hook-status'));
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
console.log(colors.dim(' Run codehere hook install to add slash commands'));
|
|
283
|
+
}
|
|
284
|
+
newline();
|
|
285
|
+
// Multi-agent session analysis
|
|
286
|
+
if (options.sessions && entries.length > 0) {
|
|
287
|
+
const allSessions = analyzeSessions(entries);
|
|
288
|
+
const sessions = allSessions.filter(s => s.sessionId !== 'unknown');
|
|
289
|
+
const alerts = detectAmplificationAlerts(sessions);
|
|
290
|
+
console.log(colors.bold('Sessions (last 10):'));
|
|
291
|
+
for (const s of sessions.slice(0, 10)) {
|
|
292
|
+
const sid = s.sessionId.substring(0, 8);
|
|
293
|
+
const risk = s.amplificationRisk === 'high' ? colors.red('high')
|
|
294
|
+
: s.amplificationRisk === 'medium' ? colors.yellow('med')
|
|
295
|
+
: colors.green('low');
|
|
296
|
+
const blocked = s.blockedCalls > 0 ? colors.red(` ${s.blockedCalls} blocked`) : '';
|
|
297
|
+
const dur = formatDuration(s.durationMs);
|
|
298
|
+
console.log(` ${colors.dim(sid)} ${String(s.totalCalls).padStart(4)} calls ${dur.padEnd(6)} risk: ${risk}${blocked}`);
|
|
299
|
+
}
|
|
300
|
+
newline();
|
|
301
|
+
if (alerts.length > 0) {
|
|
302
|
+
console.log(colors.bold('Amplification alerts:'));
|
|
303
|
+
for (const alert of alerts) {
|
|
304
|
+
const icon = alert.risk === 'high' ? colors.red('!') : colors.yellow('!');
|
|
305
|
+
console.log(` ${icon} ${colors.dim(alert.sessionId.substring(0, 8))} ${alert.message}`);
|
|
306
|
+
}
|
|
307
|
+
newline();
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
console.log(colors.dim(' No amplification patterns detected.'));
|
|
311
|
+
newline();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
// Removed: Cost router jargon — not meaningful to users
|
|
315
|
+
// Tasks table (--tasks flag)
|
|
316
|
+
if (options.tasks) {
|
|
45
317
|
newline();
|
|
46
318
|
console.log(colors.bold('Recent tasks (experimental)'));
|
|
47
319
|
console.log(colors.dim('Task storage: .codehere/tasks.jsonl'));
|
|
48
320
|
newline();
|
|
49
321
|
try {
|
|
322
|
+
const { getTaskRepository } = await import('../../../infrastructure/storage/task-repository.js');
|
|
50
323
|
const taskRepo = getTaskRepository();
|
|
51
324
|
const tasks = await taskRepo.getAll();
|
|
52
325
|
if (tasks.length === 0) {
|
|
53
326
|
console.log(colors.dim('No tasks found. Run "codehere suggest" or "codehere run" to create tasks.'));
|
|
54
327
|
}
|
|
55
328
|
else {
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
padRight('Status', 12),
|
|
61
|
-
padRight('Risk', 4),
|
|
62
|
-
padRight('Env', 6),
|
|
63
|
-
'Goal',
|
|
64
|
-
].join(' ');
|
|
65
|
-
const separator = [
|
|
66
|
-
'-'.repeat(10),
|
|
67
|
-
'-'.repeat(8),
|
|
68
|
-
'-'.repeat(12),
|
|
69
|
-
'-'.repeat(4),
|
|
70
|
-
'-'.repeat(6),
|
|
71
|
-
'-'.repeat(30),
|
|
72
|
-
].join(' ');
|
|
73
|
-
console.log(colors.dim(header));
|
|
74
|
-
console.log(colors.dim(separator));
|
|
329
|
+
const pad = (s, n) => s.length >= n ? s.substring(0, n) : s + ' '.repeat(n - s.length);
|
|
330
|
+
const trunc = (s, n) => s.length <= n ? s : s.substring(0, n - 1) + '…';
|
|
331
|
+
console.log(colors.dim([pad('ID', 10), pad('Mode', 8), pad('Status', 12), pad('Risk', 4), pad('Env', 6), 'Goal'].join(' ')));
|
|
332
|
+
console.log(colors.dim(['-'.repeat(10), '-'.repeat(8), '-'.repeat(12), '-'.repeat(4), '-'.repeat(6), '-'.repeat(30)].join(' ')));
|
|
75
333
|
tasks.slice(0, 10).forEach(task => {
|
|
76
|
-
|
|
77
|
-
padRight(task.id.substring(0, 8) + '..', 10),
|
|
78
|
-
padRight(task.mode, 8),
|
|
79
|
-
padRight(task.status, 12),
|
|
80
|
-
padRight(task.riskTier.toUpperCase(), 4),
|
|
81
|
-
padRight(task.environment.substring(0, 6), 6),
|
|
82
|
-
truncate(task.goal, 30),
|
|
83
|
-
].join(' ');
|
|
84
|
-
console.log(row);
|
|
334
|
+
console.log([pad(task.id.substring(0, 8) + '..', 10), pad(task.mode, 8), pad(task.status, 12), pad(task.riskTier.toUpperCase(), 4), pad(task.environment.substring(0, 6), 6), trunc(task.goal, 30)].join(' '));
|
|
85
335
|
});
|
|
86
336
|
if (tasks.length > 10) {
|
|
87
337
|
newline();
|
|
@@ -89,79 +339,14 @@ export async function executeStatusCommand(options) {
|
|
|
89
339
|
}
|
|
90
340
|
}
|
|
91
341
|
}
|
|
92
|
-
catch
|
|
342
|
+
catch {
|
|
93
343
|
console.log(colors.dim('No tasks found. Run "codehere suggest" or "codehere run" to create tasks.'));
|
|
94
344
|
}
|
|
95
345
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
console.log(` Platform: ${process.platform}`);
|
|
101
|
-
console.log(` CWD: ${process.cwd()}`);
|
|
346
|
+
// Quick trust scan (opt-in)
|
|
347
|
+
if (options.trust) {
|
|
348
|
+
const { executeTrustCommand } = await import('./trust-command.js');
|
|
349
|
+
await executeTrustCommand(undefined, {});
|
|
102
350
|
}
|
|
103
|
-
if (options?.track) {
|
|
104
|
-
newline();
|
|
105
|
-
console.log(colors.bold('What Works:'));
|
|
106
|
-
const allFeedback = agentFeedbackManager.getAllFeedback(500);
|
|
107
|
-
if (allFeedback.length === 0) {
|
|
108
|
-
console.log(colors.dim('No execution data yet. Run commands to start tracking.'));
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
// Group by operation (command)
|
|
112
|
-
const byOperation = {};
|
|
113
|
-
for (const record of allFeedback) {
|
|
114
|
-
const op = record.operation || 'unknown';
|
|
115
|
-
if (!byOperation[op]) {
|
|
116
|
-
byOperation[op] = { success: 0, failure: 0, total: 0 };
|
|
117
|
-
}
|
|
118
|
-
byOperation[op].total++;
|
|
119
|
-
if (record.outcome === 'success') {
|
|
120
|
-
byOperation[op].success++;
|
|
121
|
-
}
|
|
122
|
-
else if (record.outcome === 'failure') {
|
|
123
|
-
byOperation[op].failure++;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
// Sort by total usage
|
|
127
|
-
const sorted = Object.entries(byOperation)
|
|
128
|
-
.sort((a, b) => b[1].total - a[1].total)
|
|
129
|
-
.slice(0, 10);
|
|
130
|
-
if (sorted.length > 0) {
|
|
131
|
-
const header = [
|
|
132
|
-
padRight('Command', 20),
|
|
133
|
-
padRight('Success', 10),
|
|
134
|
-
padRight('Failed', 10),
|
|
135
|
-
padRight('Total', 8),
|
|
136
|
-
'Rate',
|
|
137
|
-
].join(' ');
|
|
138
|
-
console.log(colors.dim(header));
|
|
139
|
-
console.log(colors.dim('-'.repeat(70)));
|
|
140
|
-
for (const [op, stats] of sorted) {
|
|
141
|
-
const rate = stats.total > 0 ? ((stats.success / stats.total) * 100).toFixed(0) : '0';
|
|
142
|
-
const rateColor = parseFloat(rate) >= 80 ? colors.green : parseFloat(rate) >= 50 ? colors.yellow : colors.red;
|
|
143
|
-
const row = [
|
|
144
|
-
padRight(op, 20),
|
|
145
|
-
padRight(colors.green(String(stats.success)), 10),
|
|
146
|
-
padRight(colors.red(String(stats.failure)), 10),
|
|
147
|
-
padRight(String(stats.total), 8),
|
|
148
|
-
rateColor(`${rate}%`),
|
|
149
|
-
].join(' ');
|
|
150
|
-
console.log(row);
|
|
151
|
-
}
|
|
152
|
-
newline();
|
|
153
|
-
console.log(colors.dim(`Based on ${allFeedback.length} recent executions`));
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
newline();
|
|
158
|
-
}
|
|
159
|
-
function padRight(str, len) {
|
|
160
|
-
return str.length >= len ? str.substring(0, len) : str + ' '.repeat(len - str.length);
|
|
161
|
-
}
|
|
162
|
-
function truncate(str, maxLen) {
|
|
163
|
-
if (str.length <= maxLen)
|
|
164
|
-
return str;
|
|
165
|
-
return str.substring(0, maxLen - 1) + '…';
|
|
166
351
|
}
|
|
167
352
|
//# sourceMappingURL=status-command.js.map
|