@agentforge/cli 0.12.0 → 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/LICENSE +22 -0
- 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 +13 -13
- 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/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Tom Van Schoor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
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");
|