@agentforge/cli 0.12.1 → 0.12.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/dist/index.js CHANGED
@@ -1022,16 +1022,16 @@ async function toolCreateCommand(name, options) {
1022
1022
  }
1023
1023
  function generateToolContent(name, category, description) {
1024
1024
  return `import { z } from 'zod';
1025
- import { createTool } from '@agentforge/core';
1025
+ import { toolBuilder, ToolCategory } from '@agentforge/core';
1026
1026
 
1027
1027
  /**
1028
1028
  * ${description}
1029
1029
  * Category: ${category}
1030
1030
  */
1031
- export const ${name}Tool = createTool()
1031
+ export const ${name}Tool = toolBuilder()
1032
1032
  .name('${name}')
1033
1033
  .description('${description}')
1034
- .category('${category}')
1034
+ .category(ToolCategory.${category.toUpperCase().replace(/-/g, "_")})
1035
1035
  .schema(
1036
1036
  z.object({
1037
1037
  // Define your input schema here
@@ -1098,7 +1098,8 @@ async function createMultiFileTool(cwd, answers) {
1098
1098
  TOOL_NAME_PASCAL: capitalize2(answers.name),
1099
1099
  TOOL_NAME_CAMEL: answers.name.charAt(0).toLowerCase() + answers.name.slice(1),
1100
1100
  TOOL_DESCRIPTION: answers.description,
1101
- TOOL_CATEGORY: answers.category
1101
+ TOOL_CATEGORY: answers.category,
1102
+ TOOL_CATEGORY_ENUM: answers.category.toUpperCase().replace(/-/g, "_")
1102
1103
  };
1103
1104
  await copyTemplate(templatePath, toolDir, replacements);
1104
1105
  logger.succeedSpinner("Tool directory structure created");