@evolith/smart-cli 0.0.3-beta → 1.1.1
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 +81 -17
- package/README.md +930 -158
- package/dist/app.module.js +81 -6
- 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 +14 -0
- package/dist/commands/agents/agents.command.js +61 -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 +210 -51
- package/dist/commands/architecture/scaffold.command.js.map +1 -1
- 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 +82 -49
- package/dist/commands/drift/drift.command.js.map +1 -1
- 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/agents.command.d.ts +6 -4
- package/dist/commands/init/agents.command.js +142 -314
- package/dist/commands/init/agents.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/init/upgrade.command.d.ts +6 -3
- package/dist/commands/init/upgrade.command.js +34 -66
- package/dist/commands/init/upgrade.command.js.map +1 -1
- package/dist/commands/mcp/mcp-serve.command.d.ts +7 -5
- package/dist/commands/mcp/mcp-serve.command.js +84 -37
- package/dist/commands/mcp/mcp-serve.command.js.map +1 -1
- 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/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/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/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/index.d.ts +1 -0
- package/dist/commands/upgrade/index.js +6 -0
- package/dist/commands/upgrade/index.js.map +1 -0
- package/dist/commands/upgrade/upgrade.command.d.ts +14 -0
- package/dist/commands/upgrade/upgrade.command.js +58 -0
- package/dist/commands/upgrade/upgrade.command.js.map +1 -0
- package/dist/commands/validate/validate.command.d.ts +24 -4
- package/dist/commands/validate/validate.command.js +309 -65
- 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/{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/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 +1 -1
- package/dist/infrastructure/cli/command-executor.js +4 -3
- package/dist/infrastructure/cli/command-executor.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 +18 -1
- 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 +53 -26
- 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.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.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.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,43 +1,10 @@
|
|
|
1
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
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
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;
|
|
22
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
7
|
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
10
|
};
|
|
@@ -46,10 +13,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
13
|
};
|
|
47
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
15
|
exports.AgentsCommand = void 0;
|
|
16
|
+
const prompt_service_1 = require("../../infrastructure/prompts/prompt.service");
|
|
49
17
|
const nest_commander_1 = require("nest-commander");
|
|
50
|
-
const p = __importStar(require("@clack/prompts"));
|
|
51
18
|
const chalk_1 = __importDefault(require("chalk"));
|
|
52
|
-
const
|
|
19
|
+
const node_filesystem_provider_1 = require("../../infrastructure/providers/node-filesystem.provider");
|
|
20
|
+
const agent_registry_service_1 = require("../../infrastructure/adapters/agent-registry.service");
|
|
21
|
+
const agent_ruleset_builder_1 = require("@evolith/core-domain/application/agents/agent-ruleset-builder");
|
|
22
|
+
const base_command_1 = require("../../infrastructure/cli/base-command");
|
|
23
|
+
let cachedFileSystem = null;
|
|
24
|
+
function getFileSystem() {
|
|
25
|
+
if (!cachedFileSystem) {
|
|
26
|
+
cachedFileSystem = new node_filesystem_provider_1.NodeFileSystemProvider().createFileSystem();
|
|
27
|
+
}
|
|
28
|
+
return cachedFileSystem;
|
|
29
|
+
}
|
|
53
30
|
const AGENT_TEMPLATES = [
|
|
54
31
|
{
|
|
55
32
|
value: 'standard',
|
|
@@ -79,8 +56,12 @@ const AVAILABLE_RULESETS = [
|
|
|
79
56
|
{ value: 'open-core', label: 'Open-Core Boundary Rules', selected: true },
|
|
80
57
|
{ value: 'inheritance', label: 'Inheritance Rules', selected: true },
|
|
81
58
|
];
|
|
82
|
-
let AgentsCommand = class AgentsCommand extends
|
|
83
|
-
|
|
59
|
+
let AgentsCommand = class AgentsCommand extends base_command_1.BaseEvolithCommand {
|
|
60
|
+
constructor(promptService) {
|
|
61
|
+
super('AgentsCommand', promptService);
|
|
62
|
+
this.registry = new agent_registry_service_1.AgentRegistryService(getFileSystem());
|
|
63
|
+
}
|
|
64
|
+
async executeCommand(passedParam, options) {
|
|
84
65
|
const action = passedParam[0] || 'menu';
|
|
85
66
|
console.clear();
|
|
86
67
|
switch (action) {
|
|
@@ -106,8 +87,8 @@ let AgentsCommand = class AgentsCommand extends nest_commander_1.CommandRunner {
|
|
|
106
87
|
}
|
|
107
88
|
}
|
|
108
89
|
async showMenu() {
|
|
109
|
-
|
|
110
|
-
const selection = await
|
|
90
|
+
this.promptService.showIntro('Evolith SDK - Agent Management');
|
|
91
|
+
const selection = await this.promptService.select({
|
|
111
92
|
message: 'Select an action:',
|
|
112
93
|
options: [
|
|
113
94
|
{ value: 'install', label: 'Install New Agent', hint: 'Create a new agent with template and rulesets' },
|
|
@@ -119,7 +100,7 @@ let AgentsCommand = class AgentsCommand extends nest_commander_1.CommandRunner {
|
|
|
119
100
|
],
|
|
120
101
|
});
|
|
121
102
|
if (selection === 'exit') {
|
|
122
|
-
|
|
103
|
+
this.promptService.showOutro(chalk_1.default.blue('Agent management closed.'));
|
|
123
104
|
return;
|
|
124
105
|
}
|
|
125
106
|
switch (selection) {
|
|
@@ -141,354 +122,200 @@ let AgentsCommand = class AgentsCommand extends nest_commander_1.CommandRunner {
|
|
|
141
122
|
}
|
|
142
123
|
}
|
|
143
124
|
async installAgent(_options) {
|
|
144
|
-
|
|
145
|
-
const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
return 'Use lowercase letters, numbers, and hyphens only';
|
|
156
|
-
},
|
|
157
|
-
}),
|
|
158
|
-
template: () => p.select({
|
|
159
|
-
message: 'Select agent template:',
|
|
160
|
-
options: AGENT_TEMPLATES,
|
|
161
|
-
}),
|
|
162
|
-
description: () => p.text({
|
|
163
|
-
message: 'Agent description (optional):',
|
|
164
|
-
placeholder: 'Agent for handling specific governance tasks',
|
|
165
|
-
}),
|
|
166
|
-
adrs: () => p.multiselect({
|
|
167
|
-
message: 'Select ADR rulesets to include:',
|
|
168
|
-
options: AVAILABLE_ADRS,
|
|
169
|
-
required: false,
|
|
170
|
-
}),
|
|
171
|
-
rulesets: () => p.multiselect({
|
|
172
|
-
message: 'Select additional rulesets:',
|
|
173
|
-
options: AVAILABLE_RULESETS,
|
|
174
|
-
required: false,
|
|
175
|
-
}),
|
|
176
|
-
confirmInstall: () => p.confirm({
|
|
177
|
-
message: 'Ready to install agent?',
|
|
178
|
-
initialValue: true,
|
|
179
|
-
}),
|
|
180
|
-
}, {
|
|
181
|
-
onCancel: () => {
|
|
182
|
-
p.cancel('Installation cancelled.');
|
|
183
|
-
process.exit(0);
|
|
125
|
+
this.promptService.showIntro('Evolith SDK - Agent Installation');
|
|
126
|
+
const name = await this.promptService.text({
|
|
127
|
+
message: 'Agent name (kebab-case, e.g., my-agent):',
|
|
128
|
+
placeholder: 'my-agent',
|
|
129
|
+
validate: (value) => {
|
|
130
|
+
if (!value)
|
|
131
|
+
return 'Agent name is required';
|
|
132
|
+
if (value.includes(' '))
|
|
133
|
+
return 'Name cannot contain spaces';
|
|
134
|
+
if (!/^[a-z0-9-]+$/.test(value))
|
|
135
|
+
return 'Use lowercase letters, numbers, and hyphens only';
|
|
184
136
|
},
|
|
185
137
|
});
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
const fs = (0, tool_utils_1.getFileSystem)();
|
|
191
|
-
const agentDir = `${process.cwd()}/rulesets/agents/${agentInfo.name}`;
|
|
192
|
-
const rulesetPath = `${agentDir}/agent.rules.json`;
|
|
193
|
-
await fs.ensureDir(agentDir);
|
|
194
|
-
const agentRuleset = this.buildAgentRuleset(agentInfo);
|
|
195
|
-
await fs.writeJson(rulesetPath, agentRuleset);
|
|
196
|
-
const configPath = `${agentDir}/agent.config.json`;
|
|
197
|
-
await fs.writeJson(configPath, {
|
|
198
|
-
name: agentInfo.name,
|
|
199
|
-
template: agentInfo.template,
|
|
200
|
-
description: agentInfo.description || '',
|
|
201
|
-
adrs: agentInfo.adrs,
|
|
202
|
-
rulesets: agentInfo.rulesets,
|
|
203
|
-
installedAt: new Date().toISOString(),
|
|
204
|
-
version: '1.0.0',
|
|
138
|
+
const template = await this.promptService.select({
|
|
139
|
+
message: 'Select agent template:',
|
|
140
|
+
options: AGENT_TEMPLATES,
|
|
205
141
|
});
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const nextSteps = `Next steps:
|
|
210
|
-
1. Review agent rules: cat ${rulesetPath}
|
|
211
|
-
2. Validate agent: evolith agents validate
|
|
212
|
-
3. Update documentation if needed`;
|
|
213
|
-
p.note(nextSteps, 'Next Steps');
|
|
214
|
-
p.outro(chalk_1.default.green('Agent installation complete.'));
|
|
215
|
-
}
|
|
216
|
-
buildAgentRuleset(agentInfo) {
|
|
217
|
-
const principles = [];
|
|
218
|
-
principles.push({
|
|
219
|
-
id: 'AGT-01',
|
|
220
|
-
principle: 'Agent Identity',
|
|
221
|
-
statement: `Agent ${agentInfo.name} enforces Evolith governance standards`,
|
|
222
|
-
severity: 'MUST',
|
|
223
|
-
blocking: true,
|
|
142
|
+
const description = await this.promptService.text({
|
|
143
|
+
message: 'Agent description (optional):',
|
|
144
|
+
placeholder: 'Agent for handling specific governance tasks',
|
|
224
145
|
});
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
if (agentInfo.adrs.includes('adr-0002')) {
|
|
242
|
-
principles.push({
|
|
243
|
-
id: 'AGT-HXA-01',
|
|
244
|
-
principle: 'Hexagonal Architecture Compliance',
|
|
245
|
-
statement: 'Domain layer has zero framework dependencies',
|
|
246
|
-
severity: 'MUST',
|
|
247
|
-
blocking: true,
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
if (agentInfo.adrs.includes('adr-0018')) {
|
|
251
|
-
principles.push({
|
|
252
|
-
id: 'AGT-TP-01',
|
|
253
|
-
principle: 'Testing Pyramid',
|
|
254
|
-
statement: '70% unit / 20% integration / 10% E2E distribution',
|
|
255
|
-
severity: 'SHOULD',
|
|
256
|
-
blocking: false,
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
if (agentInfo.rulesets.includes('acl')) {
|
|
260
|
-
principles.push({
|
|
261
|
-
id: 'AGT-ACL-01',
|
|
262
|
-
principle: 'Schema Validation',
|
|
263
|
-
statement: 'All external data validated before ingestion',
|
|
264
|
-
severity: 'MUST',
|
|
265
|
-
blocking: true,
|
|
266
|
-
});
|
|
146
|
+
const adrs = await this.promptService.multiselect({
|
|
147
|
+
message: 'Select ADR rulesets to include:',
|
|
148
|
+
options: AVAILABLE_ADRS,
|
|
149
|
+
required: false,
|
|
150
|
+
});
|
|
151
|
+
const rulesets = await this.promptService.multiselect({
|
|
152
|
+
message: 'Select additional rulesets:',
|
|
153
|
+
options: AVAILABLE_RULESETS,
|
|
154
|
+
required: false,
|
|
155
|
+
});
|
|
156
|
+
const confirmInstall = await this.promptService.confirm('Ready to install agent?', true);
|
|
157
|
+
if (!confirmInstall) {
|
|
158
|
+
this.promptService.showOutro(chalk_1.default.yellow('Installation cancelled.'));
|
|
159
|
+
return;
|
|
267
160
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
rulesets: agentInfo.rulesets,
|
|
284
|
-
},
|
|
161
|
+
const rulesetContent = (0, agent_ruleset_builder_1.buildAgentRuleset)({
|
|
162
|
+
name,
|
|
163
|
+
template,
|
|
164
|
+
adrs,
|
|
165
|
+
rulesets,
|
|
166
|
+
});
|
|
167
|
+
const config = {
|
|
168
|
+
name,
|
|
169
|
+
version: '1.0.0',
|
|
170
|
+
template,
|
|
171
|
+
description,
|
|
172
|
+
adrs,
|
|
173
|
+
rulesets,
|
|
174
|
+
rulesetFiles: ['agent.rules.json'],
|
|
175
|
+
installedAt: new Date().toISOString()
|
|
285
176
|
};
|
|
177
|
+
await this.registry.installAgent(process.cwd(), config, rulesetContent);
|
|
178
|
+
this.promptService.showSuccess(`\n✓ Agent '${name}' installed successfully`);
|
|
179
|
+
this.promptService.showInfo(`Next steps:\n 1. Review agent rules\n 2. Validate agent: evolith agents validate`);
|
|
180
|
+
this.promptService.showOutro(chalk_1.default.green('Agent installation complete.'));
|
|
286
181
|
}
|
|
287
182
|
async listAgents(_options) {
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
p.log.info('Run "evolith agents install" to install your first agent.');
|
|
294
|
-
return;
|
|
295
|
-
}
|
|
296
|
-
const entries = await fs.readdirNames(agentsDir);
|
|
297
|
-
if (entries.length === 0) {
|
|
298
|
-
p.log.warn('No agents installed.');
|
|
299
|
-
p.log.info('Run "evolith agents install" to install your first agent.');
|
|
183
|
+
this.promptService.showIntro('Evolith SDK - Agent List');
|
|
184
|
+
const agents = await this.registry.discover(process.cwd());
|
|
185
|
+
if (agents.length === 0) {
|
|
186
|
+
this.promptService.showWarning('No agents installed.');
|
|
187
|
+
this.promptService.showInfo('Run "evolith agents install" to install your first agent.');
|
|
300
188
|
return;
|
|
301
189
|
}
|
|
302
|
-
|
|
303
|
-
for (const
|
|
304
|
-
const
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
let ruleset = {};
|
|
308
|
-
if (await fs.exists(configPath)) {
|
|
309
|
-
config = await fs.readJson(configPath);
|
|
310
|
-
}
|
|
311
|
-
if (await fs.exists(rulesetPath)) {
|
|
312
|
-
ruleset = await fs.readJson(rulesetPath);
|
|
313
|
-
}
|
|
314
|
-
const version = config.version || 'unknown';
|
|
315
|
-
const template = config.template || 'standard';
|
|
316
|
-
const principles = ruleset.principles || [];
|
|
317
|
-
p.log.info(chalk_1.default.cyan(` • ${agentName}`));
|
|
318
|
-
p.log.info(chalk_1.default.gray(` Version: ${version} | Template: ${template} | Rules: ${principles.length}`));
|
|
190
|
+
this.promptService.showInfo(`Found ${agents.length} installed agent(s):\n`);
|
|
191
|
+
for (const agent of agents) {
|
|
192
|
+
const _principlesCount = 0;
|
|
193
|
+
this.promptService.showInfo(chalk_1.default.cyan(` • ${agent.name}`));
|
|
194
|
+
this.promptService.showInfo(chalk_1.default.gray(` Version: ${agent.version} | Template: ${agent.template}`));
|
|
319
195
|
}
|
|
320
|
-
|
|
196
|
+
this.promptService.showOutro(chalk_1.default.green(`\n${agents.length} agent(s) found.`));
|
|
321
197
|
}
|
|
322
198
|
async validateAgent(_options) {
|
|
323
|
-
|
|
324
|
-
const
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
p.log.error('No agents directory found.');
|
|
199
|
+
this.promptService.showIntro('Evolith SDK - Agent Validation');
|
|
200
|
+
const agents = await this.registry.discover(process.cwd());
|
|
201
|
+
if (agents.length === 0) {
|
|
202
|
+
this.promptService.showWarning('No agents installed to validate.');
|
|
328
203
|
return;
|
|
329
204
|
}
|
|
330
|
-
const
|
|
331
|
-
if (entries.length === 0) {
|
|
332
|
-
p.log.warn('No agents installed to validate.');
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
const agentToValidate = await p.select({
|
|
205
|
+
const agentToValidate = await this.promptService.select({
|
|
336
206
|
message: 'Select agent to validate:',
|
|
337
|
-
options:
|
|
207
|
+
options: agents.map(a => ({ value: a.name, label: a.name })),
|
|
338
208
|
});
|
|
339
|
-
|
|
209
|
+
this.promptService.showInfo('\nValidating agent ruleset against engine...\n');
|
|
210
|
+
const fs = getFileSystem();
|
|
211
|
+
const rulesetPath = `${process.cwd()}/rulesets/agents/${String(agentToValidate)}/agent.rules.json`;
|
|
340
212
|
if (!await fs.exists(rulesetPath)) {
|
|
341
|
-
|
|
213
|
+
this.promptService.showError(`Ruleset file not found: ${rulesetPath}`);
|
|
342
214
|
return;
|
|
343
215
|
}
|
|
344
216
|
const ruleset = await fs.readJson(rulesetPath);
|
|
345
|
-
p.log.info('\nValidating agent ruleset...\n');
|
|
346
217
|
const issues = [];
|
|
347
|
-
if (!ruleset.agent?.name)
|
|
218
|
+
if (!ruleset.agent?.name)
|
|
348
219
|
issues.push({ field: 'agent.name', message: 'Agent name is required' });
|
|
349
|
-
|
|
350
|
-
if (!ruleset.ruleset?.version) {
|
|
220
|
+
if (!ruleset.ruleset?.version)
|
|
351
221
|
issues.push({ field: 'ruleset.version', message: 'Ruleset version is required' });
|
|
352
|
-
|
|
353
|
-
if (!ruleset.principles || ruleset.principles.length === 0) {
|
|
222
|
+
if (!ruleset.principles || ruleset.principles.length === 0)
|
|
354
223
|
issues.push({ field: 'principles', message: 'At least one principle is required' });
|
|
355
|
-
}
|
|
356
224
|
for (const principle of ruleset.principles || []) {
|
|
357
|
-
if (!principle.id)
|
|
225
|
+
if (!principle.id)
|
|
358
226
|
issues.push({ field: `principle.missing-id`, message: `Principle "${principle.principle}" missing ID` });
|
|
359
|
-
|
|
360
|
-
if (!principle.severity) {
|
|
227
|
+
if (!principle.severity)
|
|
361
228
|
issues.push({ field: `principle.missing-severity`, message: `Principle "${principle.id}" missing severity` });
|
|
362
|
-
}
|
|
363
229
|
}
|
|
364
230
|
if (issues.length === 0) {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
p.log.info(`Rules: ${ruleset.principles?.length} principles`);
|
|
368
|
-
p.log.info(`MUST rules: ${ruleset.principles?.filter(p => p.severity === 'MUST').length}`);
|
|
369
|
-
p.log.info(`SHOULD rules: ${ruleset.principles?.filter(p => p.severity === 'SHOULD').length}`);
|
|
231
|
+
await this.registry.updateLastValidated(process.cwd(), String(agentToValidate));
|
|
232
|
+
this.promptService.showSuccess('\n✓ Agent validation passed');
|
|
370
233
|
}
|
|
371
234
|
else {
|
|
372
|
-
|
|
235
|
+
this.promptService.showError(`\n✗ Agent validation failed: ${issues.length} issue(s) found`);
|
|
373
236
|
for (const issue of issues) {
|
|
374
|
-
|
|
237
|
+
this.promptService.showError(` - [${issue.field}] ${issue.message}`);
|
|
375
238
|
}
|
|
376
239
|
}
|
|
377
|
-
|
|
240
|
+
this.promptService.showOutro(issues.length === 0 ? chalk_1.default.green('Validation complete.') : chalk_1.default.red('Validation complete with errors.'));
|
|
378
241
|
}
|
|
379
242
|
async removeAgent(_options) {
|
|
380
|
-
|
|
381
|
-
const
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
p.log.error('No agents directory found.');
|
|
385
|
-
return;
|
|
386
|
-
}
|
|
387
|
-
const entries = await fs.readdirNames(agentsDir);
|
|
388
|
-
if (entries.length === 0) {
|
|
389
|
-
p.log.warn('No agents installed to remove.');
|
|
243
|
+
this.promptService.showIntro('Evolith SDK - Agent Removal');
|
|
244
|
+
const agents = await this.registry.discover(process.cwd());
|
|
245
|
+
if (agents.length === 0) {
|
|
246
|
+
this.promptService.showWarning('No agents installed to remove.');
|
|
390
247
|
return;
|
|
391
248
|
}
|
|
392
|
-
const agentToRemove = await
|
|
249
|
+
const agentToRemove = await this.promptService.select({
|
|
393
250
|
message: 'Select agent to remove:',
|
|
394
|
-
options:
|
|
395
|
-
});
|
|
396
|
-
const confirm = await p.confirm({
|
|
397
|
-
message: `Are you sure you want to remove agent '${String(agentToRemove)}'? This cannot be undone.`,
|
|
398
|
-
initialValue: false,
|
|
251
|
+
options: agents.map(a => ({ value: a.name, label: a.name })),
|
|
399
252
|
});
|
|
253
|
+
const confirm = await this.promptService.confirm(`Are you sure you want to remove agent '${String(agentToRemove)}'? This cannot be undone.`, false);
|
|
400
254
|
if (!confirm) {
|
|
401
|
-
|
|
255
|
+
this.promptService.showOutro(chalk_1.default.yellow('Removal cancelled.'));
|
|
402
256
|
return;
|
|
403
257
|
}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
p.outro(chalk_1.default.green('Agent removal complete.'));
|
|
258
|
+
await this.registry.unregister(process.cwd(), String(agentToRemove));
|
|
259
|
+
this.promptService.showSuccess(`\n✓ Agent '${String(agentToRemove)}' removed successfully`);
|
|
260
|
+
this.promptService.showOutro(chalk_1.default.green('Agent removal complete.'));
|
|
408
261
|
}
|
|
409
262
|
async upgradeAgent(_options) {
|
|
410
|
-
|
|
411
|
-
const
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
p.log.error('No agents directory found.');
|
|
415
|
-
return;
|
|
416
|
-
}
|
|
417
|
-
const entries = await fs.readdirNames(agentsDir);
|
|
418
|
-
if (entries.length === 0) {
|
|
419
|
-
p.log.warn('No agents installed to upgrade.');
|
|
263
|
+
this.promptService.showIntro('Evolith SDK - Agent Upgrade');
|
|
264
|
+
const agents = await this.registry.discover(process.cwd());
|
|
265
|
+
if (agents.length === 0) {
|
|
266
|
+
this.promptService.showWarning('No agents installed to upgrade.');
|
|
420
267
|
return;
|
|
421
268
|
}
|
|
422
|
-
const
|
|
269
|
+
const agentName = await this.promptService.select({
|
|
423
270
|
message: 'Select agent to upgrade:',
|
|
424
|
-
options:
|
|
271
|
+
options: agents.map(a => ({ value: a.name, label: a.name })),
|
|
425
272
|
});
|
|
426
|
-
const
|
|
427
|
-
|
|
273
|
+
const agent = await this.registry.getAgent(process.cwd(), String(agentName));
|
|
274
|
+
if (!agent)
|
|
275
|
+
return;
|
|
276
|
+
const fs = getFileSystem();
|
|
277
|
+
const rulesetPath = `${process.cwd()}/rulesets/agents/${agent.name}/agent.rules.json`;
|
|
428
278
|
if (!await fs.exists(rulesetPath)) {
|
|
429
|
-
|
|
279
|
+
this.promptService.showError('Agent ruleset not found');
|
|
430
280
|
return;
|
|
431
281
|
}
|
|
432
282
|
const ruleset = await fs.readJson(rulesetPath);
|
|
433
|
-
const
|
|
434
|
-
const currentVersion = ruleset.agent?.version || '1.0.0';
|
|
435
|
-
const parts = currentVersion.split('.').map(Number);
|
|
283
|
+
const parts = agent.version.split('.').map(Number);
|
|
436
284
|
parts[2]++;
|
|
437
285
|
const newVersion = parts.join('.');
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
p.outro(chalk_1.default.green('Agent upgrade complete.'));
|
|
445
|
-
}
|
|
446
|
-
parseInstall(val) {
|
|
447
|
-
return val;
|
|
448
|
-
}
|
|
449
|
-
parseRemove(val) {
|
|
450
|
-
return val;
|
|
451
|
-
}
|
|
452
|
-
parseList() {
|
|
453
|
-
return true;
|
|
454
|
-
}
|
|
455
|
-
parseDryRun() {
|
|
456
|
-
return true;
|
|
286
|
+
agent.version = newVersion;
|
|
287
|
+
if (ruleset.agent)
|
|
288
|
+
ruleset.agent.version = newVersion;
|
|
289
|
+
await this.registry.updateAgent(process.cwd(), agent.name, agent, ruleset);
|
|
290
|
+
this.promptService.showSuccess(`\n✓ Agent '${agent.name}' upgraded: ${parts.join('.')} → ${newVersion}`);
|
|
291
|
+
this.promptService.showOutro(chalk_1.default.green('Agent upgrade complete.'));
|
|
457
292
|
}
|
|
293
|
+
parseInstall(val) { return val; }
|
|
294
|
+
parseRemove(val) { return val; }
|
|
295
|
+
parseList() { return true; }
|
|
296
|
+
parseDryRun() { return true; }
|
|
458
297
|
};
|
|
459
298
|
exports.AgentsCommand = AgentsCommand;
|
|
460
299
|
__decorate([
|
|
461
|
-
(0, nest_commander_1.Option)({
|
|
462
|
-
flags: '-i, --install [name]',
|
|
463
|
-
description: 'Install a new agent with specified name',
|
|
464
|
-
}),
|
|
300
|
+
(0, nest_commander_1.Option)({ flags: '-i, --install [name]', description: 'Install a new agent' }),
|
|
465
301
|
__metadata("design:type", Function),
|
|
466
302
|
__metadata("design:paramtypes", [String]),
|
|
467
303
|
__metadata("design:returntype", String)
|
|
468
304
|
], AgentsCommand.prototype, "parseInstall", null);
|
|
469
305
|
__decorate([
|
|
470
|
-
(0, nest_commander_1.Option)({
|
|
471
|
-
flags: '-r, --remove [name]',
|
|
472
|
-
description: 'Remove an agent by name',
|
|
473
|
-
}),
|
|
306
|
+
(0, nest_commander_1.Option)({ flags: '-r, --remove [name]', description: 'Remove an agent' }),
|
|
474
307
|
__metadata("design:type", Function),
|
|
475
308
|
__metadata("design:paramtypes", [String]),
|
|
476
309
|
__metadata("design:returntype", String)
|
|
477
310
|
], AgentsCommand.prototype, "parseRemove", null);
|
|
478
311
|
__decorate([
|
|
479
|
-
(0, nest_commander_1.Option)({
|
|
480
|
-
flags: '-l, --list',
|
|
481
|
-
description: 'List installed agents',
|
|
482
|
-
}),
|
|
312
|
+
(0, nest_commander_1.Option)({ flags: '-l, --list', description: 'List installed agents' }),
|
|
483
313
|
__metadata("design:type", Function),
|
|
484
314
|
__metadata("design:paramtypes", []),
|
|
485
315
|
__metadata("design:returntype", Boolean)
|
|
486
316
|
], AgentsCommand.prototype, "parseList", null);
|
|
487
317
|
__decorate([
|
|
488
|
-
(0, nest_commander_1.Option)({
|
|
489
|
-
flags: '-d, --dry-run',
|
|
490
|
-
description: 'Execute in simulation mode without altering files',
|
|
491
|
-
}),
|
|
318
|
+
(0, nest_commander_1.Option)({ flags: '-d, --dry-run', description: 'Dry run' }),
|
|
492
319
|
__metadata("design:type", Function),
|
|
493
320
|
__metadata("design:paramtypes", []),
|
|
494
321
|
__metadata("design:returntype", Boolean)
|
|
@@ -497,6 +324,7 @@ exports.AgentsCommand = AgentsCommand = __decorate([
|
|
|
497
324
|
(0, nest_commander_1.Command)({
|
|
498
325
|
name: 'agents',
|
|
499
326
|
description: 'Instala, lista, valida o remueve agentes de Evolith en el repositorio satélite',
|
|
500
|
-
})
|
|
327
|
+
}),
|
|
328
|
+
__metadata("design:paramtypes", [prompt_service_1.PromptService])
|
|
501
329
|
], AgentsCommand);
|
|
502
330
|
//# sourceMappingURL=agents.command.js.map
|