nothumanallowed 13.5.123 → 13.5.124
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 +1 -1
- package/src/commands/chat.mjs +1 -1
- package/src/commands/ui.mjs +1 -1
- package/src/constants.mjs +1 -1
- package/src/services/tool-executor.mjs +25 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.124",
|
|
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/commands/chat.mjs
CHANGED
|
@@ -613,7 +613,7 @@ export async function cmdChat(args) {
|
|
|
613
613
|
terminal: true,
|
|
614
614
|
});
|
|
615
615
|
|
|
616
|
-
const systemPrompt = buildSystemPrompt('NHA Chat', CHAT_PERSONA, config, initialContext);
|
|
616
|
+
const systemPrompt = await buildSystemPrompt('NHA Chat', CHAT_PERSONA, config, initialContext);
|
|
617
617
|
|
|
618
618
|
rl.on('close', () => {
|
|
619
619
|
console.log(`\n ${D}Session ended. Goodbye.${NC}\n`);
|
package/src/commands/ui.mjs
CHANGED
|
@@ -257,7 +257,7 @@ export async function cmdUI(args) {
|
|
|
257
257
|
`You help the user manage their emails, calendar, tasks, GitHub issues, Notion pages, and Slack channels through natural conversation. ` +
|
|
258
258
|
`Be concise, helpful, and proactive. When presenting data, format it clearly. ` +
|
|
259
259
|
`Never output raw JSON to the user.`;
|
|
260
|
-
const chatSystemPrompt = buildSystemPrompt('NHA UI', UI_PERSONA, config);
|
|
260
|
+
const chatSystemPrompt = await buildSystemPrompt('NHA UI', UI_PERSONA, config);
|
|
261
261
|
|
|
262
262
|
// ── Route Handlers ──────────────────────────────────────────────────────
|
|
263
263
|
|
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.124';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -379,13 +379,14 @@ TOOLS:
|
|
|
379
379
|
--- IMAP EMAIL (custom accounts) ---
|
|
380
380
|
|
|
381
381
|
64. imap_list(accountId: string, labelId?: string, search?: string, limit?: number)
|
|
382
|
-
List emails from a custom IMAP account
|
|
383
|
-
|
|
382
|
+
List emails from a custom IMAP account. accountId is known from the IMAP ACCOUNTS section above — use it directly.
|
|
383
|
+
search does full-text match on subject, from_address, from_name, body. Use it to filter by sender name/domain.
|
|
384
|
+
Example: search="zeli" finds all emails from *@zeli.it or with "zeli" in subject/body.
|
|
384
385
|
Returns: [{id, subject, from_address, from_name, internal_date, body_preview, is_read, is_starred}]
|
|
385
386
|
|
|
386
387
|
65. imap_accounts()
|
|
387
|
-
List all configured IMAP accounts.
|
|
388
|
-
|
|
388
|
+
List all configured IMAP accounts. NOTE: accounts are already listed in the IMAP ACCOUNTS section above.
|
|
389
|
+
Only call this if you need to refresh or the section is missing.
|
|
389
390
|
|
|
390
391
|
66. imap_read(messageId: string)
|
|
391
392
|
Read a full email message from the local DB by its id. Returns subject, from, to, body_text, body_html, attachments.
|
|
@@ -414,8 +415,9 @@ TOOLS:
|
|
|
414
415
|
Use imap_read() to get the threadId from a message.
|
|
415
416
|
|
|
416
417
|
73. imap_search(accountId: string, query: string, limit?: number)
|
|
417
|
-
Full-text search across all synced emails (subject,
|
|
418
|
-
query is a plain text string
|
|
418
|
+
Full-text search across all synced emails (subject, body_preview, from_address, from_name).
|
|
419
|
+
query is a plain text string — use sender name, domain, or keyword.
|
|
420
|
+
Examples: "zeli" finds emails from *@zeli.it. "fattura" finds emails with that word. limit defaults to 20.
|
|
419
421
|
|
|
420
422
|
74. imap_mark_starred(messageId: string, isStarred?: boolean)
|
|
421
423
|
Star or unstar a message locally. Default isStarred=true.
|
|
@@ -730,7 +732,7 @@ function driveIcon(type) {
|
|
|
730
732
|
* @param {string} [initialContext] — optional preloaded context (today's events, etc.)
|
|
731
733
|
* @returns {string}
|
|
732
734
|
*/
|
|
733
|
-
export function buildSystemPrompt(persona, personaDescription, config, initialContext) {
|
|
735
|
+
export async function buildSystemPrompt(persona, personaDescription, config, initialContext) {
|
|
734
736
|
const today = new Date().toISOString().split('T')[0];
|
|
735
737
|
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
736
738
|
|
|
@@ -774,6 +776,22 @@ export function buildSystemPrompt(persona, personaDescription, config, initialCo
|
|
|
774
776
|
}
|
|
775
777
|
}
|
|
776
778
|
|
|
779
|
+
// Inject IMAP accounts so the AI knows accountIds without calling imap_accounts()
|
|
780
|
+
try {
|
|
781
|
+
const { listAccounts } = await import('./email-db.mjs').catch(() => ({ listAccounts: null }));
|
|
782
|
+
if (listAccounts) {
|
|
783
|
+
const imapAccounts = listAccounts();
|
|
784
|
+
if (imapAccounts.length > 0) {
|
|
785
|
+
prompt += `\n\n--- IMAP EMAIL ACCOUNTS (custom, already configured) ---\n`;
|
|
786
|
+
prompt += `Use these accountIds directly — do NOT call imap_accounts() first.\n`;
|
|
787
|
+
for (const a of imapAccounts) {
|
|
788
|
+
prompt += `accountId: "${a.id}" | email: ${a.email_address} | name: "${a.display_name}" | status: ${a.sync_status}\n`;
|
|
789
|
+
}
|
|
790
|
+
prompt += `When the user mentions their company name, email domain, or display name, map it to the correct accountId above.`;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
} catch {}
|
|
794
|
+
|
|
777
795
|
if (initialContext) {
|
|
778
796
|
prompt += `\n\n--- CURRENT CONTEXT (fetched at session start) ---\n${initialContext}`;
|
|
779
797
|
}
|