codehere 0.3.0 → 0.5.0-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +329 -65
- package/dist/application/agents/documentation-agent.d.ts +24 -0
- package/dist/application/agents/documentation-agent.d.ts.map +1 -0
- package/dist/application/agents/documentation-agent.js +399 -0
- package/dist/application/agents/documentation-agent.js.map +1 -0
- package/dist/application/agents/execution-agent.d.ts +11 -0
- package/dist/application/agents/execution-agent.d.ts.map +1 -1
- package/dist/application/agents/execution-agent.js +289 -80
- package/dist/application/agents/execution-agent.js.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.d.ts +4 -0
- package/dist/application/agents/multi-agent-orchestrator.d.ts.map +1 -1
- package/dist/application/agents/multi-agent-orchestrator.js +95 -2
- package/dist/application/agents/multi-agent-orchestrator.js.map +1 -1
- package/dist/application/agents/planning-agent.d.ts +3 -0
- package/dist/application/agents/planning-agent.d.ts.map +1 -1
- package/dist/application/agents/planning-agent.js +151 -71
- package/dist/application/agents/planning-agent.js.map +1 -1
- package/dist/application/agents/product-requirements-agent.d.ts +21 -0
- package/dist/application/agents/product-requirements-agent.d.ts.map +1 -0
- package/dist/application/agents/product-requirements-agent.js +247 -0
- package/dist/application/agents/product-requirements-agent.js.map +1 -0
- package/dist/application/agents/validation-agent.d.ts +5 -1
- package/dist/application/agents/validation-agent.d.ts.map +1 -1
- package/dist/application/agents/validation-agent.js +156 -21
- package/dist/application/agents/validation-agent.js.map +1 -1
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts +21 -0
- package/dist/application/reasoning/multi-model-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js +158 -0
- package/dist/application/reasoning/multi-model-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/reasoning-config.d.ts +15 -0
- package/dist/application/reasoning/reasoning-config.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-config.js +50 -0
- package/dist/application/reasoning/reasoning-config.js.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts +18 -0
- package/dist/application/reasoning/reasoning-orchestrator.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-orchestrator.js +170 -0
- package/dist/application/reasoning/reasoning-orchestrator.js.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts +24 -0
- package/dist/application/reasoning/reasoning-strategy.interface.d.ts.map +1 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js +6 -0
- package/dist/application/reasoning/reasoning-strategy.interface.js.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts +36 -0
- package/dist/application/reasoning/role-provider-resolver.d.ts.map +1 -0
- package/dist/application/reasoning/role-provider-resolver.js +74 -0
- package/dist/application/reasoning/role-provider-resolver.js.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts +22 -0
- package/dist/application/reasoning/simple-planning-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/simple-planning-strategy.js +217 -0
- package/dist/application/reasoning/simple-planning-strategy.js.map +1 -0
- package/dist/application/reasoning/types.d.ts +65 -0
- package/dist/application/reasoning/types.d.ts.map +1 -0
- package/dist/application/reasoning/types.js +6 -0
- package/dist/application/reasoning/types.js.map +1 -0
- package/dist/application/reasoning/validator-strategy.d.ts +56 -0
- package/dist/application/reasoning/validator-strategy.d.ts.map +1 -0
- package/dist/application/reasoning/validator-strategy.js +103 -0
- package/dist/application/reasoning/validator-strategy.js.map +1 -0
- package/dist/application/services/dependency-container.d.ts +46 -2
- package/dist/application/services/dependency-container.d.ts.map +1 -1
- package/dist/application/services/dependency-container.js +198 -8
- package/dist/application/services/dependency-container.js.map +1 -1
- package/dist/application/services/intelligent-router.d.ts +19 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -1
- package/dist/application/services/intelligent-router.js +393 -91
- package/dist/application/services/intelligent-router.js.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.d.ts +20 -0
- package/dist/application/use-cases/ask-question-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.js +129 -49
- package/dist/application/use-cases/ask-question-use-case.js.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/edit-file-use-case.js +16 -1
- package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
- package/dist/application/use-cases/planning-use-case.d.ts +14 -1
- package/dist/application/use-cases/planning-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/planning-use-case.js +109 -2
- package/dist/application/use-cases/planning-use-case.js.map +1 -1
- package/dist/domain/entities/documentation.d.ts +35 -0
- package/dist/domain/entities/documentation.d.ts.map +1 -0
- package/dist/domain/entities/documentation.js +6 -0
- package/dist/domain/entities/documentation.js.map +1 -0
- package/dist/domain/entities/memory.d.ts.map +1 -1
- package/dist/domain/entities/product-requirements.d.ts +50 -0
- package/dist/domain/entities/product-requirements.d.ts.map +1 -0
- package/dist/domain/entities/product-requirements.js +6 -0
- package/dist/domain/entities/product-requirements.js.map +1 -0
- package/dist/domain/entities/task.d.ts +152 -0
- package/dist/domain/entities/task.d.ts.map +1 -0
- package/dist/domain/entities/task.js +61 -0
- package/dist/domain/entities/task.js.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
- package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
- package/dist/domain/errors/embeddings-not-found-error.js +13 -0
- package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
- package/dist/domain/interfaces/agent.interface.d.ts +15 -0
- package/dist/domain/interfaces/agent.interface.d.ts.map +1 -0
- package/dist/domain/interfaces/agent.interface.js +6 -0
- package/dist/domain/interfaces/agent.interface.js.map +1 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
- package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
- package/dist/domain/services/environment-mode-manager.d.ts +12 -0
- package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
- package/dist/domain/services/environment-mode-manager.js +22 -0
- package/dist/domain/services/environment-mode-manager.js.map +1 -0
- package/dist/domain/services/query-intent-classifier.d.ts.map +1 -1
- package/dist/domain/services/query-intent-classifier.js +20 -1
- package/dist/domain/services/query-intent-classifier.js.map +1 -1
- package/dist/domain/services/risk-tier-detector.d.ts +17 -0
- package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
- package/dist/domain/services/risk-tier-detector.js +78 -0
- package/dist/domain/services/risk-tier-detector.js.map +1 -0
- package/dist/embed.d.ts.map +1 -1
- package/dist/embed.js +18 -8
- package/dist/embed.js.map +1 -1
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +10 -3
- package/dist/formatter.js.map +1 -1
- package/dist/index.js +494 -167
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.js +19 -6
- package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
- package/dist/infrastructure/ai/fake-ai-service.d.ts +22 -0
- package/dist/infrastructure/ai/fake-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/fake-ai-service.js +59 -0
- package/dist/infrastructure/ai/fake-ai-service.js.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts +59 -0
- package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -0
- package/dist/infrastructure/ai/provider-ai-service.js +477 -0
- package/dist/infrastructure/ai/provider-ai-service.js.map +1 -0
- package/dist/infrastructure/cache/embedding-cache.d.ts +13 -1
- package/dist/infrastructure/cache/embedding-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/embedding-cache.js +80 -9
- package/dist/infrastructure/cache/embedding-cache.js.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/query-result-cache.js +40 -112
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
- package/dist/infrastructure/cache/response-cache.d.ts +18 -0
- package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/response-cache.js +48 -0
- package/dist/infrastructure/cache/response-cache.js.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts +8 -49
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
- package/dist/infrastructure/cache/security-scan-cache.js +25 -102
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
- package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/bash-completion.js +11 -87
- package/dist/infrastructure/completion/bash-completion.js.map +1 -1
- package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/fish-completion.js +15 -58
- package/dist/infrastructure/completion/fish-completion.js.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
- package/dist/infrastructure/completion/zsh-completion.js +18 -73
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
- package/dist/infrastructure/config/config-manager.d.ts +10 -0
- package/dist/infrastructure/config/config-manager.d.ts.map +1 -1
- package/dist/infrastructure/config/config-manager.js +13 -2
- package/dist/infrastructure/config/config-manager.js.map +1 -1
- package/dist/infrastructure/context/conversation-context.d.ts +54 -0
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
- package/dist/infrastructure/context/conversation-context.js +129 -0
- package/dist/infrastructure/context/conversation-context.js.map +1 -0
- package/dist/infrastructure/context/session-manager.d.ts +42 -0
- package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
- package/dist/infrastructure/context/session-manager.js +94 -0
- package/dist/infrastructure/context/session-manager.js.map +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts +1 -0
- package/dist/infrastructure/cost/cost-tracker.d.ts.map +1 -1
- package/dist/infrastructure/cost/cost-tracker.js +12 -5
- package/dist/infrastructure/cost/cost-tracker.js.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.d.ts.map +1 -1
- package/dist/infrastructure/governance/nist-ai-rmf.js +6 -8
- package/dist/infrastructure/governance/nist-ai-rmf.js.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.d.ts +6 -8
- package/dist/infrastructure/governance/policy-as-code.d.ts.map +1 -1
- package/dist/infrastructure/governance/policy-as-code.js +6 -8
- package/dist/infrastructure/governance/policy-as-code.js.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.d.ts.map +1 -1
- package/dist/infrastructure/governance/prompt-to-code-lineage.js +7 -9
- package/dist/infrastructure/governance/prompt-to-code-lineage.js.map +1 -1
- package/dist/infrastructure/protocols/a2a-metadata.js +1 -1
- package/dist/infrastructure/protocols/mcp-oauth.js +1 -1
- package/dist/infrastructure/providers/cohere-provider.d.ts +39 -0
- package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/cohere-provider.js +444 -0
- package/dist/infrastructure/providers/cohere-provider.js.map +1 -0
- package/dist/infrastructure/providers/fake-provider.d.ts +43 -0
- package/dist/infrastructure/providers/fake-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/fake-provider.js +130 -0
- package/dist/infrastructure/providers/fake-provider.js.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts +49 -0
- package/dist/infrastructure/providers/local-llm-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/local-llm-provider.js +330 -0
- package/dist/infrastructure/providers/local-llm-provider.js.map +1 -0
- package/dist/infrastructure/providers/model-config.types.d.ts +70 -0
- package/dist/infrastructure/providers/model-config.types.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-config.types.js +9 -0
- package/dist/infrastructure/providers/model-config.types.js.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts +113 -0
- package/dist/infrastructure/providers/model-provider.interface.d.ts.map +1 -0
- package/dist/infrastructure/providers/model-provider.interface.js +8 -0
- package/dist/infrastructure/providers/model-provider.interface.js.map +1 -0
- package/dist/infrastructure/providers/openai-provider.d.ts +38 -0
- package/dist/infrastructure/providers/openai-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openai-provider.js +413 -0
- package/dist/infrastructure/providers/openai-provider.js.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
- package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
- package/dist/infrastructure/providers/openrouter-provider.js +401 -0
- package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts +48 -0
- package/dist/infrastructure/providers/operation-provider-resolver.d.ts.map +1 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js +131 -0
- package/dist/infrastructure/providers/operation-provider-resolver.js.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts +37 -0
- package/dist/infrastructure/providers/provider-config-loader.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-config-loader.js +120 -0
- package/dist/infrastructure/providers/provider-config-loader.js.map +1 -0
- package/dist/infrastructure/providers/provider-registry.d.ts +53 -0
- package/dist/infrastructure/providers/provider-registry.d.ts.map +1 -0
- package/dist/infrastructure/providers/provider-registry.js +88 -0
- package/dist/infrastructure/providers/provider-registry.js.map +1 -0
- package/dist/infrastructure/security/input-validator.d.ts.map +1 -1
- package/dist/infrastructure/security/input-validator.js +19 -6
- package/dist/infrastructure/security/input-validator.js.map +1 -1
- package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
- package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
- package/dist/infrastructure/serialization/toon-serializer.js +119 -0
- package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
- package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
- package/dist/infrastructure/storage/embeddings-path.js +37 -0
- package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
- package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/plan-repository.js +36 -73
- package/dist/infrastructure/storage/plan-repository.js.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
- package/dist/infrastructure/storage/task-helpers.d.ts +69 -0
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-helpers.js +197 -0
- package/dist/infrastructure/storage/task-helpers.js.map +1 -0
- package/dist/infrastructure/storage/task-repository.d.ts +68 -0
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-repository.js +216 -0
- package/dist/infrastructure/storage/task-repository.js.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts +74 -0
- package/dist/infrastructure/telemetry/telemetry-service.d.ts.map +1 -0
- package/dist/infrastructure/telemetry/telemetry-service.js +167 -0
- package/dist/infrastructure/telemetry/telemetry-service.js.map +1 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts +22 -0
- package/dist/infrastructure/ux/bi-directional-learning.d.ts.map +1 -1
- package/dist/infrastructure/ux/bi-directional-learning.js +144 -7
- package/dist/infrastructure/ux/bi-directional-learning.js.map +1 -1
- package/dist/infrastructure/ux/capability-boundaries.d.ts +22 -0
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
- package/dist/infrastructure/ux/capability-boundaries.js +42 -0
- package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +21 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js +117 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.js +5 -181
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
- package/dist/infrastructure/ux/feedback-prompt.d.ts +26 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.js +45 -0
- package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-review-portal.js +4 -1
- package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.d.ts +35 -0
- package/dist/infrastructure/ux/hitl-validation.d.ts.map +1 -1
- package/dist/infrastructure/ux/hitl-validation.js +86 -0
- package/dist/infrastructure/ux/hitl-validation.js.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.d.ts +5 -6
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
- package/dist/infrastructure/ux/progress-indicator.js +36 -41
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
- package/dist/infrastructure/ux/proportional-friction.d.ts +73 -0
- package/dist/infrastructure/ux/proportional-friction.d.ts.map +1 -0
- package/dist/infrastructure/ux/proportional-friction.js +200 -0
- package/dist/infrastructure/ux/proportional-friction.js.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
- package/dist/infrastructure/ux/review-checkpoint.js +33 -80
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
- package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
- package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
- package/dist/infrastructure/validation/agent-feedback.d.ts +51 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.js +55 -0
- package/dist/infrastructure/validation/agent-feedback.js.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts +75 -0
- package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-validation-helper.js +137 -0
- package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -0
- package/dist/infrastructure/validation/feedback-stats.d.ts +99 -0
- package/dist/infrastructure/validation/feedback-stats.d.ts.map +1 -0
- package/dist/infrastructure/validation/feedback-stats.js +173 -0
- package/dist/infrastructure/validation/feedback-stats.js.map +1 -0
- package/dist/infrastructure/validation/review-handler.d.ts +26 -0
- package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
- package/dist/infrastructure/validation/review-handler.js +40 -0
- package/dist/infrastructure/validation/review-handler.js.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts +45 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.js +70 -0
- package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts +24 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.js +45 -0
- package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
- package/dist/infrastructure/validation/trace-summary.d.ts +45 -0
- package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
- package/dist/infrastructure/validation/trace-summary.js +52 -0
- package/dist/infrastructure/validation/trace-summary.js.map +1 -0
- package/dist/infrastructure/validation/trust-config.d.ts +27 -0
- package/dist/infrastructure/validation/trust-config.d.ts.map +1 -0
- package/dist/infrastructure/validation/trust-config.js +113 -0
- package/dist/infrastructure/validation/trust-config.js.map +1 -0
- package/dist/infrastructure/xai/attention-visualizer.d.ts +6 -8
- package/dist/infrastructure/xai/attention-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/attention-visualizer.js +6 -8
- package/dist/infrastructure/xai/attention-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.d.ts +6 -9
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.js +6 -9
- package/dist/infrastructure/xai/cot-visualizer.js.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.d.ts +6 -10
- package/dist/infrastructure/xai/decision-tree-log.d.ts.map +1 -1
- package/dist/infrastructure/xai/decision-tree-log.js +6 -10
- package/dist/infrastructure/xai/decision-tree-log.js.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.d.ts +6 -8
- package/dist/infrastructure/xai/interactive-xai.d.ts.map +1 -1
- package/dist/infrastructure/xai/interactive-xai.js +6 -8
- package/dist/infrastructure/xai/interactive-xai.js.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.d.ts.map +1 -1
- package/dist/infrastructure/xai/uncertainty-quantifier.js +6 -9
- package/dist/infrastructure/xai/uncertainty-quantifier.js.map +1 -1
- package/dist/monitoring.d.ts +1 -1
- package/dist/monitoring.d.ts.map +1 -1
- package/dist/monitoring.js +12 -9
- package/dist/monitoring.js.map +1 -1
- package/dist/parallel-processor.d.ts.map +1 -1
- package/dist/parallel-processor.js +124 -45
- package/dist/parallel-processor.js.map +1 -1
- package/dist/presentation/cli/commands/ask-command.d.ts +2 -0
- package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/ask-command.js +356 -87
- package/dist/presentation/cli/commands/ask-command.js.map +1 -1
- package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/config-command.js +22 -8
- package/dist/presentation/cli/commands/config-command.js.map +1 -1
- package/dist/presentation/cli/commands/decision-command.js +23 -6
- package/dist/presentation/cli/commands/decision-command.js.map +1 -1
- package/dist/presentation/cli/commands/docs-command.d.ts +14 -0
- package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/docs-command.js +25 -0
- package/dist/presentation/cli/commands/docs-command.js.map +1 -0
- package/dist/presentation/cli/commands/fix-command.d.ts +10 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/fix-command.js +94 -0
- package/dist/presentation/cli/commands/fix-command.js.map +1 -0
- package/dist/presentation/cli/commands/help-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/help-command.js +23 -1
- package/dist/presentation/cli/commands/help-command.js.map +1 -1
- package/dist/presentation/cli/commands/memory-command.d.ts +17 -0
- package/dist/presentation/cli/commands/memory-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/memory-command.js +252 -0
- package/dist/presentation/cli/commands/memory-command.js.map +1 -0
- package/dist/presentation/cli/commands/models-command.d.ts +13 -0
- package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/models-command.js +194 -0
- package/dist/presentation/cli/commands/models-command.js.map +1 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts +2 -0
- package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/orchestrate-command.js +182 -14
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
- package/dist/presentation/cli/commands/plan-command.d.ts +2 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/plan-command.js +212 -26
- package/dist/presentation/cli/commands/plan-command.js.map +1 -1
- package/dist/presentation/cli/commands/product-command.d.ts +14 -0
- package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/product-command.js +22 -0
- package/dist/presentation/cli/commands/product-command.js.map +1 -0
- package/dist/presentation/cli/commands/react-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/react-command.js +8 -2
- package/dist/presentation/cli/commands/react-command.js.map +1 -1
- package/dist/presentation/cli/commands/review-command.d.ts +14 -0
- package/dist/presentation/cli/commands/review-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/review-command.js +173 -0
- package/dist/presentation/cli/commands/review-command.js.map +1 -0
- package/dist/presentation/cli/commands/run-command.d.ts +13 -0
- package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/run-command.js +188 -0
- package/dist/presentation/cli/commands/run-command.js.map +1 -0
- package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/setup-command.js +15 -0
- package/dist/presentation/cli/commands/setup-command.js.map +1 -1
- package/dist/presentation/cli/commands/smart-command.d.ts +3 -1
- package/dist/presentation/cli/commands/smart-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/smart-command.js +165 -11
- package/dist/presentation/cli/commands/smart-command.js.map +1 -1
- package/dist/presentation/cli/commands/status-command.d.ts +14 -0
- package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/status-command.js +171 -0
- package/dist/presentation/cli/commands/status-command.js.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts +11 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.js +138 -0
- package/dist/presentation/cli/commands/suggest-command.js.map +1 -0
- package/dist/presentation/cli/error-display.d.ts.map +1 -1
- package/dist/presentation/cli/error-display.js +118 -17
- package/dist/presentation/cli/error-display.js.map +1 -1
- package/dist/search.d.ts.map +1 -1
- package/dist/search.js +6 -1
- package/dist/search.js.map +1 -1
- package/dist/session.d.ts +1 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +69 -4
- package/dist/session.js.map +1 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +3 -0
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/git-tool.js +7 -7
- package/dist/tools/git-tool.js.map +1 -1
- package/dist/ui.d.ts +11 -0
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +62 -6
- package/dist/ui.js.map +1 -1
- package/package.json +22 -4
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Application Agent: Documentation Agent
|
|
3
|
+
* Generates and maintains documentation (README, API docs)
|
|
4
|
+
*/
|
|
5
|
+
import { parseFile } from '../../ast-parser.js';
|
|
6
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync, readdirSync } from 'fs';
|
|
7
|
+
import { join, relative, resolve } from 'path';
|
|
8
|
+
import { createFile } from '../../tools/edit.js';
|
|
9
|
+
export class DocumentationAgent {
|
|
10
|
+
aiService;
|
|
11
|
+
memoryStream;
|
|
12
|
+
cwd;
|
|
13
|
+
name = 'documentation-agent';
|
|
14
|
+
type = 'non-engineering';
|
|
15
|
+
constructor(aiService, memoryStream, cwd = process.cwd()) {
|
|
16
|
+
this.aiService = aiService;
|
|
17
|
+
this.memoryStream = memoryStream;
|
|
18
|
+
this.cwd = cwd;
|
|
19
|
+
}
|
|
20
|
+
async execute(request) {
|
|
21
|
+
const errors = [];
|
|
22
|
+
const documents = [];
|
|
23
|
+
let filesAnalyzed = 0;
|
|
24
|
+
let symbolsDocumented = 0;
|
|
25
|
+
let linesGenerated = 0;
|
|
26
|
+
try {
|
|
27
|
+
if (request.type === 'readme' || request.type === 'all') {
|
|
28
|
+
const readmeResult = await this.generateREADME(request);
|
|
29
|
+
if (readmeResult.success) {
|
|
30
|
+
documents.push(...readmeResult.documents);
|
|
31
|
+
filesAnalyzed += readmeResult.stats?.filesAnalyzed || 0;
|
|
32
|
+
linesGenerated += readmeResult.stats?.linesGenerated || 0;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
errors.push(...(readmeResult.errors || []));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (request.type === 'api' || request.type === 'all') {
|
|
39
|
+
const apiResult = await this.generateAPIDocs(request);
|
|
40
|
+
if (apiResult.success) {
|
|
41
|
+
documents.push(...apiResult.documents);
|
|
42
|
+
filesAnalyzed += apiResult.stats?.filesAnalyzed || 0;
|
|
43
|
+
symbolsDocumented += apiResult.stats?.symbolsDocumented || 0;
|
|
44
|
+
linesGenerated += apiResult.stats?.linesGenerated || 0;
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
errors.push(...(apiResult.errors || []));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
success: errors.length === 0,
|
|
52
|
+
documents,
|
|
53
|
+
stats: {
|
|
54
|
+
filesAnalyzed,
|
|
55
|
+
symbolsDocumented,
|
|
56
|
+
linesGenerated,
|
|
57
|
+
},
|
|
58
|
+
errors: errors.length > 0 ? errors : undefined,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
return {
|
|
63
|
+
success: false,
|
|
64
|
+
documents,
|
|
65
|
+
stats: {
|
|
66
|
+
filesAnalyzed,
|
|
67
|
+
symbolsDocumented,
|
|
68
|
+
linesGenerated,
|
|
69
|
+
},
|
|
70
|
+
errors: [error instanceof Error ? error.message : String(error)],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async generateREADME(request) {
|
|
75
|
+
const errors = [];
|
|
76
|
+
const outputPath = request.options?.outputPath || 'README.md';
|
|
77
|
+
const fullPath = resolve(this.cwd, outputPath);
|
|
78
|
+
const updateExisting = request.options?.updateExisting || false;
|
|
79
|
+
// Check if README exists and updateExisting is false
|
|
80
|
+
if (existsSync(fullPath) && !updateExisting) {
|
|
81
|
+
errors.push(`README.md already exists at ${outputPath}. Use updateExisting option to update.`);
|
|
82
|
+
return {
|
|
83
|
+
success: false,
|
|
84
|
+
documents: [],
|
|
85
|
+
errors,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
try {
|
|
89
|
+
// Read package.json if exists
|
|
90
|
+
const packageJsonPath = join(this.cwd, 'package.json');
|
|
91
|
+
let packageInfo = null;
|
|
92
|
+
if (existsSync(packageJsonPath)) {
|
|
93
|
+
try {
|
|
94
|
+
packageInfo = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
|
|
95
|
+
}
|
|
96
|
+
catch (e) {
|
|
97
|
+
errors.push(`Failed to parse package.json: ${e instanceof Error ? e.message : String(e)}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// Analyze folder structure
|
|
101
|
+
const folderStructure = this.analyzeFolderStructure(this.cwd);
|
|
102
|
+
// Generate README content using AI
|
|
103
|
+
const context = [];
|
|
104
|
+
if (packageInfo) {
|
|
105
|
+
context.push({
|
|
106
|
+
filepath: 'package.json',
|
|
107
|
+
content: JSON.stringify(packageInfo, null, 2),
|
|
108
|
+
lineStart: 1,
|
|
109
|
+
lineEnd: Object.keys(packageInfo).length,
|
|
110
|
+
score: 1.0,
|
|
111
|
+
metadata: {
|
|
112
|
+
language: 'json',
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const readmePrompt = this.buildReadmePrompt(packageInfo, folderStructure);
|
|
117
|
+
const readmeContent = await this.aiService.chat(readmePrompt, context);
|
|
118
|
+
// Write README - use writeFileSync directly when updating, createFile for new files
|
|
119
|
+
try {
|
|
120
|
+
if (updateExisting && existsSync(fullPath)) {
|
|
121
|
+
// Overwrite existing file directly
|
|
122
|
+
writeFileSync(fullPath, readmeContent, 'utf-8');
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
// Create new file using createFile (which handles directory creation)
|
|
126
|
+
const writeResult = createFile(outputPath, readmeContent, {
|
|
127
|
+
cwd: this.cwd,
|
|
128
|
+
createIfNotExists: true, // Allow overwrite if file exists
|
|
129
|
+
});
|
|
130
|
+
if (!writeResult.success) {
|
|
131
|
+
errors.push(writeResult.error || 'Failed to write README.md');
|
|
132
|
+
return {
|
|
133
|
+
success: false,
|
|
134
|
+
documents: [],
|
|
135
|
+
errors,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
catch (writeError) {
|
|
141
|
+
errors.push(`Failed to write README.md: ${writeError instanceof Error ? writeError.message : String(writeError)}`);
|
|
142
|
+
return {
|
|
143
|
+
success: false,
|
|
144
|
+
documents: [],
|
|
145
|
+
errors,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
const lines = readmeContent.split('\n').length;
|
|
149
|
+
return {
|
|
150
|
+
success: true,
|
|
151
|
+
documents: [
|
|
152
|
+
{
|
|
153
|
+
path: outputPath,
|
|
154
|
+
type: 'readme',
|
|
155
|
+
contentPreview: readmeContent.substring(0, 200),
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
stats: {
|
|
159
|
+
filesAnalyzed: 1, // package.json
|
|
160
|
+
symbolsDocumented: 0,
|
|
161
|
+
linesGenerated: lines,
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
catch (error) {
|
|
166
|
+
errors.push(error instanceof Error ? error.message : String(error));
|
|
167
|
+
return {
|
|
168
|
+
success: false,
|
|
169
|
+
documents: [],
|
|
170
|
+
errors,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
async generateAPIDocs(request) {
|
|
175
|
+
const errors = [];
|
|
176
|
+
const targetDir = request.target || 'src';
|
|
177
|
+
const targetPath = resolve(this.cwd, targetDir);
|
|
178
|
+
if (!existsSync(targetPath)) {
|
|
179
|
+
errors.push(`Target directory not found: ${targetDir}`);
|
|
180
|
+
return {
|
|
181
|
+
success: false,
|
|
182
|
+
documents: [],
|
|
183
|
+
errors,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
try {
|
|
187
|
+
// Find all TypeScript/JavaScript files
|
|
188
|
+
const sourceFiles = this.findSourceFiles(targetPath);
|
|
189
|
+
let filesAnalyzed = sourceFiles.length;
|
|
190
|
+
// Extract exported symbols from each file
|
|
191
|
+
const exportedSymbols = [];
|
|
192
|
+
for (const file of sourceFiles) {
|
|
193
|
+
const analysis = parseFile(file);
|
|
194
|
+
if (analysis) {
|
|
195
|
+
const exported = analysis.symbols.filter((s) => s.isExported);
|
|
196
|
+
exportedSymbols.push(...exported.map((s) => ({
|
|
197
|
+
...s,
|
|
198
|
+
filepath: relative(this.cwd, file),
|
|
199
|
+
})));
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
let symbolsDocumented = exportedSymbols.length;
|
|
203
|
+
if (exportedSymbols.length === 0) {
|
|
204
|
+
errors.push('No exported symbols found in target directory');
|
|
205
|
+
return {
|
|
206
|
+
success: false,
|
|
207
|
+
documents: [],
|
|
208
|
+
stats: {
|
|
209
|
+
filesAnalyzed,
|
|
210
|
+
symbolsDocumented: 0,
|
|
211
|
+
linesGenerated: 0,
|
|
212
|
+
},
|
|
213
|
+
errors,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
// Generate API documentation content
|
|
217
|
+
const apiContent = await this.buildAPIDocsContent(exportedSymbols);
|
|
218
|
+
// Write API docs
|
|
219
|
+
const outputDir = join(this.cwd, 'docs');
|
|
220
|
+
if (!existsSync(outputDir)) {
|
|
221
|
+
mkdirSync(outputDir, { recursive: true });
|
|
222
|
+
}
|
|
223
|
+
const outputPath = join(outputDir, 'api.md');
|
|
224
|
+
writeFileSync(outputPath, apiContent, 'utf-8');
|
|
225
|
+
const lines = apiContent.split('\n').length;
|
|
226
|
+
return {
|
|
227
|
+
success: true,
|
|
228
|
+
documents: [
|
|
229
|
+
{
|
|
230
|
+
path: relative(this.cwd, outputPath),
|
|
231
|
+
type: 'api',
|
|
232
|
+
contentPreview: apiContent.substring(0, 200),
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
stats: {
|
|
236
|
+
filesAnalyzed,
|
|
237
|
+
symbolsDocumented,
|
|
238
|
+
linesGenerated: lines,
|
|
239
|
+
},
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
errors.push(error instanceof Error ? error.message : String(error));
|
|
244
|
+
return {
|
|
245
|
+
success: false,
|
|
246
|
+
documents: [],
|
|
247
|
+
stats: {
|
|
248
|
+
filesAnalyzed: 0,
|
|
249
|
+
symbolsDocumented: 0,
|
|
250
|
+
linesGenerated: 0,
|
|
251
|
+
},
|
|
252
|
+
errors,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
analyzeFolderStructure(root, maxDepth = 3) {
|
|
257
|
+
const structure = [];
|
|
258
|
+
const ignoreDirs = new Set([
|
|
259
|
+
'node_modules',
|
|
260
|
+
'.git',
|
|
261
|
+
'dist',
|
|
262
|
+
'build',
|
|
263
|
+
'.next',
|
|
264
|
+
'.cache',
|
|
265
|
+
'coverage',
|
|
266
|
+
'.vscode',
|
|
267
|
+
'.idea',
|
|
268
|
+
]);
|
|
269
|
+
function walkDir(dir, depth, prefix = '') {
|
|
270
|
+
if (depth > maxDepth)
|
|
271
|
+
return;
|
|
272
|
+
try {
|
|
273
|
+
const entries = readdirSync(dir, { withFileTypes: true })
|
|
274
|
+
.filter((entry) => !ignoreDirs.has(entry.name) && !entry.name.startsWith('.'))
|
|
275
|
+
.slice(0, 20); // Limit to first 20 entries per directory
|
|
276
|
+
for (const entry of entries) {
|
|
277
|
+
const fullPath = join(dir, entry.name);
|
|
278
|
+
const relPath = relative(root, fullPath);
|
|
279
|
+
structure.push(relPath);
|
|
280
|
+
if (entry.isDirectory() && depth < maxDepth) {
|
|
281
|
+
walkDir(fullPath, depth + 1, prefix + ' ');
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
// Ignore permission errors
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
walkDir(root, 0);
|
|
290
|
+
return structure.slice(0, 50); // Limit total entries
|
|
291
|
+
}
|
|
292
|
+
findSourceFiles(dir) {
|
|
293
|
+
const files = [];
|
|
294
|
+
const ignoreDirs = new Set(['node_modules', '.git', 'dist', 'build', '.next', '.cache']);
|
|
295
|
+
function walkDir(currentDir) {
|
|
296
|
+
try {
|
|
297
|
+
const entries = readdirSync(currentDir, { withFileTypes: true });
|
|
298
|
+
for (const entry of entries) {
|
|
299
|
+
const fullPath = join(currentDir, entry.name);
|
|
300
|
+
if (entry.isDirectory()) {
|
|
301
|
+
if (!ignoreDirs.has(entry.name) && !entry.name.startsWith('.')) {
|
|
302
|
+
walkDir(fullPath);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
else if (['.ts', '.tsx', '.js', '.jsx'].some((ext) => entry.name.endsWith(ext))) {
|
|
306
|
+
files.push(fullPath);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
catch (error) {
|
|
311
|
+
// Ignore permission errors
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
walkDir(dir);
|
|
315
|
+
return files;
|
|
316
|
+
}
|
|
317
|
+
buildReadmePrompt(packageInfo, folderStructure) {
|
|
318
|
+
const projectName = packageInfo?.name || 'Project';
|
|
319
|
+
const description = packageInfo?.description || '';
|
|
320
|
+
const scripts = packageInfo?.scripts ? Object.keys(packageInfo.scripts) : [];
|
|
321
|
+
return `Generate a professional README.md for this project:
|
|
322
|
+
|
|
323
|
+
Project Name: ${projectName}
|
|
324
|
+
${description ? `Description: ${description}` : ''}
|
|
325
|
+
|
|
326
|
+
${scripts.length > 0 ? `Available Scripts: ${scripts.join(', ')}` : ''}
|
|
327
|
+
|
|
328
|
+
Project Structure:
|
|
329
|
+
${folderStructure.slice(0, 30).map((f) => `- ${f}`).join('\n')}
|
|
330
|
+
|
|
331
|
+
Create a comprehensive README with:
|
|
332
|
+
1. Project title and description
|
|
333
|
+
2. Features (if applicable)
|
|
334
|
+
3. Installation instructions
|
|
335
|
+
4. Usage examples
|
|
336
|
+
5. Project structure overview
|
|
337
|
+
6. Contributing guidelines (if applicable)
|
|
338
|
+
7. License information (if applicable)
|
|
339
|
+
|
|
340
|
+
Format as markdown. Make it professional and helpful for new users.`;
|
|
341
|
+
}
|
|
342
|
+
async buildAPIDocsContent(symbols) {
|
|
343
|
+
// Group symbols by file
|
|
344
|
+
const symbolsByFile = new Map();
|
|
345
|
+
for (const symbol of symbols) {
|
|
346
|
+
if (!symbolsByFile.has(symbol.filepath)) {
|
|
347
|
+
symbolsByFile.set(symbol.filepath, []);
|
|
348
|
+
}
|
|
349
|
+
symbolsByFile.get(symbol.filepath).push(symbol);
|
|
350
|
+
}
|
|
351
|
+
// Build structured content for AI generation
|
|
352
|
+
const symbolDescriptions = Array.from(symbolsByFile.entries())
|
|
353
|
+
.map(([filepath, fileSymbols]) => {
|
|
354
|
+
return `## ${filepath}\n\n${fileSymbols
|
|
355
|
+
.map((s) => {
|
|
356
|
+
const sig = s.signature || s.name;
|
|
357
|
+
const params = s.parameters
|
|
358
|
+
? `(${s.parameters.map((p) => `${p.name}: ${p.type}`).join(', ')})`
|
|
359
|
+
: '';
|
|
360
|
+
const ret = s.returnType ? `: ${s.returnType}` : '';
|
|
361
|
+
return `- **${s.name}** (${s.kind})\n - Signature: \`${sig}${params}${ret}\`\n - Location: Line ${s.line}${s.docComment ? `\n - Doc: ${s.docComment.substring(0, 100)}` : ''}`;
|
|
362
|
+
})
|
|
363
|
+
.join('\n\n')}`;
|
|
364
|
+
})
|
|
365
|
+
.join('\n\n');
|
|
366
|
+
const prompt = `Generate comprehensive API documentation in Markdown format for the following exported symbols:
|
|
367
|
+
|
|
368
|
+
${symbolDescriptions}
|
|
369
|
+
|
|
370
|
+
For each symbol, provide:
|
|
371
|
+
1. Function/class/type name
|
|
372
|
+
2. Description (generate based on name and signature)
|
|
373
|
+
3. Parameters (if function)
|
|
374
|
+
4. Return type
|
|
375
|
+
5. Usage example (if applicable)
|
|
376
|
+
|
|
377
|
+
Format as a well-structured Markdown document with clear sections for each file.`;
|
|
378
|
+
// Create minimal context chunks for AI
|
|
379
|
+
const context = symbols.slice(0, 10).map((s) => ({
|
|
380
|
+
filepath: s.filepath,
|
|
381
|
+
content: `${s.name}${s.signature || ''}`,
|
|
382
|
+
lineStart: s.line,
|
|
383
|
+
lineEnd: s.line,
|
|
384
|
+
score: 1.0,
|
|
385
|
+
metadata: {
|
|
386
|
+
language: 'typescript',
|
|
387
|
+
},
|
|
388
|
+
}));
|
|
389
|
+
const apiDocs = await this.aiService.chat(prompt, context);
|
|
390
|
+
// Add header
|
|
391
|
+
return `# API Documentation
|
|
392
|
+
|
|
393
|
+
Generated automatically from exported symbols.
|
|
394
|
+
|
|
395
|
+
${apiDocs}
|
|
396
|
+
`;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
//# sourceMappingURL=documentation-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentation-agent.js","sourceRoot":"","sources":["../../../src/application/agents/documentation-agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,SAAS,EAAmB,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AACrF,OAAO,EAAE,IAAI,EAAW,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,UAAU,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vB;SACF,CAAC,CAAC,CAAC;QAEJ,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE3D,aAAa;QACb,OAAO;;;;EAIT,OAAO;CACR,CAAC;IACA,CAAC;CACF"}
|
|
@@ -28,6 +28,9 @@ export interface ExecutionResponse {
|
|
|
28
28
|
overallSuccess: boolean;
|
|
29
29
|
completedSubPlans: number;
|
|
30
30
|
totalSubPlans: number;
|
|
31
|
+
validationSummary?: any;
|
|
32
|
+
feedbackId?: string;
|
|
33
|
+
runId?: string;
|
|
31
34
|
}
|
|
32
35
|
export declare class ExecutionAgent {
|
|
33
36
|
private aiService;
|
|
@@ -64,5 +67,13 @@ export declare class ExecutionAgent {
|
|
|
64
67
|
* Extract action parameters from sub-plan description
|
|
65
68
|
*/
|
|
66
69
|
private extractParameters;
|
|
70
|
+
/**
|
|
71
|
+
* Extract files from execution results
|
|
72
|
+
*/
|
|
73
|
+
private extractFilesFromResults;
|
|
74
|
+
/**
|
|
75
|
+
* Extract file changes from tool result
|
|
76
|
+
*/
|
|
77
|
+
private extractFilesFromToolResult;
|
|
67
78
|
}
|
|
68
79
|
//# sourceMappingURL=execution-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execution-agent.d.ts","sourceRoot":"","sources":["../../../src/application/agents/execution-agent.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAClF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAU,WAAW,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"execution-agent.d.ts","sourceRoot":"","sources":["../../../src/application/agents/execution-agent.ts"],"names":[],"mappings":"AAA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