@agents-at-scale/ark 0.1.35-rc2 → 0.1.35

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 (215) hide show
  1. package/dist/commands/cluster/index.d.ts +1 -2
  2. package/dist/commands/cluster/index.js +5 -3
  3. package/dist/commands/completion.js +2 -159
  4. package/dist/commands/config.d.ts +3 -0
  5. package/dist/commands/config.js +321 -38
  6. package/dist/commands/generate/config.js +24 -5
  7. package/dist/commands/generate/generators/agent.js +2 -2
  8. package/dist/commands/generate/generators/mcpserver.d.ts +1 -2
  9. package/dist/commands/generate/generators/mcpserver.js +5 -26
  10. package/dist/commands/generate/generators/project.js +41 -22
  11. package/dist/commands/generate/generators/team.js +2 -2
  12. package/dist/commands/generate/index.d.ts +1 -2
  13. package/dist/commands/generate/index.js +1 -1
  14. package/dist/components/statusChecker.d.ts +23 -13
  15. package/dist/components/statusChecker.js +129 -295
  16. package/dist/config.d.ts +22 -3
  17. package/dist/config.js +161 -10
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +42 -44
  20. package/dist/lib/cluster.d.ts +1 -2
  21. package/dist/lib/cluster.js +16 -37
  22. package/dist/lib/config.d.ts +80 -28
  23. package/dist/lib/config.js +205 -70
  24. package/dist/lib/consts.d.ts +1 -0
  25. package/dist/lib/consts.js +2 -0
  26. package/dist/lib/errors.js +1 -1
  27. package/dist/lib/exec.d.ts +4 -0
  28. package/dist/lib/exec.js +11 -0
  29. package/dist/lib/types.d.ts +3 -17
  30. package/dist/ui/MainMenu.d.ts +1 -5
  31. package/dist/ui/MainMenu.js +91 -222
  32. package/dist/ui/statusFormatter.d.ts +7 -22
  33. package/dist/ui/statusFormatter.js +39 -39
  34. package/package.json +5 -17
  35. package/dist/arkServices.d.ts +0 -42
  36. package/dist/arkServices.js +0 -138
  37. package/dist/arkServices.spec.d.ts +0 -1
  38. package/dist/arkServices.spec.js +0 -24
  39. package/dist/charts/charts.d.ts +0 -5
  40. package/dist/charts/charts.js +0 -6
  41. package/dist/charts/dependencies.d.ts +0 -6
  42. package/dist/charts/dependencies.js +0 -50
  43. package/dist/charts/types.d.ts +0 -40
  44. package/dist/charts/types.js +0 -1
  45. package/dist/commands/agents/index.d.ts +0 -3
  46. package/dist/commands/agents/index.js +0 -51
  47. package/dist/commands/agents/index.spec.d.ts +0 -1
  48. package/dist/commands/agents/index.spec.js +0 -67
  49. package/dist/commands/agents/selector.d.ts +0 -8
  50. package/dist/commands/agents/selector.js +0 -53
  51. package/dist/commands/agents.d.ts +0 -2
  52. package/dist/commands/agents.js +0 -53
  53. package/dist/commands/chat/index.d.ts +0 -3
  54. package/dist/commands/chat/index.js +0 -29
  55. package/dist/commands/chat.d.ts +0 -2
  56. package/dist/commands/chat.js +0 -45
  57. package/dist/commands/cluster/get.d.ts +0 -2
  58. package/dist/commands/cluster/get.js +0 -39
  59. package/dist/commands/cluster/get.spec.d.ts +0 -1
  60. package/dist/commands/cluster/get.spec.js +0 -92
  61. package/dist/commands/cluster/index.spec.d.ts +0 -1
  62. package/dist/commands/cluster/index.spec.js +0 -24
  63. package/dist/commands/completion/index.d.ts +0 -3
  64. package/dist/commands/completion/index.js +0 -290
  65. package/dist/commands/completion/index.spec.d.ts +0 -1
  66. package/dist/commands/completion/index.spec.js +0 -34
  67. package/dist/commands/config/index.d.ts +0 -3
  68. package/dist/commands/config/index.js +0 -42
  69. package/dist/commands/config/index.spec.d.ts +0 -1
  70. package/dist/commands/config/index.spec.js +0 -78
  71. package/dist/commands/dashboard/index.d.ts +0 -4
  72. package/dist/commands/dashboard/index.js +0 -39
  73. package/dist/commands/dashboard.d.ts +0 -3
  74. package/dist/commands/dashboard.js +0 -39
  75. package/dist/commands/dev/index.d.ts +0 -3
  76. package/dist/commands/dev/index.js +0 -9
  77. package/dist/commands/dev/tool/check.d.ts +0 -2
  78. package/dist/commands/dev/tool/check.js +0 -142
  79. package/dist/commands/dev/tool/clean.d.ts +0 -2
  80. package/dist/commands/dev/tool/clean.js +0 -153
  81. package/dist/commands/dev/tool/generate.d.ts +0 -2
  82. package/dist/commands/dev/tool/generate.js +0 -28
  83. package/dist/commands/dev/tool/index.d.ts +0 -2
  84. package/dist/commands/dev/tool/index.js +0 -14
  85. package/dist/commands/dev/tool/init.d.ts +0 -2
  86. package/dist/commands/dev/tool/init.js +0 -320
  87. package/dist/commands/dev/tool/shared.d.ts +0 -5
  88. package/dist/commands/dev/tool/shared.js +0 -256
  89. package/dist/commands/dev/tool/status.d.ts +0 -2
  90. package/dist/commands/dev/tool/status.js +0 -136
  91. package/dist/commands/dev/tool-generate.spec.d.ts +0 -1
  92. package/dist/commands/dev/tool-generate.spec.js +0 -163
  93. package/dist/commands/dev/tool.d.ts +0 -2
  94. package/dist/commands/dev/tool.js +0 -559
  95. package/dist/commands/dev/tool.spec.d.ts +0 -1
  96. package/dist/commands/dev/tool.spec.js +0 -48
  97. package/dist/commands/docs/index.d.ts +0 -4
  98. package/dist/commands/docs/index.js +0 -18
  99. package/dist/commands/install/index.d.ts +0 -8
  100. package/dist/commands/install/index.js +0 -300
  101. package/dist/commands/install/index.spec.d.ts +0 -1
  102. package/dist/commands/install/index.spec.js +0 -143
  103. package/dist/commands/install.d.ts +0 -3
  104. package/dist/commands/install.js +0 -147
  105. package/dist/commands/models/create.d.ts +0 -1
  106. package/dist/commands/models/create.js +0 -213
  107. package/dist/commands/models/create.spec.d.ts +0 -1
  108. package/dist/commands/models/create.spec.js +0 -125
  109. package/dist/commands/models/index.d.ts +0 -3
  110. package/dist/commands/models/index.js +0 -60
  111. package/dist/commands/models/index.spec.d.ts +0 -1
  112. package/dist/commands/models/index.spec.js +0 -76
  113. package/dist/commands/models/selector.d.ts +0 -8
  114. package/dist/commands/models/selector.js +0 -53
  115. package/dist/commands/query/index.d.ts +0 -3
  116. package/dist/commands/query/index.js +0 -131
  117. package/dist/commands/routes/index.d.ts +0 -3
  118. package/dist/commands/routes/index.js +0 -93
  119. package/dist/commands/routes.d.ts +0 -2
  120. package/dist/commands/routes.js +0 -101
  121. package/dist/commands/status/index.d.ts +0 -4
  122. package/dist/commands/status/index.js +0 -262
  123. package/dist/commands/status.d.ts +0 -3
  124. package/dist/commands/status.js +0 -33
  125. package/dist/commands/targets/index.d.ts +0 -3
  126. package/dist/commands/targets/index.js +0 -65
  127. package/dist/commands/targets/index.spec.d.ts +0 -1
  128. package/dist/commands/targets/index.spec.js +0 -105
  129. package/dist/commands/targets.d.ts +0 -2
  130. package/dist/commands/targets.js +0 -65
  131. package/dist/commands/teams/index.d.ts +0 -3
  132. package/dist/commands/teams/index.js +0 -49
  133. package/dist/commands/teams/index.spec.d.ts +0 -1
  134. package/dist/commands/teams/index.spec.js +0 -70
  135. package/dist/commands/teams/selector.d.ts +0 -8
  136. package/dist/commands/teams/selector.js +0 -55
  137. package/dist/commands/tools/index.d.ts +0 -3
  138. package/dist/commands/tools/index.js +0 -49
  139. package/dist/commands/tools/index.spec.d.ts +0 -1
  140. package/dist/commands/tools/index.spec.js +0 -70
  141. package/dist/commands/tools/selector.d.ts +0 -8
  142. package/dist/commands/tools/selector.js +0 -53
  143. package/dist/commands/uninstall/index.d.ts +0 -3
  144. package/dist/commands/uninstall/index.js +0 -106
  145. package/dist/commands/uninstall/index.spec.d.ts +0 -1
  146. package/dist/commands/uninstall/index.spec.js +0 -125
  147. package/dist/commands/uninstall.d.ts +0 -2
  148. package/dist/commands/uninstall.js +0 -83
  149. package/dist/components/ChatUI.d.ts +0 -16
  150. package/dist/components/ChatUI.js +0 -801
  151. package/dist/components/StatusView.d.ts +0 -10
  152. package/dist/components/StatusView.js +0 -39
  153. package/dist/lib/arkApiClient.d.ts +0 -53
  154. package/dist/lib/arkApiClient.js +0 -102
  155. package/dist/lib/arkApiProxy.d.ts +0 -9
  156. package/dist/lib/arkApiProxy.js +0 -22
  157. package/dist/lib/arkServiceProxy.d.ts +0 -14
  158. package/dist/lib/arkServiceProxy.js +0 -95
  159. package/dist/lib/arkStatus.d.ts +0 -10
  160. package/dist/lib/arkStatus.js +0 -79
  161. package/dist/lib/arkStatus.spec.d.ts +0 -1
  162. package/dist/lib/arkStatus.spec.js +0 -49
  163. package/dist/lib/chatClient.d.ts +0 -33
  164. package/dist/lib/chatClient.js +0 -99
  165. package/dist/lib/cluster.spec.d.ts +0 -1
  166. package/dist/lib/cluster.spec.js +0 -338
  167. package/dist/lib/commandUtils.d.ts +0 -4
  168. package/dist/lib/commandUtils.js +0 -18
  169. package/dist/lib/commandUtils.test.d.ts +0 -1
  170. package/dist/lib/commandUtils.test.js +0 -44
  171. package/dist/lib/commands.d.ts +0 -16
  172. package/dist/lib/commands.js +0 -29
  173. package/dist/lib/commands.spec.d.ts +0 -1
  174. package/dist/lib/commands.spec.js +0 -146
  175. package/dist/lib/config.spec.d.ts +0 -1
  176. package/dist/lib/config.spec.js +0 -99
  177. package/dist/lib/config.test.d.ts +0 -1
  178. package/dist/lib/config.test.js +0 -93
  179. package/dist/lib/consts.spec.d.ts +0 -1
  180. package/dist/lib/consts.spec.js +0 -15
  181. package/dist/lib/dev/tools/analyzer.d.ts +0 -30
  182. package/dist/lib/dev/tools/analyzer.js +0 -190
  183. package/dist/lib/dev/tools/discover_tools.py +0 -392
  184. package/dist/lib/dev/tools/mcp-types.d.ts +0 -28
  185. package/dist/lib/dev/tools/mcp-types.js +0 -86
  186. package/dist/lib/dev/tools/types.d.ts +0 -50
  187. package/dist/lib/dev/tools/types.js +0 -1
  188. package/dist/lib/errors.spec.d.ts +0 -1
  189. package/dist/lib/errors.spec.js +0 -221
  190. package/dist/lib/nextSteps.d.ts +0 -4
  191. package/dist/lib/nextSteps.js +0 -20
  192. package/dist/lib/nextSteps.spec.d.ts +0 -1
  193. package/dist/lib/nextSteps.spec.js +0 -59
  194. package/dist/lib/output.d.ts +0 -36
  195. package/dist/lib/output.js +0 -89
  196. package/dist/lib/output.spec.d.ts +0 -1
  197. package/dist/lib/output.spec.js +0 -123
  198. package/dist/lib/portUtils.d.ts +0 -8
  199. package/dist/lib/portUtils.js +0 -39
  200. package/dist/lib/startup.d.ts +0 -9
  201. package/dist/lib/startup.js +0 -93
  202. package/dist/lib/startup.spec.d.ts +0 -1
  203. package/dist/lib/startup.spec.js +0 -168
  204. package/dist/types/types.d.ts +0 -40
  205. package/dist/types/types.js +0 -1
  206. package/dist/ui/AgentSelector.d.ts +0 -8
  207. package/dist/ui/AgentSelector.js +0 -53
  208. package/dist/ui/ModelSelector.d.ts +0 -8
  209. package/dist/ui/ModelSelector.js +0 -53
  210. package/dist/ui/TeamSelector.d.ts +0 -8
  211. package/dist/ui/TeamSelector.js +0 -55
  212. package/dist/ui/ToolSelector.d.ts +0 -8
  213. package/dist/ui/ToolSelector.js +0 -53
  214. package/dist/ui/statusFormatter.spec.d.ts +0 -1
  215. package/dist/ui/statusFormatter.spec.js +0 -58
@@ -1,9 +0,0 @@
1
- import { Command } from 'commander';
2
- import { createToolCommand } from './tool/index.js';
3
- export function createDevCommand(_) {
4
- const devCommand = new Command('dev');
5
- devCommand.description('Development tools for ARK');
6
- // Add subcommands
7
- devCommand.addCommand(createToolCommand());
8
- return devCommand;
9
- }
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function createCheckCommand(): Command;
@@ -1,142 +0,0 @@
1
- import { Command } from 'commander';
2
- import chalk from 'chalk';
3
- import path from 'path';
4
- import ora from 'ora';
5
- import output from '../../../lib/output.js';
6
- import { ArkDevToolAnalyzer } from '../../../lib/dev/tools/analyzer.js';
7
- import { toMCPTool } from '../../../lib/dev/tools/mcp-types.js';
8
- async function checkTool(toolPath, options) {
9
- const absolutePath = path.resolve(toolPath);
10
- const analyzer = new ArkDevToolAnalyzer();
11
- const isJson = options.output === 'json';
12
- // Build up result object as we go
13
- const result = {
14
- path: absolutePath,
15
- projectRoot: null,
16
- error: null,
17
- platform: null,
18
- projectType: null,
19
- projectName: null,
20
- projectVersion: null,
21
- hasFastmcp: false,
22
- fastmcpVersion: null,
23
- tools: [],
24
- toolDiscoveryError: null,
25
- };
26
- if (!isJson) {
27
- console.log();
28
- }
29
- // Single spinner for all analysis (skip for JSON output)
30
- const analyzeSpinner = isJson
31
- ? null
32
- : ora(`analyzing ${absolutePath}`).start();
33
- // Small delay to let user see what's happening (skip for JSON)
34
- if (!isJson) {
35
- await new Promise((resolve) => setTimeout(resolve, 500));
36
- }
37
- // Collect all information
38
- const project = await analyzer.discoverProject(absolutePath);
39
- if (!project || !project.exists) {
40
- result.error = 'path not found';
41
- if (isJson) {
42
- console.log(JSON.stringify(result, null, 2));
43
- }
44
- else {
45
- analyzeSpinner.stop();
46
- output.error(`path not found: ${absolutePath}`);
47
- }
48
- process.exit(1);
49
- }
50
- if (!project.is_directory) {
51
- result.error = 'path is not a directory';
52
- if (isJson) {
53
- console.log(JSON.stringify(result, null, 2));
54
- }
55
- else {
56
- analyzeSpinner.stop();
57
- output.error(`path is not a directory: ${absolutePath}`);
58
- }
59
- process.exit(1);
60
- }
61
- if (!project.platform) {
62
- result.error =
63
- 'platform unknown - no pyproject.toml or requirements.txt found';
64
- if (isJson) {
65
- console.log(JSON.stringify(result, null, 2));
66
- }
67
- else {
68
- analyzeSpinner.stop();
69
- output.error(`no pyproject.toml or requirements.txt found in: ${absolutePath}`);
70
- }
71
- process.exit(1);
72
- }
73
- // Update result with project info
74
- result.platform = project.platform;
75
- result.projectType = project.project_type;
76
- result.projectName = project.project_name;
77
- result.projectVersion = project.project_version;
78
- result.hasFastmcp = project.has_fastmcp;
79
- result.fastmcpVersion = project.fastmcp_version;
80
- result.projectRoot = absolutePath; // Store the project root
81
- // Discover tools recursively in the project
82
- const rawTools = [];
83
- try {
84
- const projectTools = await analyzer.findProjectTools(absolutePath);
85
- if (projectTools && projectTools.tools) {
86
- rawTools.push(...projectTools.tools);
87
- }
88
- }
89
- catch (error) {
90
- result.toolDiscoveryError =
91
- error instanceof Error ? error.message : 'Unknown error';
92
- }
93
- // Store tools in the appropriate format
94
- result.tools = isJson ? rawTools.map(toMCPTool) : rawTools;
95
- if (isJson) {
96
- // Output raw JSON
97
- console.log(JSON.stringify(result, null, 2));
98
- return;
99
- }
100
- analyzeSpinner.succeed('analysis complete');
101
- console.log();
102
- // Display summary in cleaner format
103
- output.section(path.basename(absolutePath));
104
- // Platform
105
- output.statusCheck('found', 'platform', result.platform);
106
- // Project type with name and version in gray
107
- let projectDetails = '';
108
- if (result.projectName) {
109
- projectDetails = result.projectName;
110
- if (result.projectVersion) {
111
- projectDetails += ` v${result.projectVersion}`;
112
- }
113
- }
114
- output.statusCheck('found', 'project', result.projectType, projectDetails);
115
- // Framework with version in gray
116
- if (result.hasFastmcp) {
117
- const fastmcpDetails = result.fastmcpVersion
118
- ? `v${result.fastmcpVersion}`
119
- : undefined;
120
- output.statusCheck('found', 'framework', 'fastmcp', fastmcpDetails);
121
- }
122
- else {
123
- output.statusCheck('missing', 'framework', 'fastmcp');
124
- }
125
- // Tools with details
126
- output.statusCheck('found', 'tools', result.tools.length.toString());
127
- if (result.tools.length > 0) {
128
- for (const tool of result.tools) {
129
- const description = tool.docstring ? tool.docstring.split('\n')[0] : '';
130
- console.log(chalk.gray(` - ${tool.name}: ${description}`));
131
- }
132
- }
133
- }
134
- export function createCheckCommand() {
135
- const checkCommand = new Command('check');
136
- checkCommand
137
- .description('Check the status of an MCP tool project')
138
- .argument('<path>', 'Path to the tool directory')
139
- .option('-o, --output <format>', 'Output format (json)', 'text')
140
- .action(checkTool);
141
- return checkCommand;
142
- }
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function createCleanCommand(): Command;
@@ -1,153 +0,0 @@
1
- import { Command } from 'commander';
2
- import chalk from 'chalk';
3
- import path from 'path';
4
- import { fileURLToPath } from 'url';
5
- import fs from 'fs';
6
- import yaml from 'yaml';
7
- import inquirer from 'inquirer';
8
- import output from '../../../lib/output.js';
9
- async function cleanTool(toolPath, options = {}) {
10
- const absolutePath = path.resolve(toolPath);
11
- const arkConfigPath = path.join(absolutePath, '.ark.yaml');
12
- // Check if .ark.yaml exists
13
- if (!fs.existsSync(arkConfigPath)) {
14
- output.error('.ark.yaml not found. Run "ark dev tool init" first.');
15
- process.exit(1);
16
- }
17
- // Load .ark.yaml to validate it's parseable
18
- yaml.parse(fs.readFileSync(arkConfigPath, 'utf-8'));
19
- // Find template directory
20
- const currentFile = fileURLToPath(import.meta.url);
21
- const distDir = path.dirname(path.dirname(path.dirname(path.dirname(currentFile)))); // Goes to dist/
22
- const arkCliDir = path.dirname(distDir); // Goes to ark-cli/
23
- const templateDir = path.join(arkCliDir, 'templates', 'python-mcp-tool');
24
- if (!fs.existsSync(templateDir)) {
25
- output.error('Template directory not found');
26
- process.exit(1);
27
- }
28
- // Collect all template-based files (not directories)
29
- const allTemplateFiles = [];
30
- const dirsToCheck = new Set();
31
- collectTemplateFiles(templateDir, absolutePath, allTemplateFiles, dirsToCheck);
32
- // Filter to only existing files
33
- const filesToClean = allTemplateFiles.filter((file) => {
34
- const fullPath = path.join(absolutePath, file);
35
- return fs.existsSync(fullPath);
36
- });
37
- if (filesToClean.length === 0) {
38
- console.log(chalk.green('No template-generated files found to clean.'));
39
- return;
40
- }
41
- console.log(chalk.yellow(`Found ${filesToClean.length} template-generated file(s) to potentially remove:`));
42
- // Display the list of files
43
- filesToClean.forEach((file) => {
44
- console.log(chalk.gray(` - ${file}`));
45
- });
46
- console.log();
47
- let removedCount = 0;
48
- let skippedCount = 0;
49
- // First, delete individual files
50
- for (const file of filesToClean) {
51
- const fullPath = path.join(absolutePath, file);
52
- // Ask for confirmation unless --yes flag is set
53
- let shouldDelete = options.yes;
54
- if (!shouldDelete) {
55
- const answer = await inquirer.prompt([
56
- {
57
- type: 'confirm',
58
- name: 'delete',
59
- message: `Delete file ${chalk.cyan(file)}?`,
60
- default: false,
61
- },
62
- ]);
63
- shouldDelete = answer.delete;
64
- }
65
- if (shouldDelete) {
66
- try {
67
- fs.unlinkSync(fullPath);
68
- console.log(chalk.green(` ✓ Removed ${file}`));
69
- removedCount++;
70
- }
71
- catch (err) {
72
- console.log(chalk.red(` ✗ Failed to remove ${file}: ${err instanceof Error ? err.message : 'Unknown error'}`));
73
- }
74
- }
75
- else {
76
- console.log(chalk.gray(` - Skipped ${file}`));
77
- skippedCount++;
78
- }
79
- }
80
- // Now check for empty directories and offer to delete them
81
- const sortedDirs = Array.from(dirsToCheck).sort((a, b) => b.length - a.length); // Process deepest dirs first
82
- for (const dir of sortedDirs) {
83
- const fullPath = path.join(absolutePath, dir);
84
- // Check if directory exists and is empty
85
- if (fs.existsSync(fullPath) && fs.statSync(fullPath).isDirectory()) {
86
- const contents = fs.readdirSync(fullPath);
87
- if (contents.length === 0) {
88
- // Directory is empty, ask to delete it
89
- let shouldDelete = options.yes;
90
- if (!shouldDelete) {
91
- const answer = await inquirer.prompt([
92
- {
93
- type: 'confirm',
94
- name: 'delete',
95
- message: `Delete empty directory ${chalk.cyan(dir)}?`,
96
- default: false,
97
- },
98
- ]);
99
- shouldDelete = answer.delete;
100
- }
101
- if (shouldDelete) {
102
- try {
103
- fs.rmdirSync(fullPath);
104
- console.log(chalk.green(` ✓ Removed empty directory ${dir}`));
105
- }
106
- catch (err) {
107
- console.log(chalk.red(` ✗ Failed to remove directory ${dir}: ${err instanceof Error ? err.message : 'Unknown error'}`));
108
- }
109
- }
110
- else {
111
- console.log(chalk.gray(` - Kept empty directory ${dir}`));
112
- }
113
- }
114
- }
115
- }
116
- console.log();
117
- if (removedCount > 0) {
118
- console.log(chalk.green(`✓ Removed ${removedCount} file(s)`));
119
- }
120
- if (skippedCount > 0) {
121
- console.log(chalk.gray(`Skipped ${skippedCount} file(s)`));
122
- }
123
- }
124
- function collectTemplateFiles(sourceDir, targetDir, files, dirsToCheck, relativePath = '') {
125
- const entries = fs.readdirSync(sourceDir, { withFileTypes: true });
126
- for (const entry of entries) {
127
- if (entry.isDirectory()) {
128
- // Track directory for later checking
129
- const dirPath = path.join(relativePath, entry.name);
130
- dirsToCheck.add(dirPath);
131
- // Recursively collect from subdirectory
132
- const subSourceDir = path.join(sourceDir, entry.name);
133
- collectTemplateFiles(subSourceDir, targetDir, files, dirsToCheck, dirPath);
134
- }
135
- else {
136
- // Check if it's a template file
137
- const targetFileName = entry.name.startsWith('template.')
138
- ? entry.name.replace('template.', '')
139
- : entry.name;
140
- const filePath = path.join(relativePath, targetFileName);
141
- files.push(filePath);
142
- }
143
- }
144
- }
145
- export function createCleanCommand() {
146
- const cleanCommand = new Command('clean');
147
- cleanCommand
148
- .description('Remove template-generated files from an MCP tool project')
149
- .argument('<path>', 'Path to the tool directory')
150
- .option('-y, --yes', 'Skip confirmation prompts and delete all files')
151
- .action(cleanTool);
152
- return cleanCommand;
153
- }
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function createGenerateCommand(): Command;
@@ -1,28 +0,0 @@
1
- import { Command } from 'commander';
2
- import chalk from 'chalk';
3
- import path from 'path';
4
- import { generateProjectFiles } from './shared.js';
5
- async function generateTool(toolPath, options = {}) {
6
- const absolutePath = path.resolve(toolPath);
7
- if (!options.dryRun) {
8
- if (options.overwrite) {
9
- console.log(chalk.yellow('Overwrite mode: existing files will be replaced'));
10
- }
11
- }
12
- await generateProjectFiles(absolutePath, {
13
- interactive: !options.dryRun,
14
- dryRun: options.dryRun,
15
- overwrite: options.overwrite,
16
- });
17
- // Next steps message removed - files are ready to use
18
- }
19
- export function createGenerateCommand() {
20
- const generateCommand = new Command('generate');
21
- generateCommand
22
- .description('Generate project files (Dockerfile, .dockerignore, etc.) from templates')
23
- .argument('<path>', 'Path to the tool directory')
24
- .option('--dry-run', 'Show generated template files without creating them')
25
- .option('--overwrite', 'Overwrite existing files')
26
- .action(generateTool);
27
- return generateCommand;
28
- }
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function createToolCommand(): Command;
@@ -1,14 +0,0 @@
1
- import { Command } from 'commander';
2
- import { createCheckCommand } from './check.js';
3
- import { createInitCommand } from './init.js';
4
- import { createGenerateCommand } from './generate.js';
5
- import { createCleanCommand } from './clean.js';
6
- export function createToolCommand() {
7
- const toolCommand = new Command('tool');
8
- toolCommand.description('MCP tool development utilities');
9
- toolCommand.addCommand(createCheckCommand());
10
- toolCommand.addCommand(createInitCommand());
11
- toolCommand.addCommand(createGenerateCommand());
12
- toolCommand.addCommand(createCleanCommand());
13
- return toolCommand;
14
- }
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare function createInitCommand(): Command;