nothumanallowed 9.3.6 → 9.3.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": "9.3.6",
3
+ "version": "9.3.7",
4
4
  "description": "NotHumanAllowed — 38 AI agents + 58 tools + browser automation + web search. Streaming chat, headless Chrome CDP, multi-conversation, export. Gmail, Calendar, Drive, GitHub, Notion, Slack. Zero-dependency CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -987,7 +987,7 @@ export async function cmdUI(args) {
987
987
  let fullResponse;
988
988
  if (toolResults.length > 0) {
989
989
  // Second LLM call with real tool results — forces the LLM to use actual data
990
- const toolContext = toolResults.map(t => `[${t.action} result]: ${t.result}`).join('\n\n');
990
+ const toolContext = toolResults.map(t => `[${t.action} result]: ${t.result.slice(0, 3000)}`).join('\n\n');
991
991
  const followUp = `The user asked: "${body.message}"\n\nI executed these tools and got REAL results:\n\n${toolContext}\n\nNow respond to the user based ONLY on the REAL data above. Do NOT invent or fabricate any information. Present the actual results clearly.`;
992
992
  try {
993
993
  fullResponse = await callLLM(config, enrichedSystemPrompt, followUp);
@@ -1214,7 +1214,7 @@ export async function cmdUI(args) {
1214
1214
  // If tools were executed, make a second LLM call with results
1215
1215
  let finalResponse = fullResponse;
1216
1216
  if (toolResults.length > 0) {
1217
- const toolContext = toolResults.map(t => `[${t.action} result]: ${t.result}`).join('\n\n');
1217
+ const toolContext = toolResults.map(t => `[${t.action} result]: ${t.result.slice(0, 3000)}`).join('\n\n');
1218
1218
  const followUp = `The user asked: "${msg}"\n\nI executed these tools and got REAL results:\n\n${toolContext}\n\nNow respond to the user based ONLY on the REAL data above. Present the actual results clearly.`;
1219
1219
  sendSSE('tool_synthesis', {});
1220
1220
  try {
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 = '9.3.6';
8
+ export const VERSION = '9.3.7';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -483,7 +483,8 @@ function sendChat(){
483
483
  chatHistory.push({role:'assistant',content:''});
484
484
  renderMessages();
485
485
  var streamIdx=chatHistory.length-1;
486
- var payload={message:msg,history:chatHistory.slice(0,-1),conversationId:activeConvId};
486
+ var cleanHistory=chatHistory.slice(0,-1).map(function(m){return{role:m.role,content:(m.content||'').replace(/!\\[Screenshot\\]\\(data:image\\/[^)]+\\)/g,'[Screenshot was shown]').slice(0,4000)};});
487
+ var payload={message:msg,history:cleanHistory,conversationId:activeConvId};
487
488
 
488
489
  fetch(API+'/api/chat/stream',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(payload)}).then(function(response){
489
490
  if(!response.ok||!response.body){chatHistory[streamIdx].content='Error: connection failed';chatStreaming=false;renderMessages();return;}