nothumanallowed 13.2.54 → 13.2.56
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/constants.mjs +1 -1
- package/src/services/web-ui.mjs +26 -20
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.56",
|
|
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/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.2.
|
|
8
|
+
export const VERSION = '13.2.56';
|
|
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
|
@@ -1234,10 +1234,7 @@ function openDayDetail(dateStr){
|
|
|
1234
1234
|
// ---- GITHUB ----
|
|
1235
1235
|
var ghData=null;var ghRepo='';
|
|
1236
1236
|
function renderGitHub(el){
|
|
1237
|
-
|
|
1238
|
-
apiGet('/api/github').then(function(r){
|
|
1239
|
-
if(r&&r.error){el.innerHTML='<div class="card" style="text-align:center;padding:30px"><div style="color:var(--dim);margin-bottom:8px">'+esc(r.error)+'</div><div style="font-size:11px;color:var(--dim)">Run: nha config set github-token YOUR_PAT</div></div>';return}
|
|
1240
|
-
ghData=r;
|
|
1237
|
+
function renderGhData(r){
|
|
1241
1238
|
var h='<div style="display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap"><input type="text" id="ghRepo" placeholder="owner/repo" value="'+esc(ghRepo)+'" style="flex:1;min-width:180px;font-size:13px;padding:10px 14px" onkeydown="if(event.key===\\x27Enter\\x27)loadGhIssues()"><button onclick="loadGhIssues()" style="background:var(--green3);color:var(--bg);padding:8px 16px;border-radius:var(--r);font-weight:700;font-size:12px">Issues</button><button onclick="loadGhPRs()" style="background:var(--cyan);color:var(--bg);padding:8px 16px;border-radius:var(--r);font-weight:700;font-size:12px">PRs</button></div>';
|
|
1242
1239
|
var notifs=r.notifications||[];
|
|
1243
1240
|
if(notifs.length>0){
|
|
@@ -1245,20 +1242,28 @@ function renderGitHub(el){
|
|
|
1245
1242
|
notifs.forEach(function(n){h+='<div class="card" style="padding:10px 14px;cursor:pointer" onclick="window.open(\\x27'+esc(n.url)+'\\x27,\\x27_blank\\x27)"><span style="color:var(--cyan);font-size:11px">'+esc(n.repo)+'</span> <span style="color:var(--dim);font-size:10px">['+esc(n.type)+']</span><div style="font-size:13px;margin-top:2px">'+esc(n.title)+'</div><div style="font-size:10px;color:var(--dim)">'+esc(n.reason)+' · '+esc(n.updated)+'</div></div>'});
|
|
1246
1243
|
}
|
|
1247
1244
|
if(r.issues&&r.issues.length>0){
|
|
1248
|
-
h+='<div class="section-title">Issues</div>';
|
|
1249
|
-
r.issues.forEach(function(i){h+='<div class="card" style="padding:10px 14px;cursor:pointer" onclick="window.open(\\x27'+esc(i.url)+'\\x27,\\x27_blank\\x27)"><span style="color:var(--green);font-weight:700">#'+i.number+'</span> '+esc(i.title)+(i.assignee?' <span style="font-size:10px;color:var(--cyan)"
|
|
1245
|
+
h+='<div class="section-title">Issues — '+esc(r.repo||ghRepo)+'</div>';
|
|
1246
|
+
r.issues.forEach(function(i){h+='<div class="card" style="padding:10px 14px;cursor:pointer" onclick="window.open(\\x27'+esc(i.url)+'\\x27,\\x27_blank\\x27)"><span style="color:var(--green);font-weight:700">#'+i.number+'</span> '+esc(i.title)+(i.assignee?' <span style="font-size:10px;color:var(--cyan)">→ '+esc(i.assignee)+'</span>':'')+(i.labels?'<span style="font-size:9px;color:var(--amber);margin-left:6px">['+esc(i.labels)+']</span>':'')+'<div style="font-size:10px;color:var(--dim)">'+esc(i.updated)+'</div></div>'});
|
|
1250
1247
|
}
|
|
1251
1248
|
if(r.prs&&r.prs.length>0){
|
|
1252
|
-
h+='<div class="section-title">Pull Requests</div>';
|
|
1249
|
+
h+='<div class="section-title">Pull Requests — '+esc(r.repo||ghRepo)+'</div>';
|
|
1253
1250
|
r.prs.forEach(function(p){h+='<div class="card" style="padding:10px 14px;cursor:pointer" onclick="window.open(\\x27'+esc(p.url)+'\\x27,\\x27_blank\\x27)"><span style="color:var(--cyan);font-weight:700">#'+p.number+'</span> '+esc(p.title)+' <span style="font-size:10px;color:var(--dim)">by '+esc(p.author)+'</span>'+(p.draft?'<span style="font-size:9px;color:var(--amber)"> DRAFT</span>':'')+'<div style="font-size:10px;color:var(--dim)">'+esc(p.updated)+'</div></div>'});
|
|
1254
1251
|
}
|
|
1255
|
-
if(!notifs.length&&!r.issues
|
|
1252
|
+
if(!notifs.length&&!(r.issues&&r.issues.length)&&!(r.prs&&r.prs.length)){h+='<div class="card" style="text-align:center;color:var(--dim);padding:20px">Enter a repo above (e.g. owner/repo) and click Issues or PRs.<br>Notifications load automatically.</div>'}
|
|
1256
1253
|
el.innerHTML=h;
|
|
1254
|
+
}
|
|
1255
|
+
// If ghData already loaded (e.g. after loadGhIssues/loadGhPRs), render directly without re-fetching
|
|
1256
|
+
if(ghData){renderGhData(ghData);return;}
|
|
1257
|
+
el.innerHTML='<div style="text-align:center;padding:40px"><div class="spinner"></div><div style="color:var(--dim)">Loading GitHub...</div></div>';
|
|
1258
|
+
apiGet('/api/github').then(function(r){
|
|
1259
|
+
if(r&&r.error){el.innerHTML='<div class="card" style="text-align:center;padding:30px"><div style="color:var(--dim);margin-bottom:8px">'+esc(r.error)+'</div><div style="font-size:11px;color:var(--dim)">Run: nha config set github-token YOUR_PAT</div></div>';return}
|
|
1260
|
+
ghData=r;
|
|
1261
|
+
renderGhData(r);
|
|
1257
1262
|
});
|
|
1258
1263
|
}
|
|
1259
|
-
function loadGhIssues(){var inp=document.getElementById('ghRepo');if(!inp||!inp.value.trim())return;ghRepo=inp.value.trim();var el=document.getElementById('content');el.innerHTML='<div style="text-align:center;padding:40px"><div class="spinner"></div></div>';apiGet('/api/github/issues?repo='+encodeURIComponent(ghRepo)).then(function(r){if(ghData){ghData.issues=r.issues||[];ghData.repo=r.repo}
|
|
1260
|
-
function loadGhPRs(){var inp=document.getElementById('ghRepo');if(!inp||!inp.value.trim())return;ghRepo=inp.value.trim();var el=document.getElementById('content');el.innerHTML='<div style="text-align:center;padding:40px"><div class="spinner"></div></div>';apiGet('/api/github/prs?repo='+encodeURIComponent(ghRepo)).then(function(r){if(ghData){ghData.prs=r.prs||[];ghData.repo=r.repo}
|
|
1261
|
-
function ghMarkRead(){apiPost('/api/github/mark-read',{}).then(function(){if(ghData)ghData.notifications=[];
|
|
1264
|
+
function loadGhIssues(){var inp=document.getElementById('ghRepo');if(!inp||!inp.value.trim())return;ghRepo=inp.value.trim();var el=document.getElementById('content');el.innerHTML='<div style="text-align:center;padding:40px"><div class="spinner"></div></div>';apiGet('/api/github/issues?repo='+encodeURIComponent(ghRepo)).then(function(r){if(ghData){ghData.issues=r.issues||[];ghData.prs=ghData.prs||[];ghData.repo=r.repo}else{ghData={issues:r.issues||[],prs:[],notifications:[]}}renderGitHub(document.getElementById('content'))})}
|
|
1265
|
+
function loadGhPRs(){var inp=document.getElementById('ghRepo');if(!inp||!inp.value.trim())return;ghRepo=inp.value.trim();var el=document.getElementById('content');el.innerHTML='<div style="text-align:center;padding:40px"><div class="spinner"></div></div>';apiGet('/api/github/prs?repo='+encodeURIComponent(ghRepo)).then(function(r){if(ghData){ghData.prs=r.prs||[];ghData.issues=ghData.issues||[];ghData.repo=r.repo}else{ghData={prs:r.prs||[],issues:[],notifications:[]}}renderGitHub(document.getElementById('content'))})}
|
|
1266
|
+
function ghMarkRead(){apiPost('/api/github/mark-read',{}).then(function(){if(ghData)ghData.notifications=[];renderGitHub(document.getElementById('content'))})}
|
|
1262
1267
|
|
|
1263
1268
|
// ---- NOTION ----
|
|
1264
1269
|
function renderNotion(el){
|
|
@@ -2619,15 +2624,16 @@ function showToast(type, title, body, durationMs) {
|
|
|
2619
2624
|
var ws = null;
|
|
2620
2625
|
var wsReconnectTimer = null;
|
|
2621
2626
|
var wsRetryCount = 0;
|
|
2622
|
-
var
|
|
2627
|
+
var wsRetryDelay = 2000; // start at 2s, exponential backoff up to 30s
|
|
2623
2628
|
function connectWebSocket() {
|
|
2624
|
-
if (
|
|
2629
|
+
if (wsReconnectTimer) return; // already scheduled
|
|
2625
2630
|
try {
|
|
2626
2631
|
ws = new WebSocket('ws://' + window.location.host);
|
|
2627
2632
|
} catch(e) { return; }
|
|
2628
2633
|
|
|
2629
2634
|
ws.onopen = function() {
|
|
2630
2635
|
wsRetryCount = 0;
|
|
2636
|
+
wsRetryDelay = 2000;
|
|
2631
2637
|
var indicator = document.getElementById('wsIndicator');
|
|
2632
2638
|
if (indicator) { indicator.style.color = 'var(--green)'; indicator.title = 'Live updates: connected'; }
|
|
2633
2639
|
};
|
|
@@ -2641,15 +2647,15 @@ function connectWebSocket() {
|
|
|
2641
2647
|
|
|
2642
2648
|
ws.onclose = function() {
|
|
2643
2649
|
var indicator = document.getElementById('wsIndicator');
|
|
2644
|
-
if (indicator) { indicator.style.color = 'var(--dim)'; indicator.title = 'Live updates:
|
|
2650
|
+
if (indicator) { indicator.style.color = 'var(--dim)'; indicator.title = 'Live updates: reconnecting...'; }
|
|
2645
2651
|
ws = null;
|
|
2646
2652
|
wsRetryCount++;
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
}
|
|
2653
|
+
var delay = Math.min(wsRetryDelay * Math.pow(1.5, Math.min(wsRetryCount - 1, 6)), 30000);
|
|
2654
|
+
wsRetryDelay = delay;
|
|
2655
|
+
wsReconnectTimer = setTimeout(function() {
|
|
2656
|
+
wsReconnectTimer = null;
|
|
2657
|
+
connectWebSocket();
|
|
2658
|
+
}, delay);
|
|
2653
2659
|
};
|
|
2654
2660
|
|
|
2655
2661
|
ws.onerror = function() {
|