@agentforge-ai/cli 0.4.0 → 0.4.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/default/.env.example +11 -0
- package/dist/default/dashboard/app/components/DashboardLayout.tsx +245 -0
- package/dist/default/dashboard/app/components/ui/badge.tsx +26 -0
- package/dist/default/dashboard/app/components/ui/button.tsx +41 -0
- package/dist/default/dashboard/app/components/ui/card.tsx +44 -0
- package/dist/default/dashboard/app/components/ui/dialog.tsx +66 -0
- package/dist/default/dashboard/app/components/ui/input.tsx +21 -0
- package/dist/default/dashboard/app/components/ui/label.tsx +18 -0
- package/dist/default/dashboard/app/components/ui/select.tsx +75 -0
- package/dist/default/dashboard/app/components/ui/sheet.tsx +73 -0
- package/dist/default/dashboard/app/components/ui/switch.tsx +34 -0
- package/dist/default/dashboard/app/components/ui/table.tsx +60 -0
- package/dist/default/dashboard/app/components/ui/tabs.tsx +50 -0
- package/dist/default/dashboard/app/components/ui/tooltip.tsx +23 -0
- package/dist/default/dashboard/app/lib/utils.ts +6 -0
- package/dist/default/dashboard/app/main.tsx +35 -0
- package/dist/default/dashboard/app/routeTree.gen.ts +352 -0
- package/dist/default/dashboard/app/routes/__root.tsx +10 -0
- package/dist/default/dashboard/app/routes/agents.tsx +255 -0
- package/dist/default/dashboard/app/routes/chat.tsx +427 -0
- package/dist/default/dashboard/app/routes/connections.tsx +413 -0
- package/dist/default/dashboard/app/routes/cron.tsx +322 -0
- package/dist/default/dashboard/app/routes/files.tsx +203 -0
- package/dist/default/dashboard/app/routes/index.tsx +141 -0
- package/dist/default/dashboard/app/routes/projects.tsx +254 -0
- package/dist/default/dashboard/app/routes/sessions.tsx +272 -0
- package/dist/default/dashboard/app/routes/settings.tsx +583 -0
- package/dist/default/dashboard/app/routes/skills.tsx +252 -0
- package/dist/default/dashboard/app/routes/usage.tsx +181 -0
- package/dist/default/dashboard/app/styles/globals.css +93 -0
- package/dist/default/dashboard/index.html +13 -0
- package/dist/default/dashboard/package.json +37 -0
- package/dist/default/dashboard/postcss.config.js +6 -0
- package/dist/default/dashboard/tailwind.config.js +50 -0
- package/dist/default/dashboard/tsconfig.json +24 -0
- package/dist/default/dashboard/vite.config.ts +16 -0
- package/dist/default/package.json +5 -2
- package/dist/default/src/agent.ts +42 -2
- package/dist/index.js +135 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/default/.env.example +11 -0
- package/templates/default/dashboard/app/components/DashboardLayout.tsx +245 -0
- package/templates/default/dashboard/app/components/ui/badge.tsx +26 -0
- package/templates/default/dashboard/app/components/ui/button.tsx +41 -0
- package/templates/default/dashboard/app/components/ui/card.tsx +44 -0
- package/templates/default/dashboard/app/components/ui/dialog.tsx +66 -0
- package/templates/default/dashboard/app/components/ui/input.tsx +21 -0
- package/templates/default/dashboard/app/components/ui/label.tsx +18 -0
- package/templates/default/dashboard/app/components/ui/select.tsx +75 -0
- package/templates/default/dashboard/app/components/ui/sheet.tsx +73 -0
- package/templates/default/dashboard/app/components/ui/switch.tsx +34 -0
- package/templates/default/dashboard/app/components/ui/table.tsx +60 -0
- package/templates/default/dashboard/app/components/ui/tabs.tsx +50 -0
- package/templates/default/dashboard/app/components/ui/tooltip.tsx +23 -0
- package/templates/default/dashboard/app/lib/utils.ts +6 -0
- package/templates/default/dashboard/app/main.tsx +35 -0
- package/templates/default/dashboard/app/routeTree.gen.ts +352 -0
- package/templates/default/dashboard/app/routes/__root.tsx +10 -0
- package/templates/default/dashboard/app/routes/agents.tsx +255 -0
- package/templates/default/dashboard/app/routes/chat.tsx +427 -0
- package/templates/default/dashboard/app/routes/connections.tsx +413 -0
- package/templates/default/dashboard/app/routes/cron.tsx +322 -0
- package/templates/default/dashboard/app/routes/files.tsx +203 -0
- package/templates/default/dashboard/app/routes/index.tsx +141 -0
- package/templates/default/dashboard/app/routes/projects.tsx +254 -0
- package/templates/default/dashboard/app/routes/sessions.tsx +272 -0
- package/templates/default/dashboard/app/routes/settings.tsx +583 -0
- package/templates/default/dashboard/app/routes/skills.tsx +252 -0
- package/templates/default/dashboard/app/routes/usage.tsx +181 -0
- package/templates/default/dashboard/app/styles/globals.css +93 -0
- package/templates/default/dashboard/index.html +13 -0
- package/templates/default/dashboard/package.json +37 -0
- package/templates/default/dashboard/postcss.config.js +6 -0
- package/templates/default/dashboard/tailwind.config.js +50 -0
- package/templates/default/dashboard/tsconfig.json +24 -0
- package/templates/default/dashboard/vite.config.ts +16 -0
- package/templates/default/package.json +5 -2
- package/templates/default/src/agent.ts +42 -2
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import tsconfigPaths from "vite-tsconfig-paths";
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
plugins: [react(), tsconfigPaths()],
|
|
7
|
+
build: {
|
|
8
|
+
outDir: "dist",
|
|
9
|
+
sourcemap: true,
|
|
10
|
+
},
|
|
11
|
+
server: {
|
|
12
|
+
port: 3000,
|
|
13
|
+
host: "0.0.0.0",
|
|
14
|
+
allowedHosts: true,
|
|
15
|
+
},
|
|
16
|
+
});
|
|
@@ -8,10 +8,13 @@
|
|
|
8
8
|
"build": "tsc",
|
|
9
9
|
"convex:dev": "npx convex dev",
|
|
10
10
|
"convex:deploy": "npx convex deploy",
|
|
11
|
-
"dashboard": "agentforge dashboard"
|
|
11
|
+
"dashboard": "agentforge dashboard",
|
|
12
|
+
"dashboard:install": "cd dashboard && pnpm install",
|
|
13
|
+
"dashboard:dev": "cd dashboard && pnpm dev",
|
|
14
|
+
"dashboard:build": "cd dashboard && pnpm build"
|
|
12
15
|
},
|
|
13
16
|
"dependencies": {
|
|
14
|
-
"@agentforge-ai/core": "^0.
|
|
17
|
+
"@agentforge-ai/core": "^0.4.0",
|
|
15
18
|
"convex": "^1.17.0",
|
|
16
19
|
"zod": "^3.23.0"
|
|
17
20
|
},
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Agent } from '@agentforge-ai/core';
|
|
2
|
+
import { AgentForgeWorkspace } from '@agentforge-ai/core/workspace';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* AgentForge — Your First Agent
|
|
5
6
|
*
|
|
6
7
|
* This starter agent demonstrates how to configure an AI agent with
|
|
7
|
-
* AgentForge's multi-provider support
|
|
8
|
-
*
|
|
8
|
+
* AgentForge's multi-provider support and Mastra Workspace integration.
|
|
9
|
+
*
|
|
10
|
+
* Workspace gives your agent:
|
|
11
|
+
* - Filesystem: Read, write, list, and delete files
|
|
12
|
+
* - Sandbox: Execute shell commands
|
|
13
|
+
* - Skills: Discover and activate reusable instructions
|
|
14
|
+
* - Search: BM25 keyword search over indexed content
|
|
9
15
|
*
|
|
10
16
|
* Set your provider and API key in the .env file:
|
|
11
17
|
* OPENAI_API_KEY=sk-...
|
|
@@ -13,6 +19,20 @@ import { Agent } from '@agentforge-ai/core';
|
|
|
13
19
|
* ANTHROPIC_API_KEY=sk-ant-...
|
|
14
20
|
*/
|
|
15
21
|
|
|
22
|
+
// ─── Workspace Setup ──────────────────────────────────────────────────
|
|
23
|
+
// The workspace provides persistent file storage, command execution,
|
|
24
|
+
// skill discovery, and content search for your agents.
|
|
25
|
+
const workspace = AgentForgeWorkspace.local({
|
|
26
|
+
basePath: './workspace',
|
|
27
|
+
skills: ['/skills'],
|
|
28
|
+
search: true,
|
|
29
|
+
autoIndexPaths: ['/skills'],
|
|
30
|
+
sandbox: true,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Initialize workspace (triggers auto-indexing)
|
|
34
|
+
await workspace.init();
|
|
35
|
+
|
|
16
36
|
// ─── Main Agent ────────────────────────────────────────────────────────
|
|
17
37
|
const myAgent = new Agent({
|
|
18
38
|
id: 'my-first-agent',
|
|
@@ -21,6 +41,9 @@ const myAgent = new Agent({
|
|
|
21
41
|
You can help users with a variety of tasks.
|
|
22
42
|
Be concise, accurate, and friendly.
|
|
23
43
|
|
|
44
|
+
You have access to a workspace with file management, command execution,
|
|
45
|
+
and skill discovery capabilities. Use them when appropriate.
|
|
46
|
+
|
|
24
47
|
When you don't know something, say so honestly.
|
|
25
48
|
When asked about your capabilities, mention that you're powered by AgentForge.`,
|
|
26
49
|
|
|
@@ -33,8 +56,21 @@ When asked about your capabilities, mention that you're powered by AgentForge.`,
|
|
|
33
56
|
model: 'openai:gpt-4o-mini',
|
|
34
57
|
});
|
|
35
58
|
|
|
59
|
+
export { workspace };
|
|
36
60
|
export default myAgent;
|
|
37
61
|
|
|
62
|
+
// ─── Example: Cloud Workspace (Cloudflare R2) ─────────────────────────
|
|
63
|
+
// For production deployment on Cloudflare, use a cloud workspace:
|
|
64
|
+
//
|
|
65
|
+
// const cloudWorkspace = AgentForgeWorkspace.cloud({
|
|
66
|
+
// bucket: 'my-agent-files',
|
|
67
|
+
// region: 'auto',
|
|
68
|
+
// endpoint: process.env.R2_ENDPOINT,
|
|
69
|
+
// accessKeyId: process.env.R2_ACCESS_KEY_ID,
|
|
70
|
+
// secretAccessKey: process.env.R2_SECRET_ACCESS_KEY,
|
|
71
|
+
// skills: ['/skills'],
|
|
72
|
+
// });
|
|
73
|
+
|
|
38
74
|
// ─── Example: Agent with Custom Tools ──────────────────────────────────
|
|
39
75
|
// import { z } from 'zod';
|
|
40
76
|
//
|
|
@@ -60,3 +96,7 @@ export default myAgent;
|
|
|
60
96
|
// ─── Example: Using the Agent ──────────────────────────────────────────
|
|
61
97
|
// const response = await myAgent.generate('Hello, what can you do?');
|
|
62
98
|
// console.log(response.text);
|
|
99
|
+
//
|
|
100
|
+
// ─── Example: Searching Workspace Content ──────────────────────────────
|
|
101
|
+
// const results = await workspace.search('code review');
|
|
102
|
+
// console.log(results);
|