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
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Task Repository
|
|
3
|
+
* Task storage and retrieval using JSONL format
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha
|
|
6
|
+
* See: .internal/ARCHITECTURE.md (internal docs)
|
|
7
|
+
*/
|
|
8
|
+
import type { CodehereTask } from '../../domain/entities/task.js';
|
|
9
|
+
import { TaskStatus, TaskMode } from '../../domain/entities/task.js';
|
|
10
|
+
export interface TaskRepository {
|
|
11
|
+
create(task: CodehereTask): Promise<void>;
|
|
12
|
+
getById(id: string): Promise<CodehereTask | null>;
|
|
13
|
+
getByStatus(status: TaskStatus): Promise<CodehereTask[]>;
|
|
14
|
+
getByMode(mode: TaskMode): Promise<CodehereTask[]>;
|
|
15
|
+
getRecent(limit: number): Promise<CodehereTask[]>;
|
|
16
|
+
update(task: CodehereTask): Promise<void>;
|
|
17
|
+
getAll(): Promise<CodehereTask[]>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* JSONL-based task repository
|
|
21
|
+
* Stores tasks in .codehere/tasks.jsonl at codebase root
|
|
22
|
+
*/
|
|
23
|
+
export declare class JsonlTaskRepository implements TaskRepository {
|
|
24
|
+
private tasksPath;
|
|
25
|
+
private tasksCache;
|
|
26
|
+
private cacheLoaded;
|
|
27
|
+
constructor(customPath?: string);
|
|
28
|
+
/**
|
|
29
|
+
* Load tasks from JSONL file into cache
|
|
30
|
+
* For duplicate IDs, keeps the latest version (by updatedAt)
|
|
31
|
+
* Optimized for large files with early exit on timeout
|
|
32
|
+
*/
|
|
33
|
+
private loadTasks;
|
|
34
|
+
/**
|
|
35
|
+
* Create a new task
|
|
36
|
+
*/
|
|
37
|
+
create(task: CodehereTask): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Get task by ID (returns latest version if multiple exist)
|
|
40
|
+
*/
|
|
41
|
+
getById(id: string): Promise<CodehereTask | null>;
|
|
42
|
+
/**
|
|
43
|
+
* Get tasks by status
|
|
44
|
+
*/
|
|
45
|
+
getByStatus(status: TaskStatus): Promise<CodehereTask[]>;
|
|
46
|
+
/**
|
|
47
|
+
* Get tasks by mode
|
|
48
|
+
*/
|
|
49
|
+
getByMode(mode: TaskMode): Promise<CodehereTask[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Get recent tasks (latest updated first)
|
|
52
|
+
*/
|
|
53
|
+
getRecent(limit?: number): Promise<CodehereTask[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Get all tasks (latest version of each)
|
|
56
|
+
*/
|
|
57
|
+
getAll(): Promise<CodehereTask[]>;
|
|
58
|
+
/**
|
|
59
|
+
* Update existing task
|
|
60
|
+
* Creates a new entry in JSONL (append-only)
|
|
61
|
+
*/
|
|
62
|
+
update(task: CodehereTask): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Get task repository instance
|
|
66
|
+
*/
|
|
67
|
+
export declare function getTaskRepository(customPath?: string): TaskRepository;
|
|
68
|
+
//# sourceMappingURL=task-repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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AY,EAAE,CAAC;IAM9D;;OAEG;IACG,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAMxD;;OAEG;IACG,SAAS,CAAC,KAAK,GAAE,MAAW,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAQ5D;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;IAKvC;;;OAGG;IACG,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;CAuBhD;AAKD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,cAAc,CAKrE"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Task Repository
|
|
3
|
+
* Task storage and retrieval using JSONL format
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha
|
|
6
|
+
* See: .internal/ARCHITECTURE.md (internal docs)
|
|
7
|
+
*/
|
|
8
|
+
import { appendFileSync, readFileSync, existsSync, mkdirSync } from 'fs';
|
|
9
|
+
import { join, dirname } from 'path';
|
|
10
|
+
import { findCodebaseRoot } from '../../domain/services/codebase-detector.js';
|
|
11
|
+
/**
|
|
12
|
+
* JSONL-based task repository
|
|
13
|
+
* Stores tasks in .codehere/tasks.jsonl at codebase root
|
|
14
|
+
*/
|
|
15
|
+
export class JsonlTaskRepository {
|
|
16
|
+
tasksPath;
|
|
17
|
+
tasksCache = new Map();
|
|
18
|
+
cacheLoaded = false;
|
|
19
|
+
constructor(customPath) {
|
|
20
|
+
if (customPath) {
|
|
21
|
+
this.tasksPath = customPath;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
// Use environment variable or detect from codebase root
|
|
25
|
+
const envPath = process.env.CODEHERE_TASKS_PATH;
|
|
26
|
+
if (envPath) {
|
|
27
|
+
this.tasksPath = envPath;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
// Detect codebase root and use .codehere/tasks.jsonl
|
|
31
|
+
const codebaseInfo = findCodebaseRoot(process.cwd());
|
|
32
|
+
const codebaseRoot = codebaseInfo?.rootPath || process.cwd();
|
|
33
|
+
const codehereDir = join(codebaseRoot, '.codehere');
|
|
34
|
+
// Ensure .codehere directory exists
|
|
35
|
+
if (!existsSync(codehereDir)) {
|
|
36
|
+
mkdirSync(codehereDir, { recursive: true });
|
|
37
|
+
}
|
|
38
|
+
this.tasksPath = join(codehereDir, 'tasks.jsonl');
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// Ensure directory exists
|
|
42
|
+
const tasksDir = dirname(this.tasksPath);
|
|
43
|
+
if (!existsSync(tasksDir)) {
|
|
44
|
+
mkdirSync(tasksDir, { recursive: true });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Load tasks from JSONL file into cache
|
|
49
|
+
* For duplicate IDs, keeps the latest version (by updatedAt)
|
|
50
|
+
* Optimized for large files with early exit on timeout
|
|
51
|
+
*/
|
|
52
|
+
loadTasks() {
|
|
53
|
+
if (this.cacheLoaded) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (!existsSync(this.tasksPath)) {
|
|
57
|
+
this.cacheLoaded = true;
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
// Use streaming read for large files (limit to 10MB)
|
|
62
|
+
const { statSync } = require('fs');
|
|
63
|
+
const stats = statSync(this.tasksPath);
|
|
64
|
+
if (stats.size > 10 * 1024 * 1024) {
|
|
65
|
+
// File too large, use empty cache
|
|
66
|
+
this.cacheLoaded = true;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const content = readFileSync(this.tasksPath, 'utf-8');
|
|
70
|
+
const lines = content.trim().split('\n').filter(line => line.trim());
|
|
71
|
+
// Limit processing to first 10000 lines to prevent timeout
|
|
72
|
+
const linesToProcess = lines.slice(0, 10000);
|
|
73
|
+
// Load all tasks, then keep only the latest version of each ID
|
|
74
|
+
const allTasks = [];
|
|
75
|
+
for (const line of linesToProcess) {
|
|
76
|
+
try {
|
|
77
|
+
const task = JSON.parse(line);
|
|
78
|
+
allTasks.push(task);
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
// Skip invalid lines
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Group by ID and keep latest version
|
|
85
|
+
const taskMap = new Map();
|
|
86
|
+
for (const task of allTasks) {
|
|
87
|
+
const existing = taskMap.get(task.id);
|
|
88
|
+
if (!existing || task.updatedAt > existing.updatedAt) {
|
|
89
|
+
taskMap.set(task.id, task);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
this.tasksCache = taskMap;
|
|
93
|
+
this.cacheLoaded = true;
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
// Silent failure - don't break user workflow
|
|
97
|
+
this.cacheLoaded = true;
|
|
98
|
+
// Don't log errors in production to avoid noise
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Create a new task
|
|
103
|
+
*/
|
|
104
|
+
async create(task) {
|
|
105
|
+
// Ensure cache is loaded
|
|
106
|
+
this.loadTasks();
|
|
107
|
+
// Set timestamps if not provided
|
|
108
|
+
const now = Date.now();
|
|
109
|
+
const taskToCreate = {
|
|
110
|
+
...task,
|
|
111
|
+
createdAt: task.createdAt || now,
|
|
112
|
+
updatedAt: task.updatedAt || now,
|
|
113
|
+
};
|
|
114
|
+
// Add to cache
|
|
115
|
+
this.tasksCache.set(taskToCreate.id, taskToCreate);
|
|
116
|
+
// Append to JSONL file (append-only, immutable history)
|
|
117
|
+
try {
|
|
118
|
+
appendFileSync(this.tasksPath, JSON.stringify(taskToCreate) + '\n', 'utf-8');
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
// Silent failure - remove from cache if write failed
|
|
122
|
+
this.tasksCache.delete(taskToCreate.id);
|
|
123
|
+
console.error('[TaskRepository] Failed to create task:', error);
|
|
124
|
+
throw error;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get task by ID (returns latest version if multiple exist)
|
|
129
|
+
*/
|
|
130
|
+
async getById(id) {
|
|
131
|
+
this.loadTasks();
|
|
132
|
+
// Load all tasks and find the latest version of this ID
|
|
133
|
+
const allTasks = Array.from(this.tasksCache.values());
|
|
134
|
+
const tasksWithId = allTasks.filter(task => task.id === id);
|
|
135
|
+
if (tasksWithId.length === 0) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
// Return the task with the latest updatedAt timestamp
|
|
139
|
+
return tasksWithId.reduce((latest, current) => {
|
|
140
|
+
return current.updatedAt > latest.updatedAt ? current : latest;
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Get tasks by status
|
|
145
|
+
*/
|
|
146
|
+
async getByStatus(status) {
|
|
147
|
+
this.loadTasks();
|
|
148
|
+
const tasks = Array.from(this.tasksCache.values());
|
|
149
|
+
return tasks.filter(task => task.status === status);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get tasks by mode
|
|
153
|
+
*/
|
|
154
|
+
async getByMode(mode) {
|
|
155
|
+
this.loadTasks();
|
|
156
|
+
const tasks = Array.from(this.tasksCache.values());
|
|
157
|
+
return tasks.filter(task => task.mode === mode);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get recent tasks (latest updated first)
|
|
161
|
+
*/
|
|
162
|
+
async getRecent(limit = 10) {
|
|
163
|
+
this.loadTasks();
|
|
164
|
+
const tasks = Array.from(this.tasksCache.values());
|
|
165
|
+
return tasks
|
|
166
|
+
.sort((a, b) => b.updatedAt - a.updatedAt)
|
|
167
|
+
.slice(0, limit);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Get all tasks (latest version of each)
|
|
171
|
+
*/
|
|
172
|
+
async getAll() {
|
|
173
|
+
this.loadTasks();
|
|
174
|
+
return Array.from(this.tasksCache.values());
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Update existing task
|
|
178
|
+
* Creates a new entry in JSONL (append-only)
|
|
179
|
+
*/
|
|
180
|
+
async update(task) {
|
|
181
|
+
// Ensure cache is loaded
|
|
182
|
+
this.loadTasks();
|
|
183
|
+
// Update timestamp
|
|
184
|
+
const updatedTask = {
|
|
185
|
+
...task,
|
|
186
|
+
updatedAt: Date.now(),
|
|
187
|
+
};
|
|
188
|
+
// Update cache
|
|
189
|
+
this.tasksCache.set(updatedTask.id, updatedTask);
|
|
190
|
+
// Append updated version to JSONL (append-only, immutable history)
|
|
191
|
+
try {
|
|
192
|
+
appendFileSync(this.tasksPath, JSON.stringify(updatedTask) + '\n', 'utf-8');
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
// Revert cache if write failed
|
|
196
|
+
const original = await this.getById(task.id);
|
|
197
|
+
if (original) {
|
|
198
|
+
this.tasksCache.set(task.id, original);
|
|
199
|
+
}
|
|
200
|
+
console.error('[TaskRepository] Failed to update task:', error);
|
|
201
|
+
throw error;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
// Singleton instance (lazy initialization with codebase detection)
|
|
206
|
+
let taskRepositoryInstance = null;
|
|
207
|
+
/**
|
|
208
|
+
* Get task repository instance
|
|
209
|
+
*/
|
|
210
|
+
export function getTaskRepository(customPath) {
|
|
211
|
+
if (!taskRepositoryInstance || customPath) {
|
|
212
|
+
taskRepositoryInstance = new JsonlTaskRepository(customPath);
|
|
213
|
+
}
|
|
214
|
+
return taskRepositoryInstance;
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=task-repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-repository.js","sourceRoot":"","sources":["../../../src/infrastructure/storage/task-repository.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,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CAAC;YACf,+BAA+B;YAC/B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC7C,IAAI,QAAQ,EAAE,CAAC;gBACb,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;YACzC,CAAC;YACD,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,KAAK,CAAC,CAAC;YAChE,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF;AAED,mEAAmE;AACnE,IAAI,sBAAsB,GAA0B,IAAI,CAAC;AAEzD;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAmB;IACnD,IAAI,CAAC,sBAAsB,IAAI,UAAU,EAAE,CAAC;QAC1C,sBAAsB,GAAG,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,sBAAsB,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Telemetry Service
|
|
3
|
+
* Privacy-first, opt-in telemetry for understanding usage patterns
|
|
4
|
+
*
|
|
5
|
+
* Principles:
|
|
6
|
+
* - Opt-in only (CODEHERE_TELEMETRY_ENABLED=true)
|
|
7
|
+
* - No code/content transmitted
|
|
8
|
+
* - Anonymized data only
|
|
9
|
+
* - Local-first (stores locally, syncs if enabled)
|
|
10
|
+
*
|
|
11
|
+
* Clean Architecture: Infrastructure Layer
|
|
12
|
+
*/
|
|
13
|
+
export interface TelemetryEvent {
|
|
14
|
+
id: string;
|
|
15
|
+
timestamp: number;
|
|
16
|
+
eventType: 'install' | 'command' | 'error' | 'feature_use';
|
|
17
|
+
data: {
|
|
18
|
+
command?: string;
|
|
19
|
+
version?: string;
|
|
20
|
+
os?: string;
|
|
21
|
+
nodeVersion?: string;
|
|
22
|
+
errorType?: string;
|
|
23
|
+
feature?: string;
|
|
24
|
+
};
|
|
25
|
+
sessionId: string;
|
|
26
|
+
anonymousId: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class TelemetryService {
|
|
29
|
+
private telemetryDir;
|
|
30
|
+
private eventsFile;
|
|
31
|
+
private configFile;
|
|
32
|
+
private enabled;
|
|
33
|
+
private anonymousId;
|
|
34
|
+
private sessionId;
|
|
35
|
+
constructor();
|
|
36
|
+
private findCodebaseRoot;
|
|
37
|
+
private loadConfig;
|
|
38
|
+
private generateAnonymousId;
|
|
39
|
+
private saveConfig;
|
|
40
|
+
/**
|
|
41
|
+
* Check if telemetry is enabled
|
|
42
|
+
*/
|
|
43
|
+
isEnabled(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Enable telemetry (opt-in)
|
|
46
|
+
*/
|
|
47
|
+
enable(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Disable telemetry
|
|
50
|
+
*/
|
|
51
|
+
disable(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Track an event
|
|
54
|
+
*/
|
|
55
|
+
track(eventType: TelemetryEvent['eventType'], data?: TelemetryEvent['data']): void;
|
|
56
|
+
/**
|
|
57
|
+
* Track command usage
|
|
58
|
+
*/
|
|
59
|
+
trackCommand(command: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* Track error
|
|
62
|
+
*/
|
|
63
|
+
trackError(errorType: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Track feature usage
|
|
66
|
+
*/
|
|
67
|
+
trackFeature(feature: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* Get telemetry status message
|
|
70
|
+
*/
|
|
71
|
+
getStatusMessage(): string;
|
|
72
|
+
}
|
|
73
|
+
export declare function getTelemetryService(): TelemetryService;
|
|
74
|
+
//# sourceMappingURL=telemetry-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-service.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/telemetry/telemetry-service.ts"],"names":[],"mappings":"AAAA;;;;;;;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AI,MAAM;CAM3B;AAKD,wBAAgB,mBAAmB,IAAI,gBAAgB,CAKtD"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Telemetry Service
|
|
3
|
+
* Privacy-first, opt-in telemetry for understanding usage patterns
|
|
4
|
+
*
|
|
5
|
+
* Principles:
|
|
6
|
+
* - Opt-in only (CODEHERE_TELEMETRY_ENABLED=true)
|
|
7
|
+
* - No code/content transmitted
|
|
8
|
+
* - Anonymized data only
|
|
9
|
+
* - Local-first (stores locally, syncs if enabled)
|
|
10
|
+
*
|
|
11
|
+
* Clean Architecture: Infrastructure Layer
|
|
12
|
+
*/
|
|
13
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync, appendFileSync } from 'fs';
|
|
14
|
+
import { join, dirname } from 'path';
|
|
15
|
+
import { fileURLToPath } from 'url';
|
|
16
|
+
import { randomUUID } from 'crypto';
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
+
const __dirname = dirname(__filename);
|
|
19
|
+
export class TelemetryService {
|
|
20
|
+
telemetryDir;
|
|
21
|
+
eventsFile;
|
|
22
|
+
configFile;
|
|
23
|
+
enabled = false;
|
|
24
|
+
anonymousId = '';
|
|
25
|
+
sessionId = '';
|
|
26
|
+
constructor() {
|
|
27
|
+
// Find codebase root
|
|
28
|
+
const codebaseRoot = this.findCodebaseRoot();
|
|
29
|
+
this.telemetryDir = join(codebaseRoot, '.codehere', 'telemetry');
|
|
30
|
+
this.eventsFile = join(this.telemetryDir, 'events.jsonl');
|
|
31
|
+
this.configFile = join(this.telemetryDir, 'config.json');
|
|
32
|
+
this.sessionId = randomUUID();
|
|
33
|
+
this.loadConfig();
|
|
34
|
+
}
|
|
35
|
+
findCodebaseRoot() {
|
|
36
|
+
let current = process.cwd();
|
|
37
|
+
while (current !== '/') {
|
|
38
|
+
if (existsSync(join(current, '.codehere'))) {
|
|
39
|
+
return current;
|
|
40
|
+
}
|
|
41
|
+
current = join(current, '..');
|
|
42
|
+
}
|
|
43
|
+
return process.cwd();
|
|
44
|
+
}
|
|
45
|
+
loadConfig() {
|
|
46
|
+
// Check environment variable first
|
|
47
|
+
const envEnabled = process.env.CODEHERE_TELEMETRY_ENABLED === 'true';
|
|
48
|
+
if (existsSync(this.configFile)) {
|
|
49
|
+
try {
|
|
50
|
+
const config = JSON.parse(readFileSync(this.configFile, 'utf-8'));
|
|
51
|
+
this.enabled = config.enabled || envEnabled;
|
|
52
|
+
this.anonymousId = config.anonymousId || this.generateAnonymousId();
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
this.enabled = envEnabled;
|
|
56
|
+
this.anonymousId = this.generateAnonymousId();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.enabled = envEnabled;
|
|
61
|
+
this.anonymousId = this.generateAnonymousId();
|
|
62
|
+
}
|
|
63
|
+
// Save config
|
|
64
|
+
this.saveConfig();
|
|
65
|
+
}
|
|
66
|
+
generateAnonymousId() {
|
|
67
|
+
// Generate a persistent anonymous ID (not tied to user identity)
|
|
68
|
+
return randomUUID();
|
|
69
|
+
}
|
|
70
|
+
saveConfig() {
|
|
71
|
+
if (!existsSync(this.telemetryDir)) {
|
|
72
|
+
mkdirSync(this.telemetryDir, { recursive: true });
|
|
73
|
+
}
|
|
74
|
+
writeFileSync(this.configFile, JSON.stringify({
|
|
75
|
+
enabled: this.enabled,
|
|
76
|
+
anonymousId: this.anonymousId,
|
|
77
|
+
enabledAt: this.enabled ? Date.now() : null,
|
|
78
|
+
}, null, 2));
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Check if telemetry is enabled
|
|
82
|
+
*/
|
|
83
|
+
isEnabled() {
|
|
84
|
+
return this.enabled;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Enable telemetry (opt-in)
|
|
88
|
+
*/
|
|
89
|
+
enable() {
|
|
90
|
+
this.enabled = true;
|
|
91
|
+
this.saveConfig();
|
|
92
|
+
this.track('install', {
|
|
93
|
+
version: process.env.npm_package_version || 'unknown',
|
|
94
|
+
os: process.platform,
|
|
95
|
+
nodeVersion: process.version,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Disable telemetry
|
|
100
|
+
*/
|
|
101
|
+
disable() {
|
|
102
|
+
this.enabled = false;
|
|
103
|
+
this.saveConfig();
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Track an event
|
|
107
|
+
*/
|
|
108
|
+
track(eventType, data = {}) {
|
|
109
|
+
if (!this.enabled) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const event = {
|
|
113
|
+
id: randomUUID(),
|
|
114
|
+
timestamp: Date.now(),
|
|
115
|
+
eventType,
|
|
116
|
+
data: {
|
|
117
|
+
...data,
|
|
118
|
+
version: data.version || process.env.npm_package_version || 'unknown',
|
|
119
|
+
os: data.os || process.platform,
|
|
120
|
+
nodeVersion: data.nodeVersion || process.version,
|
|
121
|
+
},
|
|
122
|
+
sessionId: this.sessionId,
|
|
123
|
+
anonymousId: this.anonymousId,
|
|
124
|
+
};
|
|
125
|
+
// Write to local file
|
|
126
|
+
if (!existsSync(this.telemetryDir)) {
|
|
127
|
+
mkdirSync(this.telemetryDir, { recursive: true });
|
|
128
|
+
}
|
|
129
|
+
appendFileSync(this.eventsFile, JSON.stringify(event) + '\n');
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Track command usage
|
|
133
|
+
*/
|
|
134
|
+
trackCommand(command) {
|
|
135
|
+
this.track('command', { command });
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Track error
|
|
139
|
+
*/
|
|
140
|
+
trackError(errorType) {
|
|
141
|
+
this.track('error', { errorType });
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Track feature usage
|
|
145
|
+
*/
|
|
146
|
+
trackFeature(feature) {
|
|
147
|
+
this.track('feature_use', { feature });
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Get telemetry status message
|
|
151
|
+
*/
|
|
152
|
+
getStatusMessage() {
|
|
153
|
+
if (this.enabled) {
|
|
154
|
+
return 'Telemetry: Enabled (opt-in)';
|
|
155
|
+
}
|
|
156
|
+
return 'Telemetry: Disabled (set CODEHERE_TELEMETRY_ENABLED=true to enable)';
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
// Singleton instance
|
|
160
|
+
let telemetryService = null;
|
|
161
|
+
export function getTelemetryService() {
|
|
162
|
+
if (!telemetryService) {
|
|
163
|
+
telemetryService = new TelemetryService();
|
|
164
|
+
}
|
|
165
|
+
return telemetryService;
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=telemetry-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry-service.js","sourceRoot":"","sources":["../../../src/infrastructure/telemetry/telemetry-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,IAAI,CAAC;AACxF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAkBtC,MAAM,OAAO,gBAAgB;IACnB,YAAY,CAAS;IACrB,UAAU,CAAS;IACnB,UAAU,CAAS;IACnB,OAAO,GAAY,KAAK,CAAC;IACzB,WAAW,GAAW,EAAE,CAAC;IACzB,SAAS,GAAW,EAAE,CAAC;IAE/B;QACE,qBAAqB;QACrB,MAAM,YAAY,GAAG,IAAI,CAA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Ae;QAC1B,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,6BAA6B,CAAC;QACvC,CAAC;QACD,OAAO,qEAAqE,CAAC;IAC/E,CAAC;CACF;AAED,qBAAqB;AACrB,IAAI,gBAAgB,GAA4B,IAAI,CAAC;AAErD,MAAM,UAAU,mBAAmB;IACjC,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC;IAC5C,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
|
|
@@ -90,8 +90,18 @@ export declare class BiDirectionalLearning {
|
|
|
90
90
|
getLearnedPatterns(userId: string): LearningPattern[];
|
|
91
91
|
/**
|
|
92
92
|
* Apply learned preferences to code generation
|
|
93
|
+
* Task 6.2: Enhanced to apply learned patterns and preferences
|
|
93
94
|
*/
|
|
94
95
|
applyPreferences(userId: string, code: string): string;
|
|
96
|
+
/**
|
|
97
|
+
* Task 6.2: Get learned patterns as prompt context for code generation
|
|
98
|
+
* Returns patterns formatted for inclusion in AI prompts
|
|
99
|
+
*/
|
|
100
|
+
getPatternsAsPromptContext(userId: string, maxPatterns?: number): string;
|
|
101
|
+
/**
|
|
102
|
+
* Task 6.2: Get user preferences as prompt context for code generation
|
|
103
|
+
*/
|
|
104
|
+
getPreferencesAsPromptContext(userId: string): string;
|
|
95
105
|
/**
|
|
96
106
|
* Get feedback history for user
|
|
97
107
|
*/
|
|
@@ -103,7 +113,19 @@ export declare class BiDirectionalLearning {
|
|
|
103
113
|
}): UserFeedback[];
|
|
104
114
|
private learnFromFeedback;
|
|
105
115
|
private updatePreferences;
|
|
116
|
+
/**
|
|
117
|
+
* Task 6.2: Enhanced pattern extraction from edits
|
|
118
|
+
* Extracts meaningful patterns from code edits for learning
|
|
119
|
+
*/
|
|
106
120
|
private extractPattern;
|
|
121
|
+
/**
|
|
122
|
+
* Task 6.2: Detect indentation style
|
|
123
|
+
*/
|
|
124
|
+
private detectIndentation;
|
|
125
|
+
/**
|
|
126
|
+
* Task 6.2: Detect naming convention changes
|
|
127
|
+
*/
|
|
128
|
+
private detectNamingChange;
|
|
107
129
|
private addLearningPattern;
|
|
108
130
|
}
|
|
109
131
|
//# sourceMappingURL=bi-directional-learning.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bi-directional-learning.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/bi-directional-learning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAC1G,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,G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AM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC/B,GACA,MAAM;IAcT;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe;IAYnD;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,EAAE;IAIrD
|
|
1
|
+
{"version":3,"file":"bi-directional-learning.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/bi-directional-learning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,mBAAmB,CAAC;AAC1G,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,CAAC;IACxD,OAAO,EAAE,MAAM,CAAC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