nothumanallowed 13.5.178 → 13.5.180

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": "13.5.178",
3
+ "version": "13.5.180",
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": {
@@ -715,8 +715,12 @@ export async function cmdUI(args) {
715
715
  desc: d.hourly?.[4]?.weatherDesc?.[0]?.value || '',
716
716
  rain: d.hourly?.[4]?.chanceofrain || '0',
717
717
  }));
718
+ // Use the user-provided location as display name — wttr.in nearest_area
719
+ // often resolves to a nearby suburb (e.g. "Modena" → "Sant'Agnese") which
720
+ // is confusing. The weather data itself is correct regardless.
721
+ const displayCity = loc.includes(',') ? loc.split(',')[0].trim() : loc;
718
722
  sendJSON(res, 200, {
719
- city: area?.areaName?.[0]?.value || loc,
723
+ city: displayCity,
720
724
  country: area?.country?.[0]?.value || '',
721
725
  tempC: cur.temp_C,
722
726
  feelsC: cur.FeelsLikeC,
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.178';
8
+ export const VERSION = '13.5.180';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -28,7 +28,9 @@ function renderMd(raw) {
28
28
  var reTriple = new RegExp(BT+BT+BT+'[a-z]*[\\s\\S]*?'+BT+BT+BT,'g');
29
29
  var reSingle = new RegExp(BT+'([^'+BT+']{1,200})'+BT,'g');
30
30
  s = s.replace(reTriple, function(m){
31
- var inner=m.replace(new RegExp(BT+BT+BT+'[a-z]*'),'').replace(new RegExp(BT+BT+BT),'');
31
+ var inner=m.replace(new RegExp(BT+BT+BT+'[a-z]*'),'').replace(new RegExp(BT+BT+BT),'').trim();
32
+ // Suppress NHA tool action blocks — they are internal and already executed
33
+ if(inner.indexOf('"action"')!==-1&&inner.indexOf('"params"')!==-1)return '';
32
34
  return '<pre class="md-code"><code>'+inner+'</code></pre>';
33
35
  });
34
36
  // Inline code (single backtick)
@@ -309,9 +311,10 @@ function loadWeather(){
309
311
  var latLng=pos.coords.latitude.toFixed(4)+','+pos.coords.longitude.toFixed(4);
310
312
  fetchWeather(latLng);
311
313
  // Also resolve city name for display — save for next time
312
- fetch('https://nominatim.openstreetmap.org/reverse?lat='+pos.coords.latitude+'&lon='+pos.coords.longitude+'&format=json&accept-language=en')
314
+ fetch('https://nominatim.openstreetmap.org/reverse?lat='+pos.coords.latitude+'&lon='+pos.coords.longitude+'&format=json&accept-language=en&zoom=10')
313
315
  .then(function(r){return r.json();}).then(function(d){
314
- var city=d.address&&(d.address.city||d.address.town||d.address.village||d.address.county||'');
316
+ // zoom=10 = city level — avoids resolving to suburbs/villages
317
+ var city=d.address&&(d.address.city||d.address.town||d.address.county||'');
315
318
  if(city)localStorage.setItem('nha_weather_location',city);
316
319
  }).catch(function(){});
317
320
  },function(){ipFallback();},{timeout:6000,maximumAge:300000});