@agiflowai/scaffold-mcp 1.0.11 → 1.0.12
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-D3ecmSLf.mjs +994 -0
- package/dist/ListScaffoldingMethodsTool-D7S3xpJE.cjs +1082 -0
- package/dist/cli.cjs +11 -16
- package/dist/cli.mjs +5 -9
- package/dist/index.cjs +7 -11
- package/dist/index.mjs +2 -6
- package/dist/{stdio-AbTm52SJ.mjs → stdio-DqZJsqKM.mjs} +15 -18
- package/dist/{stdio-baUp7xGL.cjs → stdio-ohQyWnxq.cjs} +24 -28
- package/dist/{useScaffoldMethod-CPgJIBHx.mjs → useScaffoldMethod-B-q_yBnX.mjs} +1 -2
- package/dist/{useScaffoldMethod-BMWhFebp.mjs → useScaffoldMethod-CC8ARsl9.mjs} +7 -5
- package/dist/{useScaffoldMethod-CcrpFEPv.cjs → useScaffoldMethod-DqF6pT1A.cjs} +1 -3
- package/dist/{useScaffoldMethod-DOvwnNOJ.cjs → useScaffoldMethod-fzsnprJs.cjs} +10 -9
- package/package.json +5 -5
- package/dist/ListScaffoldingMethodsTool-B49G_iLj.mjs +0 -350
- package/dist/ListScaffoldingMethodsTool-DuYGFDwJ.cjs +0 -376
- package/dist/ScaffoldConfigLoader-8YI7v2GJ.mjs +0 -142
- package/dist/ScaffoldConfigLoader-BWpNpMx-.cjs +0 -150
- package/dist/ScaffoldConfigLoader-DKJtnrWT.mjs +0 -3
- package/dist/ScaffoldConfigLoader-HutEtfaH.cjs +0 -3
- package/dist/ScaffoldService-DSQBnAHm.cjs +0 -308
- package/dist/ScaffoldService-DcsGLMuD.mjs +0 -295
- package/dist/ScaffoldService-DfXjmrNT.cjs +0 -3
- package/dist/ScaffoldService-dL74anIv.mjs +0 -3
- package/dist/TemplateService-7QcWREot.cjs +0 -85
- package/dist/TemplateService-B1bd6iHw.mjs +0 -3
- package/dist/TemplateService-CVDL2uqt.mjs +0 -79
- package/dist/TemplateService-DUbdBOFs.cjs +0 -3
- package/dist/VariableReplacementService-B9RA8D0a.mjs +0 -66
- package/dist/VariableReplacementService-BO-UYgcf.mjs +0 -3
- package/dist/VariableReplacementService-DNYx0Dym.cjs +0 -73
- package/dist/VariableReplacementService-wuYKgeui.cjs +0 -3
- package/dist/chunk-CbDLau6x.cjs +0 -34
package/dist/cli.cjs
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const
|
|
3
|
-
const require_stdio = require('./stdio-
|
|
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');
|
|
2
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-D7S3xpJE.cjs');
|
|
3
|
+
const require_stdio = require('./stdio-ohQyWnxq.cjs');
|
|
9
4
|
let node_path = require("node:path");
|
|
10
|
-
node_path =
|
|
5
|
+
node_path = require_ListScaffoldingMethodsTool.__toESM(node_path);
|
|
11
6
|
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
12
7
|
let zod = require("zod");
|
|
13
8
|
let __modelcontextprotocol_sdk_types_js = require("@modelcontextprotocol/sdk/types.js");
|
|
@@ -17,7 +12,7 @@ let __agiflowai_coding_agent_bridge = require("@agiflowai/coding-agent-bridge");
|
|
|
17
12
|
let __agiflowai_hooks_adapter = require("@agiflowai/hooks-adapter");
|
|
18
13
|
|
|
19
14
|
//#region package.json
|
|
20
|
-
var version = "1.0.
|
|
15
|
+
var version = "1.0.14";
|
|
21
16
|
|
|
22
17
|
//#endregion
|
|
23
18
|
//#region src/commands/boilerplate.ts
|
|
@@ -180,7 +175,7 @@ const generateBoilerplatePromptOptionsSchema = zod.z.object({
|
|
|
180
175
|
*/
|
|
181
176
|
var GenerateBoilerplatePrompt = class GenerateBoilerplatePrompt {
|
|
182
177
|
static PROMPT_NAME = "generate-boilerplate";
|
|
183
|
-
templateService = new
|
|
178
|
+
templateService = new require_ListScaffoldingMethodsTool.TemplateService();
|
|
184
179
|
options;
|
|
185
180
|
constructor(options = {}) {
|
|
186
181
|
try {
|
|
@@ -240,7 +235,7 @@ const generateFeatureScaffoldPromptOptionsSchema = zod.z.object({
|
|
|
240
235
|
*/
|
|
241
236
|
var GenerateFeatureScaffoldPrompt = class GenerateFeatureScaffoldPrompt {
|
|
242
237
|
static PROMPT_NAME = "generate-feature-scaffold";
|
|
243
|
-
templateService = new
|
|
238
|
+
templateService = new require_ListScaffoldingMethodsTool.TemplateService();
|
|
244
239
|
options;
|
|
245
240
|
constructor(options = {}) {
|
|
246
241
|
try {
|
|
@@ -300,7 +295,7 @@ const scaffoldApplicationPromptOptionsSchema = zod.z.object({
|
|
|
300
295
|
*/
|
|
301
296
|
var ScaffoldApplicationPrompt = class ScaffoldApplicationPrompt {
|
|
302
297
|
static PROMPT_NAME = "scaffold-application";
|
|
303
|
-
templateService = new
|
|
298
|
+
templateService = new require_ListScaffoldingMethodsTool.TemplateService();
|
|
304
299
|
options;
|
|
305
300
|
constructor(options = {}) {
|
|
306
301
|
try {
|
|
@@ -360,7 +355,7 @@ const scaffoldFeaturePromptOptionsSchema = zod.z.object({
|
|
|
360
355
|
*/
|
|
361
356
|
var ScaffoldFeaturePrompt = class ScaffoldFeaturePrompt {
|
|
362
357
|
static PROMPT_NAME = "scaffold-feature";
|
|
363
|
-
templateService = new
|
|
358
|
+
templateService = new require_ListScaffoldingMethodsTool.TemplateService();
|
|
364
359
|
options;
|
|
365
360
|
constructor(options = {}) {
|
|
366
361
|
try {
|
|
@@ -438,7 +433,7 @@ function createServer(options = {}) {
|
|
|
438
433
|
isMonolith,
|
|
439
434
|
promptAsSkill
|
|
440
435
|
});
|
|
441
|
-
const instructions = new
|
|
436
|
+
const instructions = new require_ListScaffoldingMethodsTool.TemplateService().renderString(server_default, {
|
|
442
437
|
adminEnabled,
|
|
443
438
|
isMonolith
|
|
444
439
|
});
|
|
@@ -833,7 +828,7 @@ const hookCommand = new commander.Command("hook").description("Execute scaffold
|
|
|
833
828
|
}
|
|
834
829
|
const { agent, hookMethod } = (0, __agiflowai_hooks_adapter.parseHookType)(options.type);
|
|
835
830
|
if (agent === __agiflowai_coding_agent_bridge.CLAUDE_CODE) {
|
|
836
|
-
const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-
|
|
831
|
+
const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-fzsnprJs.cjs"));
|
|
837
832
|
const claudeCallbacks = [];
|
|
838
833
|
if (useScaffoldMethodModule.UseScaffoldMethodHook) {
|
|
839
834
|
const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
|
|
@@ -846,7 +841,7 @@ const hookCommand = new commander.Command("hook").description("Execute scaffold
|
|
|
846
841
|
}
|
|
847
842
|
await new __agiflowai_hooks_adapter.ClaudeCodeAdapter().executeMultiple(claudeCallbacks);
|
|
848
843
|
} else if (agent === __agiflowai_coding_agent_bridge.GEMINI_CLI) {
|
|
849
|
-
const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-
|
|
844
|
+
const useScaffoldMethodModule = await Promise.resolve().then(() => require("./useScaffoldMethod-DqF6pT1A.cjs"));
|
|
850
845
|
const geminiCallbacks = [];
|
|
851
846
|
if (useScaffoldMethodModule.UseScaffoldMethodHook) {
|
|
852
847
|
const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
|
package/dist/cli.mjs
CHANGED
|
@@ -1,10 +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 {
|
|
4
|
-
import "./ScaffoldConfigLoader-8YI7v2GJ.mjs";
|
|
5
|
-
import "./ScaffoldService-DcsGLMuD.mjs";
|
|
6
|
-
import { t as TemplateService } from "./TemplateService-CVDL2uqt.mjs";
|
|
7
|
-
import "./VariableReplacementService-B9RA8D0a.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-DqZJsqKM.mjs";
|
|
3
|
+
import { c as FileSystemService, i as TemplateService, n as ScaffoldingMethodsService, t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-D3ecmSLf.mjs";
|
|
8
4
|
import path from "node:path";
|
|
9
5
|
import { ProjectConfigResolver, TemplatesManagerService, icons, messages, print, sections } from "@agiflowai/aicode-utils";
|
|
10
6
|
import { z } from "zod";
|
|
@@ -15,7 +11,7 @@ import { CLAUDE_CODE, GEMINI_CLI } from "@agiflowai/coding-agent-bridge";
|
|
|
15
11
|
import { ClaudeCodeAdapter, GeminiCliAdapter, parseHookType } from "@agiflowai/hooks-adapter";
|
|
16
12
|
|
|
17
13
|
//#region package.json
|
|
18
|
-
var version = "1.0.
|
|
14
|
+
var version = "1.0.14";
|
|
19
15
|
|
|
20
16
|
//#endregion
|
|
21
17
|
//#region src/commands/boilerplate.ts
|
|
@@ -831,7 +827,7 @@ const hookCommand = new Command("hook").description("Execute scaffold hooks for
|
|
|
831
827
|
}
|
|
832
828
|
const { agent, hookMethod } = parseHookType(options.type);
|
|
833
829
|
if (agent === CLAUDE_CODE) {
|
|
834
|
-
const useScaffoldMethodModule = await import("./useScaffoldMethod-
|
|
830
|
+
const useScaffoldMethodModule = await import("./useScaffoldMethod-CC8ARsl9.mjs");
|
|
835
831
|
const claudeCallbacks = [];
|
|
836
832
|
if (useScaffoldMethodModule.UseScaffoldMethodHook) {
|
|
837
833
|
const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
|
|
@@ -844,7 +840,7 @@ const hookCommand = new Command("hook").description("Execute scaffold hooks for
|
|
|
844
840
|
}
|
|
845
841
|
await new ClaudeCodeAdapter().executeMultiple(claudeCallbacks);
|
|
846
842
|
} else if (agent === GEMINI_CLI) {
|
|
847
|
-
const useScaffoldMethodModule = await import("./useScaffoldMethod-
|
|
843
|
+
const useScaffoldMethodModule = await import("./useScaffoldMethod-B-q_yBnX.mjs");
|
|
848
844
|
const geminiCallbacks = [];
|
|
849
845
|
if (useScaffoldMethodModule.UseScaffoldMethodHook) {
|
|
850
846
|
const hookInstance = new useScaffoldMethodModule.UseScaffoldMethodHook();
|
package/dist/index.cjs
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
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');
|
|
1
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-D7S3xpJE.cjs');
|
|
2
|
+
const require_stdio = require('./stdio-ohQyWnxq.cjs');
|
|
7
3
|
|
|
8
4
|
exports.BoilerplateGeneratorService = require_stdio.BoilerplateGeneratorService;
|
|
9
5
|
exports.BoilerplateService = require_stdio.BoilerplateService;
|
|
@@ -14,15 +10,15 @@ exports.GenerateFeatureScaffoldTool = require_stdio.GenerateFeatureScaffoldTool;
|
|
|
14
10
|
exports.HttpTransportHandler = require_stdio.HttpTransportHandler;
|
|
15
11
|
exports.ListBoilerplatesTool = require_stdio.ListBoilerplatesTool;
|
|
16
12
|
exports.ListScaffoldingMethodsTool = require_ListScaffoldingMethodsTool.ListScaffoldingMethodsTool;
|
|
17
|
-
exports.ScaffoldConfigLoader =
|
|
13
|
+
exports.ScaffoldConfigLoader = require_ListScaffoldingMethodsTool.ScaffoldConfigLoader;
|
|
18
14
|
exports.ScaffoldGeneratorService = require_stdio.ScaffoldGeneratorService;
|
|
19
|
-
exports.ScaffoldProcessingService =
|
|
20
|
-
exports.ScaffoldService =
|
|
15
|
+
exports.ScaffoldProcessingService = require_ListScaffoldingMethodsTool.ScaffoldProcessingService;
|
|
16
|
+
exports.ScaffoldService = require_ListScaffoldingMethodsTool.ScaffoldService;
|
|
21
17
|
exports.ScaffoldingMethodsService = require_ListScaffoldingMethodsTool.ScaffoldingMethodsService;
|
|
22
18
|
exports.SseTransportHandler = require_stdio.SseTransportHandler;
|
|
23
19
|
exports.StdioTransportHandler = require_stdio.StdioTransportHandler;
|
|
24
|
-
exports.TemplateService =
|
|
20
|
+
exports.TemplateService = require_ListScaffoldingMethodsTool.TemplateService;
|
|
25
21
|
exports.UseBoilerplateTool = require_stdio.UseBoilerplateTool;
|
|
26
22
|
exports.UseScaffoldMethodTool = require_stdio.UseScaffoldMethodTool;
|
|
27
|
-
exports.VariableReplacementService =
|
|
23
|
+
exports.VariableReplacementService = require_ListScaffoldingMethodsTool.VariableReplacementService;
|
|
28
24
|
exports.WriteToFileTool = require_stdio.WriteToFileTool;
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +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 { n as ScaffoldingMethodsService, r as
|
|
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";
|
|
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";
|
|
7
3
|
|
|
8
4
|
export { BoilerplateGeneratorService, BoilerplateService, FileSystemService, GenerateBoilerplateFileTool, GenerateBoilerplateTool, GenerateFeatureScaffoldTool, HttpTransportHandler, ListBoilerplatesTool, ListScaffoldingMethodsTool, ScaffoldConfigLoader, ScaffoldGeneratorService, ScaffoldProcessingService, ScaffoldService, ScaffoldingMethodsService, SseTransportHandler, StdioTransportHandler, TemplateService, UseBoilerplateTool, UseScaffoldMethodTool, VariableReplacementService, WriteToFileTool };
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { i as PaginationHelper, n as ScaffoldingMethodsService, r as
|
|
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";
|
|
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";
|
|
6
2
|
import * as path$1 from "node:path";
|
|
7
3
|
import path from "node:path";
|
|
8
4
|
import { ProjectConfigResolver, ensureDir, generateStableId, log, pathExists, pathExistsSync, readFile, readFileSync, readdir, statSync, writeFile } from "@agiflowai/aicode-utils";
|
|
@@ -253,23 +249,24 @@ var BoilerplateService = class {
|
|
|
253
249
|
*/
|
|
254
250
|
async useBoilerplate(request) {
|
|
255
251
|
let { boilerplateName, variables, monolith, targetFolderOverride } = request;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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 {
|
|
261
260
|
monolith = false;
|
|
262
261
|
log.info("No project configuration found, defaulting to monorepo mode");
|
|
263
262
|
}
|
|
264
|
-
if (monolith && !boilerplateName)
|
|
265
|
-
boilerplateName =
|
|
263
|
+
if (monolith && !boilerplateName) if (projectConfig) {
|
|
264
|
+
boilerplateName = projectConfig.sourceTemplate;
|
|
266
265
|
log.info(`Using boilerplate from toolkit.yaml: ${boilerplateName}`);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
};
|
|
272
|
-
}
|
|
266
|
+
} else return {
|
|
267
|
+
success: false,
|
|
268
|
+
message: "Failed to read boilerplate name from toolkit.yaml: No project configuration found"
|
|
269
|
+
};
|
|
273
270
|
if (!boilerplateName) return {
|
|
274
271
|
success: false,
|
|
275
272
|
message: "Missing required parameter: boilerplateName"
|
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
const
|
|
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');
|
|
1
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-D7S3xpJE.cjs');
|
|
7
2
|
let node_path = require("node:path");
|
|
8
|
-
node_path =
|
|
3
|
+
node_path = require_ListScaffoldingMethodsTool.__toESM(node_path);
|
|
9
4
|
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
10
5
|
let js_yaml = require("js-yaml");
|
|
11
|
-
js_yaml =
|
|
6
|
+
js_yaml = require_ListScaffoldingMethodsTool.__toESM(js_yaml);
|
|
12
7
|
let node_fs = require("node:fs");
|
|
13
8
|
let __composio_json_schema_to_zod = require("@composio/json-schema-to-zod");
|
|
14
9
|
let zod = require("zod");
|
|
15
10
|
let node_fs_promises = require("node:fs/promises");
|
|
16
|
-
node_fs_promises =
|
|
11
|
+
node_fs_promises = require_ListScaffoldingMethodsTool.__toESM(node_fs_promises);
|
|
17
12
|
let node_os = require("node:os");
|
|
18
|
-
node_os =
|
|
13
|
+
node_os = require_ListScaffoldingMethodsTool.__toESM(node_os);
|
|
19
14
|
let node_crypto = require("node:crypto");
|
|
20
15
|
let __modelcontextprotocol_sdk_server_streamableHttp_js = require("@modelcontextprotocol/sdk/server/streamableHttp.js");
|
|
21
16
|
let __modelcontextprotocol_sdk_types_js = require("@modelcontextprotocol/sdk/types.js");
|
|
22
17
|
let express = require("express");
|
|
23
|
-
express =
|
|
18
|
+
express = require_ListScaffoldingMethodsTool.__toESM(express);
|
|
24
19
|
let __modelcontextprotocol_sdk_server_sse_js = require("@modelcontextprotocol/sdk/server/sse.js");
|
|
25
20
|
let __modelcontextprotocol_sdk_server_stdio_js = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
26
21
|
|
|
@@ -190,9 +185,9 @@ var BoilerplateService = class {
|
|
|
190
185
|
scaffoldService;
|
|
191
186
|
constructor(templatesPath) {
|
|
192
187
|
this.templatesPath = templatesPath;
|
|
193
|
-
this.templateService = new
|
|
188
|
+
this.templateService = new require_ListScaffoldingMethodsTool.TemplateService();
|
|
194
189
|
const fileSystemService = new require_ListScaffoldingMethodsTool.FileSystemService();
|
|
195
|
-
this.scaffoldService = new
|
|
190
|
+
this.scaffoldService = new require_ListScaffoldingMethodsTool.ScaffoldService(fileSystemService, new require_ListScaffoldingMethodsTool.ScaffoldConfigLoader(fileSystemService, this.templateService), new require_ListScaffoldingMethodsTool.VariableReplacementService(fileSystemService, this.templateService), templatesPath);
|
|
196
191
|
}
|
|
197
192
|
/**
|
|
198
193
|
* Scans all scaffold.yaml files and returns available boilerplates with pagination
|
|
@@ -258,23 +253,24 @@ var BoilerplateService = class {
|
|
|
258
253
|
*/
|
|
259
254
|
async useBoilerplate(request) {
|
|
260
255
|
let { boilerplateName, variables, monolith, targetFolderOverride } = request;
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
256
|
+
let projectConfig = null;
|
|
257
|
+
if (monolith === void 0 || monolith && !boilerplateName) try {
|
|
258
|
+
projectConfig = await __agiflowai_aicode_utils.ProjectConfigResolver.resolveProjectConfig(process.cwd());
|
|
259
|
+
} catch (_error) {}
|
|
260
|
+
if (monolith === void 0) if (projectConfig) {
|
|
261
|
+
monolith = projectConfig.type === "monolith";
|
|
262
|
+
__agiflowai_aicode_utils.log.info(`Auto-detected project type: ${projectConfig.type}`);
|
|
263
|
+
} else {
|
|
266
264
|
monolith = false;
|
|
267
265
|
__agiflowai_aicode_utils.log.info("No project configuration found, defaulting to monorepo mode");
|
|
268
266
|
}
|
|
269
|
-
if (monolith && !boilerplateName)
|
|
270
|
-
boilerplateName =
|
|
267
|
+
if (monolith && !boilerplateName) if (projectConfig) {
|
|
268
|
+
boilerplateName = projectConfig.sourceTemplate;
|
|
271
269
|
__agiflowai_aicode_utils.log.info(`Using boilerplate from toolkit.yaml: ${boilerplateName}`);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
};
|
|
277
|
-
}
|
|
270
|
+
} else return {
|
|
271
|
+
success: false,
|
|
272
|
+
message: "Failed to read boilerplate name from toolkit.yaml: No project configuration found"
|
|
273
|
+
};
|
|
278
274
|
if (!boilerplateName) return {
|
|
279
275
|
success: false,
|
|
280
276
|
message: "Missing required parameter: boilerplateName"
|
|
@@ -1193,7 +1189,7 @@ var ListBoilerplatesTool = class ListBoilerplatesTool {
|
|
|
1193
1189
|
isMonolith;
|
|
1194
1190
|
constructor(templatesPath, isMonolith = false) {
|
|
1195
1191
|
this.boilerplateService = new BoilerplateService(templatesPath);
|
|
1196
|
-
this.templateService = new
|
|
1192
|
+
this.templateService = new require_ListScaffoldingMethodsTool.TemplateService();
|
|
1197
1193
|
this.isMonolith = isMonolith;
|
|
1198
1194
|
}
|
|
1199
1195
|
/**
|
|
@@ -1250,7 +1246,7 @@ var UseBoilerplateTool = class UseBoilerplateTool {
|
|
|
1250
1246
|
isMonolith;
|
|
1251
1247
|
constructor(templatesPath, isMonolith = false) {
|
|
1252
1248
|
this.boilerplateService = new BoilerplateService(templatesPath);
|
|
1253
|
-
this.templateService = new
|
|
1249
|
+
this.templateService = new require_ListScaffoldingMethodsTool.TemplateService();
|
|
1254
1250
|
this.isMonolith = isMonolith;
|
|
1255
1251
|
}
|
|
1256
1252
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-
|
|
2
|
-
import "./TemplateService-CVDL2uqt.mjs";
|
|
1
|
+
import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-D3ecmSLf.mjs";
|
|
3
2
|
import { TemplatesManagerService } from "@agiflowai/aicode-utils";
|
|
4
3
|
import { DECISION_ALLOW, DECISION_DENY, DECISION_SKIP, ExecutionLogService } from "@agiflowai/hooks-adapter";
|
|
5
4
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-
|
|
2
|
-
import "./TemplateService-CVDL2uqt.mjs";
|
|
1
|
+
import { t as ListScaffoldingMethodsTool } from "./ListScaffoldingMethodsTool-D3ecmSLf.mjs";
|
|
3
2
|
import path from "node:path";
|
|
4
3
|
import { ProjectFinderService, TemplatesManagerService } from "@agiflowai/aicode-utils";
|
|
5
4
|
import fs from "node:fs/promises";
|
|
@@ -29,6 +28,11 @@ var UseScaffoldMethodHook = class {
|
|
|
29
28
|
decision: DECISION_SKIP,
|
|
30
29
|
message: "Not a file write operation"
|
|
31
30
|
};
|
|
31
|
+
const absoluteFilePath = path.isAbsolute(filePath) ? filePath : path.join(context.cwd, filePath);
|
|
32
|
+
if (!absoluteFilePath.startsWith(context.cwd + path.sep) && absoluteFilePath !== context.cwd) return {
|
|
33
|
+
decision: DECISION_SKIP,
|
|
34
|
+
message: "File is outside working directory - skipping scaffold method check"
|
|
35
|
+
};
|
|
32
36
|
const executionLog = new ExecutionLogService(context.session_id);
|
|
33
37
|
if (await executionLog.hasExecuted({
|
|
34
38
|
filePath,
|
|
@@ -43,9 +47,7 @@ var UseScaffoldMethodHook = class {
|
|
|
43
47
|
message: "Templates folder not found - skipping scaffold method check"
|
|
44
48
|
};
|
|
45
49
|
const tool = new ListScaffoldingMethodsTool(templatesPath, false);
|
|
46
|
-
const
|
|
47
|
-
const absoluteFilePath = path.isAbsolute(filePath) ? filePath : path.join(context.cwd, filePath);
|
|
48
|
-
const projectPath = (await projectFinder.findProjectForFile(absoluteFilePath))?.root || context.cwd;
|
|
50
|
+
const projectPath = (await new ProjectFinderService(await TemplatesManagerService.getWorkspaceRoot(context.cwd)).findProjectForFile(absoluteFilePath))?.root || context.cwd;
|
|
49
51
|
const result = await tool.execute({ projectPath });
|
|
50
52
|
const firstContent = result.content[0];
|
|
51
53
|
if (firstContent?.type !== "text") return {
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-DuYGFDwJ.cjs');
|
|
3
|
-
require('./TemplateService-7QcWREot.cjs');
|
|
1
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-D7S3xpJE.cjs');
|
|
4
2
|
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
5
3
|
let __agiflowai_hooks_adapter = require("@agiflowai/hooks-adapter");
|
|
6
4
|
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-DuYGFDwJ.cjs');
|
|
3
|
-
require('./TemplateService-7QcWREot.cjs');
|
|
1
|
+
const require_ListScaffoldingMethodsTool = require('./ListScaffoldingMethodsTool-D7S3xpJE.cjs');
|
|
4
2
|
let node_path = require("node:path");
|
|
5
|
-
node_path =
|
|
3
|
+
node_path = require_ListScaffoldingMethodsTool.__toESM(node_path);
|
|
6
4
|
let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
|
|
7
5
|
let node_fs_promises = require("node:fs/promises");
|
|
8
|
-
node_fs_promises =
|
|
6
|
+
node_fs_promises = require_ListScaffoldingMethodsTool.__toESM(node_fs_promises);
|
|
9
7
|
let node_os = require("node:os");
|
|
10
|
-
node_os =
|
|
8
|
+
node_os = require_ListScaffoldingMethodsTool.__toESM(node_os);
|
|
11
9
|
let __agiflowai_hooks_adapter = require("@agiflowai/hooks-adapter");
|
|
12
10
|
|
|
13
11
|
//#region src/hooks/claudeCode/useScaffoldMethod.ts
|
|
@@ -33,6 +31,11 @@ var UseScaffoldMethodHook = class {
|
|
|
33
31
|
decision: __agiflowai_hooks_adapter.DECISION_SKIP,
|
|
34
32
|
message: "Not a file write operation"
|
|
35
33
|
};
|
|
34
|
+
const absoluteFilePath = node_path.default.isAbsolute(filePath) ? filePath : node_path.default.join(context.cwd, filePath);
|
|
35
|
+
if (!absoluteFilePath.startsWith(context.cwd + node_path.default.sep) && absoluteFilePath !== context.cwd) return {
|
|
36
|
+
decision: __agiflowai_hooks_adapter.DECISION_SKIP,
|
|
37
|
+
message: "File is outside working directory - skipping scaffold method check"
|
|
38
|
+
};
|
|
36
39
|
const executionLog = new __agiflowai_hooks_adapter.ExecutionLogService(context.session_id);
|
|
37
40
|
if (await executionLog.hasExecuted({
|
|
38
41
|
filePath,
|
|
@@ -47,9 +50,7 @@ var UseScaffoldMethodHook = class {
|
|
|
47
50
|
message: "Templates folder not found - skipping scaffold method check"
|
|
48
51
|
};
|
|
49
52
|
const tool = new require_ListScaffoldingMethodsTool.ListScaffoldingMethodsTool(templatesPath, false);
|
|
50
|
-
const
|
|
51
|
-
const absoluteFilePath = node_path.default.isAbsolute(filePath) ? filePath : node_path.default.join(context.cwd, filePath);
|
|
52
|
-
const projectPath = (await projectFinder.findProjectForFile(absoluteFilePath))?.root || context.cwd;
|
|
53
|
+
const projectPath = (await new __agiflowai_aicode_utils.ProjectFinderService(await __agiflowai_aicode_utils.TemplatesManagerService.getWorkspaceRoot(context.cwd)).findProjectForFile(absoluteFilePath))?.root || context.cwd;
|
|
53
54
|
const result = await tool.execute({ projectPath });
|
|
54
55
|
const firstContent = result.content[0];
|
|
55
56
|
if (firstContent?.type !== "text") return {
|
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.12",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"author": "AgiflowIO",
|
|
7
7
|
"repository": {
|
|
@@ -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/architect-mcp": "1.0.
|
|
53
|
-
"@agiflowai/coding-agent-bridge": "1.0.
|
|
54
|
-
"@agiflowai/hooks-adapter": "0.0.
|
|
51
|
+
"@agiflowai/aicode-utils": "1.0.10",
|
|
52
|
+
"@agiflowai/architect-mcp": "1.0.12",
|
|
53
|
+
"@agiflowai/coding-agent-bridge": "1.0.11",
|
|
54
|
+
"@agiflowai/hooks-adapter": "0.0.9"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/express": "^5.0.0",
|