nothumanallowed 13.2.59 → 13.2.61
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.2.
|
|
3
|
+
"version": "13.2.61",
|
|
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.61';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|
|
@@ -37,7 +37,10 @@ async function calFetch(config, urlPath, options = {}) {
|
|
|
37
37
|
throw new Error(`Calendar API ${res.status}: ${err}`);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
if (res.status === 204 || res.headers.get('content-length') === '0') return {};
|
|
41
|
+
const text = await res.text();
|
|
42
|
+
if (!text) return {};
|
|
43
|
+
try { return JSON.parse(text); } catch { return {}; }
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
/**
|
|
@@ -44,7 +44,10 @@ async function graphFetch(config, urlPath, options = {}) {
|
|
|
44
44
|
throw new Error(`Microsoft Calendar API ${res.status}: ${err}`);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
if (res.status === 204 || res.headers.get('content-length') === '0') return {};
|
|
48
|
+
const text = await res.text();
|
|
49
|
+
if (!text) return {};
|
|
50
|
+
try { return JSON.parse(text); } catch { return {}; }
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
/**
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -1180,15 +1180,19 @@ function loadMonthEvents(){
|
|
|
1180
1180
|
function calPrev(){calMonth--;if(calMonth<0){calMonth=11;calYear--}renderCalendar(document.getElementById('content'))}
|
|
1181
1181
|
function calNext(){calMonth++;if(calMonth>11){calMonth=0;calYear++}renderCalendar(document.getElementById('content'))}
|
|
1182
1182
|
|
|
1183
|
+
var _calDayEvts=[];
|
|
1184
|
+
var _calDayStr='';
|
|
1183
1185
|
function openDayDetail(dateStr){
|
|
1184
1186
|
var evts=calEventsCache[dateStr]||[];
|
|
1187
|
+
_calDayEvts=evts;
|
|
1188
|
+
_calDayStr=dateStr;
|
|
1185
1189
|
var dayLabel=new Date(dateStr+'T12:00:00').toLocaleDateString('en',{weekday:'long',month:'long',day:'numeric',year:'numeric'});
|
|
1186
1190
|
|
|
1187
1191
|
function buildDayHtml(){
|
|
1188
1192
|
var h='<h2 style="color:var(--green);margin-bottom:4px">'+esc(dayLabel)+'</h2>';
|
|
1189
1193
|
h+='<div style="display:flex;align-items:center;gap:8px;margin-bottom:12px">';
|
|
1190
1194
|
h+='<span style="color:var(--dim);font-size:11px">'+dateStr+'</span>';
|
|
1191
|
-
h+='<button onclick="openEventForm(null,
|
|
1195
|
+
h+='<button onclick="openEventForm(null,_calDayStr)" style="margin-left:auto;background:var(--green3);color:var(--bg);padding:5px 12px;border-radius:var(--r);font-size:12px;font-weight:700">+ Add Event</button>';
|
|
1192
1196
|
h+='</div>';
|
|
1193
1197
|
if(evts.length===0){
|
|
1194
1198
|
h+='<div style="color:var(--dim);padding:20px;text-align:center">No events on this day</div>';
|
|
@@ -1202,8 +1206,8 @@ function openDayDetail(dateStr){
|
|
|
1202
1206
|
h+='<div style="color:var(--bright);font-size:15px;font-weight:700;margin-bottom:6px">'+esc(x.summary)+'</div></div>';
|
|
1203
1207
|
if(x.id){
|
|
1204
1208
|
h+='<div style="display:flex;gap:4px;flex-shrink:0">';
|
|
1205
|
-
h+='<button onclick="
|
|
1206
|
-
h+='<button onclick="
|
|
1209
|
+
h+='<button onclick="openEventFormByIdx('+idx+')" style="background:var(--bg2);border:1px solid var(--border);color:var(--text);padding:3px 8px;border-radius:4px;font-size:11px">Edit</button>';
|
|
1210
|
+
h+='<button onclick="deleteCalEventByIdx('+idx+')" style="background:var(--bg2);border:1px solid var(--red);color:var(--red);padding:3px 8px;border-radius:4px;font-size:11px">Delete</button>';
|
|
1207
1211
|
h+='</div>';
|
|
1208
1212
|
}
|
|
1209
1213
|
h+='</div>';
|
|
@@ -1253,10 +1257,20 @@ function refreshDayDetail(dateStr){
|
|
|
1253
1257
|
|
|
1254
1258
|
function deleteCalEvent(calId,eventId,dateStr){
|
|
1255
1259
|
if(!confirm('Delete this event?'))return;
|
|
1256
|
-
apiPost('/api/calendar/'+encodeURIComponent(calId)+'/'+encodeURIComponent(eventId),
|
|
1260
|
+
apiPost('/api/calendar/'+encodeURIComponent(calId)+'/'+encodeURIComponent(eventId),{},'DELETE').then(function(){
|
|
1257
1261
|
refreshDayDetail(dateStr);
|
|
1258
1262
|
}).catch(function(e){alert('Error: '+e.message);});
|
|
1259
1263
|
}
|
|
1264
|
+
function deleteCalEventByIdx(idx){
|
|
1265
|
+
var x=_calDayEvts[idx];if(!x)return;
|
|
1266
|
+
var calId=x.calendarId||'primary';
|
|
1267
|
+
deleteCalEvent(calId,x.id,_calDayStr);
|
|
1268
|
+
}
|
|
1269
|
+
function openEventFormByIdx(idx){
|
|
1270
|
+
var x=_calDayEvts[idx];if(!x)return;
|
|
1271
|
+
var calId=x.calendarId||'primary';
|
|
1272
|
+
openEventForm({id:x.id,calId:calId,summary:x.summary,description:x.description||'',location:x.location||'',start:x.start,end:x.end,isAllDay:x.isAllDay},_calDayStr);
|
|
1273
|
+
}
|
|
1260
1274
|
|
|
1261
1275
|
function openEventForm(evt,dateStr){
|
|
1262
1276
|
var isEdit=evt&&evt.id;
|