neoagent 2.3.1-beta.3 → 2.3.1-beta.5
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/package.json
CHANGED
|
@@ -17,23 +17,23 @@ router.get('/search', (req, res) => {
|
|
|
17
17
|
let results = [];
|
|
18
18
|
if (q) {
|
|
19
19
|
// Full text search
|
|
20
|
-
results = db.prepare(
|
|
20
|
+
results = db.prepare(`
|
|
21
21
|
SELECT s.id, s.timestamp, s.app_name, s.text_content
|
|
22
22
|
FROM screen_history_fts fts
|
|
23
23
|
JOIN screen_history s ON fts.rowid = s.id
|
|
24
24
|
WHERE screen_history_fts MATCH ? AND s.user_id = ?
|
|
25
25
|
ORDER BY s.timestamp DESC
|
|
26
26
|
LIMIT ? OFFSET ?
|
|
27
|
-
|
|
27
|
+
`).all(q, req.user.id, Number(limit), Number(offset));
|
|
28
28
|
} else {
|
|
29
29
|
// Recent history
|
|
30
|
-
results = db.prepare(
|
|
30
|
+
results = db.prepare(`
|
|
31
31
|
SELECT id, timestamp, app_name, text_content
|
|
32
32
|
FROM screen_history
|
|
33
33
|
WHERE user_id = ?
|
|
34
34
|
ORDER BY timestamp DESC
|
|
35
35
|
LIMIT ? OFFSET ?
|
|
36
|
-
|
|
36
|
+
`).all(req.user.id, Number(limit), Number(offset));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
res.json({ results });
|
|
@@ -50,10 +50,10 @@ router.post('/notification', async (req, res) => {
|
|
|
50
50
|
|
|
51
51
|
console.log(`[Triggers] Notification received: ${app_package} - ${title}`);
|
|
52
52
|
|
|
53
|
-
db.prepare(
|
|
53
|
+
db.prepare(`
|
|
54
54
|
INSERT INTO notification_history (user_id, app_package, title, body, action_taken)
|
|
55
55
|
VALUES (?, ?, ?, ?, ?)
|
|
56
|
-
|
|
56
|
+
`).run(req.user.id, app_package || 'unknown', title || '', body || '', action_taken || 'none');
|
|
57
57
|
|
|
58
58
|
// Notify agent engine to proactively evaluate the notification
|
|
59
59
|
const agentEngine = req.app.locals.agentEngine;
|
|
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"59aa584fdf100e6c78c785d8a5b565d1de4b48
|
|
|
37
37
|
|
|
38
38
|
_flutter.loader.load({
|
|
39
39
|
serviceWorkerSettings: {
|
|
40
|
-
serviceWorkerVersion: "
|
|
40
|
+
serviceWorkerVersion: "4123024040" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
|
41
41
|
}
|
|
42
42
|
});
|
|
@@ -88,10 +88,10 @@ class ScreenRecorder {
|
|
|
88
88
|
// Ignore AppleScript errors
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
db.prepare(
|
|
91
|
+
db.prepare(`
|
|
92
92
|
INSERT INTO screen_history (user_id, app_name, text_content)
|
|
93
93
|
VALUES (?, ?, ?)
|
|
94
|
-
|
|
94
|
+
`).run(userRow.id, appName, textContent);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -110,12 +110,12 @@ class ScreenRecorder {
|
|
|
110
110
|
|
|
111
111
|
cleanupOldRecords() {
|
|
112
112
|
try {
|
|
113
|
-
const result = db.prepare(
|
|
113
|
+
const result = db.prepare(`
|
|
114
114
|
DELETE FROM screen_history
|
|
115
115
|
WHERE timestamp < datetime('now', '-7 days')
|
|
116
|
-
|
|
116
|
+
`).run();
|
|
117
117
|
if (result.changes > 0) {
|
|
118
|
-
console.log(
|
|
118
|
+
console.log(`[ScreenRecorder] Purged ${result.changes} old screen history records.`);
|
|
119
119
|
}
|
|
120
120
|
} catch (err) {
|
|
121
121
|
console.error('[ScreenRecorder] Cleanup failed:', getErrorMessage(err));
|