@evolith/smart-cli 0.0.3-beta → 1.0.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.
- package/ARCHITECTURE.md +1 -1
- package/LICENSE +21 -0
- package/README.es.md +1024 -171
- package/README.md +1018 -166
- package/dist/.tsbuildinfo +1 -0
- package/dist/CoreApiClient.d.ts +5 -0
- package/dist/CoreApiClient.js +25 -0
- package/dist/CoreApiClient.js.map +1 -0
- package/dist/app.module.js +97 -10
- package/dist/app.module.js.map +1 -1
- package/dist/commands/adr/adr.command.d.ts +9 -3
- package/dist/commands/adr/adr.command.js +82 -88
- package/dist/commands/adr/adr.command.js.map +1 -1
- package/dist/commands/agents/agents.command.d.ts +27 -0
- package/dist/commands/agents/agents.command.js +373 -0
- package/dist/commands/agents/agents.command.js.map +1 -0
- package/dist/commands/agents/index.d.ts +1 -0
- package/dist/commands/agents/index.js +6 -0
- package/dist/commands/agents/index.js.map +1 -0
- package/dist/commands/alias/alias.command.d.ts +16 -0
- package/dist/commands/alias/alias.command.js +95 -0
- package/dist/commands/alias/alias.command.js.map +1 -0
- package/dist/commands/api/api.catalog.d.ts +38 -0
- package/dist/commands/api/api.catalog.js +167 -0
- package/dist/commands/api/api.catalog.js.map +1 -0
- package/dist/commands/api/api.command.d.ts +21 -0
- package/dist/commands/api/api.command.js +162 -0
- package/dist/commands/api/api.command.js.map +1 -0
- package/dist/commands/architecture/scaffold/index.d.ts +2 -0
- package/dist/commands/architecture/scaffold/index.js +6 -0
- package/dist/commands/architecture/scaffold/index.js.map +1 -0
- package/dist/commands/architecture/scaffold/scaffold-strategy.d.ts +15 -0
- package/dist/commands/architecture/scaffold/scaffold-strategy.js +20 -0
- package/dist/commands/architecture/scaffold/scaffold-strategy.js.map +1 -0
- package/dist/commands/architecture/scaffold.command.d.ts +12 -3
- package/dist/commands/architecture/scaffold.command.js +222 -56
- package/dist/commands/architecture/scaffold.command.js.map +1 -1
- package/dist/commands/chat/chat.command.d.ts +7 -0
- package/dist/commands/chat/chat.command.js +64 -0
- package/dist/commands/chat/chat.command.js.map +1 -0
- package/dist/commands/completion/completion.command.d.ts +12 -4
- package/dist/commands/completion/completion.command.js +159 -53
- package/dist/commands/completion/completion.command.js.map +1 -1
- package/dist/commands/docs/docs.command.d.ts +6 -3
- package/dist/commands/docs/docs.command.js +75 -16
- package/dist/commands/docs/docs.command.js.map +1 -1
- package/dist/commands/drift/drift.command.d.ts +7 -3
- package/dist/commands/drift/drift.command.js +94 -52
- package/dist/commands/drift/drift.command.js.map +1 -1
- package/dist/commands/evaluate/evaluate.command.d.ts +28 -0
- package/dist/commands/evaluate/evaluate.command.js +197 -0
- package/dist/commands/evaluate/evaluate.command.js.map +1 -0
- package/dist/commands/fixtures/fixtures.command.d.ts +21 -0
- package/dist/commands/fixtures/fixtures.command.js +310 -0
- package/dist/commands/fixtures/fixtures.command.js.map +1 -0
- package/dist/commands/gate/gate.command.d.ts +29 -0
- package/dist/commands/gate/gate.command.js +193 -0
- package/dist/commands/gate/gate.command.js.map +1 -0
- package/dist/commands/history/history.command.d.ts +3 -3
- package/dist/commands/history/history.command.js +24 -55
- package/dist/commands/history/history.command.js.map +1 -1
- package/dist/commands/init/init.command.d.ts +9 -3
- package/dist/commands/init/init.command.js +39 -198
- package/dist/commands/init/init.command.js.map +1 -1
- package/dist/commands/init/init.wizard.d.ts +19 -0
- package/dist/commands/init/init.wizard.js +181 -0
- package/dist/commands/init/init.wizard.js.map +1 -0
- package/dist/commands/phase/phase-advance.command.d.ts +30 -0
- package/dist/commands/phase/phase-advance.command.js +206 -0
- package/dist/commands/phase/phase-advance.command.js.map +1 -0
- package/dist/commands/plan/index.d.ts +1 -0
- package/dist/commands/plan/index.js +133 -0
- package/dist/commands/plan/index.js.map +1 -0
- package/dist/commands/profile/profile.command.d.ts +18 -0
- package/dist/commands/profile/profile.command.js +198 -0
- package/dist/commands/profile/profile.command.js.map +1 -0
- package/dist/commands/satellite/index.d.ts +2 -0
- package/dist/commands/satellite/index.js +8 -0
- package/dist/commands/satellite/index.js.map +1 -0
- package/dist/commands/satellite/satellite-adopt.command.d.ts +21 -0
- package/dist/commands/satellite/satellite-adopt.command.js +193 -0
- package/dist/commands/satellite/satellite-adopt.command.js.map +1 -0
- package/dist/commands/satellite/satellite-create.command.d.ts +26 -0
- package/dist/commands/satellite/satellite-create.command.js +192 -0
- package/dist/commands/satellite/satellite-create.command.js.map +1 -0
- package/dist/commands/sdlc/gate-status.command.d.ts +8 -3
- package/dist/commands/sdlc/gate-status.command.js +114 -66
- package/dist/commands/sdlc/gate-status.command.js.map +1 -1
- package/dist/commands/sdlc/generate-domain.command.d.ts +6 -3
- package/dist/commands/sdlc/generate-domain.command.js +126 -16
- package/dist/commands/sdlc/generate-domain.command.js.map +1 -1
- package/dist/commands/sdlc/handoff.command.d.ts +9 -4
- package/dist/commands/sdlc/handoff.command.js +106 -104
- package/dist/commands/sdlc/handoff.command.js.map +1 -1
- package/dist/commands/sdlc/sdlc.command.d.ts +4 -3
- package/dist/commands/sdlc/sdlc.command.js +17 -9
- package/dist/commands/sdlc/sdlc.command.js.map +1 -1
- package/dist/commands/standards/standards.command.d.ts +6 -3
- package/dist/commands/standards/standards.command.js +52 -77
- package/dist/commands/standards/standards.command.js.map +1 -1
- package/dist/commands/topology/phase-artifacts.command.d.ts +23 -0
- package/dist/commands/topology/phase-artifacts.command.js +167 -0
- package/dist/commands/topology/phase-artifacts.command.js.map +1 -0
- package/dist/commands/topology/recommend.command.d.ts +36 -0
- package/dist/commands/topology/recommend.command.js +236 -0
- package/dist/commands/topology/recommend.command.js.map +1 -0
- package/dist/commands/topology/topology.command.d.ts +5 -0
- package/dist/commands/topology/topology.command.js +41 -0
- package/dist/commands/topology/topology.command.js.map +1 -0
- package/dist/commands/update/update.command.d.ts +21 -0
- package/dist/commands/update/update.command.js +214 -0
- package/dist/commands/update/update.command.js.map +1 -0
- package/dist/commands/upgrade/upgrade.command.d.ts +22 -0
- package/dist/commands/{init → upgrade}/upgrade.command.js +34 -66
- package/dist/commands/upgrade/upgrade.command.js.map +1 -0
- package/dist/commands/validate/validate.command.d.ts +24 -6
- package/dist/commands/validate/validate.command.js +301 -63
- package/dist/commands/validate/validate.command.js.map +1 -1
- package/dist/config/alias.service.d.ts +14 -0
- package/dist/{core/sync/sync.service.js → config/alias.service.js} +54 -32
- package/dist/config/alias.service.js.map +1 -0
- package/dist/contributions/contribution-validator.d.ts +16 -0
- package/dist/contributions/contribution-validator.js +34 -0
- package/dist/contributions/contribution-validator.js.map +1 -0
- package/dist/contributions/index.d.ts +1 -0
- package/dist/contributions/index.js +6 -0
- package/dist/contributions/index.js.map +1 -0
- package/dist/{domain/services → infrastructure/adapters}/agent-registry.service.d.ts +6 -2
- package/dist/{domain/services → infrastructure/adapters}/agent-registry.service.js +33 -10
- package/dist/infrastructure/adapters/agent-registry.service.js.map +1 -0
- package/dist/infrastructure/agent/agent-runtime.factory.d.ts +9 -0
- package/dist/infrastructure/agent/agent-runtime.factory.js +47 -0
- package/dist/infrastructure/agent/agent-runtime.factory.js.map +1 -0
- package/dist/{core → infrastructure}/architecture/nx-workspace.strategy.d.ts +9 -1
- package/dist/infrastructure/architecture/nx-workspace.strategy.js +125 -0
- package/dist/infrastructure/architecture/nx-workspace.strategy.js.map +1 -0
- package/dist/infrastructure/architecture/topology-catalog.d.ts +15 -0
- package/dist/infrastructure/architecture/topology-catalog.js +50 -0
- package/dist/infrastructure/architecture/topology-catalog.js.map +1 -0
- package/dist/infrastructure/catalog/catalog-loader.d.ts +1 -2
- package/dist/infrastructure/catalog/catalog-loader.js +14 -5
- package/dist/infrastructure/catalog/catalog-loader.js.map +1 -1
- package/dist/infrastructure/cli/base-command.d.ts +14 -0
- package/dist/infrastructure/cli/base-command.js +41 -0
- package/dist/infrastructure/cli/base-command.js.map +1 -0
- package/dist/infrastructure/cli/command-executor.d.ts +2 -1
- package/dist/infrastructure/cli/command-executor.js +20 -3
- package/dist/infrastructure/cli/command-executor.js.map +1 -1
- package/dist/infrastructure/cli/providers/index.js +32 -29
- package/dist/infrastructure/cli/providers/index.js.map +1 -1
- package/dist/infrastructure/config/config.service.d.ts +34 -0
- package/dist/infrastructure/config/config.service.js +126 -0
- package/dist/infrastructure/config/config.service.js.map +1 -0
- package/dist/infrastructure/filesystem/file-manager.service.d.ts +12 -0
- package/dist/{core → infrastructure}/filesystem/file-manager.service.js +8 -25
- package/dist/infrastructure/filesystem/file-manager.service.js.map +1 -0
- package/dist/infrastructure/formatters/output-formatter.service.js +2 -1
- package/dist/infrastructure/formatters/output-formatter.service.js.map +1 -1
- package/dist/{core → infrastructure}/observability/command-watcher.js +31 -0
- package/dist/infrastructure/observability/command-watcher.js.map +1 -0
- package/dist/{core → infrastructure}/observability/error-reporter.js +5 -5
- package/dist/infrastructure/observability/error-reporter.js.map +1 -0
- package/dist/infrastructure/observability/index.d.ts +11 -0
- package/dist/{core → infrastructure}/observability/index.js +8 -1
- package/dist/infrastructure/observability/index.js.map +1 -0
- package/dist/infrastructure/observability/otel-tracing.d.ts +4 -0
- package/dist/infrastructure/observability/otel-tracing.js +34 -0
- package/dist/infrastructure/observability/otel-tracing.js.map +1 -0
- package/dist/infrastructure/observability/structured-logger.js.map +1 -0
- package/dist/infrastructure/observability/timing.js.map +1 -0
- package/dist/infrastructure/observability/tool-usage-telemetry.service.js.map +1 -0
- package/dist/infrastructure/plugins/plugin-loader.d.ts +10 -0
- package/dist/infrastructure/plugins/plugin-loader.js +145 -0
- package/dist/infrastructure/plugins/plugin-loader.js.map +1 -0
- package/dist/infrastructure/plugins/plugin.module.d.ts +4 -0
- package/dist/infrastructure/plugins/plugin.module.js +28 -0
- package/dist/infrastructure/plugins/plugin.module.js.map +1 -0
- package/dist/infrastructure/prompts/init-prompt-group.d.ts +3 -0
- package/dist/infrastructure/prompts/init-prompt-group.js +115 -0
- package/dist/infrastructure/prompts/init-prompt-group.js.map +1 -0
- package/dist/infrastructure/prompts/init-prompt-options.d.ts +10 -0
- package/dist/infrastructure/prompts/init-prompt-options.js +40 -0
- package/dist/infrastructure/prompts/init-prompt-options.js.map +1 -0
- package/dist/infrastructure/prompts/progress.service.d.ts +24 -0
- package/dist/infrastructure/prompts/progress.service.js +180 -0
- package/dist/infrastructure/prompts/progress.service.js.map +1 -0
- package/dist/infrastructure/prompts/prompt.service.d.ts +42 -0
- package/dist/infrastructure/prompts/prompt.service.js +142 -0
- package/dist/infrastructure/prompts/prompt.service.js.map +1 -0
- package/dist/infrastructure/prompts/wizard.service.d.ts +27 -0
- package/dist/infrastructure/prompts/wizard.service.js +163 -0
- package/dist/infrastructure/prompts/wizard.service.js.map +1 -0
- package/dist/{core/abstractions → infrastructure}/providers/config-parser.provider.d.ts +1 -1
- package/dist/infrastructure/providers/config-parser.provider.js.map +1 -0
- package/dist/{core/abstractions → infrastructure}/providers/logger.provider.d.ts +1 -1
- package/dist/infrastructure/providers/logger.provider.js.map +1 -0
- package/dist/{core/abstractions → infrastructure}/providers/mock-filesystem.provider.d.ts +6 -2
- package/dist/{core/abstractions → infrastructure}/providers/mock-filesystem.provider.js +8 -1
- package/dist/infrastructure/providers/mock-filesystem.provider.js.map +1 -0
- package/dist/{core/abstractions → infrastructure}/providers/node-filesystem.provider.d.ts +6 -2
- package/dist/{core/abstractions → infrastructure}/providers/node-filesystem.provider.js +13 -0
- package/dist/infrastructure/providers/node-filesystem.provider.js.map +1 -0
- package/dist/main.js +30 -2
- package/dist/main.js.map +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +6 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/plugin-registry.d.ts +22 -0
- package/dist/plugins/plugin-registry.js +33 -0
- package/dist/plugins/plugin-registry.js.map +1 -0
- package/package.json +58 -27
- package/shell/hooks.bash +68 -0
- package/shell/hooks.fish +57 -0
- package/shell/hooks.zsh +68 -0
- package/dist/app.module.spec.d.ts +0 -1
- package/dist/app.module.spec.js +0 -305
- package/dist/app.module.spec.js.map +0 -1
- package/dist/application/services/index.d.ts +0 -63
- package/dist/application/services/index.js +0 -345
- package/dist/application/services/index.js.map +0 -1
- package/dist/application/services/phase-transition.use-case.spec.d.ts +0 -1
- package/dist/application/services/phase-transition.use-case.spec.js +0 -297
- package/dist/application/services/phase-transition.use-case.spec.js.map +0 -1
- package/dist/application/services/services.test.d.ts +0 -1
- package/dist/application/services/services.test.js +0 -176
- package/dist/application/services/services.test.js.map +0 -1
- package/dist/application/use-cases/validate-satellite.use-case.d.ts +0 -18
- package/dist/application/use-cases/validate-satellite.use-case.js +0 -92
- package/dist/application/use-cases/validate-satellite.use-case.js.map +0 -1
- package/dist/application/use-cases/validate-satellite.use-case.spec.d.ts +0 -1
- package/dist/application/use-cases/validate-satellite.use-case.spec.js +0 -102
- package/dist/application/use-cases/validate-satellite.use-case.spec.js.map +0 -1
- package/dist/commands/adr/adr.command.spec.d.ts +0 -1
- package/dist/commands/adr/adr.command.spec.js +0 -409
- package/dist/commands/adr/adr.command.spec.js.map +0 -1
- package/dist/commands/architecture/scaffold.command.spec.d.ts +0 -1
- package/dist/commands/architecture/scaffold.command.spec.js +0 -207
- package/dist/commands/architecture/scaffold.command.spec.js.map +0 -1
- package/dist/commands/commands.test.d.ts +0 -1
- package/dist/commands/commands.test.js +0 -131
- package/dist/commands/commands.test.js.map +0 -1
- package/dist/commands/completion/completion.command.spec.d.ts +0 -1
- package/dist/commands/completion/completion.command.spec.js +0 -240
- package/dist/commands/completion/completion.command.spec.js.map +0 -1
- package/dist/commands/docs/docs.command.spec.d.ts +0 -1
- package/dist/commands/docs/docs.command.spec.js +0 -87
- package/dist/commands/docs/docs.command.spec.js.map +0 -1
- package/dist/commands/drift/drift.command.spec.d.ts +0 -1
- package/dist/commands/drift/drift.command.spec.js +0 -327
- package/dist/commands/drift/drift.command.spec.js.map +0 -1
- package/dist/commands/history/history.command.spec.d.ts +0 -1
- package/dist/commands/history/history.command.spec.js +0 -392
- package/dist/commands/history/history.command.spec.js.map +0 -1
- package/dist/commands/init/agents.command.d.ts +0 -22
- package/dist/commands/init/agents.command.js +0 -502
- package/dist/commands/init/agents.command.js.map +0 -1
- package/dist/commands/init/agents.command.spec.d.ts +0 -1
- package/dist/commands/init/agents.command.spec.js +0 -550
- package/dist/commands/init/agents.command.spec.js.map +0 -1
- package/dist/commands/init/init.command.spec.d.ts +0 -1
- package/dist/commands/init/init.command.spec.js +0 -272
- package/dist/commands/init/init.command.spec.js.map +0 -1
- package/dist/commands/init/upgrade.command.d.ts +0 -19
- package/dist/commands/init/upgrade.command.js.map +0 -1
- package/dist/commands/init/upgrade.command.spec.d.ts +0 -1
- package/dist/commands/init/upgrade.command.spec.js +0 -378
- package/dist/commands/init/upgrade.command.spec.js.map +0 -1
- package/dist/commands/mcp/mcp-serve.command.d.ts +0 -15
- package/dist/commands/mcp/mcp-serve.command.js +0 -106
- package/dist/commands/mcp/mcp-serve.command.js.map +0 -1
- package/dist/commands/mcp/mcp-serve.command.spec.d.ts +0 -1
- package/dist/commands/mcp/mcp-serve.command.spec.js +0 -58
- package/dist/commands/mcp/mcp-serve.command.spec.js.map +0 -1
- package/dist/commands/sdlc/generate-domain.command.spec.d.ts +0 -1
- package/dist/commands/sdlc/generate-domain.command.spec.js +0 -47
- package/dist/commands/sdlc/generate-domain.command.spec.js.map +0 -1
- package/dist/commands/sdlc/handoff.command.spec.d.ts +0 -1
- package/dist/commands/sdlc/handoff.command.spec.js +0 -395
- package/dist/commands/sdlc/handoff.command.spec.js.map +0 -1
- package/dist/commands/sdlc/sdlc.command.spec.d.ts +0 -1
- package/dist/commands/sdlc/sdlc.command.spec.js +0 -45
- package/dist/commands/sdlc/sdlc.command.spec.js.map +0 -1
- package/dist/commands/standards/standards.command.spec.d.ts +0 -1
- package/dist/commands/standards/standards.command.spec.js +0 -311
- package/dist/commands/standards/standards.command.spec.js.map +0 -1
- package/dist/commands/validate/validate.command.spec.d.ts +0 -1
- package/dist/commands/validate/validate.command.spec.js +0 -368
- package/dist/commands/validate/validate.command.spec.js.map +0 -1
- package/dist/config/runtimes.json +0 -196
- package/dist/config/tool-catalog.json +0 -343
- package/dist/core/abstractions/index.d.ts +0 -6
- package/dist/core/abstractions/index.js +0 -23
- package/dist/core/abstractions/index.js.map +0 -1
- package/dist/core/abstractions/interfaces.d.ts +0 -60
- package/dist/core/abstractions/interfaces.js +0 -5
- package/dist/core/abstractions/interfaces.js.map +0 -1
- package/dist/core/abstractions/providers/config-parser.provider.js.map +0 -1
- package/dist/core/abstractions/providers/logger.provider.js.map +0 -1
- package/dist/core/abstractions/providers/logger.provider.spec.d.ts +0 -1
- package/dist/core/abstractions/providers/logger.provider.spec.js +0 -212
- package/dist/core/abstractions/providers/logger.provider.spec.js.map +0 -1
- package/dist/core/abstractions/providers/mock-filesystem.provider.js.map +0 -1
- package/dist/core/abstractions/providers/node-filesystem.provider.js.map +0 -1
- package/dist/core/agents/agent-ruleset-builder.d.ts +0 -30
- package/dist/core/agents/agent-ruleset-builder.js +0 -75
- package/dist/core/agents/agent-ruleset-builder.js.map +0 -1
- package/dist/core/agents/agent-ruleset-builder.spec.d.ts +0 -1
- package/dist/core/agents/agent-ruleset-builder.spec.js +0 -135
- package/dist/core/agents/agent-ruleset-builder.spec.js.map +0 -1
- package/dist/core/architecture/nx-workspace.strategy.js +0 -107
- package/dist/core/architecture/nx-workspace.strategy.js.map +0 -1
- package/dist/core/architecture/workspace-manager.strategy.d.ts +0 -7
- package/dist/core/architecture/workspace-manager.strategy.js +0 -3
- package/dist/core/architecture/workspace-manager.strategy.js.map +0 -1
- package/dist/core/config/config.service.d.ts +0 -15
- package/dist/core/config/config.service.js +0 -55
- package/dist/core/config/config.service.js.map +0 -1
- package/dist/core/config/config.service.spec.d.ts +0 -1
- package/dist/core/config/config.service.spec.js +0 -43
- package/dist/core/config/config.service.spec.js.map +0 -1
- package/dist/core/di/container.d.ts +0 -25
- package/dist/core/di/container.js +0 -87
- package/dist/core/di/container.js.map +0 -1
- package/dist/core/di/container.spec.d.ts +0 -1
- package/dist/core/di/container.spec.js +0 -301
- package/dist/core/di/container.spec.js.map +0 -1
- package/dist/core/errors/index.d.ts +0 -26
- package/dist/core/errors/index.js +0 -67
- package/dist/core/errors/index.js.map +0 -1
- package/dist/core/filesystem/file-manager.service.d.ts +0 -4
- package/dist/core/filesystem/file-manager.service.js.map +0 -1
- package/dist/core/filesystem/file-manager.service.spec.d.ts +0 -1
- package/dist/core/filesystem/file-manager.service.spec.js +0 -103
- package/dist/core/filesystem/file-manager.service.spec.js.map +0 -1
- package/dist/core/mcp/mcp-server.service.d.ts +0 -7
- package/dist/core/mcp/mcp-server.service.js +0 -31
- package/dist/core/mcp/mcp-server.service.js.map +0 -1
- package/dist/core/mcp/metrics.service.d.ts +0 -37
- package/dist/core/mcp/metrics.service.js +0 -72
- package/dist/core/mcp/metrics.service.js.map +0 -1
- package/dist/core/mcp/metrics.service.spec.d.ts +0 -1
- package/dist/core/mcp/metrics.service.spec.js +0 -159
- package/dist/core/mcp/metrics.service.spec.js.map +0 -1
- package/dist/core/mcp/prompts/index.d.ts +0 -22
- package/dist/core/mcp/prompts/index.js +0 -211
- package/dist/core/mcp/prompts/index.js.map +0 -1
- package/dist/core/mcp/prompts/index.spec.d.ts +0 -1
- package/dist/core/mcp/prompts/index.spec.js +0 -150
- package/dist/core/mcp/prompts/index.spec.js.map +0 -1
- package/dist/core/mcp/resources/index.d.ts +0 -11
- package/dist/core/mcp/resources/index.js +0 -209
- package/dist/core/mcp/resources/index.js.map +0 -1
- package/dist/core/mcp/resources/index.spec.d.ts +0 -1
- package/dist/core/mcp/resources/index.spec.js +0 -212
- package/dist/core/mcp/resources/index.spec.js.map +0 -1
- package/dist/core/mcp/server.d.ts +0 -31
- package/dist/core/mcp/server.js +0 -719
- package/dist/core/mcp/server.js.map +0 -1
- package/dist/core/mcp/server.spec.d.ts +0 -1
- package/dist/core/mcp/server.spec.js +0 -563
- package/dist/core/mcp/server.spec.js.map +0 -1
- package/dist/core/mcp/tools/agent.d.ts +0 -41
- package/dist/core/mcp/tools/agent.js +0 -195
- package/dist/core/mcp/tools/agent.js.map +0 -1
- package/dist/core/mcp/tools/agent.spec.d.ts +0 -1
- package/dist/core/mcp/tools/agent.spec.js +0 -171
- package/dist/core/mcp/tools/agent.spec.js.map +0 -1
- package/dist/core/mcp/tools/architecture.d.ts +0 -29
- package/dist/core/mcp/tools/architecture.js +0 -234
- package/dist/core/mcp/tools/architecture.js.map +0 -1
- package/dist/core/mcp/tools/architecture.spec.d.ts +0 -1
- package/dist/core/mcp/tools/architecture.spec.js +0 -145
- package/dist/core/mcp/tools/architecture.spec.js.map +0 -1
- package/dist/core/mcp/tools/moscow.d.ts +0 -30
- package/dist/core/mcp/tools/moscow.js +0 -113
- package/dist/core/mcp/tools/moscow.js.map +0 -1
- package/dist/core/mcp/tools/moscow.spec.d.ts +0 -1
- package/dist/core/mcp/tools/moscow.spec.js +0 -209
- package/dist/core/mcp/tools/moscow.spec.js.map +0 -1
- package/dist/core/mcp/tools/sdlc.d.ts +0 -32
- package/dist/core/mcp/tools/sdlc.js +0 -190
- package/dist/core/mcp/tools/sdlc.js.map +0 -1
- package/dist/core/mcp/tools/sdlc.spec.d.ts +0 -1
- package/dist/core/mcp/tools/sdlc.spec.js +0 -170
- package/dist/core/mcp/tools/sdlc.spec.js.map +0 -1
- package/dist/core/mcp/tools/tool-utils.d.ts +0 -4
- package/dist/core/mcp/tools/tool-utils.js +0 -18
- package/dist/core/mcp/tools/tool-utils.js.map +0 -1
- package/dist/core/mcp/tools/validate.d.ts +0 -18
- package/dist/core/mcp/tools/validate.js +0 -56
- package/dist/core/mcp/tools/validate.js.map +0 -1
- package/dist/core/mcp/tools/validate.spec.d.ts +0 -1
- package/dist/core/mcp/tools/validate.spec.js +0 -130
- package/dist/core/mcp/tools/validate.spec.js.map +0 -1
- package/dist/core/mcp/watcher.service.d.ts +0 -8
- package/dist/core/mcp/watcher.service.js +0 -82
- package/dist/core/mcp/watcher.service.js.map +0 -1
- package/dist/core/mcp/watcher.service.spec.d.ts +0 -1
- package/dist/core/mcp/watcher.service.spec.js +0 -171
- package/dist/core/mcp/watcher.service.spec.js.map +0 -1
- package/dist/core/observability/command-watcher.js.map +0 -1
- package/dist/core/observability/error-reporter.js.map +0 -1
- package/dist/core/observability/error-reporter.spec.d.ts +0 -1
- package/dist/core/observability/error-reporter.spec.js +0 -291
- package/dist/core/observability/error-reporter.spec.js.map +0 -1
- package/dist/core/observability/index.d.ts +0 -4
- package/dist/core/observability/index.js.map +0 -1
- package/dist/core/observability/observability.test.d.ts +0 -1
- package/dist/core/observability/observability.test.js +0 -224
- package/dist/core/observability/observability.test.js.map +0 -1
- package/dist/core/observability/structured-logger.js.map +0 -1
- package/dist/core/observability/structured-logger.spec.d.ts +0 -1
- package/dist/core/observability/structured-logger.spec.js +0 -197
- package/dist/core/observability/structured-logger.spec.js.map +0 -1
- package/dist/core/observability/timing.js.map +0 -1
- package/dist/core/observability/timing.spec.d.ts +0 -1
- package/dist/core/observability/timing.spec.js +0 -216
- package/dist/core/observability/timing.spec.js.map +0 -1
- package/dist/core/services/command-executor.service.d.ts +0 -3
- package/dist/core/services/command-executor.service.js +0 -12
- package/dist/core/services/command-executor.service.js.map +0 -1
- package/dist/core/services/command-history.service.d.ts +0 -38
- package/dist/core/services/command-history.service.js +0 -146
- package/dist/core/services/command-history.service.js.map +0 -1
- package/dist/core/services/command-history.service.spec.d.ts +0 -1
- package/dist/core/services/command-history.service.spec.js +0 -166
- package/dist/core/services/command-history.service.spec.js.map +0 -1
- package/dist/core/services/command-providers.d.ts +0 -1
- package/dist/core/services/command-providers.js +0 -17
- package/dist/core/services/command-providers.js.map +0 -1
- package/dist/core/services/runtime-catalog.service.d.ts +0 -2
- package/dist/core/services/runtime-catalog.service.js +0 -7
- package/dist/core/services/runtime-catalog.service.js.map +0 -1
- package/dist/core/sync/sync.service.d.ts +0 -4
- package/dist/core/sync/sync.service.js.map +0 -1
- package/dist/core/sync/sync.service.spec.d.ts +0 -1
- package/dist/core/sync/sync.service.spec.js +0 -63
- package/dist/core/sync/sync.service.spec.js.map +0 -1
- package/dist/core/upgrade/satellite-upgrade.service.d.ts +0 -48
- package/dist/core/upgrade/satellite-upgrade.service.js +0 -358
- package/dist/core/upgrade/satellite-upgrade.service.js.map +0 -1
- package/dist/core/upgrade/satellite-upgrade.service.spec.d.ts +0 -1
- package/dist/core/upgrade/satellite-upgrade.service.spec.js +0 -163
- package/dist/core/upgrade/satellite-upgrade.service.spec.js.map +0 -1
- package/dist/core/validators/architecture-drift.service.d.ts +0 -68
- package/dist/core/validators/architecture-drift.service.js +0 -266
- package/dist/core/validators/architecture-drift.service.js.map +0 -1
- package/dist/core/validators/architecture-drift.service.spec.d.ts +0 -1
- package/dist/core/validators/architecture-drift.service.spec.js +0 -315
- package/dist/core/validators/architecture-drift.service.spec.js.map +0 -1
- package/dist/core/validators/deep-architecture-analyzer.d.ts +0 -58
- package/dist/core/validators/deep-architecture-analyzer.js +0 -333
- package/dist/core/validators/deep-architecture-analyzer.js.map +0 -1
- package/dist/core/validators/deep-architecture-analyzer.spec.d.ts +0 -1
- package/dist/core/validators/deep-architecture-analyzer.spec.js +0 -216
- package/dist/core/validators/deep-architecture-analyzer.spec.js.map +0 -1
- package/dist/core/validators/phase-gate-validator.service.d.ts +0 -71
- package/dist/core/validators/phase-gate-validator.service.js +0 -273
- package/dist/core/validators/phase-gate-validator.service.js.map +0 -1
- package/dist/core/validators/phase-gate-validator.service.spec.d.ts +0 -1
- package/dist/core/validators/phase-gate-validator.service.spec.js +0 -326
- package/dist/core/validators/phase-gate-validator.service.spec.js.map +0 -1
- package/dist/core/validators/ruleset-validator-architecture.spec.d.ts +0 -1
- package/dist/core/validators/ruleset-validator-architecture.spec.js +0 -178
- package/dist/core/validators/ruleset-validator-architecture.spec.js.map +0 -1
- package/dist/core/validators/ruleset-validator.service.d.ts +0 -80
- package/dist/core/validators/ruleset-validator.service.js +0 -657
- package/dist/core/validators/ruleset-validator.service.js.map +0 -1
- package/dist/core/validators/ruleset-validator.service.spec.d.ts +0 -1
- package/dist/core/validators/ruleset-validator.service.spec.js +0 -469
- package/dist/core/validators/ruleset-validator.service.spec.js.map +0 -1
- package/dist/domain/entities/index.d.ts +0 -72
- package/dist/domain/entities/index.js +0 -119
- package/dist/domain/entities/index.js.map +0 -1
- package/dist/domain/interfaces.d.ts +0 -224
- package/dist/domain/interfaces.js +0 -3
- package/dist/domain/interfaces.js.map +0 -1
- package/dist/domain/services/adr.service.d.ts +0 -50
- package/dist/domain/services/adr.service.js +0 -125
- package/dist/domain/services/adr.service.js.map +0 -1
- package/dist/domain/services/adr.service.spec.d.ts +0 -1
- package/dist/domain/services/adr.service.spec.js +0 -141
- package/dist/domain/services/adr.service.spec.js.map +0 -1
- package/dist/domain/services/agent-registry.service.js.map +0 -1
- package/dist/domain/services/agent-registry.service.spec.d.ts +0 -1
- package/dist/domain/services/agent-registry.service.spec.js +0 -162
- package/dist/domain/services/agent-registry.service.spec.js.map +0 -1
- package/dist/domain/services/index.d.ts +0 -34
- package/dist/domain/services/index.js +0 -128
- package/dist/domain/services/index.js.map +0 -1
- package/dist/domain/services/moscow-prioritization.service.d.ts +0 -44
- package/dist/domain/services/moscow-prioritization.service.js +0 -213
- package/dist/domain/services/moscow-prioritization.service.js.map +0 -1
- package/dist/domain/services/moscow-prioritization.service.spec.d.ts +0 -1
- package/dist/domain/services/moscow-prioritization.service.spec.js +0 -285
- package/dist/domain/services/moscow-prioritization.service.spec.js.map +0 -1
- package/dist/domain/services/services.test.d.ts +0 -1
- package/dist/domain/services/services.test.js +0 -236
- package/dist/domain/services/services.test.js.map +0 -1
- package/dist/domain/services/standards.service.d.ts +0 -47
- package/dist/domain/services/standards.service.js +0 -129
- package/dist/domain/services/standards.service.js.map +0 -1
- package/dist/domain/services/standards.service.spec.d.ts +0 -1
- package/dist/domain/services/standards.service.spec.js +0 -600
- package/dist/domain/services/standards.service.spec.js.map +0 -1
- package/dist/domain/services/tool-usage-telemetry.service.js.map +0 -1
- package/dist/domain/services/tool-usage-telemetry.service.spec.d.ts +0 -1
- package/dist/domain/services/tool-usage-telemetry.service.spec.js +0 -180
- package/dist/domain/services/tool-usage-telemetry.service.spec.js.map +0 -1
- package/dist/infrastructure/catalog/catalog-loader.test.d.ts +0 -1
- package/dist/infrastructure/catalog/catalog-loader.test.js +0 -184
- package/dist/infrastructure/catalog/catalog-loader.test.js.map +0 -1
- package/dist/infrastructure/cli/command-executor.test.d.ts +0 -1
- package/dist/infrastructure/cli/command-executor.test.js +0 -98
- package/dist/infrastructure/cli/command-executor.test.js.map +0 -1
- package/dist/infrastructure/formatters/output-formatter.service.spec.d.ts +0 -1
- package/dist/infrastructure/formatters/output-formatter.service.spec.js +0 -164
- package/dist/infrastructure/formatters/output-formatter.service.spec.js.map +0 -1
- package/dist/test/mocks/index.d.ts +0 -44
- package/dist/test/mocks/index.js +0 -135
- package/dist/test/mocks/index.js.map +0 -1
- /package/dist/{core → infrastructure}/observability/command-watcher.d.ts +0 -0
- /package/dist/{core → infrastructure}/observability/error-reporter.d.ts +0 -0
- /package/dist/{core → infrastructure}/observability/structured-logger.d.ts +0 -0
- /package/dist/{core → infrastructure}/observability/structured-logger.js +0 -0
- /package/dist/{core → infrastructure}/observability/timing.d.ts +0 -0
- /package/dist/{core → infrastructure}/observability/timing.js +0 -0
- /package/dist/{domain/services → infrastructure/observability}/tool-usage-telemetry.service.d.ts +0 -0
- /package/dist/{domain/services → infrastructure/observability}/tool-usage-telemetry.service.js +0 -0
- /package/dist/{core/abstractions → infrastructure}/providers/config-parser.provider.js +0 -0
- /package/dist/{core/abstractions → infrastructure}/providers/logger.provider.js +0 -0
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
const upgrade_command_1 = require("./upgrade.command");
|
|
37
|
-
jest.mock('@clack/prompts', () => ({
|
|
38
|
-
intro: jest.fn(),
|
|
39
|
-
outro: jest.fn(),
|
|
40
|
-
note: jest.fn(),
|
|
41
|
-
confirm: jest.fn(),
|
|
42
|
-
spinner: jest.fn(() => ({ start: jest.fn(), stop: jest.fn() })),
|
|
43
|
-
log: {
|
|
44
|
-
info: jest.fn(),
|
|
45
|
-
warn: jest.fn(),
|
|
46
|
-
success: jest.fn(),
|
|
47
|
-
error: jest.fn(),
|
|
48
|
-
message: jest.fn(),
|
|
49
|
-
},
|
|
50
|
-
}));
|
|
51
|
-
jest.mock('chalk', () => {
|
|
52
|
-
const chalkFn = (str) => str;
|
|
53
|
-
chalkFn.green = (str) => str;
|
|
54
|
-
chalkFn.red = (str) => str;
|
|
55
|
-
chalkFn.bold = (str) => str;
|
|
56
|
-
chalkFn.yellow = (str) => str;
|
|
57
|
-
chalkFn.blue = (str) => str;
|
|
58
|
-
chalkFn.cyan = (str) => str;
|
|
59
|
-
chalkFn.bgBlueBright = { white: { bold: (str) => str } };
|
|
60
|
-
return chalkFn;
|
|
61
|
-
});
|
|
62
|
-
jest.mock('../../core/upgrade/satellite-upgrade.service', () => ({
|
|
63
|
-
SatelliteUpgradeService: jest.fn().mockImplementation(() => ({
|
|
64
|
-
planUpgrade: jest.fn(),
|
|
65
|
-
executeUpgrade: jest.fn(),
|
|
66
|
-
getUpgradeReport: jest.fn(),
|
|
67
|
-
})),
|
|
68
|
-
}));
|
|
69
|
-
const p = __importStar(require("@clack/prompts"));
|
|
70
|
-
const satellite_upgrade_service_1 = require("../../core/upgrade/satellite-upgrade.service");
|
|
71
|
-
const mockPlanUpgrade = jest.fn();
|
|
72
|
-
const mockExecuteUpgrade = jest.fn();
|
|
73
|
-
const mockGetUpgradeReport = jest.fn();
|
|
74
|
-
satellite_upgrade_service_1.SatelliteUpgradeService.mockImplementation(() => ({
|
|
75
|
-
planUpgrade: mockPlanUpgrade,
|
|
76
|
-
executeUpgrade: mockExecuteUpgrade,
|
|
77
|
-
getUpgradeReport: mockGetUpgradeReport,
|
|
78
|
-
}));
|
|
79
|
-
describe('UpgradeCommand', () => {
|
|
80
|
-
let command;
|
|
81
|
-
let logSpy;
|
|
82
|
-
let exitSpy;
|
|
83
|
-
beforeEach(() => {
|
|
84
|
-
command = new upgrade_command_1.UpgradeCommand();
|
|
85
|
-
logSpy = jest.spyOn(console, 'log').mockImplementation(() => { });
|
|
86
|
-
exitSpy = jest.spyOn(process, 'exit').mockImplementation(() => undefined);
|
|
87
|
-
jest.clearAllMocks();
|
|
88
|
-
mockPlanUpgrade.mockReset();
|
|
89
|
-
mockExecuteUpgrade.mockReset();
|
|
90
|
-
mockGetUpgradeReport.mockReset();
|
|
91
|
-
});
|
|
92
|
-
afterEach(() => {
|
|
93
|
-
logSpy.mockRestore();
|
|
94
|
-
exitSpy.mockRestore();
|
|
95
|
-
});
|
|
96
|
-
describe('run', () => {
|
|
97
|
-
it('should show intro and plan upgrade', async () => {
|
|
98
|
-
mockPlanUpgrade.mockResolvedValue({
|
|
99
|
-
changes: [],
|
|
100
|
-
breakingChanges: [],
|
|
101
|
-
currentVersion: '1.0.0',
|
|
102
|
-
targetVersion: '1.0.0',
|
|
103
|
-
estimatedRisk: 'low',
|
|
104
|
-
});
|
|
105
|
-
await command.run([], {});
|
|
106
|
-
expect(p.intro).toHaveBeenCalled();
|
|
107
|
-
expect(mockPlanUpgrade).toHaveBeenCalled();
|
|
108
|
-
});
|
|
109
|
-
it('should show already up to date when no changes', async () => {
|
|
110
|
-
mockPlanUpgrade.mockResolvedValue({
|
|
111
|
-
changes: [],
|
|
112
|
-
breakingChanges: [],
|
|
113
|
-
currentVersion: '1.0.0',
|
|
114
|
-
targetVersion: '1.0.0',
|
|
115
|
-
estimatedRisk: 'low',
|
|
116
|
-
});
|
|
117
|
-
await command.run([], {});
|
|
118
|
-
expect(p.log.info).toHaveBeenCalledWith(expect.stringContaining('already up to date'));
|
|
119
|
-
expect(p.outro).toHaveBeenCalled();
|
|
120
|
-
});
|
|
121
|
-
it('should run dry run when dryRun option is set', async () => {
|
|
122
|
-
mockPlanUpgrade.mockResolvedValue({
|
|
123
|
-
changes: [{ type: 'add', sourcePath: '/s', targetPath: '/t', description: 'test', breaking: false }],
|
|
124
|
-
breakingChanges: [],
|
|
125
|
-
currentVersion: '1.0.0',
|
|
126
|
-
targetVersion: '1.1.0',
|
|
127
|
-
estimatedRisk: 'low',
|
|
128
|
-
});
|
|
129
|
-
mockExecuteUpgrade.mockResolvedValue({
|
|
130
|
-
success: true,
|
|
131
|
-
changesApplied: 0,
|
|
132
|
-
changesSkipped: 1,
|
|
133
|
-
errors: [],
|
|
134
|
-
warnings: [],
|
|
135
|
-
plan: { changes: [], breakingChanges: [], currentVersion: '1.0.0', targetVersion: '1.1.0', estimatedRisk: 'low', backupRequired: false },
|
|
136
|
-
backupPath: null,
|
|
137
|
-
});
|
|
138
|
-
mockGetUpgradeReport.mockResolvedValue('report');
|
|
139
|
-
await command.run([], { dryRun: true });
|
|
140
|
-
expect(mockExecuteUpgrade).toHaveBeenCalledWith(expect.objectContaining({ dryRun: true }));
|
|
141
|
-
expect(p.log.info).toHaveBeenCalledWith(expect.stringContaining('Dry run complete'));
|
|
142
|
-
});
|
|
143
|
-
it('should cancel upgrade on breaking changes without force', async () => {
|
|
144
|
-
mockPlanUpgrade.mockResolvedValue({
|
|
145
|
-
changes: [{ type: 'modify', sourcePath: '/s', targetPath: '/t', description: 'breaking', breaking: true }],
|
|
146
|
-
breakingChanges: [{ type: 'modify', sourcePath: '/s', targetPath: '/t', description: 'breaking', breaking: true }],
|
|
147
|
-
currentVersion: '1.0.0',
|
|
148
|
-
targetVersion: '1.1.0',
|
|
149
|
-
estimatedRisk: 'medium',
|
|
150
|
-
});
|
|
151
|
-
await command.run([], {});
|
|
152
|
-
expect(p.log.warn).toHaveBeenCalled();
|
|
153
|
-
expect(p.outro).toHaveBeenCalledWith(expect.stringContaining('Upgrade cancelled'));
|
|
154
|
-
});
|
|
155
|
-
it('should proceed with breaking changes when force is set', async () => {
|
|
156
|
-
mockPlanUpgrade.mockResolvedValue({
|
|
157
|
-
changes: [{ type: 'modify', sourcePath: '/s', targetPath: '/t', description: 'breaking', breaking: true }],
|
|
158
|
-
breakingChanges: [{ type: 'modify', sourcePath: '/s', targetPath: '/t', description: 'breaking', breaking: true }],
|
|
159
|
-
currentVersion: '1.0.0',
|
|
160
|
-
targetVersion: '1.1.0',
|
|
161
|
-
estimatedRisk: 'medium',
|
|
162
|
-
});
|
|
163
|
-
p.confirm.mockResolvedValue(true);
|
|
164
|
-
mockExecuteUpgrade.mockResolvedValue({
|
|
165
|
-
success: true,
|
|
166
|
-
changesApplied: 1,
|
|
167
|
-
changesSkipped: 0,
|
|
168
|
-
errors: [],
|
|
169
|
-
warnings: [],
|
|
170
|
-
plan: { changes: [], breakingChanges: [], currentVersion: '1.0.0', targetVersion: '1.1.0', estimatedRisk: 'medium', backupRequired: true },
|
|
171
|
-
backupPath: '/backup',
|
|
172
|
-
});
|
|
173
|
-
mockGetUpgradeReport.mockResolvedValue('report');
|
|
174
|
-
await command.run([], { force: true });
|
|
175
|
-
expect(mockExecuteUpgrade).toHaveBeenCalledWith(expect.objectContaining({ force: true }));
|
|
176
|
-
});
|
|
177
|
-
it('should cancel upgrade when user declines confirmation', async () => {
|
|
178
|
-
mockPlanUpgrade.mockResolvedValue({
|
|
179
|
-
changes: [{ type: 'add', sourcePath: '/s', targetPath: '/t', description: 'test', breaking: false }],
|
|
180
|
-
breakingChanges: [],
|
|
181
|
-
currentVersion: '1.0.0',
|
|
182
|
-
targetVersion: '1.1.0',
|
|
183
|
-
estimatedRisk: 'low',
|
|
184
|
-
});
|
|
185
|
-
p.confirm.mockResolvedValue(false);
|
|
186
|
-
await command.run([], {});
|
|
187
|
-
expect(p.outro).toHaveBeenCalledWith(expect.stringContaining('Upgrade cancelled'));
|
|
188
|
-
});
|
|
189
|
-
it('should show success message on successful upgrade', async () => {
|
|
190
|
-
mockPlanUpgrade.mockResolvedValue({
|
|
191
|
-
changes: [{ type: 'add', sourcePath: '/s', targetPath: '/t', description: 'test', breaking: false }],
|
|
192
|
-
breakingChanges: [],
|
|
193
|
-
currentVersion: '1.0.0',
|
|
194
|
-
targetVersion: '1.1.0',
|
|
195
|
-
estimatedRisk: 'low',
|
|
196
|
-
});
|
|
197
|
-
p.confirm.mockResolvedValue(true);
|
|
198
|
-
mockExecuteUpgrade.mockResolvedValue({
|
|
199
|
-
success: true,
|
|
200
|
-
changesApplied: 1,
|
|
201
|
-
changesSkipped: 0,
|
|
202
|
-
errors: [],
|
|
203
|
-
warnings: [],
|
|
204
|
-
plan: { changes: [], breakingChanges: [], currentVersion: '1.0.0', targetVersion: '1.1.0', estimatedRisk: 'low', backupRequired: false },
|
|
205
|
-
backupPath: null,
|
|
206
|
-
});
|
|
207
|
-
mockGetUpgradeReport.mockResolvedValue('report');
|
|
208
|
-
await command.run([], {});
|
|
209
|
-
expect(p.log.success).toHaveBeenCalled();
|
|
210
|
-
expect(p.outro).toHaveBeenCalledWith(expect.stringContaining('Upgrade finished'));
|
|
211
|
-
});
|
|
212
|
-
it('should show error message on failed upgrade', async () => {
|
|
213
|
-
mockPlanUpgrade.mockResolvedValue({
|
|
214
|
-
changes: [{ type: 'add', sourcePath: '/s', targetPath: '/t', description: 'test', breaking: false }],
|
|
215
|
-
breakingChanges: [],
|
|
216
|
-
currentVersion: '1.0.0',
|
|
217
|
-
targetVersion: '1.1.0',
|
|
218
|
-
estimatedRisk: 'low',
|
|
219
|
-
});
|
|
220
|
-
p.confirm.mockResolvedValue(true);
|
|
221
|
-
mockExecuteUpgrade.mockResolvedValue({
|
|
222
|
-
success: false,
|
|
223
|
-
changesApplied: 0,
|
|
224
|
-
changesSkipped: 1,
|
|
225
|
-
errors: ['Some error'],
|
|
226
|
-
warnings: [],
|
|
227
|
-
plan: { changes: [], breakingChanges: [], currentVersion: '1.0.0', targetVersion: '1.1.0', estimatedRisk: 'low', backupRequired: false },
|
|
228
|
-
backupPath: null,
|
|
229
|
-
});
|
|
230
|
-
mockGetUpgradeReport.mockResolvedValue('report');
|
|
231
|
-
await command.run([], {});
|
|
232
|
-
expect(p.log.error).toHaveBeenCalled();
|
|
233
|
-
});
|
|
234
|
-
it('should handle upgrade errors and exit', async () => {
|
|
235
|
-
mockPlanUpgrade.mockRejectedValue(new Error('Upgrade failed'));
|
|
236
|
-
await command.run([], {});
|
|
237
|
-
expect(p.log.error).toHaveBeenCalledWith(expect.stringContaining('Upgrade failed'));
|
|
238
|
-
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
239
|
-
});
|
|
240
|
-
it('should handle non-Error exceptions', async () => {
|
|
241
|
-
mockPlanUpgrade.mockRejectedValue('string error');
|
|
242
|
-
await command.run([], {});
|
|
243
|
-
expect(p.log.error).toHaveBeenCalledWith(expect.stringContaining('Upgrade failed'));
|
|
244
|
-
expect(exitSpy).toHaveBeenCalledWith(1);
|
|
245
|
-
});
|
|
246
|
-
it('should use custom core path when provided', async () => {
|
|
247
|
-
mockPlanUpgrade.mockResolvedValue({
|
|
248
|
-
changes: [],
|
|
249
|
-
breakingChanges: [],
|
|
250
|
-
currentVersion: '1.0.0',
|
|
251
|
-
targetVersion: '1.0.0',
|
|
252
|
-
estimatedRisk: 'low',
|
|
253
|
-
});
|
|
254
|
-
await command.run([], { core: '/custom/core' });
|
|
255
|
-
expect(mockPlanUpgrade).toHaveBeenCalledWith(expect.objectContaining({ corePath: '/custom/core' }));
|
|
256
|
-
});
|
|
257
|
-
});
|
|
258
|
-
describe('printUpgradePlan', () => {
|
|
259
|
-
it('should print upgrade plan with changes', () => {
|
|
260
|
-
const plan = {
|
|
261
|
-
currentVersion: '1.0.0',
|
|
262
|
-
targetVersion: '1.1.0',
|
|
263
|
-
estimatedRisk: 'low',
|
|
264
|
-
changes: [
|
|
265
|
-
{ type: 'add', sourcePath: '/s', targetPath: '/t', description: 'Add feature', breaking: false },
|
|
266
|
-
{ type: 'modify', sourcePath: '/s', targetPath: '/t', description: 'Modify feature', breaking: false },
|
|
267
|
-
],
|
|
268
|
-
breakingChanges: [],
|
|
269
|
-
};
|
|
270
|
-
command.printUpgradePlan(plan);
|
|
271
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Upgrade Plan'));
|
|
272
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Current Version:'));
|
|
273
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Target Version:'));
|
|
274
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Risk Level:'));
|
|
275
|
-
});
|
|
276
|
-
it('should print high risk level', () => {
|
|
277
|
-
const plan = {
|
|
278
|
-
currentVersion: '1.0.0',
|
|
279
|
-
targetVersion: '2.0.0',
|
|
280
|
-
estimatedRisk: 'high',
|
|
281
|
-
changes: [],
|
|
282
|
-
breakingChanges: [],
|
|
283
|
-
};
|
|
284
|
-
command.printUpgradePlan(plan);
|
|
285
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('HIGH'));
|
|
286
|
-
});
|
|
287
|
-
it('should print medium risk level', () => {
|
|
288
|
-
const plan = {
|
|
289
|
-
currentVersion: '1.0.0',
|
|
290
|
-
targetVersion: '1.5.0',
|
|
291
|
-
estimatedRisk: 'medium',
|
|
292
|
-
changes: [],
|
|
293
|
-
breakingChanges: [],
|
|
294
|
-
};
|
|
295
|
-
command.printUpgradePlan(plan);
|
|
296
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('MEDIUM'));
|
|
297
|
-
});
|
|
298
|
-
it('should show breaking changes count', () => {
|
|
299
|
-
const plan = {
|
|
300
|
-
currentVersion: '1.0.0',
|
|
301
|
-
targetVersion: '2.0.0',
|
|
302
|
-
estimatedRisk: 'high',
|
|
303
|
-
changes: [{ type: 'modify', sourcePath: '/s', targetPath: '/t', description: 'breaking', breaking: true }],
|
|
304
|
-
breakingChanges: [{ type: 'modify', sourcePath: '/s', targetPath: '/t', description: 'breaking', breaking: true }],
|
|
305
|
-
};
|
|
306
|
-
command.printUpgradePlan(plan);
|
|
307
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Breaking Changes:'));
|
|
308
|
-
});
|
|
309
|
-
it('should show breaking indicator on changes', () => {
|
|
310
|
-
const plan = {
|
|
311
|
-
currentVersion: '1.0.0',
|
|
312
|
-
targetVersion: '2.0.0',
|
|
313
|
-
estimatedRisk: 'high',
|
|
314
|
-
changes: [{ type: 'add', sourcePath: '/s', targetPath: '/t', description: 'breaking change', breaking: true }],
|
|
315
|
-
breakingChanges: [{ type: 'add', sourcePath: '/s', targetPath: '/t', description: 'breaking change', breaking: true }],
|
|
316
|
-
};
|
|
317
|
-
command.printUpgradePlan(plan);
|
|
318
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('[BREAKING]'));
|
|
319
|
-
});
|
|
320
|
-
});
|
|
321
|
-
describe('getChangeIcon', () => {
|
|
322
|
-
it('should return + for add', () => {
|
|
323
|
-
expect(command.getChangeIcon('add')).toBe('+');
|
|
324
|
-
});
|
|
325
|
-
it('should return ~ for modify', () => {
|
|
326
|
-
expect(command.getChangeIcon('modify')).toBe('~');
|
|
327
|
-
});
|
|
328
|
-
it('should return - for remove', () => {
|
|
329
|
-
expect(command.getChangeIcon('remove')).toBe('-');
|
|
330
|
-
});
|
|
331
|
-
it('should return » for migrate', () => {
|
|
332
|
-
expect(command.getChangeIcon('migrate')).toBe('»');
|
|
333
|
-
});
|
|
334
|
-
it('should return ? for unknown type', () => {
|
|
335
|
-
expect(command.getChangeIcon('unknown')).toBe('?');
|
|
336
|
-
});
|
|
337
|
-
});
|
|
338
|
-
describe('getRiskColor', () => {
|
|
339
|
-
it('should return high for high risk', () => {
|
|
340
|
-
expect(command.getRiskColor('high')).toBe('high');
|
|
341
|
-
});
|
|
342
|
-
it('should return medium for medium risk', () => {
|
|
343
|
-
expect(command.getRiskColor('medium')).toBe('medium');
|
|
344
|
-
});
|
|
345
|
-
it('should return low for unknown risk', () => {
|
|
346
|
-
expect(command.getRiskColor('unknown')).toBe('low');
|
|
347
|
-
});
|
|
348
|
-
it('should return low for empty string', () => {
|
|
349
|
-
expect(command.getRiskColor('')).toBe('low');
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
|
-
describe('findCorePath', () => {
|
|
353
|
-
it('should return satellite path', () => {
|
|
354
|
-
expect(command.findCorePath('/some/path')).toBe('/some/path');
|
|
355
|
-
});
|
|
356
|
-
});
|
|
357
|
-
describe('parseDryRun', () => {
|
|
358
|
-
it('should return true', () => {
|
|
359
|
-
expect(command.parseDryRun()).toBe(true);
|
|
360
|
-
});
|
|
361
|
-
});
|
|
362
|
-
describe('parseForce', () => {
|
|
363
|
-
it('should return true', () => {
|
|
364
|
-
expect(command.parseForce()).toBe(true);
|
|
365
|
-
});
|
|
366
|
-
});
|
|
367
|
-
describe('parseCore', () => {
|
|
368
|
-
it('should return the value', () => {
|
|
369
|
-
expect(command.parseCore('/custom/path')).toBe('/custom/path');
|
|
370
|
-
});
|
|
371
|
-
});
|
|
372
|
-
describe('parseReport', () => {
|
|
373
|
-
it('should return true', () => {
|
|
374
|
-
expect(command.parseReport()).toBe(true);
|
|
375
|
-
});
|
|
376
|
-
});
|
|
377
|
-
});
|
|
378
|
-
//# sourceMappingURL=upgrade.command.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.command.spec.js","sourceRoot":"","sources":["../../../src/commands/init/upgrade.command.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uDAAmD;AAEnD,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,CAAC;IACjC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE;IAChB,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE;IAChB,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;IACf,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE;IAClB,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IAC/D,GAAG,EAAE;QACH,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;QACf,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE;QACf,OAAO,EAAE,I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AAQ,CAAC,WAAW,EAAE,GAAG,EAAE;QACzB,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;YACjC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACjE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QAC3B,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE;YAC5B,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CommandRunner } from 'nest-commander';
|
|
2
|
-
import { McpTransport } from '../../core/mcp/server';
|
|
3
|
-
interface McpServeOptions {
|
|
4
|
-
transport?: McpTransport;
|
|
5
|
-
port?: number;
|
|
6
|
-
apiKey?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare class McpServeCommand extends CommandRunner {
|
|
9
|
-
private readonly logger;
|
|
10
|
-
run(passedParam: string[], options?: McpServeOptions): Promise<void>;
|
|
11
|
-
parseTransport(val: string): McpTransport;
|
|
12
|
-
parsePort(val: string): number;
|
|
13
|
-
parseApiKey(val: string): string;
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
var McpServeCommand_1;
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.McpServeCommand = void 0;
|
|
17
|
-
const nest_commander_1 = require("nest-commander");
|
|
18
|
-
const common_1 = require("@nestjs/common");
|
|
19
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
20
|
-
const server_1 = require("../../core/mcp/server");
|
|
21
|
-
const ruleset_validator_service_1 = require("../../core/validators/ruleset-validator.service");
|
|
22
|
-
let McpServeCommand = McpServeCommand_1 = class McpServeCommand extends nest_commander_1.CommandRunner {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
this.logger = new common_1.Logger(McpServeCommand_1.name);
|
|
26
|
-
}
|
|
27
|
-
async run(passedParam, options) {
|
|
28
|
-
const action = passedParam[0] || 'serve';
|
|
29
|
-
if (action === 'serve') {
|
|
30
|
-
const transport = options?.transport || 'stdio';
|
|
31
|
-
const port = options?.port || parseInt(process.env.PORT || '3000', 10);
|
|
32
|
-
const apiKey = options?.apiKey || process.env.EVOLITH_API_KEY;
|
|
33
|
-
if (transport === 'http') {
|
|
34
|
-
console.log(chalk_1.default.bgMagenta.white.bold(' Evolith SDK - MCP Server (HTTP) '));
|
|
35
|
-
this.logger.log(`Starting MCP server over HTTP on port ${port}...`);
|
|
36
|
-
if (apiKey) {
|
|
37
|
-
console.log(chalk_1.default.cyan('API key authentication enabled'));
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
console.log(chalk_1.default.bgMagenta.white.bold(' Evolith SDK - MCP Server (stdio) '));
|
|
42
|
-
this.logger.log('Starting MCP server over stdio...');
|
|
43
|
-
}
|
|
44
|
-
const validator = new ruleset_validator_service_1.RulesetValidatorService();
|
|
45
|
-
await (0, server_1.startMcpServer)({
|
|
46
|
-
rulesetValidator: validator,
|
|
47
|
-
transport,
|
|
48
|
-
port,
|
|
49
|
-
apiKey,
|
|
50
|
-
});
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
else if (action === 'version') {
|
|
54
|
-
console.log('Evolith MCP Server v1.0.0');
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
this.logger.warn(`Unknown MCP action: ${action}`);
|
|
59
|
-
console.log(`Unknown action: ${action}. Use 'evolith mcp serve' to start the server.`);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
parseTransport(val) {
|
|
63
|
-
return val;
|
|
64
|
-
}
|
|
65
|
-
parsePort(val) {
|
|
66
|
-
return parseInt(val, 10) || 3000;
|
|
67
|
-
}
|
|
68
|
-
parseApiKey(val) {
|
|
69
|
-
return val;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
exports.McpServeCommand = McpServeCommand;
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, nest_commander_1.Option)({
|
|
75
|
-
flags: '-t, --transport <stdio|http>',
|
|
76
|
-
description: 'Transport type: stdio (default) or http',
|
|
77
|
-
}),
|
|
78
|
-
__metadata("design:type", Function),
|
|
79
|
-
__metadata("design:paramtypes", [String]),
|
|
80
|
-
__metadata("design:returntype", String)
|
|
81
|
-
], McpServeCommand.prototype, "parseTransport", null);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, nest_commander_1.Option)({
|
|
84
|
-
flags: '-p, --port <number>',
|
|
85
|
-
description: 'HTTP server port (default: 3000)',
|
|
86
|
-
}),
|
|
87
|
-
__metadata("design:type", Function),
|
|
88
|
-
__metadata("design:paramtypes", [String]),
|
|
89
|
-
__metadata("design:returntype", Number)
|
|
90
|
-
], McpServeCommand.prototype, "parsePort", null);
|
|
91
|
-
__decorate([
|
|
92
|
-
(0, nest_commander_1.Option)({
|
|
93
|
-
flags: '--api-key <key>',
|
|
94
|
-
description: 'API key for authentication',
|
|
95
|
-
}),
|
|
96
|
-
__metadata("design:type", Function),
|
|
97
|
-
__metadata("design:paramtypes", [String]),
|
|
98
|
-
__metadata("design:returntype", String)
|
|
99
|
-
], McpServeCommand.prototype, "parseApiKey", null);
|
|
100
|
-
exports.McpServeCommand = McpServeCommand = McpServeCommand_1 = __decorate([
|
|
101
|
-
(0, nest_commander_1.Command)({
|
|
102
|
-
name: 'mcp',
|
|
103
|
-
description: 'Start Evolith MCP server for AI agent integration',
|
|
104
|
-
})
|
|
105
|
-
], McpServeCommand);
|
|
106
|
-
//# sourceMappingURL=mcp-serve.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-serve.command.js","sourceRoot":"","sources":["../../../src/commands/mcp/mcp-serve.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgE;AAChE,2CAAwC;AACxC,kDAA0B;AAC1B,kDAAqE;AACrE,+FAA0F;AAYnF,IAAM,eAAe,uBAArB,MAAM,eAAgB,SAAQ,8BAAa;IAA3C;;QACY,WAAM,GAAG,IAAI,eAAM,CAAC,iBAAe,CAAC,IAAI,CAAC,CAAC;IA8D7D,CAAC;IA5DC,KAAK,CAAC,GAAG,CAAC,WAAqB,EAAE,OAAyB;QACxD,MAAM,MAAM,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC;QAEzC,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;YACvB,MAAM,SAAS,GAAG,OAAO,EAAE,SAAS,IAAI,OAAO,CAAC;YAChD,MAAM,IAAI,GAAG,OAAO,EAAE,IAAI,IAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI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AAC,GAAW;QACnB,OAAO,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC;IACnC,CAAC;IAMD,WAAW,CAAC,GAAW;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAA;AA/DY,0CAAe;AA4C1B;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,8BAA8B;QACrC,WAAW,EAAE,yCAAyC;KACvD,CAAC;;;;qDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,kCAAkC;KAChD,CAAC;;;;gDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,4BAA4B;KAC1C,CAAC;;;;kDAGD;0BA9DU,eAAe;IAJ3B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,mDAAmD;KACjE,CAAC;GACW,eAAe,CA+D3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const mcp_serve_command_1 = require("./mcp-serve.command");
|
|
4
|
-
jest.mock('../../core/mcp/server', () => ({
|
|
5
|
-
startMcpServer: jest.fn().mockResolvedValue(undefined),
|
|
6
|
-
}));
|
|
7
|
-
jest.mock('../../core/validators/ruleset-validator.service', () => ({
|
|
8
|
-
RulesetValidatorService: jest.fn().mockImplementation(() => ({})),
|
|
9
|
-
}));
|
|
10
|
-
describe('McpServeCommand', () => {
|
|
11
|
-
let command;
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
command = new mcp_serve_command_1.McpServeCommand();
|
|
14
|
-
jest.clearAllMocks();
|
|
15
|
-
jest.spyOn(console, 'log').mockImplementation(() => { });
|
|
16
|
-
});
|
|
17
|
-
describe('run', () => {
|
|
18
|
-
it('should start MCP server with stdio transport by default', async () => {
|
|
19
|
-
await command.run([], {});
|
|
20
|
-
expect(console.log).toHaveBeenCalledWith(expect.stringContaining('stdio'));
|
|
21
|
-
});
|
|
22
|
-
it('should start MCP server with http transport when specified', async () => {
|
|
23
|
-
await command.run([], { transport: 'http', port: 3000 });
|
|
24
|
-
expect(console.log).toHaveBeenCalledWith(expect.stringContaining('HTTP'));
|
|
25
|
-
});
|
|
26
|
-
it('should show API key enabled message when apiKey provided', async () => {
|
|
27
|
-
await command.run([], { transport: 'http', port: 3000, apiKey: 'test-key' });
|
|
28
|
-
expect(console.log).toHaveBeenCalledWith(expect.stringContaining('API key authentication enabled'));
|
|
29
|
-
});
|
|
30
|
-
it('should handle version action', async () => {
|
|
31
|
-
await command.run(['version'], {});
|
|
32
|
-
expect(console.log).toHaveBeenCalledWith('Evolith MCP Server v1.0.0');
|
|
33
|
-
});
|
|
34
|
-
it('should warn about unknown action', async () => {
|
|
35
|
-
await command.run(['unknown'], {});
|
|
36
|
-
expect(console.log).toHaveBeenCalledWith(expect.stringContaining('Unknown action'));
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
describe('option parsers', () => {
|
|
40
|
-
it('should parse transport option', () => {
|
|
41
|
-
const result = command.parseTransport('http');
|
|
42
|
-
expect(result).toBe('http');
|
|
43
|
-
});
|
|
44
|
-
it('should parse port option', () => {
|
|
45
|
-
const result = command.parsePort('8080');
|
|
46
|
-
expect(result).toBe(8080);
|
|
47
|
-
});
|
|
48
|
-
it('should default port to 3000 when invalid', () => {
|
|
49
|
-
const result = command.parsePort('invalid');
|
|
50
|
-
expect(result).toBe(3000);
|
|
51
|
-
});
|
|
52
|
-
it('should parse api-key option', () => {
|
|
53
|
-
const result = command.parseApiKey('secret-key');
|
|
54
|
-
expect(result).toBe('secret-key');
|
|
55
|
-
});
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
//# sourceMappingURL=mcp-serve.command.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
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,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;YAClC,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAEzC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;YAClD,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YAE5C,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE;YACrC,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;YAEjD,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const generate_domain_command_1 = require("./generate-domain.command");
|
|
4
|
-
describe('GenerateDomainCommand', () => {
|
|
5
|
-
let command;
|
|
6
|
-
let logSpy;
|
|
7
|
-
let errorSpy;
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
command = new generate_domain_command_1.GenerateDomainCommand();
|
|
10
|
-
logSpy = jest.spyOn(console, 'log').mockImplementation(() => { });
|
|
11
|
-
errorSpy = jest.spyOn(console, 'error').mockImplementation(() => { });
|
|
12
|
-
});
|
|
13
|
-
afterEach(() => {
|
|
14
|
-
logSpy.mockRestore();
|
|
15
|
-
errorSpy.mockRestore();
|
|
16
|
-
});
|
|
17
|
-
describe('run', () => {
|
|
18
|
-
it('should show error when target is missing', async () => {
|
|
19
|
-
await command.run([], { from: 'ddd-model.md' });
|
|
20
|
-
expect(errorSpy).toHaveBeenCalledWith(expect.stringContaining('Error'));
|
|
21
|
-
});
|
|
22
|
-
it('should show error when from is missing', async () => {
|
|
23
|
-
await command.run(['domain'], {});
|
|
24
|
-
expect(errorSpy).toHaveBeenCalledWith(expect.stringContaining('Error'));
|
|
25
|
-
});
|
|
26
|
-
it('should show error when both are missing', async () => {
|
|
27
|
-
await command.run([], {});
|
|
28
|
-
expect(errorSpy).toHaveBeenCalledWith(expect.stringContaining('Error'));
|
|
29
|
-
});
|
|
30
|
-
it('should scaffold domain when target and from are provided', async () => {
|
|
31
|
-
await command.run(['domain'], { from: 'ddd-model.md' });
|
|
32
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Scaffolding domain'));
|
|
33
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Parsing Markdown AST'));
|
|
34
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Extracting Mermaid'));
|
|
35
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Translating'));
|
|
36
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('Scaffolding Hexagonal'));
|
|
37
|
-
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining('completed successfully'));
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
describe('parseFrom', () => {
|
|
41
|
-
it('should return the value', () => {
|
|
42
|
-
const result = command.parseFrom('path/to/file.md');
|
|
43
|
-
expect(result).toBe('path/to/file.md');
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
//# sourceMappingURL=generate-domain.command.spec.js.map
|