@agiflowai/scaffold-mcp 1.0.26 → 1.1.0

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/cli.mjs CHANGED
@@ -1,13 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import { a as createServer, i as StdioTransportHandler, n as HttpTransportHandler, o as version, r as SseTransportHandler, t as TransportMode } from "./src-sY88BbkJ.mjs";
3
- import { n as ScaffoldingMethodsService, s as FileSystemService } from "./ListScaffoldingMethodsTool-D6BkKQyK.mjs";
4
- import { l as BoilerplateService } from "./tools-t-HMGLVh.mjs";
2
+ import { a as createServer, i as StdioTransportHandler, n as HttpTransportHandler, o as version, r as SseTransportHandler, t as TransportMode } from "./src-BEwgHhCT.mjs";
3
+ import { n as ScaffoldingMethodsService, s as FileSystemService } from "./ListScaffoldingMethodsTool-DxdrPlcb.mjs";
4
+ import { l as BoilerplateService } from "./tools-Cl06aoBi.mjs";
5
5
  import { ProjectConfigResolver, TemplatesManagerService, icons, messages, print, sections } from "@agiflowai/aicode-utils";
6
6
  import path from "node:path";
7
7
  import { Command } from "commander";
8
8
  import { CLAUDE_CODE, GEMINI_CLI, SUPPORTED_LLM_TOOLS, isValidLlmTool } from "@agiflowai/coding-agent-bridge";
9
9
  import { ClaudeCodeAdapter, GeminiCliAdapter, parseHookType } from "@agiflowai/hooks-adapter";
10
-
11
10
  //#region src/commands/boilerplate.ts
12
11
  /**
13
12
  * Boilerplate CLI command
@@ -65,9 +64,9 @@ boilerplateCommand.command("create <boilerplateName>").description("Create a new
65
64
  let allBoilerplates = [];
66
65
  let cursor;
67
66
  do {
68
- const result$1 = await boilerplateService.listBoilerplates(cursor);
69
- allBoilerplates = allBoilerplates.concat(result$1.boilerplates);
70
- cursor = result$1.nextCursor;
67
+ const result = await boilerplateService.listBoilerplates(cursor);
68
+ allBoilerplates = allBoilerplates.concat(result.boilerplates);
69
+ cursor = result.nextCursor;
71
70
  } while (cursor);
72
71
  messages.error(`Boilerplate '${boilerplateName}' not found.`);
73
72
  print.warning(`Available boilerplates: ${allBoilerplates.map((b) => b.name).join(", ")}`);
@@ -145,7 +144,6 @@ boilerplateCommand.command("info <boilerplateName>").description("Show detailed
145
144
  process.exit(1);
146
145
  }
147
146
  });
148
-
149
147
  //#endregion
150
148
  //#region src/commands/mcp-serve.ts
151
149
  /**
@@ -292,7 +290,6 @@ const mcpServeCommand = new Command("mcp-serve").description("Start MCP server w
292
290
  process.exit(1);
293
291
  }
294
292
  });
295
-
296
293
  //#endregion
297
294
  //#region src/commands/scaffold.ts
298
295
  /**
@@ -496,7 +493,6 @@ scaffoldCommand.command("info <featureName>").description("Show detailed informa
496
493
  process.exit(1);
497
494
  }
498
495
  });
499
-
500
496
  //#endregion
501
497
  //#region src/commands/hook.ts
502
498
  /**
@@ -578,7 +574,7 @@ const hookCommand = new Command("hook").description("Execute scaffold hooks for
578
574
  const resolvedAdapterConfig = Object.keys(adapterConfig).length > 0 ? adapterConfig : void 0;
579
575
  if (!isHookMethod(hookMethod)) process.exit(0);
580
576
  if (agent === CLAUDE_CODE) {
581
- const hookModule = await import("./claudeCode-Dozuzn4S.mjs");
577
+ const hookModule = await import("./claudeCode-DNgNiLlL.mjs");
582
578
  const claudeCallbacks = [];
583
579
  if (hookModule.UseScaffoldMethodHook) {
584
580
  const hookInstance = new hookModule.UseScaffoldMethodHook();
@@ -593,7 +589,7 @@ const hookCommand = new Command("hook").description("Execute scaffold hooks for
593
589
  if (claudeCallbacks.length === 0) process.exit(0);
594
590
  await new ClaudeCodeAdapter().executeMultiple(claudeCallbacks, resolvedAdapterConfig);
595
591
  } else if (agent === GEMINI_CLI) {
596
- const hookModule = await import("./geminiCli-CzgQDDMl.mjs");
592
+ const hookModule = await import("./geminiCli-CcrZEqsz.mjs");
597
593
  const geminiCallbacks = [];
598
594
  if (hookModule.UseScaffoldMethodHook) {
599
595
  const hookInstance = new hookModule.UseScaffoldMethodHook();
@@ -608,7 +604,6 @@ const hookCommand = new Command("hook").description("Execute scaffold hooks for
608
604
  process.exit(1);
609
605
  }
610
606
  });
611
-
612
607
  //#endregion
613
608
  //#region src/cli.ts
614
609
  /**
@@ -624,6 +619,5 @@ async function main() {
624
619
  await program.parseAsync(process.argv);
625
620
  }
626
621
  main();
627
-
628
622
  //#endregion
629
- export { };
623
+ export {};
@@ -1,8 +1,7 @@
1
- const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-DBwZzJTA.cjs');
2
- const require_shared = require('./shared-fkWett9D.cjs');
3
- let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
4
- let __agiflowai_hooks_adapter = require("@agiflowai/hooks-adapter");
5
-
1
+ const require_ListScaffoldingMethodsTool = require("./ListScaffoldingMethodsTool-CYZtpU-W.cjs");
2
+ const require_shared = require("./shared-QxPXh-L-.cjs");
3
+ let _agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
4
+ let _agiflowai_hooks_adapter = require("@agiflowai/hooks-adapter");
6
5
  //#region src/hooks/geminiCli/useScaffoldMethod.ts
7
6
  /**
8
7
  * UseScaffoldMethod Hook class for Gemini CLI
@@ -24,52 +23,52 @@ var UseScaffoldMethodHook = class {
24
23
  const filePath = context.tool_input?.file_path;
25
24
  const absoluteFilePath = await require_shared.resolveNewFileWriteTarget(context.cwd, context.tool_name, filePath);
26
25
  if (!absoluteFilePath || !filePath) return {
27
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
26
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
28
27
  message: "Not a new file write operation"
29
28
  };
30
- const executionLog = new __agiflowai_hooks_adapter.ExecutionLogService(context.session_id);
29
+ const executionLog = new _agiflowai_hooks_adapter.ExecutionLogService(context.session_id);
31
30
  const sessionKey = filePath;
32
31
  if (await executionLog.hasExecuted({
33
32
  filePath: sessionKey,
34
- decision: __agiflowai_hooks_adapter.DECISION_DENY
33
+ decision: _agiflowai_hooks_adapter.DECISION_DENY
35
34
  })) {
36
35
  await executionLog.logExecution({
37
36
  filePath: sessionKey,
38
37
  operation: "list-scaffold-methods",
39
- decision: __agiflowai_hooks_adapter.DECISION_SKIP
38
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP
40
39
  });
41
40
  return {
42
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
41
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
43
42
  message: "Scaffolding methods already provided in this session"
44
43
  };
45
44
  }
46
- const templatesPath = await __agiflowai_aicode_utils.TemplatesManagerService.findTemplatesPath();
45
+ const templatesPath = await _agiflowai_aicode_utils.TemplatesManagerService.findTemplatesPath();
47
46
  if (!templatesPath) return {
48
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
47
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
49
48
  message: "Templates folder not found - skipping scaffold method check"
50
49
  };
51
50
  const tool = new require_ListScaffoldingMethodsTool.ListScaffoldingMethodsTool(templatesPath, false);
52
- const projectPath = (await new __agiflowai_aicode_utils.ProjectFinderService(await __agiflowai_aicode_utils.TemplatesManagerService.getWorkspaceRoot(context.cwd)).findProjectForFile(absoluteFilePath))?.root || context.cwd;
51
+ const projectPath = (await new _agiflowai_aicode_utils.ProjectFinderService(await _agiflowai_aicode_utils.TemplatesManagerService.getWorkspaceRoot(context.cwd)).findProjectForFile(absoluteFilePath))?.root || context.cwd;
53
52
  const result = await tool.execute({ projectPath });
54
53
  const firstContent = result.content[0];
55
54
  if (firstContent?.type !== "text") return {
56
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
55
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
57
56
  message: "⚠️ Unexpected response type from scaffolding methods tool"
58
57
  };
59
58
  if (result.isError) {
60
59
  await executionLog.logExecution({
61
60
  filePath: sessionKey,
62
61
  operation: "list-scaffold-methods",
63
- decision: __agiflowai_hooks_adapter.DECISION_SKIP
62
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP
64
63
  });
65
64
  return {
66
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
65
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
67
66
  message: `⚠️ Could not load scaffolding methods: ${firstContent.text}`
68
67
  };
69
68
  }
70
69
  const resultText = firstContent.text;
71
70
  if (typeof resultText !== "string") return {
72
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
71
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
73
72
  message: "⚠️ Invalid response format from scaffolding methods tool"
74
73
  };
75
74
  const data = JSON.parse(resultText);
@@ -77,10 +76,10 @@ var UseScaffoldMethodHook = class {
77
76
  await executionLog.logExecution({
78
77
  filePath: sessionKey,
79
78
  operation: "list-scaffold-methods",
80
- decision: __agiflowai_hooks_adapter.DECISION_DENY
79
+ decision: _agiflowai_hooks_adapter.DECISION_DENY
81
80
  });
82
81
  return {
83
- decision: __agiflowai_hooks_adapter.DECISION_DENY,
82
+ decision: _agiflowai_hooks_adapter.DECISION_DENY,
84
83
  message: "No scaffolding methods are available for this project template. You should write new files directly using the Write tool."
85
84
  };
86
85
  }
@@ -88,15 +87,15 @@ var UseScaffoldMethodHook = class {
88
87
  await executionLog.logExecution({
89
88
  filePath: sessionKey,
90
89
  operation: "list-scaffold-methods",
91
- decision: __agiflowai_hooks_adapter.DECISION_DENY
90
+ decision: _agiflowai_hooks_adapter.DECISION_DENY
92
91
  });
93
92
  return {
94
- decision: __agiflowai_hooks_adapter.DECISION_DENY,
93
+ decision: _agiflowai_hooks_adapter.DECISION_DENY,
95
94
  message
96
95
  };
97
96
  } catch (error) {
98
97
  return {
99
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
98
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
100
99
  message: `⚠️ Hook error: ${error instanceof Error ? error.message : String(error)}`
101
100
  };
102
101
  }
@@ -110,30 +109,30 @@ var UseScaffoldMethodHook = class {
110
109
  */
111
110
  async postToolUse(context) {
112
111
  try {
113
- const executionLog = new __agiflowai_hooks_adapter.ExecutionLogService(context.session_id);
112
+ const executionLog = new _agiflowai_hooks_adapter.ExecutionLogService(context.session_id);
114
113
  const filePath = context.tool_input?.file_path;
115
114
  const actualToolName = context.tool_name === "mcp__one-mcp__use_tool" ? context.tool_input?.toolName : context.tool_name;
116
115
  if (actualToolName === "use-scaffold-method") return {
117
- decision: __agiflowai_hooks_adapter.DECISION_ALLOW,
116
+ decision: _agiflowai_hooks_adapter.DECISION_ALLOW,
118
117
  message: "Scaffold execution logged for progress tracking"
119
118
  };
120
119
  const operation = extractOperation(actualToolName);
121
120
  if (!filePath || operation !== "edit" && operation !== "write") return {
122
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
121
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
123
122
  message: "Not a file edit/write operation"
124
123
  };
125
124
  const lastScaffoldExecution = await getLastScaffoldExecution(executionLog);
126
125
  if (!lastScaffoldExecution) return {
127
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
126
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
128
127
  message: "No scaffold execution found"
129
128
  };
130
129
  const { scaffoldId, generatedFiles, featureName } = lastScaffoldExecution;
131
130
  const fulfilledKey = `scaffold-fulfilled-${scaffoldId}`;
132
131
  if (await executionLog.hasExecuted({
133
132
  filePath: fulfilledKey,
134
- decision: __agiflowai_hooks_adapter.DECISION_ALLOW
133
+ decision: _agiflowai_hooks_adapter.DECISION_ALLOW
135
134
  })) return {
136
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
135
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
137
136
  message: "Scaffold already fulfilled"
138
137
  };
139
138
  const isScaffoldedFile = generatedFiles.includes(filePath);
@@ -141,11 +140,11 @@ var UseScaffoldMethodHook = class {
141
140
  const editKey = `scaffold-edit-${scaffoldId}-${filePath}`;
142
141
  if (!await executionLog.hasExecuted({
143
142
  filePath: editKey,
144
- decision: __agiflowai_hooks_adapter.DECISION_ALLOW
143
+ decision: _agiflowai_hooks_adapter.DECISION_ALLOW
145
144
  })) await executionLog.logExecution({
146
145
  filePath: editKey,
147
146
  operation: "scaffold-file-edit",
148
- decision: __agiflowai_hooks_adapter.DECISION_ALLOW
147
+ decision: _agiflowai_hooks_adapter.DECISION_ALLOW
149
148
  });
150
149
  }
151
150
  const editedFiles = await getEditedScaffoldFiles(executionLog, scaffoldId);
@@ -155,17 +154,17 @@ var UseScaffoldMethodHook = class {
155
154
  await executionLog.logExecution({
156
155
  filePath: fulfilledKey,
157
156
  operation: "scaffold-fulfilled",
158
- decision: __agiflowai_hooks_adapter.DECISION_ALLOW
157
+ decision: _agiflowai_hooks_adapter.DECISION_ALLOW
159
158
  });
160
159
  return {
161
- decision: __agiflowai_hooks_adapter.DECISION_ALLOW,
160
+ decision: _agiflowai_hooks_adapter.DECISION_ALLOW,
162
161
  message: `✅ All scaffold files${featureName ? ` for "${featureName}"` : ""} have been implemented! (${totalFiles}/${totalFiles} files completed)`
163
162
  };
164
163
  }
165
164
  if (isScaffoldedFile) {
166
165
  const remainingFilesList = remainingFiles.map((f) => ` - ${f}`).join("\n");
167
166
  return {
168
- decision: __agiflowai_hooks_adapter.DECISION_ALLOW,
167
+ decision: _agiflowai_hooks_adapter.DECISION_ALLOW,
169
168
  message: `
170
169
  ⚠️ **Scaffold Implementation Progress${featureName ? ` for "${featureName}"` : ""}: ${editedFiles.length}/${totalFiles} files completed**
171
170
 
@@ -177,12 +176,12 @@ Don't forget to complete the implementation for all scaffolded files!
177
176
  };
178
177
  }
179
178
  return {
180
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
179
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
181
180
  message: "Edited file not part of last scaffold execution"
182
181
  };
183
182
  } catch (error) {
184
183
  return {
185
- decision: __agiflowai_hooks_adapter.DECISION_SKIP,
184
+ decision: _agiflowai_hooks_adapter.DECISION_SKIP,
186
185
  message: `⚠️ Hook error: ${error instanceof Error ? error.message : String(error)}`
187
186
  };
188
187
  }
@@ -237,6 +236,5 @@ async function getEditedScaffoldFiles(executionLog, scaffoldId) {
237
236
  return [];
238
237
  }
239
238
  }
240
-
241
239
  //#endregion
242
- exports.UseScaffoldMethodHook = UseScaffoldMethodHook;
240
+ exports.UseScaffoldMethodHook = UseScaffoldMethodHook;
@@ -1,8 +1,7 @@
1
- import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-D6BkKQyK.mjs";
2
- import { n as resolveNewFileWriteTarget, t as formatScaffoldMethodsHookMessage } from "./shared-oDx2Btq0.mjs";
1
+ import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-DxdrPlcb.mjs";
2
+ import { n as resolveNewFileWriteTarget, t as formatScaffoldMethodsHookMessage } from "./shared-BVYIN3Is.mjs";
3
3
  import { ProjectFinderService, TemplatesManagerService } from "@agiflowai/aicode-utils";
4
4
  import { DECISION_ALLOW, DECISION_DENY, DECISION_SKIP, ExecutionLogService } from "@agiflowai/hooks-adapter";
5
-
6
5
  //#region src/hooks/geminiCli/useScaffoldMethod.ts
7
6
  /**
8
7
  * UseScaffoldMethod Hook class for Gemini CLI
@@ -237,6 +236,5 @@ async function getEditedScaffoldFiles(executionLog, scaffoldId) {
237
236
  return [];
238
237
  }
239
238
  }
240
-
241
239
  //#endregion
242
- export { UseScaffoldMethodHook };
240
+ export { UseScaffoldMethodHook };
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
- const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-DBwZzJTA.cjs');
2
- const require_src = require('./src-DxoKQE4s.cjs');
3
- const require_tools = require('./tools-DsnQImJ1.cjs');
4
-
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_ListScaffoldingMethodsTool = require("./ListScaffoldingMethodsTool-CYZtpU-W.cjs");
3
+ const require_src = require("./src-oF_UdSBu.cjs");
4
+ const require_tools = require("./tools-CVSZSirE.cjs");
5
5
  exports.BoilerplateGeneratorService = require_tools.BoilerplateGeneratorService;
6
6
  exports.BoilerplateService = require_tools.BoilerplateService;
7
7
  exports.FileSystemService = require_ListScaffoldingMethodsTool.FileSystemService;
@@ -24,4 +24,4 @@ exports.UseBoilerplateTool = require_tools.UseBoilerplateTool;
24
24
  exports.UseScaffoldMethodTool = require_tools.UseScaffoldMethodTool;
25
25
  exports.VariableReplacementService = require_ListScaffoldingMethodsTool.VariableReplacementService;
26
26
  exports.WriteToFileTool = require_tools.WriteToFileTool;
27
- exports.createServer = require_src.createServer;
27
+ exports.createServer = require_src.createServer;
package/dist/index.d.cts CHANGED
@@ -21,7 +21,7 @@ declare enum TransportMode {
21
21
  STDIO = "stdio",
22
22
  HTTP = "http",
23
23
  SSE = "sse",
24
- CLI = "cli",
24
+ CLI = "cli"
25
25
  }
26
26
  /**
27
27
  * Transport configuration options
@@ -291,6 +291,7 @@ declare class WriteToFileTool {
291
291
  static readonly TOOL_NAME = "write-to-file";
292
292
  private fileSystemService;
293
293
  constructor();
294
+ private resolveWorkspaceFilePath;
294
295
  /**
295
296
  * Get the tool definition for MCP
296
297
  */
@@ -712,7 +713,6 @@ declare class FileSystemService implements IFileSystemService {
712
713
  }
713
714
  //#endregion
714
715
  //#region src/services/ScaffoldConfigLoader.d.ts
715
-
716
716
  declare class ScaffoldConfigLoader implements IScaffoldConfigLoader {
717
717
  private fileSystem;
718
718
  private templateService;
@@ -937,11 +937,7 @@ declare class VariableReplacementService implements IVariableReplacementService
937
937
  //#region src/types/tools.d.ts
938
938
  declare const scaffoldArgsSchema: z.ZodObject<{
939
939
  appName: z.ZodString;
940
- }, "strip", z.ZodTypeAny, {
941
- appName: string;
942
- }, {
943
- appName: string;
944
- }>;
940
+ }, z.core.$strip>;
945
941
  type ScaffoldArgs = z.infer<typeof scaffoldArgsSchema>;
946
942
  interface Tool {
947
943
  name: string;
package/dist/index.d.mts CHANGED
@@ -2,8 +2,6 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
2
2
  import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
3
3
  import { z } from "zod";
4
4
  import { JsonSchema } from "@composio/json-schema-to-zod";
5
- import "express";
6
-
7
5
  //#region src/server/index.d.ts
8
6
  interface ServerOptions {
9
7
  adminEnabled?: boolean;
@@ -22,7 +20,7 @@ declare enum TransportMode {
22
20
  STDIO = "stdio",
23
21
  HTTP = "http",
24
22
  SSE = "sse",
25
- CLI = "cli",
23
+ CLI = "cli"
26
24
  }
27
25
  /**
28
26
  * Transport configuration options
@@ -292,6 +290,7 @@ declare class WriteToFileTool {
292
290
  static readonly TOOL_NAME = "write-to-file";
293
291
  private fileSystemService;
294
292
  constructor();
293
+ private resolveWorkspaceFilePath;
295
294
  /**
296
295
  * Get the tool definition for MCP
297
296
  */
@@ -713,7 +712,6 @@ declare class FileSystemService implements IFileSystemService {
713
712
  }
714
713
  //#endregion
715
714
  //#region src/services/ScaffoldConfigLoader.d.ts
716
-
717
715
  declare class ScaffoldConfigLoader implements IScaffoldConfigLoader {
718
716
  private fileSystem;
719
717
  private templateService;
@@ -938,11 +936,7 @@ declare class VariableReplacementService implements IVariableReplacementService
938
936
  //#region src/types/tools.d.ts
939
937
  declare const scaffoldArgsSchema: z.ZodObject<{
940
938
  appName: z.ZodString;
941
- }, "strip", z.ZodTypeAny, {
942
- appName: string;
943
- }, {
944
- appName: string;
945
- }>;
939
+ }, z.core.$strip>;
946
940
  type ScaffoldArgs = z.infer<typeof scaffoldArgsSchema>;
947
941
  interface Tool {
948
942
  name: string;
package/dist/index.mjs CHANGED
@@ -1,5 +1,4 @@
1
- import { a as createServer, i as StdioTransportHandler, n as HttpTransportHandler, r as SseTransportHandler, t as TransportMode } from "./src-sY88BbkJ.mjs";
2
- import { a as ScaffoldProcessingService, i as ScaffoldService, l as TemplateService, n as ScaffoldingMethodsService, o as ScaffoldConfigLoader, r as VariableReplacementService, s as FileSystemService, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-D6BkKQyK.mjs";
3
- import { a as GenerateFeatureScaffoldTool, c as ScaffoldGeneratorService, i as ListBoilerplatesTool, l as BoilerplateService, n as UseScaffoldMethodTool, o as GenerateBoilerplateTool, r as UseBoilerplateTool, s as GenerateBoilerplateFileTool, t as WriteToFileTool, u as BoilerplateGeneratorService } from "./tools-t-HMGLVh.mjs";
4
-
5
- export { BoilerplateGeneratorService, BoilerplateService, FileSystemService, GenerateBoilerplateFileTool, GenerateBoilerplateTool, GenerateFeatureScaffoldTool, HttpTransportHandler, ListBoilerplatesTool, ListScaffoldingMethodsTool, ScaffoldConfigLoader, ScaffoldGeneratorService, ScaffoldProcessingService, ScaffoldService, ScaffoldingMethodsService, SseTransportHandler, StdioTransportHandler, TemplateService, TransportMode, UseBoilerplateTool, UseScaffoldMethodTool, VariableReplacementService, WriteToFileTool, createServer };
1
+ import { a as createServer, i as StdioTransportHandler, n as HttpTransportHandler, r as SseTransportHandler, t as TransportMode } from "./src-BEwgHhCT.mjs";
2
+ import { a as ScaffoldProcessingService, i as ScaffoldService, l as TemplateService, n as ScaffoldingMethodsService, o as ScaffoldConfigLoader, r as VariableReplacementService, s as FileSystemService, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-DxdrPlcb.mjs";
3
+ import { a as GenerateFeatureScaffoldTool, c as ScaffoldGeneratorService, i as ListBoilerplatesTool, l as BoilerplateService, n as UseScaffoldMethodTool, o as GenerateBoilerplateTool, r as UseBoilerplateTool, s as GenerateBoilerplateFileTool, t as WriteToFileTool, u as BoilerplateGeneratorService } from "./tools-Cl06aoBi.mjs";
4
+ export { BoilerplateGeneratorService, BoilerplateService, FileSystemService, GenerateBoilerplateFileTool, GenerateBoilerplateTool, GenerateFeatureScaffoldTool, HttpTransportHandler, ListBoilerplatesTool, ListScaffoldingMethodsTool, ScaffoldConfigLoader, ScaffoldGeneratorService, ScaffoldProcessingService, ScaffoldService, ScaffoldingMethodsService, SseTransportHandler, StdioTransportHandler, TemplateService, TransportMode, UseBoilerplateTool, UseScaffoldMethodTool, VariableReplacementService, WriteToFileTool, createServer };
@@ -1,10 +1,5 @@
1
1
  import path from "node:path";
2
2
  import fs from "node:fs/promises";
3
-
4
- //#region src/hooks/shared.ts
5
- const MAX_SCAFFOLD_METHODS_IN_HOOK = 5;
6
- const MAX_REQUIRED_VARS_IN_HOOK = 3;
7
- const REQUIRED_VARS_METHOD_LIMIT = 2;
8
3
  async function resolveNewFileWriteTarget(cwd, toolName, filePath) {
9
4
  if (!filePath || toolName.toLowerCase() !== "write") return null;
10
5
  const absoluteFilePath = path.isAbsolute(filePath) ? filePath : path.join(cwd, filePath);
@@ -18,9 +13,9 @@ async function resolveNewFileWriteTarget(cwd, toolName, filePath) {
18
13
  }
19
14
  }
20
15
  function formatScaffoldMethodsHookMessage(methods, options) {
21
- const maxMethods = options?.maxMethods ?? MAX_SCAFFOLD_METHODS_IN_HOOK;
22
- const requiredVarsMethodLimit = options?.requiredVarsMethodLimit ?? REQUIRED_VARS_METHOD_LIMIT;
23
- const maxRequiredVars = options?.maxRequiredVars ?? MAX_REQUIRED_VARS_IN_HOOK;
16
+ const maxMethods = options?.maxMethods ?? 5;
17
+ const requiredVarsMethodLimit = options?.requiredVarsMethodLimit ?? 2;
18
+ const maxRequiredVars = options?.maxRequiredVars ?? 3;
24
19
  const visibleMethods = methods.slice(0, maxMethods);
25
20
  const hiddenCount = Math.max(methods.length - visibleMethods.length, 0);
26
21
  let message = "Before writing this new file, use `use-scaffold-method` if any of these fit:\n\n";
@@ -39,6 +34,5 @@ function formatScaffoldMethodsHookMessage(methods, options) {
39
34
  if (hiddenCount > 0) message += `\n...and ${hiddenCount} more methods. Call \`list-scaffolding-methods\` for the full list.\n`;
40
35
  return message.trimEnd();
41
36
  }
42
-
43
37
  //#endregion
44
- export { resolveNewFileWriteTarget as n, formatScaffoldMethodsHookMessage as t };
38
+ export { resolveNewFileWriteTarget as n, formatScaffoldMethodsHookMessage as t };
@@ -1,13 +1,8 @@
1
- const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-DBwZzJTA.cjs');
1
+ const require_ListScaffoldingMethodsTool = require("./ListScaffoldingMethodsTool-CYZtpU-W.cjs");
2
2
  let node_path = require("node:path");
3
- node_path = require_ListScaffoldingMethodsTool.__toESM(node_path);
3
+ node_path = require_ListScaffoldingMethodsTool.__toESM(node_path, 1);
4
4
  let node_fs_promises = require("node:fs/promises");
5
- node_fs_promises = require_ListScaffoldingMethodsTool.__toESM(node_fs_promises);
6
-
7
- //#region src/hooks/shared.ts
8
- const MAX_SCAFFOLD_METHODS_IN_HOOK = 5;
9
- const MAX_REQUIRED_VARS_IN_HOOK = 3;
10
- const REQUIRED_VARS_METHOD_LIMIT = 2;
5
+ node_fs_promises = require_ListScaffoldingMethodsTool.__toESM(node_fs_promises, 1);
11
6
  async function resolveNewFileWriteTarget(cwd, toolName, filePath) {
12
7
  if (!filePath || toolName.toLowerCase() !== "write") return null;
13
8
  const absoluteFilePath = node_path.default.isAbsolute(filePath) ? filePath : node_path.default.join(cwd, filePath);
@@ -21,9 +16,9 @@ async function resolveNewFileWriteTarget(cwd, toolName, filePath) {
21
16
  }
22
17
  }
23
18
  function formatScaffoldMethodsHookMessage(methods, options) {
24
- const maxMethods = options?.maxMethods ?? MAX_SCAFFOLD_METHODS_IN_HOOK;
25
- const requiredVarsMethodLimit = options?.requiredVarsMethodLimit ?? REQUIRED_VARS_METHOD_LIMIT;
26
- const maxRequiredVars = options?.maxRequiredVars ?? MAX_REQUIRED_VARS_IN_HOOK;
19
+ const maxMethods = options?.maxMethods ?? 5;
20
+ const requiredVarsMethodLimit = options?.requiredVarsMethodLimit ?? 2;
21
+ const maxRequiredVars = options?.maxRequiredVars ?? 3;
27
22
  const visibleMethods = methods.slice(0, maxMethods);
28
23
  const hiddenCount = Math.max(methods.length - visibleMethods.length, 0);
29
24
  let message = "Before writing this new file, use `use-scaffold-method` if any of these fit:\n\n";
@@ -42,17 +37,16 @@ function formatScaffoldMethodsHookMessage(methods, options) {
42
37
  if (hiddenCount > 0) message += `\n...and ${hiddenCount} more methods. Call \`list-scaffolding-methods\` for the full list.\n`;
43
38
  return message.trimEnd();
44
39
  }
45
-
46
40
  //#endregion
47
- Object.defineProperty(exports, 'formatScaffoldMethodsHookMessage', {
48
- enumerable: true,
49
- get: function () {
50
- return formatScaffoldMethodsHookMessage;
51
- }
41
+ Object.defineProperty(exports, "formatScaffoldMethodsHookMessage", {
42
+ enumerable: true,
43
+ get: function() {
44
+ return formatScaffoldMethodsHookMessage;
45
+ }
46
+ });
47
+ Object.defineProperty(exports, "resolveNewFileWriteTarget", {
48
+ enumerable: true,
49
+ get: function() {
50
+ return resolveNewFileWriteTarget;
51
+ }
52
52
  });
53
- Object.defineProperty(exports, 'resolveNewFileWriteTarget', {
54
- enumerable: true,
55
- get: function () {
56
- return resolveNewFileWriteTarget;
57
- }
58
- });