nothumanallowed 12.5.6 → 12.5.7

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": "12.5.6",
3
+ "version": "12.5.7",
4
4
  "description": "NotHumanAllowed — 38 AI agents, 80 tools. 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": {
@@ -1236,9 +1236,7 @@ export async function cmdUI(args) {
1236
1236
  }
1237
1237
 
1238
1238
  if (!config.llm.apiKey && config.llm.provider !== 'nha') {
1239
- 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' });
1240
- logRequest(method, pathname, 200, Date.now() - start);
1241
- return;
1239
+ config.llm.provider = 'nha'; // Auto-fallback to free tier
1242
1240
  }
1243
1241
 
1244
1242
  // Build message with rolling context (same strategy as streaming path)
@@ -1695,7 +1693,7 @@ export async function cmdUI(args) {
1695
1693
  if (method === 'POST' && pathname === '/api/chat/stream') {
1696
1694
  const body = await parseBody(req);
1697
1695
  if (!body.message) { sendJSON(res, 400, { error: 'message required' }); logRequest(method, pathname, 400, Date.now() - start); return; }
1698
- if (!config.llm.apiKey && config.llm.provider !== 'nha') { sendJSON(res, 200, { error: 'no_api_key' }); logRequest(method, pathname, 200, Date.now() - start); return; }
1696
+ if (!config.llm.apiKey && config.llm.provider !== 'nha') { config.llm.provider = 'nha'; }
1699
1697
 
1700
1698
  const msg = body.message.trim();
1701
1699
  const convId = body.conversationId;
@@ -2193,9 +2191,8 @@ export async function cmdUI(args) {
2193
2191
  }
2194
2192
 
2195
2193
  if (!config.llm.apiKey && config.llm.provider !== 'nha') {
2196
- sendJSON(res, 200, { response: null, error: 'No API key configured.' });
2197
- logRequest(method, pathname, 200, Date.now() - start);
2198
- return;
2194
+ // Auto-fallback to NHA free tier if no API key is configured
2195
+ config.llm.provider = 'nha';
2199
2196
  }
2200
2197
 
2201
2198
  // Allow both built-in and custom agents
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 = '12.5.6';
8
+ export const VERSION = '12.5.7';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11