neoagent 1.0.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/.env.example +28 -0
- package/LICENSE +21 -0
- package/README.md +42 -0
- package/bin/neoagent.js +8 -0
- package/com.neoagent.plist +45 -0
- package/docs/configuration.md +45 -0
- package/docs/skills.md +45 -0
- package/lib/manager.js +459 -0
- package/package.json +61 -0
- package/server/db/database.js +239 -0
- package/server/index.js +442 -0
- package/server/middleware/auth.js +35 -0
- package/server/public/app.html +559 -0
- package/server/public/css/app.css +608 -0
- package/server/public/css/styles.css +472 -0
- package/server/public/favicon.svg +17 -0
- package/server/public/js/app.js +3283 -0
- package/server/public/login.html +313 -0
- package/server/routes/agents.js +125 -0
- package/server/routes/auth.js +105 -0
- package/server/routes/browser.js +116 -0
- package/server/routes/mcp.js +164 -0
- package/server/routes/memory.js +193 -0
- package/server/routes/messaging.js +153 -0
- package/server/routes/protocols.js +87 -0
- package/server/routes/scheduler.js +63 -0
- package/server/routes/settings.js +98 -0
- package/server/routes/skills.js +107 -0
- package/server/routes/store.js +1192 -0
- package/server/services/ai/compaction.js +82 -0
- package/server/services/ai/engine.js +1690 -0
- package/server/services/ai/models.js +46 -0
- package/server/services/ai/multiStep.js +112 -0
- package/server/services/ai/providers/anthropic.js +181 -0
- package/server/services/ai/providers/base.js +40 -0
- package/server/services/ai/providers/google.js +187 -0
- package/server/services/ai/providers/grok.js +121 -0
- package/server/services/ai/providers/ollama.js +162 -0
- package/server/services/ai/providers/openai.js +167 -0
- package/server/services/ai/toolRunner.js +218 -0
- package/server/services/browser/controller.js +320 -0
- package/server/services/cli/executor.js +204 -0
- package/server/services/mcp/client.js +260 -0
- package/server/services/memory/embeddings.js +126 -0
- package/server/services/memory/manager.js +431 -0
- package/server/services/messaging/base.js +23 -0
- package/server/services/messaging/discord.js +238 -0
- package/server/services/messaging/manager.js +328 -0
- package/server/services/messaging/telegram.js +243 -0
- package/server/services/messaging/telnyx.js +693 -0
- package/server/services/messaging/whatsapp.js +304 -0
- package/server/services/scheduler/cron.js +312 -0
- package/server/services/websocket.js +191 -0
- package/server/utils/security.js +71 -0
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<title>NeoAgent</title>
|
|
8
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg">
|
|
9
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
11
|
+
<link rel="stylesheet" href="/css/styles.css">
|
|
12
|
+
<link rel="stylesheet" href="/css/app.css">
|
|
13
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
|
|
14
|
+
</head>
|
|
15
|
+
|
|
16
|
+
<body>
|
|
17
|
+
<div id="app">
|
|
18
|
+
<!-- Sidebar -->
|
|
19
|
+
<aside class="sidebar" id="sidebar">
|
|
20
|
+
<div class="sidebar-header">
|
|
21
|
+
<div class="sidebar-logo">
|
|
22
|
+
<div class="logo-icon-sm">
|
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-linecap="round"
|
|
24
|
+
stroke-linejoin="round">
|
|
25
|
+
<polygon points="12,2 2,7 12,12 22,7" fill="white" stroke="none" />
|
|
26
|
+
<polyline points="2,17 12,22 22,17" fill="none" stroke="white" stroke-width="2" />
|
|
27
|
+
<polyline points="2,12 12,17 22,12" fill="none" stroke="white" stroke-width="2" />
|
|
28
|
+
</svg>
|
|
29
|
+
</div>
|
|
30
|
+
<span class="logo-text">NeoAgent</span>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- main nav -->
|
|
35
|
+
<nav class="sidebar-nav">
|
|
36
|
+
<button class="sidebar-btn active" data-page="chat">
|
|
37
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
38
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
39
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
|
|
40
|
+
</svg>
|
|
41
|
+
Chat
|
|
42
|
+
</button>
|
|
43
|
+
<button class="sidebar-btn" data-page="activity" id="activityNavBtn">
|
|
44
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
45
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
46
|
+
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12" />
|
|
47
|
+
</svg>
|
|
48
|
+
Activity
|
|
49
|
+
<span class="activity-badge hidden" id="activityBadge"></span>
|
|
50
|
+
</button>
|
|
51
|
+
<div class="sidebar-divider"></div>
|
|
52
|
+
<button class="sidebar-btn" data-page="messaging">
|
|
53
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
54
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
55
|
+
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
|
|
56
|
+
</svg>
|
|
57
|
+
Messaging
|
|
58
|
+
</button>
|
|
59
|
+
<button class="sidebar-btn" data-page="mcp">
|
|
60
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
61
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
62
|
+
<rect x="2" y="2" width="20" height="8" rx="2" ry="2" />
|
|
63
|
+
<rect x="2" y="14" width="20" height="8" rx="2" ry="2" />
|
|
64
|
+
<line x1="6" y1="6" x2="6.01" y2="6" />
|
|
65
|
+
<line x1="6" y1="18" x2="6.01" y2="18" />
|
|
66
|
+
</svg>
|
|
67
|
+
MCP Servers
|
|
68
|
+
</button>
|
|
69
|
+
<button class="sidebar-btn" data-page="scheduler">
|
|
70
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
71
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
72
|
+
<circle cx="12" cy="12" r="10" />
|
|
73
|
+
<polyline points="12 6 12 12 16 14" />
|
|
74
|
+
</svg>
|
|
75
|
+
Scheduler
|
|
76
|
+
</button>
|
|
77
|
+
<button class="sidebar-btn" data-page="memory">
|
|
78
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
79
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
80
|
+
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" />
|
|
81
|
+
<path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" />
|
|
82
|
+
</svg>
|
|
83
|
+
Memory
|
|
84
|
+
</button>
|
|
85
|
+
<button class="sidebar-btn" data-page="skills">
|
|
86
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
87
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
88
|
+
<polygon
|
|
89
|
+
points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />
|
|
90
|
+
</svg>
|
|
91
|
+
Skills
|
|
92
|
+
</button>
|
|
93
|
+
<button class="sidebar-btn" data-page="protocols">
|
|
94
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
95
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
96
|
+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
|
|
97
|
+
<polyline points="14 2 14 8 20 8" />
|
|
98
|
+
<line x1="16" y1="13" x2="8" y2="13" />
|
|
99
|
+
<line x1="16" y1="17" x2="8" y2="17" />
|
|
100
|
+
<polyline points="10 9 9 9 8 9" />
|
|
101
|
+
</svg>
|
|
102
|
+
Protocols
|
|
103
|
+
</button>
|
|
104
|
+
<button class="sidebar-btn" data-page="logs">
|
|
105
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
106
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
107
|
+
<polyline points="4 17 10 11 4 5" />
|
|
108
|
+
<line x1="12" y1="19" x2="20" y2="19" />
|
|
109
|
+
</svg>
|
|
110
|
+
Logs
|
|
111
|
+
</button>
|
|
112
|
+
</nav>
|
|
113
|
+
|
|
114
|
+
<!-- bottom actions -->
|
|
115
|
+
<div class="sidebar-footer">
|
|
116
|
+
<button class="sidebar-btn" id="settingsBtn">
|
|
117
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
118
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
119
|
+
<circle cx="12" cy="12" r="3" />
|
|
120
|
+
<path
|
|
121
|
+
d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z" />
|
|
122
|
+
</svg>
|
|
123
|
+
Settings
|
|
124
|
+
</button>
|
|
125
|
+
<button class="sidebar-btn" id="logoutBtn">
|
|
126
|
+
<svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
127
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
128
|
+
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
|
|
129
|
+
<polyline points="16 17 21 12 16 7" />
|
|
130
|
+
<line x1="21" y1="12" x2="9" y2="12" />
|
|
131
|
+
</svg>
|
|
132
|
+
Logout
|
|
133
|
+
</button>
|
|
134
|
+
</div>
|
|
135
|
+
</aside>
|
|
136
|
+
|
|
137
|
+
<!-- Main Content -->
|
|
138
|
+
<main class="main-content">
|
|
139
|
+
<!-- Chat Page (default) -->
|
|
140
|
+
<div class="page active" id="page-chat">
|
|
141
|
+
<div class="chat-container">
|
|
142
|
+
<div class="chat-messages" id="chatMessages">
|
|
143
|
+
<div class="empty-state" id="chatEmpty" style="height:100%;">
|
|
144
|
+
<div
|
|
145
|
+
style="width:52px;height:52px;background:linear-gradient(135deg,var(--accent),#8b5cf6);border-radius:16px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 24px rgba(99,102,241,.4);margin-bottom:4px;">
|
|
146
|
+
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2"
|
|
147
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
148
|
+
<path d="M12 2L2 7l10 5 10-5-10-5z" />
|
|
149
|
+
<path d="M2 17l10 5 10-5" />
|
|
150
|
+
<path d="M2 12l10 5 10-5" />
|
|
151
|
+
</svg>
|
|
152
|
+
</div>
|
|
153
|
+
<p style="font-size:17px;font-weight:600;color:var(--text-primary);">How can I help?</p>
|
|
154
|
+
<span style="font-size:13px;color:var(--text-muted);max-width:320px;text-align:center;">Commands, web
|
|
155
|
+
browsing, messaging, memory — just ask.</span>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="chat-input-area">
|
|
159
|
+
<div class="chat-input-wrapper">
|
|
160
|
+
<textarea id="chatInput" class="chat-input" placeholder="say something..." rows="1"></textarea>
|
|
161
|
+
<button id="chatSendBtn" class="btn btn-primary chat-send-btn" title="Send">
|
|
162
|
+
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
163
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
164
|
+
<line x1="22" y1="2" x2="11" y2="13" />
|
|
165
|
+
<polygon points="22 2 15 22 11 13 2 9 22 2" />
|
|
166
|
+
</svg>
|
|
167
|
+
</button>
|
|
168
|
+
</div>
|
|
169
|
+
<div class="chat-input-info">
|
|
170
|
+
<span class="text-xs text-muted">Press Enter to send, Shift+Enter for new line</span>
|
|
171
|
+
<span class="text-xs text-muted" id="modelIndicator">Smart Selector Active</span>
|
|
172
|
+
</div>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<!-- Activity Page -->
|
|
178
|
+
<div class="page" id="page-activity">
|
|
179
|
+
<div class="activity-container">
|
|
180
|
+
<!-- Left Sidebar: Run History -->
|
|
181
|
+
<div class="activity-sidebar" id="activitySidebar">
|
|
182
|
+
<div class="activity-sidebar-header">
|
|
183
|
+
<h2>Run History</h2>
|
|
184
|
+
<button class="btn-ghost" id="activityRefreshBtn" title="Refresh">
|
|
185
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
|
186
|
+
stroke-linecap="round" stroke-linejoin="round">
|
|
187
|
+
<path d="M21 2v6h-6"></path>
|
|
188
|
+
<path d="M3 12a9 9 0 1 0 2.81-6.73L3 8"></path>
|
|
189
|
+
<path d="M3 22v-6h6"></path>
|
|
190
|
+
<path d="M21 12a9 9 0 1 0-2.81 6.73L21 16"></path>
|
|
191
|
+
</svg>
|
|
192
|
+
</button>
|
|
193
|
+
</div>
|
|
194
|
+
<div class="activity-sidebar-list" id="activitySidebarList">
|
|
195
|
+
<div class="activity-empty-text">Loading runs...</div>
|
|
196
|
+
</div>
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
<!-- Right Main Area: Timeline -->
|
|
200
|
+
<div class="activity-main" id="activityMain">
|
|
201
|
+
<div class="activity-main-header">
|
|
202
|
+
<h2 id="activityRunTitle">Select a run</h2>
|
|
203
|
+
<div class="activity-main-actions">
|
|
204
|
+
<span class="atl-run-timer" id="atlTimer" style="display:none;">0s</span>
|
|
205
|
+
<span class="atl-run-badge" id="atlRunStatus" style="display:none;"></span>
|
|
206
|
+
</div>
|
|
207
|
+
</div>
|
|
208
|
+
<div class="atl-viewport" id="activityFeedWrap">
|
|
209
|
+
<div class="atl-feed" id="activityFeed">
|
|
210
|
+
<div class="atl-empty" id="activityEmpty">
|
|
211
|
+
<svg width="36" height="36" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
212
|
+
<polyline points="22 12 18 12 15 21 9 3 6 12 2 12" />
|
|
213
|
+
</svg>
|
|
214
|
+
<p>No run selected</p>
|
|
215
|
+
<span>Pick a past run or start a new task in chat.</span>
|
|
216
|
+
</div>
|
|
217
|
+
</div>
|
|
218
|
+
</div>
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<!-- Messaging Page -->
|
|
224
|
+
<div class="page" id="page-messaging">
|
|
225
|
+
<div class="page-header">
|
|
226
|
+
<h1>Messaging</h1>
|
|
227
|
+
</div>
|
|
228
|
+
<div class="page-body">
|
|
229
|
+
<div id="messagingQR" class="hidden" style="text-align:center;padding:40px;">
|
|
230
|
+
<p class="mb-4">Scan QR code with WhatsApp</p>
|
|
231
|
+
<div id="qrContainer"></div>
|
|
232
|
+
<button class="btn btn-secondary mt-4" id="cancelQR">Cancel</button>
|
|
233
|
+
</div>
|
|
234
|
+
<div id="platformList"></div>
|
|
235
|
+
<!-- Whitelist section rendered by JS -->
|
|
236
|
+
<div id="whitelistSection" class="mt-4"></div>
|
|
237
|
+
</div>
|
|
238
|
+
</div>
|
|
239
|
+
|
|
240
|
+
<!-- MCP Servers Page -->
|
|
241
|
+
<div class="page" id="page-mcp">
|
|
242
|
+
<div class="page-header">
|
|
243
|
+
<h1>MCP Servers</h1>
|
|
244
|
+
<button class="btn btn-primary" id="addMcpBtn">Add Server</button>
|
|
245
|
+
</div>
|
|
246
|
+
<div class="page-body">
|
|
247
|
+
<div id="mcpServerList"></div>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
|
|
251
|
+
<!-- Scheduler Page -->
|
|
252
|
+
<div class="page" id="page-scheduler">
|
|
253
|
+
<div class="page-header">
|
|
254
|
+
<h1>Scheduler</h1>
|
|
255
|
+
<button class="btn btn-primary" id="addTaskBtn">Add Task</button>
|
|
256
|
+
</div>
|
|
257
|
+
<div class="page-body">
|
|
258
|
+
<div id="taskList"></div>
|
|
259
|
+
</div>
|
|
260
|
+
</div>
|
|
261
|
+
|
|
262
|
+
<!-- Memory Page -->
|
|
263
|
+
<div class="page" id="page-memory">
|
|
264
|
+
<div class="page-header">
|
|
265
|
+
<h1>Memory</h1>
|
|
266
|
+
<button class="btn btn-primary" id="addMemoryBtn">+ Add Memory</button>
|
|
267
|
+
</div>
|
|
268
|
+
<div class="page-body">
|
|
269
|
+
<div class="tabs">
|
|
270
|
+
<div class="tab active" data-mem-tab="memories">Memories</div>
|
|
271
|
+
<div class="tab" data-mem-tab="core">Core</div>
|
|
272
|
+
<div class="tab" data-mem-tab="soul">Soul</div>
|
|
273
|
+
<div class="tab" data-mem-tab="daily">Daily Logs</div>
|
|
274
|
+
<div class="tab" data-mem-tab="apikeys">API Keys</div>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<!-- Memories tab -->
|
|
278
|
+
<div class="mem-panel active" id="mem-memories">
|
|
279
|
+
<div style="display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap;">
|
|
280
|
+
<input type="text" id="memorySearchInput" class="input" style="flex:1;min-width:200px;"
|
|
281
|
+
placeholder="Semantic search memories…" />
|
|
282
|
+
<button class="btn btn-sm btn-secondary" id="memorySearchBtn">Search</button>
|
|
283
|
+
</div>
|
|
284
|
+
<div id="memoryCategoryFilter" style="display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap;">
|
|
285
|
+
<button class="btn btn-sm btn-primary" data-cat="">All</button>
|
|
286
|
+
<button class="btn btn-sm btn-secondary" data-cat="user_fact">User Facts</button>
|
|
287
|
+
<button class="btn btn-sm btn-secondary" data-cat="preference">Preferences</button>
|
|
288
|
+
<button class="btn btn-sm btn-secondary" data-cat="personality">Personality</button>
|
|
289
|
+
<button class="btn btn-sm btn-secondary" data-cat="episodic">Episodic</button>
|
|
290
|
+
</div>
|
|
291
|
+
<div id="memoryList"
|
|
292
|
+
style="display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;"></div>
|
|
293
|
+
</div>
|
|
294
|
+
|
|
295
|
+
<!-- Core memory tab -->
|
|
296
|
+
<div class="mem-panel" id="mem-core">
|
|
297
|
+
<div style="margin-bottom:14px;">
|
|
298
|
+
<p class="text-muted" style="font-size:0.85rem;margin-bottom:14px;">Core memory is injected into
|
|
299
|
+
<strong>every prompt</strong> — keep entries concise. Ideal for: user's name, standing preferences, how
|
|
300
|
+
the agent should behave.
|
|
301
|
+
</p>
|
|
302
|
+
<div id="coreMemoryList"></div>
|
|
303
|
+
<div style="display:flex;gap:8px;margin-top:12px;">
|
|
304
|
+
<select id="coreKeySelect" class="input" style="flex:0 0 auto;width:180px;">
|
|
305
|
+
<option value="user_profile">user_profile</option>
|
|
306
|
+
<option value="preferences">preferences</option>
|
|
307
|
+
<option value="ai_personality">ai_personality</option>
|
|
308
|
+
<option value="active_context">active_context</option>
|
|
309
|
+
</select>
|
|
310
|
+
<input type="text" id="coreValueInput" class="input" style="flex:1;" placeholder="Value…" />
|
|
311
|
+
<button class="btn btn-primary btn-sm" id="setCoreBtn">Set</button>
|
|
312
|
+
</div>
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
315
|
+
|
|
316
|
+
<!-- Soul tab -->
|
|
317
|
+
<div class="mem-panel" id="mem-soul">
|
|
318
|
+
<div class="flex justify-between items-center mb-4">
|
|
319
|
+
<span class="text-muted" style="font-size:0.85rem;">Agent personality & identity — the agent can
|
|
320
|
+
rewrite this anytime using <code>memory_write</code> with target <code>soul</code>.</span>
|
|
321
|
+
<button class="btn btn-sm btn-secondary" id="saveSoulBtn">Save</button>
|
|
322
|
+
</div>
|
|
323
|
+
<textarea id="soulEditor" class="textarea font-mono" rows="20"
|
|
324
|
+
placeholder="No soul definition yet..."></textarea>
|
|
325
|
+
</div>
|
|
326
|
+
|
|
327
|
+
<!-- Daily Logs tab -->
|
|
328
|
+
<div class="mem-panel" id="mem-daily">
|
|
329
|
+
<div id="dailyLogs"></div>
|
|
330
|
+
</div>
|
|
331
|
+
|
|
332
|
+
<!-- API Keys tab -->
|
|
333
|
+
<div class="mem-panel" id="mem-apikeys">
|
|
334
|
+
<div class="flex justify-between items-center mb-4">
|
|
335
|
+
<span class="text-muted">Agent-managed API keys</span>
|
|
336
|
+
<button class="btn btn-sm btn-primary" id="addApiKeyBtn">Add Key</button>
|
|
337
|
+
</div>
|
|
338
|
+
<div id="apiKeyList"></div>
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
|
|
343
|
+
<!-- Add Memory Modal -->
|
|
344
|
+
<div class="modal-overlay hidden" id="addMemoryModal">
|
|
345
|
+
<div class="modal" style="max-width:500px;">
|
|
346
|
+
<div class="modal-header">
|
|
347
|
+
<h2>Add Memory</h2>
|
|
348
|
+
<button class="btn-ghost" id="closeAddMemory">×</button>
|
|
349
|
+
</div>
|
|
350
|
+
<div class="modal-body">
|
|
351
|
+
<div class="form-group">
|
|
352
|
+
<label class="form-label">Content</label>
|
|
353
|
+
<textarea id="newMemoryContent" class="textarea" rows="4"
|
|
354
|
+
placeholder="Write a clear, self-contained statement about what to remember…"></textarea>
|
|
355
|
+
</div>
|
|
356
|
+
<div class="form-group" style="display:flex;gap:12px;">
|
|
357
|
+
<div style="flex:1;">
|
|
358
|
+
<label class="form-label">Category</label>
|
|
359
|
+
<select id="newMemoryCategory" class="input" style="width:100%;">
|
|
360
|
+
<option value="episodic">Episodic</option>
|
|
361
|
+
<option value="user_fact">User Fact</option>
|
|
362
|
+
<option value="preference">Preference</option>
|
|
363
|
+
<option value="personality">Personality</option>
|
|
364
|
+
</select>
|
|
365
|
+
</div>
|
|
366
|
+
<div style="flex:1;">
|
|
367
|
+
<label class="form-label">Importance (1–10)</label>
|
|
368
|
+
<input type="number" id="newMemoryImportance" class="input" min="1" max="10" value="5"
|
|
369
|
+
style="width:100%;" />
|
|
370
|
+
</div>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
<div class="modal-footer">
|
|
374
|
+
<button class="btn btn-secondary" id="cancelAddMemory">Cancel</button>
|
|
375
|
+
<button class="btn btn-primary" id="confirmAddMemory">Save Memory</button>
|
|
376
|
+
</div>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
<!-- Protocols Page -->
|
|
381
|
+
<div class="page" id="page-protocols">
|
|
382
|
+
<div class="page-header">
|
|
383
|
+
<h1>Protocols</h1>
|
|
384
|
+
<button class="btn btn-primary" id="addProtocolBtn">Add Protocol</button>
|
|
385
|
+
</div>
|
|
386
|
+
<div class="page-body">
|
|
387
|
+
<div class="protocols-list empty-state" id="protocolsList">
|
|
388
|
+
Loading protocols...
|
|
389
|
+
</div>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
|
|
393
|
+
<!-- MCP Server Modal -->
|
|
394
|
+
<div class="modal-overlay hidden" id="mcpModal">
|
|
395
|
+
<div class="modal" style="max-width:580px;">
|
|
396
|
+
<div class="modal-header">
|
|
397
|
+
<h2 id="mcpModalTitle">Add MCP Server</h2>
|
|
398
|
+
<button class="btn-ghost" id="closeMcpModal">×</button>
|
|
399
|
+
</div>
|
|
400
|
+
<div class="modal-body">
|
|
401
|
+
<div class="form-group">
|
|
402
|
+
<label class="form-label">Name</label>
|
|
403
|
+
<input type="text" id="mcpName" class="input" placeholder="e.g., Local Weather Server">
|
|
404
|
+
</div>
|
|
405
|
+
<div class="form-group">
|
|
406
|
+
<label class="form-label">SSE URL</label>
|
|
407
|
+
<input type="text" id="mcpUrl" class="input" placeholder="http://localhost:8000/sse">
|
|
408
|
+
</div>
|
|
409
|
+
<div class="form-group">
|
|
410
|
+
<label class="form-label">Authentication Method</label>
|
|
411
|
+
<select id="mcpAuthType" class="input">
|
|
412
|
+
<option value="none">None</option>
|
|
413
|
+
<option value="bearer">Bearer Token (Static)</option>
|
|
414
|
+
<option value="oauth">Interactive OAuth</option>
|
|
415
|
+
</select>
|
|
416
|
+
</div>
|
|
417
|
+
<div id="mcpAuthBearerGroup" class="form-group hidden">
|
|
418
|
+
<label class="form-label">Bearer Token</label>
|
|
419
|
+
<input type="password" id="mcpAuthToken" class="input" placeholder="Token value (saved securely)">
|
|
420
|
+
</div>
|
|
421
|
+
<div id="mcpAuthOauthGroup" class="form-group hidden">
|
|
422
|
+
<label class="form-label">OAuth Client ID</label>
|
|
423
|
+
<input type="text" id="mcpAuthClientId" class="input" placeholder="client_id if required">
|
|
424
|
+
|
|
425
|
+
<label class="form-label mt-3">Auth Server URL (Optional)</label>
|
|
426
|
+
<input type="text" id="mcpAuthServerUrl" class="input" placeholder="Leave empty for auto-discovery">
|
|
427
|
+
</div>
|
|
428
|
+
</div>
|
|
429
|
+
<div class="modal-footer">
|
|
430
|
+
<button class="btn-ghost" id="cancelMcpModal">Cancel</button>
|
|
431
|
+
<button class="btn-primary" id="saveMcpBtn">Save Server</button>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
</div>
|
|
435
|
+
|
|
436
|
+
<!-- Protocol Modal -->
|
|
437
|
+
<div class="modal-overlay hidden" id="protocolModal">
|
|
438
|
+
<div class="modal" style="max-width:580px;">
|
|
439
|
+
<div class="modal-header">
|
|
440
|
+
<h2 id="protocolModalTitle">Add Protocol</h2>
|
|
441
|
+
<button class="btn-ghost" id="closeProtocolModal">×</button>
|
|
442
|
+
</div>
|
|
443
|
+
<div class="modal-body">
|
|
444
|
+
<div class="form-group">
|
|
445
|
+
<label class="form-label">Name</label>
|
|
446
|
+
<input type="text" id="protocolName" class="input" placeholder="e.g., Code Review Protocol">
|
|
447
|
+
</div>
|
|
448
|
+
<div class="form-group">
|
|
449
|
+
<label class="form-label">Description (Optional)</label>
|
|
450
|
+
<input type="text" id="protocolDesc" class="input" placeholder="What does this protocol do?">
|
|
451
|
+
</div>
|
|
452
|
+
<div class="form-group">
|
|
453
|
+
<label class="form-label">Content / Instructions</label>
|
|
454
|
+
<textarea id="protocolContent" class="textarea" rows="12"
|
|
455
|
+
placeholder="Write the detailed step-by-step instructions here..."></textarea>
|
|
456
|
+
</div>
|
|
457
|
+
</div>
|
|
458
|
+
<div class="modal-footer">
|
|
459
|
+
<button class="btn-ghost" id="cancelProtocolModal">Cancel</button>
|
|
460
|
+
<button class="btn-primary" id="saveProtocolBtn">Save Protocol</button>
|
|
461
|
+
</div>
|
|
462
|
+
</div>
|
|
463
|
+
</div>
|
|
464
|
+
|
|
465
|
+
<!-- Skills Page -->
|
|
466
|
+
<div class="page" id="page-skills">
|
|
467
|
+
<div class="page-header">
|
|
468
|
+
<h1>Skills</h1>
|
|
469
|
+
<button class="btn btn-primary" id="addSkillBtn">Add Skill</button>
|
|
470
|
+
</div>
|
|
471
|
+
<div class="page-body">
|
|
472
|
+
<div class="tabs mb-4">
|
|
473
|
+
<div class="tab active" data-skills-tab="installed">Installed</div>
|
|
474
|
+
<div class="tab" data-skills-tab="store">Store</div>
|
|
475
|
+
</div>
|
|
476
|
+
<div id="skillList" class="skills-panel"></div>
|
|
477
|
+
<div id="skillStore" class="skills-panel hidden"></div>
|
|
478
|
+
</div>
|
|
479
|
+
</div>
|
|
480
|
+
|
|
481
|
+
<!-- Logs Page -->
|
|
482
|
+
<div class="page" id="page-logs">
|
|
483
|
+
<div class="page-header" style="justify-content: space-between;">
|
|
484
|
+
<h1>Server Logs</h1>
|
|
485
|
+
<div>
|
|
486
|
+
<button class="btn btn-primary btn-sm" id="copyLogsBtn" style="margin-right: 8px;">Copy Debug Info</button>
|
|
487
|
+
<button class="btn btn-secondary btn-sm" id="clearLogsBtn">Clear</button>
|
|
488
|
+
</div>
|
|
489
|
+
</div>
|
|
490
|
+
<div class="page-body" style="height: calc(100% - 70px); padding: 0;">
|
|
491
|
+
<div id="logsContainer" class="logs-container"
|
|
492
|
+
style="background: #0f172a; height: 100%; overflow-y: auto; padding: 12px; font-family: monospace; font-size: 13px; color: #e2e8f0; border-radius: 8px;">
|
|
493
|
+
<!-- Logs will be appended here -->
|
|
494
|
+
</div>
|
|
495
|
+
</div>
|
|
496
|
+
</div>
|
|
497
|
+
</main>
|
|
498
|
+
</div>
|
|
499
|
+
|
|
500
|
+
<!-- Settings Modal -->
|
|
501
|
+
<div class="modal-overlay hidden" id="settingsModal">
|
|
502
|
+
<div class="modal" style="max-width:550px;">
|
|
503
|
+
<div class="modal-header">
|
|
504
|
+
<h2>Settings</h2>
|
|
505
|
+
<button class="btn-ghost" id="closeSettings">×</button>
|
|
506
|
+
</div>
|
|
507
|
+
<div class="modal-body">
|
|
508
|
+
<div class="form-group">
|
|
509
|
+
<label class="form-label">Heartbeat</label>
|
|
510
|
+
<label class="flex items-center gap-2" style="cursor:pointer;">
|
|
511
|
+
<input type="checkbox" id="settingHeartbeat">
|
|
512
|
+
<span>Enable scheduled heartbeat checks</span>
|
|
513
|
+
</label>
|
|
514
|
+
</div>
|
|
515
|
+
<div class="form-group">
|
|
516
|
+
<label class="form-label">Browser</label>
|
|
517
|
+
<label class="flex items-center gap-2" style="cursor:pointer;">
|
|
518
|
+
<input type="checkbox" id="settingHeadlessBrowser">
|
|
519
|
+
<span>Run browser headless (no visible window)</span>
|
|
520
|
+
</label>
|
|
521
|
+
</div>
|
|
522
|
+
<div class="form-group">
|
|
523
|
+
<label class="form-label">Default Chat Model</label>
|
|
524
|
+
<select id="settingDefaultChatModel" class="input">
|
|
525
|
+
<option value="auto">Smart Selector (Auto)</option>
|
|
526
|
+
</select>
|
|
527
|
+
</div>
|
|
528
|
+
<div class="form-group">
|
|
529
|
+
<label class="form-label">Default Sub-agent Model</label>
|
|
530
|
+
<select id="settingDefaultSubagentModel" class="input">
|
|
531
|
+
<option value="auto">Smart Selector (Auto)</option>
|
|
532
|
+
</select>
|
|
533
|
+
</div>
|
|
534
|
+
<div class="form-group">
|
|
535
|
+
<label class="form-label">Smart Selector Allowed Models</label>
|
|
536
|
+
<div id="modelCheckboxesContainer" style="display:flex; flex-direction:column; gap:8px;">
|
|
537
|
+
<!-- Rendered dynamically by app.js -->
|
|
538
|
+
</div>
|
|
539
|
+
</div>
|
|
540
|
+
</div>
|
|
541
|
+
<div class="modal-footer" style="justify-content: space-between;">
|
|
542
|
+
<button class="btn btn-primary" id="updateAppBtn" style="background-color: var(--color-warning);">Update
|
|
543
|
+
App</button>
|
|
544
|
+
<div style="display: flex; gap: 8px;">
|
|
545
|
+
<button class="btn btn-secondary" id="cancelSettings">Cancel</button>
|
|
546
|
+
<button class="btn btn-primary" id="saveSettings">Save</button>
|
|
547
|
+
</div>
|
|
548
|
+
</div>
|
|
549
|
+
</div>
|
|
550
|
+
</div>
|
|
551
|
+
|
|
552
|
+
<!-- Toast Container -->
|
|
553
|
+
<div class="toast-container" id="toasts"></div>
|
|
554
|
+
|
|
555
|
+
<script src="/socket.io/socket.io.js"></script>
|
|
556
|
+
<script src="/js/app.js"></script>
|
|
557
|
+
</body>
|
|
558
|
+
|
|
559
|
+
</html>
|