codehere 0.2.0 → 0.4.0
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.
Potentially problematic release.
This version of codehere might be problematic. Click here for more details.
- package/README.md +223 -42
- 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 +86 -0
- 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 +132 -64
- 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/services/dependency-container.d.ts +25 -2
- package/dist/application/services/dependency-container.d.ts.map +1 -1
- package/dist/application/services/dependency-container.js +163 -1
- package/dist/application/services/dependency-container.js.map +1 -1
- package/dist/application/services/intelligent-router.d.ts +13 -0
- package/dist/application/services/intelligent-router.d.ts.map +1 -1
- package/dist/application/services/intelligent-router.js +300 -87
- package/dist/application/services/intelligent-router.js.map +1 -1
- package/dist/application/use-cases/ask-question-use-case.d.ts +31 -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 +254 -55
- 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 +86 -4
- package/dist/application/use-cases/edit-file-use-case.js.map +1 -1
- package/dist/application/use-cases/planning-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/planning-use-case.js +10 -1
- package/dist/application/use-cases/planning-use-case.js.map +1 -1
- package/dist/application/use-cases/react-orchestration-use-case.d.ts.map +1 -1
- package/dist/application/use-cases/react-orchestration-use-case.js +6 -2
- package/dist/application/use-cases/react-orchestration-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/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/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/services/environment-mode-manager.d.ts +18 -0
- package/dist/domain/services/environment-mode-manager.d.ts.map +1 -0
- package/dist/domain/services/environment-mode-manager.js +37 -0
- package/dist/domain/services/environment-mode-manager.js.map +1 -0
- package/dist/domain/services/react-loop.d.ts +8 -0
- package/dist/domain/services/react-loop.d.ts.map +1 -1
- package/dist/domain/services/react-loop.js +82 -6
- package/dist/domain/services/react-loop.js.map +1 -1
- package/dist/domain/services/risk-tier-detector.d.ts +18 -0
- package/dist/domain/services/risk-tier-detector.d.ts.map +1 -0
- package/dist/domain/services/risk-tier-detector.js +65 -0
- package/dist/domain/services/risk-tier-detector.js.map +1 -0
- package/dist/formatter.d.ts +2 -2
- package/dist/formatter.d.ts.map +1 -1
- package/dist/formatter.js +40 -20
- package/dist/formatter.js.map +1 -1
- package/dist/index.js +218 -125
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts +3 -1
- package/dist/infrastructure/ai/cohere-ai-service.d.ts.map +1 -1
- package/dist/infrastructure/ai/cohere-ai-service.js +65 -5
- 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 +68 -0
- package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/query-result-cache.js +138 -0
- package/dist/infrastructure/cache/query-result-cache.js.map +1 -0
- package/dist/infrastructure/cache/response-cache.d.ts +86 -0
- package/dist/infrastructure/cache/response-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/response-cache.js +224 -0
- package/dist/infrastructure/cache/response-cache.js.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts +57 -0
- package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -0
- package/dist/infrastructure/cache/security-scan-cache.js +124 -0
- package/dist/infrastructure/cache/security-scan-cache.js.map +1 -0
- package/dist/infrastructure/completion/bash-completion.d.ts +8 -0
- package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/bash-completion.js +101 -0
- package/dist/infrastructure/completion/bash-completion.js.map +1 -0
- package/dist/infrastructure/completion/completion-generator.d.ts +42 -0
- package/dist/infrastructure/completion/completion-generator.d.ts.map +1 -0
- package/dist/infrastructure/completion/completion-generator.js +184 -0
- package/dist/infrastructure/completion/completion-generator.js.map +1 -0
- package/dist/infrastructure/completion/fish-completion.d.ts +8 -0
- package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/fish-completion.js +65 -0
- package/dist/infrastructure/completion/fish-completion.js.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts +8 -0
- package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -0
- package/dist/infrastructure/completion/zsh-completion.js +85 -0
- package/dist/infrastructure/completion/zsh-completion.js.map +1 -0
- package/dist/infrastructure/context/context-compressor.d.ts +94 -0
- package/dist/infrastructure/context/context-compressor.d.ts.map +1 -0
- package/dist/infrastructure/context/context-compressor.js +329 -0
- package/dist/infrastructure/context/context-compressor.js.map +1 -0
- package/dist/infrastructure/context/conversation-context.d.ts +58 -0
- package/dist/infrastructure/context/conversation-context.d.ts.map +1 -0
- package/dist/infrastructure/context/conversation-context.js +170 -0
- package/dist/infrastructure/context/conversation-context.js.map +1 -0
- package/dist/infrastructure/context/session-manager.d.ts +26 -0
- package/dist/infrastructure/context/session-manager.d.ts.map +1 -0
- package/dist/infrastructure/context/session-manager.js +98 -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 +24 -11
- 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/observability/execution-tracer.d.ts +5 -2
- package/dist/infrastructure/observability/execution-tracer.d.ts.map +1 -1
- package/dist/infrastructure/observability/execution-tracer.js +45 -8
- package/dist/infrastructure/observability/execution-tracer.js.map +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 +359 -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/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 +105 -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/ai-sast-scanner.d.ts +4 -0
- package/dist/infrastructure/security/ai-sast-scanner.d.ts.map +1 -1
- package/dist/infrastructure/security/ai-sast-scanner.js +82 -4
- package/dist/infrastructure/security/ai-sast-scanner.js.map +1 -1
- package/dist/infrastructure/security/enhanced-security-gate.d.ts +2 -0
- package/dist/infrastructure/security/enhanced-security-gate.d.ts.map +1 -1
- package/dist/infrastructure/security/enhanced-security-gate.js +74 -15
- package/dist/infrastructure/security/enhanced-security-gate.js.map +1 -1
- package/dist/infrastructure/storage/plan-repository.d.ts +38 -0
- package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/plan-repository.js +133 -0
- package/dist/infrastructure/storage/plan-repository.js.map +1 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +11 -0
- package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
- package/dist/infrastructure/storage/sqlite-embedding-repository.js +121 -6
- package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
- package/dist/infrastructure/storage/task-helpers.d.ts +58 -0
- package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-helpers.js +157 -0
- package/dist/infrastructure/storage/task-helpers.js.map +1 -0
- package/dist/infrastructure/storage/task-repository.d.ts +67 -0
- package/dist/infrastructure/storage/task-repository.d.ts.map +1 -0
- package/dist/infrastructure/storage/task-repository.js +205 -0
- package/dist/infrastructure/storage/task-repository.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 +50 -0
- package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -0
- package/dist/infrastructure/ux/capability-boundaries.js +167 -0
- package/dist/infrastructure/ux/capability-boundaries.js.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts +63 -0
- package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js +212 -0
- package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +24 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.js +144 -0
- package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -0
- package/dist/infrastructure/ux/expectation-management.d.ts +33 -0
- package/dist/infrastructure/ux/expectation-management.d.ts.map +1 -1
- package/dist/infrastructure/ux/expectation-management.js +138 -4
- package/dist/infrastructure/ux/expectation-management.js.map +1 -1
- package/dist/infrastructure/ux/feature-discovery.d.ts +47 -0
- package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -0
- package/dist/infrastructure/ux/feature-discovery.js +190 -0
- package/dist/infrastructure/ux/feature-discovery.js.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts +42 -0
- package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -0
- package/dist/infrastructure/ux/feedback-prompt.js +181 -0
- package/dist/infrastructure/ux/feedback-prompt.js.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts +47 -0
- package/dist/infrastructure/ux/hitl-review-portal.d.ts.map +1 -0
- package/dist/infrastructure/ux/hitl-review-portal.js +228 -0
- package/dist/infrastructure/ux/hitl-review-portal.js.map +1 -0
- 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 +55 -0
- package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -0
- package/dist/infrastructure/ux/progress-indicator.js +131 -0
- package/dist/infrastructure/ux/progress-indicator.js.map +1 -0
- package/dist/infrastructure/ux/progressive-disclosure.d.ts.map +1 -1
- package/dist/infrastructure/ux/progressive-disclosure.js +2 -1
- package/dist/infrastructure/ux/progressive-disclosure.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 +35 -0
- package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -0
- package/dist/infrastructure/ux/review-checkpoint.js +119 -0
- package/dist/infrastructure/ux/review-checkpoint.js.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts +47 -0
- package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -0
- package/dist/infrastructure/ux/staged-feature-intro.js +144 -0
- package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts +21 -0
- package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -0
- package/dist/infrastructure/ux/syntax-highlighter.js +172 -0
- package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts +115 -0
- package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -0
- package/dist/infrastructure/validation/agent-feedback.js +227 -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 +88 -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 +54 -0
- package/dist/infrastructure/validation/review-handler.d.ts.map +1 -0
- package/dist/infrastructure/validation/review-handler.js +206 -0
- package/dist/infrastructure/validation/review-handler.js.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts +42 -0
- package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-aggregator.js +156 -0
- package/dist/infrastructure/validation/summary-aggregator.js.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts +59 -0
- package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -0
- package/dist/infrastructure/validation/summary-extractor.js +102 -0
- package/dist/infrastructure/validation/summary-extractor.js.map +1 -0
- package/dist/infrastructure/validation/trace-summary.d.ts +72 -0
- package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -0
- package/dist/infrastructure/validation/trace-summary.js +371 -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 -8
- package/dist/infrastructure/xai/cot-visualizer.d.ts.map +1 -1
- package/dist/infrastructure/xai/cot-visualizer.js +62 -18
- 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/presentation/cli/commands/ask-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/ask-command.js +152 -13
- package/dist/presentation/cli/commands/ask-command.js.map +1 -1
- package/dist/presentation/cli/commands/docs-command.d.ts +12 -0
- package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/docs-command.js +196 -0
- package/dist/presentation/cli/commands/docs-command.js.map +1 -0
- package/dist/presentation/cli/commands/fix-command.d.ts +8 -0
- package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/fix-command.js +309 -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 +2 -0
- package/dist/presentation/cli/commands/help-command.js.map +1 -1
- 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 +88 -1
- package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
- package/dist/presentation/cli/commands/plan-command.d.ts +1 -0
- package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/plan-command.js +136 -7
- package/dist/presentation/cli/commands/plan-command.js.map +1 -1
- package/dist/presentation/cli/commands/product-command.d.ts +12 -0
- package/dist/presentation/cli/commands/product-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/product-command.js +188 -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 +98 -16
- 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 +22 -0
- package/dist/presentation/cli/commands/review-command.js.map +1 -0
- package/dist/presentation/cli/commands/run-command.d.ts +15 -0
- package/dist/presentation/cli/commands/run-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/run-command.js +29 -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 +67 -12
- 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 +227 -23
- package/dist/presentation/cli/commands/smart-command.js.map +1 -1
- package/dist/presentation/cli/commands/status-command.d.ts +11 -0
- package/dist/presentation/cli/commands/status-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/status-command.js +176 -0
- package/dist/presentation/cli/commands/status-command.js.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts +13 -0
- package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -0
- package/dist/presentation/cli/commands/suggest-command.js +25 -0
- package/dist/presentation/cli/commands/suggest-command.js.map +1 -0
- package/dist/presentation/cli/commands/trace-command.d.ts.map +1 -1
- package/dist/presentation/cli/commands/trace-command.js +9 -5
- package/dist/presentation/cli/commands/trace-command.js.map +1 -1
- package/dist/presentation/cli/commands/undo-command.js +15 -6
- package/dist/presentation/cli/commands/undo-command.js.map +1 -1
- package/dist/presentation/cli/error-display.d.ts +2 -0
- package/dist/presentation/cli/error-display.d.ts.map +1 -1
- package/dist/presentation/cli/error-display.js +220 -2
- package/dist/presentation/cli/error-display.js.map +1 -1
- package/dist/presentation/cli/keyboard-shortcuts.d.ts +27 -0
- package/dist/presentation/cli/keyboard-shortcuts.d.ts.map +1 -0
- package/dist/presentation/cli/keyboard-shortcuts.js +77 -0
- package/dist/presentation/cli/keyboard-shortcuts.js.map +1 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +39 -2
- package/dist/session.js.map +1 -1
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js +8 -5
- package/dist/ui.js.map +1 -1
- package/dist/utils/version.js +2 -2
- package/dist/verification/backup.d.ts.map +1 -1
- package/dist/verification/backup.js +24 -3
- package/dist/verification/backup.js.map +1 -1
- package/dist/verification/compiler.js +47 -12
- package/dist/verification/compiler.js.map +1 -1
- package/package.json +10 -2
|
@@ -13,12 +13,34 @@
|
|
|
13
13
|
/**
|
|
14
14
|
* Human-in-the-Loop Validation System
|
|
15
15
|
* Manages mandatory validation checkpoints for critical operations
|
|
16
|
+
* Task 4.2: Adaptive HITL - Supports mandatory vs optional checkpoints based on risk
|
|
16
17
|
*/
|
|
17
18
|
export class HITLValidation {
|
|
18
19
|
checkpoints = new Map();
|
|
19
20
|
reviewQueue = []; // Checkpoint IDs in review order
|
|
21
|
+
config;
|
|
22
|
+
constructor(config) {
|
|
23
|
+
this.config = config || {
|
|
24
|
+
strictness: 'balanced',
|
|
25
|
+
allowAutoProceed: true,
|
|
26
|
+
mandatoryRiskLevels: ['critical', 'high'],
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Set HITL configuration (user preferences)
|
|
31
|
+
*/
|
|
32
|
+
setConfiguration(config) {
|
|
33
|
+
this.config = config;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get current HITL configuration
|
|
37
|
+
*/
|
|
38
|
+
getConfiguration() {
|
|
39
|
+
return { ...this.config };
|
|
40
|
+
}
|
|
20
41
|
/**
|
|
21
42
|
* Create review checkpoint
|
|
43
|
+
* Task 4.2: Determines if checkpoint is mandatory or optional based on risk and user preferences
|
|
22
44
|
*/
|
|
23
45
|
createCheckpoint(operation, changes, context, metadata) {
|
|
24
46
|
const checkpointId = `checkpoint-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
@@ -27,6 +49,8 @@ export class HITLValidation {
|
|
|
27
49
|
context.riskLevel === 'high' ? 'high' :
|
|
28
50
|
context.riskLevel === 'medium' ? 'normal' :
|
|
29
51
|
'low';
|
|
52
|
+
// Task 4.2: Determine if checkpoint is mandatory or optional
|
|
53
|
+
const isMandatory = this.isMandatoryCheckpoint(context);
|
|
30
54
|
const checkpoint = {
|
|
31
55
|
checkpointId,
|
|
32
56
|
operation,
|
|
@@ -34,6 +58,7 @@ export class HITLValidation {
|
|
|
34
58
|
priority,
|
|
35
59
|
status: 'pending',
|
|
36
60
|
createdAt: Date.now(),
|
|
61
|
+
isMandatory,
|
|
37
62
|
changes,
|
|
38
63
|
context,
|
|
39
64
|
metadata: metadata || {},
|
|
@@ -42,6 +67,67 @@ export class HITLValidation {
|
|
|
42
67
|
this.addToReviewQueue(checkpointId, priority);
|
|
43
68
|
return checkpoint;
|
|
44
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Task 4.2: Determine if checkpoint requires mandatory approval
|
|
72
|
+
* Low-risk operations can be optional (auto-proceed if user preference allows)
|
|
73
|
+
* High-risk operations are always mandatory
|
|
74
|
+
*/
|
|
75
|
+
isMandatoryCheckpoint(context) {
|
|
76
|
+
const { riskLevel, isDestructive = false, modifiesSecuritySensitiveCode = false, affectsMultipleFiles = false, uncertainty = 0.5, } = context;
|
|
77
|
+
// Always mandatory for critical operations
|
|
78
|
+
if (riskLevel === 'critical') {
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
// Always mandatory for destructive operations
|
|
82
|
+
if (isDestructive) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
// Always mandatory for security-sensitive modifications
|
|
86
|
+
if (modifiesSecuritySensitiveCode) {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
// Check user-configured mandatory risk levels
|
|
90
|
+
if (this.config.mandatoryRiskLevels?.includes(riskLevel)) {
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
// Apply strictness-based rules
|
|
94
|
+
// Note: 'critical' is already handled above, so riskLevel here is 'low' | 'medium' | 'high'
|
|
95
|
+
const strictness = this.config.strictness;
|
|
96
|
+
if (strictness === 'strict') {
|
|
97
|
+
// Strict: All medium+ risk operations are mandatory
|
|
98
|
+
return riskLevel !== 'low';
|
|
99
|
+
}
|
|
100
|
+
else if (strictness === 'balanced') {
|
|
101
|
+
// Balanced: High+ risk operations are mandatory, medium is optional
|
|
102
|
+
return riskLevel === 'high' || (affectsMultipleFiles && riskLevel === 'medium') || uncertainty > 0.8;
|
|
103
|
+
}
|
|
104
|
+
else if (strictness === 'minimal') {
|
|
105
|
+
// Minimal: Only high-risk operations are mandatory (critical already handled above)
|
|
106
|
+
return riskLevel === 'high' || (isDestructive && riskLevel === 'medium');
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
// Default: High+ risk operations are mandatory
|
|
110
|
+
return riskLevel === 'high';
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Task 4.2: Check if checkpoint can auto-proceed (optional checkpoint with user preference)
|
|
115
|
+
*/
|
|
116
|
+
canAutoProceed(checkpoint) {
|
|
117
|
+
// Never auto-proceed mandatory checkpoints
|
|
118
|
+
if (checkpoint.isMandatory) {
|
|
119
|
+
return false;
|
|
120
|
+
}
|
|
121
|
+
// Check if user allows auto-proceed
|
|
122
|
+
if (!this.config.allowAutoProceed) {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
// Optional checkpoints can auto-proceed if:
|
|
126
|
+
// 1. Not mandatory
|
|
127
|
+
// 2. User preference allows auto-proceed
|
|
128
|
+
// 3. Risk level is low or medium (not high/critical)
|
|
129
|
+
return checkpoint.context.riskLevel === 'low' || checkpoint.context.riskLevel === 'medium';
|
|
130
|
+
}
|
|
45
131
|
/**
|
|
46
132
|
* Check if operation requires HITL validation
|
|
47
133
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hitl-validation.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/hitl-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"hitl-validation.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/hitl-validation.ts"],"names":[],"m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W,CAAC,CAAC,CAAC,CAAC,CAAC;YACrE,IAAI,kBAAkB,EAAE,CAAC;gBACvB,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;gBACjF,IAAI,aAAa,IAAI,qBAAqB,EAAE,CAAC;oBAC3C,WAAW,GAAG,CAAC,CAAC;oBAChB,MAAM;gBACR,CAAC;YACH,CAAC;YACD,WAAW,GAAG,CAAC,GAAG,CAAC,CAAC;QACtB,CAAC;QAED,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;IAEO,mBAAmB,CACzB,SAAiB,EACjB,OAAoC,EACpC,OAAoC;QAEpC,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnF,OAAO,GAAG,SAAS,KAAK,aAAa,iBAAiB,OAAO,CAAC,SAAS,GAAG,CAAC;IAC7E,CAAC;CACF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress Indicator Utilities
|
|
3
|
+
* Provides progress indicators for long-running operations
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Progress bars for operations with known total
|
|
7
|
+
* - Spinners for operations with unknown duration
|
|
8
|
+
* - Context-aware progress messages
|
|
9
|
+
*/
|
|
10
|
+
export interface ProgressOptions {
|
|
11
|
+
total?: number;
|
|
12
|
+
message?: string;
|
|
13
|
+
showPercentage?: boolean;
|
|
14
|
+
showCount?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class ProgressIndicator {
|
|
17
|
+
private spinner;
|
|
18
|
+
private progressBar;
|
|
19
|
+
private operationStartTime;
|
|
20
|
+
private currentValue;
|
|
21
|
+
/**
|
|
22
|
+
* Start progress indicator
|
|
23
|
+
*/
|
|
24
|
+
start(options?: ProgressOptions): void;
|
|
25
|
+
/**
|
|
26
|
+
* Update progress
|
|
27
|
+
*/
|
|
28
|
+
update(value: number, message?: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* Increment progress
|
|
31
|
+
*/
|
|
32
|
+
increment(delta?: number, message?: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Stop progress indicator with smooth transition
|
|
35
|
+
* DELIGHTFUL UX: Smooth completion with visual feedback
|
|
36
|
+
*/
|
|
37
|
+
stop(success?: boolean, finalMessage?: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* Get elapsed time
|
|
40
|
+
*/
|
|
41
|
+
getElapsedTime(): number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Create progress indicator for embedding search
|
|
45
|
+
*/
|
|
46
|
+
export declare function createEmbeddingSearchProgress(total: number): ProgressIndicator;
|
|
47
|
+
/**
|
|
48
|
+
* Create progress indicator for plan generation
|
|
49
|
+
*/
|
|
50
|
+
export declare function createPlanGenerationProgress(): ProgressIndicator;
|
|
51
|
+
/**
|
|
52
|
+
* Create progress indicator for memory synthesis
|
|
53
|
+
*/
|
|
54
|
+
export declare function createMemorySynthesisProgress(): ProgressIndicator;
|
|
55
|
+
//# sourceMappingURL=progress-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-indicator.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/progress-indicator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,WAAW,CAAsC;IACzD,OAAO,CAAC,kBAAkB,CAAa;IACvC,OAAO,CAAC,YAAY,CAAa;IAEjC;;OAEG;IACH,KAAK,CAAC,OAAO,GAAE,eAAoB,GAAG,IAAI;IAmB1C;;OAEG;IACH,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAe7C;;OAEG;IACH,SAAS,CAAC,KAAK,GAAE,MAAU,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAIpD;;;OAGG;IACH,IAAI,CAAC,OAAO,GAAE,OAAc,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI;IA4B1D;;OAEG;IACH,cAAc,IAAI,MAAM;CAGzB;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAS9E;AAED;;GAEG;AACH,wBAAgB,4BAA4B,IAAI,iBAAiB,CAMhE;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,iBAAiB,CAMjE"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Progress Indicator Utilities
|
|
3
|
+
* Provides progress indicators for long-running operations
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - Progress bars for operations with known total
|
|
7
|
+
* - Spinners for operations with unknown duration
|
|
8
|
+
* - Context-aware progress messages
|
|
9
|
+
*/
|
|
10
|
+
import { createSpinner, createProgressBar, colors } from '../../ui.js';
|
|
11
|
+
export class ProgressIndicator {
|
|
12
|
+
spinner = null;
|
|
13
|
+
progressBar = null;
|
|
14
|
+
operationStartTime = 0;
|
|
15
|
+
currentValue = 0;
|
|
16
|
+
/**
|
|
17
|
+
* Start progress indicator
|
|
18
|
+
*/
|
|
19
|
+
start(options = {}) {
|
|
20
|
+
this.operationStartTime = Date.now();
|
|
21
|
+
this.currentValue = 0;
|
|
22
|
+
if (options.total && options.total > 0) {
|
|
23
|
+
// Use progress bar for operations with known total
|
|
24
|
+
const format = options.message
|
|
25
|
+
? `${colors.dim(options.message)} |{bar}| ${colors.cyan('{percentage}%')} | {value}/{total}`
|
|
26
|
+
: undefined;
|
|
27
|
+
this.progressBar = createProgressBar(options.total, format);
|
|
28
|
+
this.progressBar.start(options.total, 0);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// Use spinner for operations with unknown duration
|
|
32
|
+
const message = options.message || 'Processing...';
|
|
33
|
+
this.spinner = createSpinner(message);
|
|
34
|
+
this.spinner.start();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Update progress
|
|
39
|
+
*/
|
|
40
|
+
update(value, message) {
|
|
41
|
+
this.currentValue = value;
|
|
42
|
+
if (this.progressBar) {
|
|
43
|
+
this.progressBar.update(value);
|
|
44
|
+
if (message) {
|
|
45
|
+
// Update progress bar format with new message
|
|
46
|
+
// Note: cli-progress doesn't support dynamic message updates easily
|
|
47
|
+
// So we'll just update the value
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
else if (this.spinner && message) {
|
|
51
|
+
this.spinner.text = colors.dim(message);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Increment progress
|
|
56
|
+
*/
|
|
57
|
+
increment(delta = 1, message) {
|
|
58
|
+
this.update(this.currentValue + delta, message);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Stop progress indicator with smooth transition
|
|
62
|
+
* DELIGHTFUL UX: Smooth completion with visual feedback
|
|
63
|
+
*/
|
|
64
|
+
stop(success = true, finalMessage) {
|
|
65
|
+
const duration = ((Date.now() - this.operationStartTime) / 1000).toFixed(2);
|
|
66
|
+
if (this.progressBar) {
|
|
67
|
+
// Smooth completion - ensure bar reaches 100%
|
|
68
|
+
if (this.progressBar.getTotal() && this.currentValue < this.progressBar.getTotal()) {
|
|
69
|
+
this.progressBar.update(this.progressBar.getTotal());
|
|
70
|
+
}
|
|
71
|
+
this.progressBar.stop();
|
|
72
|
+
this.progressBar = null;
|
|
73
|
+
if (finalMessage) {
|
|
74
|
+
// Color-coded success message
|
|
75
|
+
const messageColor = success ? colors.green : colors.red;
|
|
76
|
+
console.log(messageColor(` ${finalMessage} (${duration}s)`));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
else if (this.spinner) {
|
|
80
|
+
// Smooth spinner stop with success indicator
|
|
81
|
+
this.spinner.stop();
|
|
82
|
+
this.spinner = null;
|
|
83
|
+
if (finalMessage) {
|
|
84
|
+
const icon = success ? colors.green('✓') : colors.red('✗');
|
|
85
|
+
// Enhanced formatting with color
|
|
86
|
+
const messageColor = success ? colors.green : colors.red;
|
|
87
|
+
console.log(`${icon} ${messageColor(finalMessage)} ${colors.dim(`(${duration}s)`)}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Get elapsed time
|
|
93
|
+
*/
|
|
94
|
+
getElapsedTime() {
|
|
95
|
+
return Date.now() - this.operationStartTime;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Create progress indicator for embedding search
|
|
100
|
+
*/
|
|
101
|
+
export function createEmbeddingSearchProgress(total) {
|
|
102
|
+
const indicator = new ProgressIndicator();
|
|
103
|
+
indicator.start({
|
|
104
|
+
total,
|
|
105
|
+
message: 'Searching codebase',
|
|
106
|
+
showPercentage: true,
|
|
107
|
+
showCount: true,
|
|
108
|
+
});
|
|
109
|
+
return indicator;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Create progress indicator for plan generation
|
|
113
|
+
*/
|
|
114
|
+
export function createPlanGenerationProgress() {
|
|
115
|
+
const indicator = new ProgressIndicator();
|
|
116
|
+
indicator.start({
|
|
117
|
+
message: 'Generating plan',
|
|
118
|
+
});
|
|
119
|
+
return indicator;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Create progress indicator for memory synthesis
|
|
123
|
+
*/
|
|
124
|
+
export function createMemorySynthesisProgress() {
|
|
125
|
+
const indicator = new ProgressIndicator();
|
|
126
|
+
indicator.start({
|
|
127
|
+
message: 'Synthesizing memories',
|
|
128
|
+
});
|
|
129
|
+
return indicator;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=progress-indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-indicator.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/progress-indicator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAWvE,MAAM,OAAO,iBAAiB;IACpB,OAAO,GAAe,IAAI,CAAC;IAC3B,WAAW,GAAiC,IAAI,CAAC;IACjD,kBAAkB,GAAW,CAAC,CAAC;IAC/B,YAAY,GAAW,CAAC,CAAC;IAEjC;;OAEG;IACH,KAAK,CAAC,UAA2B,EAAE;QACjC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QAEtB,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC;YACvC,mDAAmD;YACnD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO;gBAC5B,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,oBAAoB;gBAC5F,CAAC,CAAC,SAAS,CAAC;YACd,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC5D,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC3C,CAAC;aAAM,CAAC;YACN,mDAAmD;YACn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GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC1C,SAAS,CAAC,KAAK,CAAC;QACd,KAAK;QACL,OAAO,EAAE,oBAAoB;QAC7B,cAAc,EAAE,IAAI;QACpB,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B;IAC1C,MAAM,SAAS,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC1C,SAAS,CAAC,KAAK,CAAC;QACd,OAAO,EAAE,iBAAiB;KAC3B,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B;IAC3C,MAAM,SAAS,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC1C,SAAS,CAAC,KAAK,CAAC;QACd,OAAO,EAAE,uBAAuB;KACjC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressive-disclosure.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/progressive-disclosure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,CAAC;AAC5E,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAAC;AAEnF,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,aAAa,EAAE,SAAS,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,SAAS,CAAC;IACjB,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,YAAY,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,eAAe,CAAkD;IACzE,OAAO,CAAC,YAAY,CAAuC;;IAM3D;;OAEG;IACH,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI;IAItD;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW;IAe3C;;OAEG;IACH,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG;QACpD,IAAI,EAAE,OAAO,CAAC;QACd,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,cAAc,CAAC,EAAE,SAAS,CAAC;KAC5B;IAoCD;;OAEG;IACH,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,sBAAsB,EAAE;
|
|
1
|
+
{"version":3,"file":"progressive-disclosure.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/progressive-disclosure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,cAAc,GAAG,UAAU,GAAG,QAAQ,CAAC;AAC5E,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAAC;AAEnF,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,iBAAiB,CAAC;IAC9B,aAAa,EAAE,SAAS,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,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C,OAAO,CAAC,yBAAyB;IA4EjC,OAAO,CAAC,qBAAqB;CAe9B"}
|
|
@@ -82,7 +82,8 @@ export class ProgressiveDisclosure {
|
|
|
82
82
|
getAvailableFeatures(userId) {
|
|
83
83
|
const profile = this.getUserProfile(userId);
|
|
84
84
|
const available = [];
|
|
85
|
-
|
|
85
|
+
const features = Array.from(this.featureRegistry.values());
|
|
86
|
+
for (const feature of features) {
|
|
86
87
|
const { show } = this.shouldShowFeature(userId, feature.featureId);
|
|
87
88
|
if (show) {
|
|
88
89
|
available.push(feature);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progressive-disclosure.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/progressive-disclosure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyBH;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IACxB,eAAe,GAAwC,IAAI,GAAG,EAAE,CAAC;IACjE,YAAY,GAA6B,IAAI,GAAG,EAAE,CAAC;IAE3D;QACE,IAAI,CAAC,yBAAyB,EAAE,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,OAA+B;QAC7C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,MAAc;QAC3B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;gBAC5B,MAAM;gBACN,KAAK,EAAE,UAAU;gBACjB,kBAAkB,EAAE,EAAE;gBACtB,YAAY,EAAE,IAAI,GAAG,EAAE;gBACvB,kBAAkB,EAAE,KAAK;gBACzB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE;aACxB,CAAC,CAAC;QACL,CAAC;QACD,OAAO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,CAAC;IACxB,CAAC;IAED;;OAEG;IACH,oBAAoB,CAAC,MAAc;QACjC,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5C,MAAM,SAAS,GAA6B,EAAE,CAAC;QAE/C,KAAK,
|
|
1
|
+
{"version":3,"file":"progressive-disclosure.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/progressive-disclosure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyBH;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IACxB,eAAe,GAAwC,IAAI,GAAG,EAAE,CAAC;IACjE,YAAY,GAA6B,IAAI,GAAG,EAAE,CAAC;IAE3D;QACE,IAAI,CAAC,yBAAyB,EAAE,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,OAA+B;QAC7C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;OAEG;IACH,cAAc,CAAC,MAAc;QAC3B,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE;gBAC5B,MAAM;gBACN,KAAK,EAAE,UAAU;gBACjB,kBAAkB,EAAE,EAAE;gBACtB,YAAY,EAAE,IAAI,GAAG,EAAE;gBACvB,kBAAkB,EAAE,KAAK;gBACzB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;gBACrB,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE;aACxB,CAAC,CAAC;QACL,CAAC;QACD,OAAO,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,iBAAiB,CAAC,MAAc,EAAE,SAAiB;QAKjD,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;QAC5C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KAAK,cAAc,IAAI,kBAAkB,IAAI,CAAC,IAAI,UAAU,IAAI,EAAE,EAAE,CAAC;YAC3F,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QACxC,CAAC;aAAM,IAAI,OAAO,CAAC,KAAK,KAAK,UAAU,IAAI,kBAAkB,IAAI,EAAE,IAAI,UAAU,IAAI,GAAG,EAAE,CAAC;YACzF,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Infrastructure: Proportional Friction Enhancement
|
|
3
|
+
* Task 5.2: Higher friction for high-risk actions, lower friction for safe operations
|
|
4
|
+
*
|
|
5
|
+
* Features:
|
|
6
|
+
* - User-configurable friction levels
|
|
7
|
+
* - Risk-proportional friction calculation
|
|
8
|
+
* - Consistent application across operations
|
|
9
|
+
*/
|
|
10
|
+
import { AppropriateFriction, FrictionPoint } from './appropriate-friction.js';
|
|
11
|
+
export type UserFrictionPreference = 'minimal' | 'balanced' | 'strict';
|
|
12
|
+
export interface FrictionConfiguration {
|
|
13
|
+
preference: UserFrictionPreference;
|
|
14
|
+
allowAutoProceed: boolean;
|
|
15
|
+
customThresholds?: {
|
|
16
|
+
low?: number;
|
|
17
|
+
medium?: number;
|
|
18
|
+
high?: number;
|
|
19
|
+
critical?: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Enhanced Proportional Friction System
|
|
24
|
+
* Extends AppropriateFriction with user-configurable proportional scaling
|
|
25
|
+
*/
|
|
26
|
+
export declare class ProportionalFriction extends AppropriateFriction {
|
|
27
|
+
private config;
|
|
28
|
+
private configPath;
|
|
29
|
+
constructor(configPath?: string);
|
|
30
|
+
/**
|
|
31
|
+
* Get friction point adjusted for user preferences
|
|
32
|
+
* Scales friction level based on user configuration and risk
|
|
33
|
+
*/
|
|
34
|
+
getProportionalFriction(operation: string, context: {
|
|
35
|
+
riskLevel?: 'low' | 'medium' | 'high' | 'critical';
|
|
36
|
+
isDestructive?: boolean;
|
|
37
|
+
affectsMultipleFiles?: boolean;
|
|
38
|
+
modifiesSecuritySensitiveCode?: boolean;
|
|
39
|
+
uncertainty?: number;
|
|
40
|
+
}): FrictionPoint | null;
|
|
41
|
+
/**
|
|
42
|
+
* Adjust friction level based on user preference
|
|
43
|
+
*/
|
|
44
|
+
private adjustFrictionLevel;
|
|
45
|
+
/**
|
|
46
|
+
* Determine if explicit confirmation should be required
|
|
47
|
+
*/
|
|
48
|
+
private shouldRequireConfirmation;
|
|
49
|
+
/**
|
|
50
|
+
* Adjust timeout based on user preference
|
|
51
|
+
*/
|
|
52
|
+
private adjustTimeout;
|
|
53
|
+
/**
|
|
54
|
+
* Update friction configuration
|
|
55
|
+
*/
|
|
56
|
+
updateConfiguration(config: Partial<FrictionConfiguration>): void;
|
|
57
|
+
/**
|
|
58
|
+
* Get current configuration
|
|
59
|
+
*/
|
|
60
|
+
getConfiguration(): FrictionConfiguration;
|
|
61
|
+
/**
|
|
62
|
+
* Set user preference
|
|
63
|
+
*/
|
|
64
|
+
setPreference(preference: UserFrictionPreference): void;
|
|
65
|
+
/**
|
|
66
|
+
* Calculate friction intensity score (0-1)
|
|
67
|
+
* Higher score = more friction
|
|
68
|
+
*/
|
|
69
|
+
calculateFrictionScore(riskLevel: 'low' | 'medium' | 'high' | 'critical', isDestructive: boolean, affectsMultipleFiles: boolean, modifiesSecuritySensitiveCode: boolean, uncertainty: number): number;
|
|
70
|
+
private loadConfiguration;
|
|
71
|
+
private saveConfiguration;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=proportional-friction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proportional-friction.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/proportional-friction.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,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