neoagent 2.1.18-beta.99 → 2.2.1-beta.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 (34) hide show
  1. package/README.md +4 -3
  2. package/package.json +12 -5
  3. package/server/db/database.js +57 -0
  4. package/server/http/routes.js +1 -0
  5. package/server/public/assets/NOTICES +33 -0
  6. package/server/public/assets/fonts/MaterialIcons-Regular.otf +0 -0
  7. package/server/public/assets/web/icons/Icon-192.png +0 -0
  8. package/server/public/favicon.png +0 -0
  9. package/server/public/favicon.svg +6 -6
  10. package/server/public/flutter_bootstrap.js +1 -1
  11. package/server/public/icons/Icon-192.png +0 -0
  12. package/server/public/icons/Icon-512.png +0 -0
  13. package/server/public/icons/Icon-maskable-192.png +0 -0
  14. package/server/public/icons/Icon-maskable-512.png +0 -0
  15. package/server/public/main.dart.js +73704 -72703
  16. package/server/routes/account.js +36 -0
  17. package/server/routes/auth.js +91 -0
  18. package/server/routes/mcp.js +16 -3
  19. package/server/routes/scheduler.js +2 -1
  20. package/server/routes/widgets.js +101 -0
  21. package/server/services/account/qr_login.js +388 -0
  22. package/server/services/ai/engine.js +7 -2
  23. package/server/services/ai/toolResult.js +25 -0
  24. package/server/services/ai/tools.js +182 -0
  25. package/server/services/manager.js +31 -0
  26. package/server/services/scheduler/cron.js +100 -34
  27. package/server/services/scheduler/cron_utils.js +216 -0
  28. package/server/services/voice/bufferedLiveRelayAdapter.js +85 -17
  29. package/server/services/voice/liveSession.js +109 -9
  30. package/server/services/voice/providers.js +44 -18
  31. package/server/services/voice/runtimeManager.js +75 -25
  32. package/server/services/voice/turnRunner.js +53 -25
  33. package/server/services/websocket.js +26 -1
  34. package/server/services/widgets/service.js +550 -0
package/README.md CHANGED
@@ -11,9 +11,10 @@
11
11
 
12
12
  <p align="center">A self-hosted, proactive AI agent with a Flutter client for web and Android.</p>
13
13
 
14
- | | |
15
- | --- | --- |
16
- | <img alt="WebUI" src="https://github.com/user-attachments/assets/3c76d59a-b6e3-4698-929b-9c94741ccf1e" height="420"> | <img height="494" alt="Android" src="https://github.com/user-attachments/assets/e8a0af7a-6881-485d-ad52-f3bc6f2023ca"> | <img alt="Mobile Telegram" src="https://github.com/user-attachments/assets/1fd41a9b-5452-4aa4-9478-888c8ad7363a" height="420"> |
14
+ | | | | |
15
+ | --- | --- | --- | --- |
16
+ | <img alt="WebUI" src="https://github.com/user-attachments/assets/3c76d59a-b6e3-4698-929b-9c94741ccf1e" height="420"> | <img height="494" alt="Android" src="https://github.com/user-attachments/assets/e8a0af7a-6881-485d-ad52-f3bc6f2023ca"> | <img alt="Mobile Telegram" src="https://github.com/user-attachments/assets/1fd41a9b-5452-4aa4-9478-888c8ad7363a" height="420"> | <img height="494" alt="image" src="https://github.com/user-attachments/assets/d5a57282-0851-4902-9588-d8de4b82d45c"> |
17
+
17
18
 
18
19
 
19
20
  ## Install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neoagent",
3
- "version": "2.1.18-beta.99",
3
+ "version": "2.2.1-beta.0",
4
4
  "description": "Proactive personal AI agent with no limits",
5
5
  "license": "MIT",
6
6
  "main": "server/index.js",
@@ -53,7 +53,7 @@
53
53
  "@anthropic-ai/sdk": "^0.39.0",
54
54
  "@google/generative-ai": "^0.24.0",
55
55
  "@modelcontextprotocol/sdk": "^1.12.1",
56
- "baileys": "^6.7.1",
56
+ "baileys": "^6.7.21",
57
57
  "bcrypt": "^6.0.0",
58
58
  "better-sqlite3": "^11.8.1",
59
59
  "better-sqlite3-session-store": "^0.1.0",
@@ -84,11 +84,18 @@
84
84
  "ws": "^8.19.0"
85
85
  },
86
86
  "overrides": {
87
- "undici": "^6.24.0"
87
+ "axios": "^1.15.2",
88
+ "basic-ftp": "^5.3.0",
89
+ "follow-redirects": "^1.16.0",
90
+ "hono": "^4.12.14",
91
+ "protobufjs": "^7.5.5",
92
+ "serialize-javascript": "^7.0.5",
93
+ "undici": "^6.24.0",
94
+ "webpackbar": "^7.0.0"
88
95
  },
89
96
  "devDependencies": {
90
- "@docusaurus/core": "3.8.1",
91
- "@docusaurus/preset-classic": "3.8.1",
97
+ "@docusaurus/core": "3.10.0",
98
+ "@docusaurus/preset-classic": "3.10.0",
92
99
  "react": "18.3.1",
93
100
  "react-dom": "18.3.1"
94
101
  }
@@ -90,6 +90,26 @@ db.exec(`
90
90
  FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
91
91
  );
92
92
 
93
+ CREATE TABLE IF NOT EXISTS user_qr_login_challenges (
94
+ id TEXT PRIMARY KEY,
95
+ poll_token_hash TEXT UNIQUE NOT NULL,
96
+ approve_secret_hash TEXT NOT NULL,
97
+ status TEXT DEFAULT 'pending',
98
+ request_user_agent TEXT,
99
+ request_ip_address TEXT,
100
+ request_location_label TEXT,
101
+ request_location_json TEXT DEFAULT '{}',
102
+ request_metadata_json TEXT DEFAULT '{}',
103
+ approved_by_user_id INTEGER,
104
+ approved_session_hash TEXT,
105
+ approved_metadata_json TEXT DEFAULT '{}',
106
+ expires_at TEXT NOT NULL,
107
+ approved_at TEXT,
108
+ claimed_at TEXT,
109
+ created_at TEXT DEFAULT (datetime('now')),
110
+ FOREIGN KEY (approved_by_user_id) REFERENCES users(id) ON DELETE SET NULL
111
+ );
112
+
93
113
  CREATE TABLE IF NOT EXISTS user_email_tokens (
94
114
  id INTEGER PRIMARY KEY AUTOINCREMENT,
95
115
  user_id INTEGER NOT NULL,
@@ -379,6 +399,8 @@ db.exec(`
379
399
  CREATE INDEX IF NOT EXISTS idx_agents_user ON agents(user_id, status, updated_at DESC);
380
400
  CREATE INDEX IF NOT EXISTS idx_user_recovery_codes_user ON user_recovery_codes(user_id, used_at);
381
401
  CREATE INDEX IF NOT EXISTS idx_user_sessions_user ON user_sessions(user_id, revoked_at, last_seen_at DESC);
402
+ CREATE INDEX IF NOT EXISTS idx_user_qr_login_challenges_status ON user_qr_login_challenges(status, expires_at);
403
+ CREATE INDEX IF NOT EXISTS idx_user_qr_login_challenges_approver ON user_qr_login_challenges(approved_by_user_id, created_at DESC);
382
404
  CREATE INDEX IF NOT EXISTS idx_user_email_tokens_lookup ON user_email_tokens(token_hash, consumed_at, expires_at);
383
405
  CREATE INDEX IF NOT EXISTS idx_user_email_tokens_user ON user_email_tokens(user_id, type, consumed_at);
384
406
  CREATE INDEX IF NOT EXISTS idx_user_auth_providers_user ON user_auth_providers(user_id, provider_key, updated_at DESC);
@@ -396,6 +418,41 @@ db.exec(`
396
418
  CREATE INDEX IF NOT EXISTS idx_conversations_user ON conversations(user_id, updated_at DESC);
397
419
  CREATE INDEX IF NOT EXISTS idx_scheduled_tasks_user ON scheduled_tasks(user_id);
398
420
 
421
+ CREATE TABLE IF NOT EXISTS ai_widgets (
422
+ id TEXT PRIMARY KEY,
423
+ user_id INTEGER NOT NULL,
424
+ agent_id TEXT,
425
+ name TEXT NOT NULL,
426
+ template TEXT NOT NULL,
427
+ layout_variant TEXT NOT NULL,
428
+ definition_json TEXT DEFAULT '{}',
429
+ refresh_cron TEXT NOT NULL,
430
+ enabled INTEGER DEFAULT 1,
431
+ scheduled_task_id INTEGER,
432
+ last_snapshot_at TEXT,
433
+ last_error TEXT,
434
+ created_at TEXT DEFAULT (datetime('now')),
435
+ updated_at TEXT DEFAULT (datetime('now')),
436
+ FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
437
+ FOREIGN KEY (agent_id) REFERENCES agents(id) ON DELETE SET NULL,
438
+ FOREIGN KEY (scheduled_task_id) REFERENCES scheduled_tasks(id) ON DELETE SET NULL
439
+ );
440
+
441
+ CREATE TABLE IF NOT EXISTS ai_widget_snapshots (
442
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
443
+ widget_id TEXT NOT NULL,
444
+ payload_json TEXT DEFAULT '{}',
445
+ generated_at TEXT DEFAULT (datetime('now')),
446
+ source_run_id TEXT,
447
+ status TEXT DEFAULT 'ready',
448
+ FOREIGN KEY (widget_id) REFERENCES ai_widgets(id) ON DELETE CASCADE,
449
+ FOREIGN KEY (source_run_id) REFERENCES agent_runs(id) ON DELETE SET NULL
450
+ );
451
+
452
+ CREATE INDEX IF NOT EXISTS idx_ai_widgets_user ON ai_widgets(user_id, updated_at DESC);
453
+ CREATE INDEX IF NOT EXISTS idx_ai_widgets_agent ON ai_widgets(user_id, agent_id, updated_at DESC);
454
+ CREATE INDEX IF NOT EXISTS idx_ai_widget_snapshots_widget ON ai_widget_snapshots(widget_id, id DESC);
455
+
399
456
  CREATE TABLE IF NOT EXISTS conversation_history (
400
457
  id INTEGER PRIMARY KEY AUTOINCREMENT,
401
458
  user_id INTEGER NOT NULL,
@@ -19,6 +19,7 @@ const routeRegistry = [
19
19
  { basePath: '/api/artifacts', modulePath: '../routes/artifacts' },
20
20
  { basePath: '/api/memory', modulePath: '../routes/memory' },
21
21
  { basePath: '/api/scheduler', modulePath: '../routes/scheduler' },
22
+ { basePath: '/api/widgets', modulePath: '../routes/widgets' },
22
23
  { basePath: '/api/browser', modulePath: '../routes/browser' },
23
24
  { basePath: '/api/browser-extension', modulePath: '../routes/browser_extension' },
24
25
  { basePath: '/api/android', modulePath: '../routes/android' },
@@ -24712,6 +24712,39 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24712
24712
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24713
24713
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24714
24714
  SOFTWARE.
24715
+ --------------------------------------------------------------------------------
24716
+ mobile_scanner
24717
+
24718
+ BSD 3-Clause License
24719
+
24720
+ Copyright (c) 2022, Julian Steenbakker
24721
+ All rights reserved.
24722
+
24723
+ Redistribution and use in source and binary forms, with or without
24724
+ modification, are permitted provided that the following conditions are met:
24725
+
24726
+ 1. Redistributions of source code must retain the above copyright notice, this
24727
+ list of conditions and the following disclaimer.
24728
+
24729
+ 2. Redistributions in binary form must reproduce the above copyright notice,
24730
+ this list of conditions and the following disclaimer in the documentation
24731
+ and/or other materials provided with the distribution.
24732
+
24733
+ 3. Neither the name of the copyright holder nor the names of its
24734
+ contributors may be used to endorse or promote products derived from
24735
+ this software without specific prior written permission.
24736
+
24737
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24738
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24739
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24740
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24741
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24742
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24743
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24744
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24745
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24746
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24747
+
24715
24748
  --------------------------------------------------------------------------------
24716
24749
  node_preamble
24717
24750
 
Binary file
@@ -1,12 +1,12 @@
1
1
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
2
2
  <defs>
3
3
  <linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%">
4
- <stop offset="0%" stop-color="#6366f1"/>
5
- <stop offset="100%" stop-color="#8b5cf6"/>
4
+ <stop offset="0%" stop-color="#8f6d3e"/>
5
+ <stop offset="100%" stop-color="#2f7d6e"/>
6
6
  </linearGradient>
7
7
  </defs>
8
- <rect width="32" height="32" rx="8" ry="8" fill="url(#bg)"/>
9
- <polygon points="16,5 5,10.5 16,16 27,10.5" fill="white"/>
10
- <polyline points="5,16 16,21.5 27,16" fill="none" stroke="white" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>
11
- <polyline points="5,21.5 16,27 27,21.5" fill="none" stroke="white" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>
8
+ <rect x="2.5" y="2.5" width="27" height="27" rx="9" ry="9" fill="url(#bg)" stroke="#ffffff" stroke-opacity="0.16" stroke-width="1"/>
9
+ <polygon points="16,5.7 5.2,11.6 16,17.6 26.8,11.6" fill="white"/>
10
+ <polyline points="5.2,17.6 16,23.5 26.8,17.6" fill="none" stroke="white" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>
11
+ <polyline points="5.2,22.7 16,28.1 26.8,22.7" fill="none" stroke="white" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>
12
12
  </svg>
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"59aa584fdf100e6c78c785d8a5b565d1de4b48
37
37
 
38
38
  _flutter.loader.load({
39
39
  serviceWorkerSettings: {
40
- serviceWorkerVersion: "443966521" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
40
+ serviceWorkerVersion: "1456478214" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
41
41
  }
42
42
  });
Binary file
Binary file