@elizaos/client 1.5.5-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +350 -0
- package/dist/assets/empty-module-CLMscLYw.js +1 -0
- package/dist/assets/main-BBZ_3lkn.css +5999 -0
- package/dist/assets/main-C5zNUkXH.js +7 -0
- package/dist/assets/main-Dz64ENQg.js +614 -0
- package/dist/assets/react-vendor-DM5m98rr.js +545 -0
- package/dist/assets/ui-vendor-BQCqNqg0.js +1 -0
- package/dist/elizaos-avatar.png +0 -0
- package/dist/elizaos-icon.png +0 -0
- package/dist/elizaos-logo-light.png +0 -0
- package/dist/elizaos.webp +0 -0
- package/dist/favicon.ico +0 -0
- package/dist/images/agents/agent1.png +0 -0
- package/dist/images/agents/agent2.png +0 -0
- package/dist/images/agents/agent3.png +0 -0
- package/dist/images/agents/agent4.png +0 -0
- package/dist/images/agents/agent5.png +0 -0
- package/dist/index.html +14 -0
- package/index.html +24 -0
- package/package.json +159 -0
- package/postcss.config.js +3 -0
- package/public/elizaos-avatar.png +0 -0
- package/public/elizaos-icon.png +0 -0
- package/public/elizaos-logo-light.png +0 -0
- package/public/elizaos.webp +0 -0
- package/public/favicon.ico +0 -0
- package/public/images/agents/agent1.png +0 -0
- package/public/images/agents/agent2.png +0 -0
- package/public/images/agents/agent3.png +0 -0
- package/public/images/agents/agent4.png +0 -0
- package/public/images/agents/agent5.png +0 -0
- package/src/App.tsx +222 -0
- package/src/components/AgentDetailsPanel.tsx +147 -0
- package/src/components/ChatInputArea.tsx +196 -0
- package/src/components/ChatMessageListComponent.tsx +139 -0
- package/src/components/actionTool.tsx +186 -0
- package/src/components/add-agent-card.tsx +77 -0
- package/src/components/agent-action-viewer.tsx +816 -0
- package/src/components/agent-avatar-stack.tsx +121 -0
- package/src/components/agent-card.cy.tsx +259 -0
- package/src/components/agent-card.tsx +177 -0
- package/src/components/agent-creator.tsx +142 -0
- package/src/components/agent-log-viewer.tsx +645 -0
- package/src/components/agent-memory-edit-overlay.tsx +461 -0
- package/src/components/agent-memory-viewer.tsx +504 -0
- package/src/components/agent-settings.tsx +270 -0
- package/src/components/agent-sidebar.tsx +178 -0
- package/src/components/api-key-dialog.tsx +113 -0
- package/src/components/app-sidebar.tsx +685 -0
- package/src/components/array-input.tsx +116 -0
- package/src/components/audio-recorder.tsx +292 -0
- package/src/components/avatar-panel.tsx +141 -0
- package/src/components/character-form.tsx +1138 -0
- package/src/components/chat.tsx +1813 -0
- package/src/components/combobox.tsx +187 -0
- package/src/components/confirmation-dialog.tsx +59 -0
- package/src/components/connection-error-banner.tsx +101 -0
- package/src/components/connection-status.cy.tsx +73 -0
- package/src/components/connection-status.tsx +155 -0
- package/src/components/copy-button.tsx +35 -0
- package/src/components/delete-button.tsx +24 -0
- package/src/components/env-settings.tsx +261 -0
- package/src/components/group-card.tsx +160 -0
- package/src/components/group-panel.tsx +543 -0
- package/src/components/input-copy.tsx +21 -0
- package/src/components/logs-page.tsx +41 -0
- package/src/components/media-content.tsx +385 -0
- package/src/components/memory-graph.tsx +170 -0
- package/src/components/missing-secrets-dialog.tsx +72 -0
- package/src/components/onboarding-tour.tsx +247 -0
- package/src/components/page-title.tsx +8 -0
- package/src/components/plugins-panel.tsx +383 -0
- package/src/components/profile-card.tsx +66 -0
- package/src/components/profile-overlay.tsx +283 -0
- package/src/components/retry-button.tsx +28 -0
- package/src/components/secret-panel.tsx +1505 -0
- package/src/components/server-management.tsx +264 -0
- package/src/components/split-button.tsx +148 -0
- package/src/components/stop-agent-button.tsx +99 -0
- package/src/components/ui/alert-dialog.cy.tsx +333 -0
- package/src/components/ui/alert-dialog.tsx +115 -0
- package/src/components/ui/alert.tsx +49 -0
- package/src/components/ui/avatar.cy.tsx +180 -0
- package/src/components/ui/avatar.tsx +57 -0
- package/src/components/ui/badge.cy.tsx +146 -0
- package/src/components/ui/badge.tsx +43 -0
- package/src/components/ui/button.cy.tsx +177 -0
- package/src/components/ui/button.tsx +56 -0
- package/src/components/ui/card.cy.tsx +160 -0
- package/src/components/ui/card.tsx +73 -0
- package/src/components/ui/chat/animated-markdown.tsx +59 -0
- package/src/components/ui/chat/chat-bubble.tsx +178 -0
- package/src/components/ui/chat/chat-container.tsx +51 -0
- package/src/components/ui/chat/chat-input.cy.tsx +169 -0
- package/src/components/ui/chat/chat-input.tsx +47 -0
- package/src/components/ui/chat/chat-message-list.tsx +61 -0
- package/src/components/ui/chat/chat-tts-button.tsx +199 -0
- package/src/components/ui/chat/code-block.tsx +79 -0
- package/src/components/ui/chat/expandable-chat.tsx +131 -0
- package/src/components/ui/chat/hooks/useAutoScroll.ts +86 -0
- package/src/components/ui/chat/markdown.tsx +209 -0
- package/src/components/ui/chat/message-loading.tsx +48 -0
- package/src/components/ui/checkbox.cy.tsx +170 -0
- package/src/components/ui/checkbox.tsx +30 -0
- package/src/components/ui/collapsible.cy.tsx +283 -0
- package/src/components/ui/collapsible.tsx +9 -0
- package/src/components/ui/command.cy.tsx +313 -0
- package/src/components/ui/command.tsx +143 -0
- package/src/components/ui/dialog.cy.tsx +279 -0
- package/src/components/ui/dialog.tsx +104 -0
- package/src/components/ui/dropdown-menu.cy.tsx +273 -0
- package/src/components/ui/dropdown-menu.tsx +281 -0
- package/src/components/ui/input.cy.tsx +82 -0
- package/src/components/ui/input.tsx +27 -0
- package/src/components/ui/label.cy.tsx +157 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/resizable.tsx +42 -0
- package/src/components/ui/scroll-area.cy.tsx +242 -0
- package/src/components/ui/scroll-area.tsx +46 -0
- package/src/components/ui/select.cy.tsx +277 -0
- package/src/components/ui/select.tsx +155 -0
- package/src/components/ui/separator.cy.tsx +145 -0
- package/src/components/ui/separator.tsx +29 -0
- package/src/components/ui/sheet.cy.tsx +324 -0
- package/src/components/ui/sheet.tsx +119 -0
- package/src/components/ui/sidebar.tsx +734 -0
- package/src/components/ui/skeleton.cy.tsx +149 -0
- package/src/components/ui/skeleton.tsx +17 -0
- package/src/components/ui/split-button.cy.tsx +274 -0
- package/src/components/ui/split-button.tsx +112 -0
- package/src/components/ui/switch.tsx +28 -0
- package/src/components/ui/tabs.cy.tsx +271 -0
- package/src/components/ui/tabs.tsx +53 -0
- package/src/components/ui/textarea.cy.tsx +136 -0
- package/src/components/ui/textarea.tsx +26 -0
- package/src/components/ui/toast.cy.tsx +209 -0
- package/src/components/ui/toast.tsx +126 -0
- package/src/components/ui/toaster.tsx +29 -0
- package/src/components/ui/tooltip.cy.tsx +244 -0
- package/src/components/ui/tooltip.tsx +30 -0
- package/src/config/agent-templates.ts +349 -0
- package/src/config/voice-models.ts +181 -0
- package/src/constants.ts +23 -0
- package/src/context/AuthContext.tsx +44 -0
- package/src/context/ConnectionContext.tsx +194 -0
- package/src/entry.tsx +9 -0
- package/src/hooks/__tests__/use-agent-tab-state.test.ts +137 -0
- package/src/hooks/__tests__/use-agent-update.test.tsx +250 -0
- package/src/hooks/__tests__/use-character-convert.test.ts +102 -0
- package/src/hooks/__tests__/use-panel-width-state.test.ts +243 -0
- package/src/hooks/__tests__/use-sidebar-state.test.ts +117 -0
- package/src/hooks/use-agent-management.ts +130 -0
- package/src/hooks/use-agent-tab-state.ts +74 -0
- package/src/hooks/use-agent-update.ts +469 -0
- package/src/hooks/use-character-convert.ts +138 -0
- package/src/hooks/use-confirmation.ts +55 -0
- package/src/hooks/use-delete-agent.ts +123 -0
- package/src/hooks/use-dm-channels.ts +198 -0
- package/src/hooks/use-elevenlabs-voices.ts +83 -0
- package/src/hooks/use-file-upload.ts +224 -0
- package/src/hooks/use-mobile.tsx +19 -0
- package/src/hooks/use-onboarding.tsx +49 -0
- package/src/hooks/use-panel-width-state.ts +147 -0
- package/src/hooks/use-partial-update.ts +288 -0
- package/src/hooks/use-plugin-details.ts +462 -0
- package/src/hooks/use-plugins.ts +119 -0
- package/src/hooks/use-query-hooks.ts +1263 -0
- package/src/hooks/use-server-agents.ts +62 -0
- package/src/hooks/use-server-version.tsx +47 -0
- package/src/hooks/use-sidebar-state.ts +50 -0
- package/src/hooks/use-socket-chat.ts +264 -0
- package/src/hooks/use-toast.ts +260 -0
- package/src/hooks/use-version.tsx +64 -0
- package/src/index.css +146 -0
- package/src/lib/api-client-config.ts +53 -0
- package/src/lib/api-type-mappers.ts +196 -0
- package/src/lib/export-utils.ts +123 -0
- package/src/lib/logger.ts +19 -0
- package/src/lib/media-utils.ts +170 -0
- package/src/lib/pca.test.ts +17 -0
- package/src/lib/pca.ts +52 -0
- package/src/lib/socketio-manager.ts +664 -0
- package/src/lib/utils.ts +168 -0
- package/src/main.tsx +16 -0
- package/src/mocks/empty-module.ts +12 -0
- package/src/mocks/node-module.ts +57 -0
- package/src/polyfills.ts +37 -0
- package/src/routes/agent-detail.tsx +30 -0
- package/src/routes/agent-list.tsx +27 -0
- package/src/routes/agent-settings.tsx +48 -0
- package/src/routes/character-detail.tsx +52 -0
- package/src/routes/character-form.tsx +79 -0
- package/src/routes/character-list.tsx +38 -0
- package/src/routes/chat.tsx +128 -0
- package/src/routes/createAgent.tsx +13 -0
- package/src/routes/group-new.tsx +50 -0
- package/src/routes/group.tsx +29 -0
- package/src/routes/home.tsx +218 -0
- package/src/routes/not-found.tsx +71 -0
- package/src/test/setup.ts +154 -0
- package/src/types/crypto-browserify.d.ts +4 -0
- package/src/types/index.ts +13 -0
- package/src/types/rooms.ts +8 -0
- package/src/types.ts +84 -0
- package/src/vite-env.d.ts +40 -0
- package/tailwind.config.ts +90 -0
- package/tsconfig.json +10 -0
- package/vite.config.ts +102 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import type { Agent } from '@elizaos/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Templates for quick-start agent creation
|
|
5
|
+
*/
|
|
6
|
+
export interface AgentTemplate {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
description: string;
|
|
10
|
+
template: Partial<Agent>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Predefined agent templates based on The Org agents and client types
|
|
15
|
+
*/
|
|
16
|
+
export const agentTemplates: AgentTemplate[] = [
|
|
17
|
+
{
|
|
18
|
+
id: 'none',
|
|
19
|
+
label: 'None (Start Blank)',
|
|
20
|
+
description: 'Start with an empty configuration',
|
|
21
|
+
template: {
|
|
22
|
+
name: '',
|
|
23
|
+
username: '',
|
|
24
|
+
system: '',
|
|
25
|
+
bio: [],
|
|
26
|
+
topics: [],
|
|
27
|
+
adjectives: [],
|
|
28
|
+
plugins: ['@elizaos/plugin-sql', '@elizaos/plugin-openai', '@elizaos/plugin-bootstrap'],
|
|
29
|
+
settings: { secrets: {} },
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
// Client-specific agents
|
|
34
|
+
{
|
|
35
|
+
id: 'discord-bot',
|
|
36
|
+
label: 'Discord Bot',
|
|
37
|
+
description: 'Interactive Discord bot that handles server interactions',
|
|
38
|
+
template: {
|
|
39
|
+
name: 'Discord Assistant',
|
|
40
|
+
username: 'discordbot',
|
|
41
|
+
system:
|
|
42
|
+
'You are a Discord bot designed to assist users in a Discord server. You respond to messages, handle commands, and provide helpful information to community members. You should be friendly, helpful, and maintain a consistent personality. Focus on providing value to the community through clear, concise responses.',
|
|
43
|
+
bio: [
|
|
44
|
+
'Helpful Discord community assistant',
|
|
45
|
+
'Responds to commands and natural language queries',
|
|
46
|
+
'Assists with server-specific information and resources',
|
|
47
|
+
'Maintains a friendly and helpful tone',
|
|
48
|
+
],
|
|
49
|
+
topics: ['Discord server', 'Community assistance', 'Command handling', 'Server information'],
|
|
50
|
+
adjectives: ['Helpful', 'Responsive', 'Friendly', 'Informative', 'Reliable'],
|
|
51
|
+
plugins: [
|
|
52
|
+
'@elizaos/plugin-sql',
|
|
53
|
+
'@elizaos/plugin-openai',
|
|
54
|
+
'@elizaos/plugin-bootstrap',
|
|
55
|
+
'@elizaos/plugin-discord',
|
|
56
|
+
],
|
|
57
|
+
style: {
|
|
58
|
+
all: [
|
|
59
|
+
'Be friendly and helpful',
|
|
60
|
+
'Use clear, concise language',
|
|
61
|
+
'Follow Discord conventions',
|
|
62
|
+
],
|
|
63
|
+
chat: [
|
|
64
|
+
'Respond promptly to queries',
|
|
65
|
+
'Use appropriate formatting for clarity',
|
|
66
|
+
'Reference relevant commands when helpful',
|
|
67
|
+
],
|
|
68
|
+
post: [
|
|
69
|
+
'Structure longer responses with clear sections',
|
|
70
|
+
'Use embeds for rich content when appropriate',
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
settings: {
|
|
74
|
+
secrets: {},
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 'telegram-bot',
|
|
80
|
+
label: 'Telegram Bot',
|
|
81
|
+
description: 'Interactive bot for Telegram channels and groups',
|
|
82
|
+
template: {
|
|
83
|
+
name: 'Telegram Assistant',
|
|
84
|
+
username: 'telegrambot',
|
|
85
|
+
system:
|
|
86
|
+
'You are a helpful Telegram bot designed to assist users in channels and groups. You respond to commands and natural language queries, providing information, assistance, and engaging with users in a friendly manner. You can handle both one-on-one conversations and group interactions, adapting your tone and content accordingly while respecting privacy and community guidelines.',
|
|
87
|
+
bio: [
|
|
88
|
+
'Interactive Telegram bot',
|
|
89
|
+
'Assists users in channels and groups',
|
|
90
|
+
'Responds to commands and natural language',
|
|
91
|
+
],
|
|
92
|
+
topics: [
|
|
93
|
+
'Channel information',
|
|
94
|
+
'User assistance',
|
|
95
|
+
'Content sharing',
|
|
96
|
+
'Group moderation',
|
|
97
|
+
'FAQ responses',
|
|
98
|
+
],
|
|
99
|
+
adjectives: ['Helpful', 'Responsive', 'Friendly', 'Informative', 'Reliable'],
|
|
100
|
+
plugins: [
|
|
101
|
+
'@elizaos/plugin-sql',
|
|
102
|
+
'@elizaos/plugin-openai',
|
|
103
|
+
'@elizaos/plugin-bootstrap',
|
|
104
|
+
'@elizaos/plugin-telegram',
|
|
105
|
+
],
|
|
106
|
+
style: {
|
|
107
|
+
all: [
|
|
108
|
+
'Be concise and clear',
|
|
109
|
+
'Use Telegram-friendly formatting',
|
|
110
|
+
'Respond promptly to user queries',
|
|
111
|
+
],
|
|
112
|
+
chat: [
|
|
113
|
+
'Handle commands efficiently',
|
|
114
|
+
'Include relevant emoji when appropriate',
|
|
115
|
+
'Maintain conversation context',
|
|
116
|
+
],
|
|
117
|
+
post: [
|
|
118
|
+
'Structure longer messages clearly',
|
|
119
|
+
'Use formatting for better readability',
|
|
120
|
+
'Include relevant links when helpful',
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
settings: {
|
|
124
|
+
clients: ['telegram'],
|
|
125
|
+
allowDirectMessages: true,
|
|
126
|
+
shouldOnlyJoinInAllowedGroups: false,
|
|
127
|
+
messageTrackingLimit: 100,
|
|
128
|
+
secrets: {},
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: 'slack-bot',
|
|
134
|
+
label: 'Slack Bot',
|
|
135
|
+
description: 'Interactive bot for Slack workspaces',
|
|
136
|
+
template: {
|
|
137
|
+
name: 'Slack Assistant',
|
|
138
|
+
username: 'slackbot',
|
|
139
|
+
system:
|
|
140
|
+
"You are a specialized assistant for Slack workspaces. You help teams by answering questions, providing information, and facilitating collaboration. You can respond to direct messages and channel mentions, maintaining a helpful and professional tone that aligns with the organization's culture. Keep responses concise and relevant to the conversation context.",
|
|
141
|
+
bio: [
|
|
142
|
+
'Specialized Slack workspace assistant',
|
|
143
|
+
'Facilitates team collaboration',
|
|
144
|
+
'Provides timely responses to queries',
|
|
145
|
+
],
|
|
146
|
+
topics: [
|
|
147
|
+
'Workspace information',
|
|
148
|
+
'Team collaboration',
|
|
149
|
+
'Company policies',
|
|
150
|
+
'Resource access',
|
|
151
|
+
'Task management',
|
|
152
|
+
],
|
|
153
|
+
adjectives: ['Responsive', 'Helpful', 'Organized', 'Team-oriented', 'Professional'],
|
|
154
|
+
plugins: [
|
|
155
|
+
'@elizaos/plugin-sql',
|
|
156
|
+
'@elizaos/plugin-openai',
|
|
157
|
+
'@elizaos/plugin-bootstrap',
|
|
158
|
+
'@elizaos/plugin-slack',
|
|
159
|
+
],
|
|
160
|
+
style: {
|
|
161
|
+
all: [
|
|
162
|
+
'Be concise and clear',
|
|
163
|
+
'Match the tone of the workspace',
|
|
164
|
+
'Use Slack-appropriate formatting',
|
|
165
|
+
],
|
|
166
|
+
chat: [
|
|
167
|
+
'Reference relevant messages when appropriate',
|
|
168
|
+
'Use thread replies for detailed responses',
|
|
169
|
+
'Include emojis when fitting the workspace culture',
|
|
170
|
+
],
|
|
171
|
+
post: [
|
|
172
|
+
'Structure information with clear sections',
|
|
173
|
+
'Use bullet points for lists',
|
|
174
|
+
'Include relevant links when helpful',
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
settings: {
|
|
178
|
+
secrets: {},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: 'twitter-agent',
|
|
184
|
+
label: 'Twitter/X Agent',
|
|
185
|
+
description: 'Manages Twitter presence and engagement',
|
|
186
|
+
template: {
|
|
187
|
+
name: 'Twitter Agent',
|
|
188
|
+
username: 'twitteragent',
|
|
189
|
+
system:
|
|
190
|
+
'You are a Twitter engagement specialist designed to help create and manage effective Twitter content. You assist with drafting tweets, responding to mentions, analyzing engagement metrics, and suggesting content strategies. Your tone should match the brand voice while maintaining authenticity and encouraging audience interaction. Keep tweets concise and impactful within character limits.',
|
|
191
|
+
bio: [
|
|
192
|
+
'Twitter engagement specialist',
|
|
193
|
+
'Creates compelling social content',
|
|
194
|
+
'Manages audience interactions',
|
|
195
|
+
],
|
|
196
|
+
topics: [
|
|
197
|
+
'Tweet creation',
|
|
198
|
+
'Audience engagement',
|
|
199
|
+
'Content strategy',
|
|
200
|
+
'Trend analysis',
|
|
201
|
+
'Brand voice',
|
|
202
|
+
],
|
|
203
|
+
adjectives: ['Engaging', 'Concise', 'Strategic', 'Conversational', 'Creative'],
|
|
204
|
+
plugins: [
|
|
205
|
+
'@elizaos/plugin-sql',
|
|
206
|
+
'@elizaos/plugin-openai',
|
|
207
|
+
'@elizaos/plugin-bootstrap',
|
|
208
|
+
'@elizaos/plugin-twitter',
|
|
209
|
+
],
|
|
210
|
+
style: {
|
|
211
|
+
all: [
|
|
212
|
+
'Be concise and impactful',
|
|
213
|
+
'Stay within character limits',
|
|
214
|
+
'Use platform-appropriate formatting',
|
|
215
|
+
],
|
|
216
|
+
chat: [
|
|
217
|
+
'Match brand voice in replies',
|
|
218
|
+
'Be conversational and authentic',
|
|
219
|
+
'Use hashtags strategically',
|
|
220
|
+
],
|
|
221
|
+
post: [
|
|
222
|
+
'Draft varied content types',
|
|
223
|
+
'Suggest engaging visuals or polls',
|
|
224
|
+
'Include call-to-actions when appropriate',
|
|
225
|
+
],
|
|
226
|
+
},
|
|
227
|
+
settings: {
|
|
228
|
+
TWITTER_DRY_RUN: false,
|
|
229
|
+
MAX_TWEET_LENGTH: 280,
|
|
230
|
+
TWITTER_ENABLE_POST_GENERATION: true,
|
|
231
|
+
TWITTER_POST_INTERVAL_MIN: 90,
|
|
232
|
+
TWITTER_POST_INTERVAL_MAX: 180,
|
|
233
|
+
secrets: {},
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: 'github-bot',
|
|
239
|
+
label: 'GitHub Repository Assistant',
|
|
240
|
+
description: 'Helps manage GitHub repositories and development workflows',
|
|
241
|
+
template: {
|
|
242
|
+
name: 'GitHub Assistant',
|
|
243
|
+
username: 'githubasst',
|
|
244
|
+
system:
|
|
245
|
+
'You are a GitHub repository assistant designed to help development teams manage their workflow and codebase. You can assist with pull request reviews, issue triage, documentation updates, and providing information about repository structure and conventions. Maintain a technical but approachable tone, and prioritize accuracy in all technical information.',
|
|
246
|
+
bio: [
|
|
247
|
+
'GitHub repository management specialist',
|
|
248
|
+
'Assists with development workflows',
|
|
249
|
+
'Provides code and documentation support',
|
|
250
|
+
],
|
|
251
|
+
topics: [
|
|
252
|
+
'Pull requests',
|
|
253
|
+
'Issue tracking',
|
|
254
|
+
'Repository structure',
|
|
255
|
+
'Code reviews',
|
|
256
|
+
'Development workflows',
|
|
257
|
+
],
|
|
258
|
+
adjectives: ['Technical', 'Precise', 'Helpful', 'Organized', 'Knowledgeable'],
|
|
259
|
+
plugins: [
|
|
260
|
+
'@elizaos/plugin-sql',
|
|
261
|
+
'@elizaos/plugin-openai',
|
|
262
|
+
'@elizaos/plugin-bootstrap',
|
|
263
|
+
'@elizaos/plugin-github',
|
|
264
|
+
],
|
|
265
|
+
style: {
|
|
266
|
+
all: [
|
|
267
|
+
'Use technically precise language',
|
|
268
|
+
'Reference GitHub concepts appropriately',
|
|
269
|
+
'Link to relevant documentation when helpful',
|
|
270
|
+
],
|
|
271
|
+
chat: [
|
|
272
|
+
'Be concise in comments',
|
|
273
|
+
'Format code snippets properly',
|
|
274
|
+
'Summarize technical points clearly',
|
|
275
|
+
],
|
|
276
|
+
post: [
|
|
277
|
+
'Structure longer responses with clear headings',
|
|
278
|
+
'Use code blocks with syntax highlighting',
|
|
279
|
+
'Link to specific lines of code when relevant',
|
|
280
|
+
],
|
|
281
|
+
},
|
|
282
|
+
settings: {
|
|
283
|
+
secrets: {},
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
id: 'instagram-agent',
|
|
289
|
+
label: 'Instagram Content Manager',
|
|
290
|
+
description: 'Creates and manages content for Instagram',
|
|
291
|
+
template: {
|
|
292
|
+
name: 'Instagram Manager',
|
|
293
|
+
username: 'instagrammgr',
|
|
294
|
+
system:
|
|
295
|
+
"You are an Instagram content specialist designed to help create and manage engaging Instagram presence. You assist with content creation, caption writing, hashtag strategy, engagement tactics, and understanding analytics. Your approach emphasizes visual storytelling, authenticity, and building connections with followers. Maintain a voice that matches the brand identity while adapting to Instagram's evolving features and trends.",
|
|
296
|
+
bio: [
|
|
297
|
+
'Instagram content creation specialist',
|
|
298
|
+
'Develops engaging visual storytelling',
|
|
299
|
+
'Optimizes profile engagement',
|
|
300
|
+
],
|
|
301
|
+
topics: [
|
|
302
|
+
'Content creation',
|
|
303
|
+
'Caption writing',
|
|
304
|
+
'Hashtag strategy',
|
|
305
|
+
'Engagement tactics',
|
|
306
|
+
'Visual aesthetics',
|
|
307
|
+
],
|
|
308
|
+
adjectives: ['Creative', 'Visual', 'Engaging', 'Trend-aware', 'Authentic'],
|
|
309
|
+
plugins: [
|
|
310
|
+
'@elizaos/plugin-sql',
|
|
311
|
+
'@elizaos/plugin-openai',
|
|
312
|
+
'@elizaos/plugin-bootstrap',
|
|
313
|
+
'@elizaos/plugin-instagram',
|
|
314
|
+
],
|
|
315
|
+
style: {
|
|
316
|
+
all: [
|
|
317
|
+
'Balance visual description with compelling text',
|
|
318
|
+
'Maintain brand voice consistency',
|
|
319
|
+
'Consider current platform trends',
|
|
320
|
+
],
|
|
321
|
+
chat: [
|
|
322
|
+
'Provide actionable content suggestions',
|
|
323
|
+
'Reference visual elements clearly',
|
|
324
|
+
'Include relevant hashtag recommendations',
|
|
325
|
+
],
|
|
326
|
+
post: [
|
|
327
|
+
'Craft captions that enhance visual content',
|
|
328
|
+
'Suggest content series and themes',
|
|
329
|
+
'Balance promotional with authentic content',
|
|
330
|
+
],
|
|
331
|
+
},
|
|
332
|
+
settings: {
|
|
333
|
+
POST_INTERVAL_MIN: 90,
|
|
334
|
+
POST_INTERVAL_MAX: 180,
|
|
335
|
+
ENABLE_ACTION_PROCESSING: true,
|
|
336
|
+
ACTION_INTERVAL: 5,
|
|
337
|
+
MAX_ACTIONS_PROCESSING: 1,
|
|
338
|
+
secrets: {},
|
|
339
|
+
},
|
|
340
|
+
},
|
|
341
|
+
},
|
|
342
|
+
];
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Get a template by its ID
|
|
346
|
+
*/
|
|
347
|
+
export function getTemplateById(id: string): AgentTemplate | undefined {
|
|
348
|
+
return agentTemplates.find((template) => template.id === id);
|
|
349
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
export interface VoiceModel {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
provider: 'elevenlabs' | 'openai' | 'none';
|
|
5
|
+
gender?: 'male' | 'female';
|
|
6
|
+
language?: string;
|
|
7
|
+
features?: string[];
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// TODO: ELI2-218 Refactor this to use plugin categories when available
|
|
11
|
+
// This hardcoded mapping will be replaced with a more flexible approach
|
|
12
|
+
// that leverages plugin category metadata once implemented
|
|
13
|
+
|
|
14
|
+
export const providerPluginMap: Record<string, string> = {
|
|
15
|
+
elevenlabs: '@elizaos/plugin-elevenlabs',
|
|
16
|
+
openai: '@elizaos/plugin-openai',
|
|
17
|
+
none: '', // No plugin needed for "No Voice" option
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// No voice option for agents that don't need speech capabilities
|
|
21
|
+
export const noVoiceModel: VoiceModel[] = [{ value: 'none', label: 'No Voice', provider: 'none' }];
|
|
22
|
+
|
|
23
|
+
export const localVoiceModels: VoiceModel[] = [];
|
|
24
|
+
|
|
25
|
+
export const elevenLabsVoiceModels: VoiceModel[] = [
|
|
26
|
+
{
|
|
27
|
+
value: 'EXAVITQu4vr4xnSDxMaL',
|
|
28
|
+
label: 'ElevenLabs - Rachel (Default)',
|
|
29
|
+
provider: 'elevenlabs',
|
|
30
|
+
gender: 'female',
|
|
31
|
+
language: 'en',
|
|
32
|
+
features: ['natural', 'professional'],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
value: '21m00Tcm4TlvDq8ikWAM',
|
|
36
|
+
label: 'ElevenLabs - Adam',
|
|
37
|
+
provider: 'elevenlabs',
|
|
38
|
+
gender: 'male',
|
|
39
|
+
language: 'en',
|
|
40
|
+
features: ['natural', 'professional'],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
value: 'AZnzlk1XvdvUeBnXmlld',
|
|
44
|
+
label: 'ElevenLabs - Domi',
|
|
45
|
+
provider: 'elevenlabs',
|
|
46
|
+
gender: 'female',
|
|
47
|
+
language: 'en',
|
|
48
|
+
features: ['natural', 'friendly'],
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: 'MF3mGyEYCl7XYWbV9V6O',
|
|
52
|
+
label: 'ElevenLabs - Elli',
|
|
53
|
+
provider: 'elevenlabs',
|
|
54
|
+
gender: 'female',
|
|
55
|
+
language: 'en',
|
|
56
|
+
features: ['natural', 'friendly'],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
value: 'TxGEqnHWrfWFTfGW9XjX',
|
|
60
|
+
label: 'ElevenLabs - Josh',
|
|
61
|
+
provider: 'elevenlabs',
|
|
62
|
+
gender: 'male',
|
|
63
|
+
language: 'en',
|
|
64
|
+
features: ['natural', 'professional'],
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
export const openAIVoiceModels: VoiceModel[] = [
|
|
69
|
+
{
|
|
70
|
+
value: 'alloy',
|
|
71
|
+
label: 'OpenAI - Alloy',
|
|
72
|
+
provider: 'openai',
|
|
73
|
+
gender: 'female',
|
|
74
|
+
language: 'en',
|
|
75
|
+
features: ['natural', 'versatile'],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: 'echo',
|
|
79
|
+
label: 'OpenAI - Echo',
|
|
80
|
+
provider: 'openai',
|
|
81
|
+
gender: 'male',
|
|
82
|
+
language: 'en',
|
|
83
|
+
features: ['natural', 'professional'],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
value: 'fable',
|
|
87
|
+
label: 'OpenAI - Fable',
|
|
88
|
+
provider: 'openai',
|
|
89
|
+
gender: 'male',
|
|
90
|
+
language: 'en',
|
|
91
|
+
features: ['natural', 'narrative'],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
value: 'onyx',
|
|
95
|
+
label: 'OpenAI - Onyx',
|
|
96
|
+
provider: 'openai',
|
|
97
|
+
gender: 'male',
|
|
98
|
+
language: 'en',
|
|
99
|
+
features: ['natural', 'deep'],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
value: 'nova',
|
|
103
|
+
label: 'OpenAI - Nova',
|
|
104
|
+
provider: 'openai',
|
|
105
|
+
gender: 'female',
|
|
106
|
+
language: 'en',
|
|
107
|
+
features: ['natural', 'friendly'],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: 'shimmer',
|
|
111
|
+
label: 'OpenAI - Shimmer',
|
|
112
|
+
provider: 'openai',
|
|
113
|
+
gender: 'female',
|
|
114
|
+
language: 'en',
|
|
115
|
+
features: ['natural', 'bright'],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
value: 'ash',
|
|
119
|
+
label: 'OpenAI - Ash',
|
|
120
|
+
provider: 'openai',
|
|
121
|
+
gender: 'male',
|
|
122
|
+
language: 'en',
|
|
123
|
+
features: ['natural', 'calm'],
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
value: 'coral',
|
|
127
|
+
label: 'OpenAI - Coral',
|
|
128
|
+
provider: 'openai',
|
|
129
|
+
gender: 'female',
|
|
130
|
+
language: 'en',
|
|
131
|
+
features: ['natural', 'warm'],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
value: 'sage',
|
|
135
|
+
label: 'OpenAI - Sage',
|
|
136
|
+
provider: 'openai',
|
|
137
|
+
gender: 'female',
|
|
138
|
+
language: 'en',
|
|
139
|
+
features: ['natural', 'wise'],
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
value: 'ballad',
|
|
143
|
+
label: 'OpenAI - Ballad',
|
|
144
|
+
provider: 'openai',
|
|
145
|
+
gender: 'male',
|
|
146
|
+
language: 'en',
|
|
147
|
+
features: ['natural', 'melodic'],
|
|
148
|
+
},
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
export const getAllVoiceModels = (): VoiceModel[] => {
|
|
152
|
+
return [...noVoiceModel, ...localVoiceModels, ...elevenLabsVoiceModels, ...openAIVoiceModels];
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export const getVoiceModelsByProvider = (
|
|
156
|
+
provider: 'elevenlabs' | 'openai' | 'none'
|
|
157
|
+
): VoiceModel[] => {
|
|
158
|
+
switch (provider) {
|
|
159
|
+
case 'elevenlabs':
|
|
160
|
+
return elevenLabsVoiceModels;
|
|
161
|
+
case 'openai':
|
|
162
|
+
return openAIVoiceModels;
|
|
163
|
+
case 'none':
|
|
164
|
+
return noVoiceModel;
|
|
165
|
+
default:
|
|
166
|
+
return [];
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export const getVoiceModelByValue = (value: string): VoiceModel | undefined => {
|
|
171
|
+
return getAllVoiceModels().find((model) => model.value === value);
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export const getRequiredPluginForProvider = (provider: string): string | undefined => {
|
|
175
|
+
return providerPluginMap[provider];
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export const getAllRequiredPlugins = (): string[] => {
|
|
179
|
+
// Filter out empty strings (for "none" provider)
|
|
180
|
+
return Object.values(providerPluginMap).filter(Boolean);
|
|
181
|
+
};
|
package/src/constants.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const USER_NAME = 'user';
|
|
2
|
+
export const CHAT_SOURCE = 'client_chat';
|
|
3
|
+
export const GROUP_CHAT_SOURCE = 'client_group_chat';
|
|
4
|
+
|
|
5
|
+
export const AVATAR_IMAGE_MAX_SIZE = 512;
|
|
6
|
+
|
|
7
|
+
export enum FIELD_REQUIREMENT_TYPE {
|
|
8
|
+
REQUIRED = 'required',
|
|
9
|
+
OPTIONAL = 'optional',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const FIELD_REQUIREMENTS = {
|
|
13
|
+
name: FIELD_REQUIREMENT_TYPE.REQUIRED,
|
|
14
|
+
username: FIELD_REQUIREMENT_TYPE.OPTIONAL,
|
|
15
|
+
system: FIELD_REQUIREMENT_TYPE.REQUIRED,
|
|
16
|
+
'settings.voice.model': FIELD_REQUIREMENT_TYPE.OPTIONAL,
|
|
17
|
+
bio: FIELD_REQUIREMENT_TYPE.OPTIONAL,
|
|
18
|
+
topics: FIELD_REQUIREMENT_TYPE.OPTIONAL,
|
|
19
|
+
adjectives: FIELD_REQUIREMENT_TYPE.OPTIONAL,
|
|
20
|
+
'style.all': FIELD_REQUIREMENT_TYPE.OPTIONAL,
|
|
21
|
+
'style.chat': FIELD_REQUIREMENT_TYPE.OPTIONAL,
|
|
22
|
+
'style.post': FIELD_REQUIREMENT_TYPE.OPTIONAL,
|
|
23
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { createContext, useState, useContext, ReactNode, useCallback } from 'react';
|
|
2
|
+
import { useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { ApiKeyDialog } from '@/components/api-key-dialog';
|
|
4
|
+
import clientLogger from '@/lib/logger';
|
|
5
|
+
|
|
6
|
+
interface AuthContextType {
|
|
7
|
+
openApiKeyDialog: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const AuthContext = createContext<AuthContextType | undefined>(undefined);
|
|
11
|
+
|
|
12
|
+
export const AuthProvider = ({ children }: { children: ReactNode }) => {
|
|
13
|
+
const queryClient = useQueryClient();
|
|
14
|
+
const [isApiKeyDialogOpen, setIsApiKeyDialogOpen] = useState(false);
|
|
15
|
+
|
|
16
|
+
const openApiKeyDialog = useCallback(() => {
|
|
17
|
+
setIsApiKeyDialogOpen(true);
|
|
18
|
+
}, []);
|
|
19
|
+
|
|
20
|
+
const handleApiKeySaved = useCallback(() => {
|
|
21
|
+
setIsApiKeyDialogOpen(false);
|
|
22
|
+
clientLogger.info('API key saved via dialog, invalidating ping query.');
|
|
23
|
+
queryClient.invalidateQueries({ queryKey: ['ping'] });
|
|
24
|
+
}, [queryClient]);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<AuthContext.Provider value={{ openApiKeyDialog }}>
|
|
28
|
+
{children}
|
|
29
|
+
<ApiKeyDialog
|
|
30
|
+
open={isApiKeyDialogOpen}
|
|
31
|
+
onOpenChange={setIsApiKeyDialogOpen}
|
|
32
|
+
onApiKeySaved={handleApiKeySaved}
|
|
33
|
+
/>
|
|
34
|
+
</AuthContext.Provider>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export const useAuth = () => {
|
|
39
|
+
const context = useContext(AuthContext);
|
|
40
|
+
if (context === undefined) {
|
|
41
|
+
throw new Error('useAuth must be used within an AuthProvider');
|
|
42
|
+
}
|
|
43
|
+
return context;
|
|
44
|
+
};
|