@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 +5 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/api/package.json +2 -2
- package/templates/api/src/routes/agent.ts +3 -2
- package/templates/api/src/server.ts +1 -1
- package/templates/cli/package.json +2 -2
- package/templates/cli/src/commands/analyze.ts +2 -1
- package/templates/cli/src/commands/chat.ts +2 -1
- package/templates/full/package.json +2 -2
- package/templates/full/src/index.ts +3 -2
- package/templates/full/src/tools/example.ts +3 -3
- package/templates/minimal/package.json +2 -2
- package/templates/minimal/src/index.ts +2 -1
- package/templates/tool-multi/index.ts +5 -5
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 {
|
|
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 =
|
|
1031
|
+
export const ${name}Tool = toolBuilder()
|
|
1032
1032
|
.name('${name}')
|
|
1033
1033
|
.description('${description}')
|
|
1034
|
-
.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");
|