@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.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 {
|
|
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 =
|
|
1042
|
+
export const ${name}Tool = toolBuilder()
|
|
1043
1043
|
.name('${name}')
|
|
1044
1044
|
.description('${description}')
|
|
1045
|
-
.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");
|