nothumanallowed 17.0.0 → 17.0.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/README.md CHANGED
@@ -27,7 +27,7 @@ nha run "Design a Kubernetes deployment for a 10K RPS API"
27
27
  nha ui
28
28
  ```
29
29
 
30
- **Do I need a local model?** No. You need one LLM, and you choose which: an API key of a cloud provider, or a model running on your machine. A local model is the option that needs no key and sends nothing out. The hosted free tier (Liara) that earlier versions used by default is currently offline: set a provider before the first prompt.
30
+ **Do I need a local model?** No. You need one LLM, and you choose which: an API key of a cloud provider, or a model running on your machine. A local model is the option that needs no key and sends nothing out. Earlier versions started on a hosted free model (Liara). It is offline and no longer the default: a new install has no provider until you set one.
31
31
 
32
32
  ## Studio — Visual Agentic Workflows
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nothumanallowed",
3
- "version": "17.0.0",
3
+ "version": "17.0.1",
4
4
  "description": "Local AI assistant: 80 tools (Gmail, Calendar, Drive, GitHub, Slack, browser, code, files), 38 agents, multi-agent deliberation that runs entirely on your machine (Legion X), visual workflows (Studio, AWF, WebCraft). Install with `npm i -g nothumanallowed`, run with `nha ui`. Bring your own LLM: an API key or a local model (Ollama, any OpenAI-compatible endpoint). Your data stays on your PC — OAuth tokens local, no cloud. Open-source MIT.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.mjs CHANGED
@@ -582,7 +582,7 @@ function cmdConfig(args) {
582
582
  console.log(`\n ${BOLD}NHA Configuration${NC} ${D}(~/.nha/config.json)${NC}\n`);
583
583
 
584
584
  console.log(` ${C}LLM${NC}`);
585
- console.log(` Provider: ${W}${config.llm.provider}${NC}`);
585
+ console.log(` Provider: ${config.llm.provider ? W + config.llm.provider : R + '(not set)'}${NC}`);
586
586
  console.log(` API Key: ${config.llm.apiKey ? G + config.llm.apiKey.slice(0, 12) + '...' + NC : R + '(not set)' + NC}`);
587
587
  if (config.llm.openaiKey) console.log(` OpenAI Key: ${G}${config.llm.openaiKey.slice(0, 12)}...${NC}`);
588
588
  if (config.llm.geminiKey) console.log(` Gemini Key: ${G}${config.llm.geminiKey.slice(0, 12)}...${NC}`);
@@ -10,7 +10,7 @@ import fs from 'fs';
10
10
  import path from 'path';
11
11
  import { loadConfig } from '../config.mjs';
12
12
  import { AGENTS_DIR, AGENTS } from '../constants.mjs';
13
- import { getProviderCall, getApiKey, parseAgentFile } from '../services/llm.mjs';
13
+ import { getProviderCall, getApiKey, hostedOfflineError, parseAgentFile } from '../services/llm.mjs';
14
14
  import { fail, info, ok, C, G, Y, D, W, BOLD, NC, M } from '../ui.mjs';
15
15
 
16
16
  export async function cmdAsk(args) {
@@ -108,15 +108,8 @@ export async function cmdAsk(args) {
108
108
  let response = '';
109
109
 
110
110
  if (provider === 'nha') {
111
- // NHA Free tier — Liara Vision
112
- const res = await fetch('https://nothumanallowed.com/api/v1/liara/vision', {
113
- method: 'POST',
114
- headers: { 'Content-Type': 'application/json' },
115
- body: JSON.stringify({ image_base64: base64, prompt: imagePrompt }),
116
- });
117
- if (!res.ok) throw new Error(`Liara Vision ${res.status}`);
118
- const data = await res.json();
119
- response = data.description || data.text || JSON.stringify(data);
111
+ // The hosted model no longer reads images: nothing is sent to it.
112
+ throw hostedOfflineError();
120
113
  } else if (provider === 'anthropic') {
121
114
  const res = await fetch('https://api.anthropic.com/v1/messages', {
122
115
  method: 'POST',
package/src/config.mjs CHANGED
@@ -11,7 +11,10 @@ const LEGACY_PIF = path.join(os.homedir(), '.pif-agent.json');
11
11
  const DEFAULT_CONFIG = {
12
12
  version: 1,
13
13
  llm: {
14
- provider: 'nha',
14
+ // Empty = not chosen yet. It used to be 'nha', the hosted free model,
15
+ // which is offline: a new install must not start on a provider that
16
+ // cannot answer. A provider saved by an existing user is left as it is.
17
+ provider: '',
15
18
  apiKey: '',
16
19
  openaiKey: '',
17
20
  geminiKey: '',
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 = '17.0.0';
8
+ export const VERSION = '17.0.1';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -1234,22 +1234,8 @@ export async function callLLMVision(config, systemPrompt, userMessage, media) {
1234
1234
  const provider = config.llm.provider || 'anthropic';
1235
1235
  const model = config.llm.model || null;
1236
1236
 
1237
- // NHA Free tier — use Liara Vision (no API key needed)
1238
- if (provider === 'nha') {
1239
- const { base64, mimeType } = media;
1240
- if (!base64) throw new Error('media.base64 required for vision');
1241
- const res = await fetch('https://nothumanallowed.com/api/v1/liara/vision', {
1242
- method: 'POST',
1243
- headers: { 'Content-Type': 'application/json', 'x-nha-client': 'cli' },
1244
- body: JSON.stringify({ image_base64: base64, prompt: userMessage || 'Describe this image in detail.' }),
1245
- });
1246
- if (!res.ok) {
1247
- const err = await res.text().catch(() => '');
1248
- throw new Error(`Liara Vision ${res.status}: ${err.slice(0, 200)}`);
1249
- }
1250
- const data = await res.json();
1251
- return data.description || data.text || JSON.stringify(data);
1252
- }
1237
+ // The hosted model no longer reads images: nothing is sent to it.
1238
+ if (provider === 'nha') throw hostedOfflineError();
1253
1239
 
1254
1240
  const apiKey = getApiKey(config, provider);
1255
1241
  if (!apiKey) throw new Error(`No API key for ${provider}. Vision requires Claude, GPT-4 or Gemini with your own key (nha config set key YOUR_KEY).`);