@agiflowai/aicode-toolkit 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.
@@ -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
@@ -306,7 +300,7 @@ var CodingAgentService = class {
306
300
  */
307
301
  async createMcpConfigYaml(selectedMcpServers) {
308
302
  const { execSync } = await import("node:child_process");
309
- const path$3 = await import("node:path");
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,12 @@ 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
+ execSync(`npx -y @agiflowai/one-mcp init -o "${path.join(this.workspaceRoot, "mcp-config.yaml")}" -f --mcp-servers '${JSON.stringify(servers)}'`, {
351
345
  cwd: this.workspaceRoot,
352
346
  stdio: "inherit"
353
347
  });
354
348
  }
355
349
  };
356
-
357
350
  //#endregion
358
351
  //#region src/services/NewProjectService.ts
359
352
  /**
@@ -427,7 +420,7 @@ var NewProjectService = class {
427
420
  * @throws Error if invalid project type
428
421
  */
429
422
  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}'`);
423
+ 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
424
  }
432
425
  /**
433
426
  * Get the provided name from constructor
@@ -448,7 +441,7 @@ var NewProjectService = class {
448
441
  */
449
442
  async createProjectDirectory(projectPath, projectName) {
450
443
  try {
451
- await (0, __agiflowai_aicode_utils.mkdir)(projectPath, { recursive: false });
444
+ await (0, _agiflowai_aicode_utils.mkdir)(projectPath, { recursive: false });
452
445
  } catch (error) {
453
446
  if (error.code === "EEXIST") throw new Error(`Directory '${projectName}' already exists. Please choose a different name.`);
454
447
  throw error;
@@ -461,11 +454,11 @@ var NewProjectService = class {
461
454
  */
462
455
  async cloneExistingRepository(repoUrl, projectPath) {
463
456
  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);
457
+ const parsed = (0, _agiflowai_aicode_utils.parseGitHubUrl)(repoUrl.trim());
458
+ if (parsed.isSubdirectory && parsed.branch && parsed.subdirectory) await (0, _agiflowai_aicode_utils.cloneSubdirectory)(parsed.repoUrl, parsed.branch, parsed.subdirectory, projectPath);
459
+ else await (0, _agiflowai_aicode_utils.cloneRepository)(parsed.repoUrl, projectPath);
467
460
  } catch (error) {
468
- await (0, __agiflowai_aicode_utils.remove)(projectPath);
461
+ await (0, _agiflowai_aicode_utils.remove)(projectPath);
469
462
  throw new Error(`Failed to clone repository: ${error.message}`);
470
463
  }
471
464
  }
@@ -475,9 +468,9 @@ var NewProjectService = class {
475
468
  */
476
469
  async initializeGitRepository(projectPath) {
477
470
  try {
478
- await (0, __agiflowai_aicode_utils.gitInit)(projectPath);
471
+ await (0, _agiflowai_aicode_utils.gitInit)(projectPath);
479
472
  } catch (error) {
480
- __agiflowai_aicode_utils.messages.warning(`Failed to initialize Git: ${error.message}`);
473
+ _agiflowai_aicode_utils.messages.warning(`Failed to initialize Git: ${error.message}`);
481
474
  }
482
475
  }
483
476
  /**
@@ -491,11 +484,9 @@ var NewProjectService = class {
491
484
  return true;
492
485
  }
493
486
  };
494
-
495
487
  //#endregion
496
488
  //#region src/instructions/specs/openspec.md?raw
497
489
  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
490
  //#endregion
500
491
  //#region src/specs/openspec.ts
501
492
  /**
@@ -572,7 +563,6 @@ var OpenSpecBridge = class {
572
563
  return (await new liquidjs.Liquid().parseAndRender(openspec_default, enabledMcps)).trim();
573
564
  }
574
565
  };
575
-
576
566
  //#endregion
577
567
  //#region src/services/SpecToolService.ts
578
568
  /**
@@ -590,9 +580,9 @@ var OpenSpecBridge = class {
590
580
  /**
591
581
  * Available spec tools
592
582
  */
593
- let SpecTool = /* @__PURE__ */ function(SpecTool$1) {
594
- SpecTool$1["OPENSPEC"] = "openspec";
595
- return SpecTool$1;
583
+ let SpecTool = /* @__PURE__ */ function(SpecTool) {
584
+ SpecTool["OPENSPEC"] = "openspec";
585
+ return SpecTool;
596
586
  }({});
597
587
  /**
598
588
  * Spec tool information
@@ -631,7 +621,7 @@ var SpecToolService = class {
631
621
  try {
632
622
  return await this.bridge.isEnabled(this.workspaceRoot) ? SpecTool.OPENSPEC : null;
633
623
  } catch (error) {
634
- __agiflowai_aicode_utils.print.error(`Error detecting spec tool: ${error.message}`);
624
+ _agiflowai_aicode_utils.print.error(`Error detecting spec tool: ${error.message}`);
635
625
  return null;
636
626
  }
637
627
  }
@@ -655,14 +645,13 @@ var SpecToolService = class {
655
645
  const prompt = await this.bridge.updateInstruction(enabledMcps);
656
646
  if (this.codingAgentService && codingAgent) await this.codingAgentService.updateCustomInstructions(codingAgent, prompt, customInstructionFile ?? ".claude/aicode-instructions.md");
657
647
  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}`);
648
+ _agiflowai_aicode_utils.print.info("\nGenerated OpenSpec instruction prompt:");
649
+ _agiflowai_aicode_utils.print.info("\nYou can append this to your CLAUDE.md or agent config file:");
650
+ _agiflowai_aicode_utils.print.info(`\n${prompt}`);
661
651
  }
662
652
  return prompt;
663
653
  }
664
654
  };
665
-
666
655
  //#endregion
667
656
  //#region src/services/TemplateSelectionService.ts
668
657
  /**
@@ -693,29 +682,29 @@ var TemplateSelectionService = class {
693
682
  */
694
683
  async downloadTemplatesToTmp(repoConfig) {
695
684
  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);
685
+ await (0, _agiflowai_aicode_utils.ensureDir)(this.tmpDir);
686
+ const contents = await (0, _agiflowai_aicode_utils.fetchGitHubDirectoryContents)(repoConfig.owner, repoConfig.repo, repoConfig.path, repoConfig.branch);
698
687
  const templateDirs = contents.filter((item) => item.type === "dir");
699
688
  const globalFiles = contents.filter((item) => item.type === "file" && item.name === "RULES.yaml");
700
689
  if (templateDirs.length === 0) throw new Error("No templates found in repository");
701
- __agiflowai_aicode_utils.print.info(`Found ${templateDirs.length} template(s), downloading...`);
690
+ _agiflowai_aicode_utils.print.info(`Found ${templateDirs.length} template(s), downloading...`);
702
691
  for (const template of templateDirs) {
703
692
  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}`);
693
+ _agiflowai_aicode_utils.print.info(`Downloading ${template.name}...`);
694
+ await (0, _agiflowai_aicode_utils.cloneSubdirectory)(`https://github.com/${repoConfig.owner}/${repoConfig.repo}.git`, repoConfig.branch, template.path, targetFolder);
695
+ _agiflowai_aicode_utils.print.success(`Downloaded ${template.name}`);
707
696
  }
708
697
  if (globalFiles.length > 0) {
709
- __agiflowai_aicode_utils.print.info("Downloading global RULES.yaml...");
698
+ _agiflowai_aicode_utils.print.info("Downloading global RULES.yaml...");
710
699
  const rulesUrl = `https://raw.githubusercontent.com/${repoConfig.owner}/${repoConfig.repo}/${repoConfig.branch}/${repoConfig.path}/RULES.yaml`;
711
700
  const targetFile = node_path.default.join(this.tmpDir, "RULES.yaml");
712
701
  const response = await fetch(rulesUrl);
713
702
  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");
703
+ await (0, _agiflowai_aicode_utils.writeFile)(targetFile, await response.text(), "utf-8");
704
+ _agiflowai_aicode_utils.print.success("Downloaded global RULES.yaml");
716
705
  }
717
706
  }
718
- __agiflowai_aicode_utils.print.success(`\nAll templates downloaded to ${this.tmpDir}`);
707
+ _agiflowai_aicode_utils.print.success(`\nAll templates downloaded to ${this.tmpDir}`);
719
708
  return this.tmpDir;
720
709
  } catch (error) {
721
710
  await this.cleanup();
@@ -728,7 +717,7 @@ var TemplateSelectionService = class {
728
717
  */
729
718
  async listTemplates() {
730
719
  try {
731
- const entries = await (0, __agiflowai_aicode_utils.readdir)(this.tmpDir, { withFileTypes: true });
720
+ const entries = await (0, _agiflowai_aicode_utils.readdir)(this.tmpDir, { withFileTypes: true });
732
721
  const templates = [];
733
722
  for (const entry of entries) if (entry.isDirectory()) {
734
723
  const templatePath = node_path.default.join(this.tmpDir, entry.name);
@@ -753,32 +742,32 @@ var TemplateSelectionService = class {
753
742
  */
754
743
  async copyTemplates(templateNames, destinationPath, projectType, selectedMcpServers) {
755
744
  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}...`);
745
+ if (projectType === _agiflowai_aicode_utils.ProjectType.MONOLITH && templateNames.length > 1) throw new Error("Monolith projects can only use a single template");
746
+ await (0, _agiflowai_aicode_utils.ensureDir)(destinationPath);
747
+ _agiflowai_aicode_utils.print.info(`\nCopying templates to ${destinationPath}...`);
759
748
  for (const templateName of templateNames) {
760
749
  const sourcePath = node_path.default.join(this.tmpDir, templateName);
761
750
  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)`);
751
+ if (!await (0, _agiflowai_aicode_utils.pathExists)(sourcePath)) throw new Error(`Template '${templateName}' not found in downloaded templates`);
752
+ if (await (0, _agiflowai_aicode_utils.pathExists)(targetPath)) {
753
+ _agiflowai_aicode_utils.print.info(`Skipping ${templateName} (already exists)`);
765
754
  continue;
766
755
  }
767
- __agiflowai_aicode_utils.print.info(`Copying ${templateName}...`);
756
+ _agiflowai_aicode_utils.print.info(`Copying ${templateName}...`);
768
757
  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}`);
758
+ else await (0, _agiflowai_aicode_utils.copy)(sourcePath, targetPath);
759
+ _agiflowai_aicode_utils.print.success(`Copied ${templateName}`);
771
760
  }
772
761
  const globalRulesSource = node_path.default.join(this.tmpDir, "RULES.yaml");
773
762
  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");
763
+ if (await (0, _agiflowai_aicode_utils.pathExists)(globalRulesSource)) {
764
+ if (!await (0, _agiflowai_aicode_utils.pathExists)(globalRulesTarget)) {
765
+ _agiflowai_aicode_utils.print.info("Copying global RULES.yaml...");
766
+ await (0, _agiflowai_aicode_utils.copy)(globalRulesSource, globalRulesTarget);
767
+ _agiflowai_aicode_utils.print.success("Copied global RULES.yaml");
779
768
  }
780
769
  }
781
- __agiflowai_aicode_utils.print.success("\nTemplates copied successfully!");
770
+ _agiflowai_aicode_utils.print.success("\nTemplates copied successfully!");
782
771
  } catch (error) {
783
772
  throw new Error(`Failed to copy templates: ${error.message}`);
784
773
  }
@@ -790,23 +779,23 @@ var TemplateSelectionService = class {
790
779
  * @param selectedMcpServers - Selected MCP servers
791
780
  */
792
781
  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 });
782
+ const { MCPServer, MCP_CONFIG_FILES } = await Promise.resolve().then(() => require("./mcp-XXavvCHL.cjs"));
783
+ const architectFiles = MCP_CONFIG_FILES[MCPServer.ARCHITECT];
784
+ const hasArchitect = selectedMcpServers.includes(MCPServer.ARCHITECT);
785
+ const hasScaffold = selectedMcpServers.includes(MCPServer.SCAFFOLD);
786
+ await (0, _agiflowai_aicode_utils.ensureDir)(targetPath);
787
+ const entries = await (0, _agiflowai_aicode_utils.readdir)(sourcePath, { withFileTypes: true });
799
788
  for (const entry of entries) {
800
789
  const entrySourcePath = node_path.default.join(sourcePath, entry.name);
801
790
  const entryTargetPath = node_path.default.join(targetPath, entry.name);
802
791
  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);
792
+ if (hasArchitect && hasScaffold) if (entry.isDirectory()) await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
793
+ else await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
805
794
  else if (hasArchitect && !hasScaffold) {
806
- if (isArchitectFile) await (0, __agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
795
+ if (isArchitectFile) await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
807
796
  } 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);
797
+ if (!isArchitectFile) if (entry.isDirectory()) await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
798
+ else await (0, _agiflowai_aicode_utils.copy)(entrySourcePath, entryTargetPath);
810
799
  }
811
800
  }
812
801
  }
@@ -818,15 +807,15 @@ var TemplateSelectionService = class {
818
807
  async readTemplateDescription(templatePath) {
819
808
  try {
820
809
  const scaffoldYamlPath = node_path.default.join(templatePath, "scaffold.yaml");
821
- if (await (0, __agiflowai_aicode_utils.pathExists)(scaffoldYamlPath)) {
810
+ if (await (0, _agiflowai_aicode_utils.pathExists)(scaffoldYamlPath)) {
822
811
  const yaml = await import("js-yaml");
823
- const content = await (0, __agiflowai_aicode_utils.readFile)(scaffoldYamlPath, "utf-8");
812
+ const content = await (0, _agiflowai_aicode_utils.readFile)(scaffoldYamlPath, "utf-8");
824
813
  const scaffoldConfig = yaml.load(content);
825
814
  if (scaffoldConfig?.description) return scaffoldConfig.description;
826
815
  if (scaffoldConfig?.boilerplate?.[0]?.description) return scaffoldConfig.boilerplate[0].description;
827
816
  }
828
817
  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();
818
+ 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
819
  return;
831
820
  } catch {
832
821
  return;
@@ -843,13 +832,12 @@ var TemplateSelectionService = class {
843
832
  */
844
833
  async cleanup() {
845
834
  try {
846
- if (await (0, __agiflowai_aicode_utils.pathExists)(this.tmpDir)) await (0, __agiflowai_aicode_utils.remove)(this.tmpDir);
835
+ if (await (0, _agiflowai_aicode_utils.pathExists)(this.tmpDir)) await (0, _agiflowai_aicode_utils.remove)(this.tmpDir);
847
836
  } catch (error) {
848
- __agiflowai_aicode_utils.print.warning(`Warning: Failed to clean up tmp directory: ${error.message}`);
837
+ _agiflowai_aicode_utils.print.warning(`Warning: Failed to clean up tmp directory: ${error.message}`);
849
838
  }
850
839
  }
851
840
  };
852
-
853
841
  //#endregion
854
842
  //#region src/services/TemplatesService.ts
855
843
  /**
@@ -876,29 +864,29 @@ var TemplatesService = class {
876
864
  * @param repoConfig - Repository configuration (owner, repo, branch, path)
877
865
  */
878
866
  async downloadTemplates(templatesPath, repoConfig) {
879
- __agiflowai_aicode_utils.print.info(`Fetching templates from ${repoConfig.owner}/${repoConfig.repo}...`);
867
+ _agiflowai_aicode_utils.print.info(`Fetching templates from ${repoConfig.owner}/${repoConfig.repo}...`);
880
868
  try {
881
- const templateDirs = (await (0, __agiflowai_aicode_utils.fetchGitHubDirectoryContents)(repoConfig.owner, repoConfig.repo, repoConfig.path, repoConfig.branch)).filter((item) => item.type === "dir");
869
+ const templateDirs = (await (0, _agiflowai_aicode_utils.fetchGitHubDirectoryContents)(repoConfig.owner, repoConfig.repo, repoConfig.path, repoConfig.branch)).filter((item) => item.type === "dir");
882
870
  if (templateDirs.length === 0) {
883
- __agiflowai_aicode_utils.messages.warning("No templates found in repository");
871
+ _agiflowai_aicode_utils.messages.warning("No templates found in repository");
884
872
  return;
885
873
  }
886
- __agiflowai_aicode_utils.print.info(`Found ${templateDirs.length} template(s)`);
874
+ _agiflowai_aicode_utils.print.info(`Found ${templateDirs.length} template(s)`);
887
875
  let _downloaded = 0;
888
876
  let _skipped = 0;
889
877
  for (const template of templateDirs) {
890
878
  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)`);
879
+ if (await (0, _agiflowai_aicode_utils.pathExists)(targetFolder)) {
880
+ _agiflowai_aicode_utils.print.info(`Skipping ${template.name} (already exists)`);
893
881
  _skipped++;
894
882
  continue;
895
883
  }
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}`);
884
+ _agiflowai_aicode_utils.print.info(`Downloading ${template.name}...`);
885
+ await (0, _agiflowai_aicode_utils.cloneSubdirectory)(`https://github.com/${repoConfig.owner}/${repoConfig.repo}.git`, repoConfig.branch, template.path, targetFolder);
886
+ _agiflowai_aicode_utils.print.success(`Downloaded ${template.name}`);
899
887
  _downloaded++;
900
888
  }
901
- __agiflowai_aicode_utils.print.success("\nAll templates downloaded successfully!");
889
+ _agiflowai_aicode_utils.print.success("\nAll templates downloaded successfully!");
902
890
  } catch (error) {
903
891
  throw new Error(`Failed to download templates: ${error.message}`);
904
892
  }
@@ -908,8 +896,8 @@ var TemplatesService = class {
908
896
  * @param templatesPath - Path where templates folder should be created
909
897
  */
910
898
  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
899
+ await (0, _agiflowai_aicode_utils.ensureDir)(templatesPath);
900
+ await (0, _agiflowai_aicode_utils.writeFile)(node_path.default.join(templatesPath, "README.md"), `# Templates
913
901
 
914
902
  This folder contains boilerplate templates and scaffolding methods for your projects.
915
903
 
@@ -945,9 +933,14 @@ See existing templates for examples and documentation for more details.
945
933
  `);
946
934
  }
947
935
  };
948
-
949
936
  //#endregion
950
937
  //#region src/utils/banner.ts
938
+ function resolveChalk(value, depth = 0) {
939
+ if (value && (typeof value === "object" || typeof value === "function") && "red" in value && typeof value.red === "function") return value;
940
+ if (depth < 3 && value && (typeof value === "object" || typeof value === "function") && "default" in value) return resolveChalk(value.default, depth + 1);
941
+ throw new Error("Unable to resolve chalk instance");
942
+ }
943
+ const chalk$1 = resolveChalk(chalk);
951
944
  /**
952
945
  * ASCII art for AICode Toolkit - simple and highly readable design
953
946
  * Uses clean block style with clear spacing
@@ -975,7 +968,7 @@ function displayBanner() {
975
968
  const bannerGradient = (0, gradient_string.default)(BANNER_GRADIENT);
976
969
  console.log(bannerGradient.multiline(ASCII_ART));
977
970
  console.log(bannerGradient(" AI-Powered Code Toolkit for Modern Development"));
978
- console.log(chalk.default.dim(" v0.6.0"));
971
+ console.log(chalk$1.dim(" v0.6.0"));
979
972
  console.log();
980
973
  }
981
974
  /**
@@ -984,81 +977,80 @@ function displayBanner() {
984
977
  function displayCompactBanner() {
985
978
  const titleGradient = (0, gradient_string.default)(BANNER_GRADIENT);
986
979
  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"));
980
+ console.log(chalk$1.bold("▸ ") + titleGradient("AICode Toolkit") + chalk$1.dim(" v0.6.0"));
981
+ console.log(chalk$1.dim(" AI-Powered Code Toolkit"));
989
982
  console.log();
990
983
  }
991
-
992
984
  //#endregion
993
- Object.defineProperty(exports, 'BANNER_GRADIENT', {
994
- enumerable: true,
995
- get: function () {
996
- return BANNER_GRADIENT;
997
- }
985
+ Object.defineProperty(exports, "BANNER_GRADIENT", {
986
+ enumerable: true,
987
+ get: function() {
988
+ return BANNER_GRADIENT;
989
+ }
998
990
  });
999
- Object.defineProperty(exports, 'CodingAgentService', {
1000
- enumerable: true,
1001
- get: function () {
1002
- return CodingAgentService;
1003
- }
991
+ Object.defineProperty(exports, "CodingAgentService", {
992
+ enumerable: true,
993
+ get: function() {
994
+ return CodingAgentService;
995
+ }
1004
996
  });
1005
- Object.defineProperty(exports, 'NewProjectService', {
1006
- enumerable: true,
1007
- get: function () {
1008
- return NewProjectService;
1009
- }
997
+ Object.defineProperty(exports, "NewProjectService", {
998
+ enumerable: true,
999
+ get: function() {
1000
+ return NewProjectService;
1001
+ }
1010
1002
  });
1011
- Object.defineProperty(exports, 'SPEC_TOOL_INFO', {
1012
- enumerable: true,
1013
- get: function () {
1014
- return SPEC_TOOL_INFO;
1015
- }
1003
+ Object.defineProperty(exports, "SPEC_TOOL_INFO", {
1004
+ enumerable: true,
1005
+ get: function() {
1006
+ return SPEC_TOOL_INFO;
1007
+ }
1008
+ });
1009
+ Object.defineProperty(exports, "SpecTool", {
1010
+ enumerable: true,
1011
+ get: function() {
1012
+ return SpecTool;
1013
+ }
1016
1014
  });
1017
- Object.defineProperty(exports, 'SpecTool', {
1018
- enumerable: true,
1019
- get: function () {
1020
- return SpecTool;
1021
- }
1015
+ Object.defineProperty(exports, "SpecToolService", {
1016
+ enumerable: true,
1017
+ get: function() {
1018
+ return SpecToolService;
1019
+ }
1022
1020
  });
1023
- Object.defineProperty(exports, 'SpecToolService', {
1024
- enumerable: true,
1025
- get: function () {
1026
- return SpecToolService;
1027
- }
1021
+ Object.defineProperty(exports, "THEME", {
1022
+ enumerable: true,
1023
+ get: function() {
1024
+ return THEME;
1025
+ }
1028
1026
  });
1029
- Object.defineProperty(exports, 'THEME', {
1030
- enumerable: true,
1031
- get: function () {
1032
- return THEME;
1033
- }
1027
+ Object.defineProperty(exports, "TemplateSelectionService", {
1028
+ enumerable: true,
1029
+ get: function() {
1030
+ return TemplateSelectionService;
1031
+ }
1034
1032
  });
1035
- Object.defineProperty(exports, 'TemplateSelectionService', {
1036
- enumerable: true,
1037
- get: function () {
1038
- return TemplateSelectionService;
1039
- }
1033
+ Object.defineProperty(exports, "TemplatesService", {
1034
+ enumerable: true,
1035
+ get: function() {
1036
+ return TemplatesService;
1037
+ }
1040
1038
  });
1041
- Object.defineProperty(exports, 'TemplatesService', {
1042
- enumerable: true,
1043
- get: function () {
1044
- return TemplatesService;
1045
- }
1039
+ Object.defineProperty(exports, "__toESM", {
1040
+ enumerable: true,
1041
+ get: function() {
1042
+ return __toESM;
1043
+ }
1046
1044
  });
1047
- Object.defineProperty(exports, '__toESM', {
1048
- enumerable: true,
1049
- get: function () {
1050
- return __toESM;
1051
- }
1045
+ Object.defineProperty(exports, "displayBanner", {
1046
+ enumerable: true,
1047
+ get: function() {
1048
+ return displayBanner;
1049
+ }
1052
1050
  });
1053
- Object.defineProperty(exports, 'displayBanner', {
1054
- enumerable: true,
1055
- get: function () {
1056
- return displayBanner;
1057
- }
1051
+ Object.defineProperty(exports, "displayCompactBanner", {
1052
+ enumerable: true,
1053
+ get: function() {
1054
+ return displayCompactBanner;
1055
+ }
1058
1056
  });
1059
- Object.defineProperty(exports, 'displayCompactBanner', {
1060
- enumerable: true,
1061
- get: function () {
1062
- return displayCompactBanner;
1063
- }
1064
- });