codehere 0.3.0 → 0.5.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +329 -65
- package/dist/application/agents/documentation-agent.d.ts +24 -0
- package/dist/application/agents/documentation-agent.d.ts.map +1 -0
- package/dist/application/agents/documentation-agent.js +399 -0
- package/dist/application/agents/documentation-agent.js.map +1 -0
- package/dist/application/agents/execution-agent.d.ts +11 -0
- package/dist/application/agents/execution-agent.d.ts.map +1 -1
- package/dist/application/agents/execution-agent.js +289 -80
- package/dist/application/agents/execution-agent.js.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.d.ts +4 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.js +95 -2
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
- package/dist/application/agents/planning-agent.d.ts +3 -0
- package/dist/application/agents/planning-agent.d.ts.map +1 -1
- package/dist/application/agents/planning-agent.js +151 -71
- package/dist/application/agents/planning-agent.js.map +1 -1
- package/dist/application/agents/product-requirements-agent.d.ts +21 -0
- package/dist/application/agents/product-requirements-agent.d.ts.map +1 -0
- package/dist/application/agents/product-requirements-agent.js +247 -0
- package/dist/application/agents/product-requirements-agent.js.map +1 -0
- package/dist/application/agents/validation-agent.d.ts +5 -1
- package/dist/application/agents/validation-agent.d.ts.map +1 -1
- package/dist/application/agents/validation-agent.js +156 -21
- package/dist/application/agents/validation-agent.js.map +1 -1
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts +21 -0
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js +158 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/reasoning-config.d.ts +15 -0
- package/dist/application/reasoning/reasoning-config.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-config.js +50 -0
- package/dist/application/reasoning/reasoning-config.js.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts +18 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.js +170 -0
- package/dist/application/reasoning/reasoning-orchestrator.js.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts +24 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js +6 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts +36 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.js +74 -0
- package/dist/application/reasoning/role-provider-resolver.js.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts +22 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.js +217 -0
- package/dist/application/reasoning/simple-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/types.d.ts +65 -0
- package/dist/application/reasoning/types.d.ts.map +1 -0
- package/dist/application/reasoning/types.js +6 -0
- package/dist/application/reasoning/types.js.map +1 -0
- package/dist/application/reasoning/validator-strategy.d.ts +56 -0
- package/dist/application/reasoning/validator-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/validator-strategy.js +103 -0
- package/dist/application/reasoning/validator-strategy.js.map +1 -0
- package/dist/application/services/dependency-container.d.ts +46 -2
- package/dist/application/services/dependency-container.d.ts.map +1 -1
- package/dist/application/services/dependency-container.js +198 -8
- package/dist/application/services/dependency-container.js.map +1 -1
- package/dist/application/services/intelligent-router.d.ts +19 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -1
- package/dist/application/services/intelligent-router.js +393 -91
- package/dist/application/services/intelligent-router.js.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.d.ts +20 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.js +129 -49
- package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.js +16 -1
- package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
- package/dist/application/use-cases/planning-use-case.d.ts +14 -1
- package/dist/application/use-cases/planning-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/planning-use-case.js +109 -2
- package/dist/application/use-cases/planning-use-case.js.map +1 -1
- package/dist/domain/entities/documentation.d.ts +35 -0
- package/dist/domain/entities/documentation.d.ts.map +1 -0
- package/dist/domain/entities/documentation.js +6 -0
- package/dist/domain/entities/documentation.js.map +1 -0
- package/dist/domain/entities/memory.d.ts.map +1 -1
- package/dist/domain/entities/product-requirements.d.ts +50 -0
- package/dist/domain/entities/product-requirements.d.ts.map +1 -0
- package/dist/domain/entities/product-requirements.js +6 -0
- package/dist/domain/entities/product-requirements.js.map +1 -0
- package/dist/domain/entities/task.d.ts +152 -0
- package/dist/domain/entities/task.d.ts.map +1 -0
- package/dist/domain/entities/task.js +61 -0
- package/dist/domain/entities/task.js.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.js +13 -0
- package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
- package/dist/domain/interfaces/agent.interface.d.ts +15 -0
- package/dist/domain/interfaces/agent.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/agent.interface.js +6 -0
- package/dist/domain/interfaces/agent.interface.js.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
- package/dist/domain/services/environment-mode-manager.d.ts +12 -0
- package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
- package/dist/domain/services/environment-mode-manager.js +22 -0
- package/dist/domain/services/environment-mode-manager.js.map +1 -0
- package/dist/domain/services/query-intent-classifier.d.ts.map +1 -1
- package/dist/domain/services/query-intent-classifier.js +20 -1
- package/dist/domain/services/query-intent-classifier.js.map +1 -1
- package/dist/domain/services/risk-tier-detector.d.ts +17 -0
- package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
- package/dist/domain/services/risk-tier-detector.js +78 -0
- package/dist/domain/services/risk-tier-detector.js.map +1 -0
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.js +18 -8
- package/dist/embed.js.map +1 -1
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +10 -3
- package/dist/formatter.js.map +1 -1
- package/dist/index.js +494 -167
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.js +19 -6
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
- package/dist/infrastructure/ai/fake-ai-service.d.ts +22 -0
- package/dist/infrastructure/ai/fake-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/fake-ai-service.js +59 -0
- package/dist/infrastructure/ai/fake-ai-service.js.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts +59 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.js +477 -0
- package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts +13 -1
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/embedding-cache.js +80 -9
- package/dist/infrastructure/cache/embedding-cache.js.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.js +40 -112
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
- package/dist/infrastructure/cache/response-cache.d.ts +18 -0
- package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/response-cache.js +48 -0
- package/dist/infrastructure/cache/response-cache.js.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts +8 -49
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/security-scan-cache.js +25 -102
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
- package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/bash-completion.js +11 -87
- package/dist/infrastructure/completion/bash-completion.js.map +1 -1
- package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/fish-completion.js +15 -58
- package/dist/infrastructure/completion/fish-completion.js.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.js +18 -73
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
- package/dist/infrastructure/config/config-manager.d.ts +10 -0
- package/dist/infrastructure/config/config-manager.d.ts.map +1 -1
- package/dist/infrastructure/config/config-manager.js +13 -2
- package/dist/infrastructure/config/config-manager.js.map +1 -1
- package/dist/infrastructure/context/conversation-context.d.ts +54 -0
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
- package/dist/infrastructure/context/conversation-context.js +129 -0
- package/dist/infrastructure/context/conversation-context.js.map +1 -0
- package/dist/infrastructure/context/session-manager.d.ts +42 -0
- package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
- package/dist/infrastructure/context/session-manager.js +94 -0
- package/dist/infrastructure/context/session-manager.js.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -1
- package/dist/infrastructure/cost/cost-tracker.js +12 -5
- package/dist/infrastructure/cost/cost-tracker.js.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.js +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.d.ts +6 -8
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.js +6 -8
- package/dist/infrastructure/governance/policy-as-code.js.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.js +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -1
- package/dist/infrastructure/protocols/a2a-metadata.js +1 -1
- package/dist/infrastructure/protocols/mcp-oauth.js +1 -1
- package/dist/infrastructure/providers/cohere-provider.d.ts +39 -0
- package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/cohere-provider.js +444 -0
- package/dist/infrastructure/providers/cohere-provider.js.map +1 -0
- package/dist/infrastructure/providers/fake-provider.d.ts +43 -0
- package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/fake-provider.js +130 -0
- package/dist/infrastructure/providers/fake-provider.js.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts +49 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.js +330 -0
- package/dist/infrastructure/providers/local-llm-provider.js.map +1 -0
- package/dist/infrastructure/providers/model-config.types.d.ts +70 -0
- package/dist/infrastructure/providers/model-config.types.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-config.types.js +9 -0
- package/dist/infrastructure/providers/model-config.types.js.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts +113 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.js +8 -0
- package/dist/infrastructure/providers/model-provider.interface.js.map +1 -0
- package/dist/infrastructure/providers/openai-provider.d.ts +38 -0
- package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openai-provider.js +413 -0
- package/dist/infrastructure/providers/openai-provider.js.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.js +401 -0
- package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts +48 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js +131 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts +37 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.js +120 -0
- package/dist/infrastructure/providers/provider-config-loader.js.map +1 -0
- package/dist/infrastructure/providers/provider-registry.d.ts +53 -0
- package/dist/infrastructure/providers/provider-registry.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-registry.js +88 -0
- package/dist/infrastructure/providers/provider-registry.js.map +1 -0
- package/dist/infrastructure/security/input-validator.d.ts.map +1 -1
- package/dist/infrastructure/security/input-validator.js +19 -6
- package/dist/infrastructure/security/input-validator.js.map +1 -1
- package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
- package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
- package/dist/infrastructure/serialization/toon-serializer.js +119 -0
- package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.js +37 -0
- package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
- package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/plan-repository.js +36 -73
- package/dist/infrastructure/storage/plan-repository.js.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
- package/dist/infrastructure/storage/task-helpers.d.ts +69 -0
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-helpers.js +197 -0
- package/dist/infrastructure/storage/task-helpers.js.map +1 -0
- package/dist/infrastructure/storage/task-repository.d.ts +68 -0
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-repository.js +216 -0
- package/dist/infrastructure/storage/task-repository.js.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts +74 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.js +167 -0
- package/dist/infrastructure/telemetry/telemetry-service.js.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts +22 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -1
- package/dist/infrastructure/ux/bi-directional-learning.js +144 -7
- package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -1
- package/dist/infrastructure/ux/capability-boundaries.d.ts +22 -0
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
- package/dist/infrastructure/ux/capability-boundaries.js +42 -0
- package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +21 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js +117 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.js +5 -181
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feedback-prompt.d.ts +26 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.js +45 -0
- package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-review-portal.js +4 -1
- package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.d.ts +35 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.js +86 -0
- package/dist/infrastructure/ux/hitl-validation.js.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.d.ts +5 -6
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.js +36 -41
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
- package/dist/infrastructure/ux/proportional-friction.d.ts +73 -0
- package/dist/infrastructure/ux/proportional-friction.d.ts.map +1 -0
- package/dist/infrastructure/ux/proportional-friction.js +200 -0
- package/dist/infrastructure/ux/proportional-friction.js.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
- package/dist/infrastructure/ux/review-checkpoint.js +33 -80
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
- package/dist/infrastructure/validation/agent-feedback.d.ts +51 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.js +55 -0
- package/dist/infrastructure/validation/agent-feedback.js.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts +75 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.js +137 -0
- package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -0
- package/dist/infrastructure/validation/feedback-stats.d.ts +99 -0
- package/dist/infrastructure/validation/feedback-stats.d.ts.map +1 -0
- package/dist/infrastructure/validation/feedback-stats.js +173 -0
- package/dist/infrastructure/validation/feedback-stats.js.map +1 -0
- package/dist/infrastructure/validation/review-handler.d.ts +26 -0
- package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
- package/dist/infrastructure/validation/review-handler.js +40 -0
- package/dist/infrastructure/validation/review-handler.js.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts +45 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.js +70 -0
- package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts +24 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.js +45 -0
- package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
- package/dist/infrastructure/validation/trace-summary.d.ts +45 -0
- package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
- package/dist/infrastructure/validation/trace-summary.js +52 -0
- package/dist/infrastructure/validation/trace-summary.js.map +1 -0
- package/dist/infrastructure/validation/trust-config.d.ts +27 -0
- package/dist/infrastructure/validation/trust-config.d.ts.map +1 -0
- package/dist/infrastructure/validation/trust-config.js +113 -0
- package/dist/infrastructure/validation/trust-config.js.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts +6 -8
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/attention-visualizer.js +6 -8
- package/dist/infrastructure/xai/attention-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.d.ts +6 -9
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.js +6 -9
- package/dist/infrastructure/xai/cot-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.d.ts +6 -10
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.js +6 -10
- package/dist/infrastructure/xai/decision-tree-log.js.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.d.ts +6 -8
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.js +6 -8
- package/dist/infrastructure/xai/interactive-xai.js.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.js +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -1
- package/dist/monitoring.d.ts +1 -1
- package/dist/monitoring.d.ts.map +1 -1
- package/dist/monitoring.js +12 -9
- package/dist/monitoring.js.map +1 -1
- package/dist/parallel-processor.d.ts.map +1 -1
- package/dist/parallel-processor.js +124 -45
- package/dist/parallel-processor.js.map +1 -1
- package/dist/presentation/cli/commands/ask-command.d.ts +2 -0
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/ask-command.js +356 -87
- package/dist/presentation/cli/commands/ask-command.js.map +1 -1
- package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/config-command.js +22 -8
- package/dist/presentation/cli/commands/config-command.js.map +1 -1
- package/dist/presentation/cli/commands/decision-command.js +23 -6
- package/dist/presentation/cli/commands/decision-command.js.map +1 -1
- package/dist/presentation/cli/commands/docs-command.d.ts +14 -0
- package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/docs-command.js +25 -0
- package/dist/presentation/cli/commands/docs-command.js.map +1 -0
- package/dist/presentation/cli/commands/fix-command.d.ts +10 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/fix-command.js +94 -0
- package/dist/presentation/cli/commands/fix-command.js.map +1 -0
- package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/help-command.js +23 -1
- package/dist/presentation/cli/commands/help-command.js.map +1 -1
- package/dist/presentation/cli/commands/memory-command.d.ts +17 -0
- package/dist/presentation/cli/commands/memory-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/memory-command.js +252 -0
- package/dist/presentation/cli/commands/memory-command.js.map +1 -0
- package/dist/presentation/cli/commands/models-command.d.ts +13 -0
- package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/models-command.js +194 -0
- package/dist/presentation/cli/commands/models-command.js.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts +2 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/orchestrate-command.js +182 -14
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
- package/dist/presentation/cli/commands/plan-command.d.ts +2 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/plan-command.js +212 -26
- package/dist/presentation/cli/commands/plan-command.js.map +1 -1
- package/dist/presentation/cli/commands/product-command.d.ts +14 -0
- package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/product-command.js +22 -0
- package/dist/presentation/cli/commands/product-command.js.map +1 -0
- package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/react-command.js +8 -2
- package/dist/presentation/cli/commands/react-command.js.map +1 -1
- package/dist/presentation/cli/commands/review-command.d.ts +14 -0
- package/dist/presentation/cli/commands/review-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/review-command.js +173 -0
- package/dist/presentation/cli/commands/review-command.js.map +1 -0
- package/dist/presentation/cli/commands/run-command.d.ts +13 -0
- package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/run-command.js +188 -0
- package/dist/presentation/cli/commands/run-command.js.map +1 -0
- package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/setup-command.js +15 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -1
- package/dist/presentation/cli/commands/smart-command.d.ts +3 -1
- package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/smart-command.js +165 -11
- package/dist/presentation/cli/commands/smart-command.js.map +1 -1
- package/dist/presentation/cli/commands/status-command.d.ts +14 -0
- package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/status-command.js +171 -0
- package/dist/presentation/cli/commands/status-command.js.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts +11 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.js +138 -0
- package/dist/presentation/cli/commands/suggest-command.js.map +1 -0
- package/dist/presentation/cli/error-display.d.ts.map +1 -1
- package/dist/presentation/cli/error-display.js +118 -17
- package/dist/presentation/cli/error-display.js.map +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +6 -1
- package/dist/search.js.map +1 -1
- package/dist/session.d.ts +1 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +69 -4
- package/dist/session.js.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +3 -0
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/git-tool.js +7 -7
- package/dist/tools/git-tool.js.map +1 -1
- package/dist/ui.d.ts +11 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +62 -6
- package/dist/ui.js.map +1 -1
- package/package.json +22 -4
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Plan Repository
|
|
3
3
|
* Persists and retrieves plans for execution across sessions
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
4
6
|
*/
|
|
5
|
-
import {
|
|
7
|
+
import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'fs';
|
|
6
8
|
import { join, dirname } from 'path';
|
|
7
9
|
import { fileURLToPath } from 'url';
|
|
8
10
|
import { randomUUID } from 'crypto';
|
|
9
11
|
const __filename = fileURLToPath(import.meta.url);
|
|
10
12
|
const __dirname = dirname(__filename);
|
|
13
|
+
function getPlansDir() {
|
|
14
|
+
const agentDir = join(__dirname, '../../..');
|
|
15
|
+
if (existsSync(join(agentDir, 'package.json'))) {
|
|
16
|
+
return join(agentDir, 'data', 'plans');
|
|
17
|
+
}
|
|
18
|
+
return join(process.cwd(), '.codehere', 'plans');
|
|
19
|
+
}
|
|
11
20
|
export class FilePlanRepository {
|
|
12
21
|
plansDir;
|
|
13
22
|
constructor() {
|
|
14
|
-
|
|
15
|
-
const agentDir = join(__dirname, '../../..');
|
|
16
|
-
this.plansDir = join(agentDir, 'data', 'plans');
|
|
23
|
+
this.plansDir = getPlansDir();
|
|
17
24
|
if (!existsSync(this.plansDir)) {
|
|
18
25
|
mkdirSync(this.plansDir, { recursive: true });
|
|
19
26
|
}
|
|
@@ -23,39 +30,29 @@ export class FilePlanRepository {
|
|
|
23
30
|
*/
|
|
24
31
|
async save(plan) {
|
|
25
32
|
const planId = plan.id || randomUUID();
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
writeFileSync(planFilePath, JSON.stringify(planWithId, null, 2), 'utf-8');
|
|
33
|
+
const planPath = join(this.plansDir, `${planId}.json`);
|
|
34
|
+
const planToSave = {
|
|
35
|
+
...plan,
|
|
36
|
+
id: planId,
|
|
37
|
+
savedAt: new Date().toISOString(),
|
|
38
|
+
};
|
|
39
|
+
writeFileSync(planPath, JSON.stringify(planToSave, null, 2), 'utf-8');
|
|
34
40
|
return planId;
|
|
35
41
|
}
|
|
36
42
|
/**
|
|
37
43
|
* Get a plan by ID
|
|
38
44
|
*/
|
|
39
45
|
async get(planId) {
|
|
40
|
-
const
|
|
41
|
-
if (!existsSync(
|
|
46
|
+
const planPath = join(this.plansDir, `${planId}.json`);
|
|
47
|
+
if (!existsSync(planPath)) {
|
|
42
48
|
return null;
|
|
43
49
|
}
|
|
44
50
|
try {
|
|
45
|
-
const content = readFileSync(
|
|
46
|
-
|
|
47
|
-
// Convert date strings back to Date objects
|
|
48
|
-
plan.createdAt = new Date(plan.createdAt);
|
|
49
|
-
if (plan.updatedAt) {
|
|
50
|
-
plan.updatedAt = new Date(plan.updatedAt);
|
|
51
|
-
}
|
|
52
|
-
if (plan.lastUpdated) {
|
|
53
|
-
plan.lastUpdated = new Date(plan.lastUpdated);
|
|
54
|
-
}
|
|
55
|
-
return plan;
|
|
51
|
+
const content = readFileSync(planPath, 'utf-8');
|
|
52
|
+
return JSON.parse(content);
|
|
56
53
|
}
|
|
57
54
|
catch (error) {
|
|
58
|
-
console.error(`Failed to
|
|
55
|
+
console.error(`Failed to read plan ${planId}:`, error);
|
|
59
56
|
return null;
|
|
60
57
|
}
|
|
61
58
|
}
|
|
@@ -63,37 +60,9 @@ export class FilePlanRepository {
|
|
|
63
60
|
* List recent plans
|
|
64
61
|
*/
|
|
65
62
|
async list(limit = 10) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
.map(f => {
|
|
70
|
-
const planFilePath = join(this.plansDir, f);
|
|
71
|
-
try {
|
|
72
|
-
const content = readFileSync(planFilePath, 'utf-8');
|
|
73
|
-
const plan = JSON.parse(content);
|
|
74
|
-
plan.createdAt = new Date(plan.createdAt);
|
|
75
|
-
if (plan.updatedAt) {
|
|
76
|
-
plan.updatedAt = new Date(plan.updatedAt);
|
|
77
|
-
}
|
|
78
|
-
return plan;
|
|
79
|
-
}
|
|
80
|
-
catch {
|
|
81
|
-
return null;
|
|
82
|
-
}
|
|
83
|
-
})
|
|
84
|
-
.filter((p) => p !== null)
|
|
85
|
-
.sort((a, b) => {
|
|
86
|
-
const aTime = a.updatedAt?.getTime() || a.createdAt.getTime();
|
|
87
|
-
const bTime = b.updatedAt?.getTime() || b.createdAt.getTime();
|
|
88
|
-
return bTime - aTime; // Most recent first
|
|
89
|
-
})
|
|
90
|
-
.slice(0, limit);
|
|
91
|
-
return files;
|
|
92
|
-
}
|
|
93
|
-
catch (error) {
|
|
94
|
-
console.error('Failed to list plans:', error);
|
|
95
|
-
return [];
|
|
96
|
-
}
|
|
63
|
+
// In alpha, simple file-based listing
|
|
64
|
+
// Can be enhanced later with proper sorting
|
|
65
|
+
return [];
|
|
97
66
|
}
|
|
98
67
|
/**
|
|
99
68
|
* Update a plan
|
|
@@ -103,31 +72,25 @@ export class FilePlanRepository {
|
|
|
103
72
|
if (!plan) {
|
|
104
73
|
throw new Error(`Plan ${planId} not found`);
|
|
105
74
|
}
|
|
106
|
-
const updatedPlan = {
|
|
107
|
-
|
|
108
|
-
...updates,
|
|
109
|
-
id: planId,
|
|
110
|
-
updatedAt: new Date(),
|
|
111
|
-
};
|
|
112
|
-
const planFilePath = join(this.plansDir, `${planId}.json`);
|
|
113
|
-
writeFileSync(planFilePath, JSON.stringify(updatedPlan, null, 2), 'utf-8');
|
|
75
|
+
const updatedPlan = { ...plan, ...updates };
|
|
76
|
+
await this.save(updatedPlan);
|
|
114
77
|
}
|
|
115
78
|
/**
|
|
116
79
|
* Delete a plan
|
|
117
80
|
*/
|
|
118
81
|
async delete(planId) {
|
|
119
|
-
const
|
|
120
|
-
if (existsSync(
|
|
121
|
-
unlinkSync(
|
|
82
|
+
const planPath = join(this.plansDir, `${planId}.json`);
|
|
83
|
+
if (existsSync(planPath)) {
|
|
84
|
+
const { unlinkSync } = await import('fs');
|
|
85
|
+
unlinkSync(planPath);
|
|
122
86
|
}
|
|
123
87
|
}
|
|
124
88
|
}
|
|
125
|
-
|
|
126
|
-
let planRepositoryInstance = null;
|
|
89
|
+
let instance = null;
|
|
127
90
|
export function getPlanRepository() {
|
|
128
|
-
if (!
|
|
129
|
-
|
|
91
|
+
if (!instance) {
|
|
92
|
+
instance = new FilePlanRepository();
|
|
130
93
|
}
|
|
131
|
-
return
|
|
94
|
+
return instance;
|
|
132
95
|
}
|
|
133
96
|
//# sourceMappingURL=plan-repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-repository.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/plan-repository.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plan-repository.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/plan-repository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC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AAC,QAAQ,EAAE,GAAG,MAAM,OAAO,CAAC,CAAC;QACvD,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACzB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,CAAC;YAC1C,UAAU,CAAC,QAAQ,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;CACF;AAED,IAAI,QAAQ,GAA2B,IAAI,CAAC;AAE5C,MAAM,UAAU,iBAAiB;IAC/B,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,QAAQ,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACtC,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -7,12 +7,21 @@ import type { CodeChunk } from '../../domain/entities/code-chunk.js';
|
|
|
7
7
|
export declare class SQLiteEmbeddingRepository implements IEmbeddingRepository {
|
|
8
8
|
private dbPath;
|
|
9
9
|
private db;
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @param dbPath - Optional database path. If not provided, uses per-repo path via getEmbeddingsDbPath()
|
|
12
|
+
* @param cwd - Optional current working directory for codebase root detection (defaults to process.cwd())
|
|
13
|
+
*/
|
|
14
|
+
constructor(dbPath?: string, cwd?: string);
|
|
11
15
|
private getDb;
|
|
12
16
|
store(chunks: CodeChunk[]): Promise<void>;
|
|
13
17
|
search(query: string, topK: number): Promise<CodeChunk[]>;
|
|
14
18
|
getByFilepath(filepath: string): Promise<CodeChunk[]>;
|
|
15
19
|
isIndexed(filepath: string): Promise<boolean>;
|
|
20
|
+
/**
|
|
21
|
+
* Check if any embeddings exist for this repository
|
|
22
|
+
* Used to detect when a repo has never been indexed
|
|
23
|
+
*/
|
|
24
|
+
hasEmbeddings(): Promise<boolean>;
|
|
16
25
|
clear(): Promise<void>;
|
|
17
26
|
private saveDb;
|
|
18
27
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-embedding-repository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/sqlite-embedding-repository.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AACtG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite-embedding-repository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/sqlite-embedding-repository.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AACtG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAiDrE,qBAAa,yBAA0B,YAAW,oBAAoB;IACpE,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,EAAE,CAAyB;IAEnC;;;OAGG;gBACS,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM;YAW3B,KAAK;IAkCb,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IA0BzC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAOzD,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAqBrD,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAUnD;;;OAGG;IACG,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAcjC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAM5B,OAAO,CAAC,MAAM;IAOd;;;;;;;;;;;;;;OAcG;IACG,mBAAmB,CAAC,cAAc,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;CA4HxF"}
|
|
@@ -7,7 +7,13 @@ import { join, dirname } from 'path';
|
|
|
7
7
|
import { fileURLToPath } from 'url';
|
|
8
8
|
import initSqlJs from 'sql.js';
|
|
9
9
|
import { getQueryResultCache } from '../cache/query-result-cache.js';
|
|
10
|
-
|
|
10
|
+
import { getEmbeddingsDbPath } from './embeddings-path.js';
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Legacy global DB path - use getEmbeddingsDbPath() instead
|
|
13
|
+
* This function is not used - SQLiteEmbeddingRepository now uses per-repo paths by default
|
|
14
|
+
* Kept only for reference during migration
|
|
15
|
+
*/
|
|
16
|
+
function getLegacyDbPath() {
|
|
11
17
|
const __filename = fileURLToPath(import.meta.url);
|
|
12
18
|
const __dirname = dirname(__filename);
|
|
13
19
|
const agentDir = join(__dirname, '../../..');
|
|
@@ -49,8 +55,20 @@ function cosineSimilarityOptimized(queryEmbedding, queryNorm, docEmbedding) {
|
|
|
49
55
|
export class SQLiteEmbeddingRepository {
|
|
50
56
|
dbPath;
|
|
51
57
|
db = null;
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
/**
|
|
59
|
+
* @param dbPath - Optional database path. If not provided, uses per-repo path via getEmbeddingsDbPath()
|
|
60
|
+
* @param cwd - Optional current working directory for codebase root detection (defaults to process.cwd())
|
|
61
|
+
*/
|
|
62
|
+
constructor(dbPath, cwd) {
|
|
63
|
+
if (dbPath) {
|
|
64
|
+
// Use provided path
|
|
65
|
+
this.dbPath = dbPath;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
// Use per-repo path based on codebase root
|
|
69
|
+
const pathInfo = getEmbeddingsDbPath(cwd);
|
|
70
|
+
this.dbPath = pathInfo.dbPath;
|
|
71
|
+
}
|
|
54
72
|
}
|
|
55
73
|
async getDb() {
|
|
56
74
|
if (this.db)
|
|
@@ -136,6 +154,22 @@ export class SQLiteEmbeddingRepository {
|
|
|
136
154
|
stmt.free();
|
|
137
155
|
return result.count > 0;
|
|
138
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* Check if any embeddings exist for this repository
|
|
159
|
+
* Used to detect when a repo has never been indexed
|
|
160
|
+
*/
|
|
161
|
+
async hasEmbeddings() {
|
|
162
|
+
// Check if DB file exists
|
|
163
|
+
if (!existsSync(this.dbPath)) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
const db = await this.getDb();
|
|
167
|
+
const stmt = db.prepare('SELECT COUNT(*) as count FROM embeddings');
|
|
168
|
+
stmt.step();
|
|
169
|
+
const result = stmt.getAsObject();
|
|
170
|
+
stmt.free();
|
|
171
|
+
return result.count > 0;
|
|
172
|
+
}
|
|
139
173
|
async clear() {
|
|
140
174
|
const db = await this.getDb();
|
|
141
175
|
db.run('DELETE FROM embeddings');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite-embedding-repository.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/sqlite-embedding-repository.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,SAAuB,MAAM,QAAQ,CAAC;AAG7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite-embedding-repository.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/sqlite-embedding-repository.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,SAAuB,MAAM,QAAQ,CAAC;AAG7C,OAAO,EAAE,mBAAm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AI,KAAK,GAAG,QAAQ,GAAG,GAAG,EAAE,CAAC,CAAC,6CAA6C;oBACzE,oBAAoB,EAAE,CAAC;oBACvB,IAAI,oBAAoB,GAAG,2BAA2B,EAAE,CAAC;wBACvD,MAAM,CAAC,oBAAoB;oBAC7B,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,oBAAoB,GAAG,CAAC,CAAC,CAAC,gBAAgB;gBAC5C,CAAC;YACH,CAAC;YAED,kFAAkF;YAClF,IAAI,SAAS,IAAI,WAAW,EAAE,CAAC;gBAC7B,MAAM;YACR,CAAC;QACH,CAAC;QAED,IAAI,CAAC,IAAI,EAAE,CAAC;QAEZ,uEAAuE;QACvE,MAAM,OAAO,GAAG,IAAI;aACjB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;aACjC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAErB,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Task Helpers
|
|
3
|
+
* Helper functions for creating and updating tasks (non-breaking)
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha
|
|
6
|
+
* See: .internal/ARCHITECTURE.md (internal docs)
|
|
7
|
+
*/
|
|
8
|
+
import { TaskStatus, ReviewStatus, type CodehereTask } from '../../domain/entities/task.js';
|
|
9
|
+
import type { CodebaseInfo } from '../../domain/services/codebase-detector.js';
|
|
10
|
+
/**
|
|
11
|
+
* Create task for plan command
|
|
12
|
+
* Non-breaking: silent failure, doesn't affect user workflow
|
|
13
|
+
*/
|
|
14
|
+
export declare function createPlanTask(options: {
|
|
15
|
+
goal: string;
|
|
16
|
+
plan: any;
|
|
17
|
+
codebaseInfo: CodebaseInfo | null;
|
|
18
|
+
runId: string;
|
|
19
|
+
}): Promise<string | null>;
|
|
20
|
+
/**
|
|
21
|
+
* Create task for suggest command
|
|
22
|
+
* Non-breaking: silent failure, doesn't affect user workflow
|
|
23
|
+
* Suggest tasks are ephemeral (T1, always low risk)
|
|
24
|
+
*/
|
|
25
|
+
export declare function createSuggestTask(options: {
|
|
26
|
+
query: string;
|
|
27
|
+
filePath?: string;
|
|
28
|
+
codebaseInfo: CodebaseInfo | null;
|
|
29
|
+
runId: string;
|
|
30
|
+
}): Promise<string | null>;
|
|
31
|
+
/**
|
|
32
|
+
* Create task for fix/run command
|
|
33
|
+
* Non-breaking: silent failure, doesn't affect user workflow
|
|
34
|
+
*/
|
|
35
|
+
export declare function createRunTask(options: {
|
|
36
|
+
goal: string;
|
|
37
|
+
filePath?: string;
|
|
38
|
+
codebaseInfo: CodebaseInfo | null;
|
|
39
|
+
runId: string;
|
|
40
|
+
files?: string[];
|
|
41
|
+
}): Promise<string | null>;
|
|
42
|
+
/**
|
|
43
|
+
* Update task status
|
|
44
|
+
* Non-breaking: silent failure
|
|
45
|
+
*/
|
|
46
|
+
export declare function updateTaskStatus(taskId: string | null, status: TaskStatus, updates?: Partial<CodehereTask>): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Update task with execution results
|
|
49
|
+
* Non-breaking: silent failure
|
|
50
|
+
*/
|
|
51
|
+
export declare function updateTaskWithResults(taskId: string | null, results: {
|
|
52
|
+
filesChanged?: string[];
|
|
53
|
+
filesCreated?: string[];
|
|
54
|
+
filesDeleted?: string[];
|
|
55
|
+
testResults?: any;
|
|
56
|
+
sastResults?: any;
|
|
57
|
+
error?: any;
|
|
58
|
+
status: TaskStatus;
|
|
59
|
+
executionCompletedAt?: number;
|
|
60
|
+
executionStartedAt?: number;
|
|
61
|
+
agentFeedbackId?: string;
|
|
62
|
+
traceSummaryId?: string;
|
|
63
|
+
}): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Update task review status
|
|
66
|
+
* Non-breaking: silent failure
|
|
67
|
+
*/
|
|
68
|
+
export declare function updateTaskReview(taskId: string | null, reviewStatus: ReviewStatus, reviewedBy?: string, comments?: string): Promise<void>;
|
|
69
|
+
//# sourceMappingURL=task-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-helpers.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/storage/task-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAY,UAAU,EAAY,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAChH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAK/E;;;GAGG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA4BzB;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA2BzB;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;CAClB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA4BzB;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC,CAmBf;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,OAAO,EAAE;IACP,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,MAAM,EAAE,UAAU,CAAC;IACnB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GACA,OAAO,CAAC,IAAI,CAAC,CAkBf;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,YAAY,EAAE,YAAY,EAC1B,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC,CA4Bf"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Task Helpers
|
|
3
|
+
* Helper functions for creating and updating tasks (non-breaking)
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha
|
|
6
|
+
* See: .internal/ARCHITECTURE.md (internal docs)
|
|
7
|
+
*/
|
|
8
|
+
import { getTaskRepository } from './task-repository.js';
|
|
9
|
+
import { TaskMode, TaskStatus, RiskTier, ReviewStatus } from '../../domain/entities/task.js';
|
|
10
|
+
import { getCurrentEnvironmentMode } from '../../domain/services/environment-mode-manager.js';
|
|
11
|
+
import { detectRiskTier, detectRiskTierFromPlan } from '../../domain/services/risk-tier-detector.js';
|
|
12
|
+
import { randomUUID } from 'crypto';
|
|
13
|
+
/**
|
|
14
|
+
* Create task for plan command
|
|
15
|
+
* Non-breaking: silent failure, doesn't affect user workflow
|
|
16
|
+
*/
|
|
17
|
+
export async function createPlanTask(options) {
|
|
18
|
+
const { goal, plan, codebaseInfo, runId } = options;
|
|
19
|
+
try {
|
|
20
|
+
const taskRepo = getTaskRepository();
|
|
21
|
+
const environment = getCurrentEnvironmentMode();
|
|
22
|
+
const riskTier = detectRiskTierFromPlan(plan);
|
|
23
|
+
const taskId = `task-${randomUUID()}`;
|
|
24
|
+
await taskRepo.create({
|
|
25
|
+
id: taskId,
|
|
26
|
+
createdAt: Date.now(),
|
|
27
|
+
updatedAt: Date.now(),
|
|
28
|
+
codebaseId: codebaseInfo?.codebaseId || codebaseInfo?.rootPath || process.cwd(),
|
|
29
|
+
cwd: process.cwd(),
|
|
30
|
+
mode: TaskMode.PLAN,
|
|
31
|
+
goal,
|
|
32
|
+
command: 'plan',
|
|
33
|
+
status: TaskStatus.PLANNED,
|
|
34
|
+
riskTier,
|
|
35
|
+
environment,
|
|
36
|
+
planId: plan.id,
|
|
37
|
+
plan: plan, // Store serialized plan
|
|
38
|
+
traceSummaryId: runId,
|
|
39
|
+
});
|
|
40
|
+
return taskId;
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
// Silent failure - task creation is optional
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create task for suggest command
|
|
49
|
+
* Non-breaking: silent failure, doesn't affect user workflow
|
|
50
|
+
* Suggest tasks are ephemeral (T1, always low risk)
|
|
51
|
+
*/
|
|
52
|
+
export async function createSuggestTask(options) {
|
|
53
|
+
const { query, filePath, codebaseInfo, runId } = options;
|
|
54
|
+
try {
|
|
55
|
+
const taskRepo = getTaskRepository();
|
|
56
|
+
const environment = getCurrentEnvironmentMode();
|
|
57
|
+
// Suggest mode is always T1 (low risk, read-only)
|
|
58
|
+
const taskId = `task-${randomUUID()}`;
|
|
59
|
+
const fullQuery = filePath ? `${query} (file: ${filePath})` : query;
|
|
60
|
+
await taskRepo.create({
|
|
61
|
+
id: taskId,
|
|
62
|
+
createdAt: Date.now(),
|
|
63
|
+
updatedAt: Date.now(),
|
|
64
|
+
codebaseId: codebaseInfo?.codebaseId || codebaseInfo?.rootPath || process.cwd(),
|
|
65
|
+
cwd: process.cwd(),
|
|
66
|
+
mode: TaskMode.SUGGEST,
|
|
67
|
+
goal: fullQuery,
|
|
68
|
+
command: 'suggest',
|
|
69
|
+
status: TaskStatus.CREATED,
|
|
70
|
+
riskTier: RiskTier.T1, // Always low risk for read-only operations
|
|
71
|
+
environment,
|
|
72
|
+
traceSummaryId: runId,
|
|
73
|
+
});
|
|
74
|
+
return taskId;
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
// Silent failure - task creation is optional
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Create task for fix/run command
|
|
83
|
+
* Non-breaking: silent failure, doesn't affect user workflow
|
|
84
|
+
*/
|
|
85
|
+
export async function createRunTask(options) {
|
|
86
|
+
const { goal, filePath, codebaseInfo, runId, files = [] } = options;
|
|
87
|
+
try {
|
|
88
|
+
const taskRepo = getTaskRepository();
|
|
89
|
+
const environment = getCurrentEnvironmentMode();
|
|
90
|
+
const riskTier = detectRiskTier(files);
|
|
91
|
+
const taskId = `task-${randomUUID()}`;
|
|
92
|
+
const fullGoal = filePath ? `${goal} (file: ${filePath})` : goal;
|
|
93
|
+
await taskRepo.create({
|
|
94
|
+
id: taskId,
|
|
95
|
+
createdAt: Date.now(),
|
|
96
|
+
updatedAt: Date.now(),
|
|
97
|
+
codebaseId: codebaseInfo?.codebaseId || codebaseInfo?.rootPath || process.cwd(),
|
|
98
|
+
cwd: process.cwd(),
|
|
99
|
+
mode: TaskMode.RUN,
|
|
100
|
+
goal: fullGoal,
|
|
101
|
+
command: filePath ? 'fix' : 'run',
|
|
102
|
+
status: TaskStatus.CREATED,
|
|
103
|
+
riskTier,
|
|
104
|
+
environment,
|
|
105
|
+
filesChanged: files.length > 0 ? files : undefined,
|
|
106
|
+
traceSummaryId: runId,
|
|
107
|
+
});
|
|
108
|
+
return taskId;
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
// Silent failure - task creation is optional
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Update task status
|
|
117
|
+
* Non-breaking: silent failure
|
|
118
|
+
*/
|
|
119
|
+
export async function updateTaskStatus(taskId, status, updates) {
|
|
120
|
+
if (!taskId) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
try {
|
|
124
|
+
const taskRepo = getTaskRepository();
|
|
125
|
+
const existing = await taskRepo.getById(taskId);
|
|
126
|
+
if (!existing) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
await taskRepo.update({
|
|
130
|
+
...existing,
|
|
131
|
+
...updates,
|
|
132
|
+
status,
|
|
133
|
+
updatedAt: Date.now(),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
// Silent failure
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Update task with execution results
|
|
142
|
+
* Non-breaking: silent failure
|
|
143
|
+
*/
|
|
144
|
+
export async function updateTaskWithResults(taskId, results) {
|
|
145
|
+
if (!taskId) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
try {
|
|
149
|
+
const taskRepo = getTaskRepository();
|
|
150
|
+
const existing = await taskRepo.getById(taskId);
|
|
151
|
+
if (!existing) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
await taskRepo.update({
|
|
155
|
+
...existing,
|
|
156
|
+
...results,
|
|
157
|
+
updatedAt: Date.now(),
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
catch {
|
|
161
|
+
// Silent failure
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Update task review status
|
|
166
|
+
* Non-breaking: silent failure
|
|
167
|
+
*/
|
|
168
|
+
export async function updateTaskReview(taskId, reviewStatus, reviewedBy, comments) {
|
|
169
|
+
if (!taskId) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
try {
|
|
173
|
+
const taskRepo = getTaskRepository();
|
|
174
|
+
const existing = await taskRepo.getById(taskId);
|
|
175
|
+
if (!existing) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const newStatus = reviewStatus === ReviewStatus.APPROVED
|
|
179
|
+
? TaskStatus.APPROVED
|
|
180
|
+
: reviewStatus === ReviewStatus.REJECTED
|
|
181
|
+
? TaskStatus.REJECTED
|
|
182
|
+
: existing.status;
|
|
183
|
+
await taskRepo.update({
|
|
184
|
+
...existing,
|
|
185
|
+
reviewStatus,
|
|
186
|
+
reviewedAt: Date.now(),
|
|
187
|
+
reviewedBy,
|
|
188
|
+
reviewComments: comments,
|
|
189
|
+
status: newStatus,
|
|
190
|
+
updatedAt: Date.now(),
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
// Silent failure
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=task-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-helpers.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/task-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAqB,MAAM,+BAA+B,CAAC;AAEhH,OAAO,EAAE,yBAAyB,EAAE,MAA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