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
|
@@ -53,43 +53,33 @@ function cosineSimilarityOptimized(queryEmbedding, queryNorm, docEmbedding) {
|
|
|
53
53
|
return denominator === 0 ? 0 : dotProduct / denominator;
|
|
54
54
|
}
|
|
55
55
|
export class SQLiteEmbeddingRepository {
|
|
56
|
-
dbPath
|
|
56
|
+
dbPath;
|
|
57
57
|
db = null;
|
|
58
|
-
providedDbPath;
|
|
59
|
-
cwd;
|
|
60
58
|
/**
|
|
61
59
|
* @param dbPath - Optional database path. If not provided, uses per-repo path via getEmbeddingsDbPath()
|
|
62
60
|
* @param cwd - Optional current working directory for codebase root detection (defaults to process.cwd())
|
|
63
61
|
*/
|
|
64
62
|
constructor(dbPath, cwd) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
getDbPath() {
|
|
70
|
-
if (this.dbPath)
|
|
71
|
-
return this.dbPath;
|
|
72
|
-
if (this.providedDbPath) {
|
|
73
|
-
this.dbPath = this.providedDbPath;
|
|
63
|
+
if (dbPath) {
|
|
64
|
+
// Use provided path
|
|
65
|
+
this.dbPath = dbPath;
|
|
74
66
|
}
|
|
75
67
|
else {
|
|
76
|
-
//
|
|
77
|
-
const pathInfo = getEmbeddingsDbPath(
|
|
68
|
+
// Use per-repo path based on codebase root
|
|
69
|
+
const pathInfo = getEmbeddingsDbPath(cwd);
|
|
78
70
|
this.dbPath = pathInfo.dbPath;
|
|
79
71
|
}
|
|
80
|
-
return this.dbPath;
|
|
81
72
|
}
|
|
82
73
|
async getDb() {
|
|
83
74
|
if (this.db)
|
|
84
75
|
return this.db;
|
|
85
|
-
const dbPath = this.getDbPath();
|
|
86
76
|
const SQL = await initSqlJs();
|
|
87
|
-
const dbDir = dirname(dbPath);
|
|
77
|
+
const dbDir = dirname(this.dbPath);
|
|
88
78
|
if (!existsSync(dbDir)) {
|
|
89
79
|
mkdirSync(dbDir, { recursive: true });
|
|
90
80
|
}
|
|
91
|
-
if (existsSync(dbPath)) {
|
|
92
|
-
const buffer = readFileSync(dbPath);
|
|
81
|
+
if (existsSync(this.dbPath)) {
|
|
82
|
+
const buffer = readFileSync(this.dbPath);
|
|
93
83
|
this.db = new SQL.Database(buffer);
|
|
94
84
|
}
|
|
95
85
|
else {
|
|
@@ -170,8 +160,7 @@ export class SQLiteEmbeddingRepository {
|
|
|
170
160
|
*/
|
|
171
161
|
async hasEmbeddings() {
|
|
172
162
|
// Check if DB file exists
|
|
173
|
-
|
|
174
|
-
if (!existsSync(dbPath)) {
|
|
163
|
+
if (!existsSync(this.dbPath)) {
|
|
175
164
|
return false;
|
|
176
165
|
}
|
|
177
166
|
const db = await this.getDb();
|
|
@@ -191,8 +180,7 @@ export class SQLiteEmbeddingRepository {
|
|
|
191
180
|
return;
|
|
192
181
|
const data = this.db.export();
|
|
193
182
|
const buffer = Buffer.from(data);
|
|
194
|
-
|
|
195
|
-
writeFileSync(dbPath, buffer);
|
|
183
|
+
writeFileSync(this.dbPath, buffer);
|
|
196
184
|
}
|
|
197
185
|
/**
|
|
198
186
|
* Search with pre-computed query embedding
|
|
@@ -7,13 +7,17 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
9
9
|
import { join, dirname } from 'path';
|
|
10
|
+
import { fileURLToPath } from 'url';
|
|
10
11
|
import initSqlJs from 'sql.js';
|
|
11
12
|
import { randomUUID } from 'crypto';
|
|
12
|
-
import { getConfigManager } from '../config/config-manager.js';
|
|
13
13
|
function getDbPath() {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const __dirname = dirname(__filename);
|
|
16
|
+
const agentDir = join(__dirname, '../../..');
|
|
17
|
+
if (existsSync(join(agentDir, 'package.json'))) {
|
|
18
|
+
return join(agentDir, 'data', 'knowledge-graph.sqlite');
|
|
19
|
+
}
|
|
20
|
+
return join(process.cwd(), 'agent', 'data', 'knowledge-graph.sqlite');
|
|
17
21
|
}
|
|
18
22
|
export class SQLiteKnowledgeGraphRepository {
|
|
19
23
|
dbPath;
|
|
@@ -7,13 +7,17 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
9
9
|
import { join, dirname } from 'path';
|
|
10
|
+
import { fileURLToPath } from 'url';
|
|
10
11
|
import initSqlJs from 'sql.js';
|
|
11
12
|
import { randomUUID } from 'crypto';
|
|
12
|
-
import { getConfigManager } from '../config/config-manager.js';
|
|
13
13
|
function getDbPath() {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const __dirname = dirname(__filename);
|
|
16
|
+
const agentDir = join(__dirname, '../../..');
|
|
17
|
+
if (existsSync(join(agentDir, 'package.json'))) {
|
|
18
|
+
return join(agentDir, 'data', 'knowledge_preservation.sqlite');
|
|
19
|
+
}
|
|
20
|
+
return join(process.cwd(), 'agent', 'data', 'knowledge_preservation.sqlite');
|
|
17
21
|
}
|
|
18
22
|
export class SQLiteKnowledgePreservationRepository {
|
|
19
23
|
dbPath;
|
|
@@ -4,13 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
6
6
|
import { join, dirname } from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
7
8
|
import initSqlJs from 'sql.js';
|
|
8
9
|
import { randomUUID } from 'crypto';
|
|
9
|
-
import { getConfigManager } from '../config/config-manager.js';
|
|
10
10
|
function getDbPath() {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = dirname(__filename);
|
|
13
|
+
const agentDir = join(__dirname, '../../..');
|
|
14
|
+
if (existsSync(join(agentDir, 'package.json'))) {
|
|
15
|
+
return join(agentDir, 'data', 'memory_stream.sqlite');
|
|
16
|
+
}
|
|
17
|
+
return join(process.cwd(), 'agent', 'data', 'memory_stream.sqlite');
|
|
14
18
|
}
|
|
15
19
|
export class SQLiteMemoryRepository {
|
|
16
20
|
dbPath;
|
|
@@ -4,13 +4,17 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { readFileSync, existsSync, mkdirSync, writeFileSync } from 'fs';
|
|
6
6
|
import { join, dirname } from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
7
8
|
import initSqlJs from 'sql.js';
|
|
8
9
|
import { randomUUID } from 'crypto';
|
|
9
|
-
import { getConfigManager } from '../config/config-manager.js';
|
|
10
10
|
function getDbPath() {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
11
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
12
|
+
const __dirname = dirname(__filename);
|
|
13
|
+
const agentDir = join(__dirname, '../../..');
|
|
14
|
+
if (existsSync(join(agentDir, 'package.json'))) {
|
|
15
|
+
return join(agentDir, 'data', 'patterns.sqlite');
|
|
16
|
+
}
|
|
17
|
+
return join(process.cwd(), 'agent', 'data', 'patterns.sqlite');
|
|
14
18
|
}
|
|
15
19
|
export class SQLitePatternRepository {
|
|
16
20
|
dbPath;
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Incremental Markdown Renderer for Streaming Output
|
|
3
|
+
*
|
|
4
|
+
* Converts markdown to terminal formatting as tokens arrive.
|
|
5
|
+
* Handles: ## headers, **bold**, `code`, ```code blocks```, - bullets
|
|
6
|
+
*/
|
|
7
|
+
import chalk from 'chalk';
|
|
8
|
+
export function createMarkdownStream() {
|
|
9
|
+
let buffer = '';
|
|
10
|
+
let inCodeBlock = false;
|
|
11
|
+
let codeBlockLang = '';
|
|
12
|
+
let lineStart = true; // Are we at the start of a new line?
|
|
13
|
+
function emit(text) {
|
|
14
|
+
process.stdout.write(text);
|
|
15
|
+
}
|
|
16
|
+
function processLine(line) {
|
|
17
|
+
// Code block fence
|
|
18
|
+
if (line.startsWith('```')) {
|
|
19
|
+
if (!inCodeBlock) {
|
|
20
|
+
inCodeBlock = true;
|
|
21
|
+
codeBlockLang = line.slice(3).trim();
|
|
22
|
+
return chalk.dim(' ┌' + (codeBlockLang ? ' ' + codeBlockLang : ''));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
inCodeBlock = false;
|
|
26
|
+
codeBlockLang = '';
|
|
27
|
+
return chalk.dim(' └');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// Inside code block — dim, indented
|
|
31
|
+
if (inCodeBlock) {
|
|
32
|
+
return chalk.cyan(' │ ') + line;
|
|
33
|
+
}
|
|
34
|
+
// Headers
|
|
35
|
+
if (line.startsWith('### ')) {
|
|
36
|
+
return chalk.bold(line.slice(4));
|
|
37
|
+
}
|
|
38
|
+
if (line.startsWith('## ')) {
|
|
39
|
+
return '\n' + chalk.bold(line.slice(3));
|
|
40
|
+
}
|
|
41
|
+
if (line.startsWith('# ')) {
|
|
42
|
+
return '\n' + chalk.bold(line.slice(2));
|
|
43
|
+
}
|
|
44
|
+
// Bullet points
|
|
45
|
+
if (line.startsWith('- ') || line.startsWith('* ')) {
|
|
46
|
+
return ' • ' + formatInline(line.slice(2));
|
|
47
|
+
}
|
|
48
|
+
// Numbered list
|
|
49
|
+
const numMatch = line.match(/^(\d+)\.\s/);
|
|
50
|
+
if (numMatch) {
|
|
51
|
+
return ' ' + numMatch[1] + '. ' + formatInline(line.slice(numMatch[0].length));
|
|
52
|
+
}
|
|
53
|
+
// Regular line
|
|
54
|
+
return formatInline(line);
|
|
55
|
+
}
|
|
56
|
+
function formatInline(text) {
|
|
57
|
+
// Bold: **text**
|
|
58
|
+
text = text.replace(/\*\*(.+?)\*\*/g, (_, content) => chalk.bold(content));
|
|
59
|
+
// Inline code: `text`
|
|
60
|
+
text = text.replace(/`([^`]+)`/g, (_, content) => chalk.cyan(content));
|
|
61
|
+
// Italic: *text* (but not inside **)
|
|
62
|
+
text = text.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g, (_, content) => chalk.dim(content));
|
|
63
|
+
return text;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
write(token) {
|
|
67
|
+
buffer += token;
|
|
68
|
+
// Process complete lines
|
|
69
|
+
while (buffer.includes('\n')) {
|
|
70
|
+
const newlineIdx = buffer.indexOf('\n');
|
|
71
|
+
const line = buffer.slice(0, newlineIdx);
|
|
72
|
+
buffer = buffer.slice(newlineIdx + 1);
|
|
73
|
+
const formatted = processLine(line);
|
|
74
|
+
emit(formatted + '\n');
|
|
75
|
+
lineStart = true;
|
|
76
|
+
}
|
|
77
|
+
// If there's remaining buffer without a newline, check for inline patterns
|
|
78
|
+
// Don't emit yet — wait for the line to complete
|
|
79
|
+
// Exception: if buffer is getting long (>200 chars without newline), flush it
|
|
80
|
+
if (buffer.length > 200) {
|
|
81
|
+
emit(formatInline(buffer));
|
|
82
|
+
buffer = '';
|
|
83
|
+
lineStart = false;
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
flush() {
|
|
87
|
+
if (buffer.length > 0) {
|
|
88
|
+
const formatted = processLine(buffer);
|
|
89
|
+
emit(formatted);
|
|
90
|
+
buffer = '';
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Format a complete markdown string for terminal display (returns string, doesn't write to stdout).
|
|
97
|
+
*/
|
|
98
|
+
export function formatMarkdownForTerminal(text) {
|
|
99
|
+
const output = [];
|
|
100
|
+
let inCodeBlock = false;
|
|
101
|
+
let codeBlockLang = '';
|
|
102
|
+
function fmtInline(t) {
|
|
103
|
+
t = t.replace(/\*\*(.+?)\*\*/g, (_, c) => chalk.bold(c));
|
|
104
|
+
t = t.replace(/`([^`]+)`/g, (_, c) => chalk.cyan(c));
|
|
105
|
+
t = t.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g, (_, c) => chalk.dim(c));
|
|
106
|
+
return t;
|
|
107
|
+
}
|
|
108
|
+
for (const line of text.split('\n')) {
|
|
109
|
+
if (line.startsWith('```')) {
|
|
110
|
+
if (!inCodeBlock) {
|
|
111
|
+
inCodeBlock = true;
|
|
112
|
+
codeBlockLang = line.slice(3).trim();
|
|
113
|
+
output.push(chalk.dim(' ┌' + (codeBlockLang ? ' ' + codeBlockLang : '')));
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
inCodeBlock = false;
|
|
117
|
+
codeBlockLang = '';
|
|
118
|
+
output.push(chalk.dim(' └'));
|
|
119
|
+
}
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (inCodeBlock) {
|
|
123
|
+
output.push(chalk.cyan(' │ ') + line);
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
if (line.startsWith('### ')) {
|
|
127
|
+
output.push(chalk.bold(line.slice(4)));
|
|
128
|
+
continue;
|
|
129
|
+
}
|
|
130
|
+
if (line.startsWith('## ')) {
|
|
131
|
+
output.push('\n' + chalk.bold(line.slice(3)));
|
|
132
|
+
continue;
|
|
133
|
+
}
|
|
134
|
+
if (line.startsWith('# ')) {
|
|
135
|
+
output.push('\n' + chalk.bold(line.slice(2)));
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if (line.startsWith('- ') || line.startsWith('* ')) {
|
|
139
|
+
output.push(' • ' + fmtInline(line.slice(2)));
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
const numMatch = line.match(/^(\d+)\.\s/);
|
|
143
|
+
if (numMatch) {
|
|
144
|
+
output.push(' ' + numMatch[1] + '. ' + fmtInline(line.slice(numMatch[0].length)));
|
|
145
|
+
continue;
|
|
146
|
+
}
|
|
147
|
+
output.push(fmtInline(line));
|
|
148
|
+
}
|
|
149
|
+
return output.join('\n');
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=stream-markdown.js.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transparency Bar — show timing, tokens, model after every AI response
|
|
3
|
+
*
|
|
4
|
+
* v0.3.0: Makes every interaction feel measurable.
|
|
5
|
+
*/
|
|
6
|
+
import chalk from 'chalk';
|
|
7
|
+
const dim = chalk.dim;
|
|
8
|
+
/**
|
|
9
|
+
* Format a transparency line for display after an AI response.
|
|
10
|
+
* Example: " 2.4s · ~320 tokens · Claude Sonnet"
|
|
11
|
+
*/
|
|
12
|
+
export function formatTransparency(info) {
|
|
13
|
+
const parts = [];
|
|
14
|
+
// Elapsed time
|
|
15
|
+
const seconds = (info.elapsedMs / 1000).toFixed(1);
|
|
16
|
+
parts.push(`${seconds}s`);
|
|
17
|
+
// Token estimate
|
|
18
|
+
if (info.tokenEstimate && info.tokenEstimate > 0) {
|
|
19
|
+
parts.push(`~${info.tokenEstimate} tokens`);
|
|
20
|
+
}
|
|
21
|
+
// Model name (clean up long IDs)
|
|
22
|
+
if (info.model) {
|
|
23
|
+
parts.push(cleanModelName(info.model));
|
|
24
|
+
}
|
|
25
|
+
return dim(' ' + parts.join(' · '));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Format hook block stats for display.
|
|
29
|
+
* Example: " blocked 5 times this session · 72 total"
|
|
30
|
+
*/
|
|
31
|
+
export function formatBlockStats(sessionBlocks, totalBlocks) {
|
|
32
|
+
const parts = [];
|
|
33
|
+
if (sessionBlocks > 0) {
|
|
34
|
+
parts.push(`blocked ${sessionBlocks} time${sessionBlocks !== 1 ? 's' : ''} this session`);
|
|
35
|
+
}
|
|
36
|
+
if (totalBlocks > 0) {
|
|
37
|
+
parts.push(`${totalBlocks} total`);
|
|
38
|
+
}
|
|
39
|
+
if (parts.length === 0)
|
|
40
|
+
return '';
|
|
41
|
+
return dim(' ' + parts.join(' · '));
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Clean up model ID to a short display name.
|
|
45
|
+
* "claude-sonnet-4-20250514" → "Claude Sonnet"
|
|
46
|
+
* "gpt-4o" → "GPT-4o"
|
|
47
|
+
*/
|
|
48
|
+
function cleanModelName(model) {
|
|
49
|
+
const lower = model.toLowerCase();
|
|
50
|
+
if (lower.includes('claude') && lower.includes('opus'))
|
|
51
|
+
return 'Claude Opus';
|
|
52
|
+
if (lower.includes('claude') && lower.includes('sonnet'))
|
|
53
|
+
return 'Claude Sonnet';
|
|
54
|
+
if (lower.includes('claude') && lower.includes('haiku'))
|
|
55
|
+
return 'Claude Haiku';
|
|
56
|
+
if (lower.includes('gpt-4o'))
|
|
57
|
+
return 'GPT-4o';
|
|
58
|
+
if (lower.includes('gpt-4'))
|
|
59
|
+
return 'GPT-4';
|
|
60
|
+
if (lower.includes('gpt-3.5'))
|
|
61
|
+
return 'GPT-3.5';
|
|
62
|
+
// Fallback: return as-is but truncated
|
|
63
|
+
return model.length > 30 ? model.slice(0, 27) + '...' : model;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Estimate token count from text (rough: ~4 chars per token for English).
|
|
67
|
+
*/
|
|
68
|
+
export function estimateTokens(text) {
|
|
69
|
+
return Math.round(text.length / 4);
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=transparency.js.map
|
|
@@ -1,71 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Agent Feedback
|
|
3
3
|
* Records and manages feedback about agent operations
|
|
4
|
-
* Now with file persistence for Trust Dashboard
|
|
5
4
|
*
|
|
6
5
|
* Phase 1: v0.5.0-alpha.0
|
|
7
6
|
*/
|
|
8
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
9
|
-
import { join } from 'path';
|
|
10
|
-
import { getConfigManager } from '../config/config-manager.js';
|
|
11
7
|
/**
|
|
12
|
-
* Agent Feedback Manager
|
|
8
|
+
* Agent Feedback Manager
|
|
13
9
|
*/
|
|
14
10
|
class AgentFeedbackManager {
|
|
15
11
|
feedbackRecords = [];
|
|
16
12
|
maxRecords = 1000;
|
|
17
|
-
feedbackDir;
|
|
18
|
-
feedbackFile;
|
|
19
|
-
initialized = false;
|
|
20
|
-
constructor() {
|
|
21
|
-
const config = getConfigManager();
|
|
22
|
-
const cacheDir = config.getCacheDir();
|
|
23
|
-
this.feedbackDir = cacheDir;
|
|
24
|
-
this.feedbackFile = join(this.feedbackDir, 'feedback.json');
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Load existing feedback from disk
|
|
28
|
-
*/
|
|
29
|
-
ensureLoaded() {
|
|
30
|
-
if (this.initialized)
|
|
31
|
-
return;
|
|
32
|
-
this.initialized = true;
|
|
33
|
-
try {
|
|
34
|
-
if (!existsSync(this.feedbackDir)) {
|
|
35
|
-
mkdirSync(this.feedbackDir, { recursive: true });
|
|
36
|
-
}
|
|
37
|
-
if (existsSync(this.feedbackFile)) {
|
|
38
|
-
const data = readFileSync(this.feedbackFile, 'utf-8');
|
|
39
|
-
const parsed = JSON.parse(data);
|
|
40
|
-
if (Array.isArray(parsed)) {
|
|
41
|
-
this.feedbackRecords = parsed;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
catch {
|
|
46
|
-
// Ignore load errors - start fresh
|
|
47
|
-
this.feedbackRecords = [];
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Persist feedback to disk
|
|
52
|
-
*/
|
|
53
|
-
persist() {
|
|
54
|
-
try {
|
|
55
|
-
if (!existsSync(this.feedbackDir)) {
|
|
56
|
-
mkdirSync(this.feedbackDir, { recursive: true });
|
|
57
|
-
}
|
|
58
|
-
writeFileSync(this.feedbackFile, JSON.stringify(this.feedbackRecords, null, 2));
|
|
59
|
-
}
|
|
60
|
-
catch {
|
|
61
|
-
// Ignore persist errors - trust data will be lost on restart
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
13
|
/**
|
|
65
14
|
* Record feedback for an agent operation
|
|
66
15
|
*/
|
|
67
16
|
recordFeedback(feedback) {
|
|
68
|
-
this.ensureLoaded();
|
|
69
17
|
const record = {
|
|
70
18
|
...feedback,
|
|
71
19
|
timestamp: feedback.timestamp || Date.now(),
|
|
@@ -75,14 +23,13 @@ class AgentFeedbackManager {
|
|
|
75
23
|
if (this.feedbackRecords.length > this.maxRecords) {
|
|
76
24
|
this.feedbackRecords = this.feedbackRecords.slice(-this.maxRecords);
|
|
77
25
|
}
|
|
78
|
-
//
|
|
79
|
-
|
|
26
|
+
// In alpha, feedback is stored in memory only
|
|
27
|
+
// Can be enhanced later to persist to disk
|
|
80
28
|
}
|
|
81
29
|
/**
|
|
82
30
|
* Get feedback records for an agent
|
|
83
31
|
*/
|
|
84
32
|
getFeedbackForAgent(agentName, limit = 10) {
|
|
85
|
-
this.ensureLoaded();
|
|
86
33
|
return this.feedbackRecords
|
|
87
34
|
.filter(r => r.agentName === agentName)
|
|
88
35
|
.slice(-limit)
|
|
@@ -92,9 +39,17 @@ class AgentFeedbackManager {
|
|
|
92
39
|
* Get all feedback records
|
|
93
40
|
*/
|
|
94
41
|
getAllFeedback(limit = 100) {
|
|
95
|
-
this.ensureLoaded();
|
|
96
42
|
return this.feedbackRecords.slice(-limit).reverse();
|
|
97
43
|
}
|
|
98
44
|
}
|
|
99
45
|
export const agentFeedbackManager = new AgentFeedbackManager();
|
|
46
|
+
/**
|
|
47
|
+
* AgentFeedback class (kept for backward compatibility)
|
|
48
|
+
*/
|
|
49
|
+
export class AgentFeedback {
|
|
50
|
+
data;
|
|
51
|
+
constructor(data) {
|
|
52
|
+
this.data = data;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
100
55
|
//# sourceMappingURL=agent-feedback.js.map
|
package/dist/monitoring.js
CHANGED
|
@@ -126,9 +126,10 @@ function checkApi() {
|
|
|
126
126
|
if (circuitState === 'HALF_OPEN') {
|
|
127
127
|
return { status: 'error', message: 'API circuit breaker is HALF_OPEN - recovering' };
|
|
128
128
|
}
|
|
129
|
-
// Check if API key is configured
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
// Check if any API key is configured
|
|
130
|
+
const hasKey = !!(process.env.ANTHROPIC_API_KEY || process.env.OPENAI_API_KEY || process.env.COHERE_API_KEY || process.env.OPENROUTER_API_KEY);
|
|
131
|
+
if (!hasKey) {
|
|
132
|
+
return { status: 'error', message: 'No API key configured' };
|
|
132
133
|
}
|
|
133
134
|
return { status: 'ok', message: 'API accessible' };
|
|
134
135
|
}
|
|
@@ -229,21 +230,11 @@ export function getMetrics() {
|
|
|
229
230
|
* Format health status for display
|
|
230
231
|
*/
|
|
231
232
|
export function formatHealthStatus(health) {
|
|
232
|
-
const statusIcon =
|
|
233
|
-
|
|
234
|
-
degraded: '⚠',
|
|
235
|
-
unhealthy: '✗',
|
|
236
|
-
}[health.status];
|
|
237
|
-
const statusColor = {
|
|
238
|
-
healthy: 'green',
|
|
239
|
-
degraded: 'yellow',
|
|
240
|
-
unhealthy: 'red',
|
|
241
|
-
}[health.status];
|
|
242
|
-
let output = `${statusIcon} System Status: ${health.status.toUpperCase()}\n\n`;
|
|
243
|
-
output += 'Component Checks:\n';
|
|
233
|
+
const statusIcon = health.status === 'healthy' ? '✓' : health.status === 'degraded' ? '!' : '✗';
|
|
234
|
+
let output = ` ${statusIcon} ${health.status.toUpperCase()}\n\n`;
|
|
244
235
|
for (const [component, check] of Object.entries(health.checks)) {
|
|
245
|
-
const icon = check.status === 'ok' ? '✓' : check.status === 'warning' ? '
|
|
246
|
-
output += ` ${icon} ${component}
|
|
236
|
+
const icon = check.status === 'ok' ? '✓' : check.status === 'warning' ? '!' : '✗';
|
|
237
|
+
output += ` ${icon} ${component.padEnd(12)} ${check.message}\n`;
|
|
247
238
|
}
|
|
248
239
|
return output;
|
|
249
240
|
}
|