@agiflowai/scaffold-mcp 1.0.12 → 1.0.14

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 (32) hide show
  1. package/dist/ListScaffoldingMethodsTool-B49G_iLj.mjs +350 -0
  2. package/dist/ListScaffoldingMethodsTool-DuYGFDwJ.cjs +376 -0
  3. package/dist/ScaffoldConfigLoader-8YI7v2GJ.mjs +142 -0
  4. package/dist/ScaffoldConfigLoader-BWpNpMx-.cjs +150 -0
  5. package/dist/ScaffoldConfigLoader-DKJtnrWT.mjs +3 -0
  6. package/dist/ScaffoldConfigLoader-HutEtfaH.cjs +3 -0
  7. package/dist/ScaffoldService-DSQBnAHm.cjs +308 -0
  8. package/dist/ScaffoldService-DcsGLMuD.mjs +295 -0
  9. package/dist/ScaffoldService-DfXjmrNT.cjs +3 -0
  10. package/dist/ScaffoldService-dL74anIv.mjs +3 -0
  11. package/dist/TemplateService-7QcWREot.cjs +85 -0
  12. package/dist/TemplateService-B1bd6iHw.mjs +3 -0
  13. package/dist/TemplateService-CVDL2uqt.mjs +79 -0
  14. package/dist/TemplateService-DUbdBOFs.cjs +3 -0
  15. package/dist/VariableReplacementService-B9RA8D0a.mjs +66 -0
  16. package/dist/VariableReplacementService-BO-UYgcf.mjs +3 -0
  17. package/dist/VariableReplacementService-DNYx0Dym.cjs +73 -0
  18. package/dist/VariableReplacementService-wuYKgeui.cjs +3 -0
  19. package/dist/chunk-CbDLau6x.cjs +34 -0
  20. package/dist/cli.cjs +16 -11
  21. package/dist/cli.mjs +9 -5
  22. package/dist/index.cjs +11 -7
  23. package/dist/index.mjs +6 -2
  24. package/dist/{stdio-DqZJsqKM.mjs → stdio-AbTm52SJ.mjs} +18 -15
  25. package/dist/{stdio-ohQyWnxq.cjs → stdio-baUp7xGL.cjs} +28 -24
  26. package/dist/{useScaffoldMethod-CC8ARsl9.mjs → useScaffoldMethod-BMWhFebp.mjs} +5 -7
  27. package/dist/{useScaffoldMethod-B-q_yBnX.mjs → useScaffoldMethod-CPgJIBHx.mjs} +2 -1
  28. package/dist/{useScaffoldMethod-DqF6pT1A.cjs → useScaffoldMethod-CcrpFEPv.cjs} +3 -1
  29. package/dist/{useScaffoldMethod-fzsnprJs.cjs → useScaffoldMethod-DOvwnNOJ.cjs} +9 -10
  30. package/package.json +3 -3
  31. package/dist/ListScaffoldingMethodsTool-D3ecmSLf.mjs +0 -994
  32. package/dist/ListScaffoldingMethodsTool-D7S3xpJE.cjs +0 -1082
@@ -0,0 +1,85 @@
1
+ const require_chunk = require('./chunk-CbDLau6x.cjs');
2
+ let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
3
+ let liquidjs = require("liquidjs");
4
+
5
+ //#region src/services/TemplateService.ts
6
+ var TemplateService = class {
7
+ liquid;
8
+ constructor() {
9
+ this.liquid = new liquidjs.Liquid({
10
+ strictFilters: false,
11
+ strictVariables: false
12
+ });
13
+ this.setupCustomFilters();
14
+ __agiflowai_aicode_utils.log.info("TemplateService initialized");
15
+ }
16
+ toPascalCase(str) {
17
+ const camelCase = str.replace(/[-_\s]+(.)?/g, (_, char) => char ? char.toUpperCase() : "");
18
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
19
+ }
20
+ setupCustomFilters() {
21
+ this.liquid.registerFilter("camelCase", (str) => {
22
+ return str.replace(/[-_\s]+(.)?/g, (_, char) => char ? char.toUpperCase() : "");
23
+ });
24
+ this.liquid.registerFilter("pascalCase", (str) => {
25
+ return this.toPascalCase(str);
26
+ });
27
+ this.liquid.registerFilter("titleCase", (str) => {
28
+ return this.toPascalCase(str);
29
+ });
30
+ this.liquid.registerFilter("kebabCase", (str) => {
31
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
32
+ });
33
+ this.liquid.registerFilter("snakeCase", (str) => {
34
+ return str.replace(/([a-z])([A-Z])/g, "$1_$2").replace(/[\s-]+/g, "_").toLowerCase();
35
+ });
36
+ this.liquid.registerFilter("upperCase", (str) => {
37
+ return str.replace(/([a-z])([A-Z])/g, "$1_$2").replace(/[\s-]+/g, "_").toUpperCase();
38
+ });
39
+ this.liquid.registerFilter("lower", (str) => str.toLowerCase());
40
+ this.liquid.registerFilter("upper", (str) => str.toUpperCase());
41
+ this.liquid.registerFilter("pluralize", (str) => {
42
+ if (str.endsWith("y")) return `${str.slice(0, -1)}ies`;
43
+ else if (str.endsWith("s") || str.endsWith("sh") || str.endsWith("ch") || str.endsWith("x") || str.endsWith("z")) return `${str}es`;
44
+ else return `${str}s`;
45
+ });
46
+ this.liquid.registerFilter("singularize", (str) => {
47
+ if (str.endsWith("ies")) return `${str.slice(0, -3)}y`;
48
+ else if (str.endsWith("es")) return str.slice(0, -2);
49
+ else if (str.endsWith("s") && !str.endsWith("ss")) return str.slice(0, -1);
50
+ else return str;
51
+ });
52
+ this.liquid.registerFilter("strip", (str) => {
53
+ return str.trim();
54
+ });
55
+ }
56
+ renderString(template, variables) {
57
+ try {
58
+ __agiflowai_aicode_utils.log.debug("Rendering template", {
59
+ variables,
60
+ templatePreview: template.substring(0, 100)
61
+ });
62
+ const result = this.liquid.parseAndRenderSync(template, variables);
63
+ __agiflowai_aicode_utils.log.debug("Rendered template", { resultPreview: result.substring(0, 100) });
64
+ return result;
65
+ } catch (error) {
66
+ __agiflowai_aicode_utils.log.error("LiquidJS rendering error", {
67
+ error: error instanceof Error ? error.message : String(error),
68
+ templatePreview: template.substring(0, 200),
69
+ variables
70
+ });
71
+ return template;
72
+ }
73
+ }
74
+ containsTemplateVariables(content) {
75
+ return [/\{\{.*?\}\}/, /\{%.*?%\}/].some((pattern) => pattern.test(content));
76
+ }
77
+ };
78
+
79
+ //#endregion
80
+ Object.defineProperty(exports, 'TemplateService', {
81
+ enumerable: true,
82
+ get: function () {
83
+ return TemplateService;
84
+ }
85
+ });
@@ -0,0 +1,3 @@
1
+ import { t as TemplateService } from "./TemplateService-CVDL2uqt.mjs";
2
+
3
+ export { TemplateService };
@@ -0,0 +1,79 @@
1
+ import { log } from "@agiflowai/aicode-utils";
2
+ import { Liquid } from "liquidjs";
3
+
4
+ //#region src/services/TemplateService.ts
5
+ var TemplateService = class {
6
+ liquid;
7
+ constructor() {
8
+ this.liquid = new Liquid({
9
+ strictFilters: false,
10
+ strictVariables: false
11
+ });
12
+ this.setupCustomFilters();
13
+ log.info("TemplateService initialized");
14
+ }
15
+ toPascalCase(str) {
16
+ const camelCase = str.replace(/[-_\s]+(.)?/g, (_, char) => char ? char.toUpperCase() : "");
17
+ return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);
18
+ }
19
+ setupCustomFilters() {
20
+ this.liquid.registerFilter("camelCase", (str) => {
21
+ return str.replace(/[-_\s]+(.)?/g, (_, char) => char ? char.toUpperCase() : "");
22
+ });
23
+ this.liquid.registerFilter("pascalCase", (str) => {
24
+ return this.toPascalCase(str);
25
+ });
26
+ this.liquid.registerFilter("titleCase", (str) => {
27
+ return this.toPascalCase(str);
28
+ });
29
+ this.liquid.registerFilter("kebabCase", (str) => {
30
+ return str.replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase();
31
+ });
32
+ this.liquid.registerFilter("snakeCase", (str) => {
33
+ return str.replace(/([a-z])([A-Z])/g, "$1_$2").replace(/[\s-]+/g, "_").toLowerCase();
34
+ });
35
+ this.liquid.registerFilter("upperCase", (str) => {
36
+ return str.replace(/([a-z])([A-Z])/g, "$1_$2").replace(/[\s-]+/g, "_").toUpperCase();
37
+ });
38
+ this.liquid.registerFilter("lower", (str) => str.toLowerCase());
39
+ this.liquid.registerFilter("upper", (str) => str.toUpperCase());
40
+ this.liquid.registerFilter("pluralize", (str) => {
41
+ if (str.endsWith("y")) return `${str.slice(0, -1)}ies`;
42
+ else if (str.endsWith("s") || str.endsWith("sh") || str.endsWith("ch") || str.endsWith("x") || str.endsWith("z")) return `${str}es`;
43
+ else return `${str}s`;
44
+ });
45
+ this.liquid.registerFilter("singularize", (str) => {
46
+ if (str.endsWith("ies")) return `${str.slice(0, -3)}y`;
47
+ else if (str.endsWith("es")) return str.slice(0, -2);
48
+ else if (str.endsWith("s") && !str.endsWith("ss")) return str.slice(0, -1);
49
+ else return str;
50
+ });
51
+ this.liquid.registerFilter("strip", (str) => {
52
+ return str.trim();
53
+ });
54
+ }
55
+ renderString(template, variables) {
56
+ try {
57
+ log.debug("Rendering template", {
58
+ variables,
59
+ templatePreview: template.substring(0, 100)
60
+ });
61
+ const result = this.liquid.parseAndRenderSync(template, variables);
62
+ log.debug("Rendered template", { resultPreview: result.substring(0, 100) });
63
+ return result;
64
+ } catch (error) {
65
+ log.error("LiquidJS rendering error", {
66
+ error: error instanceof Error ? error.message : String(error),
67
+ templatePreview: template.substring(0, 200),
68
+ variables
69
+ });
70
+ return template;
71
+ }
72
+ }
73
+ containsTemplateVariables(content) {
74
+ return [/\{\{.*?\}\}/, /\{%.*?%\}/].some((pattern) => pattern.test(content));
75
+ }
76
+ };
77
+
78
+ //#endregion
79
+ export { TemplateService as t };
@@ -0,0 +1,3 @@
1
+ const require_TemplateService = require('./TemplateService-7QcWREot.cjs');
2
+
3
+ exports.TemplateService = require_TemplateService.TemplateService;
@@ -0,0 +1,66 @@
1
+ import path from "node:path";
2
+ import { log } from "@agiflowai/aicode-utils";
3
+
4
+ //#region src/services/VariableReplacementService.ts
5
+ var VariableReplacementService = class {
6
+ binaryExtensions = [
7
+ ".png",
8
+ ".jpg",
9
+ ".jpeg",
10
+ ".gif",
11
+ ".ico",
12
+ ".woff",
13
+ ".woff2",
14
+ ".ttf",
15
+ ".eot",
16
+ ".pdf",
17
+ ".zip",
18
+ ".tar",
19
+ ".gz",
20
+ ".exe",
21
+ ".dll",
22
+ ".so",
23
+ ".dylib"
24
+ ];
25
+ constructor(fileSystem, templateService) {
26
+ this.fileSystem = fileSystem;
27
+ this.templateService = templateService;
28
+ }
29
+ async processFilesForVariableReplacement(dirPath, variables) {
30
+ let items = [];
31
+ try {
32
+ items = await this.fileSystem.readdir(dirPath);
33
+ } catch (error) {
34
+ log.warn(`Skipping directory ${dirPath}: ${error}`);
35
+ return;
36
+ }
37
+ for (const item of items) {
38
+ if (!item) continue;
39
+ const itemPath = path.join(dirPath, item);
40
+ try {
41
+ const stat$1 = await this.fileSystem.stat(itemPath);
42
+ if (stat$1.isDirectory()) await this.processFilesForVariableReplacement(itemPath, variables);
43
+ else if (stat$1.isFile()) await this.replaceVariablesInFile(itemPath, variables);
44
+ } catch (error) {
45
+ log.warn(`Skipping item ${itemPath}: ${error}`);
46
+ }
47
+ }
48
+ }
49
+ async replaceVariablesInFile(filePath, variables) {
50
+ try {
51
+ if (this.isBinaryFile(filePath)) return;
52
+ const content = await this.fileSystem.readFile(filePath, "utf8");
53
+ const renderedContent = this.templateService.renderString(content, variables);
54
+ await this.fileSystem.writeFile(filePath, renderedContent, "utf8");
55
+ } catch (error) {
56
+ log.warn(`Skipping file ${filePath}: ${error}`);
57
+ }
58
+ }
59
+ isBinaryFile(filePath) {
60
+ const ext = path.extname(filePath).toLowerCase();
61
+ return this.binaryExtensions.includes(ext);
62
+ }
63
+ };
64
+
65
+ //#endregion
66
+ export { VariableReplacementService as t };
@@ -0,0 +1,3 @@
1
+ import { t as VariableReplacementService } from "./VariableReplacementService-B9RA8D0a.mjs";
2
+
3
+ export { VariableReplacementService };
@@ -0,0 +1,73 @@
1
+ const require_chunk = require('./chunk-CbDLau6x.cjs');
2
+ let node_path = require("node:path");
3
+ node_path = require_chunk.__toESM(node_path);
4
+ let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
5
+
6
+ //#region src/services/VariableReplacementService.ts
7
+ var VariableReplacementService = class {
8
+ binaryExtensions = [
9
+ ".png",
10
+ ".jpg",
11
+ ".jpeg",
12
+ ".gif",
13
+ ".ico",
14
+ ".woff",
15
+ ".woff2",
16
+ ".ttf",
17
+ ".eot",
18
+ ".pdf",
19
+ ".zip",
20
+ ".tar",
21
+ ".gz",
22
+ ".exe",
23
+ ".dll",
24
+ ".so",
25
+ ".dylib"
26
+ ];
27
+ constructor(fileSystem, templateService) {
28
+ this.fileSystem = fileSystem;
29
+ this.templateService = templateService;
30
+ }
31
+ async processFilesForVariableReplacement(dirPath, variables) {
32
+ let items = [];
33
+ try {
34
+ items = await this.fileSystem.readdir(dirPath);
35
+ } catch (error) {
36
+ __agiflowai_aicode_utils.log.warn(`Skipping directory ${dirPath}: ${error}`);
37
+ return;
38
+ }
39
+ for (const item of items) {
40
+ if (!item) continue;
41
+ const itemPath = node_path.default.join(dirPath, item);
42
+ try {
43
+ const stat = await this.fileSystem.stat(itemPath);
44
+ if (stat.isDirectory()) await this.processFilesForVariableReplacement(itemPath, variables);
45
+ else if (stat.isFile()) await this.replaceVariablesInFile(itemPath, variables);
46
+ } catch (error) {
47
+ __agiflowai_aicode_utils.log.warn(`Skipping item ${itemPath}: ${error}`);
48
+ }
49
+ }
50
+ }
51
+ async replaceVariablesInFile(filePath, variables) {
52
+ try {
53
+ if (this.isBinaryFile(filePath)) return;
54
+ const content = await this.fileSystem.readFile(filePath, "utf8");
55
+ const renderedContent = this.templateService.renderString(content, variables);
56
+ await this.fileSystem.writeFile(filePath, renderedContent, "utf8");
57
+ } catch (error) {
58
+ __agiflowai_aicode_utils.log.warn(`Skipping file ${filePath}: ${error}`);
59
+ }
60
+ }
61
+ isBinaryFile(filePath) {
62
+ const ext = node_path.default.extname(filePath).toLowerCase();
63
+ return this.binaryExtensions.includes(ext);
64
+ }
65
+ };
66
+
67
+ //#endregion
68
+ Object.defineProperty(exports, 'VariableReplacementService', {
69
+ enumerable: true,
70
+ get: function () {
71
+ return VariableReplacementService;
72
+ }
73
+ });
@@ -0,0 +1,3 @@
1
+ const require_VariableReplacementService = require('./VariableReplacementService-DNYx0Dym.cjs');
2
+
3
+ exports.VariableReplacementService = require_VariableReplacementService.VariableReplacementService;
@@ -0,0 +1,34 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
+ key = keys[i];
12
+ if (!__hasOwnProp.call(to, key) && key !== except) {
13
+ __defProp(to, key, {
14
+ get: ((k) => from[k]).bind(null, key),
15
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
+ });
17
+ }
18
+ }
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
26
+
27
+ //#endregion
28
+
29
+ Object.defineProperty(exports, '__toESM', {
30
+ enumerable: true,
31
+ get: function () {
32
+ return __toESM;
33
+ }
34
+ });
package/dist/cli.cjs CHANGED
@@ -1,8 +1,13 @@
1
1
  #!/usr/bin/env node
2
- const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-D7S3xpJE.cjs');
3
- const require_stdio = require('./stdio-ohQyWnxq.cjs');
2
+ const require_chunk = require('./chunk-CbDLau6x.cjs');
3
+ const require_stdio = require('./stdio-baUp7xGL.cjs');
4
+ const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-DuYGFDwJ.cjs');
5
+ require('./ScaffoldConfigLoader-BWpNpMx-.cjs');
6
+ require('./ScaffoldService-DSQBnAHm.cjs');
7
+ const require_TemplateService = require('./TemplateService-7QcWREot.cjs');
8
+ require('./VariableReplacementService-DNYx0Dym.cjs');
4
9
  let node_path = require("node:path");
5
- node_path = require_ListScaffoldingMethodsTool.__toESM(node_path);
10
+ node_path = require_chunk.__toESM(node_path);
6
11
  let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
7
12
  let zod = require("zod");
8
13
  let __modelcontextprotocol_sdk_types_js = require("@modelcontextprotocol/sdk/types.js");
@@ -12,7 +17,7 @@ let __agiflowai_coding_agent_bridge = require("@agiflowai/coding-agent-bridge");
12
17
  let __agiflowai_hooks_adapter = require("@agiflowai/hooks-adapter");
13
18
 
14
19
  //#region package.json
15
- var version = "1.0.14";
20
+ var version = "1.0.11";
16
21
 
17
22
  //#endregion
18
23
  //#region src/commands/boilerplate.ts
@@ -175,7 +180,7 @@ const generateBoilerplatePromptOptionsSchema = zod.z.object({
175
180
  */
176
181
  var GenerateBoilerplatePrompt = class GenerateBoilerplatePrompt {
177
182
  static PROMPT_NAME = "generate-boilerplate";
178
- templateService = new require_ListScaffoldingMethodsTool.TemplateService();
183
+ templateService = new require_TemplateService.TemplateService();
179
184
  options;
180
185
  constructor(options = {}) {
181
186
  try {
@@ -235,7 +240,7 @@ const generateFeatureScaffoldPromptOptionsSchema = zod.z.object({
235
240
  */
236
241
  var GenerateFeatureScaffoldPrompt = class GenerateFeatureScaffoldPrompt {
237
242
  static PROMPT_NAME = "generate-feature-scaffold";
238
- templateService = new require_ListScaffoldingMethodsTool.TemplateService();
243
+ templateService = new require_TemplateService.TemplateService();
239
244
  options;
240
245
  constructor(options = {}) {
241
246
  try {
@@ -295,7 +300,7 @@ const scaffoldApplicationPromptOptionsSchema = zod.z.object({
295
300
  */
296
301
  var ScaffoldApplicationPrompt = class ScaffoldApplicationPrompt {
297
302
  static PROMPT_NAME = "scaffold-application";
298
- templateService = new require_ListScaffoldingMethodsTool.TemplateService();
303
+ templateService = new require_TemplateService.TemplateService();
299
304
  options;
300
305
  constructor(options = {}) {
301
306
  try {
@@ -355,7 +360,7 @@ const scaffoldFeaturePromptOptionsSchema = zod.z.object({
355
360
  */
356
361
  var ScaffoldFeaturePrompt = class ScaffoldFeaturePrompt {
357
362
  static PROMPT_NAME = "scaffold-feature";
358
- templateService = new require_ListScaffoldingMethodsTool.TemplateService();
363
+ templateService = new require_TemplateService.TemplateService();
359
364
  options;
360
365
  constructor(options = {}) {
361
366
  try {
@@ -433,7 +438,7 @@ function createServer(options = {}) {
433
438
  isMonolith,
434
439
  promptAsSkill
435
440
  });
436
- const instructions = new require_ListScaffoldingMethodsTool.TemplateService().renderString(server_default, {
441
+ const instructions = new require_TemplateService.TemplateService().renderString(server_default, {
437
442
  adminEnabled,
438
443
  isMonolith
439
444
  });
@@ -828,7 +833,7 @@ const hookCommand = new commander.Command("hook").description("Execute scaffold
828
833
  }
829
834
  const { agent, hookMethod } = (0, __agiflowai_hooks_adapter.parseHookType)(options.type);
830
835
  if (agent === __agiflowai_coding_agent_bridge.CLAUDE_CODE) {
831
- const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-fzsnprJs.cjs"));
836
+ const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-DOvwnNOJ.cjs"));
832
837
  const claudeCallbacks = [];
833
838
  if (useScaffoldMethodModule.UseScaffoldMethodHook) {
834
839
  const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
@@ -841,7 +846,7 @@ const hookCommand = new commander.Command("hook").description("Execute scaffold
841
846
  }
842
847
  await new __agiflowai_hooks_adapter.ClaudeCodeAdapter().executeMultiple(claudeCallbacks);
843
848
  } else if (agent === __agiflowai_coding_agent_bridge.GEMINI_CLI) {
844
- const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-DqF6pT1A.cjs"));
849
+ const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-CcrpFEPv.cjs"));
845
850
  const geminiCallbacks = [];
846
851
  if (useScaffoldMethodModule.UseScaffoldMethodHook) {
847
852
  const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
package/dist/cli.mjs CHANGED
@@ -1,6 +1,10 @@
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-DqZJsqKM.mjs";
3
- import { c as FileSystemService, i as TemplateService, n as ScaffoldingMethodsService, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-D3ecmSLf.mjs";
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-AbTm52SJ.mjs";
3
+ import { n as ScaffoldingMethodsService, r as FileSystemService, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-B49G_iLj.mjs";
4
+ import "./ScaffoldConfigLoader-8YI7v2GJ.mjs";
5
+ import "./ScaffoldService-DcsGLMuD.mjs";
6
+ import { t as TemplateService } from "./TemplateService-CVDL2uqt.mjs";
7
+ import "./VariableReplacementService-B9RA8D0a.mjs";
4
8
  import path from "node:path";
5
9
  import { ProjectConfigResolver, TemplatesManagerService, icons, messages, print, sections } from "@agiflowai/aicode-utils";
6
10
  import { z } from "zod";
@@ -11,7 +15,7 @@ import { CLAUDE_CODE, GEMINI_CLI } from "@agiflowai/coding-agent-bridge";
11
15
  import { ClaudeCodeAdapter, GeminiCliAdapter, parseHookType } from "@agiflowai/hooks-adapter";
12
16
 
13
17
  //#region package.json
14
- var version = "1.0.14";
18
+ var version = "1.0.11";
15
19
 
16
20
  //#endregion
17
21
  //#region src/commands/boilerplate.ts
@@ -827,7 +831,7 @@ const hookCommand = new Command("hook").description("Execute scaffold hooks for
827
831
  }
828
832
  const { agent, hookMethod } = parseHookType(options.type);
829
833
  if (agent === CLAUDE_CODE) {
830
- const useScaffoldMethodModule = await import("./useScaffoldMethod-CC8ARsl9.mjs");
834
+ const useScaffoldMethodModule = await import("./useScaffoldMethod-BMWhFebp.mjs");
831
835
  const claudeCallbacks = [];
832
836
  if (useScaffoldMethodModule.UseScaffoldMethodHook) {
833
837
  const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
@@ -840,7 +844,7 @@ const hookCommand = new Command("hook").description("Execute scaffold hooks for
840
844
  }
841
845
  await new ClaudeCodeAdapter().executeMultiple(claudeCallbacks);
842
846
  } else if (agent === GEMINI_CLI) {
843
- const useScaffoldMethodModule = await import("./useScaffoldMethod-B-q_yBnX.mjs");
847
+ const useScaffoldMethodModule = await import("./useScaffoldMethod-CPgJIBHx.mjs");
844
848
  const geminiCallbacks = [];
845
849
  if (useScaffoldMethodModule.UseScaffoldMethodHook) {
846
850
  const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
package/dist/index.cjs CHANGED
@@ -1,5 +1,9 @@
1
- const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-D7S3xpJE.cjs');
2
- const require_stdio = require('./stdio-ohQyWnxq.cjs');
1
+ const require_stdio = require('./stdio-baUp7xGL.cjs');
2
+ const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-DuYGFDwJ.cjs');
3
+ const require_ScaffoldConfigLoader = require('./ScaffoldConfigLoader-BWpNpMx-.cjs');
4
+ const require_ScaffoldService = require('./ScaffoldService-DSQBnAHm.cjs');
5
+ const require_TemplateService = require('./TemplateService-7QcWREot.cjs');
6
+ const require_VariableReplacementService = require('./VariableReplacementService-DNYx0Dym.cjs');
3
7
 
4
8
  exports.BoilerplateGeneratorService = require_stdio.BoilerplateGeneratorService;
5
9
  exports.BoilerplateService = require_stdio.BoilerplateService;
@@ -10,15 +14,15 @@ exports.GenerateFeatureScaffoldTool = require_stdio.GenerateFeatureScaffoldTool;
10
14
  exports.HttpTransportHandler = require_stdio.HttpTransportHandler;
11
15
  exports.ListBoilerplatesTool = require_stdio.ListBoilerplatesTool;
12
16
  exports.ListScaffoldingMethodsTool = require_ListScaffoldingMethodsTool.ListScaffoldingMethodsTool;
13
- exports.ScaffoldConfigLoader = require_ListScaffoldingMethodsTool.ScaffoldConfigLoader;
17
+ exports.ScaffoldConfigLoader = require_ScaffoldConfigLoader.ScaffoldConfigLoader;
14
18
  exports.ScaffoldGeneratorService = require_stdio.ScaffoldGeneratorService;
15
- exports.ScaffoldProcessingService = require_ListScaffoldingMethodsTool.ScaffoldProcessingService;
16
- exports.ScaffoldService = require_ListScaffoldingMethodsTool.ScaffoldService;
19
+ exports.ScaffoldProcessingService = require_ScaffoldService.ScaffoldProcessingService;
20
+ exports.ScaffoldService = require_ScaffoldService.ScaffoldService;
17
21
  exports.ScaffoldingMethodsService = require_ListScaffoldingMethodsTool.ScaffoldingMethodsService;
18
22
  exports.SseTransportHandler = require_stdio.SseTransportHandler;
19
23
  exports.StdioTransportHandler = require_stdio.StdioTransportHandler;
20
- exports.TemplateService = require_ListScaffoldingMethodsTool.TemplateService;
24
+ exports.TemplateService = require_TemplateService.TemplateService;
21
25
  exports.UseBoilerplateTool = require_stdio.UseBoilerplateTool;
22
26
  exports.UseScaffoldMethodTool = require_stdio.UseScaffoldMethodTool;
23
- exports.VariableReplacementService = require_ListScaffoldingMethodsTool.VariableReplacementService;
27
+ exports.VariableReplacementService = require_VariableReplacementService.VariableReplacementService;
24
28
  exports.WriteToFileTool = require_stdio.WriteToFileTool;
package/dist/index.mjs CHANGED
@@ -1,4 +1,8 @@
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-DqZJsqKM.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-D3ecmSLf.mjs";
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-AbTm52SJ.mjs";
2
+ import { n as ScaffoldingMethodsService, r as FileSystemService, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-B49G_iLj.mjs";
3
+ import { t as ScaffoldConfigLoader } from "./ScaffoldConfigLoader-8YI7v2GJ.mjs";
4
+ import { n as ScaffoldProcessingService, t as ScaffoldService } from "./ScaffoldService-DcsGLMuD.mjs";
5
+ import { t as TemplateService } from "./TemplateService-CVDL2uqt.mjs";
6
+ import { t as VariableReplacementService } from "./VariableReplacementService-B9RA8D0a.mjs";
3
7
 
4
8
  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,8 @@
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-D3ecmSLf.mjs";
1
+ import { i as PaginationHelper, n as ScaffoldingMethodsService, r as FileSystemService } from "./ListScaffoldingMethodsTool-B49G_iLj.mjs";
2
+ import { t as ScaffoldConfigLoader } from "./ScaffoldConfigLoader-8YI7v2GJ.mjs";
3
+ import { t as ScaffoldService } from "./ScaffoldService-DcsGLMuD.mjs";
4
+ import { t as TemplateService } from "./TemplateService-CVDL2uqt.mjs";
5
+ import { t as VariableReplacementService } from "./VariableReplacementService-B9RA8D0a.mjs";
2
6
  import * as path$1 from "node:path";
3
7
  import path from "node:path";
4
8
  import { ProjectConfigResolver, ensureDir, generateStableId, log, pathExists, pathExistsSync, readFile, readFileSync, readdir, statSync, writeFile } from "@agiflowai/aicode-utils";
@@ -249,24 +253,23 @@ var BoilerplateService = class {
249
253
  */
250
254
  async useBoilerplate(request) {
251
255
  let { boilerplateName, variables, monolith, targetFolderOverride } = request;
252
- let projectConfig = null;
253
- if (monolith === void 0 || monolith && !boilerplateName) try {
254
- projectConfig = await ProjectConfigResolver.resolveProjectConfig(process.cwd());
255
- } catch (_error) {}
256
- if (monolith === void 0) if (projectConfig) {
257
- monolith = projectConfig.type === "monolith";
258
- log.info(`Auto-detected project type: ${projectConfig.type}`);
259
- } else {
256
+ if (monolith === void 0) try {
257
+ const config = await ProjectConfigResolver.resolveProjectConfig(process.cwd());
258
+ monolith = config.type === "monolith";
259
+ log.info(`Auto-detected project type: ${config.type}`);
260
+ } catch (_error) {
260
261
  monolith = false;
261
262
  log.info("No project configuration found, defaulting to monorepo mode");
262
263
  }
263
- if (monolith && !boilerplateName) if (projectConfig) {
264
- boilerplateName = projectConfig.sourceTemplate;
264
+ if (monolith && !boilerplateName) try {
265
+ boilerplateName = (await ProjectConfigResolver.resolveProjectConfig(process.cwd())).sourceTemplate;
265
266
  log.info(`Using boilerplate from toolkit.yaml: ${boilerplateName}`);
266
- } else return {
267
- success: false,
268
- message: "Failed to read boilerplate name from toolkit.yaml: No project configuration found"
269
- };
267
+ } catch (error) {
268
+ return {
269
+ success: false,
270
+ message: `Failed to read boilerplate name from toolkit.yaml: ${error instanceof Error ? error.message : String(error)}`
271
+ };
272
+ }
270
273
  if (!boilerplateName) return {
271
274
  success: false,
272
275
  message: "Missing required parameter: boilerplateName"