dexto 1.1.11 → 1.2.0
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 +220 -84
- package/dist/agents/agent-registry.json +9 -0
- package/dist/agents/agent-template.yml +1 -1
- package/dist/agents/coding-agent/README.md +188 -0
- package/dist/agents/coding-agent/coding-agent.yml +203 -0
- package/dist/agents/database-agent/database-agent.yml +41 -2
- package/dist/agents/default-agent.yml +37 -3
- package/dist/agents/github-agent/github-agent.yml +39 -0
- package/dist/agents/image-editor-agent/image-editor-agent.yml +6 -2
- package/dist/agents/music-agent/README.md +1 -1
- package/dist/agents/music-agent/music-agent.yml +33 -2
- package/dist/agents/nano-banana-agent/nano-banana-agent.yml +32 -1
- package/dist/agents/podcast-agent/README.md +1 -1
- package/dist/agents/podcast-agent/podcast-agent.yml +34 -3
- package/dist/agents/product-name-researcher/product-name-researcher.yml +34 -1
- package/dist/agents/sora-video-agent/README.md +122 -0
- package/dist/agents/sora-video-agent/sora-video-agent.yml +98 -0
- package/dist/agents/talk2pdf-agent/talk2pdf-agent.yml +14 -2
- package/dist/agents/triage-demo/README.md +6 -6
- package/dist/agents/triage-demo/billing-agent.yml +1 -1
- package/dist/agents/triage-demo/escalation-agent.yml +1 -1
- package/dist/agents/triage-demo/product-info-agent.yml +1 -1
- package/dist/agents/triage-demo/technical-support-agent.yml +1 -1
- package/dist/agents/triage-demo/triage-agent.yml +13 -1
- package/dist/analytics/wrapper.d.ts.map +1 -1
- package/dist/analytics/wrapper.js +5 -3
- package/dist/api/a2a.d.ts +2 -2
- package/dist/api/a2a.d.ts.map +1 -1
- package/dist/api/a2a.js +3 -2
- package/dist/api/mcp/mcp_handler.d.ts +3 -3
- package/dist/api/mcp/mcp_handler.d.ts.map +1 -1
- package/dist/api/mcp/mcp_handler.js +7 -4
- package/dist/api/memory/memory-handler.d.ts +4 -1
- package/dist/api/memory/memory-handler.d.ts.map +1 -1
- package/dist/api/memory/memory-handler.js +10 -2
- package/dist/api/middleware/errorHandler.d.ts.map +1 -1
- package/dist/api/middleware/errorHandler.js +2 -0
- package/dist/api/server.d.ts.map +1 -1
- package/dist/api/server.js +158 -42
- package/dist/api/websocket-subscriber.d.ts.map +1 -1
- package/dist/api/websocket-subscriber.js +6 -0
- package/dist/cli/commands/interactive-commands/model/model-commands.js +2 -2
- package/dist/cli/utils/options.js +2 -2
- package/dist/index.js +64 -18
- package/dist/webui/.next/standalone/.next/static/chunks/419-6d449dcb2b056299.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/614-3519f8a6051e0088.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/656-5a9f6405badf66a8.js +25 -0
- package/dist/webui/.next/standalone/.next/static/chunks/{711-76a7d2bf4d6f69e5.js → 765-755286dc586b1a51.js} +1 -1
- package/dist/webui/.next/standalone/.next/static/chunks/804-f40df92a3adffcc0.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/854-232126f3c77e6c0b.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/app/chat/[sessionId]/page-a695b09e6bac5274.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/app/page-d1f127a0cac96246.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/app/playground/page-6f8d2abe76e51dfc.js +1 -0
- package/dist/webui/.next/standalone/.next/static/chunks/main-7decd42f62688419.js +1 -0
- package/dist/webui/.next/standalone/.next/static/css/c3c26ec984df1deb.css +1 -0
- package/dist/webui/.next/standalone/.next/static/uqfH8SY_uhwdc0ZkpMwCO/_buildManifest.js +1 -0
- package/dist/webui/.next/standalone/package.json +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/BUILD_ID +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/app-build-manifest.json +18 -18
- package/dist/webui/.next/standalone/packages/webui/.next/build-manifest.json +4 -4
- 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 -11
- package/dist/webui/.next/standalone/packages/webui/.next/routes-manifest.json +1 -7
- 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 +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/chat/[sessionId]/page.js.nft.json +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/chat/[sessionId]/page_client-reference-manifest.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/app/page.js +1 -1
- 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 -8
- 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/chunks/1.js +5 -5
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/102.js +25 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/383.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/43.js +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/985.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/chunks/419-6d449dcb2b056299.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/614-3519f8a6051e0088.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/656-5a9f6405badf66a8.js +25 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/{711-76a7d2bf4d6f69e5.js → 765-755286dc586b1a51.js} +1 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/804-f40df92a3adffcc0.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/854-232126f3c77e6c0b.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/chat/[sessionId]/page-a695b09e6bac5274.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/page-d1f127a0cac96246.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/playground/page-6f8d2abe76e51dfc.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/main-7decd42f62688419.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/css/c3c26ec984df1deb.css +1 -0
- package/dist/webui/.next/standalone/packages/webui/.next/static/uqfH8SY_uhwdc0ZkpMwCO/_buildManifest.js +1 -0
- package/dist/webui/.next/standalone/packages/webui/package.json +5 -1
- package/dist/webui/.next/standalone/packages/webui/server.js +1 -1
- package/dist/webui/.next/static/chunks/419-6d449dcb2b056299.js +1 -0
- package/dist/webui/.next/static/chunks/614-3519f8a6051e0088.js +1 -0
- package/dist/webui/.next/static/chunks/656-5a9f6405badf66a8.js +25 -0
- package/dist/webui/.next/static/chunks/{711-76a7d2bf4d6f69e5.js → 765-755286dc586b1a51.js} +1 -1
- package/dist/webui/.next/static/chunks/804-f40df92a3adffcc0.js +1 -0
- package/dist/webui/.next/static/chunks/854-232126f3c77e6c0b.js +1 -0
- package/dist/webui/.next/static/chunks/app/chat/[sessionId]/page-a695b09e6bac5274.js +1 -0
- package/dist/webui/.next/static/chunks/app/page-d1f127a0cac96246.js +1 -0
- package/dist/webui/.next/static/chunks/app/playground/page-6f8d2abe76e51dfc.js +1 -0
- package/dist/webui/.next/static/chunks/main-7decd42f62688419.js +1 -0
- package/dist/webui/.next/static/css/c3c26ec984df1deb.css +1 -0
- package/dist/webui/.next/static/uqfH8SY_uhwdc0ZkpMwCO/_buildManifest.js +1 -0
- package/dist/webui/package.json +5 -1
- package/package.json +2 -2
- package/dist/webui/.next/standalone/.next/static/VoeDi3iuGmMdZu_kx-R2X/_buildManifest.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/419-5526a47c95a2fa60.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/429-838829c1391e496d.js +0 -25
- package/dist/webui/.next/standalone/.next/static/chunks/459-62011998b002cbf6.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/854-8cad9404fc78e0cc.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/935-07f9df196b13275e.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/app/chat/[sessionId]/page-b8acc47b0d8c5c0a.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/app/page-e117ae372850d25f.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/app/playground/page-09340fb6b3f4caa2.js +0 -1
- package/dist/webui/.next/standalone/.next/static/chunks/main-b65ece3506a2355c.js +0 -1
- package/dist/webui/.next/standalone/.next/static/css/21e6c142ca3cdc42.css +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/419.js +0 -25
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/654.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/server/chunks/71.js +0 -5
- package/dist/webui/.next/standalone/packages/webui/.next/static/VoeDi3iuGmMdZu_kx-R2X/_buildManifest.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/419-5526a47c95a2fa60.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/429-838829c1391e496d.js +0 -25
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/459-62011998b002cbf6.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/854-8cad9404fc78e0cc.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/935-07f9df196b13275e.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/chat/[sessionId]/page-b8acc47b0d8c5c0a.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/page-e117ae372850d25f.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/app/playground/page-09340fb6b3f4caa2.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/chunks/main-b65ece3506a2355c.js +0 -1
- package/dist/webui/.next/standalone/packages/webui/.next/static/css/21e6c142ca3cdc42.css +0 -1
- package/dist/webui/.next/static/VoeDi3iuGmMdZu_kx-R2X/_buildManifest.js +0 -1
- package/dist/webui/.next/static/chunks/419-5526a47c95a2fa60.js +0 -1
- package/dist/webui/.next/static/chunks/429-838829c1391e496d.js +0 -25
- package/dist/webui/.next/static/chunks/459-62011998b002cbf6.js +0 -1
- package/dist/webui/.next/static/chunks/854-8cad9404fc78e0cc.js +0 -1
- package/dist/webui/.next/static/chunks/935-07f9df196b13275e.js +0 -1
- package/dist/webui/.next/static/chunks/app/chat/[sessionId]/page-b8acc47b0d8c5c0a.js +0 -1
- package/dist/webui/.next/static/chunks/app/page-e117ae372850d25f.js +0 -1
- package/dist/webui/.next/static/chunks/app/playground/page-09340fb6b3f4caa2.js +0 -1
- package/dist/webui/.next/static/chunks/main-b65ece3506a2355c.js +0 -1
- package/dist/webui/.next/static/css/21e6c142ca3cdc42.css +0 -1
- /package/dist/webui/.next/standalone/.next/static/{VoeDi3iuGmMdZu_kx-R2X → uqfH8SY_uhwdc0ZkpMwCO}/_ssgManifest.js +0 -0
- /package/dist/webui/.next/standalone/packages/webui/.next/static/{VoeDi3iuGmMdZu_kx-R2X → uqfH8SY_uhwdc0ZkpMwCO}/_ssgManifest.js +0 -0
- /package/dist/webui/.next/static/{VoeDi3iuGmMdZu_kx-R2X → uqfH8SY_uhwdc0ZkpMwCO}/_ssgManifest.js +0 -0
|
@@ -154,7 +154,7 @@ systemPrompt: |
|
|
|
154
154
|
|
|
155
155
|
llm:
|
|
156
156
|
provider: openai
|
|
157
|
-
model: gpt-
|
|
157
|
+
model: gpt-5-mini
|
|
158
158
|
apiKey: $OPENAI_API_KEY
|
|
159
159
|
|
|
160
160
|
storage:
|
|
@@ -162,9 +162,40 @@ storage:
|
|
|
162
162
|
type: in-memory
|
|
163
163
|
database:
|
|
164
164
|
type: sqlite
|
|
165
|
-
|
|
165
|
+
blob:
|
|
166
|
+
type: local
|
|
167
|
+
maxBlobSize: 52428800 # 50MB per blob
|
|
168
|
+
maxTotalSize: 1073741824 # 1GB total storage
|
|
169
|
+
cleanupAfterDays: 30
|
|
166
170
|
|
|
167
171
|
toolConfirmation:
|
|
168
172
|
mode: auto-approve
|
|
169
173
|
timeout: 30000
|
|
170
|
-
allowedToolsStorage: memory
|
|
174
|
+
allowedToolsStorage: memory
|
|
175
|
+
|
|
176
|
+
# Starter prompts - podcast and audio generation examples
|
|
177
|
+
starterPrompts:
|
|
178
|
+
- id: create-intro
|
|
179
|
+
title: "🎙️ Create Podcast Intro"
|
|
180
|
+
description: "Generate a multi-speaker podcast introduction"
|
|
181
|
+
prompt: "Create a podcast intro with two hosts, Alex (voice: Achird) and Jamie (voice: Autonoe), welcoming listeners to a tech podcast."
|
|
182
|
+
category: podcasting
|
|
183
|
+
priority: 10
|
|
184
|
+
- id: generate-conversation
|
|
185
|
+
title: "💬 Generate Conversation"
|
|
186
|
+
description: "Create multi-speaker dialogue"
|
|
187
|
+
prompt: "Generate a 2-minute conversation between Dr. Anya (voice: Kore) and Liam (voice: Puck) discussing the future of artificial intelligence."
|
|
188
|
+
category: conversation
|
|
189
|
+
priority: 9
|
|
190
|
+
- id: list-voices
|
|
191
|
+
title: "🔊 Explore Voices"
|
|
192
|
+
description: "Browse available voice options"
|
|
193
|
+
prompt: "Show me all available voices with their characteristics to help me choose the right ones for my podcast."
|
|
194
|
+
category: discovery
|
|
195
|
+
priority: 8
|
|
196
|
+
- id: single-speaker
|
|
197
|
+
title: "🗣️ Generate Speech"
|
|
198
|
+
description: "Create single-speaker audio"
|
|
199
|
+
prompt: "Generate a cheerful welcome announcement using voice Puck saying 'Welcome to our amazing podcast! We're thrilled to have you here today.'"
|
|
200
|
+
category: speech
|
|
201
|
+
priority: 7
|
|
@@ -161,4 +161,37 @@ storage:
|
|
|
161
161
|
# Tool confirmation - auto-approve for seamless domain checking
|
|
162
162
|
toolConfirmation:
|
|
163
163
|
mode: auto-approve
|
|
164
|
-
allowedToolsStorage: memory
|
|
164
|
+
allowedToolsStorage: memory
|
|
165
|
+
|
|
166
|
+
# Starter prompts - product name research examples
|
|
167
|
+
starterPrompts:
|
|
168
|
+
- id: research-name
|
|
169
|
+
title: "🔍 Research Product Name"
|
|
170
|
+
description: "Comprehensive name validation"
|
|
171
|
+
prompt: "I want to research the name 'CloudSync' for my new file sync product. Check domain availability, trademark conflicts, and competitive landscape."
|
|
172
|
+
category: research
|
|
173
|
+
priority: 10
|
|
174
|
+
- id: compare-names
|
|
175
|
+
title: "⚖️ Compare Multiple Names"
|
|
176
|
+
description: "Compare and score name options"
|
|
177
|
+
prompt: "Help me choose between 'DataFlow', 'InfoStream', and 'SyncHub' for my data management tool. Compare them across all criteria."
|
|
178
|
+
category: comparison
|
|
179
|
+
priority: 9
|
|
180
|
+
- id: check-domains
|
|
181
|
+
title: "🌐 Check Domain Availability"
|
|
182
|
+
description: "Verify domain availability across TLDs"
|
|
183
|
+
prompt: "Check if 'myawesomeapp' is available across .com, .io, .app, and .dev domains."
|
|
184
|
+
category: domains
|
|
185
|
+
priority: 8
|
|
186
|
+
- id: trademark-search
|
|
187
|
+
title: "™️ Search Trademarks"
|
|
188
|
+
description: "Find potential trademark conflicts"
|
|
189
|
+
prompt: "Search for existing trademarks similar to 'TechFlow' in the software industry."
|
|
190
|
+
category: legal
|
|
191
|
+
priority: 7
|
|
192
|
+
- id: dev-collisions
|
|
193
|
+
title: "💻 Check Developer Platforms"
|
|
194
|
+
description: "Find conflicts on GitHub, npm, PyPI"
|
|
195
|
+
prompt: "Check if 'awesome-toolkit' is available on GitHub, npm, and PyPI."
|
|
196
|
+
category: development
|
|
197
|
+
priority: 6
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Sora Video Agent
|
|
2
|
+
|
|
3
|
+
A Dexto agent specialized in AI video generation using OpenAI's Sora technology. This agent provides a comprehensive interface for creating, managing, and manipulating AI-generated videos.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **🎬 Video Generation**: Create videos from text prompts with custom settings
|
|
8
|
+
- **📊 Progress Monitoring**: Real-time status updates during video generation
|
|
9
|
+
- **🎭 Video Remixing**: Create variations and extensions of existing videos
|
|
10
|
+
- **📁 File Management**: Automatic download and organization of generated videos
|
|
11
|
+
- **🖼️ Reference Support**: Use images or videos as reference for consistent style
|
|
12
|
+
- **🗂️ Video Library**: List and manage all your generated videos
|
|
13
|
+
|
|
14
|
+
## Capabilities
|
|
15
|
+
|
|
16
|
+
### Video Creation
|
|
17
|
+
- Generate videos from detailed text prompts
|
|
18
|
+
- Customize duration (4s, 8s, 16s, 32s)
|
|
19
|
+
- Choose resolution for different platforms:
|
|
20
|
+
- **Vertical (9:16)**: 720x1280, 1024x1808 - Perfect for social media
|
|
21
|
+
- **Horizontal (16:9)**: 1280x720, 1808x1024 - Great for YouTube
|
|
22
|
+
- **Square (1:1)**: 1024x1024 - Ideal for Instagram posts
|
|
23
|
+
|
|
24
|
+
### Reference-Based Generation
|
|
25
|
+
- Use existing images or videos as style references
|
|
26
|
+
- Maintain character consistency across multiple videos
|
|
27
|
+
- Apply specific visual styles or aesthetics
|
|
28
|
+
|
|
29
|
+
### Video Management
|
|
30
|
+
- Monitor generation progress with real-time updates
|
|
31
|
+
- List all your videos with status information
|
|
32
|
+
- Download completed videos automatically
|
|
33
|
+
- Delete unwanted videos to manage storage
|
|
34
|
+
|
|
35
|
+
### Creative Workflows
|
|
36
|
+
- Create video series with consistent characters
|
|
37
|
+
- Generate multiple variations of the same concept
|
|
38
|
+
- Extend existing videos with new scenes
|
|
39
|
+
- Build comprehensive video libraries
|
|
40
|
+
|
|
41
|
+
## Usage Examples
|
|
42
|
+
|
|
43
|
+
### Basic Video Generation
|
|
44
|
+
```text
|
|
45
|
+
Create a video of a cat playing piano in a cozy living room
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Custom Settings
|
|
49
|
+
```text
|
|
50
|
+
Generate an 8-second video in 16:9 format showing a sunset over mountains
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Reference-Based Creation
|
|
54
|
+
```text
|
|
55
|
+
Create a video using this image as reference, showing the character walking through a forest
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Video Remixing
|
|
59
|
+
```text
|
|
60
|
+
Create a remix of video_123 showing the same character but in a different setting
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Best Practices
|
|
64
|
+
|
|
65
|
+
1. **Detailed Prompts**: Be specific about characters, settings, actions, and mood
|
|
66
|
+
2. **Platform Optimization**: Choose the right aspect ratio for your target platform
|
|
67
|
+
3. **Progressive Creation**: Start with shorter videos for testing, then create longer versions
|
|
68
|
+
4. **Style Consistency**: Use reference images/videos for character or style continuity
|
|
69
|
+
5. **Library Management**: Regularly organize and clean up your video collection
|
|
70
|
+
|
|
71
|
+
## Technical Requirements
|
|
72
|
+
|
|
73
|
+
- OpenAI API key with Sora access
|
|
74
|
+
- Node.js 18+ for running npx
|
|
75
|
+
- Sufficient storage space for video downloads
|
|
76
|
+
|
|
77
|
+
## Setup
|
|
78
|
+
|
|
79
|
+
### Default Setup (Recommended)
|
|
80
|
+
|
|
81
|
+
By default, this agent uses the published `@truffle-ai/sora-video-server` NPM package via `npx`. No additional installation is required - the package will be automatically fetched and run when the agent starts.
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
mcpServers:
|
|
85
|
+
sora_video:
|
|
86
|
+
type: stdio
|
|
87
|
+
command: npx
|
|
88
|
+
args:
|
|
89
|
+
- -y
|
|
90
|
+
- "@truffle-ai/sora-video-server"
|
|
91
|
+
connectionMode: strict
|
|
92
|
+
env:
|
|
93
|
+
OPENAI_API_KEY: $OPENAI_API_KEY
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Local Development Setup (Optional)
|
|
97
|
+
|
|
98
|
+
If you're developing or modifying the Sora agent locally, you can override the default behavior:
|
|
99
|
+
|
|
100
|
+
1. Clone and build the MCP Sora server locally
|
|
101
|
+
2. Set the environment variable to point to your local installation:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
export MCP_SORA_VIDEO_PATH="/path/to/mcp-servers/src/sora-video/dist/index.js"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
3. Update the agent YAML to use the local path instead of npx:
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
Add the environment variable to your shell profile (`.bashrc`, `.zshrc`, etc.) to persist across sessions.
|
|
112
|
+
|
|
113
|
+
## Workflow
|
|
114
|
+
|
|
115
|
+
1. **Plan**: Define your video concept and requirements
|
|
116
|
+
2. **Generate**: Create the initial video with your prompt
|
|
117
|
+
3. **Monitor**: Check progress and wait for completion
|
|
118
|
+
4. **Download**: Save the completed video to your device
|
|
119
|
+
5. **Iterate**: Create variations or remixes as needed
|
|
120
|
+
6. **Organize**: Manage your video library efficiently
|
|
121
|
+
|
|
122
|
+
This agent makes AI video generation accessible and efficient, providing all the tools you need to create professional-quality videos with OpenAI's Sora technology.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Dexto Agent Configuration for Sora Video Generation MCP Server
|
|
2
|
+
|
|
3
|
+
# Optional greeting shown at chat start (UI can consume this)
|
|
4
|
+
greeting: "🎬 Hello! I'm your Sora Video Agent. Let's create some amazing videos together!"
|
|
5
|
+
|
|
6
|
+
systemPrompt: |
|
|
7
|
+
You are an AI assistant specialized in video generation using OpenAI's Sora technology. You have access to a comprehensive set of tools for creating, managing, and manipulating AI-generated videos including:
|
|
8
|
+
|
|
9
|
+
- **Video Generation**: Create videos from text prompts with custom duration, resolution, and style
|
|
10
|
+
- **Reference-Based Creation**: Use images or videos as reference for more precise generation
|
|
11
|
+
- **Video Management**: Monitor generation progress, list all videos, and organize your creations
|
|
12
|
+
- **Video Remixing**: Create variations and extensions of existing videos with new prompts
|
|
13
|
+
- **File Management**: Automatically download and organize generated videos
|
|
14
|
+
- **Quality Control**: Delete unwanted videos and manage storage efficiently
|
|
15
|
+
|
|
16
|
+
When working with video generation:
|
|
17
|
+
1. Always provide clear, detailed prompts for the best results
|
|
18
|
+
2. Consider the target audience and use case when choosing duration and resolution
|
|
19
|
+
3. Monitor video generation progress and provide status updates
|
|
20
|
+
4. Suggest creative variations and remixes when appropriate
|
|
21
|
+
5. Help users organize and manage their video library
|
|
22
|
+
6. Provide guidance on optimal video settings for different use cases
|
|
23
|
+
|
|
24
|
+
**Supported Video Specifications:**
|
|
25
|
+
- **Durations**: 4s, 8s, 16s, 32s
|
|
26
|
+
- **Resolutions**: 720x1280 (9:16), 1280x720 (16:9), 1024x1024 (1:1), 1024x1808 (9:16 HD), 1808x1024 (16:9 HD)
|
|
27
|
+
- **Reference Formats**: JPG, PNG, WebP, MP4, MOV, AVI, WebM
|
|
28
|
+
|
|
29
|
+
**Best Practices:**
|
|
30
|
+
- Use descriptive, specific prompts for better results
|
|
31
|
+
- Consider the aspect ratio for your intended platform (vertical for social media, horizontal for YouTube)
|
|
32
|
+
- Start with shorter durations for testing, then create longer versions
|
|
33
|
+
- Use reference images/videos for consistent style or character continuity
|
|
34
|
+
- Monitor generation progress as it typically takes 1-3 minutes
|
|
35
|
+
- Save completed videos promptly to avoid losing access
|
|
36
|
+
|
|
37
|
+
mcpServers:
|
|
38
|
+
sora_video:
|
|
39
|
+
type: stdio
|
|
40
|
+
command: npx
|
|
41
|
+
args:
|
|
42
|
+
- -y
|
|
43
|
+
- "@truffle-ai/sora-video-server"
|
|
44
|
+
connectionMode: strict
|
|
45
|
+
env:
|
|
46
|
+
OPENAI_API_KEY: $OPENAI_API_KEY
|
|
47
|
+
|
|
48
|
+
toolConfirmation:
|
|
49
|
+
mode: "auto-approve"
|
|
50
|
+
allowedToolsStorage: "memory"
|
|
51
|
+
|
|
52
|
+
llm:
|
|
53
|
+
provider: openai
|
|
54
|
+
model: gpt-5-mini
|
|
55
|
+
apiKey: $OPENAI_API_KEY
|
|
56
|
+
|
|
57
|
+
internalResources:
|
|
58
|
+
enabled: true
|
|
59
|
+
resources:
|
|
60
|
+
- type: blob
|
|
61
|
+
|
|
62
|
+
storage:
|
|
63
|
+
cache:
|
|
64
|
+
type: in-memory
|
|
65
|
+
database:
|
|
66
|
+
type: sqlite
|
|
67
|
+
blob:
|
|
68
|
+
type: local
|
|
69
|
+
maxBlobSize: 209715200 # 200MB per blob (for HD videos up to 32 seconds)
|
|
70
|
+
maxTotalSize: 2147483648 # 2GB total storage
|
|
71
|
+
cleanupAfterDays: 30
|
|
72
|
+
|
|
73
|
+
# Starter prompts - video generation examples
|
|
74
|
+
starterPrompts:
|
|
75
|
+
- id: create-video
|
|
76
|
+
title: "🎬 Create Video"
|
|
77
|
+
description: "Generate video from text prompt"
|
|
78
|
+
prompt: "Create an 8-second video of a cat playing piano in a cozy living room with warm lighting."
|
|
79
|
+
category: generation
|
|
80
|
+
priority: 10
|
|
81
|
+
- id: nature-video
|
|
82
|
+
title: "🌄 Nature Video"
|
|
83
|
+
description: "Generate scenic landscape video"
|
|
84
|
+
prompt: "Generate an 8-second video in 16:9 format showing a breathtaking sunset over mountains with clouds moving across the sky."
|
|
85
|
+
category: nature
|
|
86
|
+
priority: 9
|
|
87
|
+
- id: social-video
|
|
88
|
+
title: "📱 Social Media Video"
|
|
89
|
+
description: "Create vertical video for social platforms"
|
|
90
|
+
prompt: "Create a 4-second vertical video (9:16) showing a product reveal with dramatic lighting."
|
|
91
|
+
category: social-media
|
|
92
|
+
priority: 8
|
|
93
|
+
- id: futuristic-video
|
|
94
|
+
title: "🚀 Futuristic Scene"
|
|
95
|
+
description: "Generate sci-fi themed video"
|
|
96
|
+
prompt: "Create a 16-second video showing a futuristic cityscape with flying cars and neon lights at night."
|
|
97
|
+
category: sci-fi
|
|
98
|
+
priority: 7
|
|
@@ -39,7 +39,19 @@ systemPrompt:
|
|
|
39
39
|
source: dateTime
|
|
40
40
|
enabled: true
|
|
41
41
|
|
|
42
|
+
# Storage configuration
|
|
43
|
+
storage:
|
|
44
|
+
cache:
|
|
45
|
+
type: in-memory
|
|
46
|
+
database:
|
|
47
|
+
type: sqlite
|
|
48
|
+
blob:
|
|
49
|
+
type: local
|
|
50
|
+
maxBlobSize: 52428800 # 50MB per blob
|
|
51
|
+
maxTotalSize: 1073741824 # 1GB total storage
|
|
52
|
+
cleanupAfterDays: 30
|
|
53
|
+
|
|
42
54
|
llm:
|
|
43
55
|
provider: openai
|
|
44
|
-
model: gpt-
|
|
45
|
-
apiKey: $OPENAI_API_KEY
|
|
56
|
+
model: gpt-5-mini
|
|
57
|
+
apiKey: $OPENAI_API_KEY
|
|
@@ -48,28 +48,28 @@ The triage agent doesn't just route requests - it **executes the specialized age
|
|
|
48
48
|
- **Tools**: Filesystem, web research, **chat_with_agent** (connects to all specialists)
|
|
49
49
|
- **Tool Confirmation**: Auto-approve mode for seamless delegation
|
|
50
50
|
|
|
51
|
-
### 2. **Technical Support Agent** (`technical-support-agent.yml`)
|
|
51
|
+
### 2. **Technical Support Agent** (`technical-support-agent.yml`)
|
|
52
52
|
- **Specialization**: Bug fixes, troubleshooting, system issues
|
|
53
53
|
- **Tools**: Filesystem, terminal, browser automation
|
|
54
|
-
- **Model**: GPT-
|
|
54
|
+
- **Model**: GPT-5 (higher capability for complex technical issues)
|
|
55
55
|
- **Connection**: Available as MCP server via stdio
|
|
56
56
|
|
|
57
57
|
### 3. **Billing Agent** (`billing-agent.yml`)
|
|
58
|
-
- **Specialization**: Payments, subscriptions, financial inquiries
|
|
58
|
+
- **Specialization**: Payments, subscriptions, financial inquiries
|
|
59
59
|
- **Tools**: Browser automation, filesystem for policy docs
|
|
60
|
-
- **Model**: GPT-
|
|
60
|
+
- **Model**: GPT-5 Mini (efficient for structured billing processes)
|
|
61
61
|
- **Connection**: Available as MCP server via stdio
|
|
62
62
|
|
|
63
63
|
### 4. **Product Info Agent** (`product-info-agent.yml`)
|
|
64
64
|
- **Specialization**: Features, comparisons, documentation
|
|
65
65
|
- **Tools**: Web research (Tavily), filesystem, browser automation
|
|
66
|
-
- **Model**: GPT-
|
|
66
|
+
- **Model**: GPT-5 Mini (efficient for information retrieval)
|
|
67
67
|
- **Connection**: Available as MCP server via stdio
|
|
68
68
|
|
|
69
69
|
### 5. **Escalation Agent** (`escalation-agent.yml`)
|
|
70
70
|
- **Specialization**: Complex issues, Enterprise customers, management approval
|
|
71
71
|
- **Tools**: Filesystem, web research for compliance/legal info
|
|
72
|
-
- **Model**: GPT-
|
|
72
|
+
- **Model**: GPT-5 (higher capability for sensitive issues)
|
|
73
73
|
- **Connection**: Available as MCP server via stdio
|
|
74
74
|
|
|
75
75
|
## 📚 Business Context Documentation
|
|
@@ -169,7 +169,19 @@ mcpServers:
|
|
|
169
169
|
- "${{dexto.agent_dir}}/escalation-agent.yml"
|
|
170
170
|
connectionMode: lenient
|
|
171
171
|
|
|
172
|
+
# Storage configuration
|
|
173
|
+
storage:
|
|
174
|
+
cache:
|
|
175
|
+
type: in-memory
|
|
176
|
+
database:
|
|
177
|
+
type: sqlite
|
|
178
|
+
blob:
|
|
179
|
+
type: local
|
|
180
|
+
maxBlobSize: 52428800 # 50MB per blob
|
|
181
|
+
maxTotalSize: 1073741824 # 1GB total storage
|
|
182
|
+
cleanupAfterDays: 30
|
|
183
|
+
|
|
172
184
|
llm:
|
|
173
185
|
provider: openai
|
|
174
|
-
model: gpt-
|
|
186
|
+
model: gpt-5
|
|
175
187
|
apiKey: $OPENAI_API_KEY
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../src/analytics/wrapper.ts"],"names":[],"mappings":"AAkDA,wBAAgB,aAAa,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,GAAG,OAAO,EAC1D,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EACvC,IAAI,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9B,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../src/analytics/wrapper.ts"],"names":[],"mappings":"AAkDA,wBAAgB,aAAa,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,GAAG,OAAO,EAC1D,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EACvC,IAAI,CAAC,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9B,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,CAiE5B;AAED,qBAAa,UAAW,SAAQ,KAAK;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBACrB,IAAI,GAAE,MAAU,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;CAOtE;AAED,wBAAgB,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,GAAE,MAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAEtF"}
|
|
@@ -75,7 +75,8 @@ export function withAnalytics(commandName, handler, opts) {
|
|
|
75
75
|
}
|
|
76
76
|
catch (err) {
|
|
77
77
|
if (err instanceof ExitSignal) {
|
|
78
|
-
|
|
78
|
+
const exitCode = err.code ?? 0;
|
|
79
|
+
process.exitCode = exitCode;
|
|
79
80
|
try {
|
|
80
81
|
const endMeta = { args: argsMeta };
|
|
81
82
|
if (typeof err.reason === 'string') {
|
|
@@ -84,12 +85,13 @@ export function withAnalytics(commandName, handler, opts) {
|
|
|
84
85
|
if (err.commandName) {
|
|
85
86
|
endMeta.command = err.commandName;
|
|
86
87
|
}
|
|
87
|
-
await onCommandEnd(commandName,
|
|
88
|
+
await onCommandEnd(commandName, exitCode === 0, endMeta);
|
|
88
89
|
}
|
|
89
90
|
catch {
|
|
90
91
|
// Ignore analytics errors when propagating ExitSignal.
|
|
91
92
|
}
|
|
92
|
-
|
|
93
|
+
// Actually exit the process after analytics
|
|
94
|
+
process.exit(exitCode);
|
|
93
95
|
}
|
|
94
96
|
try {
|
|
95
97
|
await onCommandEnd(commandName, false, {
|
package/dist/api/a2a.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { AgentCard } from '@dexto/core';
|
|
|
3
3
|
/**
|
|
4
4
|
* Sets up the A2A Agent Card endpoint.
|
|
5
5
|
* @param app Express application instance.
|
|
6
|
-
* @param
|
|
6
|
+
* @param getAgentCard Getter function that returns the current agent card.
|
|
7
7
|
*/
|
|
8
|
-
export declare function setupA2ARoutes(app: Express,
|
|
8
|
+
export declare function setupA2ARoutes(app: Express, getAgentCard: () => AgentCard): void;
|
|
9
9
|
//# sourceMappingURL=a2a.d.ts.map
|
package/dist/api/a2a.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a2a.d.ts","sourceRoot":"","sources":["../../src/api/a2a.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"a2a.d.ts","sourceRoot":"","sources":["../../src/api/a2a.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,GAAG,IAAI,CAOhF"}
|
package/dist/api/a2a.js
CHANGED
|
@@ -2,10 +2,11 @@ import { logger } from '@dexto/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* Sets up the A2A Agent Card endpoint.
|
|
4
4
|
* @param app Express application instance.
|
|
5
|
-
* @param
|
|
5
|
+
* @param getAgentCard Getter function that returns the current agent card.
|
|
6
6
|
*/
|
|
7
|
-
export function setupA2ARoutes(app,
|
|
7
|
+
export function setupA2ARoutes(app, getAgentCard) {
|
|
8
8
|
app.get('/.well-known/agent.json', (_req, res) => {
|
|
9
|
+
const agentCardData = getAgentCard();
|
|
9
10
|
res.setHeader('Content-Type', 'application/json');
|
|
10
11
|
res.status(200).send(JSON.stringify(agentCardData, null, 2));
|
|
11
12
|
});
|
|
@@ -6,13 +6,13 @@ import { DextoAgent } from '@dexto/core';
|
|
|
6
6
|
export type McpTransportType = 'stdio' | 'sse' | 'http';
|
|
7
7
|
export declare function createMcpTransport(transportType?: McpTransportType): Promise<Transport>;
|
|
8
8
|
/** Initializes MCP server, its tools, resources, and connects to the transport */
|
|
9
|
-
export declare function initializeMcpServer(
|
|
9
|
+
export declare function initializeMcpServer(getAgent: () => DextoAgent, getAgentCard: () => AgentCard, mcpTransport: Transport): Promise<McpServer>;
|
|
10
10
|
/**
|
|
11
11
|
* Initializes the Agent Card resource for the MCP server.
|
|
12
12
|
* @param mcpServer - The MCP server instance.
|
|
13
|
-
* @param
|
|
13
|
+
* @param getAgentCard - Getter function that returns the current agent card.
|
|
14
14
|
*/
|
|
15
|
-
export declare function initializeAgentCardResource(mcpServer: McpServer,
|
|
15
|
+
export declare function initializeAgentCardResource(mcpServer: McpServer, getAgentCard: () => AgentCard): Promise<void>;
|
|
16
16
|
/**
|
|
17
17
|
* Initializes and sets up the MCP HTTP endpoints.
|
|
18
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp_handler.d.ts","sourceRoot":"","sources":["../../../src/api/mcp/mcp_handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAExD,wBAAsB,kBAAkB,CACpC,aAAa,GAAE,gBAAyB,GACzC,OAAO,CAAC,SAAS,CAAC,CAsBpB;AAED,kFAAkF;AAClF,wBAAsB,mBAAmB,CACrC,
|
|
1
|
+
{"version":3,"file":"mcp_handler.d.ts","sourceRoot":"","sources":["../../../src/api/mcp/mcp_handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAIpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+CAA+C,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAExD,wBAAsB,kBAAkB,CACpC,aAAa,GAAE,gBAAyB,GACzC,OAAO,CAAC,SAAS,CAAC,CAsBpB;AAED,kFAAkF;AAClF,wBAAsB,mBAAmB,CACrC,QAAQ,EAAE,MAAM,UAAU,EAC1B,YAAY,EAAE,MAAM,SAAS,EAC7B,YAAY,EAAE,SAAS,GACxB,OAAO,CAAC,SAAS,CAAC,CA2CpB;AAED;;;;GAIG;AACH,wBAAsB,2BAA2B,CAC7C,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,MAAM,SAAS,GAC9B,OAAO,CAAC,IAAI,CAAC,CA0Bf;AAED;;GAEG;AACH,wBAAsB,+BAA+B,CACjD,GAAG,EAAE,OAAO,EACZ,YAAY,EAAE,SAAS,GACxB,OAAO,CAAC,IAAI,CAAC,CAoBf"}
|
|
@@ -24,7 +24,8 @@ export async function createMcpTransport(transportType = 'http') {
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
/** Initializes MCP server, its tools, resources, and connects to the transport */
|
|
27
|
-
export async function initializeMcpServer(
|
|
27
|
+
export async function initializeMcpServer(getAgent, getAgentCard, mcpTransport) {
|
|
28
|
+
const agentCardData = getAgentCard();
|
|
28
29
|
const mcpServer = new McpServer({ name: agentCardData.name, version: agentCardData.version }, {
|
|
29
30
|
capabilities: {
|
|
30
31
|
resources: {}, // Declare resource capability
|
|
@@ -35,6 +36,7 @@ export async function initializeMcpServer(agent, agentCardData, mcpTransport) {
|
|
|
35
36
|
const toolDescription = 'Allows you to chat with the an AI agent. Send a message to interact.';
|
|
36
37
|
mcpServer.tool(toolName, toolDescription, { message: z.string() }, // Input schema for the tool
|
|
37
38
|
async ({ message }) => {
|
|
39
|
+
const agent = getAgent();
|
|
38
40
|
logger.info(`MCP tool '${toolName}' received message: ${message.substring(0, 100)}${message.length > 100 ? '...' : ''}`);
|
|
39
41
|
const text = await agent.run(message);
|
|
40
42
|
logger.info(`MCP tool '${toolName}' sending response: ${text?.substring(0, 100)}${(text?.length ?? 0) > 100 ? '...' : ''}`);
|
|
@@ -42,7 +44,7 @@ export async function initializeMcpServer(agent, agentCardData, mcpTransport) {
|
|
|
42
44
|
});
|
|
43
45
|
logger.info(`Registered MCP tool: '${toolName}' with description: "${toolDescription.substring(0, 70)}..."`);
|
|
44
46
|
// Register Agent Card data as an MCP Resource
|
|
45
|
-
await initializeAgentCardResource(mcpServer,
|
|
47
|
+
await initializeAgentCardResource(mcpServer, getAgentCard);
|
|
46
48
|
// Connect server to transport AFTER all registrations
|
|
47
49
|
logger.info(`Initializing MCP protocol server connection...`);
|
|
48
50
|
await mcpServer.connect(mcpTransport);
|
|
@@ -52,13 +54,14 @@ export async function initializeMcpServer(agent, agentCardData, mcpTransport) {
|
|
|
52
54
|
/**
|
|
53
55
|
* Initializes the Agent Card resource for the MCP server.
|
|
54
56
|
* @param mcpServer - The MCP server instance.
|
|
55
|
-
* @param
|
|
57
|
+
* @param getAgentCard - Getter function that returns the current agent card.
|
|
56
58
|
*/
|
|
57
|
-
export async function initializeAgentCardResource(mcpServer,
|
|
59
|
+
export async function initializeAgentCardResource(mcpServer, getAgentCard) {
|
|
58
60
|
const agentCardResourceProgrammaticName = 'agentCard';
|
|
59
61
|
const agentCardResourceUri = 'dexto://agent/card';
|
|
60
62
|
try {
|
|
61
63
|
const readCallback = async (uri, _extra) => {
|
|
64
|
+
const agentCardData = getAgentCard();
|
|
62
65
|
logger.info(`MCP client requesting resource at ${uri.href}`);
|
|
63
66
|
return {
|
|
64
67
|
contents: [
|
|
@@ -4,6 +4,9 @@ import type { DextoAgent } from '@dexto/core';
|
|
|
4
4
|
* Setup memory API routes
|
|
5
5
|
* Provides CRUD operations for user memories
|
|
6
6
|
*
|
|
7
|
+
* Uses a getter function to ensure memory operations always use the current agent,
|
|
8
|
+
* even after agent switches in web/server modes.
|
|
9
|
+
*
|
|
7
10
|
* Routes:
|
|
8
11
|
* - POST /api/memory - Create a new memory
|
|
9
12
|
* - GET /api/memory - List all memories (with optional filters)
|
|
@@ -11,5 +14,5 @@ import type { DextoAgent } from '@dexto/core';
|
|
|
11
14
|
* - PUT /api/memory/:id - Update a memory
|
|
12
15
|
* - DELETE /api/memory/:id - Delete a memory
|
|
13
16
|
*/
|
|
14
|
-
export declare function setupMemoryRoutes(
|
|
17
|
+
export declare function setupMemoryRoutes(getAgent: () => DextoAgent): Router;
|
|
15
18
|
//# sourceMappingURL=memory-handler.d.ts.map
|
|
@@ -1 +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
|
|
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;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,UAAU,GAAG,MAAM,CA0FpE"}
|
|
@@ -29,6 +29,9 @@ const ListMemoriesQuerySchema = z.object({
|
|
|
29
29
|
* Setup memory API routes
|
|
30
30
|
* Provides CRUD operations for user memories
|
|
31
31
|
*
|
|
32
|
+
* Uses a getter function to ensure memory operations always use the current agent,
|
|
33
|
+
* even after agent switches in web/server modes.
|
|
34
|
+
*
|
|
32
35
|
* Routes:
|
|
33
36
|
* - POST /api/memory - Create a new memory
|
|
34
37
|
* - GET /api/memory - List all memories (with optional filters)
|
|
@@ -36,13 +39,13 @@ const ListMemoriesQuerySchema = z.object({
|
|
|
36
39
|
* - PUT /api/memory/:id - Update a memory
|
|
37
40
|
* - DELETE /api/memory/:id - Delete a memory
|
|
38
41
|
*/
|
|
39
|
-
export function setupMemoryRoutes(
|
|
42
|
+
export function setupMemoryRoutes(getAgent) {
|
|
40
43
|
const router = Router();
|
|
41
44
|
// Create a new memory
|
|
42
45
|
router.post('/', express.json(), async (req, res, next) => {
|
|
43
46
|
try {
|
|
44
47
|
const input = CreateMemoryInputSchema.parse(req.body);
|
|
45
|
-
const memory = await
|
|
48
|
+
const memory = await getAgent().memoryManager.create(input);
|
|
46
49
|
return res.status(201).json({ ok: true, memory });
|
|
47
50
|
}
|
|
48
51
|
catch (error) {
|
|
@@ -52,6 +55,7 @@ export function setupMemoryRoutes(agent) {
|
|
|
52
55
|
// List all memories with optional filtering
|
|
53
56
|
router.get('/', async (req, res, next) => {
|
|
54
57
|
try {
|
|
58
|
+
const agent = getAgent();
|
|
55
59
|
const queryOptions = ListMemoriesQuerySchema.parse(req.query);
|
|
56
60
|
// Build options object, removing undefined values
|
|
57
61
|
const options = {};
|
|
@@ -76,6 +80,7 @@ export function setupMemoryRoutes(agent) {
|
|
|
76
80
|
// NOTE: Must be declared before /:id route to avoid route shadowing
|
|
77
81
|
router.get('/count', async (req, res, next) => {
|
|
78
82
|
try {
|
|
83
|
+
const agent = getAgent();
|
|
79
84
|
const queryOptions = ListMemoriesQuerySchema.parse(req.query);
|
|
80
85
|
const options = {};
|
|
81
86
|
if (queryOptions.tags !== undefined)
|
|
@@ -94,6 +99,7 @@ export function setupMemoryRoutes(agent) {
|
|
|
94
99
|
// Get a specific memory by ID
|
|
95
100
|
router.get('/:id', async (req, res, next) => {
|
|
96
101
|
try {
|
|
102
|
+
const agent = getAgent();
|
|
97
103
|
const { id } = MemoryIdParamsSchema.parse(req.params);
|
|
98
104
|
const memory = await agent.memoryManager.get(id);
|
|
99
105
|
return res.status(200).json({ ok: true, memory });
|
|
@@ -105,6 +111,7 @@ export function setupMemoryRoutes(agent) {
|
|
|
105
111
|
// Update a memory
|
|
106
112
|
router.put('/:id', express.json(), async (req, res, next) => {
|
|
107
113
|
try {
|
|
114
|
+
const agent = getAgent();
|
|
108
115
|
const { id } = MemoryIdParamsSchema.parse(req.params);
|
|
109
116
|
const updates = UpdateMemoryInputSchema.parse(req.body);
|
|
110
117
|
const memory = await agent.memoryManager.update(id, updates);
|
|
@@ -117,6 +124,7 @@ export function setupMemoryRoutes(agent) {
|
|
|
117
124
|
// Delete a memory
|
|
118
125
|
router.delete('/:id', async (req, res, next) => {
|
|
119
126
|
try {
|
|
127
|
+
const agent = getAgent();
|
|
120
128
|
const { id } = MemoryIdParamsSchema.parse(req.params);
|
|
121
129
|
await agent.memoryManager.delete(id);
|
|
122
130
|
return res.status(200).json({ ok: true, message: 'Memory deleted successfully' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../../src/api/middleware/errorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../../src/api/middleware/errorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AA0C/D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,CAuC9F"}
|