@agiflowai/scaffold-mcp 1.0.16 → 1.0.18
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/{ListScaffoldingMethodsTool-dP6UGYi-.cjs → ListScaffoldingMethodsTool-BVzCtkpA.cjs} +17 -5
- package/dist/{ListScaffoldingMethodsTool-RfVCiYIl.mjs → ListScaffoldingMethodsTool-T_o0iifQ.mjs} +17 -5
- package/dist/cli.cjs +5 -5
- package/dist/cli.mjs +5 -5
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +10 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.mjs +2 -2
- package/dist/{stdio-CMrGIHf9.cjs → stdio-DkLk-WCI.cjs} +17 -9
- package/dist/{stdio-C0MGNdE2.mjs → stdio-t-O7AO9u.mjs} +17 -9
- package/dist/{useScaffoldMethod-D_Bu4nj2.mjs → useScaffoldMethod-B6VxGENG.mjs} +1 -1
- package/dist/{useScaffoldMethod-CYcSFnmq.cjs → useScaffoldMethod-DhOHJdF-.cjs} +1 -1
- package/dist/{useScaffoldMethod-CazDraH-.cjs → useScaffoldMethod-DzC43Rye.cjs} +1 -1
- package/dist/{useScaffoldMethod-D5xkoGJE.mjs → useScaffoldMethod-U7nkNKZb.mjs} +1 -1
- package/package.json +6 -6
package/dist/{ListScaffoldingMethodsTool-dP6UGYi-.cjs → ListScaffoldingMethodsTool-BVzCtkpA.cjs}
RENAMED
|
@@ -759,7 +759,11 @@ var ScaffoldingMethodsService = class {
|
|
|
759
759
|
const sourceTemplate = (await __agiflowai_aicode_utils.ProjectConfigResolver.resolveProjectConfig(absoluteProjectPath)).sourceTemplate;
|
|
760
760
|
return this.listScaffoldingMethodsByTemplate(sourceTemplate, cursor);
|
|
761
761
|
}
|
|
762
|
-
|
|
762
|
+
/**
|
|
763
|
+
* Collects all scaffold methods for a template (no pagination)
|
|
764
|
+
* Used internally for lookups that need to search all methods
|
|
765
|
+
*/
|
|
766
|
+
async collectAllMethodsByTemplate(templateName) {
|
|
763
767
|
const templatePath = await this.findTemplatePath(templateName);
|
|
764
768
|
if (!templatePath) throw new Error(`Template not found for sourceTemplate: ${templateName}`);
|
|
765
769
|
const fullTemplatePath = node_path.default.join(this.templatesRootPath, templatePath);
|
|
@@ -783,6 +787,13 @@ var ScaffoldingMethodsService = class {
|
|
|
783
787
|
generator: feature.generator
|
|
784
788
|
});
|
|
785
789
|
});
|
|
790
|
+
return {
|
|
791
|
+
templatePath,
|
|
792
|
+
methods
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
async listScaffoldingMethodsByTemplate(templateName, cursor) {
|
|
796
|
+
const { templatePath, methods } = await this.collectAllMethodsByTemplate(templateName);
|
|
786
797
|
const paginatedResult = PaginationHelper.paginate(methods, cursor);
|
|
787
798
|
return {
|
|
788
799
|
sourceTemplate: templateName,
|
|
@@ -913,10 +924,11 @@ var ScaffoldingMethodsService = class {
|
|
|
913
924
|
async useScaffoldMethod(request) {
|
|
914
925
|
const { projectPath, scaffold_feature_name, variables, sessionId } = request;
|
|
915
926
|
const absoluteProjectPath = await this.resolveProjectPath(projectPath);
|
|
916
|
-
const
|
|
917
|
-
const
|
|
927
|
+
const sourceTemplate = (await __agiflowai_aicode_utils.ProjectConfigResolver.resolveProjectConfig(absoluteProjectPath)).sourceTemplate;
|
|
928
|
+
const { templatePath, methods: allMethods } = await this.collectAllMethodsByTemplate(sourceTemplate);
|
|
929
|
+
const method = allMethods.find((m) => m.name === scaffold_feature_name);
|
|
918
930
|
if (!method) {
|
|
919
|
-
const availableMethods =
|
|
931
|
+
const availableMethods = allMethods.map((m) => m.name).join(", ");
|
|
920
932
|
throw new Error(`Scaffold method '${scaffold_feature_name}' not found. Available methods: ${availableMethods}`);
|
|
921
933
|
}
|
|
922
934
|
const templateService = new TemplateService();
|
|
@@ -926,7 +938,7 @@ var ScaffoldingMethodsService = class {
|
|
|
926
938
|
const projectName = node_path.default.basename(absoluteProjectPath);
|
|
927
939
|
const result = await scaffoldService.useFeature({
|
|
928
940
|
projectPath: absoluteProjectPath,
|
|
929
|
-
templateFolder:
|
|
941
|
+
templateFolder: templatePath,
|
|
930
942
|
featureName: scaffold_feature_name,
|
|
931
943
|
variables: {
|
|
932
944
|
...variables,
|
package/dist/{ListScaffoldingMethodsTool-RfVCiYIl.mjs → ListScaffoldingMethodsTool-T_o0iifQ.mjs}
RENAMED
|
@@ -730,7 +730,11 @@ var ScaffoldingMethodsService = class {
|
|
|
730
730
|
const sourceTemplate = (await ProjectConfigResolver.resolveProjectConfig(absoluteProjectPath)).sourceTemplate;
|
|
731
731
|
return this.listScaffoldingMethodsByTemplate(sourceTemplate, cursor);
|
|
732
732
|
}
|
|
733
|
-
|
|
733
|
+
/**
|
|
734
|
+
* Collects all scaffold methods for a template (no pagination)
|
|
735
|
+
* Used internally for lookups that need to search all methods
|
|
736
|
+
*/
|
|
737
|
+
async collectAllMethodsByTemplate(templateName) {
|
|
734
738
|
const templatePath = await this.findTemplatePath(templateName);
|
|
735
739
|
if (!templatePath) throw new Error(`Template not found for sourceTemplate: ${templateName}`);
|
|
736
740
|
const fullTemplatePath = path.join(this.templatesRootPath, templatePath);
|
|
@@ -754,6 +758,13 @@ var ScaffoldingMethodsService = class {
|
|
|
754
758
|
generator: feature.generator
|
|
755
759
|
});
|
|
756
760
|
});
|
|
761
|
+
return {
|
|
762
|
+
templatePath,
|
|
763
|
+
methods
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
async listScaffoldingMethodsByTemplate(templateName, cursor) {
|
|
767
|
+
const { templatePath, methods } = await this.collectAllMethodsByTemplate(templateName);
|
|
757
768
|
const paginatedResult = PaginationHelper.paginate(methods, cursor);
|
|
758
769
|
return {
|
|
759
770
|
sourceTemplate: templateName,
|
|
@@ -884,10 +895,11 @@ var ScaffoldingMethodsService = class {
|
|
|
884
895
|
async useScaffoldMethod(request) {
|
|
885
896
|
const { projectPath, scaffold_feature_name, variables, sessionId } = request;
|
|
886
897
|
const absoluteProjectPath = await this.resolveProjectPath(projectPath);
|
|
887
|
-
const
|
|
888
|
-
const
|
|
898
|
+
const sourceTemplate = (await ProjectConfigResolver.resolveProjectConfig(absoluteProjectPath)).sourceTemplate;
|
|
899
|
+
const { templatePath, methods: allMethods } = await this.collectAllMethodsByTemplate(sourceTemplate);
|
|
900
|
+
const method = allMethods.find((m) => m.name === scaffold_feature_name);
|
|
889
901
|
if (!method) {
|
|
890
|
-
const availableMethods =
|
|
902
|
+
const availableMethods = allMethods.map((m) => m.name).join(", ");
|
|
891
903
|
throw new Error(`Scaffold method '${scaffold_feature_name}' not found. Available methods: ${availableMethods}`);
|
|
892
904
|
}
|
|
893
905
|
const templateService = new TemplateService();
|
|
@@ -897,7 +909,7 @@ var ScaffoldingMethodsService = class {
|
|
|
897
909
|
const projectName = path.basename(absoluteProjectPath);
|
|
898
910
|
const result = await scaffoldService.useFeature({
|
|
899
911
|
projectPath: absoluteProjectPath,
|
|
900
|
-
templateFolder:
|
|
912
|
+
templateFolder: templatePath,
|
|
901
913
|
featureName: scaffold_feature_name,
|
|
902
914
|
variables: {
|
|
903
915
|
...variables,
|
package/dist/cli.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-
|
|
3
|
-
const require_stdio = require('./stdio-
|
|
2
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-BVzCtkpA.cjs');
|
|
3
|
+
const require_stdio = require('./stdio-DkLk-WCI.cjs');
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_ListScaffoldingMethodsTool.__toESM(node_path);
|
|
6
6
|
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
@@ -12,7 +12,7 @@ let __agiflowai_coding_agent_bridge = require("@agiflowai/coding-agent-bridge");
|
|
|
12
12
|
let __agiflowai_hooks_adapter = require("@agiflowai/hooks-adapter");
|
|
13
13
|
|
|
14
14
|
//#region package.json
|
|
15
|
-
var version = "1.0.
|
|
15
|
+
var version = "1.0.17";
|
|
16
16
|
|
|
17
17
|
//#endregion
|
|
18
18
|
//#region src/commands/boilerplate.ts
|
|
@@ -828,7 +828,7 @@ const hookCommand = new commander.Command("hook").description("Execute scaffold
|
|
|
828
828
|
}
|
|
829
829
|
const { agent, hookMethod } = (0, __agiflowai_hooks_adapter.parseHookType)(options.type);
|
|
830
830
|
if (agent === __agiflowai_coding_agent_bridge.CLAUDE_CODE) {
|
|
831
|
-
const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-
|
|
831
|
+
const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-DzC43Rye.cjs"));
|
|
832
832
|
const claudeCallbacks = [];
|
|
833
833
|
if (useScaffoldMethodModule.UseScaffoldMethodHook) {
|
|
834
834
|
const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
|
|
@@ -841,7 +841,7 @@ const hookCommand = new commander.Command("hook").description("Execute scaffold
|
|
|
841
841
|
}
|
|
842
842
|
await new __agiflowai_hooks_adapter.ClaudeCodeAdapter().executeMultiple(claudeCallbacks);
|
|
843
843
|
} else if (agent === __agiflowai_coding_agent_bridge.GEMINI_CLI) {
|
|
844
|
-
const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-
|
|
844
|
+
const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-DhOHJdF-.cjs"));
|
|
845
845
|
const geminiCallbacks = [];
|
|
846
846
|
if (useScaffoldMethodModule.UseScaffoldMethodHook) {
|
|
847
847
|
const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as UseScaffoldMethodTool, c as GenerateFeatureScaffoldTool, f as BoilerplateService, i as WriteToFileTool, l as GenerateBoilerplateTool, n as SseTransportHandler, o as UseBoilerplateTool, r as HttpTransportHandler, s as ListBoilerplatesTool, t as StdioTransportHandler, u as GenerateBoilerplateFileTool } from "./stdio-
|
|
3
|
-
import { c as FileSystemService, i as TemplateService, n as ScaffoldingMethodsService, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-
|
|
2
|
+
import { a as UseScaffoldMethodTool, c as GenerateFeatureScaffoldTool, f as BoilerplateService, i as WriteToFileTool, l as GenerateBoilerplateTool, n as SseTransportHandler, o as UseBoilerplateTool, r as HttpTransportHandler, s as ListBoilerplatesTool, t as StdioTransportHandler, u as GenerateBoilerplateFileTool } from "./stdio-t-O7AO9u.mjs";
|
|
3
|
+
import { c as FileSystemService, i as TemplateService, n as ScaffoldingMethodsService, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-T_o0iifQ.mjs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { ProjectConfigResolver, TemplatesManagerService, icons, messages, print, sections } from "@agiflowai/aicode-utils";
|
|
6
6
|
import { z } from "zod";
|
|
@@ -11,7 +11,7 @@ import { CLAUDE_CODE, GEMINI_CLI } from "@agiflowai/coding-agent-bridge";
|
|
|
11
11
|
import { ClaudeCodeAdapter, GeminiCliAdapter, parseHookType } from "@agiflowai/hooks-adapter";
|
|
12
12
|
|
|
13
13
|
//#region package.json
|
|
14
|
-
var version = "1.0.
|
|
14
|
+
var version = "1.0.17";
|
|
15
15
|
|
|
16
16
|
//#endregion
|
|
17
17
|
//#region src/commands/boilerplate.ts
|
|
@@ -827,7 +827,7 @@ const hookCommand = new Command("hook").description("Execute scaffold hooks for
|
|
|
827
827
|
}
|
|
828
828
|
const { agent, hookMethod } = parseHookType(options.type);
|
|
829
829
|
if (agent === CLAUDE_CODE) {
|
|
830
|
-
const useScaffoldMethodModule = await import("./useScaffoldMethod-
|
|
830
|
+
const useScaffoldMethodModule = await import("./useScaffoldMethod-B6VxGENG.mjs");
|
|
831
831
|
const claudeCallbacks = [];
|
|
832
832
|
if (useScaffoldMethodModule.UseScaffoldMethodHook) {
|
|
833
833
|
const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
|
|
@@ -840,7 +840,7 @@ const hookCommand = new Command("hook").description("Execute scaffold hooks for
|
|
|
840
840
|
}
|
|
841
841
|
await new ClaudeCodeAdapter().executeMultiple(claudeCallbacks);
|
|
842
842
|
} else if (agent === GEMINI_CLI) {
|
|
843
|
-
const useScaffoldMethodModule = await import("./useScaffoldMethod-
|
|
843
|
+
const useScaffoldMethodModule = await import("./useScaffoldMethod-U7nkNKZb.mjs");
|
|
844
844
|
const geminiCallbacks = [];
|
|
845
845
|
if (useScaffoldMethodModule.UseScaffoldMethodHook) {
|
|
846
846
|
const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-
|
|
2
|
-
const require_stdio = require('./stdio-
|
|
1
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-BVzCtkpA.cjs');
|
|
2
|
+
const require_stdio = require('./stdio-DkLk-WCI.cjs');
|
|
3
3
|
|
|
4
4
|
exports.BoilerplateGeneratorService = require_stdio.BoilerplateGeneratorService;
|
|
5
5
|
exports.BoilerplateService = require_stdio.BoilerplateService;
|
package/dist/index.d.cts
CHANGED
|
@@ -231,6 +231,11 @@ declare class BoilerplateService {
|
|
|
231
231
|
private templateService;
|
|
232
232
|
private scaffoldService;
|
|
233
233
|
constructor(templatesPath: string);
|
|
234
|
+
/**
|
|
235
|
+
* Collects all boilerplates from scaffold.yaml files (no pagination)
|
|
236
|
+
* Used internally for lookups that need to search all boilerplates
|
|
237
|
+
*/
|
|
238
|
+
private collectAllBoilerplates;
|
|
234
239
|
/**
|
|
235
240
|
* Scans all scaffold.yaml files and returns available boilerplates with pagination
|
|
236
241
|
* @param cursor - Optional pagination cursor
|
|
@@ -381,6 +386,11 @@ declare class ScaffoldingMethodsService {
|
|
|
381
386
|
private templateService;
|
|
382
387
|
constructor(fileSystem: IFileSystemService, templatesRootPath: string);
|
|
383
388
|
listScaffoldingMethods(projectPath: string, cursor?: string): Promise<ListScaffoldingMethodsResult>;
|
|
389
|
+
/**
|
|
390
|
+
* Collects all scaffold methods for a template (no pagination)
|
|
391
|
+
* Used internally for lookups that need to search all methods
|
|
392
|
+
*/
|
|
393
|
+
private collectAllMethodsByTemplate;
|
|
384
394
|
listScaffoldingMethodsByTemplate(templateName: string, cursor?: string): Promise<ListScaffoldingMethodsResult>;
|
|
385
395
|
/**
|
|
386
396
|
* Gets scaffolding methods with instructions rendered using provided variables
|
package/dist/index.d.mts
CHANGED
|
@@ -232,6 +232,11 @@ declare class BoilerplateService {
|
|
|
232
232
|
private templateService;
|
|
233
233
|
private scaffoldService;
|
|
234
234
|
constructor(templatesPath: string);
|
|
235
|
+
/**
|
|
236
|
+
* Collects all boilerplates from scaffold.yaml files (no pagination)
|
|
237
|
+
* Used internally for lookups that need to search all boilerplates
|
|
238
|
+
*/
|
|
239
|
+
private collectAllBoilerplates;
|
|
235
240
|
/**
|
|
236
241
|
* Scans all scaffold.yaml files and returns available boilerplates with pagination
|
|
237
242
|
* @param cursor - Optional pagination cursor
|
|
@@ -382,6 +387,11 @@ declare class ScaffoldingMethodsService {
|
|
|
382
387
|
private templateService;
|
|
383
388
|
constructor(fileSystem: IFileSystemService, templatesRootPath: string);
|
|
384
389
|
listScaffoldingMethods(projectPath: string, cursor?: string): Promise<ListScaffoldingMethodsResult>;
|
|
390
|
+
/**
|
|
391
|
+
* Collects all scaffold methods for a template (no pagination)
|
|
392
|
+
* Used internally for lookups that need to search all methods
|
|
393
|
+
*/
|
|
394
|
+
private collectAllMethodsByTemplate;
|
|
385
395
|
listScaffoldingMethodsByTemplate(templateName: string, cursor?: string): Promise<ListScaffoldingMethodsResult>;
|
|
386
396
|
/**
|
|
387
397
|
* Gets scaffolding methods with instructions rendered using provided variables
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as UseScaffoldMethodTool, c as GenerateFeatureScaffoldTool, d as ScaffoldGeneratorService, f as BoilerplateService, i as WriteToFileTool, l as GenerateBoilerplateTool, n as SseTransportHandler, o as UseBoilerplateTool, p as BoilerplateGeneratorService, r as HttpTransportHandler, s as ListBoilerplatesTool, t as StdioTransportHandler, u as GenerateBoilerplateFileTool } from "./stdio-
|
|
2
|
-
import { a as ScaffoldService, c as FileSystemService, i as TemplateService, n as ScaffoldingMethodsService, o as ScaffoldProcessingService, r as VariableReplacementService, s as ScaffoldConfigLoader, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-
|
|
1
|
+
import { a as UseScaffoldMethodTool, c as GenerateFeatureScaffoldTool, d as ScaffoldGeneratorService, f as BoilerplateService, i as WriteToFileTool, l as GenerateBoilerplateTool, n as SseTransportHandler, o as UseBoilerplateTool, p as BoilerplateGeneratorService, r as HttpTransportHandler, s as ListBoilerplatesTool, t as StdioTransportHandler, u as GenerateBoilerplateFileTool } from "./stdio-t-O7AO9u.mjs";
|
|
2
|
+
import { a as ScaffoldService, c as FileSystemService, i as TemplateService, n as ScaffoldingMethodsService, o as ScaffoldProcessingService, r as VariableReplacementService, s as ScaffoldConfigLoader, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-T_o0iifQ.mjs";
|
|
3
3
|
|
|
4
4
|
export { BoilerplateGeneratorService, BoilerplateService, FileSystemService, GenerateBoilerplateFileTool, GenerateBoilerplateTool, GenerateFeatureScaffoldTool, HttpTransportHandler, ListBoilerplatesTool, ListScaffoldingMethodsTool, ScaffoldConfigLoader, ScaffoldGeneratorService, ScaffoldProcessingService, ScaffoldService, ScaffoldingMethodsService, SseTransportHandler, StdioTransportHandler, TemplateService, UseBoilerplateTool, UseScaffoldMethodTool, VariableReplacementService, WriteToFileTool };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-
|
|
1
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-BVzCtkpA.cjs');
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
node_path = require_ListScaffoldingMethodsTool.__toESM(node_path);
|
|
4
4
|
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
@@ -190,11 +190,10 @@ var BoilerplateService = class {
|
|
|
190
190
|
this.scaffoldService = new require_ListScaffoldingMethodsTool.ScaffoldService(fileSystemService, new require_ListScaffoldingMethodsTool.ScaffoldConfigLoader(fileSystemService, this.templateService), new require_ListScaffoldingMethodsTool.VariableReplacementService(fileSystemService, this.templateService), templatesPath);
|
|
191
191
|
}
|
|
192
192
|
/**
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
* @returns Paginated list of boilerplates
|
|
193
|
+
* Collects all boilerplates from scaffold.yaml files (no pagination)
|
|
194
|
+
* Used internally for lookups that need to search all boilerplates
|
|
196
195
|
*/
|
|
197
|
-
async
|
|
196
|
+
async collectAllBoilerplates() {
|
|
198
197
|
const boilerplates = [];
|
|
199
198
|
const templateDirs = await this.discoverTemplateDirectories();
|
|
200
199
|
for (const templatePath of templateDirs) {
|
|
@@ -221,6 +220,15 @@ var BoilerplateService = class {
|
|
|
221
220
|
__agiflowai_aicode_utils.log.warn(`Failed to load scaffold.yaml for ${templatePath}:`, error);
|
|
222
221
|
}
|
|
223
222
|
}
|
|
223
|
+
return boilerplates;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Scans all scaffold.yaml files and returns available boilerplates with pagination
|
|
227
|
+
* @param cursor - Optional pagination cursor
|
|
228
|
+
* @returns Paginated list of boilerplates
|
|
229
|
+
*/
|
|
230
|
+
async listBoilerplates(cursor) {
|
|
231
|
+
const boilerplates = await this.collectAllBoilerplates();
|
|
224
232
|
const paginatedResult = require_ListScaffoldingMethodsTool.PaginationHelper.paginate(boilerplates, cursor);
|
|
225
233
|
return {
|
|
226
234
|
boilerplates: paginatedResult.items,
|
|
@@ -275,11 +283,11 @@ var BoilerplateService = class {
|
|
|
275
283
|
success: false,
|
|
276
284
|
message: "Missing required parameter: boilerplateName"
|
|
277
285
|
};
|
|
278
|
-
const
|
|
279
|
-
const boilerplate =
|
|
286
|
+
const allBoilerplates = await this.collectAllBoilerplates();
|
|
287
|
+
const boilerplate = allBoilerplates.find((b) => b.name === boilerplateName);
|
|
280
288
|
if (!boilerplate) return {
|
|
281
289
|
success: false,
|
|
282
|
-
message: `Boilerplate '${boilerplateName}' not found. Available boilerplates: ${
|
|
290
|
+
message: `Boilerplate '${boilerplateName}' not found. Available boilerplates: ${allBoilerplates.map((b) => b.name).join(", ")}`
|
|
283
291
|
};
|
|
284
292
|
const validationResult = this.validateBoilerplateVariables(boilerplate, variables);
|
|
285
293
|
if (!validationResult.isValid) return {
|
|
@@ -335,7 +343,7 @@ var BoilerplateService = class {
|
|
|
335
343
|
* Gets a specific boilerplate configuration by name with optional variable rendering
|
|
336
344
|
*/
|
|
337
345
|
async getBoilerplate(name, variables) {
|
|
338
|
-
const boilerplate = (await this.
|
|
346
|
+
const boilerplate = (await this.collectAllBoilerplates()).find((b) => b.name === name);
|
|
339
347
|
if (!boilerplate) return null;
|
|
340
348
|
if (variables && this.templateService.containsTemplateVariables(boilerplate.instruction)) return {
|
|
341
349
|
...boilerplate,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ScaffoldService, c as FileSystemService, i as TemplateService, l as PaginationHelper, n as ScaffoldingMethodsService, r as VariableReplacementService, s as ScaffoldConfigLoader } from "./ListScaffoldingMethodsTool-
|
|
1
|
+
import { a as ScaffoldService, c as FileSystemService, i as TemplateService, l as PaginationHelper, n as ScaffoldingMethodsService, r as VariableReplacementService, s as ScaffoldConfigLoader } from "./ListScaffoldingMethodsTool-T_o0iifQ.mjs";
|
|
2
2
|
import * as path$1 from "node:path";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { ProjectConfigResolver, ensureDir, generateStableId, log, pathExists, pathExistsSync, readFile, readFileSync, readdir, statSync, writeFile } from "@agiflowai/aicode-utils";
|
|
@@ -186,11 +186,10 @@ var BoilerplateService = class {
|
|
|
186
186
|
this.scaffoldService = new ScaffoldService(fileSystemService, new ScaffoldConfigLoader(fileSystemService, this.templateService), new VariableReplacementService(fileSystemService, this.templateService), templatesPath);
|
|
187
187
|
}
|
|
188
188
|
/**
|
|
189
|
-
*
|
|
190
|
-
*
|
|
191
|
-
* @returns Paginated list of boilerplates
|
|
189
|
+
* Collects all boilerplates from scaffold.yaml files (no pagination)
|
|
190
|
+
* Used internally for lookups that need to search all boilerplates
|
|
192
191
|
*/
|
|
193
|
-
async
|
|
192
|
+
async collectAllBoilerplates() {
|
|
194
193
|
const boilerplates = [];
|
|
195
194
|
const templateDirs = await this.discoverTemplateDirectories();
|
|
196
195
|
for (const templatePath of templateDirs) {
|
|
@@ -217,6 +216,15 @@ var BoilerplateService = class {
|
|
|
217
216
|
log.warn(`Failed to load scaffold.yaml for ${templatePath}:`, error);
|
|
218
217
|
}
|
|
219
218
|
}
|
|
219
|
+
return boilerplates;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Scans all scaffold.yaml files and returns available boilerplates with pagination
|
|
223
|
+
* @param cursor - Optional pagination cursor
|
|
224
|
+
* @returns Paginated list of boilerplates
|
|
225
|
+
*/
|
|
226
|
+
async listBoilerplates(cursor) {
|
|
227
|
+
const boilerplates = await this.collectAllBoilerplates();
|
|
220
228
|
const paginatedResult = PaginationHelper.paginate(boilerplates, cursor);
|
|
221
229
|
return {
|
|
222
230
|
boilerplates: paginatedResult.items,
|
|
@@ -271,11 +279,11 @@ var BoilerplateService = class {
|
|
|
271
279
|
success: false,
|
|
272
280
|
message: "Missing required parameter: boilerplateName"
|
|
273
281
|
};
|
|
274
|
-
const
|
|
275
|
-
const boilerplate =
|
|
282
|
+
const allBoilerplates = await this.collectAllBoilerplates();
|
|
283
|
+
const boilerplate = allBoilerplates.find((b) => b.name === boilerplateName);
|
|
276
284
|
if (!boilerplate) return {
|
|
277
285
|
success: false,
|
|
278
|
-
message: `Boilerplate '${boilerplateName}' not found. Available boilerplates: ${
|
|
286
|
+
message: `Boilerplate '${boilerplateName}' not found. Available boilerplates: ${allBoilerplates.map((b) => b.name).join(", ")}`
|
|
279
287
|
};
|
|
280
288
|
const validationResult = this.validateBoilerplateVariables(boilerplate, variables);
|
|
281
289
|
if (!validationResult.isValid) return {
|
|
@@ -331,7 +339,7 @@ var BoilerplateService = class {
|
|
|
331
339
|
* Gets a specific boilerplate configuration by name with optional variable rendering
|
|
332
340
|
*/
|
|
333
341
|
async getBoilerplate(name, variables) {
|
|
334
|
-
const boilerplate = (await this.
|
|
342
|
+
const boilerplate = (await this.collectAllBoilerplates()).find((b) => b.name === name);
|
|
335
343
|
if (!boilerplate) return null;
|
|
336
344
|
if (variables && this.templateService.containsTemplateVariables(boilerplate.instruction)) return {
|
|
337
345
|
...boilerplate,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-
|
|
1
|
+
import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-T_o0iifQ.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { ProjectFinderService, TemplatesManagerService } from "@agiflowai/aicode-utils";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-
|
|
1
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-BVzCtkpA.cjs');
|
|
2
2
|
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
3
3
|
let __agiflowai_hooks_adapter = require("@agiflowai/hooks-adapter");
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-
|
|
1
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-BVzCtkpA.cjs');
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
node_path = require_ListScaffoldingMethodsTool.__toESM(node_path);
|
|
4
4
|
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-
|
|
1
|
+
import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-T_o0iifQ.mjs";
|
|
2
2
|
import { TemplatesManagerService } from "@agiflowai/aicode-utils";
|
|
3
3
|
import { DECISION_ALLOW, DECISION_DENY, DECISION_SKIP, ExecutionLogService } from "@agiflowai/hooks-adapter";
|
|
4
4
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agiflowai/scaffold-mcp",
|
|
3
3
|
"description": "MCP server for scaffolding applications with boilerplate templates",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.18",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"author": "AgiflowIO",
|
|
7
7
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@composio/json-schema-to-zod": "0.1.15",
|
|
39
39
|
"@inquirer/prompts": "^7.8.6",
|
|
40
|
-
"@modelcontextprotocol/sdk": "1.
|
|
40
|
+
"@modelcontextprotocol/sdk": "1.25.2",
|
|
41
41
|
"chalk": "5.6.2",
|
|
42
42
|
"commander": "14.0.1",
|
|
43
43
|
"execa": "^9.5.2",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"pino": "^10.0.0",
|
|
49
49
|
"pino-pretty": "^13.1.1",
|
|
50
50
|
"zod": "3.25.76",
|
|
51
|
-
"@agiflowai/aicode-utils": "1.0.
|
|
52
|
-
"@agiflowai/hooks-adapter": "0.0.
|
|
53
|
-
"@agiflowai/coding-agent-bridge": "1.0.
|
|
54
|
-
"@agiflowai/architect-mcp": "1.0.
|
|
51
|
+
"@agiflowai/aicode-utils": "1.0.11",
|
|
52
|
+
"@agiflowai/hooks-adapter": "0.0.12",
|
|
53
|
+
"@agiflowai/coding-agent-bridge": "1.0.14",
|
|
54
|
+
"@agiflowai/architect-mcp": "1.0.16"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/express": "^5.0.0",
|