@evolith/smart-cli 1.1.2 → 1.1.4
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/dist/.tsbuildinfo +1 -0
- package/dist/app.module.d.ts +2 -0
- package/dist/app.module.js +134 -0
- package/dist/app.module.js.map +1 -0
- package/dist/commands/adr/adr.command.d.ts +34 -0
- package/dist/commands/adr/adr.command.js +351 -0
- package/dist/commands/adr/adr.command.js.map +1 -0
- 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 +16 -0
- package/dist/commands/architecture/scaffold.command.js +328 -0
- package/dist/commands/architecture/scaffold.command.js.map +1 -0
- package/dist/commands/completion/completion.command.d.ts +28 -0
- package/dist/commands/completion/completion.command.js +321 -0
- package/dist/commands/completion/completion.command.js.map +1 -0
- package/dist/commands/docs/docs.command.d.ts +17 -0
- package/dist/commands/docs/docs.command.js +292 -0
- package/dist/commands/docs/docs.command.js.map +1 -0
- package/dist/commands/drift/drift.command.d.ts +28 -0
- package/dist/commands/drift/drift.command.js +292 -0
- package/dist/commands/drift/drift.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 +29 -0
- package/dist/commands/history/history.command.js +237 -0
- package/dist/commands/history/history.command.js.map +1 -0
- package/dist/commands/init/agents.command.d.ts +24 -0
- package/dist/commands/init/agents.command.js +330 -0
- package/dist/commands/init/agents.command.js.map +1 -0
- package/dist/commands/init/init.command.d.ts +26 -0
- package/dist/commands/init/init.command.js +170 -0
- package/dist/commands/init/init.command.js.map +1 -0
- 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 +22 -0
- package/dist/commands/init/upgrade.command.js +178 -0
- package/dist/commands/init/upgrade.command.js.map +1 -0
- package/dist/commands/mcp/mcp-serve.command.d.ts +17 -0
- package/dist/commands/mcp/mcp-serve.command.js +153 -0
- package/dist/commands/mcp/mcp-serve.command.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/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 +10 -0
- package/dist/commands/sdlc/gate-status.command.js +162 -0
- package/dist/commands/sdlc/gate-status.command.js.map +1 -0
- package/dist/commands/sdlc/generate-domain.command.d.ts +8 -0
- package/dist/commands/sdlc/generate-domain.command.js +165 -0
- package/dist/commands/sdlc/generate-domain.command.js.map +1 -0
- package/dist/commands/sdlc/handoff.command.d.ts +27 -0
- package/dist/commands/sdlc/handoff.command.js +275 -0
- package/dist/commands/sdlc/handoff.command.js.map +1 -0
- package/dist/commands/sdlc/sdlc.command.d.ts +5 -0
- package/dist/commands/sdlc/sdlc.command.js +44 -0
- package/dist/commands/sdlc/sdlc.command.js.map +1 -0
- package/dist/commands/standards/standards.command.d.ts +30 -0
- package/dist/commands/standards/standards.command.js +283 -0
- package/dist/commands/standards/standards.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/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 +43 -0
- package/dist/commands/validate/validate.command.js +528 -0
- package/dist/commands/validate/validate.command.js.map +1 -0
- package/dist/config/alias.service.d.ts +14 -0
- package/dist/config/alias.service.js +103 -0
- 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/infrastructure/adapters/agent-registry.service.d.ts +30 -0
- package/dist/infrastructure/adapters/agent-registry.service.js +175 -0
- package/dist/infrastructure/adapters/agent-registry.service.js.map +1 -0
- package/dist/infrastructure/architecture/nx-workspace.strategy.d.ts +19 -0
- 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 +17 -0
- package/dist/infrastructure/architecture/topology-catalog.js +69 -0
- package/dist/infrastructure/architecture/topology-catalog.js.map +1 -0
- package/dist/infrastructure/catalog/catalog-loader.d.ts +21 -0
- package/dist/infrastructure/catalog/catalog-loader.js +144 -0
- package/dist/infrastructure/catalog/catalog-loader.js.map +1 -0
- 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 +20 -0
- package/dist/infrastructure/cli/command-executor.js +110 -0
- package/dist/infrastructure/cli/command-executor.js.map +1 -0
- package/dist/infrastructure/cli/providers/index.d.ts +52 -0
- package/dist/infrastructure/cli/providers/index.js +175 -0
- package/dist/infrastructure/cli/providers/index.js.map +1 -0
- 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/infrastructure/filesystem/file-manager.service.js +79 -0
- package/dist/infrastructure/filesystem/file-manager.service.js.map +1 -0
- package/dist/infrastructure/formatters/output-formatter.service.d.ts +28 -0
- package/dist/infrastructure/formatters/output-formatter.service.js +199 -0
- package/dist/infrastructure/formatters/output-formatter.service.js.map +1 -0
- package/dist/infrastructure/observability/command-watcher.d.ts +45 -0
- package/dist/infrastructure/observability/command-watcher.js +199 -0
- package/dist/infrastructure/observability/command-watcher.js.map +1 -0
- package/dist/infrastructure/observability/error-reporter.d.ts +47 -0
- package/dist/infrastructure/observability/error-reporter.js +163 -0
- package/dist/infrastructure/observability/error-reporter.js.map +1 -0
- package/dist/infrastructure/observability/index.d.ts +11 -0
- package/dist/infrastructure/observability/index.js +31 -0
- 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.d.ts +53 -0
- package/dist/infrastructure/observability/structured-logger.js +123 -0
- package/dist/infrastructure/observability/structured-logger.js.map +1 -0
- package/dist/infrastructure/observability/timing.d.ts +23 -0
- package/dist/infrastructure/observability/timing.js +140 -0
- package/dist/infrastructure/observability/timing.js.map +1 -0
- package/dist/infrastructure/observability/tool-usage-telemetry.service.d.ts +46 -0
- package/dist/infrastructure/observability/tool-usage-telemetry.service.js +181 -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/infrastructure/providers/config-parser.provider.d.ts +15 -0
- package/dist/infrastructure/providers/config-parser.provider.js +68 -0
- package/dist/infrastructure/providers/config-parser.provider.js.map +1 -0
- package/dist/infrastructure/providers/logger.provider.d.ts +10 -0
- package/dist/infrastructure/providers/logger.provider.js +84 -0
- package/dist/infrastructure/providers/logger.provider.js.map +1 -0
- package/dist/infrastructure/providers/mock-filesystem.provider.d.ts +34 -0
- package/dist/infrastructure/providers/mock-filesystem.provider.js +129 -0
- package/dist/infrastructure/providers/mock-filesystem.provider.js.map +1 -0
- package/dist/infrastructure/providers/node-filesystem.provider.d.ts +23 -0
- package/dist/infrastructure/providers/node-filesystem.provider.js +117 -0
- package/dist/infrastructure/providers/node-filesystem.provider.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +27 -0
- package/dist/main.js.map +1 -0
- 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 +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AliasService } from '../../config/alias.service';
|
|
2
|
+
import { BaseEvolithCommand } from '../../infrastructure/cli/base-command';
|
|
3
|
+
interface AliasCommandOptions {
|
|
4
|
+
add?: string;
|
|
5
|
+
remove?: string;
|
|
6
|
+
list?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class AliasCommand extends BaseEvolithCommand {
|
|
9
|
+
private readonly aliasService;
|
|
10
|
+
constructor(aliasService: AliasService);
|
|
11
|
+
executeCommand(_: string[], options?: AliasCommandOptions): Promise<void>;
|
|
12
|
+
parseAdd(val: string): string;
|
|
13
|
+
parseRemove(val: string): string;
|
|
14
|
+
parseList(): boolean;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AliasCommand = void 0;
|
|
13
|
+
const nest_commander_1 = require("nest-commander");
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const alias_service_1 = require("../../config/alias.service");
|
|
16
|
+
const base_command_1 = require("../../infrastructure/cli/base-command");
|
|
17
|
+
let AliasCommand = class AliasCommand extends base_command_1.BaseEvolithCommand {
|
|
18
|
+
constructor(aliasService) {
|
|
19
|
+
super('AliasCommand');
|
|
20
|
+
this.aliasService = aliasService;
|
|
21
|
+
}
|
|
22
|
+
async executeCommand(_, options) {
|
|
23
|
+
if (options?.add) {
|
|
24
|
+
const [alias, cmd] = options.add.split('=');
|
|
25
|
+
if (!alias || !cmd) {
|
|
26
|
+
this.promptService.showError('Usage: evolith alias --add <alias>=<command>');
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
this.aliasService.add(alias.trim(), cmd.trim());
|
|
31
|
+
this.promptService.showSuccess(`Alias \"${alias}\" → \"${cmd}\" added.`);
|
|
32
|
+
}
|
|
33
|
+
catch (e) {
|
|
34
|
+
this.promptService.showError(e instanceof Error ? e.message : String(e));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else if (options?.remove) {
|
|
38
|
+
try {
|
|
39
|
+
this.aliasService.remove(options.remove);
|
|
40
|
+
this.promptService.showSuccess(`Alias \"${options.remove}\" removed.`);
|
|
41
|
+
}
|
|
42
|
+
catch (e) {
|
|
43
|
+
this.promptService.showError(e instanceof Error ? e.message : String(e));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else if (options?.list) {
|
|
47
|
+
const all = this.aliasService.getAll();
|
|
48
|
+
if (Object.keys(all).length === 0) {
|
|
49
|
+
this.promptService.showInfo('No aliases defined.');
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.promptService.showInfo('Defined aliases:');
|
|
53
|
+
for (const [a, c] of Object.entries(all)) {
|
|
54
|
+
this.promptService.showInfo(` \"${a}\" → \"${c}\"`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this.promptService.showInfo('Use --add, --remove, or --list.');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
parseAdd(val) {
|
|
62
|
+
return val;
|
|
63
|
+
}
|
|
64
|
+
parseRemove(val) {
|
|
65
|
+
return val;
|
|
66
|
+
}
|
|
67
|
+
parseList() {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
exports.AliasCommand = AliasCommand;
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, nest_commander_1.Option)({ flags: '--add <alias=command>', description: 'Add a new alias (format: alias=command)' }),
|
|
74
|
+
__metadata("design:type", Function),
|
|
75
|
+
__metadata("design:paramtypes", [String]),
|
|
76
|
+
__metadata("design:returntype", String)
|
|
77
|
+
], AliasCommand.prototype, "parseAdd", null);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, nest_commander_1.Option)({ flags: '--remove <alias>', description: 'Remove an existing alias' }),
|
|
80
|
+
__metadata("design:type", Function),
|
|
81
|
+
__metadata("design:paramtypes", [String]),
|
|
82
|
+
__metadata("design:returntype", String)
|
|
83
|
+
], AliasCommand.prototype, "parseRemove", null);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, nest_commander_1.Option)({ flags: '--list', description: 'List all aliases' }),
|
|
86
|
+
__metadata("design:type", Function),
|
|
87
|
+
__metadata("design:paramtypes", []),
|
|
88
|
+
__metadata("design:returntype", Boolean)
|
|
89
|
+
], AliasCommand.prototype, "parseList", null);
|
|
90
|
+
exports.AliasCommand = AliasCommand = __decorate([
|
|
91
|
+
(0, nest_commander_1.Command)({ name: 'alias', description: 'Manage CLI command aliases' }),
|
|
92
|
+
(0, common_1.Injectable)(),
|
|
93
|
+
__metadata("design:paramtypes", [alias_service_1.AliasService])
|
|
94
|
+
], AliasCommand);
|
|
95
|
+
//# sourceMappingURL=alias.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alias.command.js","sourceRoot":"","sources":["../../../src/commands/alias/alias.command.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mDAAiD;AACjD,2CAA4C;AAC5C,8DAA0D;AAC1D,wEAA2E;AAUpE,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,iCAAkB;IAClD,YAA6B,YAA0B;QACrD,KAAK,CAAC,cAAc,CAAC,CAAC;QADK,iBAAY,GAAZ,YAAY,CAAc;IAEvD,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,CAAW,EAAE,OAA6B;QAC7D,IAAI,OAAO,EAAE,GAAG,EAAE,CAAC;YACjB,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5C,IAAI,CAAC,KAAK,IAAI,CAAC,GAAG,EAAE,CAAC;gBACnB,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,8CAA8C,CAAC,CAAC;gBAC7E,OAAO;YACT,CAAC;YACD,IAAI,CAAC;gBACH,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,GAAG,CAAC,IAAI,E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,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAGD,QAAQ,CAAC,GAAW;QAClB,OAAO,GAAG,CAAC;IACb,CAAC;IAGD,WAAW,CAAC,GAAW;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;IAGD,SAAS;QACP,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AAtDY,oCAAY;AAyCvB;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;;;;4CAGlG;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;;;;+CAG9E;AAGD;IADC,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;;;;6CAG5D;uBArDU,YAAY;IAFxB,IAAA,wBAAO,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IACrE,IAAA,mBAAU,GAAE;qCAEgC,4BAAY;GAD5C,YAAY,CAsDxB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface ApiCategory {
|
|
2
|
+
name: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ApiEntry {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ApiResource {
|
|
11
|
+
uri: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ToolSchema {
|
|
16
|
+
description: string;
|
|
17
|
+
inputSchema: object;
|
|
18
|
+
outputSchema: object;
|
|
19
|
+
}
|
|
20
|
+
export interface ResourceSchema {
|
|
21
|
+
description: string;
|
|
22
|
+
mimeType: string;
|
|
23
|
+
}
|
|
24
|
+
export interface CommandSchema {
|
|
25
|
+
description: string;
|
|
26
|
+
options: Array<{
|
|
27
|
+
flags: string;
|
|
28
|
+
description: string;
|
|
29
|
+
}>;
|
|
30
|
+
}
|
|
31
|
+
export declare const CATEGORIES: ApiCategory[];
|
|
32
|
+
export declare const TOOLS: ApiEntry[];
|
|
33
|
+
export declare const RESOURCES: ApiResource[];
|
|
34
|
+
export declare const SCHEMAS: ApiEntry[];
|
|
35
|
+
export declare const COMMANDS: ApiEntry[];
|
|
36
|
+
export declare const TOOL_SCHEMAS: Record<string, ToolSchema>;
|
|
37
|
+
export declare const RESOURCE_SCHEMAS: Record<string, ResourceSchema>;
|
|
38
|
+
export declare const COMMAND_SCHEMAS: Record<string, CommandSchema>;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMAND_SCHEMAS = exports.RESOURCE_SCHEMAS = exports.TOOL_SCHEMAS = exports.COMMANDS = exports.SCHEMAS = exports.RESOURCES = exports.TOOLS = exports.CATEGORIES = void 0;
|
|
4
|
+
exports.CATEGORIES = [
|
|
5
|
+
{ name: 'tools', label: 'MCP Tools', description: '23 available operations' },
|
|
6
|
+
{ name: 'resources', label: 'MCP Resources', description: '8 available resources' },
|
|
7
|
+
{ name: 'schemas', label: 'Phase-Gate Schemas', description: '18 validation schemas' },
|
|
8
|
+
{ name: 'commands', label: 'CLI Commands', description: '21 native commands' },
|
|
9
|
+
];
|
|
10
|
+
exports.TOOLS = [
|
|
11
|
+
{ name: 'agent-create', description: 'Create a new agent configuration' },
|
|
12
|
+
{ name: 'agent-list', description: 'List all configured agents' },
|
|
13
|
+
{ name: 'agent-validate', description: 'Validate agent configuration' },
|
|
14
|
+
{ name: 'architecture-drift', description: 'Detect architecture pattern drift' },
|
|
15
|
+
{ name: 'architecture-scaffold', description: 'Scaffold architecture patterns' },
|
|
16
|
+
{ name: 'gate-evaluate', description: 'Evaluate phase gate compliance' },
|
|
17
|
+
{ name: 'gate-status', description: 'Get current gate status for project' },
|
|
18
|
+
{ name: 'moscow-analyze', description: 'Run MoSCoW prioritization analysis' },
|
|
19
|
+
{ name: 'moscow-export', description: 'Export MoSCoW analysis results' },
|
|
20
|
+
{ name: 'sdlc-phase', description: 'Get current SDLC phase' },
|
|
21
|
+
{ name: 'sdlc-advance', description: 'Advance to next SDLC phase' },
|
|
22
|
+
{ name: 'validate-artifacts', description: 'Validate project artifacts' },
|
|
23
|
+
{ name: 'validate-structure', description: 'Validate project structure' },
|
|
24
|
+
{ name: 'phase-advance-propose', description: 'Propose phase advancement' },
|
|
25
|
+
{ name: 'phase-advance-execute', description: 'Execute phase advancement' },
|
|
26
|
+
];
|
|
27
|
+
exports.RESOURCES = [
|
|
28
|
+
{ uri: 'evolith://rulesets', name: 'Rulesets', description: 'List of all available rulesets' },
|
|
29
|
+
{ uri: 'evolith://phase-gates', name: 'Phase Gates', description: 'Phase gate definitions' },
|
|
30
|
+
{ uri: 'evolith://agents', name: 'Agents', description: 'List of installed Evolith agents' },
|
|
31
|
+
{ uri: 'evolith://core/info', name: 'Core Info', description: 'General Evolith Core information' },
|
|
32
|
+
{ uri: 'evolith://governance/version', name: 'Governance Version', description: 'Current governance schema version' },
|
|
33
|
+
{ uri: 'evolith://core/version', name: 'Core Version', description: 'Current Core schema version' },
|
|
34
|
+
{ uri: 'evolith://repository/config', name: 'Repository Config', description: 'Repository evolith.yaml content' },
|
|
35
|
+
{ uri: 'evolith://moscow/phase-0', name: 'MoSCoW Phase 0', description: 'MoSCoW prioritization matrix' },
|
|
36
|
+
];
|
|
37
|
+
exports.SCHEMAS = [
|
|
38
|
+
{ name: 'gate-evidence', description: 'Schema for gate evaluation evidence' },
|
|
39
|
+
{ name: 'phase-transition', description: 'Schema for phase transition requests' },
|
|
40
|
+
{ name: 'adr-record', description: 'Schema for Architecture Decision Records' },
|
|
41
|
+
{ name: 'ruleset-schema', description: 'Base schema for ruleset definitions' },
|
|
42
|
+
{ name: 'acl-schema', description: 'Anti-Corruption Layer validation schema' },
|
|
43
|
+
{ name: 'build-vs-compose', description: 'Build vs Compose evidence validation' },
|
|
44
|
+
{ name: 'moscow-matrix', description: 'MoSCoW prioritization matrix schema' },
|
|
45
|
+
{ name: 'agent-config', description: 'Agent configuration schema' },
|
|
46
|
+
];
|
|
47
|
+
exports.COMMANDS = [
|
|
48
|
+
{ name: 'init', description: 'Initialize new Evolith project' },
|
|
49
|
+
{ name: 'validate', description: 'Validate project against governance' },
|
|
50
|
+
{ name: 'gate', description: 'Phase gate evaluation and status' },
|
|
51
|
+
{ name: 'sdlc', description: 'SDLC phase management' },
|
|
52
|
+
{ name: 'adr', description: 'ADR registry and management' },
|
|
53
|
+
{ name: 'docs', description: 'Documentation scaffolding' },
|
|
54
|
+
{ name: 'scaffold', description: 'Architecture pattern scaffolding' },
|
|
55
|
+
{ name: 'drift', description: 'Architecture drift detection' },
|
|
56
|
+
{ name: 'completion', description: 'Shell completion and hooks' },
|
|
57
|
+
{ name: 'fixtures', description: 'Generate test fixtures' },
|
|
58
|
+
{ name: 'history', description: 'Project history and DORA metrics' },
|
|
59
|
+
{ name: 'profile', description: 'CLI configuration profiles' },
|
|
60
|
+
{ name: 'upgrade', description: 'Upgrade Evolith project' },
|
|
61
|
+
{ name: 'api', description: 'Browse API surface (this command)' },
|
|
62
|
+
];
|
|
63
|
+
exports.TOOL_SCHEMAS = {
|
|
64
|
+
'gate-evaluate': {
|
|
65
|
+
description: 'Evaluate phase gate compliance for a project',
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
properties: {
|
|
69
|
+
projectPath: { type: 'string', description: 'Path to project root' },
|
|
70
|
+
phase: { type: 'string', enum: ['phase-0', 'phase-1', 'phase-2', 'phase-3', 'phase-4', 'phase-5'] },
|
|
71
|
+
strict: { type: 'boolean', description: 'Fail on warnings vs errors', default: false },
|
|
72
|
+
},
|
|
73
|
+
required: ['projectPath', 'phase'],
|
|
74
|
+
},
|
|
75
|
+
outputSchema: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
properties: {
|
|
78
|
+
passed: { type: 'boolean' },
|
|
79
|
+
gateId: { type: 'string' },
|
|
80
|
+
phase: { type: 'string' },
|
|
81
|
+
evidenceResults: { type: 'array' },
|
|
82
|
+
blockingChecks: { type: 'array' },
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
'validate-artifacts': {
|
|
87
|
+
description: 'Validate that required project artifacts exist',
|
|
88
|
+
inputSchema: {
|
|
89
|
+
type: 'object',
|
|
90
|
+
properties: {
|
|
91
|
+
projectPath: { type: 'string' },
|
|
92
|
+
artifactPattern: { type: 'string', description: 'Glob pattern for artifacts' },
|
|
93
|
+
},
|
|
94
|
+
required: ['projectPath'],
|
|
95
|
+
},
|
|
96
|
+
outputSchema: {
|
|
97
|
+
type: 'object',
|
|
98
|
+
properties: {
|
|
99
|
+
valid: { type: 'boolean' },
|
|
100
|
+
missing: { type: 'array', items: { type: 'string' } },
|
|
101
|
+
found: { type: 'array', items: { type: 'string' } },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
'agent-create': {
|
|
106
|
+
description: 'Create a new agent configuration in rulesets/agents/',
|
|
107
|
+
inputSchema: {
|
|
108
|
+
type: 'object',
|
|
109
|
+
properties: {
|
|
110
|
+
name: { type: 'string', description: 'Agent name (kebab-case)' },
|
|
111
|
+
type: { type: 'string', enum: ['coding', 'review', 'security', 'architecture'] },
|
|
112
|
+
capabilities: { type: 'array', items: { type: 'string' } },
|
|
113
|
+
},
|
|
114
|
+
required: ['name', 'type'],
|
|
115
|
+
},
|
|
116
|
+
outputSchema: {
|
|
117
|
+
type: 'object',
|
|
118
|
+
properties: {
|
|
119
|
+
created: { type: 'boolean' },
|
|
120
|
+
path: { type: 'string' },
|
|
121
|
+
agentConfig: { type: 'object' },
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
exports.RESOURCE_SCHEMAS = {
|
|
127
|
+
'evolith://rulesets': {
|
|
128
|
+
description: 'List of all available rulesets in Evolith Core',
|
|
129
|
+
mimeType: 'application/json',
|
|
130
|
+
},
|
|
131
|
+
'evolith://phase-gates': {
|
|
132
|
+
description: 'Phase gate definitions and requirements',
|
|
133
|
+
mimeType: 'application/json',
|
|
134
|
+
},
|
|
135
|
+
'evolith://core/info': {
|
|
136
|
+
description: 'General information about the Evolith Core',
|
|
137
|
+
mimeType: 'application/json',
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
exports.COMMAND_SCHEMAS = {
|
|
141
|
+
'init': {
|
|
142
|
+
description: 'Initialize a new Evolith project',
|
|
143
|
+
options: [
|
|
144
|
+
{ flags: '-n, --name <name>', description: 'Project name' },
|
|
145
|
+
{ flags: '-t, --type <type>', description: 'Project type (library, app, api)' },
|
|
146
|
+
{ flags: '-r, --runtime <runtime>', description: 'Runtime (nodejs, dotnet, python)' },
|
|
147
|
+
{ flags: '--dry-run', description: 'Show what would be created' },
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
'validate': {
|
|
151
|
+
description: 'Validate project against governance rules',
|
|
152
|
+
options: [
|
|
153
|
+
{ flags: '--ruleset <name>', description: 'Specific ruleset to validate against' },
|
|
154
|
+
{ flags: '--strict', description: 'Fail on warnings' },
|
|
155
|
+
{ flags: '--report', description: 'Output validation report' },
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
'gate': {
|
|
159
|
+
description: 'Phase gate evaluation and status commands',
|
|
160
|
+
options: [
|
|
161
|
+
{ flags: 'evaluate', description: 'Evaluate gate compliance' },
|
|
162
|
+
{ flags: 'status', description: 'Show current gate status' },
|
|
163
|
+
{ flags: '--phase <phase>', description: 'Specific phase to evaluate' },
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
//# sourceMappingURL=api.catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.catalog.js","sourceRoot":"","sources":["../../../src/commands/api/api.catalog.ts"],"names":[],"mappings":";;;AAiCa,QAAA,UAAU,GAAkB;IACvC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,yBAAyB,EAAE;IAC7E,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,uBAAuB,EAAE;IACnF,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,uBAAuB,EAAE;IACtF,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE;CAC/E,CAAC;AAEW,QAAA,KAAK,GAAe;IAC/B,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,kCAAkC,EAAE;IACzE,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,4BAA4B,EAAE;IACjE,EAAE,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,8BAA8B,EAAE;IACvE,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,mCAAmC,EAAE;IAChF,EAAE,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,gCAAgC,EAAE;IAChF,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,gCAAgC,EAAE;IACxE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,qCAAqC,EAAE;IAC3E,EAAE,IAAI,EAAE,gBAAgB,EAAE,WAAW,EAAE,oCAAoC,EAAE;IAC7E,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,gCAAgC,EAAE;IACxE,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,wB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,EAAE;QACrB,WAAW,EAAE,4CAA4C;QACzD,QAAQ,EAAE,kBAAkB;KAC7B;CACF,CAAC;AAEW,QAAA,eAAe,GAAkC;IAC5D,MAAM,EAAE;QACN,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,cAAc,EAAE;YAC3D,EAAE,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,kCAAkC,EAAE;YAC/E,EAAE,KAAK,EAAE,yBAAyB,EAAE,WAAW,EAAE,kCAAkC,EAAE;YACrF,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,4BAA4B,EAAE;SAClE;KACF;IACD,UAAU,EAAE;QACV,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,kBAAkB,EAAE,WAAW,EAAE,sCAAsC,EAAE;YAClF,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE;YACtD,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,0BAA0B,EAAE;SAC/D;KACF;IACD,MAAM,EAAE;QACN,WAAW,EAAE,2CAA2C;QACxD,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,0BAA0B,EAAE;YAC9D,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,0BAA0B,EAAE;YAC5D,EAAE,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,4BAA4B,EAAE;SACxE;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BaseEvolithCommand } from '../../infrastructure/cli/base-command';
|
|
2
|
+
import { PromptService } from '../../infrastructure/prompts/prompt.service';
|
|
3
|
+
import { ConfigService } from '../../infrastructure/config/config.service';
|
|
4
|
+
interface ApiCommandOptions {
|
|
5
|
+
list?: boolean;
|
|
6
|
+
inspect?: string;
|
|
7
|
+
category?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare class ApiCommand extends BaseEvolithCommand {
|
|
10
|
+
constructor(promptService?: PromptService, configService?: ConfigService);
|
|
11
|
+
executeCommand(passedParam: string[], options?: ApiCommandOptions): Promise<void>;
|
|
12
|
+
private listOperations;
|
|
13
|
+
private listCategory;
|
|
14
|
+
private printEntries;
|
|
15
|
+
private inspectOperation;
|
|
16
|
+
private showHelp;
|
|
17
|
+
parseList(): boolean;
|
|
18
|
+
parseInspect(val: string): string;
|
|
19
|
+
parseCategory(val: string): string;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ApiCommand = void 0;
|
|
16
|
+
const nest_commander_1 = require("nest-commander");
|
|
17
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
18
|
+
const base_command_1 = require("../../infrastructure/cli/base-command");
|
|
19
|
+
const prompt_service_1 = require("../../infrastructure/prompts/prompt.service");
|
|
20
|
+
const config_service_1 = require("../../infrastructure/config/config.service");
|
|
21
|
+
const api_catalog_1 = require("./api.catalog");
|
|
22
|
+
let ApiCommand = class ApiCommand extends base_command_1.BaseEvolithCommand {
|
|
23
|
+
constructor(promptService, configService) {
|
|
24
|
+
super('ApiCommand', promptService, configService);
|
|
25
|
+
}
|
|
26
|
+
async executeCommand(passedParam, options) {
|
|
27
|
+
if (options?.inspect)
|
|
28
|
+
return this.inspectOperation(options.inspect);
|
|
29
|
+
if (options?.list)
|
|
30
|
+
return this.listOperations(options.category);
|
|
31
|
+
return this.showHelp();
|
|
32
|
+
}
|
|
33
|
+
async listOperations(category) {
|
|
34
|
+
this.promptService.showIntro('Evolith API Surface');
|
|
35
|
+
if (category) {
|
|
36
|
+
const cat = api_catalog_1.CATEGORIES.find(c => c.name === category);
|
|
37
|
+
if (cat)
|
|
38
|
+
return this.listCategory(cat.name);
|
|
39
|
+
this.promptService.showError(`Unknown category: ${category}`);
|
|
40
|
+
this.promptService.showInfo('Available categories: tools, resources, schemas, commands');
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.promptService.showInfo(chalk_1.default.bold('\n📦 Available API Surface\n'));
|
|
44
|
+
for (const cat of api_catalog_1.CATEGORIES) {
|
|
45
|
+
this.promptService.showInfo(` ${chalk_1.default.cyan(cat.name.padEnd(12))} ${cat.label} - ${cat.description}`);
|
|
46
|
+
}
|
|
47
|
+
this.promptService.showInfo(chalk_1.default.bold('\n📖 Usage'));
|
|
48
|
+
this.promptService.showInfo(' evolith api --list List all categories');
|
|
49
|
+
this.promptService.showInfo(' evolith api --list --category tools List MCP tools');
|
|
50
|
+
this.promptService.showInfo(' evolith api --inspect <name> Inspect specific operation');
|
|
51
|
+
this.promptService.showInfo(' evolith api --inspect gate-evaluate Example: inspect gate-evaluate tool');
|
|
52
|
+
}
|
|
53
|
+
async listCategory(categoryName) {
|
|
54
|
+
switch (categoryName) {
|
|
55
|
+
case 'tools': return this.printEntries('🔧 MCP Tools (15 of 23)', api_catalog_1.TOOLS, 25, '\n Use --inspect <tool-name> for detailed schema\n Run "evolith mcp serve" to start MCP server');
|
|
56
|
+
case 'schemas': return this.printEntries('📐 Phase-Gate Schemas (8 of 18)', api_catalog_1.SCHEMAS, 20, '\n Use --inspect <schema-name> for detailed structure');
|
|
57
|
+
case 'commands': return this.printEntries('⌨️ CLI Commands (14 of 21)', api_catalog_1.COMMANDS, 15, '\n Use --inspect <command-name> for detailed options');
|
|
58
|
+
case 'resources':
|
|
59
|
+
this.promptService.showInfo(chalk_1.default.bold('\n📋 MCP Resources (8)\n'));
|
|
60
|
+
for (const res of api_catalog_1.RESOURCES) {
|
|
61
|
+
this.promptService.showInfo(` ${chalk_1.default.green('●')} ${chalk_1.default.cyan(res.name.padEnd(20))} ${chalk_1.default.dim(res.uri)}`);
|
|
62
|
+
this.promptService.showInfo(` ${res.description}`);
|
|
63
|
+
}
|
|
64
|
+
this.promptService.showInfo(chalk_1.default.dim('\n Use --inspect <resource-uri> for detailed schema'));
|
|
65
|
+
return;
|
|
66
|
+
default:
|
|
67
|
+
this.promptService.showError(`Unknown category: ${categoryName}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
printEntries(header, entries, pad, footer) {
|
|
71
|
+
this.promptService.showInfo(chalk_1.default.bold(`\n${header}\n`));
|
|
72
|
+
for (const e of entries) {
|
|
73
|
+
this.promptService.showInfo(` ${chalk_1.default.green('●')} ${chalk_1.default.cyan(e.name.padEnd(pad))} ${e.description}`);
|
|
74
|
+
}
|
|
75
|
+
this.promptService.showInfo(chalk_1.default.dim(footer));
|
|
76
|
+
}
|
|
77
|
+
async inspectOperation(operationName) {
|
|
78
|
+
this.promptService.showIntro(`Inspecting: ${operationName}`);
|
|
79
|
+
if (api_catalog_1.TOOL_SCHEMAS[operationName]) {
|
|
80
|
+
const schema = api_catalog_1.TOOL_SCHEMAS[operationName];
|
|
81
|
+
this.promptService.showInfo(chalk_1.default.bold('\n🔧 MCP Tool Schema\n'));
|
|
82
|
+
this.promptService.showInfo(` Description: ${schema.description}`);
|
|
83
|
+
this.promptService.showInfo(chalk_1.default.bold('\n📥 Input Schema:'));
|
|
84
|
+
this.promptService.showInfo(JSON.stringify(schema.inputSchema, null, 2));
|
|
85
|
+
this.promptService.showInfo(chalk_1.default.bold('\n📤 Output Schema:'));
|
|
86
|
+
this.promptService.showInfo(JSON.stringify(schema.outputSchema, null, 2));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (api_catalog_1.RESOURCE_SCHEMAS[operationName]) {
|
|
90
|
+
const schema = api_catalog_1.RESOURCE_SCHEMAS[operationName];
|
|
91
|
+
this.promptService.showInfo(chalk_1.default.bold('\n📋 MCP Resource Schema\n'));
|
|
92
|
+
this.promptService.showInfo(` Description: ${schema.description}`);
|
|
93
|
+
this.promptService.showInfo(` MIME Type: ${schema.mimeType}`);
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
if (api_catalog_1.COMMAND_SCHEMAS[operationName]) {
|
|
97
|
+
const schema = api_catalog_1.COMMAND_SCHEMAS[operationName];
|
|
98
|
+
this.promptService.showInfo(chalk_1.default.bold('\n⌨️ CLI Command Schema\n'));
|
|
99
|
+
this.promptService.showInfo(` Description: ${schema.description}`);
|
|
100
|
+
this.promptService.showInfo(chalk_1.default.bold('\n⚙️ Options:'));
|
|
101
|
+
for (const opt of schema.options) {
|
|
102
|
+
this.promptService.showInfo(` ${chalk_1.default.cyan(opt.flags.padEnd(25))} ${opt.description}`);
|
|
103
|
+
}
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
this.promptService.showError(`Unknown operation: ${operationName}`);
|
|
107
|
+
this.promptService.showInfo('Try one of:');
|
|
108
|
+
this.promptService.showInfo(' Tools: gate-evaluate, validate-artifacts, agent-create');
|
|
109
|
+
this.promptService.showInfo(' Resources: evolith://rulesets, evolith://phase-gates, evolith://core/info');
|
|
110
|
+
this.promptService.showInfo(' Commands: init, validate, gate');
|
|
111
|
+
}
|
|
112
|
+
async showHelp() {
|
|
113
|
+
this.promptService.showIntro('Evolith API Browser');
|
|
114
|
+
this.promptService.showInfo('Browse and inspect the Evolith API surface.\n');
|
|
115
|
+
this.promptService.showInfo(chalk_1.default.bold('Usage:'));
|
|
116
|
+
this.promptService.showInfo(' evolith api --list List all API categories');
|
|
117
|
+
this.promptService.showInfo(' evolith api --list --category tools List MCP tools');
|
|
118
|
+
this.promptService.showInfo(' evolith api --inspect <name> Inspect specific operation');
|
|
119
|
+
this.promptService.showInfo(' evolith api --inspect gate-evaluate Example: inspect a tool');
|
|
120
|
+
this.promptService.showInfo(' evolith api --inspect init Example: inspect a command\n');
|
|
121
|
+
this.promptService.showInfo(chalk_1.default.bold('Categories:'));
|
|
122
|
+
this.promptService.showInfo(' tools - MCP tools (JSON-RPC operations)');
|
|
123
|
+
this.promptService.showInfo(' resources - MCP resources (read-only data)');
|
|
124
|
+
this.promptService.showInfo(' schemas - Phase-gate validation schemas');
|
|
125
|
+
this.promptService.showInfo(' commands - CLI native commands\n');
|
|
126
|
+
this.promptService.showInfo(chalk_1.default.bold('Examples:'));
|
|
127
|
+
this.promptService.showInfo(' evolith api --list --category tools');
|
|
128
|
+
this.promptService.showInfo(' evolith api --inspect gate-evaluate');
|
|
129
|
+
this.promptService.showInfo(' evolith api --inspect evolith://rulesets');
|
|
130
|
+
this.promptService.showInfo(' evolith api --inspect init');
|
|
131
|
+
}
|
|
132
|
+
parseList() { return true; }
|
|
133
|
+
parseInspect(val) { return val; }
|
|
134
|
+
parseCategory(val) { return val; }
|
|
135
|
+
};
|
|
136
|
+
exports.ApiCommand = ApiCommand;
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, nest_commander_1.Option)({ flags: '-l, --list', description: 'List available API operations' }),
|
|
139
|
+
__metadata("design:type", Function),
|
|
140
|
+
__metadata("design:paramtypes", []),
|
|
141
|
+
__metadata("design:returntype", Boolean)
|
|
142
|
+
], ApiCommand.prototype, "parseList", null);
|
|
143
|
+
__decorate([
|
|
144
|
+
(0, nest_commander_1.Option)({ flags: '-i, --inspect <name>', description: 'Inspect a specific operation, resource, or command' }),
|
|
145
|
+
__metadata("design:type", Function),
|
|
146
|
+
__metadata("design:paramtypes", [String]),
|
|
147
|
+
__metadata("design:returntype", String)
|
|
148
|
+
], ApiCommand.prototype, "parseInspect", null);
|
|
149
|
+
__decorate([
|
|
150
|
+
(0, nest_commander_1.Option)({ flags: '-c, --category <category>', description: 'Filter by category (tools, resources, schemas, commands)' }),
|
|
151
|
+
__metadata("design:type", Function),
|
|
152
|
+
__metadata("design:paramtypes", [String]),
|
|
153
|
+
__metadata("design:returntype", String)
|
|
154
|
+
], ApiCommand.prototype, "parseCategory", null);
|
|
155
|
+
exports.ApiCommand = ApiCommand = __decorate([
|
|
156
|
+
(0, nest_commander_1.Command)({
|
|
157
|
+
name: 'api',
|
|
158
|
+
description: 'Browse and inspect the Evolith API surface (MCP tools, resources, schemas)',
|
|
159
|
+
}),
|
|
160
|
+
__metadata("design:paramtypes", [prompt_service_1.PromptService, config_service_1.ConfigService])
|
|
161
|
+
], ApiCommand);
|
|
162
|
+
//# sourceMappingURL=api.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.command.js","sourceRoot":"","sources":["../../../src/commands/api/api.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAiD;AACjD,kDAA0B;AAC1B,wEAA2E;AAC3E,gFAA4E;AAC5E,+EAA2E;AAC3E,+CAGuB;AAYhB,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,iCAAkB;IAChD,YAAY,aAA6B,EAAE,aAA6B;QACtE,KAAK,CAAC,YAAY,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,WAAqB,EAAE,OAA2B;QACrE,IAAI,OAAO,EAAE,OAAO;YAAE,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,C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0;
|
|
4
|
+
var scaffold_strategy_1 = require("./scaffold-strategy");
|
|
5
|
+
Object.defineProperty(exports, "ScaffoldStrategy", { enumerable: true, get: function () { return scaffold_strategy_1.ScaffoldStrategy; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/architecture/scaffold/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ScaffoldTarget = 'modular-monolith' | 'distributed-modules' | 'microservices';
|
|
2
|
+
export interface ScaffoldOptions {
|
|
3
|
+
target: ScaffoldTarget;
|
|
4
|
+
dryRun: boolean;
|
|
5
|
+
outputDir: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ScaffoldResult {
|
|
8
|
+
success: boolean;
|
|
9
|
+
filesCreated: string[];
|
|
10
|
+
errors: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare class ScaffoldStrategy {
|
|
13
|
+
execute(options: ScaffoldOptions): Promise<ScaffoldResult>;
|
|
14
|
+
getRequiredFiles(target: ScaffoldTarget): string[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScaffoldStrategy = void 0;
|
|
4
|
+
class ScaffoldStrategy {
|
|
5
|
+
async execute(options) {
|
|
6
|
+
if (options.dryRun) {
|
|
7
|
+
return { success: true, filesCreated: [], errors: [] };
|
|
8
|
+
}
|
|
9
|
+
return { success: true, filesCreated: [options.outputDir], errors: [] };
|
|
10
|
+
}
|
|
11
|
+
getRequiredFiles(target) {
|
|
12
|
+
const base = ['evolith.yaml', 'package.json', 'src/'];
|
|
13
|
+
if (target === 'distributed-modules' || target === 'microservices') {
|
|
14
|
+
return [...base, 'contracts/', 'topology.manifest.json'];
|
|
15
|
+
}
|
|
16
|
+
return base;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.ScaffoldStrategy = ScaffoldStrategy;
|
|
20
|
+
//# sourceMappingURL=scaffold-strategy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold-strategy.js","sourceRoot":"","sources":["../../../../src/commands/architecture/scaffold/scaffold-strategy.ts"],"names":[],"mappings":";;;AAcA,MAAa,gBAAgB;IAC3B,KAAK,CAAC,OAAO,CAAC,OAAwB;QACpC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;YACnB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QACzD,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC1E,CAAC;IAED,gBAAgB,CAAC,MAAsB;QACrC,MAAM,IAAI,GAAG,CAAC,cAAc,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;QACtD,IAAI,MAAM,KAAK,qBAAqB,IAAI,MAAM,KAAK,eAAe,EAAE,CAAC;YACnE,OAAO,CAAC,GAAG,IAAI,EAAE,YAAY,EAAE,wBAAwB,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAfD,4CAeC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseEvolithCommand } from '../../infrastructure/cli/base-command';
|
|
2
|
+
export declare class ScaffoldCommand extends BaseEvolithCommand {
|
|
3
|
+
private strategy;
|
|
4
|
+
constructor();
|
|
5
|
+
executeCommand(passedParam: string[], options?: Record<string, unknown>): Promise<void>;
|
|
6
|
+
parseFrontend(val: string): string;
|
|
7
|
+
parseOrm(val: string): string;
|
|
8
|
+
parseDryRun(): boolean;
|
|
9
|
+
parseFormat(val: string): string;
|
|
10
|
+
parsePhase(val: string): string;
|
|
11
|
+
parseApiName(val: string): string;
|
|
12
|
+
parseWebAppName(val: string): string;
|
|
13
|
+
parseHostName(val: string): string;
|
|
14
|
+
parseRemotes(val: string): string;
|
|
15
|
+
parseDomains(val: string): string[];
|
|
16
|
+
}
|