neoagent 1.5.4 → 2.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.
Files changed (62) hide show
  1. package/README.md +18 -4
  2. package/docs/configuration.md +2 -2
  3. package/docs/skills.md +1 -1
  4. package/lib/manager.js +64 -2
  5. package/package.json +9 -2
  6. package/server/config/origins.js +34 -0
  7. package/server/db/database.js +0 -13
  8. package/server/http/errors.js +17 -0
  9. package/server/http/middleware.js +81 -0
  10. package/server/http/routes.js +45 -0
  11. package/server/http/socket.js +23 -0
  12. package/server/http/static.js +50 -0
  13. package/server/index.js +50 -188
  14. package/server/public/.last_build_id +1 -0
  15. package/server/public/assets/AssetManifest.bin +1 -0
  16. package/server/public/assets/AssetManifest.bin.json +1 -0
  17. package/server/public/assets/AssetManifest.json +1 -0
  18. package/server/public/assets/FontManifest.json +1 -0
  19. package/server/public/assets/NOTICES +33454 -0
  20. package/server/public/assets/fonts/MaterialIcons-Regular.otf +0 -0
  21. package/server/public/assets/packages/cupertino_icons/assets/CupertinoIcons.ttf +0 -0
  22. package/server/public/assets/shaders/ink_sparkle.frag +126 -0
  23. package/server/public/assets/web/icons/Icon-192.png +0 -0
  24. package/server/public/canvaskit/canvaskit.js +192 -0
  25. package/server/public/canvaskit/canvaskit.js.symbols +12142 -0
  26. package/server/public/canvaskit/canvaskit.wasm +0 -0
  27. package/server/public/canvaskit/chromium/canvaskit.js +192 -0
  28. package/server/public/canvaskit/chromium/canvaskit.js.symbols +11106 -0
  29. package/server/public/canvaskit/chromium/canvaskit.wasm +0 -0
  30. package/server/public/canvaskit/skwasm.js +140 -0
  31. package/server/public/canvaskit/skwasm.js.symbols +12164 -0
  32. package/server/public/canvaskit/skwasm.wasm +0 -0
  33. package/server/public/canvaskit/skwasm_heavy.js +140 -0
  34. package/server/public/canvaskit/skwasm_heavy.js.symbols +13766 -0
  35. package/server/public/canvaskit/skwasm_heavy.wasm +0 -0
  36. package/server/public/favicon.png +0 -0
  37. package/server/public/flutter.js +32 -0
  38. package/server/public/flutter_bootstrap.js +43 -0
  39. package/server/public/flutter_service_worker.js +208 -0
  40. package/server/public/icons/Icon-192.png +0 -0
  41. package/server/public/icons/Icon-512.png +0 -0
  42. package/server/public/icons/Icon-maskable-192.png +0 -0
  43. package/server/public/icons/Icon-maskable-512.png +0 -0
  44. package/server/public/index.html +38 -0
  45. package/server/public/main.dart.js +103124 -0
  46. package/server/public/manifest.json +35 -0
  47. package/server/public/version.json +1 -0
  48. package/server/services/ai/models.js +2 -8
  49. package/server/services/ai/tools.js +0 -47
  50. package/server/services/browser/controller.js +34 -0
  51. package/server/services/manager.js +49 -118
  52. package/server/services/messaging/automation.js +210 -0
  53. package/server/utils/version.js +37 -0
  54. package/server/public/app.html +0 -682
  55. package/server/public/assets/world-office-dark.png +0 -0
  56. package/server/public/assets/world-office-light.png +0 -0
  57. package/server/public/css/app.css +0 -941
  58. package/server/public/css/styles.css +0 -963
  59. package/server/public/favicon.svg +0 -17
  60. package/server/public/js/app.js +0 -4105
  61. package/server/public/login.html +0 -313
  62. package/server/routes/protocols.js +0 -87
@@ -1,682 +0,0 @@
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="world" id="worldNavBtn">
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
- <path d="M12 2v4" />
47
- <path d="M12 18v4" />
48
- <path d="M4.93 4.93l2.83 2.83" />
49
- <path d="M16.24 16.24l2.83 2.83" />
50
- <path d="M2 12h4" />
51
- <path d="M18 12h4" />
52
- <path d="M4.93 19.07l2.83-2.83" />
53
- <path d="M16.24 7.76l2.83-2.83" />
54
- <circle cx="12" cy="12" r="4" />
55
- </svg>
56
- World
57
- <span class="world-badge hidden" id="worldBadge"></span>
58
- </button>
59
- <div class="sidebar-divider"></div>
60
- <button class="sidebar-btn" data-page="messaging">
61
- <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
62
- stroke-linecap="round" stroke-linejoin="round">
63
- <path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" />
64
- </svg>
65
- Messaging
66
- </button>
67
- <button class="sidebar-btn" data-page="mcp">
68
- <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
69
- stroke-linecap="round" stroke-linejoin="round">
70
- <rect x="2" y="2" width="20" height="8" rx="2" ry="2" />
71
- <rect x="2" y="14" width="20" height="8" rx="2" ry="2" />
72
- <line x1="6" y1="6" x2="6.01" y2="6" />
73
- <line x1="6" y1="18" x2="6.01" y2="18" />
74
- </svg>
75
- MCP Servers
76
- </button>
77
- <button class="sidebar-btn" data-page="scheduler">
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
- <circle cx="12" cy="12" r="10" />
81
- <polyline points="12 6 12 12 16 14" />
82
- </svg>
83
- Scheduler
84
- </button>
85
- <button class="sidebar-btn" data-page="memory">
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
- <path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z" />
89
- <path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z" />
90
- </svg>
91
- Memory
92
- </button>
93
- <button class="sidebar-btn" data-page="skills">
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
- <polygon
97
- 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" />
98
- </svg>
99
- Skills
100
- </button>
101
- <button class="sidebar-btn" data-page="protocols">
102
- <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
103
- stroke-linecap="round" stroke-linejoin="round">
104
- <path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" />
105
- <polyline points="14 2 14 8 20 8" />
106
- <line x1="16" y1="13" x2="8" y2="13" />
107
- <line x1="16" y1="17" x2="8" y2="17" />
108
- <polyline points="10 9 9 9 8 9" />
109
- </svg>
110
- Protocols
111
- </button>
112
- <button class="sidebar-btn" data-page="logs">
113
- <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
114
- stroke-linecap="round" stroke-linejoin="round">
115
- <polyline points="4 17 10 11 4 5" />
116
- <line x1="12" y1="19" x2="20" y2="19" />
117
- </svg>
118
- Logs
119
- </button>
120
- </nav>
121
-
122
- <!-- bottom actions -->
123
- <div class="sidebar-footer">
124
- <button class="sidebar-btn" id="settingsBtn">
125
- <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
126
- stroke-linecap="round" stroke-linejoin="round">
127
- <circle cx="12" cy="12" r="3" />
128
- <path
129
- 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" />
130
- </svg>
131
- Settings
132
- </button>
133
- <button class="sidebar-btn" id="logoutBtn">
134
- <svg width="17" height="17" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
135
- stroke-linecap="round" stroke-linejoin="round">
136
- <path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
137
- <polyline points="16 17 21 12 16 7" />
138
- <line x1="21" y1="12" x2="9" y2="12" />
139
- </svg>
140
- Logout
141
- </button>
142
- </div>
143
- </aside>
144
-
145
- <!-- Main Content -->
146
- <main class="main-content">
147
- <!-- Chat Page (default) -->
148
- <div class="page active" id="page-chat">
149
- <div class="chat-container">
150
- <div class="chat-messages" id="chatMessages">
151
- <div class="empty-state" id="chatEmpty" style="height:100%;">
152
- <div
153
- 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;">
154
- <svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2"
155
- stroke-linecap="round" stroke-linejoin="round">
156
- <path d="M12 2L2 7l10 5 10-5-10-5z" />
157
- <path d="M2 17l10 5 10-5" />
158
- <path d="M2 12l10 5 10-5" />
159
- </svg>
160
- </div>
161
- <p style="font-size:17px;font-weight:600;color:var(--text-primary);">How can I help?</p>
162
- <span style="font-size:13px;color:var(--text-muted);max-width:320px;text-align:center;">Commands, web
163
- browsing, messaging, memory — just ask.</span>
164
- </div>
165
- </div>
166
- <div class="chat-input-area">
167
- <div class="chat-input-wrapper">
168
- <textarea id="chatInput" class="chat-input" placeholder="say something..." rows="1"></textarea>
169
- <button id="chatSendBtn" class="btn btn-primary chat-send-btn" title="Send">
170
- <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
171
- stroke-linecap="round" stroke-linejoin="round">
172
- <line x1="22" y1="2" x2="11" y2="13" />
173
- <polygon points="22 2 15 22 11 13 2 9 22 2" />
174
- </svg>
175
- </button>
176
- </div>
177
- <div class="chat-input-info">
178
- <span class="text-xs text-muted">Press Enter to send, Shift+Enter for new line</span>
179
- <span class="text-xs text-muted" id="modelIndicator">Smart Selector Active</span>
180
- </div>
181
- </div>
182
- </div>
183
- </div>
184
-
185
- <!-- World Page -->
186
- <div class="page" id="page-world">
187
- <div class="world-page">
188
- <div class="world-layout">
189
- <section class="world-stage-card">
190
- <div class="world-stage-frame">
191
- <canvas id="worldCanvas" class="world-canvas" aria-label="NeoAgent world visualization"></canvas>
192
- <div class="world-stage-overlay">
193
- <div class="world-overlay-group">
194
- <span class="world-pill" id="worldModePill">Idle</span>
195
- <span class="world-pill subtle" id="worldToolPill">Awaiting signal</span>
196
- </div>
197
- <div class="world-overlay-chip">
198
- <span class="world-overlay-label">Task</span>
199
- <span class="world-overlay-value" id="worldTaskValue">No active run</span>
200
- </div>
201
- <div class="world-overlay-chip">
202
- <span class="world-overlay-label">Status</span>
203
- <span class="world-overlay-value" id="worldStatusValue">Ambient systems nominal</span>
204
- </div>
205
- </div>
206
- </div>
207
- </section>
208
-
209
- <aside class="world-hud">
210
- <div class="world-panel">
211
- <div class="world-panel-header">
212
- <h2>Live Signals</h2>
213
- <span class="world-panel-kicker">Realtime</span>
214
- </div>
215
- <div class="world-stats-grid">
216
- <div class="world-stat">
217
- <span class="world-stat-label">Mode</span>
218
- <strong class="world-stat-value" id="worldModeValue">Idle</strong>
219
- </div>
220
- <div class="world-stat">
221
- <span class="world-stat-label">Run</span>
222
- <strong class="world-stat-value" id="worldRunValue">None</strong>
223
- </div>
224
- <div class="world-stat">
225
- <span class="world-stat-label">Tools</span>
226
- <strong class="world-stat-value" id="worldToolsValue">0</strong>
227
- </div>
228
- <div class="world-stat">
229
- <span class="world-stat-label">Helpers</span>
230
- <strong class="world-stat-value" id="worldHelpersValue">0</strong>
231
- </div>
232
- <div class="world-stat">
233
- <span class="world-stat-label">Messages</span>
234
- <strong class="world-stat-value" id="worldMessagesValue">0</strong>
235
- </div>
236
- </div>
237
- </div>
238
-
239
- <div class="world-panel">
240
- <div class="world-panel-header">
241
- <h2>Crew</h2>
242
- <span class="world-panel-kicker">Lead + Helpers</span>
243
- </div>
244
- <div class="world-agent-list" id="worldAgentList">
245
- <div class="world-empty-state">NeoAgent will show up here as the lead, and helper agents appear when a sub-agent is spawned.</div>
246
- </div>
247
- </div>
248
-
249
- <div class="world-panel">
250
- <div class="world-panel-header">
251
- <h2>Event Feed</h2>
252
- <span class="world-panel-kicker">Latest 6</span>
253
- </div>
254
- <div class="world-event-list" id="worldEventList">
255
- <div class="world-empty-state">The world is idling. Start a task in chat to wake everything up.</div>
256
- </div>
257
- </div>
258
-
259
- <div class="world-panel">
260
- <div class="world-panel-header">
261
- <h2>Structures</h2>
262
- <span class="world-panel-kicker">Role Map</span>
263
- </div>
264
- <div class="world-legend">
265
- <div class="world-legend-item"><span class="swatch core"></span> Core tower</div>
266
- <div class="world-legend-item"><span class="swatch browser"></span> Browser dock</div>
267
- <div class="world-legend-item"><span class="swatch memory"></span> Memory archive</div>
268
- <div class="world-legend-item"><span class="swatch cli"></span> Command forge</div>
269
- <div class="world-legend-item"><span class="swatch social"></span> Message port</div>
270
- </div>
271
- </div>
272
- </aside>
273
- </div>
274
- </div>
275
- </div>
276
-
277
- <!-- Messaging Page -->
278
- <div class="page" id="page-messaging">
279
- <div class="page-header">
280
- <h1>Messaging</h1>
281
- </div>
282
- <div class="page-body">
283
- <div id="messagingQR" class="hidden" style="text-align:center;padding:40px;">
284
- <p class="mb-4">Scan QR code with WhatsApp</p>
285
- <div id="qrContainer"></div>
286
- <button class="btn btn-secondary mt-4" id="cancelQR">Cancel</button>
287
- </div>
288
- <div id="platformList"></div>
289
- <!-- Whitelist section rendered by JS -->
290
- <div id="whitelistSection" class="mt-4"></div>
291
- </div>
292
- </div>
293
-
294
- <!-- MCP Servers Page -->
295
- <div class="page" id="page-mcp">
296
- <div class="page-header">
297
- <h1>MCP Servers</h1>
298
- <button class="btn btn-primary" id="addMcpBtn">Add Server</button>
299
- </div>
300
- <div class="page-body">
301
- <div id="mcpServerList"></div>
302
- </div>
303
- </div>
304
-
305
- <!-- Scheduler Page -->
306
- <div class="page" id="page-scheduler">
307
- <div class="page-header">
308
- <h1>Scheduler</h1>
309
- <button class="btn btn-primary" id="addTaskBtn">Add Task</button>
310
- </div>
311
- <div class="page-body">
312
- <div id="taskList"></div>
313
- </div>
314
- </div>
315
-
316
- <!-- Memory Page -->
317
- <div class="page" id="page-memory">
318
- <div class="page-header">
319
- <h1>Memory</h1>
320
- <button class="btn btn-primary" id="addMemoryBtn">+ Add Memory</button>
321
- </div>
322
- <div class="page-body">
323
- <div class="tabs">
324
- <div class="tab active" data-mem-tab="memories">Memories</div>
325
- <div class="tab" data-mem-tab="sessions">Session Recall</div>
326
- <div class="tab" data-mem-tab="core">Core</div>
327
- <div class="tab" data-mem-tab="soul">Soul</div>
328
- <div class="tab" data-mem-tab="daily">Daily Logs</div>
329
- <div class="tab" data-mem-tab="apikeys">API Keys</div>
330
- </div>
331
-
332
- <!-- Memories tab -->
333
- <div class="mem-panel active" id="mem-memories">
334
- <div style="display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap;">
335
- <input type="text" id="memorySearchInput" class="input" style="flex:1;min-width:200px;"
336
- placeholder="Semantic search memories…" />
337
- <button class="btn btn-sm btn-secondary" id="memorySearchBtn">Search</button>
338
- </div>
339
- <div id="memoryCategoryFilter" style="display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap;">
340
- <button class="btn btn-sm btn-primary" data-cat="">All</button>
341
- <button class="btn btn-sm btn-secondary" data-cat="user_fact">User Facts</button>
342
- <button class="btn btn-sm btn-secondary" data-cat="preference">Preferences</button>
343
- <button class="btn btn-sm btn-secondary" data-cat="personality">Personality</button>
344
- <button class="btn btn-sm btn-secondary" data-cat="episodic">Episodic</button>
345
- </div>
346
- <div id="memoryList"
347
- style="display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;"></div>
348
- </div>
349
-
350
- <div class="mem-panel" id="mem-sessions">
351
- <div style="display:flex;gap:10px;align-items:center;margin-bottom:14px;flex-wrap:wrap;">
352
- <input type="text" id="sessionSearchInput" class="input" style="flex:1;min-width:220px;"
353
- placeholder="Search old chats, commands, or decisions…" />
354
- <button class="btn btn-sm btn-secondary" id="sessionSearchBtn">Search</button>
355
- </div>
356
- <div id="sessionRecallList"></div>
357
- </div>
358
-
359
- <!-- Core memory tab -->
360
- <div class="mem-panel" id="mem-core">
361
- <div style="margin-bottom:14px;">
362
- <p class="text-muted" style="font-size:0.85rem;margin-bottom:14px;">Core memory is injected into
363
- <strong>every prompt</strong> — keep entries concise. Ideal for: user's name, standing preferences, how
364
- the agent should behave.
365
- </p>
366
- <div id="coreMemoryList"></div>
367
- <div style="display:flex;gap:8px;margin-top:12px;">
368
- <select id="coreKeySelect" class="input" style="flex:0 0 auto;width:180px;">
369
- <option value="user_profile">user_profile</option>
370
- <option value="preferences">preferences</option>
371
- <option value="ai_personality">ai_personality</option>
372
- <option value="active_context">active_context</option>
373
- </select>
374
- <input type="text" id="coreValueInput" class="input" style="flex:1;" placeholder="Value…" />
375
- <button class="btn btn-primary btn-sm" id="setCoreBtn">Set</button>
376
- </div>
377
- </div>
378
- </div>
379
-
380
- <!-- Soul tab -->
381
- <div class="mem-panel" id="mem-soul">
382
- <div class="flex justify-between items-center mb-4">
383
- <span class="text-muted" style="font-size:0.85rem;">Agent personality &amp; identity — the agent can
384
- rewrite this anytime using <code>memory_write</code> with target <code>soul</code>.</span>
385
- <button class="btn btn-sm btn-secondary" id="saveSoulBtn">Save</button>
386
- </div>
387
- <textarea id="soulEditor" class="textarea font-mono" rows="20"
388
- placeholder="No soul definition yet..."></textarea>
389
- </div>
390
-
391
- <!-- Daily Logs tab -->
392
- <div class="mem-panel" id="mem-daily">
393
- <div id="dailyLogs"></div>
394
- </div>
395
-
396
- <!-- API Keys tab -->
397
- <div class="mem-panel" id="mem-apikeys">
398
- <div class="flex justify-between items-center mb-4">
399
- <span class="text-muted">Agent-managed API keys</span>
400
- <button class="btn btn-sm btn-primary" id="addApiKeyBtn">Add Key</button>
401
- </div>
402
- <div id="apiKeyList"></div>
403
- </div>
404
- </div>
405
- </div>
406
-
407
- <!-- Add Memory Modal -->
408
- <div class="modal-overlay hidden" id="addMemoryModal">
409
- <div class="modal" style="max-width:500px;">
410
- <div class="modal-header">
411
- <h2>Add Memory</h2>
412
- <button class="btn-ghost" id="closeAddMemory">&times;</button>
413
- </div>
414
- <div class="modal-body">
415
- <div class="form-group">
416
- <label class="form-label">Content</label>
417
- <textarea id="newMemoryContent" class="textarea" rows="4"
418
- placeholder="Write a clear, self-contained statement about what to remember…"></textarea>
419
- </div>
420
- <div class="form-group" style="display:flex;gap:12px;">
421
- <div style="flex:1;">
422
- <label class="form-label">Category</label>
423
- <select id="newMemoryCategory" class="input" style="width:100%;">
424
- <option value="episodic">Episodic</option>
425
- <option value="user_fact">User Fact</option>
426
- <option value="preference">Preference</option>
427
- <option value="personality">Personality</option>
428
- </select>
429
- </div>
430
- <div style="flex:1;">
431
- <label class="form-label">Importance (1–10)</label>
432
- <input type="number" id="newMemoryImportance" class="input" min="1" max="10" value="5"
433
- style="width:100%;" />
434
- </div>
435
- </div>
436
- </div>
437
- <div class="modal-footer">
438
- <button class="btn btn-secondary" id="cancelAddMemory">Cancel</button>
439
- <button class="btn btn-primary" id="confirmAddMemory">Save Memory</button>
440
- </div>
441
- </div>
442
- </div>
443
-
444
- <!-- Protocols Page -->
445
- <div class="page" id="page-protocols">
446
- <div class="page-header">
447
- <h1>Protocols</h1>
448
- <button class="btn btn-primary" id="addProtocolBtn">Add Protocol</button>
449
- </div>
450
- <div class="page-body">
451
- <div class="protocols-list empty-state" id="protocolsList">
452
- Loading protocols...
453
- </div>
454
- </div>
455
- </div>
456
-
457
- <!-- MCP Server Modal -->
458
- <div class="modal-overlay hidden" id="mcpModal">
459
- <div class="modal" style="max-width:580px;">
460
- <div class="modal-header">
461
- <h2 id="mcpModalTitle">Add MCP Server</h2>
462
- <button class="btn-ghost" id="closeMcpModal">&times;</button>
463
- </div>
464
- <div class="modal-body">
465
- <div class="form-group">
466
- <label class="form-label">Name</label>
467
- <input type="text" id="mcpName" class="input" placeholder="e.g., Local Weather Server">
468
- </div>
469
- <div class="form-group">
470
- <label class="form-label">SSE URL</label>
471
- <input type="text" id="mcpUrl" class="input" placeholder="http://localhost:8000/sse">
472
- </div>
473
- <div class="form-group">
474
- <label class="form-label">Authentication Method</label>
475
- <select id="mcpAuthType" class="input">
476
- <option value="none">None</option>
477
- <option value="bearer">Bearer Token (Static)</option>
478
- <option value="oauth">Interactive OAuth</option>
479
- </select>
480
- </div>
481
- <div id="mcpAuthBearerGroup" class="form-group hidden">
482
- <label class="form-label">Bearer Token</label>
483
- <input type="password" id="mcpAuthToken" class="input" placeholder="Token value (saved securely)">
484
- </div>
485
- <div id="mcpAuthOauthGroup" class="form-group hidden">
486
- <label class="form-label">OAuth Client ID</label>
487
- <input type="text" id="mcpAuthClientId" class="input" placeholder="client_id if required">
488
-
489
- <label class="form-label mt-3">Auth Server URL (Optional)</label>
490
- <input type="text" id="mcpAuthServerUrl" class="input" placeholder="Leave empty for auto-discovery">
491
- </div>
492
- </div>
493
- <div class="modal-footer">
494
- <button class="btn-ghost" id="cancelMcpModal">Cancel</button>
495
- <button class="btn-primary" id="saveMcpBtn">Save Server</button>
496
- </div>
497
- </div>
498
- </div>
499
-
500
- <!-- Protocol Modal -->
501
- <div class="modal-overlay hidden" id="protocolModal">
502
- <div class="modal" style="max-width:580px;">
503
- <div class="modal-header">
504
- <h2 id="protocolModalTitle">Add Protocol</h2>
505
- <button class="btn-ghost" id="closeProtocolModal">&times;</button>
506
- </div>
507
- <div class="modal-body">
508
- <div class="form-group">
509
- <label class="form-label">Name</label>
510
- <input type="text" id="protocolName" class="input" placeholder="e.g., Code Review Protocol">
511
- </div>
512
- <div class="form-group">
513
- <label class="form-label">Description (Optional)</label>
514
- <input type="text" id="protocolDesc" class="input" placeholder="What does this protocol do?">
515
- </div>
516
- <div class="form-group">
517
- <label class="form-label">Content / Instructions</label>
518
- <textarea id="protocolContent" class="textarea" rows="12"
519
- placeholder="Write the detailed step-by-step instructions here..."></textarea>
520
- </div>
521
- </div>
522
- <div class="modal-footer">
523
- <button class="btn-ghost" id="cancelProtocolModal">Cancel</button>
524
- <button class="btn-primary" id="saveProtocolBtn">Save Protocol</button>
525
- </div>
526
- </div>
527
- </div>
528
-
529
- <!-- Skills Page -->
530
- <div class="page" id="page-skills">
531
- <div class="page-header">
532
- <h1>Skills</h1>
533
- <button class="btn btn-primary" id="addSkillBtn">Add Skill</button>
534
- </div>
535
- <div class="page-body">
536
- <div class="tabs mb-4">
537
- <div class="tab active" data-skills-tab="installed">Installed</div>
538
- <div class="tab" data-skills-tab="store">Store</div>
539
- </div>
540
- <div id="skillList" class="skills-panel"></div>
541
- <div id="skillStore" class="skills-panel hidden"></div>
542
- </div>
543
- </div>
544
-
545
- <!-- Logs Page -->
546
- <div class="page" id="page-logs">
547
- <div class="page-header" style="justify-content: space-between;">
548
- <h1>Server Logs</h1>
549
- <div>
550
- <button class="btn btn-primary btn-sm" id="copyLogsBtn" style="margin-right: 8px;">Copy Debug Info</button>
551
- <button class="btn btn-secondary btn-sm" id="clearLogsBtn">Clear</button>
552
- </div>
553
- </div>
554
- <div class="page-body" style="height: calc(100% - 70px); padding: 0;">
555
- <div id="logsContainer" class="logs-container"
556
- style="background: #0f172a; height: 100%; overflow-y: auto; padding: 12px; font-family: monospace; font-size: 13px; color: #e2e8f0; border-radius: 8px;">
557
- <!-- Logs will be appended here -->
558
- </div>
559
- </div>
560
- </div>
561
- </main>
562
- </div>
563
-
564
- <!-- Settings Modal -->
565
- <div class="modal-overlay hidden" id="settingsModal" data-bwignore="true">
566
- <div class="modal" style="max-width:550px;">
567
- <div class="modal-header">
568
- <div style="display:flex;align-items:center;gap:8px;">
569
- <h2>Settings</h2>
570
- <span class="badge badge-neutral" id="settingsAppVersion" style="font-size:11px;padding:2px 6px;"></span>
571
- </div>
572
- <button class="btn-ghost" id="closeSettings">&times;</button>
573
- </div>
574
- <div class="modal-body">
575
- <div class="form-group">
576
- <label class="form-label">Heartbeat</label>
577
- <label class="flex items-center gap-2" style="cursor:pointer;">
578
- <input type="checkbox" id="settingHeartbeat" autocomplete="off" data-bwignore="true">
579
- <span>Enable scheduled heartbeat checks</span>
580
- </label>
581
- </div>
582
- <div class="form-group">
583
- <label class="form-label">Browser</label>
584
- <label class="flex items-center gap-2" style="cursor:pointer;">
585
- <input type="checkbox" id="settingHeadlessBrowser" autocomplete="off" data-bwignore="true">
586
- <span>Run browser headless (no visible window)</span>
587
- </label>
588
- </div>
589
- <div class="form-group">
590
- <label class="form-label">Skill Learning</label>
591
- <label class="flex items-center gap-2" style="cursor:pointer;">
592
- <input type="checkbox" id="settingAutoSkillLearning" autocomplete="off" data-bwignore="true">
593
- <span>Create disabled draft skills from successful multi-step runs</span>
594
- </label>
595
- </div>
596
- <div class="form-group">
597
- <label class="form-label">Smart Selection</label>
598
- <label class="flex items-center gap-2" style="cursor:pointer;">
599
- <input type="checkbox" id="settingSmarterModelSelector" autocomplete="off" data-bwignore="true">
600
- <span>Automatically select best model based on task type (coding, planning, etc.)</span>
601
- </label>
602
- </div>
603
- <div class="form-group">
604
- <label class="form-label">Default Chat Model</label>
605
- <select id="settingDefaultChatModel" class="input" autocomplete="off" data-bwignore="true">
606
- <option value="auto">Smart Selector (Auto)</option>
607
- </select>
608
- </div>
609
- <div class="form-group">
610
- <label class="form-label">Default Sub-agent Model</label>
611
- <select id="settingDefaultSubagentModel" class="input" autocomplete="off" data-bwignore="true">
612
- <option value="auto">Smart Selector (Auto)</option>
613
- </select>
614
- </div>
615
- <div class="form-group">
616
- <label class="form-label">Fallback Model</label>
617
- <select id="settingFallbackModelId" class="input" autocomplete="off" data-bwignore="true">
618
- <option value="gpt-5-nano">GPT-5 Nano (Default Cloud Fallback)</option>
619
- </select>
620
- <small class="text-muted" style="font-size: 11px; display: block; margin-top: 4px;">Used if the primary model fails or is offline.</small>
621
- </div>
622
- <div class="form-group">
623
- <label class="form-label">Smart Selector Allowed Models</label>
624
- <div id="modelCheckboxesContainer" style="display:flex; flex-direction:column; gap:8px;">
625
- <!-- Rendered dynamically by app.js -->
626
- </div>
627
- </div>
628
- <div class="form-group">
629
- <label class="form-label settings-inline-label">
630
- <span>Token Usage</span>
631
- <span class="settings-info-wrap" tabindex="0" aria-label="Token usage info">
632
- <span class="settings-info-icon">i</span>
633
- <span class="settings-info-pop">Run-level totals from the DB. Used to track token usage trends in this
634
- app.</span>
635
- </span>
636
- </label>
637
- <div class="settings-token-box" id="tokenUsageSummary">Loading token usage…</div>
638
- </div>
639
- <div class="settings-update-panel" id="settingsUpdatePanel">
640
- <div class="settings-update-head">
641
- <div class="settings-update-title">App Update</div>
642
- <span class="badge badge-neutral" id="updateStateBadge">Idle</span>
643
- </div>
644
- <div class="settings-update-progress-wrap">
645
- <div class="settings-update-progress-bar" id="updateProgressBar"></div>
646
- </div>
647
- <div class="settings-update-row">
648
- <span id="updatePhaseLabel">No update running</span>
649
- <span id="updatePercentLabel">0%</span>
650
- </div>
651
- <div class="settings-update-meta" id="updateVersionMeta">Version: —</div>
652
- <div class="settings-update-section">
653
- <div class="settings-update-label">Changelog</div>
654
- <ul class="settings-update-changelog" id="updateChangelog">
655
- <li class="settings-update-empty">No changes yet</li>
656
- </ul>
657
- </div>
658
- <div class="settings-update-section">
659
- <div class="settings-update-label">Live Output</div>
660
- <pre class="settings-update-logs" id="updateLogs">Waiting for update job output…</pre>
661
- </div>
662
- </div>
663
- </div>
664
- <div class="modal-footer" style="justify-content: space-between;">
665
- <button class="btn btn-primary" id="updateAppBtn" style="background-color: var(--color-warning);">Update
666
- App</button>
667
- <div style="display: flex; gap: 8px;">
668
- <button class="btn btn-secondary" id="cancelSettings">Cancel</button>
669
- <button class="btn btn-primary" id="saveSettings">Save</button>
670
- </div>
671
- </div>
672
- </div>
673
- </div>
674
-
675
- <!-- Toast Container -->
676
- <div class="toast-container" id="toasts"></div>
677
-
678
- <script src="/socket.io/socket.io.js"></script>
679
- <script src="/js/app.js"></script>
680
- </body>
681
-
682
- </html>