dexto 1.1.9 → 1.1.11
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/README.md +4 -2
- package/dist/agents/agent-registry.json +30 -1
- package/dist/agents/database-agent/database-agent.yml +3 -0
- package/dist/agents/default-agent.yml +102 -12
- package/dist/agents/github-agent/github-agent.yml +3 -0
- package/dist/agents/image-editor-agent/image-editor-agent.yml +3 -0
- package/dist/agents/music-agent/music-agent.yml +3 -0
- package/dist/agents/nano-banana-agent/nano-banana-agent.yml +3 -0
- package/dist/agents/podcast-agent/podcast-agent.yml +3 -0
- package/dist/agents/product-name-researcher/product-name-researcher.yml +3 -0
- package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +3 -0
- package/dist/agents/triage-demo/triage-agent.yml +3 -0
- package/dist/api/mcp/tool-aggregation-handler.d.ts.map +1 -1
- package/dist/api/mcp/tool-aggregation-handler.js +34 -42
- package/dist/api/memory/memory-handler.d.ts +15 -0
- package/dist/api/memory/memory-handler.d.ts.map +1 -0
- package/dist/api/memory/memory-handler.js +129 -0
- package/dist/api/server.d.ts +2 -2
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +987 -231
- package/dist/api/webhook-subscriber.d.ts.map +1 -1
- package/dist/api/webhook-subscriber.js +2 -1
- package/dist/api/websocket-subscriber.d.ts.map +1 -1
- package/dist/api/websocket-subscriber.js +61 -10
- package/dist/cli/cli-subscriber.d.ts +2 -1
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +11 -3
- package/dist/cli/cli.d.ts.map +1 -1
- package/dist/cli/cli.js +1 -0
- package/dist/cli/commands/install.d.ts +3 -3
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +223 -41
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +8 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +252 -4
- package/dist/cli/commands/list-agents.d.ts.map +1 -1
- package/dist/cli/commands/list-agents.js +22 -3
- package/dist/cli/commands/setup.d.ts +4 -4
- package/dist/cli/commands/uninstall.d.ts +1 -1
- package/dist/cli/tool-confirmation/cli-confirmation-handler.d.ts +36 -7
- package/dist/cli/tool-confirmation/cli-confirmation-handler.d.ts.map +1 -1
- package/dist/cli/tool-confirmation/cli-confirmation-handler.js +314 -34
- package/dist/index.js +57 -48
- package/dist/webui/.next/standalone/.next/static/VoeDi3iuGmMdZu_kx-R2X/_buildManifest.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/419-5526a47c95a2fa60.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/429-838829c1391e496d.js +25 -0
- package/dist/webui/.next/standalone/.next/static/chunks/459-62011998b002cbf6.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/711-76a7d2bf4d6f69e5.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/854-8cad9404fc78e0cc.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/935-07f9df196b13275e.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/app/chat/[sessionId]/page-b8acc47b0d8c5c0a.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/app/layout-f4a6ee5a028899d1.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/app/page-e117ae372850d25f.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/app/playground/page-09340fb6b3f4caa2.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/{webpack-7c234e7e7e272295.js → webpack-7229fd0786f0483c.js} +1 -1
- package/dist/webui/.next/standalone/.next/static/css/21e6c142ca3cdc42.css +1 -0
- package/dist/webui/.next/standalone/.next/static/css/de70bee13400563f.css +1 -0
- package/dist/webui/.next/standalone/package.json +6 -2
- package/dist/webui/.next/standalone/packages/webui/.next/BUILD_ID +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/app-build-manifest.json +30 -15
- package/dist/webui/.next/standalone/packages/webui/.next/app-path-routes-manifest.json +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/build-manifest.json +5 -5
- package/dist/webui/.next/standalone/packages/webui/.next/prerender-manifest.json +3 -3
- package/dist/webui/.next/standalone/packages/webui/.next/required-server-files.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/routes-manifest.json +10 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/_not-found/page.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/chat/[sessionId]/page.js +2 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/chat/[sessionId]/page.js.nft.json +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/chat/[sessionId]/page_client-reference-manifest.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/page.js +2 -11
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/page.js.nft.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/playground/page.js +4 -4
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/playground/page.js.nft.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/playground/page_client-reference-manifest.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app-paths-manifest.json +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/1.js +12 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/419.js +25 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/{619.js → 426.js} +2 -2
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/43.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/654.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/71.js +5 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/middleware-build-manifest.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/pages/500.html +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/pages-manifest.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/server-reference-manifest.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/VoeDi3iuGmMdZu_kx-R2X/_buildManifest.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/419-5526a47c95a2fa60.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/429-838829c1391e496d.js +25 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/459-62011998b002cbf6.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/711-76a7d2bf4d6f69e5.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/854-8cad9404fc78e0cc.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/935-07f9df196b13275e.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/chat/[sessionId]/page-b8acc47b0d8c5c0a.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/layout-f4a6ee5a028899d1.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/page-e117ae372850d25f.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/playground/page-09340fb6b3f4caa2.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/{webpack-7c234e7e7e272295.js → webpack-7229fd0786f0483c.js} +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/css/21e6c142ca3cdc42.css +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/css/de70bee13400563f.css +1 -0
- package/dist/webui/.next/standalone/packages/webui/package.json +7 -4
- package/dist/webui/.next/standalone/packages/webui/server.js +1 -1
- package/dist/webui/.next/static/VoeDi3iuGmMdZu_kx-R2X/_buildManifest.js +1 -0
- package/dist/webui/.next/static/chunks/419-5526a47c95a2fa60.js +1 -0
- package/dist/webui/.next/static/chunks/429-838829c1391e496d.js +25 -0
- package/dist/webui/.next/static/chunks/459-62011998b002cbf6.js +1 -0
- package/dist/webui/.next/static/chunks/711-76a7d2bf4d6f69e5.js +1 -0
- package/dist/webui/.next/static/chunks/854-8cad9404fc78e0cc.js +1 -0
- package/dist/webui/.next/static/chunks/935-07f9df196b13275e.js +1 -0
- package/dist/webui/.next/static/chunks/app/chat/[sessionId]/page-b8acc47b0d8c5c0a.js +1 -0
- package/dist/webui/.next/static/chunks/app/layout-f4a6ee5a028899d1.js +1 -0
- package/dist/webui/.next/static/chunks/app/page-e117ae372850d25f.js +1 -0
- package/dist/webui/.next/static/chunks/app/playground/page-09340fb6b3f4caa2.js +1 -0
- package/dist/webui/.next/static/chunks/{webpack-7c234e7e7e272295.js → webpack-7229fd0786f0483c.js} +1 -1
- package/dist/webui/.next/static/css/21e6c142ca3cdc42.css +1 -0
- package/dist/webui/.next/static/css/de70bee13400563f.css +1 -0
- package/dist/webui/package.json +7 -4
- package/package.json +5 -4
- package/dist/webui/.next/standalone/.next/static/aL3Gzk-qN3SiSHuntvic-/_buildManifest.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/179-78abc2eacbc41da9.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/442-b1916bec348454b3.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/544-c4a8f278ed1a25d7.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/854-2a6d5a5297a15d52.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/app/layout-dde711766eda096b.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/app/page-5e94d5a49dc718d0.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/app/playground/page-9ae40e0b219583e3.js +0 -1
- package/dist/webui/.next/standalone/.next/static/css/045cc65741e38fbd.css +0 -3
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/549.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/950.js +0 -5
- package/dist/webui/.next/standalone/packages/webui/.next/static/aL3Gzk-qN3SiSHuntvic-/_buildManifest.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/179-78abc2eacbc41da9.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/442-b1916bec348454b3.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/544-c4a8f278ed1a25d7.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/854-2a6d5a5297a15d52.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/layout-dde711766eda096b.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/page-5e94d5a49dc718d0.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/playground/page-9ae40e0b219583e3.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/css/045cc65741e38fbd.css +0 -3
- package/dist/webui/.next/static/aL3Gzk-qN3SiSHuntvic-/_buildManifest.js +0 -1
- package/dist/webui/.next/static/chunks/179-78abc2eacbc41da9.js +0 -1
- package/dist/webui/.next/static/chunks/442-b1916bec348454b3.js +0 -1
- package/dist/webui/.next/static/chunks/544-c4a8f278ed1a25d7.js +0 -1
- package/dist/webui/.next/static/chunks/854-2a6d5a5297a15d52.js +0 -1
- package/dist/webui/.next/static/chunks/app/layout-dde711766eda096b.js +0 -1
- package/dist/webui/.next/static/chunks/app/page-5e94d5a49dc718d0.js +0 -1
- package/dist/webui/.next/static/chunks/app/playground/page-9ae40e0b219583e3.js +0 -1
- package/dist/webui/.next/static/css/045cc65741e38fbd.css +0 -3
- /package/dist/webui/.next/standalone/.next/static/{aL3Gzk-qN3SiSHuntvic- → VoeDi3iuGmMdZu_kx-R2X}/_ssgManifest.js +0 -0
- /package/dist/webui/.next/standalone/packages/webui/.next/static/{aL3Gzk-qN3SiSHuntvic- → VoeDi3iuGmMdZu_kx-R2X}/_ssgManifest.js +0 -0
- /package/dist/webui/.next/static/{aL3Gzk-qN3SiSHuntvic- → VoeDi3iuGmMdZu_kx-R2X}/_ssgManifest.js +0 -0
package/README.md
CHANGED
|
@@ -94,18 +94,20 @@ Dexto comes with pre-built agent recipes for common use cases. Install and use t
|
|
|
94
94
|
dexto list-agents
|
|
95
95
|
|
|
96
96
|
# Install specific agents
|
|
97
|
-
dexto install nano-banana-agent podcast-agent
|
|
97
|
+
dexto install nano-banana-agent podcast-agent sora-video-agent
|
|
98
98
|
|
|
99
99
|
# Use an agent
|
|
100
100
|
dexto --agent nano-banana-agent "create a futuristic cityscape with flying cars"
|
|
101
101
|
dexto --agent podcast-agent "generate a podcast intro with two hosts discussing AI"
|
|
102
|
+
dexto --agent sora-video-agent "create a video of a sunset over mountains"
|
|
102
103
|
```
|
|
103
104
|
|
|
104
105
|
**Available Agents:**
|
|
105
106
|
- **Nano Banana Agent** – Advanced image generation and editing using Google's Nano Banana (Gemini 2.5 Flash Image)
|
|
106
107
|
- **Podcast Agent** – Advanced podcast generation using Google Gemini TTS for multi-speaker audio content
|
|
108
|
+
- **Sora Video Agent** – AI video generation using OpenAI's Sora with custom settings, remixing, and reference support
|
|
107
109
|
- **Database Agent** – Demo agent for SQL queries and database operations
|
|
108
|
-
- **Image Editor Agent** – Image editing and manipulation
|
|
110
|
+
- **Image Editor Agent** – Image editing and manipulation
|
|
109
111
|
- **Music Agent** – Music creation and audio processing
|
|
110
112
|
- **PDF Agent** – Document analysis and conversation
|
|
111
113
|
- **Product Researcher** – Product naming and branding research
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"agents": {
|
|
4
4
|
"database-agent": {
|
|
5
|
+
"id": "database-agent",
|
|
6
|
+
"name": "Database Agent",
|
|
5
7
|
"description": "AI agent for database operations and SQL queries",
|
|
6
8
|
"author": "Truffle AI",
|
|
7
9
|
"tags": ["database", "sql", "data", "queries"],
|
|
@@ -9,6 +11,8 @@
|
|
|
9
11
|
"main": "database-agent.yml"
|
|
10
12
|
},
|
|
11
13
|
"github-agent": {
|
|
14
|
+
"id": "github-agent",
|
|
15
|
+
"name": "GitHub Agent",
|
|
12
16
|
"description": "GitHub operations agent for analyzing pull requests, issues, repos and more",
|
|
13
17
|
"author": "Truffle AI",
|
|
14
18
|
"tags": ["github", "repositories", "collaboration", "devops", "mcp"],
|
|
@@ -16,6 +20,8 @@
|
|
|
16
20
|
"main": "github-agent.yml"
|
|
17
21
|
},
|
|
18
22
|
"talk2pdf-agent": {
|
|
23
|
+
"id": "talk2pdf-agent",
|
|
24
|
+
"name": "Talk2PDF Agent",
|
|
19
25
|
"description": "PDF document analysis and conversation",
|
|
20
26
|
"author": "Truffle AI",
|
|
21
27
|
"tags": ["pdf", "documents", "analysis", "conversation"],
|
|
@@ -23,6 +29,8 @@
|
|
|
23
29
|
"main": "talk2pdf-agent.yml"
|
|
24
30
|
},
|
|
25
31
|
"image-editor-agent": {
|
|
32
|
+
"id": "image-editor-agent",
|
|
33
|
+
"name": "Image Editor Agent",
|
|
26
34
|
"description": "AI agent for image editing and manipulation",
|
|
27
35
|
"author": "Truffle AI",
|
|
28
36
|
"tags": ["images", "editing", "graphics", "visual"],
|
|
@@ -30,6 +38,8 @@
|
|
|
30
38
|
"main": "image-editor-agent.yml"
|
|
31
39
|
},
|
|
32
40
|
"music-agent": {
|
|
41
|
+
"id": "music-agent",
|
|
42
|
+
"name": "Music Agent",
|
|
33
43
|
"description": "AI agent for music creation and audio processing",
|
|
34
44
|
"author": "Truffle AI",
|
|
35
45
|
"tags": ["music", "audio", "creation", "sound"],
|
|
@@ -37,6 +47,8 @@
|
|
|
37
47
|
"main": "music-agent.yml"
|
|
38
48
|
},
|
|
39
49
|
"product-researcher": {
|
|
50
|
+
"id": "product-researcher",
|
|
51
|
+
"name": "Product Researcher",
|
|
40
52
|
"description": "AI agent for product name research and branding",
|
|
41
53
|
"author": "Truffle AI",
|
|
42
54
|
"tags": ["product", "research", "branding", "naming"],
|
|
@@ -44,6 +56,8 @@
|
|
|
44
56
|
"main": "product-name-researcher.yml"
|
|
45
57
|
},
|
|
46
58
|
"triage-agent": {
|
|
59
|
+
"id": "triage-agent",
|
|
60
|
+
"name": "Triage Agent",
|
|
47
61
|
"description": "Customer support triage system",
|
|
48
62
|
"author": "Truffle AI",
|
|
49
63
|
"tags": ["support", "triage", "routing", "multi-agent"],
|
|
@@ -51,6 +65,8 @@
|
|
|
51
65
|
"main": "triage-agent.yml"
|
|
52
66
|
},
|
|
53
67
|
"nano-banana-agent": {
|
|
68
|
+
"id": "nano-banana-agent",
|
|
69
|
+
"name": "Nano Banana Agent",
|
|
54
70
|
"description": "AI agent for advanced image generation and editing using Google's Nano Banana (Gemini 2.5 Flash Image)",
|
|
55
71
|
"author": "Truffle AI",
|
|
56
72
|
"tags": ["images", "generation", "editing", "ai", "nano-banana", "gemini"],
|
|
@@ -58,15 +74,28 @@
|
|
|
58
74
|
"main": "nano-banana-agent.yml"
|
|
59
75
|
},
|
|
60
76
|
"podcast-agent": {
|
|
77
|
+
"id": "podcast-agent",
|
|
78
|
+
"name": "Podcast Agent",
|
|
61
79
|
"description": "Advanced podcast generation agent using Google Gemini TTS for multi-speaker audio content",
|
|
62
80
|
"author": "Truffle AI",
|
|
63
81
|
"tags": ["podcast", "audio", "tts", "speech", "multi-speaker", "gemini"],
|
|
64
82
|
"source": "podcast-agent/",
|
|
65
83
|
"main": "podcast-agent.yml"
|
|
66
84
|
},
|
|
85
|
+
"sora-video-agent": {
|
|
86
|
+
"id": "sora-video-agent",
|
|
87
|
+
"name": "Sora Video Agent",
|
|
88
|
+
"description": "AI agent for video generation using OpenAI's Sora technology with comprehensive video creation and management capabilities",
|
|
89
|
+
"author": "Truffle AI",
|
|
90
|
+
"tags": ["video", "generation", "sora", "openai", "ai", "media", "creation"],
|
|
91
|
+
"source": "sora-video-agent/",
|
|
92
|
+
"main": "sora-video-agent.yml"
|
|
93
|
+
},
|
|
67
94
|
"default-agent": {
|
|
95
|
+
"id": "default-agent",
|
|
96
|
+
"name": "Default",
|
|
68
97
|
"description": "Default Dexto agent with filesystem and playwright tools",
|
|
69
|
-
"author": "Truffle AI",
|
|
98
|
+
"author": "Truffle AI",
|
|
70
99
|
"tags": ["default", "filesystem", "playwright"],
|
|
71
100
|
"source": "default-agent.yml"
|
|
72
101
|
}
|
|
@@ -26,6 +26,9 @@ mcpServers:
|
|
|
26
26
|
timeout: 30000
|
|
27
27
|
connectionMode: lenient
|
|
28
28
|
|
|
29
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
30
|
+
greeting: "🗄️ Hi! I'm your Database Agent. What would you like to explore?"
|
|
31
|
+
|
|
29
32
|
# System prompt that defines the agent's database interaction capabilities
|
|
30
33
|
systemPrompt:
|
|
31
34
|
contributors:
|
|
@@ -14,13 +14,6 @@ mcpServers:
|
|
|
14
14
|
- -y
|
|
15
15
|
- "@playwright/mcp@latest"
|
|
16
16
|
|
|
17
|
-
# hf:
|
|
18
|
-
# type: stdio
|
|
19
|
-
# command: npx
|
|
20
|
-
# args:
|
|
21
|
-
# - -y
|
|
22
|
-
# - "@llmindset/mcp-hfspace"
|
|
23
|
-
|
|
24
17
|
# System prompt configuration - defines the agent's behavior and instructions
|
|
25
18
|
systemPrompt:
|
|
26
19
|
contributors:
|
|
@@ -37,28 +30,125 @@ systemPrompt:
|
|
|
37
30
|
priority: 10
|
|
38
31
|
source: dateTime
|
|
39
32
|
enabled: true
|
|
33
|
+
- id: memories
|
|
34
|
+
type: memory
|
|
35
|
+
priority: 40
|
|
36
|
+
enabled: true
|
|
37
|
+
options:
|
|
38
|
+
includeTimestamps: false
|
|
39
|
+
includeTags: true
|
|
40
|
+
limit: 10
|
|
41
|
+
pinnedOnly: false
|
|
40
42
|
|
|
41
43
|
# Optional greeting shown at chat start (UI can consume this)
|
|
42
44
|
greeting: "Hi! I’m Dexto — how can I help today?"
|
|
43
45
|
|
|
44
|
-
#
|
|
46
|
+
# LLM configuration - describes the language model to use
|
|
45
47
|
llm:
|
|
46
48
|
provider: openai
|
|
47
49
|
model: gpt-5-mini
|
|
48
50
|
apiKey: $OPENAI_API_KEY
|
|
49
51
|
|
|
50
|
-
# Storage configuration - uses a two-tier architecture: cache (fast, ephemeral) and database (persistent, reliable)
|
|
51
|
-
# Memory cache with file-based database (good for development with persistence)
|
|
52
52
|
storage:
|
|
53
53
|
cache:
|
|
54
54
|
type: in-memory
|
|
55
55
|
database:
|
|
56
56
|
type: sqlite
|
|
57
|
-
# path: ./data/dexto.db
|
|
57
|
+
# path: ./data/dexto.db # Optional: customize database location
|
|
58
|
+
blob:
|
|
59
|
+
type: local # 'local', 's3', 'gcs', 'azure' (s3, gcs, azure coming in future Phases)
|
|
60
|
+
maxBlobSize: 52428800 # 50MB per blob
|
|
61
|
+
maxTotalSize: 1073741824 # 1GB total storage
|
|
62
|
+
cleanupAfterDays: 30 # Auto-cleanup blobs older than 30 days
|
|
63
|
+
# storePath: ~/.dexto/blobs (defaults to context-aware path for local backend)
|
|
64
|
+
|
|
65
|
+
toolConfirmation:
|
|
66
|
+
mode: event-based
|
|
67
|
+
timeout: 120000 # Time to wait for approval (ms)
|
|
68
|
+
allowedToolsStorage: memory # 'memory' or 'storage' for persisting allowed tools
|
|
69
|
+
|
|
70
|
+
# Internal tools - built-in Dexto capabilities
|
|
71
|
+
internalTools:
|
|
72
|
+
- ask_user # Allows the agent to ask you questions and collect structured input
|
|
73
|
+
|
|
74
|
+
# Internal resources configuration - manages file system access and blob storage
|
|
75
|
+
# NOTE: Blob storage capacity and backend settings are in the 'storage.blob' section above
|
|
76
|
+
internalResources:
|
|
77
|
+
enabled: true
|
|
78
|
+
resources:
|
|
79
|
+
# Filesystem resource - provides read access to local files for the agent
|
|
80
|
+
- type: filesystem
|
|
81
|
+
paths: ["."] # Directories to expose
|
|
82
|
+
maxFiles: 50 # Maximum number of files to index
|
|
83
|
+
maxDepth: 3 # Maximum directory depth to traverse
|
|
84
|
+
includeHidden: false # Include hidden files/directories
|
|
85
|
+
includeExtensions: [".txt", ".md", ".json", ".yaml", ".yml", ".js", ".ts", ".py", ".html", ".css"]
|
|
86
|
+
|
|
87
|
+
# Blob resource - enables large file upload/storage (settings in storage.blob section above)
|
|
88
|
+
- type: blob
|
|
89
|
+
|
|
90
|
+
# Plugin system - built-in plugins for content policy and response sanitization
|
|
91
|
+
# plugins:
|
|
92
|
+
# # ContentPolicy - validates and sanitizes input before sending to LLM
|
|
93
|
+
# contentPolicy:
|
|
94
|
+
# priority: 10 # Lower priority = runs first
|
|
95
|
+
# blocking: true # Blocks execution if validation fails
|
|
96
|
+
# maxInputChars: 50000 # Maximum input length (characters)
|
|
97
|
+
# redactEmails: true # Redact email addresses from input
|
|
98
|
+
# redactApiKeys: true # Redact potential API keys from input
|
|
99
|
+
# enabled: true # Enable this plugin
|
|
100
|
+
|
|
101
|
+
# # ResponseSanitizer - sanitizes LLM responses before returning to user
|
|
102
|
+
# responseSanitizer:
|
|
103
|
+
# priority: 900 # Higher priority = runs near the end
|
|
104
|
+
# blocking: false # Non-blocking (logs warnings but doesn't stop)
|
|
105
|
+
# redactEmails: true # Redact email addresses from responses
|
|
106
|
+
# redactApiKeys: true # Redact potential API keys from responses
|
|
107
|
+
# maxResponseLength: 100000 # Maximum response length (characters)
|
|
108
|
+
# enabled: true # Enable this plugin
|
|
109
|
+
|
|
110
|
+
# # Custom plugins can be added here (see documentation)
|
|
111
|
+
# # custom:
|
|
112
|
+
# # - name: tenant-auth
|
|
113
|
+
# # module: "${{dexto.agent_dir}}/plugins/tenant-auth.ts"
|
|
114
|
+
# # enabled: true
|
|
115
|
+
# # blocking: true
|
|
116
|
+
# # priority: 100
|
|
117
|
+
# # config:
|
|
118
|
+
# # enforceQuota: true
|
|
119
|
+
|
|
120
|
+
# Starter prompts - predefined prompts that appear as clickable buttons in the WebUI
|
|
121
|
+
# TODO: (355) Have to update docs for this starterPrompts and internalResources section and blob section
|
|
122
|
+
# https://github.com/truffle-ai/dexto/pull/355#discussion_r2412886278
|
|
123
|
+
starterPrompts:
|
|
124
|
+
- id: quick-start
|
|
125
|
+
title: "📚 Quick Start Guide"
|
|
126
|
+
description: "Learn the basics and see what you can do"
|
|
127
|
+
prompt: "I'd like to get started quickly. Can you show me a few examples of what you can do and help me understand how to work with you?"
|
|
128
|
+
category: learning
|
|
129
|
+
priority: 9
|
|
130
|
+
- id: tool-demo
|
|
131
|
+
title: "⚡ Tool Demonstration"
|
|
132
|
+
description: "See the tools in action with practical examples"
|
|
133
|
+
prompt: "I'd like to see your tools in action. Can you pick one of your most interesting tools and demonstrate it with a practical example? Show me what it can do and how it works."
|
|
134
|
+
category: tools
|
|
135
|
+
priority: 5
|
|
136
|
+
- id: snake-game
|
|
137
|
+
title: "🐍 Create Snake Game"
|
|
138
|
+
description: "Build a fun interactive game with HTML, CSS, and JavaScript"
|
|
139
|
+
prompt: "Create a snake game in a new directory with HTML, CSS, and JavaScript, then open it in the browser for me to play."
|
|
140
|
+
category: coding
|
|
141
|
+
priority: 4
|
|
142
|
+
- id: connect-tools
|
|
143
|
+
title: "🔧 Connect New Tools"
|
|
144
|
+
description: "Browse and add MCP servers to extend capabilities"
|
|
145
|
+
prompt: "I want to connect new tools to expand my capabilities. Can you help me understand what MCP servers are available and how to add them?"
|
|
146
|
+
category: tools
|
|
147
|
+
priority: 3
|
|
58
148
|
|
|
59
149
|
## To use Google Gemini, replace the LLM section with Google Gemini configuration below
|
|
60
150
|
## Similar for anthropic/groq/etc.
|
|
61
151
|
# llm:
|
|
62
152
|
# provider: google
|
|
63
|
-
# model: gemini-2.
|
|
153
|
+
# model: gemini-2.5-pro
|
|
64
154
|
# apiKey: $GOOGLE_GENERATIVE_AI_API_KEY
|
|
@@ -17,6 +17,9 @@ mcpServers:
|
|
|
17
17
|
# env:
|
|
18
18
|
# GITHUB_OAUTH_SCOPES: 'repo read:user'
|
|
19
19
|
|
|
20
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
21
|
+
greeting: "🐙 Hello! I'm your GitHub Agent. How can I help with your repositories?"
|
|
22
|
+
|
|
20
23
|
systemPrompt:
|
|
21
24
|
contributors:
|
|
22
25
|
- id: primary
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Dexto Agent Configuration for Python Image Editor MCP Server
|
|
2
2
|
# Generated on 2025-07-18T19:30:00.000Z
|
|
3
3
|
|
|
4
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
5
|
+
greeting: "🎨 Hello! I'm your Image Editor. What image shall we create or edit today?"
|
|
6
|
+
|
|
4
7
|
systemPrompt: |
|
|
5
8
|
You are an AI assistant specialized in image editing and processing. You have access to a comprehensive set of tools for manipulating images including:
|
|
6
9
|
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Dexto Agent Configuration for Music Creation and Editing MCP Server
|
|
2
2
|
|
|
3
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
4
|
+
greeting: "🎵 Hi! I'm your Music Agent. Let's make some beautiful sounds together!"
|
|
5
|
+
|
|
3
6
|
systemPrompt: |
|
|
4
7
|
You are an AI assistant specialized in music creation, editing, and production. You have access to a comprehensive set of tools for working with audio and music including:
|
|
5
8
|
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Dexto Agent Configuration for Nano Banana (Gemini 2.5 Flash Image) MCP Server
|
|
2
2
|
# Generated on 2025-01-27T00:00:00.000Z
|
|
3
3
|
|
|
4
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
5
|
+
greeting: "🍌 Hi! I'm your Nano Banana Agent. Let's create something amazing together!"
|
|
6
|
+
|
|
4
7
|
systemPrompt: |
|
|
5
8
|
You are an AI assistant specialized in advanced image generation and editing using Google's Nano Banana (Gemini 2.5 Flash Image) model. You have access to cutting-edge AI tools for:
|
|
6
9
|
|
|
@@ -21,6 +21,9 @@ mcpServers:
|
|
|
21
21
|
- "@modelcontextprotocol/server-filesystem"
|
|
22
22
|
- .
|
|
23
23
|
|
|
24
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
25
|
+
greeting: "🎙️ Hello! I'm your Podcast Agent. Let's create some amazing audio together!"
|
|
26
|
+
|
|
24
27
|
systemPrompt: |
|
|
25
28
|
You are an advanced podcast generation agent that creates multi-speaker audio content using Google Gemini TTS.
|
|
26
29
|
|
|
@@ -24,6 +24,9 @@ mcpServers:
|
|
|
24
24
|
args:
|
|
25
25
|
- "@truffle-ai/product-name-scout-mcp"
|
|
26
26
|
|
|
27
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
28
|
+
greeting: "🔍 Hi! I'm your Product Name Researcher. What name shall we explore today?"
|
|
29
|
+
|
|
27
30
|
systemPrompt:
|
|
28
31
|
contributors:
|
|
29
32
|
- id: primary
|
|
@@ -10,6 +10,9 @@ mcpServers:
|
|
|
10
10
|
timeout: 30000
|
|
11
11
|
connectionMode: strict
|
|
12
12
|
|
|
13
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
14
|
+
greeting: "📄 Hi! I'm your PDF Agent. Share a document and let's explore it together!"
|
|
15
|
+
|
|
13
16
|
systemPrompt:
|
|
14
17
|
contributors:
|
|
15
18
|
- id: primary
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
# Customer Support Triage Agent Configuration
|
|
2
2
|
# Main coordination agent that routes requests to specialized support agents
|
|
3
3
|
|
|
4
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
5
|
+
greeting: "🎯 Hello! I'm your Support Triage Agent. How can I help you today?"
|
|
6
|
+
|
|
4
7
|
systemPrompt:
|
|
5
8
|
contributors:
|
|
6
9
|
- id: base-prompt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-aggregation-handler.d.ts","sourceRoot":"","sources":["../../../src/api/mcp/tool-aggregation-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAsB,KAAK,sBAAsB,EAAwB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"tool-aggregation-handler.d.ts","sourceRoot":"","sources":["../../../src/api/mcp/tool-aggregation-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,EAAsB,KAAK,sBAAsB,EAAwB,MAAM,aAAa,CAAC;AAGpG;;;GAGG;AACH,wBAAsB,kCAAkC,CACpD,aAAa,EAAE,sBAAsB,EACrC,YAAY,EAAE,SAAS,EACvB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,OAAO,GACjB,OAAO,CAAC,SAAS,CAAC,CAgGpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { MCPManager, logger, jsonSchemaToZodShape } from '@dexto/core';
|
|
3
|
+
import { z } from 'zod';
|
|
3
4
|
/**
|
|
4
5
|
* Initializes MCP server for tool aggregation mode.
|
|
5
6
|
* Instead of exposing an AI agent, this directly exposes all tools from connected MCP servers.
|
|
@@ -18,54 +19,42 @@ export async function initializeMcpToolAggregationServer(serverConfigs, mcpTrans
|
|
|
18
19
|
prompts: {},
|
|
19
20
|
},
|
|
20
21
|
});
|
|
21
|
-
|
|
22
|
-
// TODO: Temporary hacky solution to get the tools from the connected servers, directly using the MCP Client to preserve types
|
|
23
|
-
// TODO: We should use the MCPManager or MCPClient instead of directly interacting with the raw client to get the tools, but we lose type information and it becomes any type which is hard to work with
|
|
24
|
-
const mcpClientsMap = mcpManager.getClients();
|
|
22
|
+
const toolDefinitions = await mcpManager.getAllTools();
|
|
25
23
|
let toolCount = 0;
|
|
26
|
-
for (const [
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
logger.debug(`
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const result = await mcpManager.executeTool(tool.name, args);
|
|
45
|
-
logger.info(`Tool aggregation: ${tool.name} completed successfully`);
|
|
46
|
-
return result;
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
logger.error(`Tool aggregation: ${tool.name} failed: ${error}`);
|
|
50
|
-
throw error;
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
}
|
|
24
|
+
for (const [toolName, toolDef] of Object.entries(toolDefinitions)) {
|
|
25
|
+
toolCount++;
|
|
26
|
+
const jsonSchema = toolDef.parameters ?? { type: 'object', properties: {} };
|
|
27
|
+
const paramsShape = jsonSchemaToZodShape(jsonSchema);
|
|
28
|
+
const _paramsSchema = z.object(paramsShape);
|
|
29
|
+
logger.debug(`Registering tool '${toolName}' with schema: ${JSON.stringify(jsonSchema)}`);
|
|
30
|
+
mcpServer.tool(toolName, toolDef.description || `Tool: ${toolName}`, paramsShape, async (args) => {
|
|
31
|
+
logger.info(`Tool aggregation: executing ${toolName}`);
|
|
32
|
+
try {
|
|
33
|
+
const result = await mcpManager.executeTool(toolName, args);
|
|
34
|
+
logger.info(`Tool aggregation: ${toolName} completed successfully`);
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
logger.error(`Tool aggregation: ${toolName} failed: ${error}`);
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
54
42
|
}
|
|
55
43
|
logger.info(`Registered ${toolCount} tools from connected MCP servers`);
|
|
56
44
|
// Register resources if available
|
|
57
45
|
try {
|
|
58
46
|
const allResources = await mcpManager.listAllResources();
|
|
59
47
|
logger.info(`Registering ${allResources.length} resources from connected MCP servers`);
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
// Collision handling verified:
|
|
49
|
+
// - Tools/Prompts: Names come from mcpManager which handles collisions at source
|
|
50
|
+
// - Resources: Index prefix ensures uniqueness even if multiple clients have same key
|
|
51
|
+
allResources.forEach((resource, index) => {
|
|
52
|
+
const safeId = resource.key.replace(/[^a-zA-Z0-9]/g, '_');
|
|
53
|
+
mcpServer.resource(`resource_${index}_${safeId}`, resource.key, async () => {
|
|
54
|
+
logger.info(`Resource aggregation: reading ${resource.key}`);
|
|
55
|
+
return await mcpManager.readResource(resource.key);
|
|
66
56
|
});
|
|
67
|
-
|
|
68
|
-
}
|
|
57
|
+
});
|
|
69
58
|
}
|
|
70
59
|
catch (error) {
|
|
71
60
|
logger.debug(`Skipping resource aggregation: ${error}`);
|
|
@@ -76,8 +65,11 @@ export async function initializeMcpToolAggregationServer(serverConfigs, mcpTrans
|
|
|
76
65
|
logger.info(`Registering ${allPrompts.length} prompts from connected MCP servers`);
|
|
77
66
|
for (const promptName of allPrompts) {
|
|
78
67
|
mcpServer.prompt(promptName, `Prompt: ${promptName}`, async (extra) => {
|
|
79
|
-
logger.info(`Prompt aggregation:
|
|
80
|
-
|
|
68
|
+
logger.info(`Prompt aggregation: resolving ${promptName}`);
|
|
69
|
+
const promptArgs = extra && 'arguments' in extra
|
|
70
|
+
? extra.arguments
|
|
71
|
+
: undefined;
|
|
72
|
+
return await mcpManager.getPrompt(promptName, promptArgs);
|
|
81
73
|
});
|
|
82
74
|
}
|
|
83
75
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Router } from 'express';
|
|
2
|
+
import type { DextoAgent } from '@dexto/core';
|
|
3
|
+
/**
|
|
4
|
+
* Setup memory API routes
|
|
5
|
+
* Provides CRUD operations for user memories
|
|
6
|
+
*
|
|
7
|
+
* Routes:
|
|
8
|
+
* - POST /api/memory - Create a new memory
|
|
9
|
+
* - GET /api/memory - List all memories (with optional filters)
|
|
10
|
+
* - GET /api/memory/:id - Get a specific memory
|
|
11
|
+
* - PUT /api/memory/:id - Update a memory
|
|
12
|
+
* - DELETE /api/memory/:id - Delete a memory
|
|
13
|
+
*/
|
|
14
|
+
export declare function setupMemoryRoutes(agent: DextoAgent): Router;
|
|
15
|
+
//# sourceMappingURL=memory-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-handler.d.ts","sourceRoot":"","sources":["../../../src/api/memory/memory-handler.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,MAAM,EAAkD,MAAM,SAAS,CAAC;AAE1F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA8B9C;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAqF3D"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import express, { Router } from 'express';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { CreateMemoryInputSchema, UpdateMemoryInputSchema } from '@dexto/core';
|
|
4
|
+
// Schema for memory ID parameter
|
|
5
|
+
const MemoryIdParamsSchema = z.object({
|
|
6
|
+
id: z.string().min(1, 'Memory ID is required'),
|
|
7
|
+
});
|
|
8
|
+
// Schema for list query parameters (from query string)
|
|
9
|
+
const ListMemoriesQuerySchema = z.object({
|
|
10
|
+
tags: z
|
|
11
|
+
.string()
|
|
12
|
+
.optional()
|
|
13
|
+
.transform((val) => (val ? val.split(',').map((t) => t.trim()) : undefined)),
|
|
14
|
+
source: z.enum(['user', 'system']).optional(),
|
|
15
|
+
pinned: z
|
|
16
|
+
.string()
|
|
17
|
+
.optional()
|
|
18
|
+
.transform((val) => (val === 'true' ? true : val === 'false' ? false : undefined)),
|
|
19
|
+
limit: z
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.transform((val) => (val ? parseInt(val, 10) : undefined)),
|
|
23
|
+
offset: z
|
|
24
|
+
.string()
|
|
25
|
+
.optional()
|
|
26
|
+
.transform((val) => (val ? parseInt(val, 10) : undefined)),
|
|
27
|
+
});
|
|
28
|
+
/**
|
|
29
|
+
* Setup memory API routes
|
|
30
|
+
* Provides CRUD operations for user memories
|
|
31
|
+
*
|
|
32
|
+
* Routes:
|
|
33
|
+
* - POST /api/memory - Create a new memory
|
|
34
|
+
* - GET /api/memory - List all memories (with optional filters)
|
|
35
|
+
* - GET /api/memory/:id - Get a specific memory
|
|
36
|
+
* - PUT /api/memory/:id - Update a memory
|
|
37
|
+
* - DELETE /api/memory/:id - Delete a memory
|
|
38
|
+
*/
|
|
39
|
+
export function setupMemoryRoutes(agent) {
|
|
40
|
+
const router = Router();
|
|
41
|
+
// Create a new memory
|
|
42
|
+
router.post('/', express.json(), async (req, res, next) => {
|
|
43
|
+
try {
|
|
44
|
+
const input = CreateMemoryInputSchema.parse(req.body);
|
|
45
|
+
const memory = await agent.memoryManager.create(input);
|
|
46
|
+
return res.status(201).json({ ok: true, memory });
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
return next(error);
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
// List all memories with optional filtering
|
|
53
|
+
router.get('/', async (req, res, next) => {
|
|
54
|
+
try {
|
|
55
|
+
const queryOptions = ListMemoriesQuerySchema.parse(req.query);
|
|
56
|
+
// Build options object, removing undefined values
|
|
57
|
+
const options = {};
|
|
58
|
+
if (queryOptions.tags !== undefined)
|
|
59
|
+
options.tags = queryOptions.tags;
|
|
60
|
+
if (queryOptions.source !== undefined)
|
|
61
|
+
options.source = queryOptions.source;
|
|
62
|
+
if (queryOptions.pinned !== undefined)
|
|
63
|
+
options.pinned = queryOptions.pinned;
|
|
64
|
+
if (queryOptions.limit !== undefined)
|
|
65
|
+
options.limit = queryOptions.limit;
|
|
66
|
+
if (queryOptions.offset !== undefined)
|
|
67
|
+
options.offset = queryOptions.offset;
|
|
68
|
+
const memories = await agent.memoryManager.list(options);
|
|
69
|
+
return res.status(200).json({ ok: true, memories, count: memories.length });
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
return next(error);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
// Get memory count (with optional filtering)
|
|
76
|
+
// NOTE: Must be declared before /:id route to avoid route shadowing
|
|
77
|
+
router.get('/count', async (req, res, next) => {
|
|
78
|
+
try {
|
|
79
|
+
const queryOptions = ListMemoriesQuerySchema.parse(req.query);
|
|
80
|
+
const options = {};
|
|
81
|
+
if (queryOptions.tags !== undefined)
|
|
82
|
+
options.tags = queryOptions.tags;
|
|
83
|
+
if (queryOptions.source !== undefined)
|
|
84
|
+
options.source = queryOptions.source;
|
|
85
|
+
if (queryOptions.pinned !== undefined)
|
|
86
|
+
options.pinned = queryOptions.pinned;
|
|
87
|
+
const count = await agent.memoryManager.count(options);
|
|
88
|
+
return res.status(200).json({ ok: true, count });
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
return next(error);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
// Get a specific memory by ID
|
|
95
|
+
router.get('/:id', async (req, res, next) => {
|
|
96
|
+
try {
|
|
97
|
+
const { id } = MemoryIdParamsSchema.parse(req.params);
|
|
98
|
+
const memory = await agent.memoryManager.get(id);
|
|
99
|
+
return res.status(200).json({ ok: true, memory });
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
return next(error);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
// Update a memory
|
|
106
|
+
router.put('/:id', express.json(), async (req, res, next) => {
|
|
107
|
+
try {
|
|
108
|
+
const { id } = MemoryIdParamsSchema.parse(req.params);
|
|
109
|
+
const updates = UpdateMemoryInputSchema.parse(req.body);
|
|
110
|
+
const memory = await agent.memoryManager.update(id, updates);
|
|
111
|
+
return res.status(200).json({ ok: true, memory });
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
return next(error);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
// Delete a memory
|
|
118
|
+
router.delete('/:id', async (req, res, next) => {
|
|
119
|
+
try {
|
|
120
|
+
const { id } = MemoryIdParamsSchema.parse(req.params);
|
|
121
|
+
await agent.memoryManager.delete(id);
|
|
122
|
+
return res.status(200).json({ ok: true, message: 'Memory deleted successfully' });
|
|
123
|
+
}
|
|
124
|
+
catch (error) {
|
|
125
|
+
return next(error);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
return router;
|
|
129
|
+
}
|
package/dist/api/server.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ import { WebSocketEventSubscriber } from './websocket-subscriber.js';
|
|
|
5
5
|
import { WebhookEventSubscriber } from './webhook-subscriber.js';
|
|
6
6
|
import { type AgentCard } from '@dexto/core';
|
|
7
7
|
import { DextoAgent } from '@dexto/core';
|
|
8
|
-
export declare function initializeApi(agent: DextoAgent, agentCardOverride?: Partial<AgentCard>, listenPort?: number,
|
|
8
|
+
export declare function initializeApi(agent: DextoAgent, agentCardOverride?: Partial<AgentCard>, listenPort?: number, agentId?: string): Promise<{
|
|
9
9
|
app: Express;
|
|
10
10
|
server: http.Server;
|
|
11
11
|
wss: WebSocketServer;
|
|
12
12
|
webSubscriber: WebSocketEventSubscriber;
|
|
13
13
|
webhookSubscriber: WebhookEventSubscriber;
|
|
14
14
|
}>;
|
|
15
|
-
export declare function startApiServer(agent: DextoAgent, port?: number, agentCardOverride?: Partial<AgentCard>,
|
|
15
|
+
export declare function startApiServer(agent: DextoAgent, port?: number, agentCardOverride?: Partial<AgentCard>, agentId?: string): Promise<{
|
|
16
16
|
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
|
17
17
|
wss: WebSocketServer;
|
|
18
18
|
webSubscriber: WebSocketEventSubscriber;
|
package/dist/api/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/api/server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/api/server.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAY,MAAM,SAAS,CAAC;AACjD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC;AAErC,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,EAAkD,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAS7F,OAAO,EAA0B,UAAU,EAAY,MAAM,aAAa,CAAC;AA8D3E,wBAAsB,aAAa,CAC/B,KAAK,EAAE,UAAU,EACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EACtC,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC;IACP,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;IACpB,GAAG,EAAE,eAAe,CAAC;IACrB,aAAa,EAAE,wBAAwB,CAAC;IACxC,iBAAiB,EAAE,sBAAsB,CAAC;CAC7C,CAAC,CA2nED;AAED,wBAAsB,cAAc,CAChC,KAAK,EAAE,UAAU,EACjB,IAAI,SAAO,EACX,iBAAiB,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,EACtC,OAAO,CAAC,EAAE,MAAM;;;;;GA6BnB"}
|