cp-toolkit 2.1.0 → 2.1.2

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.2",
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
 
@@ -302,14 +304,14 @@ const templatesDir = path.resolve(__dirname, '../../templates');
302
304
  {
303
305
  type: 'confirm',
304
306
  name: 'installEverything',
305
- message: 'Install full Antigravity Kit (Agents, Skills, Workflows)?',
307
+ message: 'Install full Copilot Kit (Agents, Skills, Workflows)?',
306
308
  initial: true
307
309
  }
308
310
  ]);
309
311
  config = { ...config, ...response };
310
312
  }
311
313
 
312
- const spinner = ora('Installing Antigravity Kit...').start();
314
+ const spinner = ora('Installing Copilot Kit...').start();
313
315
 
314
316
  try {
315
317
  // 1. Copy Templates to .agent folder
@@ -381,7 +383,7 @@ const templatesDir = path.resolve(__dirname, '../../templates');
381
383
  // Based on list_dir earlier, it wasn't there. It was likely outside.
382
384
  // We will generate a basic one if missing.
383
385
 
384
- spinner.succeed(chalk.green('Antigravity Kit installed successfully!'));
386
+ spinner.succeed(chalk.green('Copilot Kit installed successfully!'));
385
387
 
386
388
  console.log(chalk.bold('\nNext Steps:'));
387
389
  console.log(`1. Open ${chalk.cyan('.github/copilot-instructions.md')} to see the setup.`);
@@ -396,18 +398,27 @@ 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
- > **Antigravity Kit Active**
406
- > Profile: \${config.projectName}
416
+ > **Copilot Kit Active**
417
+ > Profile: ${config.projectName}
407
418
 
408
419
  ## 🧠 Core Protocols
409
420
 
410
- The user has installed the **Antigravity Agent Kit** in \`.agent/\`.
421
+ The user has installed the **Copilot Kit** in \`.agent/\`.
411
422
  You must follow the rules defined in \`.agent/rules/GEMINI.md\`.
412
423
 
413
424
  ### Structure
@@ -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
+