nothumanallowed 12.5.3 → 12.5.5
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 +1 -1
- package/src/bootstrap.mjs +7 -1
- package/src/constants.mjs +1 -1
- package/src/services/web-ui.mjs +12 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "12.5.
|
|
3
|
+
"version": "12.5.5",
|
|
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": {
|
package/src/bootstrap.mjs
CHANGED
|
@@ -13,7 +13,13 @@ import { banner, info, ok, fail, warn, progress } from './ui.mjs';
|
|
|
13
13
|
* Check if bootstrap is needed (core files missing).
|
|
14
14
|
*/
|
|
15
15
|
export function needsBootstrap() {
|
|
16
|
-
|
|
16
|
+
if (!fs.existsSync(LEGION_FILE) || !fs.existsSync(AGENTS_DIR)) return true;
|
|
17
|
+
// Also check that at least one agent file exists (dir may be empty after failed install)
|
|
18
|
+
try {
|
|
19
|
+
const files = fs.readdirSync(AGENTS_DIR).filter(f => f.endsWith('.mjs'));
|
|
20
|
+
if (files.length === 0) return true;
|
|
21
|
+
} catch { return true; }
|
|
22
|
+
return false;
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
/**
|
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.
|
|
8
|
+
export const VERSION = '12.5.5';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -939,7 +939,15 @@ function sendChat(){
|
|
|
939
939
|
var payload={message:msg,history:allHistory,conversationId:activeConvId,isRetry:isRetry};
|
|
940
940
|
|
|
941
941
|
fetch(API+'/api/chat/stream',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(payload),signal:chatAbortController.signal}).then(function(response){
|
|
942
|
-
if(!response.ok||!response.body
|
|
942
|
+
if(!response.ok||!response.body||typeof response.body.getReader!=='function'){
|
|
943
|
+
// Fallback for browsers without ReadableStream support — use non-streaming endpoint
|
|
944
|
+
chatHistory[streamIdx].content='Thinking...';renderMessages();
|
|
945
|
+
apiPost('/api/chat',{message:msg,history:allHistory,conversationId:activeConvId,isRetry:isRetry}).then(function(r){
|
|
946
|
+
chatHistory[streamIdx].content=(r&&r.response)||(r&&r.error?'Error: '+r.error:'Error: no response');
|
|
947
|
+
endStreaming();renderMessages();loadConvList();
|
|
948
|
+
});
|
|
949
|
+
return;
|
|
950
|
+
}
|
|
943
951
|
var reader=response.body.getReader();var decoder=new TextDecoder();var buffer='';var currentEvent='';
|
|
944
952
|
function pump(){
|
|
945
953
|
reader.read().then(function(result){
|
|
@@ -2465,7 +2473,9 @@ function askAgent(){
|
|
|
2465
2473
|
}
|
|
2466
2474
|
|
|
2467
2475
|
apiPost('/api/ask', payload).then(function(r){
|
|
2468
|
-
|
|
2476
|
+
if(r&&r.error) resp.textContent='Error: '+r.error;
|
|
2477
|
+
else if(r&&r.response) resp.textContent=r.response;
|
|
2478
|
+
else resp.textContent='Error: no response. Run "nha update" in Termux to download agents.';
|
|
2469
2479
|
// Reset file after ask
|
|
2470
2480
|
attachedFileContent = null;
|
|
2471
2481
|
attachedFileName = null;
|