nothumanallowed 13.5.115 → 13.5.117
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": "13.5.
|
|
3
|
+
"version": "13.5.117",
|
|
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 = '13.5.
|
|
8
|
+
export const VERSION = '13.5.117';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -58,16 +58,17 @@ function notifyIdle(accountId, folder) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
function createImapClient(label, creds, accountId) {
|
|
61
|
-
const
|
|
61
|
+
const port = parseInt(creds.imap_port, 10) || 993;
|
|
62
|
+
const isSecure = port === 993 || port === 465;
|
|
62
63
|
const client = new ImapFlow({
|
|
63
64
|
host: creds.imap_host,
|
|
64
|
-
port
|
|
65
|
+
port,
|
|
65
66
|
secure: isSecure,
|
|
66
67
|
auth: { user: creds.username, pass: creds.password },
|
|
67
68
|
logger: false,
|
|
68
69
|
clientInfo: { name: 'NHA-Mail', version: '1.0.0' },
|
|
69
70
|
emitLogs: false,
|
|
70
|
-
|
|
71
|
+
tls: { rejectUnauthorized: false }, // always set — safe for self-signed certs too
|
|
71
72
|
});
|
|
72
73
|
client.on('error', (err) => {
|
|
73
74
|
console.error(`[email:imap] ${label} error:`, err.message);
|
|
@@ -19,16 +19,17 @@ function threadId(messageId) {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function getTransporter(creds) {
|
|
22
|
-
const
|
|
22
|
+
const port = parseInt(creds.smtp_port, 10) || 587;
|
|
23
|
+
const isSecure = port === 465;
|
|
23
24
|
return createTransport({
|
|
24
25
|
host: creds.smtp_host,
|
|
25
|
-
port
|
|
26
|
+
port,
|
|
26
27
|
secure: isSecure,
|
|
27
28
|
auth: { user: creds.username, pass: creds.password },
|
|
28
29
|
connectionTimeout: 15000,
|
|
29
30
|
greetingTimeout: 10000,
|
|
30
31
|
socketTimeout: 20000,
|
|
31
|
-
tls: { rejectUnauthorized:
|
|
32
|
+
tls: { rejectUnauthorized: false },
|
|
32
33
|
});
|
|
33
34
|
}
|
|
34
35
|
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -3143,12 +3143,12 @@ function renderImapAccountsSettings() {
|
|
|
3143
3143
|
imapField('imapDisplayName','Display Name','e.g. Work Email') +
|
|
3144
3144
|
imapField('imapEmail','Email Address','user@example.com') +
|
|
3145
3145
|
imapField('imapFromName','From Name','e.g. John Smith') +
|
|
3146
|
-
imapField('imapImapHost','IMAP
|
|
3147
|
-
imapField('imapImapPort','IMAP Port','993') +
|
|
3148
|
-
imapField('imapSmtpHost','SMTP
|
|
3149
|
-
imapField('imapSmtpPort','SMTP Port','587') +
|
|
3146
|
+
imapField('imapImapHost','IMAP Server','e.g. imap.gmail.com') +
|
|
3147
|
+
imapField('imapImapPort','IMAP Port','993 (TLS) or 143') +
|
|
3148
|
+
imapField('imapSmtpHost','SMTP Server','e.g. smtp.gmail.com') +
|
|
3149
|
+
imapField('imapSmtpPort','SMTP Port','587 (STARTTLS) or 465 (SSL)') +
|
|
3150
3150
|
imapField('imapUsername','Username','e.g. user@example.com') +
|
|
3151
|
-
|
|
3151
|
+
imapFieldPassword() +
|
|
3152
3152
|
'<div style="display:flex;gap:8px;margin-top:12px">' +
|
|
3153
3153
|
'<button onclick="saveImapAccount()" style="background:var(--green3);color:var(--bg);padding:7px 18px;border-radius:var(--r);font-weight:700;font-size:12px;cursor:pointer;border:none">Save</button>' +
|
|
3154
3154
|
'<button onclick="document.getElementById(\\x27imapAccountForm\\x27).style.display=\\x27none\\x27" style="background:var(--bg);color:var(--dim);padding:7px 14px;border-radius:var(--r);font-size:12px;cursor:pointer;border:1px solid var(--border)">Cancel</button>' +
|
|
@@ -3158,13 +3158,31 @@ function renderImapAccountsSettings() {
|
|
|
3158
3158
|
'</div>';
|
|
3159
3159
|
}
|
|
3160
3160
|
|
|
3161
|
-
function imapField(id, label, placeholder
|
|
3161
|
+
function imapField(id, label, placeholder) {
|
|
3162
3162
|
return '<div style="margin-bottom:8px">' +
|
|
3163
3163
|
'<label style="display:block;font-size:10px;color:var(--dim);margin-bottom:3px">' + label + '</label>' +
|
|
3164
|
-
'<input id="' + id + '" type="
|
|
3164
|
+
'<input id="' + id + '" type="text" placeholder="' + placeholder + '" style="width:100%;padding:7px 10px;font-size:12px;background:var(--bg);color:var(--fg);border:1px solid var(--border2);border-radius:6px;box-sizing:border-box">' +
|
|
3165
3165
|
'</div>';
|
|
3166
3166
|
}
|
|
3167
3167
|
|
|
3168
|
+
function imapFieldPassword() {
|
|
3169
|
+
return '<div style="margin-bottom:8px">' +
|
|
3170
|
+
'<label style="display:block;font-size:10px;color:var(--dim);margin-bottom:3px">Password <span id="imapPwdPlaceholderNote" style="color:var(--amber,#F59E0B)">(leave empty to keep existing)</span></label>' +
|
|
3171
|
+
'<div style="display:flex;gap:6px;align-items:center">' +
|
|
3172
|
+
'<input id="imapPassword" type="password" placeholder="App password or IMAP password" style="flex:1;padding:7px 10px;font-size:12px;background:var(--bg);color:var(--fg);border:1px solid var(--border2);border-radius:6px">' +
|
|
3173
|
+
'<button type="button" onclick="imapTogglePwd()" style="padding:6px 10px;font-size:11px;background:var(--bg);color:var(--dim);border:1px solid var(--border);border-radius:6px;cursor:pointer;white-space:nowrap" id="imapPwdToggle">Show</button>' +
|
|
3174
|
+
'</div>' +
|
|
3175
|
+
'</div>';
|
|
3176
|
+
}
|
|
3177
|
+
|
|
3178
|
+
function imapTogglePwd() {
|
|
3179
|
+
var inp = document.getElementById('imapPassword');
|
|
3180
|
+
var btn = document.getElementById('imapPwdToggle');
|
|
3181
|
+
if (!inp) return;
|
|
3182
|
+
if (inp.type === 'password') { inp.type = 'text'; if (btn) btn.textContent = 'Hide'; }
|
|
3183
|
+
else { inp.type = 'password'; if (btn) btn.textContent = 'Show'; }
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3168
3186
|
function loadImapAccounts() {
|
|
3169
3187
|
apiGet('/api/imap/accounts').then(function(r) {
|
|
3170
3188
|
var el = document.getElementById('imapAccountsList');
|
|
@@ -3194,15 +3212,34 @@ function loadImapAccounts() {
|
|
|
3194
3212
|
}
|
|
3195
3213
|
|
|
3196
3214
|
function showAddImapAccount() {
|
|
3197
|
-
document.getElementById('
|
|
3198
|
-
|
|
3199
|
-
var
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3215
|
+
var form = document.getElementById('imapAccountForm');
|
|
3216
|
+
if (!form) return;
|
|
3217
|
+
var editId = document.getElementById('imapEditId');
|
|
3218
|
+
if (editId) editId.value = '';
|
|
3219
|
+
var title = document.getElementById('imapFormTitle');
|
|
3220
|
+
if (title) title.textContent = 'Add IMAP Account';
|
|
3221
|
+
var fieldDefaults = {
|
|
3222
|
+
imapDisplayName: '', imapEmail: '', imapFromName: '',
|
|
3223
|
+
imapImapHost: '', imapImapPort: '993',
|
|
3224
|
+
imapSmtpHost: '', imapSmtpPort: '587',
|
|
3225
|
+
imapUsername: '', imapPassword: ''
|
|
3226
|
+
};
|
|
3227
|
+
for (var key in fieldDefaults) {
|
|
3228
|
+
var el = document.getElementById(key);
|
|
3229
|
+
if (el) el.value = fieldDefaults[key];
|
|
3204
3230
|
}
|
|
3205
|
-
document.getElementById('
|
|
3231
|
+
var status = document.getElementById('imapFormStatus');
|
|
3232
|
+
if (status) status.textContent = '';
|
|
3233
|
+
// New account: hide "leave empty" note, require password
|
|
3234
|
+
var note = document.getElementById('imapPwdPlaceholderNote');
|
|
3235
|
+
if (note) note.style.display = 'none';
|
|
3236
|
+
// Reset show/hide toggle
|
|
3237
|
+
var pwdInp = document.getElementById('imapPassword');
|
|
3238
|
+
var pwdBtn = document.getElementById('imapPwdToggle');
|
|
3239
|
+
if (pwdInp) { pwdInp.type = 'password'; pwdInp.placeholder = 'App password or IMAP password'; }
|
|
3240
|
+
if (pwdBtn) pwdBtn.textContent = 'Show';
|
|
3241
|
+
form.style.display = 'block';
|
|
3242
|
+
form.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
|
|
3206
3243
|
}
|
|
3207
3244
|
|
|
3208
3245
|
function editImapAccount(id) {
|
|
@@ -3220,7 +3257,17 @@ function editImapAccount(id) {
|
|
|
3220
3257
|
document.getElementById('imapSmtpPort').value = a.smtp_port || 587;
|
|
3221
3258
|
document.getElementById('imapUsername').value = a.username || '';
|
|
3222
3259
|
document.getElementById('imapPassword').value = '';
|
|
3223
|
-
|
|
3260
|
+
// Show "leave empty to keep" note and reset toggle
|
|
3261
|
+
var note = document.getElementById('imapPwdPlaceholderNote');
|
|
3262
|
+
if (note) note.style.display = 'inline';
|
|
3263
|
+
var pwdInp = document.getElementById('imapPassword');
|
|
3264
|
+
var pwdBtn = document.getElementById('imapPwdToggle');
|
|
3265
|
+
if (pwdInp) { pwdInp.type = 'password'; pwdInp.placeholder = 'Leave empty to keep existing'; }
|
|
3266
|
+
if (pwdBtn) pwdBtn.textContent = 'Show';
|
|
3267
|
+
var form2 = document.getElementById('imapAccountForm');
|
|
3268
|
+
var status2 = document.getElementById('imapFormStatus');
|
|
3269
|
+
if (status2) status2.textContent = '';
|
|
3270
|
+
if (form2) { form2.style.display = 'block'; form2.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); }
|
|
3224
3271
|
});
|
|
3225
3272
|
}
|
|
3226
3273
|
|