nothumanallowed 14.1.39 → 14.1.40
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "14.1.
|
|
3
|
+
"version": "14.1.40",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/constants.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'url';
|
|
|
5
5
|
const __filename = fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = path.dirname(__filename);
|
|
7
7
|
|
|
8
|
-
export const VERSION = '14.1.
|
|
8
|
+
export const VERSION = '14.1.40';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -515,9 +515,10 @@ export function saveMessage(accountId, data) {
|
|
|
515
515
|
return insertMessage({
|
|
516
516
|
...data,
|
|
517
517
|
account_id: accountId,
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
518
|
+
folder_id: data.folder_id || null,
|
|
519
|
+
imap_folder_path: data.imap_folder_path || 'INBOX',
|
|
520
|
+
uid: data.uid || Date.now(), // Fake UID for Gmail API messages
|
|
521
|
+
source: data.source || 'gmail_api'
|
|
521
522
|
});
|
|
522
523
|
}
|
|
523
524
|
|
|
@@ -362,7 +362,7 @@ async function cacheMessages(messages) {
|
|
|
362
362
|
|
|
363
363
|
// ENTERPRISE LOCAL-FIRST: Also save to IMAP database for Web UI offline access
|
|
364
364
|
try {
|
|
365
|
-
const { ensureGoogleAccount, saveMessage } = await import('./email-db.mjs');
|
|
365
|
+
const { ensureGoogleAccount, upsertFolder, getSystemLabel, saveMessage } = await import('./email-db.mjs');
|
|
366
366
|
|
|
367
367
|
// Ensure Google account exists in IMAP database
|
|
368
368
|
const googleAccount = ensureGoogleAccount({
|
|
@@ -375,9 +375,16 @@ async function cacheMessages(messages) {
|
|
|
375
375
|
is_active: 1
|
|
376
376
|
});
|
|
377
377
|
|
|
378
|
+
// Ensure INBOX folder exists for Gmail account
|
|
379
|
+
const inboxFolderId = upsertFolder(googleAccount.id, 'INBOX', 'Inbox', 'inbox', 1, 0);
|
|
380
|
+
|
|
381
|
+
// Get system labels (inbox, sent, etc.) - they are auto-created by ensureGoogleAccount
|
|
382
|
+
const inboxLabel = getSystemLabel(googleAccount.id, 'inbox');
|
|
383
|
+
|
|
378
384
|
// Save each message to IMAP database
|
|
379
385
|
for (const msg of messages) {
|
|
380
386
|
saveMessage(googleAccount.id, {
|
|
387
|
+
folder_id: inboxFolderId,
|
|
381
388
|
message_id: msg.id,
|
|
382
389
|
thread_id: msg.threadId || msg.id,
|
|
383
390
|
subject: msg.subject || '(no subject)',
|
|
@@ -389,7 +396,6 @@ async function cacheMessages(messages) {
|
|
|
389
396
|
internal_date: new Date(msg.date || Date.now()).toISOString(),
|
|
390
397
|
is_read: !msg.isUnread,
|
|
391
398
|
is_starred: !!msg.isImportant,
|
|
392
|
-
labels: (msg.labels || []).join(','),
|
|
393
399
|
has_attachments: false
|
|
394
400
|
});
|
|
395
401
|
}
|