@evolith/smart-cli 1.1.2 → 1.1.3

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.
Files changed (196) hide show
  1. package/dist/app.module.d.ts +2 -0
  2. package/dist/app.module.js +134 -0
  3. package/dist/app.module.js.map +1 -0
  4. package/dist/commands/adr/adr.command.d.ts +34 -0
  5. package/dist/commands/adr/adr.command.js +351 -0
  6. package/dist/commands/adr/adr.command.js.map +1 -0
  7. package/dist/commands/agents/agents.command.d.ts +14 -0
  8. package/dist/commands/agents/agents.command.js +61 -0
  9. package/dist/commands/agents/agents.command.js.map +1 -0
  10. package/dist/commands/agents/index.d.ts +1 -0
  11. package/dist/commands/agents/index.js +6 -0
  12. package/dist/commands/agents/index.js.map +1 -0
  13. package/dist/commands/alias/alias.command.d.ts +16 -0
  14. package/dist/commands/alias/alias.command.js +95 -0
  15. package/dist/commands/alias/alias.command.js.map +1 -0
  16. package/dist/commands/api/api.catalog.d.ts +38 -0
  17. package/dist/commands/api/api.catalog.js +167 -0
  18. package/dist/commands/api/api.catalog.js.map +1 -0
  19. package/dist/commands/api/api.command.d.ts +21 -0
  20. package/dist/commands/api/api.command.js +162 -0
  21. package/dist/commands/api/api.command.js.map +1 -0
  22. package/dist/commands/architecture/scaffold/index.d.ts +2 -0
  23. package/dist/commands/architecture/scaffold/index.js +6 -0
  24. package/dist/commands/architecture/scaffold/index.js.map +1 -0
  25. package/dist/commands/architecture/scaffold/scaffold-strategy.d.ts +15 -0
  26. package/dist/commands/architecture/scaffold/scaffold-strategy.js +20 -0
  27. package/dist/commands/architecture/scaffold/scaffold-strategy.js.map +1 -0
  28. package/dist/commands/architecture/scaffold.command.d.ts +16 -0
  29. package/dist/commands/architecture/scaffold.command.js +321 -0
  30. package/dist/commands/architecture/scaffold.command.js.map +1 -0
  31. package/dist/commands/completion/completion.command.d.ts +28 -0
  32. package/dist/commands/completion/completion.command.js +321 -0
  33. package/dist/commands/completion/completion.command.js.map +1 -0
  34. package/dist/commands/docs/docs.command.d.ts +17 -0
  35. package/dist/commands/docs/docs.command.js +292 -0
  36. package/dist/commands/docs/docs.command.js.map +1 -0
  37. package/dist/commands/drift/drift.command.d.ts +28 -0
  38. package/dist/commands/drift/drift.command.js +283 -0
  39. package/dist/commands/drift/drift.command.js.map +1 -0
  40. package/dist/commands/fixtures/fixtures.command.d.ts +21 -0
  41. package/dist/commands/fixtures/fixtures.command.js +310 -0
  42. package/dist/commands/fixtures/fixtures.command.js.map +1 -0
  43. package/dist/commands/gate/gate.command.d.ts +29 -0
  44. package/dist/commands/gate/gate.command.js +193 -0
  45. package/dist/commands/gate/gate.command.js.map +1 -0
  46. package/dist/commands/history/history.command.d.ts +29 -0
  47. package/dist/commands/history/history.command.js +237 -0
  48. package/dist/commands/history/history.command.js.map +1 -0
  49. package/dist/commands/init/agents.command.d.ts +24 -0
  50. package/dist/commands/init/agents.command.js +330 -0
  51. package/dist/commands/init/agents.command.js.map +1 -0
  52. package/dist/commands/init/init.command.d.ts +26 -0
  53. package/dist/commands/init/init.command.js +170 -0
  54. package/dist/commands/init/init.command.js.map +1 -0
  55. package/dist/commands/init/init.wizard.d.ts +19 -0
  56. package/dist/commands/init/init.wizard.js +181 -0
  57. package/dist/commands/init/init.wizard.js.map +1 -0
  58. package/dist/commands/init/upgrade.command.d.ts +22 -0
  59. package/dist/commands/init/upgrade.command.js +178 -0
  60. package/dist/commands/init/upgrade.command.js.map +1 -0
  61. package/dist/commands/mcp/mcp-serve.command.d.ts +17 -0
  62. package/dist/commands/mcp/mcp-serve.command.js +153 -0
  63. package/dist/commands/mcp/mcp-serve.command.js.map +1 -0
  64. package/dist/commands/phase/phase-advance.command.d.ts +30 -0
  65. package/dist/commands/phase/phase-advance.command.js +206 -0
  66. package/dist/commands/phase/phase-advance.command.js.map +1 -0
  67. package/dist/commands/profile/profile.command.d.ts +18 -0
  68. package/dist/commands/profile/profile.command.js +198 -0
  69. package/dist/commands/profile/profile.command.js.map +1 -0
  70. package/dist/commands/sdlc/gate-status.command.d.ts +10 -0
  71. package/dist/commands/sdlc/gate-status.command.js +162 -0
  72. package/dist/commands/sdlc/gate-status.command.js.map +1 -0
  73. package/dist/commands/sdlc/generate-domain.command.d.ts +8 -0
  74. package/dist/commands/sdlc/generate-domain.command.js +165 -0
  75. package/dist/commands/sdlc/generate-domain.command.js.map +1 -0
  76. package/dist/commands/sdlc/handoff.command.d.ts +27 -0
  77. package/dist/commands/sdlc/handoff.command.js +275 -0
  78. package/dist/commands/sdlc/handoff.command.js.map +1 -0
  79. package/dist/commands/sdlc/sdlc.command.d.ts +5 -0
  80. package/dist/commands/sdlc/sdlc.command.js +44 -0
  81. package/dist/commands/sdlc/sdlc.command.js.map +1 -0
  82. package/dist/commands/standards/standards.command.d.ts +30 -0
  83. package/dist/commands/standards/standards.command.js +283 -0
  84. package/dist/commands/standards/standards.command.js.map +1 -0
  85. package/dist/commands/update/update.command.d.ts +21 -0
  86. package/dist/commands/update/update.command.js +214 -0
  87. package/dist/commands/update/update.command.js.map +1 -0
  88. package/dist/commands/upgrade/index.d.ts +1 -0
  89. package/dist/commands/upgrade/index.js +6 -0
  90. package/dist/commands/upgrade/index.js.map +1 -0
  91. package/dist/commands/upgrade/upgrade.command.d.ts +14 -0
  92. package/dist/commands/upgrade/upgrade.command.js +58 -0
  93. package/dist/commands/upgrade/upgrade.command.js.map +1 -0
  94. package/dist/commands/validate/validate.command.d.ts +43 -0
  95. package/dist/commands/validate/validate.command.js +514 -0
  96. package/dist/commands/validate/validate.command.js.map +1 -0
  97. package/dist/config/alias.service.d.ts +14 -0
  98. package/dist/config/alias.service.js +103 -0
  99. package/dist/config/alias.service.js.map +1 -0
  100. package/dist/contributions/contribution-validator.d.ts +16 -0
  101. package/dist/contributions/contribution-validator.js +34 -0
  102. package/dist/contributions/contribution-validator.js.map +1 -0
  103. package/dist/contributions/index.d.ts +1 -0
  104. package/dist/contributions/index.js +6 -0
  105. package/dist/contributions/index.js.map +1 -0
  106. package/dist/infrastructure/adapters/agent-registry.service.d.ts +30 -0
  107. package/dist/infrastructure/adapters/agent-registry.service.js +175 -0
  108. package/dist/infrastructure/adapters/agent-registry.service.js.map +1 -0
  109. package/dist/infrastructure/architecture/nx-workspace.strategy.d.ts +19 -0
  110. package/dist/infrastructure/architecture/nx-workspace.strategy.js +125 -0
  111. package/dist/infrastructure/architecture/nx-workspace.strategy.js.map +1 -0
  112. package/dist/infrastructure/catalog/catalog-loader.d.ts +21 -0
  113. package/dist/infrastructure/catalog/catalog-loader.js +144 -0
  114. package/dist/infrastructure/catalog/catalog-loader.js.map +1 -0
  115. package/dist/infrastructure/cli/base-command.d.ts +14 -0
  116. package/dist/infrastructure/cli/base-command.js +41 -0
  117. package/dist/infrastructure/cli/base-command.js.map +1 -0
  118. package/dist/infrastructure/cli/command-executor.d.ts +20 -0
  119. package/dist/infrastructure/cli/command-executor.js +110 -0
  120. package/dist/infrastructure/cli/command-executor.js.map +1 -0
  121. package/dist/infrastructure/cli/providers/index.d.ts +52 -0
  122. package/dist/infrastructure/cli/providers/index.js +175 -0
  123. package/dist/infrastructure/cli/providers/index.js.map +1 -0
  124. package/dist/infrastructure/config/config.service.d.ts +34 -0
  125. package/dist/infrastructure/config/config.service.js +126 -0
  126. package/dist/infrastructure/config/config.service.js.map +1 -0
  127. package/dist/infrastructure/filesystem/file-manager.service.d.ts +12 -0
  128. package/dist/infrastructure/filesystem/file-manager.service.js +79 -0
  129. package/dist/infrastructure/filesystem/file-manager.service.js.map +1 -0
  130. package/dist/infrastructure/formatters/output-formatter.service.d.ts +28 -0
  131. package/dist/infrastructure/formatters/output-formatter.service.js +199 -0
  132. package/dist/infrastructure/formatters/output-formatter.service.js.map +1 -0
  133. package/dist/infrastructure/observability/command-watcher.d.ts +45 -0
  134. package/dist/infrastructure/observability/command-watcher.js +199 -0
  135. package/dist/infrastructure/observability/command-watcher.js.map +1 -0
  136. package/dist/infrastructure/observability/error-reporter.d.ts +47 -0
  137. package/dist/infrastructure/observability/error-reporter.js +163 -0
  138. package/dist/infrastructure/observability/error-reporter.js.map +1 -0
  139. package/dist/infrastructure/observability/index.d.ts +11 -0
  140. package/dist/infrastructure/observability/index.js +31 -0
  141. package/dist/infrastructure/observability/index.js.map +1 -0
  142. package/dist/infrastructure/observability/otel-tracing.d.ts +4 -0
  143. package/dist/infrastructure/observability/otel-tracing.js +34 -0
  144. package/dist/infrastructure/observability/otel-tracing.js.map +1 -0
  145. package/dist/infrastructure/observability/structured-logger.d.ts +53 -0
  146. package/dist/infrastructure/observability/structured-logger.js +123 -0
  147. package/dist/infrastructure/observability/structured-logger.js.map +1 -0
  148. package/dist/infrastructure/observability/timing.d.ts +23 -0
  149. package/dist/infrastructure/observability/timing.js +140 -0
  150. package/dist/infrastructure/observability/timing.js.map +1 -0
  151. package/dist/infrastructure/observability/tool-usage-telemetry.service.d.ts +46 -0
  152. package/dist/infrastructure/observability/tool-usage-telemetry.service.js +181 -0
  153. package/dist/infrastructure/observability/tool-usage-telemetry.service.js.map +1 -0
  154. package/dist/infrastructure/plugins/plugin-loader.d.ts +10 -0
  155. package/dist/infrastructure/plugins/plugin-loader.js +145 -0
  156. package/dist/infrastructure/plugins/plugin-loader.js.map +1 -0
  157. package/dist/infrastructure/plugins/plugin.module.d.ts +4 -0
  158. package/dist/infrastructure/plugins/plugin.module.js +28 -0
  159. package/dist/infrastructure/plugins/plugin.module.js.map +1 -0
  160. package/dist/infrastructure/prompts/init-prompt-group.d.ts +3 -0
  161. package/dist/infrastructure/prompts/init-prompt-group.js +115 -0
  162. package/dist/infrastructure/prompts/init-prompt-group.js.map +1 -0
  163. package/dist/infrastructure/prompts/init-prompt-options.d.ts +10 -0
  164. package/dist/infrastructure/prompts/init-prompt-options.js +40 -0
  165. package/dist/infrastructure/prompts/init-prompt-options.js.map +1 -0
  166. package/dist/infrastructure/prompts/progress.service.d.ts +24 -0
  167. package/dist/infrastructure/prompts/progress.service.js +180 -0
  168. package/dist/infrastructure/prompts/progress.service.js.map +1 -0
  169. package/dist/infrastructure/prompts/prompt.service.d.ts +42 -0
  170. package/dist/infrastructure/prompts/prompt.service.js +142 -0
  171. package/dist/infrastructure/prompts/prompt.service.js.map +1 -0
  172. package/dist/infrastructure/prompts/wizard.service.d.ts +27 -0
  173. package/dist/infrastructure/prompts/wizard.service.js +163 -0
  174. package/dist/infrastructure/prompts/wizard.service.js.map +1 -0
  175. package/dist/infrastructure/providers/config-parser.provider.d.ts +15 -0
  176. package/dist/infrastructure/providers/config-parser.provider.js +68 -0
  177. package/dist/infrastructure/providers/config-parser.provider.js.map +1 -0
  178. package/dist/infrastructure/providers/logger.provider.d.ts +10 -0
  179. package/dist/infrastructure/providers/logger.provider.js +84 -0
  180. package/dist/infrastructure/providers/logger.provider.js.map +1 -0
  181. package/dist/infrastructure/providers/mock-filesystem.provider.d.ts +34 -0
  182. package/dist/infrastructure/providers/mock-filesystem.provider.js +129 -0
  183. package/dist/infrastructure/providers/mock-filesystem.provider.js.map +1 -0
  184. package/dist/infrastructure/providers/node-filesystem.provider.d.ts +23 -0
  185. package/dist/infrastructure/providers/node-filesystem.provider.js +117 -0
  186. package/dist/infrastructure/providers/node-filesystem.provider.js.map +1 -0
  187. package/dist/main.d.ts +2 -0
  188. package/dist/main.js +27 -0
  189. package/dist/main.js.map +1 -0
  190. package/dist/plugins/index.d.ts +1 -0
  191. package/dist/plugins/index.js +6 -0
  192. package/dist/plugins/index.js.map +1 -0
  193. package/dist/plugins/plugin-registry.d.ts +22 -0
  194. package/dist/plugins/plugin-registry.js +33 -0
  195. package/dist/plugins/plugin-registry.js.map +1 -0
  196. package/package.json +1 -1
@@ -0,0 +1,321 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ 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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
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
+ var __metadata = (this && this.__metadata) || function (k, v) {
42
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.CompletionCommand = void 0;
49
+ const nest_commander_1 = require("nest-commander");
50
+ const fs = __importStar(require("fs-extra"));
51
+ const path = __importStar(require("path"));
52
+ const os = __importStar(require("os"));
53
+ const chalk_1 = __importDefault(require("chalk"));
54
+ const base_command_1 = require("../../infrastructure/cli/base-command");
55
+ let CompletionCommand = class CompletionCommand extends base_command_1.BaseEvolithCommand {
56
+ constructor() {
57
+ super('CompletionCommand');
58
+ this.completed = chalk_1.default.green('✓');
59
+ this.error = chalk_1.default.red('✗');
60
+ }
61
+ async executeCommand(passedParam, options) {
62
+ const shell = options?.shell || this.detectShell();
63
+ if (options?.installHooks) {
64
+ await this.installHooks(options.installHooks);
65
+ return;
66
+ }
67
+ if (options?.hooks) {
68
+ await this.showShellHooks(shell);
69
+ return;
70
+ }
71
+ if (options?.install) {
72
+ await this.installCompletion(options.install);
73
+ return;
74
+ }
75
+ await this.showCompletionHelp(shell);
76
+ }
77
+ detectShell() {
78
+ const shell = process.env.SHELL || '';
79
+ if (shell.includes('zsh'))
80
+ return 'zsh';
81
+ if (shell.includes('fish'))
82
+ return 'fish';
83
+ return 'bash';
84
+ }
85
+ async installCompletion(shell) {
86
+ const completionDir = path.join(this.getPackageRoot(), 'shell');
87
+ if (!(await fs.pathExists(completionDir))) {
88
+ this.promptService.showError(`${this.error} Completion scripts not found at ${completionDir}`);
89
+ this.promptService.showInfo('Run "evolith completion" to generate them manually.');
90
+ return;
91
+ }
92
+ switch (shell) {
93
+ case 'bash':
94
+ await this.installBash(completionDir);
95
+ break;
96
+ case 'zsh':
97
+ await this.installZsh(completionDir);
98
+ break;
99
+ case 'fish':
100
+ await this.installFish(completionDir);
101
+ break;
102
+ default:
103
+ this.promptService.showError(`${this.error} Unknown shell: ${shell}`);
104
+ this.promptService.showInfo('Supported shells: bash, zsh, fish');
105
+ }
106
+ }
107
+ async installBash(completionDir) {
108
+ const bashrc = path.join(os.homedir(), '.bashrc');
109
+ const completionScript = path.join(completionDir, 'completion.bash');
110
+ if (!(await fs.pathExists(completionScript))) {
111
+ this.promptService.showError(`${this.error} Bash completion script not found`);
112
+ return;
113
+ }
114
+ const marker = '# Evolith CLI completion';
115
+ const line = `source "${completionScript}"`;
116
+ let content = '';
117
+ if (await fs.pathExists(bashrc)) {
118
+ content = await fs.readFile(bashrc, 'utf-8');
119
+ if (content.includes(marker)) {
120
+ this.promptService.showSuccess(`${this.completed} Bash completion already installed`);
121
+ return;
122
+ }
123
+ }
124
+ await fs.appendFile(bashrc, `\n${marker}\n${line}\n`);
125
+ this.promptService.showSuccess(`${this.completed} Bash completion installed`);
126
+ this.promptService.showInfo(` Added to ${bashrc}`);
127
+ this.promptService.showInfo(' Reload shell or run: source ~/.bashrc');
128
+ }
129
+ async installZsh(completionDir) {
130
+ const zshrc = path.join(os.homedir(), '.zshrc');
131
+ const completionScript = path.join(completionDir, 'completion.zsh');
132
+ if (!(await fs.pathExists(completionScript))) {
133
+ this.promptService.showError(`${this.error} Zsh completion script not found`);
134
+ return;
135
+ }
136
+ const marker = '# Evolith CLI completion';
137
+ const line = `source "${completionScript}"`;
138
+ let content = '';
139
+ if (await fs.pathExists(zshrc)) {
140
+ content = await fs.readFile(zshrc, 'utf-8');
141
+ if (content.includes(marker)) {
142
+ this.promptService.showSuccess(`${this.completed} Zsh completion already installed`);
143
+ return;
144
+ }
145
+ }
146
+ await fs.appendFile(zshrc, `\n${marker}\n${line}\n`);
147
+ this.promptService.showSuccess(`${this.completed} Zsh completion installed`);
148
+ this.promptService.showInfo(` Added to ${zshrc}`);
149
+ this.promptService.showInfo(' Reload shell or run: source ~/.zshrc');
150
+ }
151
+ async installFish(completionDir) {
152
+ const fishDir = path.join(os.homedir(), '.config', 'fish', 'completions');
153
+ const completionScript = path.join(completionDir, 'completion.fish');
154
+ const targetScript = path.join(fishDir, 'evolith.fish');
155
+ if (!(await fs.pathExists(completionScript))) {
156
+ this.promptService.showError(`${this.error} Fish completion script not found`);
157
+ return;
158
+ }
159
+ await fs.ensureDir(fishDir);
160
+ await fs.copy(completionScript, targetScript);
161
+ this.promptService.showSuccess(`${this.completed} Fish completion installed`);
162
+ this.promptService.showInfo(` Copied to ${targetScript}`);
163
+ this.promptService.showInfo(' Reload shell or run: fish -l');
164
+ }
165
+ async showShellHooks(shell) {
166
+ const hooksFile = await this.getHooksFilePath(shell);
167
+ if (!hooksFile) {
168
+ this.promptService.showError(`${this.error} Unknown shell: ${shell}`);
169
+ return;
170
+ }
171
+ const content = await fs.readFile(hooksFile, 'utf-8');
172
+ console.log(content);
173
+ }
174
+ async installHooks(shell) {
175
+ const hooksFile = await this.getHooksFilePath(shell);
176
+ if (!hooksFile) {
177
+ this.promptService.showError(`${this.error} Unknown shell: ${shell}`);
178
+ this.promptService.showInfo('Supported shells: bash, zsh, fish');
179
+ return;
180
+ }
181
+ const marker = '# Evolith CLI hooks';
182
+ switch (shell) {
183
+ case 'bash': {
184
+ const targetFile = hooksFile;
185
+ const bashrc = path.join(os.homedir(), '.bashrc');
186
+ const line = `source "${targetFile}"`;
187
+ let bashrcContent = await fs.readFile(bashrc, 'utf-8').catch(() => '');
188
+ if (!bashrcContent.includes(marker)) {
189
+ await fs.appendFile(bashrc, `\n${marker}\n${line}\n`);
190
+ }
191
+ this.promptService.showSuccess(`${this.completed} Bash hooks installed`);
192
+ this.promptService.showInfo(` Run: source ${targetFile}`);
193
+ return;
194
+ }
195
+ case 'zsh': {
196
+ const targetFile = hooksFile;
197
+ const zshrc = path.join(os.homedir(), '.zshrc');
198
+ const line = `source "${targetFile}"`;
199
+ let zshrcContent = await fs.readFile(zshrc, 'utf-8').catch(() => '');
200
+ if (!zshrcContent.includes(marker)) {
201
+ await fs.appendFile(zshrc, `\n${marker}\n${line}\n`);
202
+ }
203
+ this.promptService.showSuccess(`${this.completed} Zsh hooks installed`);
204
+ this.promptService.showInfo(` Run: source ${targetFile}`);
205
+ return;
206
+ }
207
+ case 'fish': {
208
+ const targetDir = path.join(os.homedir(), '.config', 'fish', 'functions');
209
+ await fs.ensureDir(targetDir);
210
+ const targetFile = path.join(targetDir, 'evolith_hooks.fish');
211
+ await fs.copy(hooksFile, targetFile);
212
+ this.promptService.showSuccess(`${this.completed} Fish hooks installed`);
213
+ this.promptService.showInfo(` Available functions: evolith_status, evolith_phase, evolith_gate`);
214
+ return;
215
+ }
216
+ }
217
+ }
218
+ async getHooksFilePath(shell) {
219
+ const shellDir = path.join(this.getPackageRoot(), 'shell');
220
+ switch (shell) {
221
+ case 'bash':
222
+ return path.join(shellDir, 'hooks.bash');
223
+ case 'zsh':
224
+ return path.join(shellDir, 'hooks.zsh');
225
+ case 'fish':
226
+ return path.join(shellDir, 'hooks.fish');
227
+ default:
228
+ return null;
229
+ }
230
+ }
231
+ async showCompletionHelp(shell) {
232
+ this.promptService.showIntro('Evolith CLI - Shell Completion');
233
+ this.promptService.showInfo('This command generates shell completion scripts and hooks for better UX.\n');
234
+ this.promptService.showInfo(chalk_1.default.bold('Usage:'));
235
+ this.promptService.showInfo(' evolith completion --install <shell> Install completion for shell');
236
+ this.promptService.showInfo(' evolith completion --hooks Generate shell hook functions');
237
+ this.promptService.showInfo(' evolith completion --install-hooks <shell> Install hooks for shell\n');
238
+ this.promptService.showInfo(chalk_1.default.bold('Supported shells:'));
239
+ this.promptService.showInfo(' bash - Bash (add to ~/.bashrc)');
240
+ this.promptService.showInfo(' zsh - Zsh (add to ~/.zshrc)');
241
+ this.promptService.showInfo(' fish - Fish (copy to functions dir)\n');
242
+ this.promptService.showInfo(chalk_1.default.bold('Hook functions available:'));
243
+ this.promptService.showInfo(' evolith_status - Check if in evolith project');
244
+ this.promptService.showInfo(' evolith_phase - Get current SDLC phase');
245
+ this.promptService.showInfo(' evolith_gate - Get gate status');
246
+ this.promptService.showInfo(' evolith_validate - Get last validation result');
247
+ this.promptService.showInfo(' evolith_prompt - Get prompt segment\n');
248
+ this.promptService.showInfo(chalk_1.default.bold('Examples:'));
249
+ this.promptService.showInfo(' # Install bash completion');
250
+ this.promptService.showInfo(' evolith completion --install bash');
251
+ this.promptService.showInfo('');
252
+ this.promptService.showInfo(' # Generate and install shell hooks');
253
+ this.promptService.showInfo(' evolith completion --install-hooks bash');
254
+ this.promptService.showInfo(' # Or just show hooks');
255
+ this.promptService.showInfo(' evolith completion --hooks\n');
256
+ this.promptService.showInfo(chalk_1.default.bold(`Detected shell: ${shell}`));
257
+ this.promptService.showInfo('');
258
+ this.promptService.showInfo(chalk_1.default.dim('For manual installation, source the completion script:'));
259
+ this.promptService.showInfo(chalk_1.default.dim(` source /path/to/evolith/shell/completion.${shell}`));
260
+ }
261
+ getPackageRoot() {
262
+ return path.resolve(__dirname, '../../..');
263
+ }
264
+ parseInstall(val) {
265
+ return val;
266
+ }
267
+ parseShell(val) {
268
+ return val;
269
+ }
270
+ parseHooks() {
271
+ return true;
272
+ }
273
+ parseInstallHooks(val) {
274
+ return val;
275
+ }
276
+ };
277
+ exports.CompletionCommand = CompletionCommand;
278
+ __decorate([
279
+ (0, nest_commander_1.Option)({
280
+ flags: '--install <shell>',
281
+ description: 'Install completion for specified shell (bash, zsh, fish)',
282
+ }),
283
+ __metadata("design:type", Function),
284
+ __metadata("design:paramtypes", [String]),
285
+ __metadata("design:returntype", String)
286
+ ], CompletionCommand.prototype, "parseInstall", null);
287
+ __decorate([
288
+ (0, nest_commander_1.Option)({
289
+ flags: '--shell <shell>',
290
+ description: 'Generate completion for specified shell',
291
+ }),
292
+ __metadata("design:type", Function),
293
+ __metadata("design:paramtypes", [String]),
294
+ __metadata("design:returntype", String)
295
+ ], CompletionCommand.prototype, "parseShell", null);
296
+ __decorate([
297
+ (0, nest_commander_1.Option)({
298
+ flags: '--hooks',
299
+ description: 'Generate shell hook functions for context/status',
300
+ }),
301
+ __metadata("design:type", Function),
302
+ __metadata("design:paramtypes", []),
303
+ __metadata("design:returntype", Boolean)
304
+ ], CompletionCommand.prototype, "parseHooks", null);
305
+ __decorate([
306
+ (0, nest_commander_1.Option)({
307
+ flags: '--install-hooks <shell>',
308
+ description: 'Install hooks for specified shell (bash, zsh, fish)',
309
+ }),
310
+ __metadata("design:type", Function),
311
+ __metadata("design:paramtypes", [String]),
312
+ __metadata("design:returntype", String)
313
+ ], CompletionCommand.prototype, "parseInstallHooks", null);
314
+ exports.CompletionCommand = CompletionCommand = __decorate([
315
+ (0, nest_commander_1.Command)({
316
+ name: 'completion',
317
+ description: 'Generate shell completion scripts and hooks for evolith CLI',
318
+ }),
319
+ __metadata("design:paramtypes", [])
320
+ ], CompletionCommand);
321
+ //# sourceMappingURL=completion.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completion.command.js","sourceRoot":"","sources":["../../../src/commands/completion/completion.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAiD;AACjD,6CAA+B;AAC/B,2CAA6B;AAC7B,uCAAyB;AACzB,kDAA0B;AAC1B,wEAA2E;AAapE,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,iCAAkB;IAIvD;QACE,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAJZ,cAAS,GAAG,eAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,UAAK,GAAG,eAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAIxC,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,WAAqB,EAAE,OAAkC;QAC5E,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnD,IAAI,OAAO,EAAE,YAAY,EAAE,CAAC;YAC1B,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;YAC9C,OAAO;QACT,CAAC;QAED,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,MAAM,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;YACjC,OAAO;QACT,CAAC;QAED,IAAI,OAAO,EAAE,OAAO,EAAE,CAAC;YACrB,MAAM,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC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,EAAE,CAAC,CAAC,CAAC;IAChG,CAAC;IAEO,cAAc;QACpB,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAC7C,CAAC;IAMD,YAAY,CAAC,GAAW;QACtB,OAAO,GAAG,CAAC;IACb,CAAC;IAMD,UAAU,CAAC,GAAW;QACpB,OAAO,GAAG,CAAC;IACb,CAAC;IAMD,UAAU;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAMD,iBAAiB,CAAC,GAAW;QAC3B,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAA;AApRY,8CAAiB;AAyP5B;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,0DAA0D;KACxE,CAAC;;;;qDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,yCAAyC;KACvD,CAAC;;;;mDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,kDAAkD;KAChE,CAAC;;;;mDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,qDAAqD;KACnE,CAAC;;;;0DAGD;4BAnRU,iBAAiB;IAJ7B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,6DAA6D;KAC3E,CAAC;;GACW,iBAAiB,CAoR7B"}
@@ -0,0 +1,17 @@
1
+ import { BaseEvolithCommand } from '../../infrastructure/cli/base-command';
2
+ interface DocsCommandOptions {
3
+ dryRun?: boolean;
4
+ force?: boolean;
5
+ template?: string;
6
+ format?: string;
7
+ }
8
+ export declare class DocsCommand extends BaseEvolithCommand {
9
+ constructor();
10
+ executeCommand(passedParam: string[], options?: DocsCommandOptions): Promise<void>;
11
+ private getTemplates;
12
+ parseDryRun(): boolean;
13
+ parseForce(): boolean;
14
+ parseTemplate(val: string): string;
15
+ parseFormat(val: string): string;
16
+ }
17
+ export {};
@@ -0,0 +1,292 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ 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
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
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
+ var __metadata = (this && this.__metadata) || function (k, v) {
42
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
43
+ };
44
+ var __importDefault = (this && this.__importDefault) || function (mod) {
45
+ return (mod && mod.__esModule) ? mod : { "default": mod };
46
+ };
47
+ Object.defineProperty(exports, "__esModule", { value: true });
48
+ exports.DocsCommand = void 0;
49
+ const nest_commander_1 = require("nest-commander");
50
+ const node_crypto_1 = require("node:crypto");
51
+ const fs = __importStar(require("fs-extra"));
52
+ const path = __importStar(require("path"));
53
+ const chalk_1 = __importDefault(require("chalk"));
54
+ const gate_evidence_1 = require("@evolith/core-domain/domain/gate-evidence");
55
+ const base_command_1 = require("../../infrastructure/cli/base-command");
56
+ const DEFAULT_TEMPLATES = [
57
+ {
58
+ filename: 'README.md',
59
+ description: 'Project overview and getting started',
60
+ content: `# Project Name
61
+
62
+ ## Overview
63
+ Brief description of the project.
64
+
65
+ ## Getting Started
66
+ Instructions for setting up and running the project.
67
+
68
+ ## Architecture
69
+ Link to architecture decision records and design documents.
70
+
71
+ ## Documentation
72
+ - [AGENTS.md](./AGENTS.md) - Agent configuration
73
+ - [MASTER_INDEX.md](./MASTER_INDEX.md) - Documentation index
74
+
75
+ ## License
76
+ License information.
77
+ `,
78
+ },
79
+ {
80
+ filename: 'AGENTS.md',
81
+ description: 'AI agent configuration and rules',
82
+ content: `# Agent Configuration
83
+
84
+ ## Project Context
85
+ Description of the project for AI agents.
86
+
87
+ ## Rules
88
+ - Follow established coding conventions
89
+ - Maintain bilingual parity (EN/ES)
90
+ - Validate all internal links
91
+
92
+ ## Conventions
93
+ - Use relative paths for internal references
94
+ - Keep documentation business-readable
95
+ - Isolate technical details in dedicated sections
96
+ `,
97
+ },
98
+ {
99
+ filename: 'MASTER_INDEX.md',
100
+ description: 'Master documentation index',
101
+ content: `# Master Index
102
+
103
+ ## Architecture
104
+ - [Architecture Overview](./reference/architecture/README.md)
105
+ - [ADR Registry](./reference/architecture/adrs/README.md)
106
+
107
+ ## Governance
108
+ - [Standards](./reference/governance/standards/README.md)
109
+ - [Rulesets](./reference/governance/rulesets/README.md)
110
+
111
+ ## Knowledge
112
+ - [Demo References](./reference/knowledge/demo/README.md)
113
+ `,
114
+ },
115
+ {
116
+ filename: '.evolith/evolith.yaml',
117
+ description: 'Evolith configuration file',
118
+ content: `coreRef:
119
+ version: "1.0.0"
120
+ path: "../evolith"
121
+ governance:
122
+ version: "1.0"
123
+ product:
124
+ name: "project-name"
125
+ type: "library"
126
+ `,
127
+ },
128
+ ];
129
+ let DocsCommand = class DocsCommand extends base_command_1.BaseEvolithCommand {
130
+ constructor() {
131
+ super('DocsCommand');
132
+ }
133
+ async executeCommand(passedParam, options) {
134
+ const dryRun = options?.dryRun || false;
135
+ const force = options?.force || false;
136
+ const json = options?.format === 'json';
137
+ const commandId = 'evolith docs scaffold';
138
+ const startedAt = Date.now();
139
+ const meta = {
140
+ command: commandId,
141
+ executedAt: new Date().toISOString(),
142
+ durationMs: 0,
143
+ correlationId: (0, node_crypto_1.randomUUID)(),
144
+ schemaVersion: gate_evidence_1.OUTPUT_ENVELOPE_SCHEMA_VERSION,
145
+ };
146
+ const targetDir = process.cwd();
147
+ const templates = this.getTemplates(options?.template);
148
+ const filesToCreate = [];
149
+ const filesToUpdate = [];
150
+ const filesSkipped = [];
151
+ for (const template of templates) {
152
+ const filePath = path.join(targetDir, template.filename);
153
+ const exists = await fs.pathExists(filePath);
154
+ if (exists && !force) {
155
+ filesSkipped.push(template);
156
+ }
157
+ else if (exists && force) {
158
+ filesToUpdate.push(template);
159
+ }
160
+ else {
161
+ filesToCreate.push(template);
162
+ }
163
+ }
164
+ if (filesToCreate.length === 0 && filesToUpdate.length === 0) {
165
+ if (json) {
166
+ console.log(JSON.stringify((0, gate_evidence_1.createSuccessEnvelope)({
167
+ created: 0,
168
+ updated: 0,
169
+ skipped: filesSkipped.length,
170
+ files: filesSkipped.map(t => t.filename),
171
+ }, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
172
+ return;
173
+ }
174
+ this.promptService.showInfo('All documentation files already exist. Use --force to overwrite.');
175
+ this.promptService.showOutro(chalk_1.default.yellow('No changes made.'));
176
+ return;
177
+ }
178
+ if (json) {
179
+ let created = 0;
180
+ let updated = 0;
181
+ for (const template of filesToCreate) {
182
+ const filePath = path.join(targetDir, template.filename);
183
+ await fs.ensureDir(path.dirname(filePath));
184
+ await fs.writeFile(filePath, template.content, 'utf-8');
185
+ created++;
186
+ }
187
+ for (const template of filesToUpdate) {
188
+ const filePath = path.join(targetDir, template.filename);
189
+ await fs.writeFile(filePath, template.content, 'utf-8');
190
+ updated++;
191
+ }
192
+ console.log(JSON.stringify((0, gate_evidence_1.createSuccessEnvelope)({
193
+ created,
194
+ updated,
195
+ skipped: filesSkipped.length,
196
+ files: [...filesToCreate, ...filesToUpdate].map(t => t.filename),
197
+ }, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
198
+ return;
199
+ }
200
+ this.promptService.showIntro('Evolith SDK - Document Scaffold');
201
+ this.promptService.showInfo(`Files to create: ${filesToCreate.length}`);
202
+ this.promptService.showInfo(`Files to update: ${filesToUpdate.length}`);
203
+ this.promptService.showInfo(`Files skipped: ${filesSkipped.length}`);
204
+ if (dryRun) {
205
+ this.promptService.showInfo(chalk_1.default.cyan('[DRY RUN] No files will be written.'));
206
+ for (const t of [...filesToCreate, ...filesToUpdate]) {
207
+ this.promptService.showInfo(` ${chalk_1.default.green('+')} ${t.filename} - ${t.description}`);
208
+ }
209
+ this.promptService.showOutro(chalk_1.default.green('Dry run completed.'));
210
+ return;
211
+ }
212
+ let created = 0;
213
+ let updated = 0;
214
+ for (const template of filesToCreate) {
215
+ const filePath = path.join(targetDir, template.filename);
216
+ await fs.ensureDir(path.dirname(filePath));
217
+ await fs.writeFile(filePath, template.content, 'utf-8');
218
+ this.promptService.showSuccess(`Created: ${template.filename}`);
219
+ created++;
220
+ }
221
+ for (const template of filesToUpdate) {
222
+ const filePath = path.join(targetDir, template.filename);
223
+ await fs.writeFile(filePath, template.content, 'utf-8');
224
+ this.promptService.showSuccess(`Updated: ${template.filename}`);
225
+ updated++;
226
+ }
227
+ this.promptService.showOutro(chalk_1.default.green(`Documentation scaffolded: ${created} created, ${updated} updated.`));
228
+ }
229
+ getTemplates(templateName) {
230
+ if (templateName === 'minimal') {
231
+ return DEFAULT_TEMPLATES.filter(t => ['README.md', 'AGENTS.md'].includes(t.filename));
232
+ }
233
+ return DEFAULT_TEMPLATES;
234
+ }
235
+ parseDryRun() {
236
+ return true;
237
+ }
238
+ parseForce() {
239
+ return true;
240
+ }
241
+ parseTemplate(val) {
242
+ return val;
243
+ }
244
+ parseFormat(val) {
245
+ return val;
246
+ }
247
+ };
248
+ exports.DocsCommand = DocsCommand;
249
+ __decorate([
250
+ (0, nest_commander_1.Option)({
251
+ flags: '-d, --dry-run',
252
+ description: 'Run in dry-run mode without writing files',
253
+ }),
254
+ __metadata("design:type", Function),
255
+ __metadata("design:paramtypes", []),
256
+ __metadata("design:returntype", Boolean)
257
+ ], DocsCommand.prototype, "parseDryRun", null);
258
+ __decorate([
259
+ (0, nest_commander_1.Option)({
260
+ flags: '-f, --force',
261
+ description: 'Overwrite existing files',
262
+ }),
263
+ __metadata("design:type", Function),
264
+ __metadata("design:paramtypes", []),
265
+ __metadata("design:returntype", Boolean)
266
+ ], DocsCommand.prototype, "parseForce", null);
267
+ __decorate([
268
+ (0, nest_commander_1.Option)({
269
+ flags: '-t, --template <type>',
270
+ description: 'Template type to use (default, minimal)',
271
+ }),
272
+ __metadata("design:type", Function),
273
+ __metadata("design:paramtypes", [String]),
274
+ __metadata("design:returntype", String)
275
+ ], DocsCommand.prototype, "parseTemplate", null);
276
+ __decorate([
277
+ (0, nest_commander_1.Option)({
278
+ flags: '-f, --format [string]',
279
+ description: 'Output format: json (ADR-0073 envelope) or human (default)',
280
+ }),
281
+ __metadata("design:type", Function),
282
+ __metadata("design:paramtypes", [String]),
283
+ __metadata("design:returntype", String)
284
+ ], DocsCommand.prototype, "parseFormat", null);
285
+ exports.DocsCommand = DocsCommand = __decorate([
286
+ (0, nest_commander_1.Command)({
287
+ name: 'docs',
288
+ description: 'Scaffolds base documentation required by Evolith',
289
+ }),
290
+ __metadata("design:paramtypes", [])
291
+ ], DocsCommand);
292
+ //# sourceMappingURL=docs.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs.command.js","sourceRoot":"","sources":["../../../src/commands/docs/docs.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAiD;AACjD,6CAAyC;AACzC,6CAA+B;AAC/B,2CAA6B;AAC7B,kDAA0B;AAC1B,6EAAkH;AAClH,wEAA2E;AAe3E,MAAM,iBAAiB,GAAkB;IACvC;QACE,QAAQ,EAAE,WAAW;QACrB,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE;;;;;;;;;;;;;;;;;CAiBZ;KACE;IACD;QACE,QAAQ,EAAE,WAAW;QACrB,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE;;;;;;;;;;;;;;CAcZ;KACE;IACD;QACE,QAAQ,EAAE,iBAAiB;QAC3B,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE;;;;;;;;;;;;CAYZ;KACE;IACD;QACE,QAAQ,EAAE,uBAAuB;QACjC,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE;;;;;;;;CAQZ;KACE;CACF,CAAC;AAMK,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,iCAAkB;IACjD;QACE,KAAK,CAAC,aAAa,CAAC,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,WAAqB,EAAE,OAA4B;QACtE,MAAM,MAAM,GAAG,OAAO,EAAE,MAAM,IAAI,KAAK,CAAC;QACxC,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,KAAK,CAAC;QACtC,MAAM,IAAI,GAAG,OAAO,EAAE,MAAM,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