@agiflowai/aicode-toolkit 1.0.26 → 1.2.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.
@@ -1,4 +1,4 @@
1
- //#region rolldown:runtime
1
+ //#region \0rolldown/runtime.js
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -6,16 +6,12 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
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
- }
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
19
15
  }
20
16
  return to;
21
17
  };
@@ -23,23 +19,22 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
19
  value: mod,
24
20
  enumerable: true
25
21
  }) : target, mod));
26
-
27
22
  //#endregion
28
- let __agiflowai_coding_agent_bridge = require("@agiflowai/coding-agent-bridge");
29
- let __agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
23
+ require("./mcp-HNZY6MpT.cjs");
24
+ let _agiflowai_coding_agent_bridge = require("@agiflowai/coding-agent-bridge");
25
+ let _agiflowai_aicode_utils = require("@agiflowai/aicode-utils");
30
26
  let node_fs_promises = require("node:fs/promises");
31
- node_fs_promises = __toESM(node_fs_promises);
27
+ node_fs_promises = __toESM(node_fs_promises, 1);
32
28
  let node_path = require("node:path");
33
- node_path = __toESM(node_path);
29
+ node_path = __toESM(node_path, 1);
34
30
  let execa = require("execa");
35
31
  let liquidjs = require("liquidjs");
36
32
  let node_os = require("node:os");
37
- node_os = __toESM(node_os);
33
+ node_os = __toESM(node_os, 1);
38
34
  let chalk = require("chalk");
39
- chalk = __toESM(chalk);
35
+ chalk = __toESM(chalk, 1);
40
36
  let gradient_string = require("gradient-string");
41
- gradient_string = __toESM(gradient_string);
42
-
37
+ gradient_string = __toESM(gradient_string, 1);
43
38
  //#region src/constants/theme.ts
44
39
  /**
45
40
  * Theme color constants for AICode Toolkit
@@ -100,7 +95,6 @@ const BANNER_GRADIENT = [
100
95
  THEME.colors.secondary.default,
101
96
  THEME.colors.secondary.dark
102
97
  ];
103
-
104
98
  //#endregion
105
99
  //#region src/services/CodingAgentService.ts
106
100
  /**
@@ -132,11 +126,11 @@ var CodingAgentService = class {
132
126
  * @returns Promise resolving to detected agent ID or null
133
127
  */
134
128
  static async detectCodingAgent(workspaceRoot) {
135
- if (await new __agiflowai_coding_agent_bridge.ClaudeCodeService({ workspaceRoot }).isEnabled()) return __agiflowai_coding_agent_bridge.CLAUDE_CODE;
136
- if (await new __agiflowai_coding_agent_bridge.CursorService({ workspaceRoot }).isEnabled()) return __agiflowai_coding_agent_bridge.CURSOR;
137
- if (await new __agiflowai_coding_agent_bridge.GitHubCopilotService({ workspaceRoot }).isEnabled()) return __agiflowai_coding_agent_bridge.GITHUB_COPILOT;
138
- if (await new __agiflowai_coding_agent_bridge.CodexService({ workspaceRoot }).isEnabled()) return __agiflowai_coding_agent_bridge.CODEX;
139
- if (await new __agiflowai_coding_agent_bridge.GeminiCliService({ workspaceRoot }).isEnabled()) return __agiflowai_coding_agent_bridge.GEMINI_CLI;
129
+ if (await new _agiflowai_coding_agent_bridge.ClaudeCodeService({ workspaceRoot }).isEnabled()) return _agiflowai_coding_agent_bridge.CLAUDE_CODE;
130
+ if (await new _agiflowai_coding_agent_bridge.CursorService({ workspaceRoot }).isEnabled()) return _agiflowai_coding_agent_bridge.CURSOR;
131
+ if (await new _agiflowai_coding_agent_bridge.GitHubCopilotService({ workspaceRoot }).isEnabled()) return _agiflowai_coding_agent_bridge.GITHUB_COPILOT;
132
+ if (await new _agiflowai_coding_agent_bridge.CodexService({ workspaceRoot }).isEnabled()) return _agiflowai_coding_agent_bridge.CODEX;
133
+ if (await new _agiflowai_coding_agent_bridge.GeminiCliService({ workspaceRoot }).isEnabled()) return _agiflowai_coding_agent_bridge.GEMINI_CLI;
140
134
  return null;
141
135
  }
142
136
  /**
@@ -145,32 +139,32 @@ var CodingAgentService = class {
145
139
  static getAvailableAgents() {
146
140
  return [
147
141
  {
148
- value: __agiflowai_coding_agent_bridge.CLAUDE_CODE,
142
+ value: _agiflowai_coding_agent_bridge.CLAUDE_CODE,
149
143
  name: "Claude Code",
150
144
  description: "Anthropic Claude Code CLI agent"
151
145
  },
152
146
  {
153
- value: __agiflowai_coding_agent_bridge.CURSOR,
147
+ value: _agiflowai_coding_agent_bridge.CURSOR,
154
148
  name: "Cursor",
155
149
  description: "Cursor AI-first code editor"
156
150
  },
157
151
  {
158
- value: __agiflowai_coding_agent_bridge.GITHUB_COPILOT,
152
+ value: _agiflowai_coding_agent_bridge.GITHUB_COPILOT,
159
153
  name: "GitHub Copilot",
160
154
  description: "GitHub Copilot coding agent and CLI"
161
155
  },
162
156
  {
163
- value: __agiflowai_coding_agent_bridge.CODEX,
157
+ value: _agiflowai_coding_agent_bridge.CODEX,
164
158
  name: "Codex",
165
159
  description: "OpenAI Codex CLI agent"
166
160
  },
167
161
  {
168
- value: __agiflowai_coding_agent_bridge.GEMINI_CLI,
162
+ value: _agiflowai_coding_agent_bridge.GEMINI_CLI,
169
163
  name: "Gemini CLI",
170
164
  description: "Google Gemini CLI agent"
171
165
  },
172
166
  {
173
- value: __agiflowai_coding_agent_bridge.NONE,
167
+ value: _agiflowai_coding_agent_bridge.NONE,
174
168
  name: "Other",
175
169
  description: "Other coding agent or skip MCP configuration"
176
170
  }
@@ -182,11 +176,11 @@ var CodingAgentService = class {
182
176
  * @returns The service instance or null if not supported
183
177
  */
184
178
  getCodingAgentService(agent) {
185
- if (agent === __agiflowai_coding_agent_bridge.CLAUDE_CODE) return new __agiflowai_coding_agent_bridge.ClaudeCodeService({ workspaceRoot: this.workspaceRoot });
186
- if (agent === __agiflowai_coding_agent_bridge.CURSOR) return new __agiflowai_coding_agent_bridge.CursorService({ workspaceRoot: this.workspaceRoot });
187
- if (agent === __agiflowai_coding_agent_bridge.GITHUB_COPILOT) return new __agiflowai_coding_agent_bridge.GitHubCopilotService({ workspaceRoot: this.workspaceRoot });
188
- if (agent === __agiflowai_coding_agent_bridge.CODEX) return new __agiflowai_coding_agent_bridge.CodexService({ workspaceRoot: this.workspaceRoot });
189
- if (agent === __agiflowai_coding_agent_bridge.GEMINI_CLI) return new __agiflowai_coding_agent_bridge.GeminiCliService({ workspaceRoot: this.workspaceRoot });
179
+ if (agent === _agiflowai_coding_agent_bridge.CLAUDE_CODE) return new _agiflowai_coding_agent_bridge.ClaudeCodeService({ workspaceRoot: this.workspaceRoot });
180
+ if (agent === _agiflowai_coding_agent_bridge.CURSOR) return new _agiflowai_coding_agent_bridge.CursorService({ workspaceRoot: this.workspaceRoot });
181
+ if (agent === _agiflowai_coding_agent_bridge.GITHUB_COPILOT) return new _agiflowai_coding_agent_bridge.GitHubCopilotService({ workspaceRoot: this.workspaceRoot });
182
+ if (agent === _agiflowai_coding_agent_bridge.CODEX) return new _agiflowai_coding_agent_bridge.CodexService({ workspaceRoot: this.workspaceRoot });
183
+ if (agent === _agiflowai_coding_agent_bridge.GEMINI_CLI) return new _agiflowai_coding_agent_bridge.GeminiCliService({ workspaceRoot: this.workspaceRoot });
190
184
  return null;
191
185
  }
192
186
  /**
@@ -197,17 +191,17 @@ var CodingAgentService = class {
197
191
  * @param customInstructionFile - Optional custom file path to write instructions to (e.g., '.claude/aicode-instructions.md')
198
192
  */
199
193
  async updateCustomInstructions(agent, instructionPrompt, customInstructionFile) {
200
- if (agent === __agiflowai_coding_agent_bridge.NONE) {
201
- __agiflowai_aicode_utils.print.info("Skipping custom instruction update");
194
+ if (agent === _agiflowai_coding_agent_bridge.NONE) {
195
+ _agiflowai_aicode_utils.print.info("Skipping custom instruction update");
202
196
  return;
203
197
  }
204
- __agiflowai_aicode_utils.print.info(`\nUpdating custom instructions for ${agent}...`);
198
+ _agiflowai_aicode_utils.print.info(`\nUpdating custom instructions for ${agent}...`);
205
199
  const service = this.getCodingAgentService(agent);
206
200
  if (!service) {
207
- __agiflowai_aicode_utils.print.info(`Custom instruction update for ${agent} is not yet supported.`);
208
- __agiflowai_aicode_utils.print.info("Please manually add the instructions to your agent configuration.");
209
- __agiflowai_aicode_utils.print.info("\nInstruction prompt to add:");
210
- __agiflowai_aicode_utils.print.info(instructionPrompt);
201
+ _agiflowai_aicode_utils.print.info(`Custom instruction update for ${agent} is not yet supported.`);
202
+ _agiflowai_aicode_utils.print.info("Please manually add the instructions to your agent configuration.");
203
+ _agiflowai_aicode_utils.print.info("\nInstruction prompt to add:");
204
+ _agiflowai_aicode_utils.print.info(instructionPrompt);
211
205
  return;
212
206
  }
213
207
  await service.updatePrompt({
@@ -215,8 +209,8 @@ var CodingAgentService = class {
215
209
  customInstructionFile,
216
210
  marker: true
217
211
  });
218
- if (customInstructionFile) __agiflowai_aicode_utils.print.success(`Custom instructions written to ${customInstructionFile} and referenced in CLAUDE.md and AGENTS.md`);
219
- else __agiflowai_aicode_utils.print.success(`Custom instructions appended to CLAUDE.md and AGENTS.md`);
212
+ if (customInstructionFile) _agiflowai_aicode_utils.print.success(`Custom instructions written to ${customInstructionFile} and referenced in CLAUDE.md and AGENTS.md`);
213
+ else _agiflowai_aicode_utils.print.success(`Custom instructions appended to CLAUDE.md and AGENTS.md`);
220
214
  }
221
215
  /**
222
216
  * Setup MCP configuration for the selected coding agent
@@ -224,33 +218,33 @@ var CodingAgentService = class {
224
218
  * @param selectedMcpServers - Optional array of selected MCP servers
225
219
  */
226
220
  async setupMCP(agent, selectedMcpServers) {
227
- if (agent === __agiflowai_coding_agent_bridge.NONE) {
228
- __agiflowai_aicode_utils.print.info("Skipping MCP configuration");
221
+ if (agent === _agiflowai_coding_agent_bridge.NONE) {
222
+ _agiflowai_aicode_utils.print.info("Skipping MCP configuration");
229
223
  return;
230
224
  }
231
- __agiflowai_aicode_utils.print.info(`\nSetting up MCP for ${agent}...`);
225
+ _agiflowai_aicode_utils.print.info(`\nSetting up MCP for ${agent}...`);
232
226
  const service = this.getCodingAgentService(agent);
233
227
  let configLocation = "";
234
228
  let restartInstructions = "";
235
- if (agent === __agiflowai_coding_agent_bridge.CLAUDE_CODE) {
229
+ if (agent === _agiflowai_coding_agent_bridge.CLAUDE_CODE) {
236
230
  configLocation = ".mcp.json";
237
231
  restartInstructions = "Restart Claude Code to load the new MCP servers";
238
- } else if (agent === __agiflowai_coding_agent_bridge.CURSOR) {
232
+ } else if (agent === _agiflowai_coding_agent_bridge.CURSOR) {
239
233
  configLocation = "~/.cursor/mcp.json (or .cursor/mcp.json for workspace)";
240
234
  restartInstructions = "Restart Cursor to load the new MCP servers";
241
- } else if (agent === __agiflowai_coding_agent_bridge.GITHUB_COPILOT) {
235
+ } else if (agent === _agiflowai_coding_agent_bridge.GITHUB_COPILOT) {
242
236
  configLocation = "~/.copilot/config.json (CLI) or GitHub UI (Coding Agent)";
243
237
  restartInstructions = "Restart GitHub Copilot CLI or configure via GitHub repository settings";
244
- } else if (agent === __agiflowai_coding_agent_bridge.CODEX) {
238
+ } else if (agent === _agiflowai_coding_agent_bridge.CODEX) {
245
239
  configLocation = "~/.codex/config.toml";
246
240
  restartInstructions = "Restart Codex CLI to load the new MCP servers";
247
- } else if (agent === __agiflowai_coding_agent_bridge.GEMINI_CLI) {
241
+ } else if (agent === _agiflowai_coding_agent_bridge.GEMINI_CLI) {
248
242
  configLocation = "~/.gemini/settings.json";
249
243
  restartInstructions = "Restart Gemini CLI to load the new MCP servers";
250
244
  }
251
245
  if (!service) {
252
- __agiflowai_aicode_utils.print.info(`MCP configuration for ${agent} is not yet supported.`);
253
- __agiflowai_aicode_utils.print.info("Please configure MCP servers manually for this coding agent.");
246
+ _agiflowai_aicode_utils.print.info(`MCP configuration for ${agent} is not yet supported.`);
247
+ _agiflowai_aicode_utils.print.info("Please configure MCP servers manually for this coding agent.");
254
248
  return;
255
249
  }
256
250
  if (selectedMcpServers?.includes("one-mcp")) {
@@ -265,8 +259,8 @@ var CodingAgentService = class {
265
259
  ],
266
260
  disabled: false
267
261
  } } });
268
- __agiflowai_aicode_utils.print.success(`Added one-mcp to ${configLocation}`);
269
- __agiflowai_aicode_utils.print.success("Created mcp-config.yaml with selected MCP server configurations");
262
+ _agiflowai_aicode_utils.print.success(`Added one-mcp to ${configLocation}`);
263
+ _agiflowai_aicode_utils.print.success("Created mcp-config.yaml with selected MCP server configurations");
270
264
  } else {
271
265
  const mcpServers = {};
272
266
  if (selectedMcpServers?.includes("scaffold-mcp") ?? true) mcpServers["scaffold-mcp"] = {
@@ -291,12 +285,12 @@ var CodingAgentService = class {
291
285
  };
292
286
  await service.updateMcpSettings({ servers: mcpServers });
293
287
  const serverNames = Object.keys(mcpServers).join(" and ");
294
- __agiflowai_aicode_utils.print.success(`Added ${serverNames} to ${configLocation}`);
288
+ _agiflowai_aicode_utils.print.success(`Added ${serverNames} to ${configLocation}`);
295
289
  }
296
- __agiflowai_aicode_utils.print.info("\nNext steps:");
297
- __agiflowai_aicode_utils.print.indent(`1. ${restartInstructions}`);
298
- __agiflowai_aicode_utils.print.indent("2. The configured MCP servers will be available");
299
- __agiflowai_aicode_utils.print.success("\nMCP configuration completed!");
290
+ _agiflowai_aicode_utils.print.info("\nNext steps:");
291
+ _agiflowai_aicode_utils.print.indent(`1. ${restartInstructions}`);
292
+ _agiflowai_aicode_utils.print.indent("2. The configured MCP servers will be available");
293
+ _agiflowai_aicode_utils.print.success("\nMCP configuration completed!");
300
294
  }
301
295
  /**
302
296
  * Create mcp-config.yaml file using one-mcp init command
@@ -305,8 +299,8 @@ var CodingAgentService = class {
305
299
  * @param selectedMcpServers - Array of selected MCP servers
306
300
  */
307
301
  async createMcpConfigYaml(selectedMcpServers) {
308
- const { execSync } = await import("node:child_process");
309
- const path$3 = await import("node:path");
302
+ const { execFileSync } = await import("node:child_process");
303
+ const path = await import("node:path");
310
304
  const servers = {};
311
305
  const serversToInclude = selectedMcpServers?.filter((s) => s !== "one-mcp") ?? [];
312
306
  for (const server of serversToInclude) if (server === "scaffold-mcp") servers["scaffold-mcp"] = {
@@ -347,13 +341,23 @@ var CodingAgentService = class {
347
341
  ]
348
342
  };
349
343
  }
350
- execSync(`npx -y @agiflowai/one-mcp init -o "${path$3.join(this.workspaceRoot, "mcp-config.yaml")}" -f --mcp-servers '${JSON.stringify(servers)}'`, {
344
+ execFileSync("npx", [
345
+ "--yes",
346
+ "--package",
347
+ "@agiflowai/one-mcp",
348
+ "one-mcp",
349
+ "init",
350
+ "-o",
351
+ path.join(this.workspaceRoot, "mcp-config.yaml"),
352
+ "-f",
353
+ "--mcp-servers",
354
+ JSON.stringify(servers)
355
+ ], {
351
356
  cwd: this.workspaceRoot,
352
357
  stdio: "inherit"
353
358
  });
354
359
  }
355
360
  };
356
-
357
361
  //#endregion
358
362
  //#region src/services/NewProjectService.ts
359
363
  /**
@@ -427,7 +431,7 @@ var NewProjectService = class {
427
431
  * @throws Error if invalid project type
428
432
  */
429
433
  validateProjectType(projectType) {
430
- if (projectType !== __agiflowai_aicode_utils.ProjectType.MONOLITH && projectType !== __agiflowai_aicode_utils.ProjectType.MONOREPO) throw new Error(`Invalid project type '${projectType}'. Must be '${__agiflowai_aicode_utils.ProjectType.MONOLITH}' or '${__agiflowai_aicode_utils.ProjectType.MONOREPO}'`);
434
+ if (projectType !== _agiflowai_aicode_utils.ProjectType.MONOLITH && projectType !== _agiflowai_aicode_utils.ProjectType.MONOREPO) throw new Error(`Invalid project type '${projectType}'. Must be '${_agiflowai_aicode_utils.ProjectType.MONOLITH}' or '${_agiflowai_aicode_utils.ProjectType.MONOREPO}'`);
431
435
  }
432
436
  /**
433
437
  * Get the provided name from constructor
@@ -448,7 +452,7 @@ var NewProjectService = class {
448
452
  */
449
453
  async createProjectDirectory(projectPath, projectName) {
450
454
  try {
451
- await (0, __agiflowai_aicode_utils.mkdir)(projectPath, { recursive: false });
455
+ await (0, _agiflowai_aicode_utils.mkdir)(projectPath, { recursive: false });
452
456
  } catch (error) {
453
457
  if (error.code === "EEXIST") throw new Error(`Directory '${projectName}' already exists. Please choose a different name.`);
454
458
  throw error;
@@ -461,11 +465,11 @@ var NewProjectService = class {
461
465
  */
462
466
  async cloneExistingRepository(repoUrl, projectPath) {
463
467
  try {
464
- const parsed = (0, __agiflowai_aicode_utils.parseGitHubUrl)(repoUrl.trim());
465
- if (parsed.isSubdirectory && parsed.branch && parsed.subdirectory) await (0, __agiflowai_aicode_utils.cloneSubdirectory)(parsed.repoUrl, parsed.branch, parsed.subdirectory, projectPath);
466
- else await (0, __agiflowai_aicode_utils.cloneRepository)(parsed.repoUrl, projectPath);
468
+ const parsed = (0, _agiflowai_aicode_utils.parseGitHubUrl)(repoUrl.trim());
469
+ if (parsed.isSubdirectory && parsed.branch && parsed.subdirectory) await (0, _agiflowai_aicode_utils.cloneSubdirectory)(parsed.repoUrl, parsed.branch, parsed.subdirectory, projectPath);
470
+ else await (0, _agiflowai_aicode_utils.cloneRepository)(parsed.repoUrl, projectPath);
467
471
  } catch (error) {
468
- await (0, __agiflowai_aicode_utils.remove)(projectPath);
472
+ await (0, _agiflowai_aicode_utils.remove)(projectPath);
469
473
  throw new Error(`Failed to clone repository: ${error.message}`);
470
474
  }
471
475
  }
@@ -475,9 +479,9 @@ var NewProjectService = class {
475
479
  */
476
480
  async initializeGitRepository(projectPath) {
477
481
  try {
478
- await (0, __agiflowai_aicode_utils.gitInit)(projectPath);
482
+ await (0, _agiflowai_aicode_utils.gitInit)(projectPath);
479
483
  } catch (error) {
480
- __agiflowai_aicode_utils.messages.warning(`Failed to initialize Git: ${error.message}`);
484
+ _agiflowai_aicode_utils.messages.warning(`Failed to initialize Git: ${error.message}`);
481
485
  }
482
486
  }
483
487
  /**
@@ -491,11 +495,9 @@ var NewProjectService = class {
491
495
  return true;
492
496
  }
493
497
  };
494
-
495
498
  //#endregion
496
499
  //#region src/instructions/specs/openspec.md?raw
497
500
  var openspec_default = "When working on this project, follow the OpenSpec spec-driven development workflow{% if scaffoldMcp or architectMcp %} integrated with MCP tools{% endif %}.\n\n{% if scaffoldMcp %}\n\n## {% if scaffoldMcp %}1{% else %}1{% endif %}. Create Proposals with scaffold-mcp\n\nWhen implementing new features or changes, use scaffold-mcp MCP tools:\n\n**For new projects/features:**\n1. Use `list-boilerplates` MCP tool to see available templates\n2. Use `use-boilerplate` MCP tool to scaffold new projects{% if projectType == 'monolith' %} (set `monolith: true`){% elsif projectType == 'monorepo' %} (omit `monolith` parameter){% endif %}\n3. Use `list-scaffolding-methods` MCP tool to understand which methods can be used to add features\n4. Create OpenSpec proposal with available scaffolding methods in mind: \"Create an OpenSpec proposal for [feature description]\"\n\n**For adding features to existing code:**\n1. Use `list-scaffolding-methods` MCP tool with projectPath to see available features{% if projectType == 'monolith' %} (`projectPath` = workspace root){% elsif projectType == 'monorepo' %} (`projectPath` = project directory with project.json){% endif %}\n2. Review available methods and plan which ones to use for the feature\n3. Use `use-scaffold-method` MCP tool to generate boilerplate code\n4. Create OpenSpec proposal to capture the specs\n{% if projectType %}\n\n**Path Mapping ({% if projectType == 'monolith' %}Monolith{% else %}Monorepo{% endif %} Project):**\n{% if projectType == 'monolith' %}\n*This is a monolith project:*\n- Single project at workspace root\n- Config file: `.toolkit/settings.yaml` at root\n- All code in workspace root (src/, lib/, etc.)\n- When scaffolding: Use `monolith: true` parameter\n- When using scaffold methods: `projectPath` = workspace root\n\nExample: For workspace at `/path/to/project`:\n- Project config: `/path/to/project/.toolkit/settings.yaml`\n- Source code: `/path/to/project/src/`\n- OpenSpec: `/path/to/project/openspec/`\n{% else %}\n*This is a monorepo project:*\n- Multiple projects in subdirectories\n- Config file: `project.json` in each project\n- Projects in apps/, packages/, libs/, etc.\n- When scaffolding: Omit `monolith` parameter (defaults to false)\n- When using scaffold methods: `projectPath` = path to specific project\n\nExample: For workspace at `/path/to/workspace`:\n- App config: `/path/to/workspace/apps/my-app/project.json`\n- App source: `/path/to/workspace/apps/my-app/src/`\n- OpenSpec: `/path/to/workspace/openspec/` (workspace-level)\n{% endif %}\n{% endif %}\n\nAI will scaffold: openspec/changes/[feature-name]/ with proposal.md, tasks.md, and spec deltas\n{% endif %}\n{% if architectMcp %}\n\n## {% if scaffoldMcp %}2{% else %}1{% endif %}. Review & Validate with architect-mcp\n\nBefore and after editing files, use architect-mcp MCP tools:\n\n**Before editing:**\n- Use `get-file-design-pattern` MCP tool to understand:\n - Applicable design patterns from architect.yaml\n - Coding rules from RULES.yaml (must_do, should_do, must_not_do)\n - Code examples showing the patterns\n\n**After editing:**\n- Use `review-code-change` MCP tool to check for:\n - Must not do violations (critical issues)\n - Must do missing (required patterns not followed)\n - Should do suggestions (best practices)\n\n**Validate OpenSpec specs:**\n- Use `openspec validate [feature-name]` to check spec formatting\n- Iterate with AI until specs are agreed upon\n{% endif %}\n\n## {% if scaffoldMcp and architectMcp %}3{% elsif scaffoldMcp or architectMcp %}2{% else %}1{% endif %}. Implement{% if architectMcp %} with MCP-Guided Development{% endif %}\n\nDuring implementation:\n1. Ask AI to implement: \"Apply the OpenSpec change [feature-name]\"\n{% if architectMcp %}\n2. **Before each file edit**: Use `get-file-design-pattern` to understand patterns\n3. AI implements tasks from tasks.md following design patterns\n4. **After each file edit**: Use `review-code-change` to verify compliance\n5. Fix any violations before proceeding\n{% else %}\n2. AI implements tasks from tasks.md following the agreed specs\n{% endif %}\n\n## {% if scaffoldMcp and architectMcp %}4{% elsif scaffoldMcp or architectMcp %}3{% else %}2{% endif %}. Archive Completed Changes\n{% if scaffoldMcp or architectMcp %}\n\n## MCP Tools Reference\n{% endif %}\n{% if scaffoldMcp %}\n\n### scaffold-mcp\n- `list-boilerplates` - List available project templates\n- `use-boilerplate` - Create new project from template\n- `list-scaffolding-methods` - List features for existing project\n- `use-scaffold-method` - Add feature to existing project\n{% endif %}\n{% if architectMcp %}\n\n### architect-mcp\n- `get-file-design-pattern` - Get design patterns for file\n- `review-code-change` - Review code for violations\n{% endif %}\n\n## Workflow Summary\n\n{% if scaffoldMcp %}\n1. **Plan**: Use scaffold-mcp to generate boilerplate + OpenSpec proposal for specs\n{% else %}\n1. **Plan**: Create OpenSpec proposal with specs\n{% endif %}\n{% if architectMcp %}\n{% if scaffoldMcp %}2{% else %}2{% endif %}. **Design**: Use architect-mcp to understand patterns before editing\n{% endif %}\n{% if scaffoldMcp and architectMcp %}3{% elsif scaffoldMcp or architectMcp %}{% if architectMcp %}3{% else %}2{% endif %}{% else %}2{% endif %}. **Implement**: Follow specs{% if architectMcp %} and patterns{% endif %}\n{% if architectMcp %}\n{% if scaffoldMcp %}4{% else %}4{% endif %}. **Review**: Use architect-mcp to validate code quality\n{% endif %}\n{% if scaffoldMcp and architectMcp %}5{% elsif scaffoldMcp or architectMcp %}{% if architectMcp %}5{% else %}3{% endif %}{% else %}3{% endif %}. **Archive**: Merge specs into source of truth\n";
498
-
499
501
  //#endregion
500
502
  //#region src/specs/openspec.ts
501
503
  /**
@@ -572,7 +574,6 @@ var OpenSpecBridge = class {
572
574
  return (await new liquidjs.Liquid().parseAndRender(openspec_default, enabledMcps)).trim();
573
575
  }
574
576
  };
575
-
576
577
  //#endregion
577
578
  //#region src/services/SpecToolService.ts
578
579
  /**
@@ -590,9 +591,9 @@ var OpenSpecBridge = class {
590
591
  /**
591
592
  * Available spec tools
592
593
  */
593
- let SpecTool = /* @__PURE__ */ function(SpecTool$1) {
594
- SpecTool$1["OPENSPEC"] = "openspec";
595
- return SpecTool$1;
594
+ let SpecTool = /* @__PURE__ */ function(SpecTool) {
595
+ SpecTool["OPENSPEC"] = "openspec";
596
+ return SpecTool;
596
597
  }({});
597
598
  /**
598
599
  * Spec tool information
@@ -631,7 +632,7 @@ var SpecToolService = class {
631
632
  try {
632
633
  return await this.bridge.isEnabled(this.workspaceRoot) ? SpecTool.OPENSPEC : null;
633
634
  } catch (error) {
634
- __agiflowai_aicode_utils.print.error(`Error detecting spec tool: ${error.message}`);
635
+ _agiflowai_aicode_utils.print.error(`Error detecting spec tool: ${error.message}`);
635
636
  return null;
636
637
  }
637
638
  }
@@ -655,14 +656,13 @@ var SpecToolService = class {
655
656
  const prompt = await this.bridge.updateInstruction(enabledMcps);
656
657
  if (this.codingAgentService && codingAgent) await this.codingAgentService.updateCustomInstructions(codingAgent, prompt, customInstructionFile ?? ".claude/aicode-instructions.md");
657
658
  else {
658
- __agiflowai_aicode_utils.print.info("\nGenerated OpenSpec instruction prompt:");
659
- __agiflowai_aicode_utils.print.info("\nYou can append this to your CLAUDE.md or agent config file:");
660
- __agiflowai_aicode_utils.print.info(`\n${prompt}`);
659
+ _agiflowai_aicode_utils.print.info("\nGenerated OpenSpec instruction prompt:");
660
+ _agiflowai_aicode_utils.print.info("\nYou can append this to your CLAUDE.md or agent config file:");
661
+ _agiflowai_aicode_utils.print.info(`\n${prompt}`);
661
662
  }
662
663
  return prompt;
663
664
  }
664
665
  };
665
-
666
666
  //#endregion
667
667
  //#region src/services/TemplateSelectionService.ts
668
668
  /**
@@ -693,29 +693,29 @@ var TemplateSelectionService = class {
693
693
  */
694
694
  async downloadTemplatesToTmp(repoConfig) {
695
695
  try {
696
- await (0, __agiflowai_aicode_utils.ensureDir)(this.tmpDir);
697
- const contents = await (0, __agiflowai_aicode_utils.fetchGitHubDirectoryContents)(repoConfig.owner, repoConfig.repo, repoConfig.path, repoConfig.branch);
696
+ await (0, _agiflowai_aicode_utils.ensureDir)(this.tmpDir);
697
+ const contents = await (0, _agiflowai_aicode_utils.fetchGitHubDirectoryContents)(repoConfig.owner, repoConfig.repo, repoConfig.path, repoConfig.branch);
698
698
  const templateDirs = contents.filter((item) => item.type === "dir");
699
699
  const globalFiles = contents.filter((item) => item.type === "file" && item.name === "RULES.yaml");
700
700
  if (templateDirs.length === 0) throw new Error("No templates found in repository");
701
- __agiflowai_aicode_utils.print.info(`Found ${templateDirs.length} template(s), downloading...`);
701
+ _agiflowai_aicode_utils.print.info(`Found ${templateDirs.length} template(s), downloading...`);
702
702
  for (const template of templateDirs) {
703
703
  const targetFolder = node_path.default.join(this.tmpDir, template.name);
704
- __agiflowai_aicode_utils.print.info(`Downloading ${template.name}...`);
705
- await (0, __agiflowai_aicode_utils.cloneSubdirectory)(`https://github.com/${repoConfig.owner}/${repoConfig.repo}.git`, repoConfig.branch, template.path, targetFolder);
706
- __agiflowai_aicode_utils.print.success(`Downloaded ${template.name}`);
704
+ _agiflowai_aicode_utils.print.info(`Downloading ${template.name}...`);
705
+ await (0, _agiflowai_aicode_utils.cloneSubdirectory)(`https://github.com/${repoConfig.owner}/${repoConfig.repo}.git`, repoConfig.branch, template.path, targetFolder);
706
+ _agiflowai_aicode_utils.print.success(`Downloaded ${template.name}`);
707
707
  }
708
708
  if (globalFiles.length > 0) {
709
- __agiflowai_aicode_utils.print.info("Downloading global RULES.yaml...");
709
+ _agiflowai_aicode_utils.print.info("Downloading global RULES.yaml...");
710
710
  const rulesUrl = `https://raw.githubusercontent.com/${repoConfig.owner}/${repoConfig.repo}/${repoConfig.branch}/${repoConfig.path}/RULES.yaml`;
711
711
  const targetFile = node_path.default.join(this.tmpDir, "RULES.yaml");
712
712
  const response = await fetch(rulesUrl);
713
713
  if (response.ok) {
714
- await (0, __agiflowai_aicode_utils.writeFile)(targetFile, await response.text(), "utf-8");
715
- __agiflowai_aicode_utils.print.success("Downloaded global RULES.yaml");
714
+ await (0, _agiflowai_aicode_utils.writeFile)(targetFile, await response.text(), "utf-8");
715
+ _agiflowai_aicode_utils.print.success("Downloaded global RULES.yaml");
716
716
  }
717
717
  }
718
- __agiflowai_aicode_utils.print.success(`\nAll templates downloaded to ${this.tmpDir}`);
718
+ _agiflowai_aicode_utils.print.success(`\nAll templates downloaded to ${this.tmpDir}`);
719
719
  return this.tmpDir;
720
720
  } catch (error) {
721
721
  await this.cleanup();
@@ -728,7 +728,7 @@ var TemplateSelectionService = class {
728
728
  */
729
729
  async listTemplates() {
730
730
  try {
731
- const entries = await (0, __agiflowai_aicode_utils.readdir)(this.tmpDir, { withFileTypes: true });
731
+ const entries = await (0, _agiflowai_aicode_utils.readdir)(this.tmpDir, { withFileTypes: true });
732
732
  const templates = [];
733
733
  for (const entry of entries) if (entry.isDirectory()) {
734
734
  const templatePath = node_path.default.join(this.tmpDir, entry.name);
@@ -753,32 +753,32 @@ var TemplateSelectionService = class {
753
753
  */
754
754
  async copyTemplates(templateNames, destinationPath, projectType, selectedMcpServers) {
755
755
  try {
756
- if (projectType === __agiflowai_aicode_utils.ProjectType.MONOLITH && templateNames.length > 1) throw new Error("Monolith projects can only use a single template");
757
- await (0, __agiflowai_aicode_utils.ensureDir)(destinationPath);
758
- __agiflowai_aicode_utils.print.info(`\nCopying templates to ${destinationPath}...`);
756
+ if (projectType === _agiflowai_aicode_utils.ProjectType.MONOLITH && templateNames.length > 1) throw new Error("Monolith projects can only use a single template");
757
+ await (0, _agiflowai_aicode_utils.ensureDir)(destinationPath);
758
+ _agiflowai_aicode_utils.print.info(`\nCopying templates to ${destinationPath}...`);
759
759
  for (const templateName of templateNames) {
760
760
  const sourcePath = node_path.default.join(this.tmpDir, templateName);
761
761
  const targetPath = node_path.default.join(destinationPath, templateName);
762
- if (!await (0, __agiflowai_aicode_utils.pathExists)(sourcePath)) throw new Error(`Template '${templateName}' not found in downloaded templates`);
763
- if (await (0, __agiflowai_aicode_utils.pathExists)(targetPath)) {
764
- __agiflowai_aicode_utils.print.info(`Skipping ${templateName} (already exists)`);
762
+ if (!await (0, _agiflowai_aicode_utils.pathExists)(sourcePath)) throw new Error(`Template '${templateName}' not found in downloaded templates`);
763
+ if (await (0, _agiflowai_aicode_utils.pathExists)(targetPath)) {
764
+ _agiflowai_aicode_utils.print.info(`Skipping ${templateName} (already exists)`);
765
765
  continue;
766
766
  }
767
- __agiflowai_aicode_utils.print.info(`Copying ${templateName}...`);
767
+ _agiflowai_aicode_utils.print.info(`Copying ${templateName}...`);
768
768
  if (selectedMcpServers && selectedMcpServers.length > 0) await this.copyTemplateWithMcpFilter(sourcePath, targetPath, selectedMcpServers);
769
- else await (0, __agiflowai_aicode_utils.copy)(sourcePath, targetPath);
770
- __agiflowai_aicode_utils.print.success(`Copied ${templateName}`);
769
+ else await (0, _agiflowai_aicode_utils.copy)(sourcePath, targetPath);
770
+ _agiflowai_aicode_utils.print.success(`Copied ${templateName}`);
771
771
  }
772
772
  const globalRulesSource = node_path.default.join(this.tmpDir, "RULES.yaml");
773
773
  const globalRulesTarget = node_path.default.join(destinationPath, "RULES.yaml");
774
- if (await (0, __agiflowai_aicode_utils.pathExists)(globalRulesSource)) {
775
- if (!await (0, __agiflowai_aicode_utils.pathExists)(globalRulesTarget)) {
776
- __agiflowai_aicode_utils.print.info("Copying global RULES.yaml...");
777
- await (0, __agiflowai_aicode_utils.copy)(globalRulesSource, globalRulesTarget);
778
- __agiflowai_aicode_utils.print.success("Copied global RULES.yaml");
774
+ if (await (0, _agiflowai_aicode_utils.pathExists)(globalRulesSource)) {
775
+ if (!await (0, _agiflowai_aicode_utils.pathExists)(globalRulesTarget)) {
776
+ _agiflowai_aicode_utils.print.info("Copying global RULES.yaml...");
777
+ await (0, _agiflowai_aicode_utils.copy)(globalRulesSource, globalRulesTarget);
778
+ _agiflowai_aicode_utils.print.success("Copied global RULES.yaml");
779
779
  }
780
780
  }
781
- __agiflowai_aicode_utils.print.success("\nTemplates copied successfully!");
781
+ _agiflowai_aicode_utils.print.success("\nTemplates copied successfully!");
782
782
  } catch (error) {
783
783
  throw new Error(`Failed to copy templates: ${error.message}`);
784
784
  }
@@ -790,23 +790,23 @@ var TemplateSelectionService = class {
790
790
  * @param selectedMcpServers - Selected MCP servers
791
791
  */
792
792
  async copyTemplateWithMcpFilter(sourcePath, targetPath, selectedMcpServers) {
793
- const { MCPServer: MCPServer$1, MCP_CONFIG_FILES: MCP_CONFIG_FILES$1 } = await Promise.resolve().then(() => require("./mcp-B9X7HURl.cjs"));
794
- const architectFiles = MCP_CONFIG_FILES$1[MCPServer$1.ARCHITECT];
795
- const hasArchitect = selectedMcpServers.includes(MCPServer$1.ARCHITECT);
796
- const hasScaffold = selectedMcpServers.includes(MCPServer$1.SCAFFOLD);
797
- await (0, __agiflowai_aicode_utils.ensureDir)(targetPath);
798
- const entries = await (0, __agiflowai_aicode_utils.readdir)(sourcePath, { withFileTypes: true });
793
+ const { MCPServer, MCP_CONFIG_FILES } = await Promise.resolve().then(() => require("./mcp-XXavvCHL.cjs"));
794
+ const architectFiles = MCP_CONFIG_FILES[MCPServer.ARCHITECT];
795
+ const hasArchitect = selectedMcpServers.includes(MCPServer.ARCHITECT);
796
+ const hasScaffold = selectedMcpServers.includes(MCPServer.SCAFFOLD);
797
+ await (0, _agiflowai_aicode_utils.ensureDir)(targetPath);
798
+ const entries = await (0, _agiflowai_aicode_utils.readdir)(sourcePath, { withFileTypes: true });
799
799
  for (const entry of entries) {
800
800
  const entrySourcePath = node_path.default.join(sourcePath, entry.name);
801
801
  const entryTargetPath = node_path.default.join(targetPath, entry.name);
802
802
  const isArchitectFile = architectFiles.includes(entry.name);
803
- if (hasArchitect && hasScaffold) if (entry.isDirectory()) await (0, __agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
804
- else await (0, __agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
803
+ if (hasArchitect && hasScaffold) if (entry.isDirectory()) await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
804
+ else await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
805
805
  else if (hasArchitect && !hasScaffold) {
806
- if (isArchitectFile) await (0, __agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
806
+ if (isArchitectFile) await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
807
807
  } else if (!hasArchitect && hasScaffold) {
808
- if (!isArchitectFile) if (entry.isDirectory()) await (0, __agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
809
- else await (0, __agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
808
+ if (!isArchitectFile) if (entry.isDirectory()) await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
809
+ else await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
810
810
  }
811
811
  }
812
812
  }
@@ -818,15 +818,15 @@ var TemplateSelectionService = class {
818
818
  async readTemplateDescription(templatePath) {
819
819
  try {
820
820
  const scaffoldYamlPath = node_path.default.join(templatePath, "scaffold.yaml");
821
- if (await (0, __agiflowai_aicode_utils.pathExists)(scaffoldYamlPath)) {
821
+ if (await (0, _agiflowai_aicode_utils.pathExists)(scaffoldYamlPath)) {
822
822
  const yaml = await import("js-yaml");
823
- const content = await (0, __agiflowai_aicode_utils.readFile)(scaffoldYamlPath, "utf-8");
823
+ const content = await (0, _agiflowai_aicode_utils.readFile)(scaffoldYamlPath, "utf-8");
824
824
  const scaffoldConfig = yaml.load(content);
825
825
  if (scaffoldConfig?.description) return scaffoldConfig.description;
826
826
  if (scaffoldConfig?.boilerplate?.[0]?.description) return scaffoldConfig.boilerplate[0].description;
827
827
  }
828
828
  const readmePath = node_path.default.join(templatePath, "README.md");
829
- if (await (0, __agiflowai_aicode_utils.pathExists)(readmePath)) return (await (0, __agiflowai_aicode_utils.readFile)(readmePath, "utf-8")).split("\n\n")[0].substring(0, 200).trim();
829
+ if (await (0, _agiflowai_aicode_utils.pathExists)(readmePath)) return (await (0, _agiflowai_aicode_utils.readFile)(readmePath, "utf-8")).split("\n\n")[0].substring(0, 200).trim();
830
830
  return;
831
831
  } catch {
832
832
  return;
@@ -843,13 +843,12 @@ var TemplateSelectionService = class {
843
843
  */
844
844
  async cleanup() {
845
845
  try {
846
- if (await (0, __agiflowai_aicode_utils.pathExists)(this.tmpDir)) await (0, __agiflowai_aicode_utils.remove)(this.tmpDir);
846
+ if (await (0, _agiflowai_aicode_utils.pathExists)(this.tmpDir)) await (0, _agiflowai_aicode_utils.remove)(this.tmpDir);
847
847
  } catch (error) {
848
- __agiflowai_aicode_utils.print.warning(`Warning: Failed to clean up tmp directory: ${error.message}`);
848
+ _agiflowai_aicode_utils.print.warning(`Warning: Failed to clean up tmp directory: ${error.message}`);
849
849
  }
850
850
  }
851
851
  };
852
-
853
852
  //#endregion
854
853
  //#region src/services/TemplatesService.ts
855
854
  /**
@@ -876,29 +875,29 @@ var TemplatesService = class {
876
875
  * @param repoConfig - Repository configuration (owner, repo, branch, path)
877
876
  */
878
877
  async downloadTemplates(templatesPath, repoConfig) {
879
- __agiflowai_aicode_utils.print.info(`Fetching templates from ${repoConfig.owner}/${repoConfig.repo}...`);
878
+ _agiflowai_aicode_utils.print.info(`Fetching templates from ${repoConfig.owner}/${repoConfig.repo}...`);
880
879
  try {
881
- const templateDirs = (await (0, __agiflowai_aicode_utils.fetchGitHubDirectoryContents)(repoConfig.owner, repoConfig.repo, repoConfig.path, repoConfig.branch)).filter((item) => item.type === "dir");
880
+ const templateDirs = (await (0, _agiflowai_aicode_utils.fetchGitHubDirectoryContents)(repoConfig.owner, repoConfig.repo, repoConfig.path, repoConfig.branch)).filter((item) => item.type === "dir");
882
881
  if (templateDirs.length === 0) {
883
- __agiflowai_aicode_utils.messages.warning("No templates found in repository");
882
+ _agiflowai_aicode_utils.messages.warning("No templates found in repository");
884
883
  return;
885
884
  }
886
- __agiflowai_aicode_utils.print.info(`Found ${templateDirs.length} template(s)`);
885
+ _agiflowai_aicode_utils.print.info(`Found ${templateDirs.length} template(s)`);
887
886
  let _downloaded = 0;
888
887
  let _skipped = 0;
889
888
  for (const template of templateDirs) {
890
889
  const targetFolder = node_path.default.join(templatesPath, template.name);
891
- if (await (0, __agiflowai_aicode_utils.pathExists)(targetFolder)) {
892
- __agiflowai_aicode_utils.print.info(`Skipping ${template.name} (already exists)`);
890
+ if (await (0, _agiflowai_aicode_utils.pathExists)(targetFolder)) {
891
+ _agiflowai_aicode_utils.print.info(`Skipping ${template.name} (already exists)`);
893
892
  _skipped++;
894
893
  continue;
895
894
  }
896
- __agiflowai_aicode_utils.print.info(`Downloading ${template.name}...`);
897
- await (0, __agiflowai_aicode_utils.cloneSubdirectory)(`https://github.com/${repoConfig.owner}/${repoConfig.repo}.git`, repoConfig.branch, template.path, targetFolder);
898
- __agiflowai_aicode_utils.print.success(`Downloaded ${template.name}`);
895
+ _agiflowai_aicode_utils.print.info(`Downloading ${template.name}...`);
896
+ await (0, _agiflowai_aicode_utils.cloneSubdirectory)(`https://github.com/${repoConfig.owner}/${repoConfig.repo}.git`, repoConfig.branch, template.path, targetFolder);
897
+ _agiflowai_aicode_utils.print.success(`Downloaded ${template.name}`);
899
898
  _downloaded++;
900
899
  }
901
- __agiflowai_aicode_utils.print.success("\nAll templates downloaded successfully!");
900
+ _agiflowai_aicode_utils.print.success("\nAll templates downloaded successfully!");
902
901
  } catch (error) {
903
902
  throw new Error(`Failed to download templates: ${error.message}`);
904
903
  }
@@ -908,8 +907,8 @@ var TemplatesService = class {
908
907
  * @param templatesPath - Path where templates folder should be created
909
908
  */
910
909
  async initializeTemplatesFolder(templatesPath) {
911
- await (0, __agiflowai_aicode_utils.ensureDir)(templatesPath);
912
- await (0, __agiflowai_aicode_utils.writeFile)(node_path.default.join(templatesPath, "README.md"), `# Templates
910
+ await (0, _agiflowai_aicode_utils.ensureDir)(templatesPath);
911
+ await (0, _agiflowai_aicode_utils.writeFile)(node_path.default.join(templatesPath, "README.md"), `# Templates
913
912
 
914
913
  This folder contains boilerplate templates and scaffolding methods for your projects.
915
914
 
@@ -945,9 +944,20 @@ See existing templates for examples and documentation for more details.
945
944
  `);
946
945
  }
947
946
  };
948
-
949
947
  //#endregion
950
948
  //#region src/utils/banner.ts
949
+ function resolveChalk(value, depth = 0) {
950
+ if (value && (typeof value === "object" || typeof value === "function") && "red" in value && typeof value.red === "function") return value;
951
+ if (depth < 3 && value && (typeof value === "object" || typeof value === "function") && "default" in value) return resolveChalk(value.default, depth + 1);
952
+ throw new Error("Unable to resolve chalk instance");
953
+ }
954
+ const chalk$1 = resolveChalk(chalk);
955
+ function resolveGradient(value, depth = 0) {
956
+ if (typeof value === "function") return value;
957
+ if (depth < 3 && value && (typeof value === "object" || typeof value === "function") && "default" in value) return resolveGradient(value.default, depth + 1);
958
+ throw new Error("Unable to resolve gradient-string instance");
959
+ }
960
+ const gradient = resolveGradient(gradient_string);
951
961
  /**
952
962
  * ASCII art for AICode Toolkit - simple and highly readable design
953
963
  * Uses clean block style with clear spacing
@@ -972,93 +982,101 @@ const ASCII_ART = `
972
982
  * Uses gradient-string with theme colors (primary green -> secondary teal)
973
983
  */
974
984
  function displayBanner() {
975
- const bannerGradient = (0, gradient_string.default)(BANNER_GRADIENT);
985
+ const bannerGradient = gradient(BANNER_GRADIENT);
976
986
  console.log(bannerGradient.multiline(ASCII_ART));
977
987
  console.log(bannerGradient(" AI-Powered Code Toolkit for Modern Development"));
978
- console.log(chalk.default.dim(" v0.6.0"));
988
+ console.log(chalk$1.dim(" v0.6.0"));
979
989
  console.log();
980
990
  }
981
991
  /**
982
992
  * Simplified banner for compact display
983
993
  */
984
994
  function displayCompactBanner() {
985
- const titleGradient = (0, gradient_string.default)(BANNER_GRADIENT);
995
+ const titleGradient = gradient(BANNER_GRADIENT);
986
996
  console.log();
987
- console.log(chalk.default.bold("▸ ") + titleGradient("AICode Toolkit") + chalk.default.dim(" v0.6.0"));
988
- console.log(chalk.default.dim(" AI-Powered Code Toolkit"));
997
+ console.log(chalk$1.bold("▸ ") + titleGradient("AICode Toolkit") + chalk$1.dim(" v0.6.0"));
998
+ console.log(chalk$1.dim(" AI-Powered Code Toolkit"));
989
999
  console.log();
990
1000
  }
991
-
1001
+ function displaySuccessMessage(message) {
1002
+ console.log(gradient.pastel.multiline(message));
1003
+ }
992
1004
  //#endregion
993
- Object.defineProperty(exports, 'BANNER_GRADIENT', {
994
- enumerable: true,
995
- get: function () {
996
- return BANNER_GRADIENT;
997
- }
1005
+ Object.defineProperty(exports, "BANNER_GRADIENT", {
1006
+ enumerable: true,
1007
+ get: function() {
1008
+ return BANNER_GRADIENT;
1009
+ }
1010
+ });
1011
+ Object.defineProperty(exports, "CodingAgentService", {
1012
+ enumerable: true,
1013
+ get: function() {
1014
+ return CodingAgentService;
1015
+ }
998
1016
  });
999
- Object.defineProperty(exports, 'CodingAgentService', {
1000
- enumerable: true,
1001
- get: function () {
1002
- return CodingAgentService;
1003
- }
1017
+ Object.defineProperty(exports, "NewProjectService", {
1018
+ enumerable: true,
1019
+ get: function() {
1020
+ return NewProjectService;
1021
+ }
1022
+ });
1023
+ Object.defineProperty(exports, "SPEC_TOOL_INFO", {
1024
+ enumerable: true,
1025
+ get: function() {
1026
+ return SPEC_TOOL_INFO;
1027
+ }
1004
1028
  });
1005
- Object.defineProperty(exports, 'NewProjectService', {
1006
- enumerable: true,
1007
- get: function () {
1008
- return NewProjectService;
1009
- }
1029
+ Object.defineProperty(exports, "SpecTool", {
1030
+ enumerable: true,
1031
+ get: function() {
1032
+ return SpecTool;
1033
+ }
1010
1034
  });
1011
- Object.defineProperty(exports, 'SPEC_TOOL_INFO', {
1012
- enumerable: true,
1013
- get: function () {
1014
- return SPEC_TOOL_INFO;
1015
- }
1035
+ Object.defineProperty(exports, "SpecToolService", {
1036
+ enumerable: true,
1037
+ get: function() {
1038
+ return SpecToolService;
1039
+ }
1016
1040
  });
1017
- Object.defineProperty(exports, 'SpecTool', {
1018
- enumerable: true,
1019
- get: function () {
1020
- return SpecTool;
1021
- }
1041
+ Object.defineProperty(exports, "THEME", {
1042
+ enumerable: true,
1043
+ get: function() {
1044
+ return THEME;
1045
+ }
1022
1046
  });
1023
- Object.defineProperty(exports, 'SpecToolService', {
1024
- enumerable: true,
1025
- get: function () {
1026
- return SpecToolService;
1027
- }
1047
+ Object.defineProperty(exports, "TemplateSelectionService", {
1048
+ enumerable: true,
1049
+ get: function() {
1050
+ return TemplateSelectionService;
1051
+ }
1028
1052
  });
1029
- Object.defineProperty(exports, 'THEME', {
1030
- enumerable: true,
1031
- get: function () {
1032
- return THEME;
1033
- }
1053
+ Object.defineProperty(exports, "TemplatesService", {
1054
+ enumerable: true,
1055
+ get: function() {
1056
+ return TemplatesService;
1057
+ }
1034
1058
  });
1035
- Object.defineProperty(exports, 'TemplateSelectionService', {
1036
- enumerable: true,
1037
- get: function () {
1038
- return TemplateSelectionService;
1039
- }
1059
+ Object.defineProperty(exports, "__toESM", {
1060
+ enumerable: true,
1061
+ get: function() {
1062
+ return __toESM;
1063
+ }
1040
1064
  });
1041
- Object.defineProperty(exports, 'TemplatesService', {
1042
- enumerable: true,
1043
- get: function () {
1044
- return TemplatesService;
1045
- }
1065
+ Object.defineProperty(exports, "displayBanner", {
1066
+ enumerable: true,
1067
+ get: function() {
1068
+ return displayBanner;
1069
+ }
1046
1070
  });
1047
- Object.defineProperty(exports, '__toESM', {
1048
- enumerable: true,
1049
- get: function () {
1050
- return __toESM;
1051
- }
1071
+ Object.defineProperty(exports, "displayCompactBanner", {
1072
+ enumerable: true,
1073
+ get: function() {
1074
+ return displayCompactBanner;
1075
+ }
1052
1076
  });
1053
- Object.defineProperty(exports, 'displayBanner', {
1054
- enumerable: true,
1055
- get: function () {
1056
- return displayBanner;
1057
- }
1077
+ Object.defineProperty(exports, "displaySuccessMessage", {
1078
+ enumerable: true,
1079
+ get: function() {
1080
+ return displaySuccessMessage;
1081
+ }
1058
1082
  });
1059
- Object.defineProperty(exports, 'displayCompactBanner', {
1060
- enumerable: true,
1061
- get: function () {
1062
- return displayCompactBanner;
1063
- }
1064
- });