nothumanallowed 11.5.2 → 11.5.4

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": "11.5.2",
3
+ "version": "11.5.4",
4
4
  "description": "NotHumanAllowed — 38 AI agents, 53 tools. Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, GitHub, Notion, Slack, voice chat, 28 languages. Zero-dependency CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -496,7 +496,7 @@ export async function cmdUI(args) {
496
496
  connected: true,
497
497
  version: VERSION,
498
498
  provider: config.llm.provider,
499
- hasApiKey: !!config.llm.apiKey,
499
+ hasApiKey: !!config.llm.apiKey || config.llm.provider === 'nha',
500
500
  hasGoogle: !!config.google?.clientId,
501
501
  hasMicrosoft: !!config.microsoft?.clientId,
502
502
  mailProvider: detectMailProvider(config),
@@ -535,7 +535,7 @@ export async function cmdUI(args) {
535
535
  profile: config.profile || {},
536
536
  provider: config.llm?.provider || '',
537
537
  model: config.llm?.model || '',
538
- hasApiKey: !!config.llm?.apiKey,
538
+ hasApiKey: !!config.llm?.apiKey || config.llm?.provider === 'nha',
539
539
  planTime: config.ops?.planTime || '07:00',
540
540
  summaryTime: config.ops?.summaryTime || '18:00',
541
541
  meetingAlert: config.ops?.meetingAlertMinutes || 30,
@@ -1087,10 +1087,8 @@ export async function cmdUI(args) {
1087
1087
  }
1088
1088
  }
1089
1089
 
1090
- if (!config.llm.apiKey) {
1091
- if (config.llm.provider !== 'nha') {
1092
- sendJSON(res, 200, { response: 'No API key configured. Run: nha config set key YOUR_KEY\nOr use NHA Free (no key needed): nha config set provider nha', error: 'no_api_key' });
1093
- }
1090
+ if (!config.llm.apiKey && config.llm.provider !== 'nha') {
1091
+ sendJSON(res, 200, { response: 'No API key configured. Run: nha config set key YOUR_KEY\nOr use NHA Free (no key needed): nha config set provider nha', error: 'no_api_key' });
1094
1092
  logRequest(method, pathname, 200, Date.now() - start);
1095
1093
  return;
1096
1094
  }
@@ -1916,7 +1914,7 @@ export async function cmdUI(args) {
1916
1914
  return;
1917
1915
  }
1918
1916
 
1919
- if (!config.llm.apiKey) {
1917
+ if (!config.llm.apiKey && config.llm.provider !== 'nha') {
1920
1918
  sendJSON(res, 200, { response: null, error: 'No API key configured.' });
1921
1919
  logRequest(method, pathname, 200, Date.now() - start);
1922
1920
  return;
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 = '11.5.2';
8
+ export const VERSION = '11.5.4';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -2054,14 +2054,42 @@ function settingsSection(id, title, desc, fields) {
2054
2054
  try { var cfg = JSON.parse(localStorage.getItem('nha_config_cache') || '{}'); currentVal = cfg[key] || ''; } catch(e) {}
2055
2055
 
2056
2056
  h += '<div style="margin-bottom:10px">' +
2057
- '<label style="display:block;font-size:11px;color:var(--dim);margin-bottom:3px">' + esc(label) + '</label>' +
2058
- '<input type="' + (isSecret ? 'password' : 'text') + '" ' +
2057
+ '<label style="display:block;font-size:11px;color:var(--dim);margin-bottom:3px">' + esc(label) + '</label>';
2058
+
2059
+ if (key === 'provider') {
2060
+ // Dropdown for provider selection
2061
+ var providers = [
2062
+ {value:'nha',label:'NHA Free (Liara) — no API key needed'},
2063
+ {value:'anthropic',label:'Anthropic (Claude)'},
2064
+ {value:'openai',label:'OpenAI (GPT-4)'},
2065
+ {value:'gemini',label:'Google (Gemini)'},
2066
+ {value:'deepseek',label:'DeepSeek'},
2067
+ {value:'grok',label:'xAI (Grok)'},
2068
+ {value:'mistral',label:'Mistral'},
2069
+ {value:'cohere',label:'Cohere'},
2070
+ ];
2071
+ h += '<select style="width:100%;padding:8px 12px;font-size:13px;background:var(--bg);color:var(--fg);border:1px solid var(--border2);border-radius:var(--r)" data-config-key="provider" data-section="' + esc(id) + '">';
2072
+ for (var pi=0;pi<providers.length;pi++) {
2073
+ var sel = currentVal === providers[pi].value ? ' selected' : '';
2074
+ h += '<option value="' + providers[pi].value + '"' + sel + '>' + providers[pi].label + '</option>';
2075
+ }
2076
+ h += '</select>';
2077
+ } else if (key === 'thinking') {
2078
+ // Dropdown for thinking toggle
2079
+ h += '<select style="width:100%;padding:8px 12px;font-size:13px;background:var(--bg);color:var(--fg);border:1px solid var(--border2);border-radius:var(--r)" data-config-key="thinking" data-section="' + esc(id) + '">' +
2080
+ '<option value="off"' + (currentVal !== 'on' ? ' selected' : '') + '>Off — faster responses</option>' +
2081
+ '<option value="on"' + (currentVal === 'on' ? ' selected' : '') + '>On — extended reasoning (NHA Free only)</option>' +
2082
+ '</select>';
2083
+ } else {
2084
+ h += '<input type="' + (isSecret ? 'password' : 'text') + '" ' +
2059
2085
  'value="' + esc(currentVal) + '" ' +
2060
2086
  'placeholder="' + esc(placeholder) + '" ' +
2061
2087
  'style="width:100%;padding:8px 12px;font-size:13px" ' +
2062
2088
  'data-config-key="' + esc(key) + '" ' +
2063
- 'data-section="' + esc(id) + '">' +
2064
- '</div>';
2089
+ 'data-section="' + esc(id) + '">';
2090
+ }
2091
+
2092
+ h += '</div>';
2065
2093
  }
2066
2094
 
2067
2095
  h += '<div style="display:flex;align-items:center;gap:12px;margin-top:14px">' +
@@ -2077,7 +2105,7 @@ function settingsSection(id, title, desc, fields) {
2077
2105
  }
2078
2106
 
2079
2107
  function saveSettingsSection(sectionId) {
2080
- var inputs = document.querySelectorAll('input[data-section="' + sectionId + '"]');
2108
+ var inputs = document.querySelectorAll('input[data-section="' + sectionId + '"], select[data-section="' + sectionId + '"]');
2081
2109
  var statusEl = document.getElementById('settings-status-' + sectionId);
2082
2110
  if (statusEl) { statusEl.textContent = 'Saving...'; statusEl.style.color = 'var(--amber)'; }
2083
2111