cp-toolkit 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cp-toolkit",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Copilot Toolkit - AI Agent framework for GitHub Copilot, Claude, Gemini CLI, and other AI assistants",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -259,9 +259,11 @@ const TEMPLATE_INSTRUCTIONS = {
259
259
  };
260
260
 
261
261
  export async function initCommand(directory, options) {
262
- const templatesDir = path.resolve(__dirname, '../../templates');
262
+ const targetDir = directory ? path.resolve(directory) : process.cwd();
263
+ const dirName = path.basename(targetDir);
264
+ const templatesDir = path.join(path.dirname(new URL(import.meta.url).pathname.replace(/^\/([A-Za-z]:)/, '$1')), '../../templates');
263
265
 
264
- console.log(chalk.bold.cyan('\nšŸš€ cp-kit - GitHub Copilot Agent Toolkit\n'));
266
+ console.log(chalk.bold.cyan('\nšŸš€ cp-toolkit - GitHub Copilot Agent Toolkit\n'));
265
267
 
266
268
  // Create directory if needed
267
269
  if (directory && !fs.existsSync(targetDir)) {
@@ -275,7 +277,7 @@ const templatesDir = path.resolve(__dirname, '../../templates');
275
277
  const { overwrite } = await prompts({
276
278
  type: 'confirm',
277
279
  name: 'overwrite',
278
- message: 'cp-kit (.agent) already initialized. Overwrite?',
280
+ message: 'cp-toolkit (.agent) already initialized. Overwrite?',
279
281
  initial: false
280
282
  });
281
283
 
@@ -396,14 +398,23 @@ const templatesDir = path.resolve(__dirname, '../../templates');
396
398
 
397
399
  function generateAgentFile(agent) {
398
400
  // Deprecated generally, using static files now, but keeping for fallback
399
- return \`---\nname: \${agent.name}\ndescription: \${agent.description}\nskills: [\${agent.skills.join(', ')}]\n---\n\n# \${agent.name}\n\n\${agent.description}\n\`;
401
+ return `---
402
+ name: ${agent.name}
403
+ description: ${agent.description}
404
+ skills: [${agent.skills.join(', ')}]
405
+ ---
406
+
407
+ # ${agent.name}
408
+
409
+ ${agent.description}
410
+ `;
400
411
  }
401
412
 
402
413
  function generateCopilotInstructions(config) {
403
- return \`# GitHub Copilot Instructions
414
+ return `# GitHub Copilot Instructions
404
415
 
405
416
  > **Antigravity Kit Active**
406
- > Profile: \${config.projectName}
417
+ > Profile: ${config.projectName}
407
418
 
408
419
  ## 🧠 Core Protocols
409
420
 
@@ -424,7 +435,9 @@ Always read \`.agent/rules/GEMINI.md\` first.
424
435
  ## šŸ› ļø MCP Tools
425
436
  An MCP server is configured at \`.agent/scripts/mcp-server.js\`.
426
437
  Use it to list available tools, resources, and prompts.
427
- \`;
438
+ `;
428
439
  }
440
+
429
441
  export default initCommand;
430
442
 
443
+