@agentforge/cli 0.3.4 → 0.3.7
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/bin/agentforge.js +0 -0
- package/package.json +13 -13
- package/templates/api/package.json +2 -2
- package/templates/api/src/routes/agent.ts +1 -3
- package/templates/cli/package.json +2 -2
- package/templates/cli/src/commands/analyze.ts +1 -3
- package/templates/cli/src/commands/chat.ts +1 -2
- package/templates/full/package.json +2 -2
- package/templates/full/src/index.ts +1 -4
- package/templates/minimal/package.json +2 -2
- package/templates/minimal/src/index.ts +1 -4
- package/LICENSE +0 -22
package/bin/agentforge.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentforge/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "CLI tool for AgentForge - scaffolding, development, and deployment",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,17 @@
|
|
|
18
18
|
"bin",
|
|
19
19
|
"templates"
|
|
20
20
|
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "tsup",
|
|
23
|
+
"dev": "tsup --watch",
|
|
24
|
+
"test": "vitest",
|
|
25
|
+
"test:ui": "vitest --ui",
|
|
26
|
+
"test:coverage": "vitest --coverage",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"lint": "eslint src",
|
|
29
|
+
"lint:fix": "eslint src --fix",
|
|
30
|
+
"format": "prettier --write \"src/**/*.ts\""
|
|
31
|
+
},
|
|
21
32
|
"keywords": [
|
|
22
33
|
"agentforge",
|
|
23
34
|
"cli",
|
|
@@ -66,16 +77,5 @@
|
|
|
66
77
|
"type": "git",
|
|
67
78
|
"url": "git+https://github.com/TVScoundrel/agentforge.git",
|
|
68
79
|
"directory": "packages/cli"
|
|
69
|
-
},
|
|
70
|
-
"scripts": {
|
|
71
|
-
"build": "tsup",
|
|
72
|
-
"dev": "tsup --watch",
|
|
73
|
-
"test": "vitest",
|
|
74
|
-
"test:ui": "vitest --ui",
|
|
75
|
-
"test:coverage": "vitest --coverage",
|
|
76
|
-
"typecheck": "tsc --noEmit",
|
|
77
|
-
"lint": "eslint src",
|
|
78
|
-
"lint:fix": "eslint src --fix",
|
|
79
|
-
"format": "prettier --write \"src/**/*.ts\""
|
|
80
80
|
}
|
|
81
|
-
}
|
|
81
|
+
}
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"format": "prettier --write ."
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@agentforge/core": "^0.3.
|
|
21
|
-
"@agentforge/patterns": "^0.3.
|
|
20
|
+
"@agentforge/core": "^0.3.6",
|
|
21
|
+
"@agentforge/patterns": "^0.3.6",
|
|
22
22
|
"@langchain/core": "^1.1.0",
|
|
23
23
|
"@langchain/langgraph": "^1.0.0",
|
|
24
24
|
"@langchain/openai": "^1.2.0",
|
|
@@ -18,8 +18,6 @@ const agent = createReActAgent({
|
|
|
18
18
|
systemPrompt: 'You are a helpful AI assistant API.',
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
const compiledAgent = agent.compile();
|
|
22
|
-
|
|
23
21
|
// POST /api/agent/chat
|
|
24
22
|
router.post('/chat', async (req, res) => {
|
|
25
23
|
try {
|
|
@@ -31,7 +29,7 @@ router.post('/chat', async (req, res) => {
|
|
|
31
29
|
|
|
32
30
|
logger.info('Processing chat request');
|
|
33
31
|
|
|
34
|
-
const result = await
|
|
32
|
+
const result = await agent.invoke({
|
|
35
33
|
messages: [{ role: 'user', content: message }],
|
|
36
34
|
});
|
|
37
35
|
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"format": "prettier --write ."
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agentforge/core": "^0.3.
|
|
24
|
-
"@agentforge/patterns": "^0.3.
|
|
23
|
+
"@agentforge/core": "^0.3.6",
|
|
24
|
+
"@agentforge/patterns": "^0.3.6",
|
|
25
25
|
"@langchain/core": "^1.1.0",
|
|
26
26
|
"@langchain/langgraph": "^1.0.0",
|
|
27
27
|
"@langchain/openai": "^1.2.0",
|
|
@@ -30,10 +30,8 @@ export async function analyzeCommand(file: string, options: AnalyzeOptions) {
|
|
|
30
30
|
systemPrompt: 'You are a code analysis expert. Analyze the provided file and give insights.',
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
const compiledAgent = agent.compile();
|
|
34
|
-
|
|
35
33
|
// Analyze
|
|
36
|
-
const result = await
|
|
34
|
+
const result = await agent.invoke({
|
|
37
35
|
messages: [
|
|
38
36
|
{
|
|
39
37
|
role: 'user',
|
|
@@ -23,7 +23,6 @@ export async function chatCommand(options: ChatOptions) {
|
|
|
23
23
|
systemPrompt: 'You are a helpful AI assistant in a CLI chat session.',
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
const compiledAgent = agent.compile();
|
|
27
26
|
const messages: any[] = [];
|
|
28
27
|
|
|
29
28
|
while (true) {
|
|
@@ -49,7 +48,7 @@ export async function chatCommand(options: ChatOptions) {
|
|
|
49
48
|
try {
|
|
50
49
|
messages.push({ role: 'user', content: message });
|
|
51
50
|
|
|
52
|
-
const result = await
|
|
51
|
+
const result = await agent.invoke({ messages });
|
|
53
52
|
const response = result.messages[result.messages.length - 1].content;
|
|
54
53
|
|
|
55
54
|
messages.push({ role: 'assistant', content: response });
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"clean": "rm -rf dist"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@agentforge/core": "^0.3.
|
|
23
|
-
"@agentforge/patterns": "^0.3.
|
|
22
|
+
"@agentforge/core": "^0.3.6",
|
|
23
|
+
"@agentforge/patterns": "^0.3.6",
|
|
24
24
|
"@langchain/core": "^1.1.0",
|
|
25
25
|
"@langchain/langgraph": "^1.0.0",
|
|
26
26
|
"@langchain/openai": "^1.2.0",
|
|
@@ -54,12 +54,9 @@ async function main() {
|
|
|
54
54
|
maxIterations: 10,
|
|
55
55
|
});
|
|
56
56
|
|
|
57
|
-
// Compile the agent
|
|
58
|
-
const compiledAgent = agent.compile();
|
|
59
|
-
|
|
60
57
|
// Run the agent
|
|
61
58
|
logger.info('Running agent...');
|
|
62
|
-
const result = await
|
|
59
|
+
const result = await agent.invoke({
|
|
63
60
|
messages: [
|
|
64
61
|
{
|
|
65
62
|
role: 'user',
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"format": "prettier --write ."
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@agentforge/core": "^0.3.
|
|
20
|
-
"@agentforge/patterns": "^0.3.
|
|
19
|
+
"@agentforge/core": "^0.3.6",
|
|
20
|
+
"@agentforge/patterns": "^0.3.6",
|
|
21
21
|
"@langchain/core": "^1.1.0",
|
|
22
22
|
"@langchain/langgraph": "^1.0.0",
|
|
23
23
|
"@langchain/openai": "^1.2.0",
|
|
@@ -49,11 +49,8 @@ async function main() {
|
|
|
49
49
|
systemPrompt: 'You are a helpful AI assistant.',
|
|
50
50
|
});
|
|
51
51
|
|
|
52
|
-
// Compile the agent
|
|
53
|
-
const compiledAgent = agent.compile();
|
|
54
|
-
|
|
55
52
|
// Run the agent
|
|
56
|
-
const result = await
|
|
53
|
+
const result = await agent.invoke({
|
|
57
54
|
messages: [{ role: 'user', content: 'Hello! What can you help me with?' }],
|
|
58
55
|
});
|
|
59
56
|
|
package/LICENSE
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
|