nothumanallowed 12.1.0 → 12.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": "12.1.0",
3
+ "version": "12.1.1",
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": {
@@ -107,7 +107,17 @@ export async function cmdAsk(args) {
107
107
  const imagePrompt = userMessage || 'Describe this image in detail. Extract any text, data, or important information.';
108
108
  let response = '';
109
109
 
110
- if (provider === 'anthropic') {
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);
120
+ } else if (provider === 'anthropic') {
111
121
  const res = await fetch('https://api.anthropic.com/v1/messages', {
112
122
  method: 'POST',
113
123
  headers: { 'Content-Type': 'application/json', 'x-api-key': apiKey, 'anthropic-version': '2023-06-01' },
@@ -1206,7 +1206,17 @@ export async function cmdUI(args) {
1206
1206
  const imagePrompt = body.message || 'Describe this image in detail. Extract any text or important information.';
1207
1207
  let visionResponse = '';
1208
1208
 
1209
- if (provider === 'anthropic') {
1209
+ if (provider === 'nha') {
1210
+ // NHA Free tier — Liara Vision (zero API key)
1211
+ const r = await fetch('https://nothumanallowed.com/api/v1/liara/vision', {
1212
+ method: 'POST',
1213
+ headers: { 'Content-Type': 'application/json' },
1214
+ body: JSON.stringify({ image_base64: body.imageBase64, prompt: imagePrompt }),
1215
+ });
1216
+ if (!r.ok) throw new Error(`Liara Vision ${r.status}`);
1217
+ const d = await r.json();
1218
+ visionResponse = d.description || d.text || JSON.stringify(d);
1219
+ } else if (provider === 'anthropic') {
1210
1220
  const r = await fetch('https://api.anthropic.com/v1/messages', {
1211
1221
  method: 'POST',
1212
1222
  headers: { 'Content-Type': 'application/json', 'x-api-key': apiKey, 'anthropic-version': '2023-06-01' },
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.1.0';
8
+ export const VERSION = '12.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