nothumanallowed 9.1.0 → 9.1.1

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": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "description": "NotHumanAllowed — 38 AI agents + 50 tools + web search. Streaming chat, multi-conversation, export. Gmail, Calendar, Drive, GitHub, Notion, Slack. Zero-dependency CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -422,6 +422,107 @@ async function handleSlashCommand(input, config, conv, rl) {
422
422
  return { handled: false };
423
423
  }
424
424
 
425
+ // ── Tool Indicators ──────────────────────────────────────────────────────────
426
+
427
+ /**
428
+ * Format a user-visible label while a tool is executing.
429
+ */
430
+ function formatToolLabel(action, params) {
431
+ switch (action) {
432
+ case 'web_search':
433
+ return `Searching the web for "${params.query || '...'}"...`;
434
+ case 'fetch_url':
435
+ return `Fetching ${params.url || 'URL'}...`;
436
+ case 'gmail_list':
437
+ return `Searching emails...`;
438
+ case 'gmail_read':
439
+ return `Reading email...`;
440
+ case 'gmail_send':
441
+ case 'gmail_send_attach':
442
+ return `Sending email to ${params.to || '...'}...`;
443
+ case 'gmail_reply':
444
+ return `Sending reply...`;
445
+ case 'calendar_create':
446
+ return `Creating event "${params.summary || '...'}"...`;
447
+ case 'calendar_today':
448
+ case 'calendar_tomorrow':
449
+ case 'calendar_upcoming':
450
+ case 'calendar_week':
451
+ return `Loading calendar...`;
452
+ case 'github_issues':
453
+ case 'github_prs':
454
+ return `Fetching from GitHub...`;
455
+ case 'notion_search':
456
+ return `Searching Notion...`;
457
+ case 'slack_messages':
458
+ case 'slack_channels':
459
+ return `Loading Slack...`;
460
+ default:
461
+ return `Executing ${action}...`;
462
+ }
463
+ }
464
+
465
+ /**
466
+ * Format a result header with visual indicator based on tool type.
467
+ */
468
+ function formatToolResult(action, params, result) {
469
+ switch (action) {
470
+ case 'web_search': {
471
+ const count = (result.match(/\d+\. /g) || []).length;
472
+ const deep = params.deep ? ', deep mode' : '';
473
+ return `${C}[Web Search: ${count} results${deep}]${NC}`;
474
+ }
475
+ case 'fetch_url': {
476
+ const domain = (params.url || '').replace(/^https?:\/\//, '').split('/')[0];
477
+ return `${C}[Fetched: ${domain}]${NC}`;
478
+ }
479
+ case 'gmail_list':
480
+ case 'gmail_read':
481
+ case 'gmail_send':
482
+ case 'gmail_send_attach':
483
+ case 'gmail_reply':
484
+ case 'gmail_draft':
485
+ case 'gmail_mark_read':
486
+ case 'gmail_mark_unread':
487
+ case 'gmail_archive':
488
+ case 'gmail_delete':
489
+ return `${G}[Email]${NC}`;
490
+ case 'calendar_today':
491
+ case 'calendar_tomorrow':
492
+ case 'calendar_upcoming':
493
+ case 'calendar_week':
494
+ case 'calendar_create':
495
+ case 'calendar_move':
496
+ case 'calendar_find':
497
+ case 'calendar_update':
498
+ case 'schedule_meeting':
499
+ case 'schedule_draft_email':
500
+ return `${G}[Calendar]${NC}`;
501
+ case 'task_list':
502
+ case 'task_add':
503
+ case 'task_done':
504
+ case 'task_move':
505
+ case 'task_delete':
506
+ case 'task_clear':
507
+ case 'task_edit':
508
+ return `${G}[Tasks]${NC}`;
509
+ case 'github_issues':
510
+ case 'github_prs':
511
+ case 'github_notifications':
512
+ case 'github_create_issue':
513
+ return `${G}[GitHub]${NC}`;
514
+ case 'notion_search':
515
+ case 'notion_page':
516
+ return `${G}[Notion]${NC}`;
517
+ case 'slack_channels':
518
+ case 'slack_messages':
519
+ case 'slack_send':
520
+ return `${G}[Slack]${NC}`;
521
+ default:
522
+ return `${G}[${action}]${NC}`;
523
+ }
524
+ }
525
+
425
526
  // ── Main REPL ────────────────────────────────────────────────────────────────
426
527
 
427
528
  export async function cmdChat(args) {
@@ -569,14 +670,20 @@ export async function cmdChat(args) {
569
670
  }
570
671
 
571
672
  try {
572
- process.stdout.write(` ${D}Executing ${action}...${NC}`);
673
+ // Show action-specific indicator
674
+ const toolLabel = formatToolLabel(action, params);
675
+ process.stdout.write(` ${D}${toolLabel}${NC}`);
573
676
  const result = await executeTool(action, params, config);
574
- process.stdout.write('\r' + ' '.repeat(60) + '\r');
575
- console.log(` ${G}Result:${NC}\n ${result.split('\n').join('\n ')}\n`);
677
+ process.stdout.write('\r' + ' '.repeat(80) + '\r');
678
+
679
+ // Show action-specific result header
680
+ const resultHeader = formatToolResult(action, params, result);
681
+ console.log(` ${resultHeader}`);
682
+ console.log(` ${result.split('\n').join('\n ')}\n`);
576
683
 
577
684
  addMessages(conv, input, response + `\n\n[Tool ${action} executed. Result: ${result}]`);
578
685
  } catch (err) {
579
- process.stdout.write('\r' + ' '.repeat(60) + '\r');
686
+ process.stdout.write('\r' + ' '.repeat(80) + '\r');
580
687
  console.log(` ${R}Error executing ${action}: ${err.message}${NC}\n`);
581
688
  addMessages(conv, input, response + `\n\n[Tool ${action} failed: ${err.message}]`);
582
689
  }
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 = '9.1.0';
8
+ export const VERSION = '9.1.1';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11