nothumanallowed 13.5.110 → 13.5.112
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/commands/ui.mjs +13 -1
- package/src/constants.mjs +1 -1
- package/src/services/web-ui.mjs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.112",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). 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/commands/ui.mjs
CHANGED
|
@@ -3740,8 +3740,20 @@ ${attachmentText ? `## ATTACHED FILE CONTENT:\n${attachmentText}\n` : ''}${toolD
|
|
|
3740
3740
|
${contextBlock}
|
|
3741
3741
|
Your task: ${stepPrompt}`;
|
|
3742
3742
|
sysPrompt = agentInstruction;
|
|
3743
|
+
// TravelAgent: give specific guidance so HERALD presents alternatives + booking links
|
|
3744
|
+
const isTravelStep = agent === 'TravelAgent';
|
|
3745
|
+
// Extract city/cuisine from toolData header (format: "# TravelAgent — Risultati per: Mantova | Cucina: sushi")
|
|
3746
|
+
const _travelCityM = toolData && toolData.match(/Risultati per:\s*([^|#\n]+)/);
|
|
3747
|
+
const _travelCuisineM = toolData && toolData.match(/Cucina:\s*([^|#\n]+)/);
|
|
3748
|
+
const _travelCity = _travelCityM ? _travelCityM[1].trim() : '';
|
|
3749
|
+
const _travelCuisine = _travelCuisineM ? _travelCuisineM[1].trim() : '';
|
|
3750
|
+
const _theforkUrl = 'https://www.thefork.it/ristoranti/' + (_travelCity ? encodeURIComponent(_travelCity.toLowerCase()) : 'italia') + (_travelCuisine ? '?q=' + encodeURIComponent(_travelCuisine) : '');
|
|
3751
|
+
const _bookingUrl = 'https://www.booking.com/searchresults.html?ss=' + encodeURIComponent(_travelCity || 'Italia') + '&group_adults=2&no_rooms=1';
|
|
3752
|
+
const _tripadUrl = 'https://www.tripadvisor.it/Search?q=' + encodeURIComponent((_travelCuisine ? _travelCuisine + ' ' : '') + _travelCity);
|
|
3743
3753
|
userMsg = toolData
|
|
3744
|
-
?
|
|
3754
|
+
? (isTravelStep
|
|
3755
|
+
? `Present the travel results in Italian with these sections:\n\n## Ristoranti\nList every restaurant from the data with name, address, phone, website, OSM map link. If the requested cuisine (${_travelCuisine || 'richiesta'}) was NOT found, say "Nessun ristorante [cucina] trovato su OpenStreetMap nella zona" then list the alternative restaurants found.\n\n## Alloggi\nList every accommodation from the data with type (Hotel/B&B/Ostello/Agriturismo), name, address, website, OSM map link.\n\n## Prenota online\nAdd these direct booking links:\n- **Ristoranti su TheFork**: ${_theforkUrl}\n- **Hotel/B&B su Booking.com**: ${_bookingUrl}\n- **Recensioni su TripAdvisor**: ${_tripadUrl}\n\nDo NOT invent any data not in the sections above.`
|
|
3756
|
+
: `Summarize and analyze the REAL data above. Do not add anything not present in the data.`)
|
|
3745
3757
|
: context
|
|
3746
3758
|
? `Based ONLY on the previous agent outputs above, complete: ${stepPrompt}`
|
|
3747
3759
|
: stepPrompt;
|
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 = '13.5.
|
|
8
|
+
export const VERSION = '13.5.112';
|
|
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
|
@@ -929,7 +929,7 @@ function sendChat(){
|
|
|
929
929
|
}
|
|
930
930
|
if(chatAttachedImage){payload.imageBase64=chatAttachedImage.base64;payload.imageMimeType=chatAttachedImage.mimeType;}
|
|
931
931
|
clearChatAttach();
|
|
932
|
-
|
|
932
|
+
fetch(API+'/api/chat',{method:'POST',headers:{'Content-Type':'application/json','x-nha-client':'web-ui'},body:JSON.stringify(payload)}).then(function(r){return r.json();}).then(function(r){
|
|
933
933
|
chatHistory.pop();
|
|
934
934
|
if(r&&r.response){chatHistory.push({role:'assistant',content:r.response})}
|
|
935
935
|
else if(r&&r.error){chatHistory.push({role:'assistant',content:'Error: '+r.error})}
|
|
@@ -952,7 +952,7 @@ function sendChat(){
|
|
|
952
952
|
var allHistory=chatHistory.slice(0,-1).map(function(m){return{role:m.role,content:(m.content||'').replace(/!\\[Screenshot\\]\\(data:image\\/[^)]+\\)/g,'[Screenshot taken]')};});
|
|
953
953
|
var payload={message:msg,history:allHistory,conversationId:activeConvId,isRetry:isRetry};
|
|
954
954
|
|
|
955
|
-
fetch(API+'/api/chat/stream',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(payload),signal:chatAbortController.signal}).then(function(response){
|
|
955
|
+
fetch(API+'/api/chat/stream',{method:'POST',headers:{'Content-Type':'application/json','x-nha-client':'web-ui'},body:JSON.stringify(payload),signal:chatAbortController.signal}).then(function(response){
|
|
956
956
|
if(!response.ok||!response.body||typeof response.body.getReader!=='function'){
|
|
957
957
|
// Fallback for browsers without ReadableStream support - use non-streaming endpoint
|
|
958
958
|
chatHistory[streamIdx].content='Thinking...';renderMessages();
|