@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.cjs CHANGED
@@ -1033,16 +1033,16 @@ async function toolCreateCommand(name, options) {
1033
1033
  }
1034
1034
  function generateToolContent(name, category, description) {
1035
1035
  return `import { z } from 'zod';
1036
- import { createTool } from '@agentforge/core';
1036
+ import { toolBuilder, ToolCategory } from '@agentforge/core';
1037
1037
 
1038
1038
  /**
1039
1039
  * ${description}
1040
1040
  * Category: ${category}
1041
1041
  */
1042
- export const ${name}Tool = createTool()
1042
+ export const ${name}Tool = toolBuilder()
1043
1043
  .name('${name}')
1044
1044
  .description('${description}')
1045
- .category('${category}')
1045
+ .category(ToolCategory.${category.toUpperCase().replace(/-/g, "_")})
1046
1046
  .schema(
1047
1047
  z.object({
1048
1048
  // Define your input schema here
@@ -1109,7 +1109,8 @@ async function createMultiFileTool(cwd, answers) {
1109
1109
  TOOL_NAME_PASCAL: capitalize2(answers.name),
1110
1110
  TOOL_NAME_CAMEL: answers.name.charAt(0).toLowerCase() + answers.name.slice(1),
1111
1111
  TOOL_DESCRIPTION: answers.description,
1112
- TOOL_CATEGORY: answers.category
1112
+ TOOL_CATEGORY: answers.category,
1113
+ TOOL_CATEGORY_ENUM: answers.category.toUpperCase().replace(/-/g, "_")
1113
1114
  };
1114
1115
  await copyTemplate(templatePath, toolDir, replacements);
1115
1116
  logger.succeedSpinner("Tool directory structure created");