nothumanallowed 13.2.62 → 13.2.64

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.62",
3
+ "version": "13.2.64",
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.62';
8
+ export const VERSION = '13.2.64';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -103,15 +103,22 @@ export async function getTodayEvents(config) {
103
103
  const events = await listEvents(config, cal.id, startOfDay, endOfDay);
104
104
  for (const e of events) {
105
105
  e.calendarName = cal.summary;
106
- e.calendarId = cal.id; // ensure real calendarId is set
106
+ e.calendarId = cal.id;
107
+ e.readOnly = cal.accessRole === 'reader' || cal.accessRole === 'freeBusyReader';
107
108
  allEvents.push(e);
108
109
  }
109
110
  } catch { /* skip failed calendars */ }
110
111
  }
111
112
 
112
- // Sort by start time
113
+ // Sort by start time, then deduplicate same-day same-title events (holiday feeds)
113
114
  allEvents.sort((a, b) => new Date(a.start).getTime() - new Date(b.start).getTime());
114
- return allEvents;
115
+ const seen = new Set();
116
+ return allEvents.filter(e => {
117
+ const key = (e.start || '').slice(0, 10) + '|' + (e.summary || '').toLowerCase().trim();
118
+ if (seen.has(key)) return false;
119
+ seen.add(key);
120
+ return true;
121
+ });
115
122
  }
116
123
 
117
124
  /**
@@ -132,12 +139,21 @@ export async function getEventsForDate(config, date) {
132
139
  for (const e of events) {
133
140
  e.calendarName = cal.summary;
134
141
  e.calendarId = cal.id;
142
+ e.readOnly = cal.accessRole === 'reader' || cal.accessRole === 'freeBusyReader';
135
143
  allEvents.push(e);
136
144
  }
137
145
  } catch { /* skip */ }
138
146
  }
139
147
  allEvents.sort((a, b) => new Date(a.start).getTime() - new Date(b.start).getTime());
140
- return allEvents;
148
+
149
+ // Deduplicate: same start date + same normalized title = same event (e.g. IT + EN holiday feeds)
150
+ const seen = new Set();
151
+ const deduped = [];
152
+ for (const e of allEvents) {
153
+ const key = (e.start || '').slice(0, 10) + '|' + (e.summary || '').toLowerCase().trim();
154
+ if (!seen.has(key)) { seen.add(key); deduped.push(e); }
155
+ }
156
+ return deduped;
141
157
  }
142
158
 
143
159
  /**
@@ -1204,12 +1204,15 @@ function openDayDetail(dateStr){
1204
1204
  h+='<div style="display:flex;align-items:flex-start;gap:6px;margin-bottom:4px">';
1205
1205
  h+='<div style="flex:1"><div style="color:var(--amber);font-weight:700;font-size:13px;margin-bottom:4px">'+esc(timeStr)+'</div>';
1206
1206
  h+='<div style="color:var(--bright);font-size:15px;font-weight:700;margin-bottom:6px">'+esc(x.summary)+'</div></div>';
1207
- if(x.id){
1207
+ if(x.id&&!x.readOnly){
1208
1208
  h+='<div style="display:flex;gap:4px;flex-shrink:0">';
1209
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
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>';
1211
1211
  h+='</div>';
1212
1212
  }
1213
+ if(x.readOnly){
1214
+ h+='<span style="font-size:9px;color:var(--dim);flex-shrink:0;padding-top:2px">read-only</span>';
1215
+ }
1213
1216
  h+='</div>';
1214
1217
  if(x.location)h+='<div style="color:var(--cyan);font-size:12px;margin-bottom:4px">Location: '+esc(x.location)+'</div>';
1215
1218
  if(x.organizer)h+='<div style="color:var(--dim);font-size:11px;margin-bottom:4px">Organizer: '+esc(x.organizer)+'</div>';