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
|
@@ -77,25 +77,83 @@ export class BiDirectionalLearning {
|
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* Apply learned preferences to code generation
|
|
80
|
+
* Task 6.2: Enhanced to apply learned patterns and preferences
|
|
80
81
|
*/
|
|
81
82
|
applyPreferences(userId, code) {
|
|
82
83
|
const preferences = this.getUserPreferences(userId);
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
const patterns = this.getLearnedPatterns(userId);
|
|
85
|
+
if (!preferences.preferences.codeStyle && patterns.length === 0) {
|
|
86
|
+
return code; // No preferences or patterns learned yet
|
|
85
87
|
}
|
|
86
88
|
// Apply basic style preferences (simplified - in production, use AST transformation)
|
|
87
89
|
let modifiedCode = code;
|
|
88
90
|
const style = preferences.preferences.codeStyle;
|
|
89
91
|
// Apply quote preference (basic example)
|
|
90
|
-
if (style
|
|
92
|
+
if (style?.quotes === 'single') {
|
|
91
93
|
modifiedCode = modifiedCode.replace(/"/g, "'");
|
|
92
94
|
}
|
|
93
|
-
else if (style
|
|
95
|
+
else if (style?.quotes === 'double') {
|
|
94
96
|
modifiedCode = modifiedCode.replace(/'/g, '"');
|
|
95
97
|
}
|
|
96
|
-
//
|
|
98
|
+
// Task 6.2: Apply learned patterns (high confidence patterns only)
|
|
99
|
+
for (const pattern of patterns) {
|
|
100
|
+
if (pattern.confidence >= 0.7 && pattern.type === 'correction') {
|
|
101
|
+
// Apply high-confidence correction patterns
|
|
102
|
+
// In production, use AST transformation for accurate pattern application
|
|
103
|
+
// For now, this is a placeholder for pattern application logic
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// In production, apply more sophisticated transformations based on preferences and patterns
|
|
97
107
|
return modifiedCode;
|
|
98
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Task 6.2: Get learned patterns as prompt context for code generation
|
|
111
|
+
* Returns patterns formatted for inclusion in AI prompts
|
|
112
|
+
*/
|
|
113
|
+
getPatternsAsPromptContext(userId, maxPatterns = 5) {
|
|
114
|
+
const patterns = this.getLearnedPatterns(userId)
|
|
115
|
+
.filter(p => p.confidence >= 0.6) // Only high-confidence patterns
|
|
116
|
+
.sort((a, b) => b.confidence - a.confidence) // Sort by confidence
|
|
117
|
+
.slice(0, maxPatterns);
|
|
118
|
+
if (patterns.length === 0) {
|
|
119
|
+
return '';
|
|
120
|
+
}
|
|
121
|
+
const contextLines = [
|
|
122
|
+
'Learned patterns from previous edits:',
|
|
123
|
+
...patterns.map(p => {
|
|
124
|
+
const examples = p.examples.slice(0, 2).join('; ');
|
|
125
|
+
return `- ${p.pattern} (confidence: ${(p.confidence * 100).toFixed(0)}%, seen ${p.occurrences}x)${examples ? ` - Examples: ${examples}` : ''}`;
|
|
126
|
+
}),
|
|
127
|
+
];
|
|
128
|
+
return contextLines.join('\n');
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Task 6.2: Get user preferences as prompt context for code generation
|
|
132
|
+
*/
|
|
133
|
+
getPreferencesAsPromptContext(userId) {
|
|
134
|
+
const preferences = this.getUserPreferences(userId);
|
|
135
|
+
if (!preferences.preferences.codeStyle) {
|
|
136
|
+
return '';
|
|
137
|
+
}
|
|
138
|
+
const style = preferences.preferences.codeStyle;
|
|
139
|
+
const contextLines = [];
|
|
140
|
+
if (style.indentation) {
|
|
141
|
+
contextLines.push(`- Indentation: ${style.indentation === 'spaces' ? 'Use spaces' : 'Use tabs'}`);
|
|
142
|
+
}
|
|
143
|
+
if (style.quotes) {
|
|
144
|
+
contextLines.push(`- Quotes: Use ${style.quotes} quotes`);
|
|
145
|
+
}
|
|
146
|
+
if (style.naming) {
|
|
147
|
+
contextLines.push(`- Naming: Use ${style.naming} convention`);
|
|
148
|
+
}
|
|
149
|
+
if (style.spacing) {
|
|
150
|
+
contextLines.push(`- Spacing: ${style.spacing} spacing style`);
|
|
151
|
+
}
|
|
152
|
+
if (contextLines.length === 0) {
|
|
153
|
+
return '';
|
|
154
|
+
}
|
|
155
|
+
return 'User code style preferences:\n' + contextLines.join('\n');
|
|
156
|
+
}
|
|
99
157
|
/**
|
|
100
158
|
* Get feedback history for user
|
|
101
159
|
*/
|
|
@@ -167,11 +225,90 @@ export class BiDirectionalLearning {
|
|
|
167
225
|
}
|
|
168
226
|
}
|
|
169
227
|
}
|
|
228
|
+
/**
|
|
229
|
+
* Task 6.2: Enhanced pattern extraction from edits
|
|
230
|
+
* Extracts meaningful patterns from code edits for learning
|
|
231
|
+
*/
|
|
170
232
|
extractPattern(original, modified) {
|
|
171
|
-
|
|
172
|
-
|
|
233
|
+
if (original.length === 0 || modified.length === 0) {
|
|
234
|
+
return null;
|
|
235
|
+
}
|
|
236
|
+
// Simple pattern extraction (in production, use AST diffing for better accuracy)
|
|
237
|
+
// For now, extract basic patterns:
|
|
238
|
+
// 1. Quote style changes
|
|
239
|
+
if (original.includes('"') && modified.includes("'") && !original.includes("'")) {
|
|
240
|
+
return 'Prefer single quotes over double quotes';
|
|
241
|
+
}
|
|
242
|
+
if (original.includes("'") && modified.includes('"') && !original.includes('"')) {
|
|
243
|
+
return 'Prefer double quotes over single quotes';
|
|
244
|
+
}
|
|
245
|
+
// 2. Indentation changes (basic detection)
|
|
246
|
+
const originalIndent = this.detectIndentation(original);
|
|
247
|
+
const modifiedIndent = this.detectIndentation(modified);
|
|
248
|
+
if (originalIndent !== modifiedIndent && modifiedIndent !== 'mixed') {
|
|
249
|
+
return `Prefer ${modifiedIndent} indentation`;
|
|
250
|
+
}
|
|
251
|
+
// 3. Naming convention changes (basic detection)
|
|
252
|
+
const namingChange = this.detectNamingChange(original, modified);
|
|
253
|
+
if (namingChange) {
|
|
254
|
+
return namingChange;
|
|
255
|
+
}
|
|
256
|
+
// Fallback: Generic pattern description
|
|
257
|
+
if (modified.length > 30) {
|
|
173
258
|
return `Pattern: ${modified.substring(0, 30)}...`;
|
|
174
259
|
}
|
|
260
|
+
return `Pattern: ${modified}`;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Task 6.2: Detect indentation style
|
|
264
|
+
*/
|
|
265
|
+
detectIndentation(code) {
|
|
266
|
+
const lines = code.split('\n').filter(line => line.trim().length > 0);
|
|
267
|
+
if (lines.length === 0)
|
|
268
|
+
return 'spaces';
|
|
269
|
+
let spacesCount = 0;
|
|
270
|
+
let tabsCount = 0;
|
|
271
|
+
for (const line of lines.slice(0, 10)) { // Check first 10 lines
|
|
272
|
+
const indent = line.match(/^(\s+)/)?.[1];
|
|
273
|
+
if (indent) {
|
|
274
|
+
if (indent.includes('\t')) {
|
|
275
|
+
tabsCount++;
|
|
276
|
+
}
|
|
277
|
+
else if (indent.includes(' ')) {
|
|
278
|
+
spacesCount++;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
if (tabsCount > spacesCount * 2)
|
|
283
|
+
return 'tabs';
|
|
284
|
+
if (spacesCount > tabsCount * 2)
|
|
285
|
+
return 'spaces';
|
|
286
|
+
return 'mixed';
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Task 6.2: Detect naming convention changes
|
|
290
|
+
*/
|
|
291
|
+
detectNamingChange(original, modified) {
|
|
292
|
+
// Simple detection: Look for camelCase vs snake_case vs PascalCase
|
|
293
|
+
const camelCaseRegex = /\b[a-z][a-zA-Z0-9]*\b/g;
|
|
294
|
+
const snakeCaseRegex = /\b[a-z][a-z0-9_]*\b/g;
|
|
295
|
+
const pascalCaseRegex = /\b[A-Z][a-zA-Z0-9]*\b/g;
|
|
296
|
+
const originalCamel = (original.match(camelCaseRegex) || []).length;
|
|
297
|
+
const originalSnake = (original.match(snakeCaseRegex) || []).length;
|
|
298
|
+
const originalPascal = (original.match(pascalCaseRegex) || []).length;
|
|
299
|
+
const modifiedCamel = (modified.match(camelCaseRegex) || []).length;
|
|
300
|
+
const modifiedSnake = (modified.match(snakeCaseRegex) || []).length;
|
|
301
|
+
const modifiedPascal = (modified.match(pascalCaseRegex) || []).length;
|
|
302
|
+
// Detect significant shifts
|
|
303
|
+
if (originalSnake > originalCamel && modifiedCamel > modifiedSnake) {
|
|
304
|
+
return 'Prefer camelCase over snake_case';
|
|
305
|
+
}
|
|
306
|
+
if (originalCamel > originalSnake && modifiedSnake > modifiedCamel) {
|
|
307
|
+
return 'Prefer snake_case over camelCase';
|
|
308
|
+
}
|
|
309
|
+
if (originalCamel > originalPascal && modifiedPascal > modifiedCamel) {
|
|
310
|
+
return 'Prefer PascalCase over camelCase';
|
|
311
|
+
}
|
|
175
312
|
return null;
|
|
176
313
|
}
|
|
177
314
|
addLearningPattern(userId, pattern) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bi-directional-learning.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/bi-directional-learning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAuDH;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IACxB,eAAe,GAAgC,IAAI,GAAG,EAAE,CAAC,CAAC,sBAAsB;IAChF,gBAAgB,GAAmC,IAAI,GAAG,EAAE,CAAC,CAAC,qBAAqB;IACnF,eAAe,GAAiC,IAAI,GAAG,EAAE,CAAC;IAElE;;OAEG;IACH,c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,CAAC,IAAI,CAAC;gBACZ,GAAG,OAAO;gBACV,SAAS,EAAE,WAAW,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;gBAC7E,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,QAAQ,EAAE,IAAI,CAAC,GAAG,EAAE;aACrB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capability Boundaries
|
|
3
|
+
* Detects unsupported operations and displays boundaries
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
6
|
+
*/
|
|
7
|
+
export interface CapabilityBoundary {
|
|
8
|
+
operation: string;
|
|
9
|
+
reason: string;
|
|
10
|
+
alternative?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare class CapabilityBoundaryDetector {
|
|
13
|
+
/**
|
|
14
|
+
* Detect unsupported operations
|
|
15
|
+
*/
|
|
16
|
+
detectUnsupported(query: string): CapabilityBoundary | null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Display capability boundary message
|
|
20
|
+
*/
|
|
21
|
+
export declare function displayCapabilityBoundary(boundary: CapabilityBoundary): void;
|
|
22
|
+
//# sourceMappingURL=capability-boundaries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-boundaries.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/capability-boundaries.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,0BAA0B;IACrC;;OAEG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,GAAG,IAAI;CAoB5D;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,kBAAkB,GAAG,IAAI,CAQ5E"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Capability Boundaries
|
|
3
|
+
* Detects unsupported operations and displays boundaries
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
6
|
+
*/
|
|
7
|
+
import { colors, warning } from '../../ui.js';
|
|
8
|
+
export class CapabilityBoundaryDetector {
|
|
9
|
+
/**
|
|
10
|
+
* Detect unsupported operations
|
|
11
|
+
*/
|
|
12
|
+
detectUnsupported(query) {
|
|
13
|
+
// In alpha, minimal detection
|
|
14
|
+
// Can be enhanced later with more sophisticated detection
|
|
15
|
+
const unsupportedPatterns = [
|
|
16
|
+
{ pattern: /\b(deploy|publish|release|ship)\b/i, reason: 'Deployment operations are not supported' },
|
|
17
|
+
{ pattern: /\b(delete|remove|destroy|wipe)\s+(all|everything|database|data)\b/i, reason: 'Bulk deletion operations are not supported' },
|
|
18
|
+
];
|
|
19
|
+
for (const { pattern, reason } of unsupportedPatterns) {
|
|
20
|
+
if (pattern.test(query)) {
|
|
21
|
+
return {
|
|
22
|
+
operation: query,
|
|
23
|
+
reason,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Display capability boundary message
|
|
32
|
+
*/
|
|
33
|
+
export function displayCapabilityBoundary(boundary) {
|
|
34
|
+
console.log(warning('\n⚠️ Capability Boundary'));
|
|
35
|
+
console.log(warning(`Operation: ${boundary.operation}`));
|
|
36
|
+
console.log(warning(`Reason: ${boundary.reason}`));
|
|
37
|
+
if (boundary.alternative) {
|
|
38
|
+
console.log(colors.dim(`Alternative: ${boundary.alternative}`));
|
|
39
|
+
}
|
|
40
|
+
console.log('');
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=capability-boundaries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capability-boundaries.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/capability-boundaries.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAQ9C,MAAM,OAAO,0BAA0B;IACrC;;OAEG;IACH,iBAAiB,CAAC,KAAa;QAC7B,8BAA8B;QAC9B,0DAA0D;QAE1D,MAAM,mBAAmB,GAAG;YAC1B,EAAE,OAAO,EAAE,oCAAoC,EAAE,MAAM,EAAE,yCAAyC,EAAE;YACpG,EAAE,OAAO,EAAE,oEAAoE,EAAE,MAAM,EAAE,4CAA4C,EAAE;SACxI,CAAC;QAEF,KAAK,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,mBAAmB,EAAE,CAAC;YACtD,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBACxB,OAAO;oBACL,SAAS,EAAE,KAAK;oBAChB,MAAM;iBACP,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,yBAAyB,CAAC,QAA4B;IACpE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,cAAc,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;IACzD,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACnD,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comprehensive Formatter
|
|
3
|
+
* Format content for CLI display with proper indentation and wrapping
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
6
|
+
*/
|
|
7
|
+
interface FormatOptions {
|
|
8
|
+
indent?: number;
|
|
9
|
+
maxWidth?: number;
|
|
10
|
+
preserveMarkdown?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Format content for CLI display
|
|
14
|
+
*/
|
|
15
|
+
export declare function formatContent(content: string, options?: FormatOptions): string;
|
|
16
|
+
/**
|
|
17
|
+
* Format reflection/analysis output
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatReflection(reflection: any, options?: FormatOptions): string;
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=comprehensive-formatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comprehensive-formatter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/comprehensive-formatter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAsDlF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,GAAG,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAiCrF"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comprehensive Formatter
|
|
3
|
+
* Format content for CLI display with proper indentation and wrapping
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Format content for CLI display
|
|
9
|
+
*/
|
|
10
|
+
export function formatContent(content, options = {}) {
|
|
11
|
+
const { indent = 0, maxWidth = 76, preserveMarkdown = true, } = options;
|
|
12
|
+
if (!content) {
|
|
13
|
+
return '';
|
|
14
|
+
}
|
|
15
|
+
const indentStr = ' '.repeat(indent);
|
|
16
|
+
const actualMaxWidth = maxWidth - indent;
|
|
17
|
+
// If content is short enough, return as-is with indentation
|
|
18
|
+
if (content.length <= actualMaxWidth && !content.includes('\n')) {
|
|
19
|
+
return indentStr + content;
|
|
20
|
+
}
|
|
21
|
+
// Handle markdown code blocks
|
|
22
|
+
if (preserveMarkdown && content.includes('```')) {
|
|
23
|
+
return formatMarkdownContent(content, indent, actualMaxWidth);
|
|
24
|
+
}
|
|
25
|
+
// Simple word wrapping
|
|
26
|
+
const lines = content.split('\n');
|
|
27
|
+
const wrappedLines = [];
|
|
28
|
+
for (const line of lines) {
|
|
29
|
+
if (line.length <= actualMaxWidth) {
|
|
30
|
+
wrappedLines.push(indentStr + line);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
// Word wrap
|
|
34
|
+
const words = line.split(/\s+/);
|
|
35
|
+
let currentLine = '';
|
|
36
|
+
for (const word of words) {
|
|
37
|
+
if ((currentLine + word).length <= actualMaxWidth) {
|
|
38
|
+
currentLine += (currentLine ? ' ' : '') + word;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
if (currentLine) {
|
|
42
|
+
wrappedLines.push(indentStr + currentLine);
|
|
43
|
+
}
|
|
44
|
+
currentLine = word;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (currentLine) {
|
|
48
|
+
wrappedLines.push(indentStr + currentLine);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return wrappedLines.join('\n');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Format reflection/analysis output
|
|
56
|
+
*/
|
|
57
|
+
export function formatReflection(reflection, options = {}) {
|
|
58
|
+
if (!reflection) {
|
|
59
|
+
return '';
|
|
60
|
+
}
|
|
61
|
+
if (typeof reflection === 'string') {
|
|
62
|
+
return formatContent(reflection, options);
|
|
63
|
+
}
|
|
64
|
+
if (typeof reflection === 'object') {
|
|
65
|
+
// Format structured reflection
|
|
66
|
+
const parts = [];
|
|
67
|
+
if (reflection.insight) {
|
|
68
|
+
parts.push(`💡 Insight:\n${formatContent(reflection.insight, { ...options, indent: (options.indent || 0) + 2 })}`);
|
|
69
|
+
}
|
|
70
|
+
if (reflection.reasoning) {
|
|
71
|
+
parts.push(`🧠 Reasoning:\n${formatContent(reflection.reasoning, { ...options, indent: (options.indent || 0) + 2 })}`);
|
|
72
|
+
}
|
|
73
|
+
if (reflection.summary) {
|
|
74
|
+
parts.push(`📋 Summary:\n${formatContent(reflection.summary, { ...options, indent: (options.indent || 0) + 2 })}`);
|
|
75
|
+
}
|
|
76
|
+
if (parts.length === 0) {
|
|
77
|
+
return formatContent(JSON.stringify(reflection, null, 2), options);
|
|
78
|
+
}
|
|
79
|
+
return parts.join('\n\n');
|
|
80
|
+
}
|
|
81
|
+
return String(reflection);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Format markdown content with code block preservation
|
|
85
|
+
*/
|
|
86
|
+
function formatMarkdownContent(content, indent, maxWidth) {
|
|
87
|
+
const indentStr = ' '.repeat(indent);
|
|
88
|
+
const lines = content.split('\n');
|
|
89
|
+
const formatted = [];
|
|
90
|
+
let inCodeBlock = false;
|
|
91
|
+
let codeBlockLang = '';
|
|
92
|
+
for (const line of lines) {
|
|
93
|
+
if (line.trim().startsWith('```')) {
|
|
94
|
+
inCodeBlock = !inCodeBlock;
|
|
95
|
+
if (inCodeBlock) {
|
|
96
|
+
codeBlockLang = line.trim().substring(3).trim();
|
|
97
|
+
}
|
|
98
|
+
formatted.push(indentStr + line);
|
|
99
|
+
}
|
|
100
|
+
else if (inCodeBlock) {
|
|
101
|
+
// Preserve code blocks as-is
|
|
102
|
+
formatted.push(indentStr + line);
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
// Format regular markdown lines
|
|
106
|
+
if (line.length <= maxWidth) {
|
|
107
|
+
formatted.push(indentStr + line);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
// Word wrap for non-code content
|
|
111
|
+
formatted.push(formatContent(line, { indent, maxWidth: maxWidth + indent }));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return formatted.join('\n');
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=comprehensive-formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"comprehensive-formatter.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/comprehensive-formatter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,UAAyB,EAAE;IACxE,MAAM,EACJ,MAAM,GAAG,CAAC,EACV,QAAQ,GAAG,EAAE,EACb,gBAAgB,GAAG,IAAI,GACxB,GAAG,OAAO,CAAC;IAEZ,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;IAEzC,4DAA4D;IAC5D,IAAI,OAAO,CAAC,MAAM,IAAI,cAAc,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAChE,OAAO,SAAS,GAAG,OAAO,CAAC;IAC7B,CAAC;IAED,8BAA8B;IAC9B,IAAI,gBAAgB,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAChD,OAAO,qBAAq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AAC"}
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Contextual Feature Discovery
|
|
3
|
-
*
|
|
2
|
+
* Contextual Feature Discovery (v0.5.0-alpha.0 - Stub)
|
|
3
|
+
* TODO: Implement contextual feature suggestions
|
|
4
4
|
*/
|
|
5
5
|
export interface ContextualSuggestion {
|
|
6
|
-
feature: string;
|
|
7
|
-
description: string;
|
|
8
|
-
command: string;
|
|
9
6
|
reason: string;
|
|
10
|
-
|
|
7
|
+
command: string;
|
|
8
|
+
description: string;
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
* Analyze query to suggest contextual features
|
|
14
|
-
*/
|
|
15
|
-
export declare function getContextualSuggestions(query: string): ContextualSuggestion[];
|
|
16
|
-
/**
|
|
17
|
-
* Get contextual feature suggestions based on query limitations
|
|
18
|
-
*/
|
|
19
|
-
export declare function getSuggestionsForLimitation(limitation: string, currentCommand: string): ContextualSuggestion[];
|
|
20
|
-
/**
|
|
21
|
-
* Check if contextual suggestions should be shown
|
|
22
|
-
*/
|
|
23
|
-
export declare function shouldShowContextualSuggestion(query: string, currentCommand: string): ContextualSuggestion | null;
|
|
10
|
+
export declare function shouldShowContextualSuggestion(query: string, command?: string): ContextualSuggestion | null;
|
|
24
11
|
//# sourceMappingURL=contextual-feature-discovery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextual-feature-discovery.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/contextual-feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"contextual-feature-discovery.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/contextual-feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,oBAAoB,GAAG,IAAI,CAI3G"}
|
|
@@ -1,144 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Contextual Feature Discovery
|
|
3
|
-
*
|
|
2
|
+
* Contextual Feature Discovery (v0.5.0-alpha.0 - Stub)
|
|
3
|
+
* TODO: Implement contextual feature suggestions
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export function getContextualSuggestions(query) {
|
|
9
|
-
const suggestions = [];
|
|
10
|
-
const queryLower = query.toLowerCase();
|
|
11
|
-
// Multi-file operations → suggest orchestrate
|
|
12
|
-
if ((queryLower.includes('multiple') || queryLower.includes('several') || queryLower.includes('all')) &&
|
|
13
|
-
(queryLower.includes('file') || queryLower.includes('module'))) {
|
|
14
|
-
suggestions.push({
|
|
15
|
-
feature: 'Multi-agent Orchestration',
|
|
16
|
-
description: 'Plan and execute complex multi-step tasks across multiple files',
|
|
17
|
-
command: 'codehere orchestrate "your goal"',
|
|
18
|
-
reason: 'Your query involves multiple files/modules',
|
|
19
|
-
confidence: 0.8,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
// Complex refactoring → suggest plan
|
|
23
|
-
if (queryLower.includes('refactor') &&
|
|
24
|
-
(queryLower.includes('large') || queryLower.includes('complex') || queryLower.includes('multiple'))) {
|
|
25
|
-
suggestions.push({
|
|
26
|
-
feature: 'Planning Mode',
|
|
27
|
-
description: 'Generate hierarchical plans for large refactoring tasks',
|
|
28
|
-
command: 'codehere plan "refactor goal"',
|
|
29
|
-
reason: 'Complex refactoring tasks benefit from structured planning',
|
|
30
|
-
confidence: 0.9,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
// Debugging/problem solving → suggest react
|
|
34
|
-
if (queryLower.includes('debug') ||
|
|
35
|
-
queryLower.includes('fix') ||
|
|
36
|
-
queryLower.includes('error') ||
|
|
37
|
-
queryLower.includes('issue') ||
|
|
38
|
-
queryLower.includes('problem') ||
|
|
39
|
-
queryLower.includes('why') ||
|
|
40
|
-
queryLower.includes('why is')) {
|
|
41
|
-
suggestions.push({
|
|
42
|
-
feature: 'ReAct Reasoning',
|
|
43
|
-
description: 'Debug and solve complex problems step-by-step with reasoning',
|
|
44
|
-
command: 'codehere react "your problem"',
|
|
45
|
-
reason: 'Step-by-step reasoning helps with debugging',
|
|
46
|
-
confidence: 0.85,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
// Security-related → suggest security commands
|
|
50
|
-
if (queryLower.includes('security') ||
|
|
51
|
-
queryLower.includes('vulnerability') ||
|
|
52
|
-
queryLower.includes('vulnerabilities') ||
|
|
53
|
-
queryLower.includes('secure') ||
|
|
54
|
-
queryLower.includes('audit')) {
|
|
55
|
-
suggestions.push({
|
|
56
|
-
feature: 'Security Scanning',
|
|
57
|
-
description: 'Codehere automatically scans for security issues. Use edit command to fix them.',
|
|
58
|
-
command: 'codehere "fix security issues in auth.ts"',
|
|
59
|
-
reason: 'Security-focused queries benefit from comprehensive scanning',
|
|
60
|
-
confidence: 0.9,
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
// Knowledge/documentation → suggest knowledge commands
|
|
64
|
-
if (queryLower.includes('document') ||
|
|
65
|
-
queryLower.includes('knowledge') ||
|
|
66
|
-
queryLower.includes('learn') ||
|
|
67
|
-
queryLower.includes('pattern') ||
|
|
68
|
-
queryLower.includes('remember')) {
|
|
69
|
-
suggestions.push({
|
|
70
|
-
feature: 'Knowledge Management',
|
|
71
|
-
description: 'Query and manage preserved knowledge about your codebase',
|
|
72
|
-
command: 'codehere knowledge query "your query"',
|
|
73
|
-
reason: 'Knowledge management helps with documentation and learning',
|
|
74
|
-
confidence: 0.8,
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
// Performance optimization → suggest trace/learning
|
|
78
|
-
if (queryLower.includes('performance') ||
|
|
79
|
-
queryLower.includes('optimize') ||
|
|
80
|
-
queryLower.includes('slow') ||
|
|
81
|
-
queryLower.includes('faster')) {
|
|
82
|
-
suggestions.push({
|
|
83
|
-
feature: 'Execution Tracing',
|
|
84
|
-
description: 'Analyze execution patterns to understand performance',
|
|
85
|
-
command: 'codehere trace list',
|
|
86
|
-
reason: 'Tracing helps identify performance bottlenecks',
|
|
87
|
-
confidence: 0.75,
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
// Configuration/setup → suggest config commands
|
|
91
|
-
if (queryLower.includes('config') ||
|
|
92
|
-
queryLower.includes('setting') ||
|
|
93
|
-
queryLower.includes('preference') ||
|
|
94
|
-
queryLower.includes('setup')) {
|
|
95
|
-
suggestions.push({
|
|
96
|
-
feature: 'Configuration Management',
|
|
97
|
-
description: 'Manage preferences and settings',
|
|
98
|
-
command: 'codehere config',
|
|
99
|
-
reason: 'Configuration queries can be handled directly',
|
|
100
|
-
confidence: 0.95,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
return suggestions.sort((a, b) => b.confidence - a.confidence); // Sort by confidence
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Get contextual feature suggestions based on query limitations
|
|
107
|
-
*/
|
|
108
|
-
export function getSuggestionsForLimitation(limitation, currentCommand) {
|
|
109
|
-
const suggestions = [];
|
|
110
|
-
const limitationLower = limitation.toLowerCase();
|
|
111
|
-
// If limitation mentions multi-file, suggest orchestrate
|
|
112
|
-
if (limitationLower.includes('multi-file') || limitationLower.includes('multiple files')) {
|
|
113
|
-
suggestions.push({
|
|
114
|
-
feature: 'Multi-agent Orchestration',
|
|
115
|
-
description: 'Handle complex multi-file operations with planning',
|
|
116
|
-
command: 'codehere orchestrate "your goal"',
|
|
117
|
-
reason: 'Orchestrate mode handles multi-file operations better',
|
|
118
|
-
confidence: 0.9,
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
// If limitation mentions complexity, suggest plan
|
|
122
|
-
if (limitationLower.includes('complex') || limitationLower.includes('complicated')) {
|
|
123
|
-
suggestions.push({
|
|
124
|
-
feature: 'Planning Mode',
|
|
125
|
-
description: 'Break down complex tasks into manageable steps',
|
|
126
|
-
command: 'codehere plan "your goal"',
|
|
127
|
-
reason: 'Planning mode helps with complex tasks',
|
|
128
|
-
confidence: 0.85,
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
return suggestions;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* Check if contextual suggestions should be shown
|
|
135
|
-
*/
|
|
136
|
-
export function shouldShowContextualSuggestion(query, currentCommand) {
|
|
137
|
-
const suggestions = getContextualSuggestions(query);
|
|
138
|
-
// Only show top suggestion if confidence is high enough
|
|
139
|
-
if (suggestions.length > 0 && suggestions[0].confidence >= 0.75) {
|
|
140
|
-
return suggestions[0];
|
|
141
|
-
}
|
|
5
|
+
export function shouldShowContextualSuggestion(query, command) {
|
|
6
|
+
// In alpha, return null (no suggestions)
|
|
7
|
+
// Can be enhanced later with heuristics
|
|
142
8
|
return null;
|
|
143
9
|
}
|
|
144
10
|
//# sourceMappingURL=contextual-feature-discovery.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextual-feature-discovery.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/contextual-feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"contextual-feature-discovery.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/contextual-feature-discovery.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,UAAU,8BAA8B,CAAC,KAAa,EAAE,OAAgB;IAC5E,yCAAyC;IACzC,wCAAwC;IACxC,OAAO,IAAI,CAAC;AACd,CAAC"}
|