codehere 0.3.0 → 0.5.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +329 -65
- package/dist/application/agents/documentation-agent.d.ts +24 -0
- package/dist/application/agents/documentation-agent.d.ts.map +1 -0
- package/dist/application/agents/documentation-agent.js +399 -0
- package/dist/application/agents/documentation-agent.js.map +1 -0
- package/dist/application/agents/execution-agent.d.ts +11 -0
- package/dist/application/agents/execution-agent.d.ts.map +1 -1
- package/dist/application/agents/execution-agent.js +289 -80
- package/dist/application/agents/execution-agent.js.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.d.ts +4 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.js +95 -2
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
- package/dist/application/agents/planning-agent.d.ts +3 -0
- package/dist/application/agents/planning-agent.d.ts.map +1 -1
- package/dist/application/agents/planning-agent.js +151 -71
- package/dist/application/agents/planning-agent.js.map +1 -1
- package/dist/application/agents/product-requirements-agent.d.ts +21 -0
- package/dist/application/agents/product-requirements-agent.d.ts.map +1 -0
- package/dist/application/agents/product-requirements-agent.js +247 -0
- package/dist/application/agents/product-requirements-agent.js.map +1 -0
- package/dist/application/agents/validation-agent.d.ts +5 -1
- package/dist/application/agents/validation-agent.d.ts.map +1 -1
- package/dist/application/agents/validation-agent.js +156 -21
- package/dist/application/agents/validation-agent.js.map +1 -1
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts +21 -0
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js +158 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/reasoning-config.d.ts +15 -0
- package/dist/application/reasoning/reasoning-config.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-config.js +50 -0
- package/dist/application/reasoning/reasoning-config.js.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts +18 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.js +170 -0
- package/dist/application/reasoning/reasoning-orchestrator.js.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts +24 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js +6 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts +36 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.js +74 -0
- package/dist/application/reasoning/role-provider-resolver.js.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts +22 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.js +217 -0
- package/dist/application/reasoning/simple-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/types.d.ts +65 -0
- package/dist/application/reasoning/types.d.ts.map +1 -0
- package/dist/application/reasoning/types.js +6 -0
- package/dist/application/reasoning/types.js.map +1 -0
- package/dist/application/reasoning/validator-strategy.d.ts +56 -0
- package/dist/application/reasoning/validator-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/validator-strategy.js +103 -0
- package/dist/application/reasoning/validator-strategy.js.map +1 -0
- package/dist/application/services/dependency-container.d.ts +46 -2
- package/dist/application/services/dependency-container.d.ts.map +1 -1
- package/dist/application/services/dependency-container.js +198 -8
- package/dist/application/services/dependency-container.js.map +1 -1
- package/dist/application/services/intelligent-router.d.ts +19 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -1
- package/dist/application/services/intelligent-router.js +393 -91
- package/dist/application/services/intelligent-router.js.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.d.ts +20 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.js +129 -49
- package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.js +16 -1
- package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
- package/dist/application/use-cases/planning-use-case.d.ts +14 -1
- package/dist/application/use-cases/planning-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/planning-use-case.js +109 -2
- package/dist/application/use-cases/planning-use-case.js.map +1 -1
- package/dist/domain/entities/documentation.d.ts +35 -0
- package/dist/domain/entities/documentation.d.ts.map +1 -0
- package/dist/domain/entities/documentation.js +6 -0
- package/dist/domain/entities/documentation.js.map +1 -0
- package/dist/domain/entities/memory.d.ts.map +1 -1
- package/dist/domain/entities/product-requirements.d.ts +50 -0
- package/dist/domain/entities/product-requirements.d.ts.map +1 -0
- package/dist/domain/entities/product-requirements.js +6 -0
- package/dist/domain/entities/product-requirements.js.map +1 -0
- package/dist/domain/entities/task.d.ts +152 -0
- package/dist/domain/entities/task.d.ts.map +1 -0
- package/dist/domain/entities/task.js +61 -0
- package/dist/domain/entities/task.js.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.js +13 -0
- package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
- package/dist/domain/interfaces/agent.interface.d.ts +15 -0
- package/dist/domain/interfaces/agent.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/agent.interface.js +6 -0
- package/dist/domain/interfaces/agent.interface.js.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
- package/dist/domain/services/environment-mode-manager.d.ts +12 -0
- package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
- package/dist/domain/services/environment-mode-manager.js +22 -0
- package/dist/domain/services/environment-mode-manager.js.map +1 -0
- package/dist/domain/services/query-intent-classifier.d.ts.map +1 -1
- package/dist/domain/services/query-intent-classifier.js +20 -1
- package/dist/domain/services/query-intent-classifier.js.map +1 -1
- package/dist/domain/services/risk-tier-detector.d.ts +17 -0
- package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
- package/dist/domain/services/risk-tier-detector.js +78 -0
- package/dist/domain/services/risk-tier-detector.js.map +1 -0
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.js +18 -8
- package/dist/embed.js.map +1 -1
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +10 -3
- package/dist/formatter.js.map +1 -1
- package/dist/index.js +494 -167
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.js +19 -6
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
- package/dist/infrastructure/ai/fake-ai-service.d.ts +22 -0
- package/dist/infrastructure/ai/fake-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/fake-ai-service.js +59 -0
- package/dist/infrastructure/ai/fake-ai-service.js.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts +59 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.js +477 -0
- package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts +13 -1
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/embedding-cache.js +80 -9
- package/dist/infrastructure/cache/embedding-cache.js.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.js +40 -112
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
- package/dist/infrastructure/cache/response-cache.d.ts +18 -0
- package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/response-cache.js +48 -0
- package/dist/infrastructure/cache/response-cache.js.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts +8 -49
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/security-scan-cache.js +25 -102
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
- package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/bash-completion.js +11 -87
- package/dist/infrastructure/completion/bash-completion.js.map +1 -1
- package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/fish-completion.js +15 -58
- package/dist/infrastructure/completion/fish-completion.js.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.js +18 -73
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
- package/dist/infrastructure/config/config-manager.d.ts +10 -0
- package/dist/infrastructure/config/config-manager.d.ts.map +1 -1
- package/dist/infrastructure/config/config-manager.js +13 -2
- package/dist/infrastructure/config/config-manager.js.map +1 -1
- package/dist/infrastructure/context/conversation-context.d.ts +54 -0
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
- package/dist/infrastructure/context/conversation-context.js +129 -0
- package/dist/infrastructure/context/conversation-context.js.map +1 -0
- package/dist/infrastructure/context/session-manager.d.ts +42 -0
- package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
- package/dist/infrastructure/context/session-manager.js +94 -0
- package/dist/infrastructure/context/session-manager.js.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -1
- package/dist/infrastructure/cost/cost-tracker.js +12 -5
- package/dist/infrastructure/cost/cost-tracker.js.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.js +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.d.ts +6 -8
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.js +6 -8
- package/dist/infrastructure/governance/policy-as-code.js.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.js +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -1
- package/dist/infrastructure/protocols/a2a-metadata.js +1 -1
- package/dist/infrastructure/protocols/mcp-oauth.js +1 -1
- package/dist/infrastructure/providers/cohere-provider.d.ts +39 -0
- package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/cohere-provider.js +444 -0
- package/dist/infrastructure/providers/cohere-provider.js.map +1 -0
- package/dist/infrastructure/providers/fake-provider.d.ts +43 -0
- package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/fake-provider.js +130 -0
- package/dist/infrastructure/providers/fake-provider.js.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts +49 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.js +330 -0
- package/dist/infrastructure/providers/local-llm-provider.js.map +1 -0
- package/dist/infrastructure/providers/model-config.types.d.ts +70 -0
- package/dist/infrastructure/providers/model-config.types.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-config.types.js +9 -0
- package/dist/infrastructure/providers/model-config.types.js.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts +113 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.js +8 -0
- package/dist/infrastructure/providers/model-provider.interface.js.map +1 -0
- package/dist/infrastructure/providers/openai-provider.d.ts +38 -0
- package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openai-provider.js +413 -0
- package/dist/infrastructure/providers/openai-provider.js.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.js +401 -0
- package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts +48 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js +131 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts +37 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.js +120 -0
- package/dist/infrastructure/providers/provider-config-loader.js.map +1 -0
- package/dist/infrastructure/providers/provider-registry.d.ts +53 -0
- package/dist/infrastructure/providers/provider-registry.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-registry.js +88 -0
- package/dist/infrastructure/providers/provider-registry.js.map +1 -0
- package/dist/infrastructure/security/input-validator.d.ts.map +1 -1
- package/dist/infrastructure/security/input-validator.js +19 -6
- package/dist/infrastructure/security/input-validator.js.map +1 -1
- package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
- package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
- package/dist/infrastructure/serialization/toon-serializer.js +119 -0
- package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.js +37 -0
- package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
- package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/plan-repository.js +36 -73
- package/dist/infrastructure/storage/plan-repository.js.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
- package/dist/infrastructure/storage/task-helpers.d.ts +69 -0
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-helpers.js +197 -0
- package/dist/infrastructure/storage/task-helpers.js.map +1 -0
- package/dist/infrastructure/storage/task-repository.d.ts +68 -0
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-repository.js +216 -0
- package/dist/infrastructure/storage/task-repository.js.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts +74 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.js +167 -0
- package/dist/infrastructure/telemetry/telemetry-service.js.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts +22 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -1
- package/dist/infrastructure/ux/bi-directional-learning.js +144 -7
- package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -1
- package/dist/infrastructure/ux/capability-boundaries.d.ts +22 -0
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
- package/dist/infrastructure/ux/capability-boundaries.js +42 -0
- package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +21 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js +117 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.js +5 -181
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feedback-prompt.d.ts +26 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.js +45 -0
- package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-review-portal.js +4 -1
- package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.d.ts +35 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.js +86 -0
- package/dist/infrastructure/ux/hitl-validation.js.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.d.ts +5 -6
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.js +36 -41
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
- package/dist/infrastructure/ux/proportional-friction.d.ts +73 -0
- package/dist/infrastructure/ux/proportional-friction.d.ts.map +1 -0
- package/dist/infrastructure/ux/proportional-friction.js +200 -0
- package/dist/infrastructure/ux/proportional-friction.js.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
- package/dist/infrastructure/ux/review-checkpoint.js +33 -80
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
- package/dist/infrastructure/validation/agent-feedback.d.ts +51 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.js +55 -0
- package/dist/infrastructure/validation/agent-feedback.js.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts +75 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.js +137 -0
- package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -0
- package/dist/infrastructure/validation/feedback-stats.d.ts +99 -0
- package/dist/infrastructure/validation/feedback-stats.d.ts.map +1 -0
- package/dist/infrastructure/validation/feedback-stats.js +173 -0
- package/dist/infrastructure/validation/feedback-stats.js.map +1 -0
- package/dist/infrastructure/validation/review-handler.d.ts +26 -0
- package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
- package/dist/infrastructure/validation/review-handler.js +40 -0
- package/dist/infrastructure/validation/review-handler.js.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts +45 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.js +70 -0
- package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts +24 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.js +45 -0
- package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
- package/dist/infrastructure/validation/trace-summary.d.ts +45 -0
- package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
- package/dist/infrastructure/validation/trace-summary.js +52 -0
- package/dist/infrastructure/validation/trace-summary.js.map +1 -0
- package/dist/infrastructure/validation/trust-config.d.ts +27 -0
- package/dist/infrastructure/validation/trust-config.d.ts.map +1 -0
- package/dist/infrastructure/validation/trust-config.js +113 -0
- package/dist/infrastructure/validation/trust-config.js.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts +6 -8
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/attention-visualizer.js +6 -8
- package/dist/infrastructure/xai/attention-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.d.ts +6 -9
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.js +6 -9
- package/dist/infrastructure/xai/cot-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.d.ts +6 -10
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.js +6 -10
- package/dist/infrastructure/xai/decision-tree-log.js.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.d.ts +6 -8
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.js +6 -8
- package/dist/infrastructure/xai/interactive-xai.js.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.js +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -1
- package/dist/monitoring.d.ts +1 -1
- package/dist/monitoring.d.ts.map +1 -1
- package/dist/monitoring.js +12 -9
- package/dist/monitoring.js.map +1 -1
- package/dist/parallel-processor.d.ts.map +1 -1
- package/dist/parallel-processor.js +124 -45
- package/dist/parallel-processor.js.map +1 -1
- package/dist/presentation/cli/commands/ask-command.d.ts +2 -0
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/ask-command.js +356 -87
- package/dist/presentation/cli/commands/ask-command.js.map +1 -1
- package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/config-command.js +22 -8
- package/dist/presentation/cli/commands/config-command.js.map +1 -1
- package/dist/presentation/cli/commands/decision-command.js +23 -6
- package/dist/presentation/cli/commands/decision-command.js.map +1 -1
- package/dist/presentation/cli/commands/docs-command.d.ts +14 -0
- package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/docs-command.js +25 -0
- package/dist/presentation/cli/commands/docs-command.js.map +1 -0
- package/dist/presentation/cli/commands/fix-command.d.ts +10 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/fix-command.js +94 -0
- package/dist/presentation/cli/commands/fix-command.js.map +1 -0
- package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/help-command.js +23 -1
- package/dist/presentation/cli/commands/help-command.js.map +1 -1
- package/dist/presentation/cli/commands/memory-command.d.ts +17 -0
- package/dist/presentation/cli/commands/memory-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/memory-command.js +252 -0
- package/dist/presentation/cli/commands/memory-command.js.map +1 -0
- package/dist/presentation/cli/commands/models-command.d.ts +13 -0
- package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/models-command.js +194 -0
- package/dist/presentation/cli/commands/models-command.js.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts +2 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/orchestrate-command.js +182 -14
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
- package/dist/presentation/cli/commands/plan-command.d.ts +2 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/plan-command.js +212 -26
- package/dist/presentation/cli/commands/plan-command.js.map +1 -1
- package/dist/presentation/cli/commands/product-command.d.ts +14 -0
- package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/product-command.js +22 -0
- package/dist/presentation/cli/commands/product-command.js.map +1 -0
- package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/react-command.js +8 -2
- package/dist/presentation/cli/commands/react-command.js.map +1 -1
- package/dist/presentation/cli/commands/review-command.d.ts +14 -0
- package/dist/presentation/cli/commands/review-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/review-command.js +173 -0
- package/dist/presentation/cli/commands/review-command.js.map +1 -0
- package/dist/presentation/cli/commands/run-command.d.ts +13 -0
- package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/run-command.js +188 -0
- package/dist/presentation/cli/commands/run-command.js.map +1 -0
- package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/setup-command.js +15 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -1
- package/dist/presentation/cli/commands/smart-command.d.ts +3 -1
- package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/smart-command.js +165 -11
- package/dist/presentation/cli/commands/smart-command.js.map +1 -1
- package/dist/presentation/cli/commands/status-command.d.ts +14 -0
- package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/status-command.js +171 -0
- package/dist/presentation/cli/commands/status-command.js.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts +11 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.js +138 -0
- package/dist/presentation/cli/commands/suggest-command.js.map +1 -0
- package/dist/presentation/cli/error-display.d.ts.map +1 -1
- package/dist/presentation/cli/error-display.js +118 -17
- package/dist/presentation/cli/error-display.js.map +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +6 -1
- package/dist/search.js.map +1 -1
- package/dist/session.d.ts +1 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +69 -4
- package/dist/session.js.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +3 -0
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/git-tool.js +7 -7
- package/dist/tools/git-tool.js.map +1 -1
- package/dist/ui.d.ts +11 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +62 -6
- package/dist/ui.js.map +1 -1
- package/package.json +22 -4
|
@@ -1,101 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bash Completion Script Generator
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Generate bash completion script
|
|
3
|
+
*
|
|
4
|
+
* Phase 1: v0.5.0-alpha.0
|
|
7
5
|
*/
|
|
8
6
|
export function generateBashCompletion() {
|
|
9
|
-
return `#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
_codehere_completion() {
|
|
13
|
-
local cur prev words cword
|
|
7
|
+
return `# Codehere bash completion
|
|
8
|
+
_complete_codehere() {
|
|
9
|
+
local cur prev opts
|
|
14
10
|
COMPREPLY=()
|
|
15
11
|
cur="\${COMP_WORDS[COMP_CWORD]}"
|
|
16
12
|
prev="\${COMP_WORDS[COMP_CWORD-1]}"
|
|
17
|
-
|
|
18
|
-
cword="\${COMP_CWORD}"
|
|
19
|
-
|
|
20
|
-
# Commands list
|
|
21
|
-
local commands="${getAllCommands().join(' ')}"
|
|
13
|
+
opts="ask plan orchestrate fix suggest run review status help version"
|
|
22
14
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
if [[ \${cur} == -* ]]; then
|
|
16
|
+
COMPREPLY=(\$(compgen -W "--help --version" -- \${cur}))
|
|
17
|
+
else
|
|
18
|
+
COMPREPLY=(\$(compgen -W "\${opts}" -- \${cur}))
|
|
27
19
|
fi
|
|
28
|
-
|
|
29
|
-
local command="\${words[1]}"
|
|
30
|
-
|
|
31
|
-
case "\${command}" in
|
|
32
|
-
config)
|
|
33
|
-
if [ $COMP_CWORD -eq 2 ]; then
|
|
34
|
-
COMPREPLY=( $(compgen -W "get set reset" -- "\${cur}") )
|
|
35
|
-
elif [ $COMP_CWORD -eq 3 ] && [ "\${prev}" = "get" ] || [ "\${prev}" = "set" ]; then
|
|
36
|
-
# Config keys (simplified - would need dynamic lookup)
|
|
37
|
-
local keys="autoCommit temperature maxResults model enableStreaming enableSecurityScan enableVerification"
|
|
38
|
-
COMPREPLY=( $(compgen -W "\${keys}" -- "\${cur}") )
|
|
39
|
-
fi
|
|
40
|
-
;;
|
|
41
|
-
undo)
|
|
42
|
-
if [ $COMP_CWORD -eq 2 ]; then
|
|
43
|
-
COMPREPLY=( $(compgen -W "undo list restore" -- "\${cur}") )
|
|
44
|
-
fi
|
|
45
|
-
;;
|
|
46
|
-
trace)
|
|
47
|
-
if [ $COMP_CWORD -eq 2 ]; then
|
|
48
|
-
COMPREPLY=( $(compgen -W "show reproduce list" -- "\${cur}") )
|
|
49
|
-
fi
|
|
50
|
-
;;
|
|
51
|
-
decision)
|
|
52
|
-
if [ $COMP_CWORD -eq 2 ]; then
|
|
53
|
-
COMPREPLY=( $(compgen -W "record list query explain" -- "\${cur}") )
|
|
54
|
-
fi
|
|
55
|
-
;;
|
|
56
|
-
knowledge)
|
|
57
|
-
if [ $COMP_CWORD -eq 2 ]; then
|
|
58
|
-
COMPREPLY=( $(compgen -W "query list summary extract" -- "\${cur}") )
|
|
59
|
-
fi
|
|
60
|
-
;;
|
|
61
|
-
learning)
|
|
62
|
-
if [ $COMP_CWORD -eq 2 ]; then
|
|
63
|
-
COMPREPLY=( $(compgen -W "overview patterns knowledge insights" -- "\${cur}") )
|
|
64
|
-
fi
|
|
65
|
-
;;
|
|
66
|
-
cost)
|
|
67
|
-
if [ $COMP_CWORD -eq 2 ]; then
|
|
68
|
-
COMPREPLY=( $(compgen -W "status summary run reset" -- "\${cur}") )
|
|
69
|
-
fi
|
|
70
|
-
;;
|
|
71
|
-
*)
|
|
72
|
-
# Option completion for other commands
|
|
73
|
-
if [[ "\${cur}" == -* ]]; then
|
|
74
|
-
case "\${command}" in
|
|
75
|
-
plan)
|
|
76
|
-
COMPREPLY=( $(compgen -W "--execute" -- "\${cur}") )
|
|
77
|
-
;;
|
|
78
|
-
orchestrate)
|
|
79
|
-
COMPREPLY=( $(compgen -W "--mode --plan-id" -- "\${cur}") )
|
|
80
|
-
;;
|
|
81
|
-
ask|react)
|
|
82
|
-
COMPREPLY=( $(compgen -W "--stream --no-stream" -- "\${cur}") )
|
|
83
|
-
;;
|
|
84
|
-
setup)
|
|
85
|
-
COMPREPLY=( $(compgen -W "--force -f" -- "\${cur}") )
|
|
86
|
-
;;
|
|
87
|
-
index)
|
|
88
|
-
COMPREPLY=( $(compgen -W "--repo -r" -- "\${cur}") )
|
|
89
|
-
;;
|
|
90
|
-
esac
|
|
91
|
-
fi
|
|
92
|
-
;;
|
|
93
|
-
esac
|
|
94
|
-
|
|
95
|
-
return 0
|
|
96
20
|
}
|
|
97
21
|
|
|
98
|
-
complete -F
|
|
22
|
+
complete -F _complete_codehere codehere
|
|
99
23
|
`;
|
|
100
24
|
}
|
|
101
25
|
//# sourceMappingURL=bash-completion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash-completion.js","sourceRoot":"","sources":["../../../src/infrastructure/completion/bash-completion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bash-completion.js","sourceRoot":"","sources":["../../../src/infrastructure/completion/bash-completion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,UAAU,sBAAsB;IACpC,OAAO;;;;;;;;;;;;;;;;CAgBR,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fish-completion.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/completion/fish-completion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fish-completion.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/completion/fish-completion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,sBAAsB,IAAI,MAAM,CAe/C"}
|
|
@@ -1,65 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Fish Completion Script Generator
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Generate fish completion script
|
|
3
|
+
*
|
|
4
|
+
* Phase 1: v0.5.0-alpha.0
|
|
7
5
|
*/
|
|
8
6
|
export function generateFishCompletion() {
|
|
9
|
-
return `#
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
function __codehere_complete_undo_actions
|
|
25
|
-
echo undo list restore
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
function __codehere_complete_trace_actions
|
|
29
|
-
echo show reproduce list
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
function __codehere_complete_decision_actions
|
|
33
|
-
echo record list query explain
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
function __codehere_complete_knowledge_actions
|
|
37
|
-
echo query list summary extract
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
function __codehere_complete_learning_actions
|
|
41
|
-
echo overview patterns knowledge insights
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
function __codehere_complete_cost_actions
|
|
45
|
-
echo status summary run reset
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
complete -c codehere -f -a "(__codehere_complete_commands)"
|
|
49
|
-
|
|
50
|
-
complete -c codehere -f -n "__fish_seen_subcommand_from config" -a "(__codehere_complete_config_actions)"
|
|
51
|
-
complete -c codehere -f -n "__fish_seen_subcommand_from config; and __fish_seen_subcommand_from get set" -a "(__codehere_complete_config_keys)"
|
|
52
|
-
|
|
53
|
-
complete -c codehere -f -n "__fish_seen_subcommand_from undo" -a "(__codehere_complete_undo_actions)"
|
|
54
|
-
complete -c codehere -f -n "__fish_seen_subcommand_from trace" -a "(__codehere_complete_trace_actions)"
|
|
55
|
-
complete -c codehere -f -n "__fish_seen_subcommand_from decision" -a "(__codehere_complete_decision_actions)"
|
|
56
|
-
complete -c codehere -f -n "__fish_seen_subcommand_from knowledge" -a "(__codehere_complete_knowledge_actions)"
|
|
57
|
-
complete -c codehere -f -n "__fish_seen_subcommand_from learning" -a "(__codehere_complete_learning_actions)"
|
|
58
|
-
complete -c codehere -f -n "__fish_seen_subcommand_from cost" -a "(__codehere_complete_cost_actions)"
|
|
59
|
-
|
|
60
|
-
complete -c codehere -s h -l help -d "Show help"
|
|
61
|
-
complete -c codehere -s v -l version -d "Show version"
|
|
62
|
-
complete -c codehere -l completion -d "Show shell completion script"
|
|
7
|
+
return `# Codehere fish completion
|
|
8
|
+
complete -c codehere -f
|
|
9
|
+
|
|
10
|
+
complete -c codehere -n __fish_use_subcommand -a ask -d "Answer questions about codebase"
|
|
11
|
+
complete -c codehere -n __fish_use_subcommand -a plan -d "Generate execution plan"
|
|
12
|
+
complete -c codehere -n __fish_use_subcommand -a orchestrate -d "Multi-agent orchestration"
|
|
13
|
+
complete -c codehere -n __fish_use_subcommand -a fix -d "Apply AI edits to file"
|
|
14
|
+
complete -c codehere -n __fish_use_subcommand -a suggest -d "Read-only assistant mode"
|
|
15
|
+
complete -c codehere -n __fish_use_subcommand -a run -d "Unified agentic execution"
|
|
16
|
+
complete -c codehere -n __fish_use_subcommand -a review -d "Task review interface"
|
|
17
|
+
complete -c codehere -n __fish_use_subcommand -a status -d "Show agent status"
|
|
18
|
+
complete -c codehere -n __fish_use_subcommand -a help -d "Show help"
|
|
19
|
+
complete -c codehere -n __fish_use_subcommand -a version -d "Show version"
|
|
63
20
|
`;
|
|
64
21
|
}
|
|
65
22
|
//# sourceMappingURL=fish-completion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fish-completion.js","sourceRoot":"","sources":["../../../src/infrastructure/completion/fish-completion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fish-completion.js","sourceRoot":"","sources":["../../../src/infrastructure/completion/fish-completion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,UAAU,sBAAsB;IACpC,OAAO;;;;;;;;;;;;;CAaR,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zsh-completion.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/completion/zsh-completion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"zsh-completion.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/completion/zsh-completion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,qBAAqB,IAAI,MAAM,CAuB9C"}
|
|
@@ -1,85 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Zsh Completion Script Generator
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Generate zsh completion script
|
|
3
|
+
*
|
|
4
|
+
* Phase 1: v0.5.0-alpha.0
|
|
7
5
|
*/
|
|
8
6
|
export function generateZshCompletion() {
|
|
9
|
-
return `#
|
|
10
|
-
# Installation: source <(codehere --completion zsh) or add to ~/.zshrc
|
|
7
|
+
return `#compdef codehere
|
|
11
8
|
|
|
12
9
|
_codehere() {
|
|
13
|
-
local
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
local -a commands
|
|
11
|
+
commands=(
|
|
12
|
+
'ask:Answer questions about codebase'
|
|
13
|
+
'plan:Generate execution plan'
|
|
14
|
+
'orchestrate:Multi-agent orchestration'
|
|
15
|
+
'fix:Apply AI edits to file'
|
|
16
|
+
'suggest:Read-only assistant mode'
|
|
17
|
+
'run:Unified agentic execution'
|
|
18
|
+
'review:Task review interface'
|
|
19
|
+
'status:Show agent status'
|
|
20
|
+
'help:Show help'
|
|
21
|
+
'version:Show version'
|
|
22
|
+
)
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
command)
|
|
22
|
-
local commands="${getAllCommands().join(' ')}"
|
|
23
|
-
_values 'commands' $commands
|
|
24
|
-
;;
|
|
25
|
-
args)
|
|
26
|
-
case $words[1] in
|
|
27
|
-
config)
|
|
28
|
-
_arguments \\
|
|
29
|
-
"1: :->config_action" \\
|
|
30
|
-
"*::arg:->config_args"
|
|
31
|
-
;;
|
|
32
|
-
undo)
|
|
33
|
-
_arguments \\
|
|
34
|
-
"1: :->undo_action"
|
|
35
|
-
;;
|
|
36
|
-
trace)
|
|
37
|
-
_arguments \\
|
|
38
|
-
"1: :->trace_action"
|
|
39
|
-
;;
|
|
40
|
-
decision)
|
|
41
|
-
_arguments \\
|
|
42
|
-
"1: :->decision_action"
|
|
43
|
-
;;
|
|
44
|
-
knowledge)
|
|
45
|
-
_arguments \\
|
|
46
|
-
"1: :->knowledge_action"
|
|
47
|
-
;;
|
|
48
|
-
learning)
|
|
49
|
-
_arguments \\
|
|
50
|
-
"1: :->learning_action"
|
|
51
|
-
;;
|
|
52
|
-
cost)
|
|
53
|
-
_arguments \\
|
|
54
|
-
"1: :->cost_action"
|
|
55
|
-
;;
|
|
56
|
-
esac
|
|
57
|
-
;;
|
|
58
|
-
config_action)
|
|
59
|
-
_values 'config actions' get set reset
|
|
60
|
-
;;
|
|
61
|
-
undo_action)
|
|
62
|
-
_values 'undo actions' undo list restore
|
|
63
|
-
;;
|
|
64
|
-
trace_action)
|
|
65
|
-
_values 'trace actions' show reproduce list
|
|
66
|
-
;;
|
|
67
|
-
decision_action)
|
|
68
|
-
_values 'decision actions' record list query explain
|
|
69
|
-
;;
|
|
70
|
-
knowledge_action)
|
|
71
|
-
_values 'knowledge actions' query list summary extract
|
|
72
|
-
;;
|
|
73
|
-
learning_action)
|
|
74
|
-
_values 'learning actions' overview patterns knowledge insights
|
|
75
|
-
;;
|
|
76
|
-
cost_action)
|
|
77
|
-
_values 'cost actions' status summary run reset
|
|
78
|
-
;;
|
|
79
|
-
esac
|
|
24
|
+
_describe 'codehere' commands
|
|
80
25
|
}
|
|
81
26
|
|
|
82
|
-
|
|
27
|
+
_codehere "$@"
|
|
83
28
|
`;
|
|
84
29
|
}
|
|
85
30
|
//# sourceMappingURL=zsh-completion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zsh-completion.js","sourceRoot":"","sources":["../../../src/infrastructure/completion/zsh-completion.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"zsh-completion.js","sourceRoot":"","sources":["../../../src/infrastructure/completion/zsh-completion.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,UAAU,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;CAqBR,CAAC;AACF,CAAC"}
|
|
@@ -29,6 +29,16 @@ export interface CodehereConfig {
|
|
|
29
29
|
showSummary?: boolean;
|
|
30
30
|
outputFormat?: 'full' | 'compact' | 'minimal';
|
|
31
31
|
};
|
|
32
|
+
reasoning?: {
|
|
33
|
+
enabled?: boolean;
|
|
34
|
+
multiModel?: {
|
|
35
|
+
enabled?: boolean;
|
|
36
|
+
roles?: {
|
|
37
|
+
planner?: string;
|
|
38
|
+
validator?: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
32
42
|
}
|
|
33
43
|
export declare class ConfigManager {
|
|
34
44
|
private configPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/config-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE;QACX,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAC;QAClC,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,EAAE,OAAO,CAAC;KAC3B,CAAC;IACF,QAAQ,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,GAAG,EAAE;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,iBAAiB,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;KAChD,CAAC;IACF,EAAE,EAAE;QACF,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;KAC/C,CAAC;CACH;
|
|
1
|
+
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/config/config-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE;QACX,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;QAC/B,uBAAuB,CAAC,EAAE,OAAO,CAAC;QAClC,YAAY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,EAAE,GAAG,EAAE,CAAC,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAItG;;OAEG;IACH,GAAG,CAAC,CAAC,SAAS,MAAM,cAAc,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI;IAI3E;;OAEG;IACH,aAAa,CAAC,CAAC,SAAS,MAAM,cAAc,CAAC,aAAa,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAInH;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAQtD;;OAEG;IACH,MAAM,IAAI,cAAc;IAIxB;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,aAAa,IAAI,MAAM;CAGxB;AAOD,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa,CAKlE"}
|
|
@@ -12,7 +12,7 @@ const DEFAULT_CONFIG = {
|
|
|
12
12
|
autoCommit: false,
|
|
13
13
|
askBeforeDestructive: true,
|
|
14
14
|
enableCrossTeamLearning: false,
|
|
15
|
-
defaultModel: 'command-r-
|
|
15
|
+
defaultModel: 'command-r-08-2024', // command-r and command-r-plus were deprecated Sept 2025
|
|
16
16
|
maxTokens: 4096,
|
|
17
17
|
temperature: 0.3,
|
|
18
18
|
enableStreaming: true,
|
|
@@ -20,7 +20,7 @@ const DEFAULT_CONFIG = {
|
|
|
20
20
|
codebase: {},
|
|
21
21
|
api: {
|
|
22
22
|
provider: 'cohere',
|
|
23
|
-
model: 'command-r-
|
|
23
|
+
model: 'command-r-08-2024', // command-r and command-r-plus were deprecated Sept 2025
|
|
24
24
|
rateLimitHandling: 'retry',
|
|
25
25
|
},
|
|
26
26
|
ui: {
|
|
@@ -28,6 +28,9 @@ const DEFAULT_CONFIG = {
|
|
|
28
28
|
showSummary: true,
|
|
29
29
|
outputFormat: 'full',
|
|
30
30
|
},
|
|
31
|
+
reasoning: {
|
|
32
|
+
enabled: false, // Default: disabled for backward compatibility
|
|
33
|
+
},
|
|
31
34
|
};
|
|
32
35
|
export class ConfigManager {
|
|
33
36
|
configPath;
|
|
@@ -71,6 +74,14 @@ export class ConfigManager {
|
|
|
71
74
|
...DEFAULT_CONFIG.ui,
|
|
72
75
|
...loaded.ui,
|
|
73
76
|
},
|
|
77
|
+
reasoning: {
|
|
78
|
+
...DEFAULT_CONFIG.reasoning,
|
|
79
|
+
...loaded.reasoning,
|
|
80
|
+
multiModel: {
|
|
81
|
+
...DEFAULT_CONFIG.reasoning?.multiModel,
|
|
82
|
+
...loaded.reasoning?.multiModel,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
74
85
|
};
|
|
75
86
|
}
|
|
76
87
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-manager.js","sourceRoot":"","sources":["../../../src/infrastructure/config/config-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"config-manager.js","sourceRoot":"","sources":["../../../src/infrastructure/config/config-manager.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAwCpD,MAAM,cAAc,GAAmB;IACrC,OAAO,EAAE,UAAU,EAAE;IACrB,WAAW,E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B,CAAC;IAED;;OAEG;IACH,KAAK;QACH,IAAI,CAAC,MAAM,GAAG,cAAc,CAAC;QAC7B,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;CACF;AAED;;GAEG;AACH,IAAI,mBAAmB,GAAyB,IAAI,CAAC;AAErD,MAAM,UAAU,gBAAgB,CAAC,SAAkB;IACjD,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,mBAAmB,GAAG,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,mBAAmB,CAAC;AAC7B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversation Context Manager
|
|
3
|
+
* Manages conversation history and context for session-aware interactions
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
6
|
+
*/
|
|
7
|
+
export interface ConversationTurn {
|
|
8
|
+
query: string;
|
|
9
|
+
response: string;
|
|
10
|
+
timestamp: string | number;
|
|
11
|
+
entities?: any[];
|
|
12
|
+
intent?: any;
|
|
13
|
+
}
|
|
14
|
+
interface ConversationSession {
|
|
15
|
+
sessionId: string;
|
|
16
|
+
turns: ConversationTurn[];
|
|
17
|
+
createdAt: number;
|
|
18
|
+
lastUpdated: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* In-memory conversation context manager
|
|
22
|
+
* Stores conversation history per session for reference resolution
|
|
23
|
+
*/
|
|
24
|
+
declare class ConversationContextManager {
|
|
25
|
+
private sessions;
|
|
26
|
+
private readonly maxHistoryPerSession;
|
|
27
|
+
/**
|
|
28
|
+
* Get conversation history for a session
|
|
29
|
+
*/
|
|
30
|
+
getHistory(sessionId: string, limit?: number): ConversationTurn[];
|
|
31
|
+
/**
|
|
32
|
+
* Resolve references in query (e.g., "it", "that", "the previous")
|
|
33
|
+
*/
|
|
34
|
+
resolveReferences(sessionId: string, query: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Extract entities from text (simple heuristic-based extraction)
|
|
37
|
+
*/
|
|
38
|
+
extractEntities(text: string, options?: any): any[];
|
|
39
|
+
/**
|
|
40
|
+
* Add a conversation turn
|
|
41
|
+
*/
|
|
42
|
+
addTurn(sessionId: string, query: string, response: string, entities?: any[], intent?: any): void;
|
|
43
|
+
/**
|
|
44
|
+
* Get full context for a session
|
|
45
|
+
*/
|
|
46
|
+
getContext(sessionId: string): ConversationSession | null;
|
|
47
|
+
/**
|
|
48
|
+
* Clear conversation history for a session
|
|
49
|
+
*/
|
|
50
|
+
clear(sessionId?: string): void;
|
|
51
|
+
}
|
|
52
|
+
export declare const conversationContextManager: ConversationContextManager;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=conversation-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-context.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/context/conversation-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,GAAG,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAED,UAAU,mBAAmB;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,cAAM,0BAA0B;IAC9B,OAAO,CAAC,QAAQ,CAA+C;IAC/D,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAM;IAE3C;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,gBAAgB,EAAE;IAgBrE;;OAEG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAkC3D;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE;IAqBnD;;OAEG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAE,GAAG,EAAO,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI;IA8BrG;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI;IAIzD;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;CAOhC;AAED,eAAO,MAAM,0BAA0B,4BAAmC,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Conversation Context Manager
|
|
3
|
+
* Manages conversation history and context for session-aware interactions
|
|
4
|
+
*
|
|
5
|
+
* Phase 1: v0.5.0-alpha.0
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* In-memory conversation context manager
|
|
9
|
+
* Stores conversation history per session for reference resolution
|
|
10
|
+
*/
|
|
11
|
+
class ConversationContextManager {
|
|
12
|
+
sessions = new Map();
|
|
13
|
+
maxHistoryPerSession = 50;
|
|
14
|
+
/**
|
|
15
|
+
* Get conversation history for a session
|
|
16
|
+
*/
|
|
17
|
+
getHistory(sessionId, limit = 10) {
|
|
18
|
+
const session = this.sessions.get(sessionId);
|
|
19
|
+
if (!session) {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
// Return most recent turns, up to limit
|
|
23
|
+
const turns = session.turns.slice(-limit);
|
|
24
|
+
return turns.map(turn => ({
|
|
25
|
+
query: turn.query,
|
|
26
|
+
response: turn.response,
|
|
27
|
+
timestamp: turn.timestamp,
|
|
28
|
+
intent: turn.intent, // Include intent in history
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Resolve references in query (e.g., "it", "that", "the previous")
|
|
33
|
+
*/
|
|
34
|
+
resolveReferences(sessionId, query) {
|
|
35
|
+
const history = this.getHistory(sessionId, 3);
|
|
36
|
+
if (history.length === 0) {
|
|
37
|
+
return query;
|
|
38
|
+
}
|
|
39
|
+
// Simple reference resolution - replace common references
|
|
40
|
+
let resolved = query;
|
|
41
|
+
const lastTurn = history[history.length - 1];
|
|
42
|
+
// Replace "it" with last mentioned entity/context
|
|
43
|
+
if (/\bit\b/i.test(query) && lastTurn.response) {
|
|
44
|
+
// Extract key entities from last response (simple heuristic)
|
|
45
|
+
const lastResponse = lastTurn.response;
|
|
46
|
+
const words = lastResponse.split(/\s+/).filter(w => w.length > 3);
|
|
47
|
+
if (words.length > 0) {
|
|
48
|
+
// Try to replace "it" with last significant noun phrase
|
|
49
|
+
resolved = resolved.replace(/\bit\b/gi, words[words.length - 1]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Replace "that" with last query
|
|
53
|
+
if (/\bthat\b/i.test(query)) {
|
|
54
|
+
resolved = resolved.replace(/\bthat\b/gi, `"${lastTurn.query}"`);
|
|
55
|
+
}
|
|
56
|
+
// Replace "the previous" with last query
|
|
57
|
+
if (/\bthe previous\b/i.test(query)) {
|
|
58
|
+
resolved = resolved.replace(/\bthe previous\b/gi, `"${lastTurn.query}"`);
|
|
59
|
+
}
|
|
60
|
+
return resolved;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Extract entities from text (simple heuristic-based extraction)
|
|
64
|
+
*/
|
|
65
|
+
extractEntities(text, options) {
|
|
66
|
+
// Simple entity extraction - can be enhanced later
|
|
67
|
+
const entities = [];
|
|
68
|
+
// Extract file paths
|
|
69
|
+
const filePathRegex = /[\w\/\-\.]+\.(ts|js|tsx|jsx|json|md|yaml|yml|txt|py|go|rs|java|cpp|h|hpp)/g;
|
|
70
|
+
const filePaths = text.match(filePathRegex) || [];
|
|
71
|
+
filePaths.forEach(path => {
|
|
72
|
+
entities.push({ type: 'file', value: path });
|
|
73
|
+
});
|
|
74
|
+
// Extract function/class names (simple heuristic)
|
|
75
|
+
const functionRegex = /(?:function|class|const|let|var)\s+([A-Z][a-zA-Z0-9_]+|[a-z][a-zA-Z0-9_]+)/g;
|
|
76
|
+
const matches = text.matchAll(functionRegex);
|
|
77
|
+
for (const match of matches) {
|
|
78
|
+
entities.push({ type: 'symbol', value: match[1] });
|
|
79
|
+
}
|
|
80
|
+
return entities;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Add a conversation turn
|
|
84
|
+
*/
|
|
85
|
+
addTurn(sessionId, query, response, entities = [], intent) {
|
|
86
|
+
let session = this.sessions.get(sessionId);
|
|
87
|
+
if (!session) {
|
|
88
|
+
session = {
|
|
89
|
+
sessionId,
|
|
90
|
+
turns: [],
|
|
91
|
+
createdAt: Date.now(),
|
|
92
|
+
lastUpdated: Date.now(),
|
|
93
|
+
};
|
|
94
|
+
this.sessions.set(sessionId, session);
|
|
95
|
+
}
|
|
96
|
+
const turn = {
|
|
97
|
+
query,
|
|
98
|
+
response,
|
|
99
|
+
timestamp: new Date().toISOString(),
|
|
100
|
+
entities,
|
|
101
|
+
intent,
|
|
102
|
+
};
|
|
103
|
+
session.turns.push(turn);
|
|
104
|
+
session.lastUpdated = Date.now();
|
|
105
|
+
// Trim history if too long
|
|
106
|
+
if (session.turns.length > this.maxHistoryPerSession) {
|
|
107
|
+
session.turns = session.turns.slice(-this.maxHistoryPerSession);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Get full context for a session
|
|
112
|
+
*/
|
|
113
|
+
getContext(sessionId) {
|
|
114
|
+
return this.sessions.get(sessionId) || null;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Clear conversation history for a session
|
|
118
|
+
*/
|
|
119
|
+
clear(sessionId) {
|
|
120
|
+
if (sessionId) {
|
|
121
|
+
this.sessions.delete(sessionId);
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
this.sessions.clear();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
export const conversationContextManager = new ConversationContextManager();
|
|
129
|
+
//# sourceMappingURL=conversation-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-context.js","sourceRoot":"","sources":["../../../src/infrastructure/context/conversation-context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiBH;;;GAGG;AACH,MAAM,0BAA0B;IACtB,QAAQ,GAAqC,IAAI,GAAG,EAAE,CAAC;IAC9C,oBAAoB,GAAG,EAAE,CAAC;IAE3C;;OAEG;IACH,UAAU,CAAC,SAAiB,EAAE,QAAgB,EAAE;QAC9C,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,wCAAwC;QACxC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;QAC1C,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACxB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,4BAA4B;SAClD,CAAC,CAAC,CAAC;IACN,CAAC;IAED;;OAEG;IACH,iBAAiB,CAAC,SAAiB,EAAE,KAAa;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QAC9C,IAAI,OAAO,CAAC,MAAM,KAAK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