nothumanallowed 13.5.187 → 13.5.190
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/llm.mjs +2 -2
- package/src/services/tool-executor.mjs +18 -7
- package/src/services/web-ui.mjs +49 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.190",
|
|
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.5.
|
|
8
|
+
export const VERSION = '13.5.190';
|
|
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/llm.mjs
CHANGED
|
@@ -600,7 +600,7 @@ export async function callLLMStream(config, systemPrompt, userMessage, onToken,
|
|
|
600
600
|
function buildRequestBody(provider, model, systemPrompt, userMessage, stream) {
|
|
601
601
|
if (provider === 'anthropic') {
|
|
602
602
|
return {
|
|
603
|
-
model: model || 'claude-sonnet-4-
|
|
603
|
+
model: model || 'claude-sonnet-4-6',
|
|
604
604
|
max_tokens: 8192,
|
|
605
605
|
system: systemPrompt,
|
|
606
606
|
messages: [{ role: 'user', content: userMessage }],
|
|
@@ -617,7 +617,7 @@ function buildRequestBody(provider, model, systemPrompt, userMessage, stream) {
|
|
|
617
617
|
};
|
|
618
618
|
const req = {
|
|
619
619
|
model: model || modelDefaults[provider] || 'gpt-4o',
|
|
620
|
-
max_tokens:
|
|
620
|
+
max_tokens: 8192,
|
|
621
621
|
messages: [
|
|
622
622
|
{ role: 'system', content: systemPrompt },
|
|
623
623
|
{ role: 'user', content: userMessage },
|
|
@@ -160,18 +160,21 @@ TOOLS:
|
|
|
160
160
|
15. calendar_move(eventId: string, newStart: string, newEnd: string)
|
|
161
161
|
Reschedule an event. ALWAYS confirm before moving.
|
|
162
162
|
|
|
163
|
-
16.
|
|
164
|
-
|
|
163
|
+
16. calendar_date(date: string)
|
|
164
|
+
List all events for a specific date (YYYY-MM-DD). Use this when the user asks about a specific day (e.g. "May 13", "next Tuesday"). ALWAYS prefer this over calendar_week when a specific date is mentioned.
|
|
165
|
+
|
|
166
|
+
17. calendar_find(query: string, daysAhead?: number)
|
|
167
|
+
Search for a calendar event by name/keyword in the next N days (default 30). Returns matching events with their IDs.
|
|
165
168
|
ALWAYS use this FIRST when the user wants to modify an event — you need the eventId.
|
|
166
169
|
|
|
167
|
-
|
|
170
|
+
18. calendar_update(eventId: string, summary?: string, location?: string, description?: string, start?: string, end?: string)
|
|
168
171
|
Update ANY field of an existing calendar event: title, location, description, start time, end time.
|
|
169
172
|
You MUST call calendar_find first to get the eventId. Only include fields that need to change. ALWAYS confirm before updating.
|
|
170
173
|
|
|
171
|
-
|
|
174
|
+
19. schedule_meeting(clientName: string, subject: string, location: string, durationMinutes: number, dateFrom: string, dateTo: string, workdayStart?: number, workdayEnd?: number)
|
|
172
175
|
Find optimal meeting slots considering existing calendar events, locations, and estimated travel time between appointments. Returns ranked slots with travel info. dateFrom and dateTo are YYYY-MM-DD.
|
|
173
176
|
|
|
174
|
-
|
|
177
|
+
20. schedule_draft_email(clientName: string, subject: string, location: string, durationMinutes: number, dateFrom: string, dateTo: string)
|
|
175
178
|
Same as schedule_meeting, but also generates a professional email proposing the top 3 slots to the client. Returns both the slots and a ready-to-send email draft.
|
|
176
179
|
|
|
177
180
|
--- TASKS ---
|
|
@@ -597,7 +600,7 @@ Never output a JSON block as a suggestion — every block executes immediately.
|
|
|
597
600
|
AVAILABLE TOOLS:
|
|
598
601
|
gmail_list · gmail_read · gmail_send · gmail_draft · gmail_reply · gmail_mark_read · gmail_mark_unread · gmail_archive · gmail_delete · gmail_send_attach
|
|
599
602
|
imap_accounts · imap_list · imap_read · imap_send · imap_sync · imap_labels · imap_mark_read · imap_reply · imap_thread · imap_search · imap_mark_starred · imap_trash · imap_draft · imap_send_template · imap_bulk_send
|
|
600
|
-
calendar_today · calendar_tomorrow · calendar_upcoming · calendar_week · calendar_create · calendar_move · calendar_find · calendar_update · schedule_meeting · schedule_draft_email
|
|
603
|
+
calendar_today · calendar_tomorrow · calendar_date · calendar_upcoming · calendar_week · calendar_create · calendar_move · calendar_find · calendar_update · schedule_meeting · schedule_draft_email
|
|
601
604
|
task_list · task_add · task_done · task_move · task_delete · task_clear · task_edit
|
|
602
605
|
contact_search · contact_add · contact_update · contact_delete
|
|
603
606
|
gtask_list · gtask_add · gtask_complete
|
|
@@ -1199,6 +1202,14 @@ export async function executeTool(action, params, config) {
|
|
|
1199
1202
|
return formatEvents(events);
|
|
1200
1203
|
}
|
|
1201
1204
|
|
|
1205
|
+
case 'calendar_date': {
|
|
1206
|
+
const dateStr = params.date;
|
|
1207
|
+
if (!dateStr || !/^\d{4}-\d{2}-\d{2}$/.test(dateStr)) return 'Invalid date format. Use YYYY-MM-DD.';
|
|
1208
|
+
const events = await getEventsForDate(config, dateStr);
|
|
1209
|
+
if (events.length === 0) return `No events scheduled for ${dateStr}.`;
|
|
1210
|
+
return formatEvents(events);
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1202
1213
|
case 'calendar_upcoming': {
|
|
1203
1214
|
const hours = params.hours || 2;
|
|
1204
1215
|
const events = await getUpcomingEvents(config, hours);
|
|
@@ -1255,7 +1266,7 @@ export async function executeTool(action, params, config) {
|
|
|
1255
1266
|
|
|
1256
1267
|
case 'calendar_find': {
|
|
1257
1268
|
const query = (params.query || '').toLowerCase();
|
|
1258
|
-
const daysAhead = params.daysAhead ||
|
|
1269
|
+
const daysAhead = params.daysAhead || 30;
|
|
1259
1270
|
const from = new Date();
|
|
1260
1271
|
const to = new Date(from.getTime() + daysAhead * 86400000);
|
|
1261
1272
|
const events = await listEvents(config, 'primary', from, to);
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -7548,6 +7548,7 @@ var _wcTokIn = 0; // global token counters (accumulate across generat
|
|
|
7548
7548
|
var _wcTokOut = 0;
|
|
7549
7549
|
var _wcGenOverlayState = { fi: 0, total: 0, name: '' };
|
|
7550
7550
|
var _wcGenStartTime = 0;
|
|
7551
|
+
var _wcRepairStartTime = 0;
|
|
7551
7552
|
var _wcTimerInterval = null;
|
|
7552
7553
|
|
|
7553
7554
|
function wcGenElapsed() {
|
|
@@ -7556,14 +7557,29 @@ function wcGenElapsed() {
|
|
|
7556
7557
|
return (m > 0 ? m + 'm ' : '') + s + 's';
|
|
7557
7558
|
}
|
|
7558
7559
|
|
|
7560
|
+
function wcRepairElapsed() {
|
|
7561
|
+
var s = Math.floor((Date.now() - _wcRepairStartTime) / 1000);
|
|
7562
|
+
var m = Math.floor(s / 60); s = s % 60;
|
|
7563
|
+
return (m > 0 ? m + 'm ' : '') + s + 's';
|
|
7564
|
+
}
|
|
7565
|
+
|
|
7559
7566
|
function wcStartGenTimer() {
|
|
7560
7567
|
if (_wcTimerInterval) clearInterval(_wcTimerInterval);
|
|
7561
7568
|
_wcTimerInterval = setInterval(function() {
|
|
7562
7569
|
if (!wcState.running && !wcState.repairing) { clearInterval(_wcTimerInterval); _wcTimerInterval = null; return; }
|
|
7563
7570
|
// Always update time in-place — never re-render the whole component
|
|
7564
|
-
|
|
7571
|
+
if (wcState.running) {
|
|
7572
|
+
wcUpdateGenOverlay(_wcGenOverlayState.fi, _wcGenOverlayState.total, _wcGenOverlayState.name);
|
|
7573
|
+
}
|
|
7565
7574
|
var repairTime = document.getElementById('wcRepairTime');
|
|
7566
|
-
if (repairTime) repairTime.textContent =
|
|
7575
|
+
if (repairTime) repairTime.textContent = wcRepairElapsed();
|
|
7576
|
+
// Live token counters during repair (both in repair bar and left sidebar)
|
|
7577
|
+
var tokEl = document.getElementById('wcLiveTokCounter');
|
|
7578
|
+
if (tokEl) tokEl.textContent = _wcTokIn.toLocaleString() + ' in / ' + _wcTokOut.toLocaleString() + ' out';
|
|
7579
|
+
var leftIn = document.getElementById('wcLeftTokIn');
|
|
7580
|
+
var leftOut = document.getElementById('wcLeftTokOut');
|
|
7581
|
+
if (leftIn) leftIn.textContent = _wcTokIn.toLocaleString();
|
|
7582
|
+
if (leftOut) leftOut.textContent = _wcTokOut.toLocaleString();
|
|
7567
7583
|
}, 1000);
|
|
7568
7584
|
}
|
|
7569
7585
|
|
|
@@ -7727,8 +7743,8 @@ function renderWebCraft(el) {
|
|
|
7727
7743
|
(wcState.repairing ?
|
|
7728
7744
|
'<div style="width:100%;padding:10px 12px;background:rgba(234,179,8,0.08);border:1px solid rgba(234,179,8,0.4);border-radius:8px;display:flex;flex-direction:column;gap:4px">' +
|
|
7729
7745
|
'<div style="display:flex;align-items:center;gap:6px;font-size:11px;color:#facc15;font-weight:600">🔧 Correzione automatica in corso...</div>' +
|
|
7730
|
-
'<div style="font-size:10px;color:var(--dim)">'+wcState.repairDone+' / '+wcState.repairTotal+' file</div>' +
|
|
7731
|
-
|
|
7746
|
+
'<div style="font-size:10px;color:var(--dim)" id="wcLeftRepairProgress">'+wcState.repairDone+' / '+wcState.repairTotal+' file</div>' +
|
|
7747
|
+
'<div style="font-size:10px;color:#fde68a;font-family:var(--mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap" id="wcLeftRepairFile">'+wcEsc(wcState.repairCurrent || '')+'</div>' +
|
|
7732
7748
|
'</div>'
|
|
7733
7749
|
: '') +
|
|
7734
7750
|
(wcState.generatedFiles.length > 0 && !wcState.running ?
|
|
@@ -7742,7 +7758,12 @@ function renderWebCraft(el) {
|
|
|
7742
7758
|
'<button onclick="wcTriggerRepair()" style="width:100%;padding:9px;background:rgba(234,179,8,0.08);border:1px solid rgba(234,179,8,0.5);border-radius:8px;color:#facc15;font-size:11px;font-weight:600;cursor:pointer">🔧 Correggi tutti i file rossi</button>'
|
|
7743
7759
|
: '') +
|
|
7744
7760
|
'<button onclick="wcStartSandbox()" id="wcSandboxBtn" style="width:100%;padding:10px;background:var(--bg3);border:1px solid var(--green3);border-radius:8px;color:var(--green);font-size:12px;font-weight:600;cursor:pointer">▶ '+t('wc_sandbox_start')+'</button>' +
|
|
7745
|
-
(wcState.
|
|
7761
|
+
(wcState.repairing ?
|
|
7762
|
+
'<div style="padding:6px 8px;background:var(--bg3);border:1px solid var(--border);border-radius:6px;font-size:10px;color:var(--dim);font-family:var(--mono);display:flex;flex-wrap:wrap;gap:6px">' +
|
|
7763
|
+
'<span>⇧ <span id="wcLeftTokIn">'+_wcTokIn.toLocaleString()+'</span> tok in</span>' +
|
|
7764
|
+
'<span>⇩ <span id="wcLeftTokOut">'+_wcTokOut.toLocaleString()+'</span> tok out</span>' +
|
|
7765
|
+
'</div>'
|
|
7766
|
+
: wcState.lastGenStats ? '<div style="padding:6px 8px;background:var(--bg3);border:1px solid var(--border);border-radius:6px;font-size:10px;color:var(--dim);font-family:var(--mono);display:flex;flex-wrap:wrap;gap:6px">' +
|
|
7746
7767
|
'<span>⏱ '+(wcState.lastGenStats.seconds >= 60 ? Math.floor(wcState.lastGenStats.seconds/60)+'m '+(wcState.lastGenStats.seconds%60)+'s' : wcState.lastGenStats.seconds+'s')+'</span>' +
|
|
7747
7768
|
'<span>⇧ '+wcState.lastGenStats.tokIn.toLocaleString()+' tok in</span>' +
|
|
7748
7769
|
'<span>⇩ '+wcState.lastGenStats.tokOut.toLocaleString()+' tok out</span>' +
|
|
@@ -7764,6 +7785,8 @@ function renderWebCraft(el) {
|
|
|
7764
7785
|
+'<span style="font-size:10px;font-weight:700;color:#facc15;flex-shrink:0">Auto-fix</span>'
|
|
7765
7786
|
+'<span style="font-size:10px;color:#fde68a;font-family:var(--mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1" id="wcRepairFile">'+wcEsc(wcState.repairCurrent || '')+'</span>'
|
|
7766
7787
|
+'<span style="font-size:10px;color:var(--dim);flex-shrink:0" id="wcRepairCounter">'+wcState.repairDone+' / '+wcState.repairTotal+'</span>'
|
|
7788
|
+
+'<span style="font-size:10px;color:var(--dim);flex-shrink:0" id="wcRepairTime">'+wcRepairElapsed()+'</span>'
|
|
7789
|
+
+'<span style="font-size:10px;color:var(--dim);flex-shrink:0" id="wcLiveTokCounter">'+_wcTokIn.toLocaleString()+' in / '+_wcTokOut.toLocaleString()+' out</span>'
|
|
7767
7790
|
+'<span style="display:flex;gap:3px">'+[0,1,2].map(function(_,idx){ return '<span style="width:4px;height:4px;border-radius:50%;background:#facc15;animation:wcDot 1.1s ease-in-out infinite '+(idx*0.18)+'s"></span>'; }).join('')+'</span>'
|
|
7768
7791
|
+'<button onclick="wcStopRepair()" style="padding:2px 8px;background:rgba(239,68,68,0.15);border:1px solid rgba(239,68,68,0.4);border-radius:4px;color:#f87171;font-size:10px;font-weight:700;cursor:pointer;flex-shrink:0">■ Stop</button>'
|
|
7769
7792
|
+'</div>'
|
|
@@ -9221,10 +9244,12 @@ async function wcAutoRepair(filePlan, sysPreamble) {
|
|
|
9221
9244
|
|
|
9222
9245
|
_wcRepairAbortCtrl = new AbortController();
|
|
9223
9246
|
_wcRepairRunning = true;
|
|
9247
|
+
_wcRepairStartTime = Date.now();
|
|
9224
9248
|
wcState.repairing = true;
|
|
9225
9249
|
wcState.repairTotal = toFix.length;
|
|
9226
9250
|
wcState.repairDone = 0;
|
|
9227
9251
|
renderWebCraft(document.getElementById('content'));
|
|
9252
|
+
wcStartGenTimer();
|
|
9228
9253
|
|
|
9229
9254
|
// Build a map name→plan for prompt lookup
|
|
9230
9255
|
var planMap = {};
|
|
@@ -9330,9 +9355,27 @@ function wcUpdateRepairOverlay() {
|
|
|
9330
9355
|
var counter = document.getElementById('wcRepairCounter');
|
|
9331
9356
|
var fileEl = document.getElementById('wcRepairFile');
|
|
9332
9357
|
var prog = document.getElementById('wcRepairProg');
|
|
9358
|
+
var pct = wcState.repairTotal > 0 ? Math.round((wcState.repairDone / wcState.repairTotal) * 100) : 0;
|
|
9333
9359
|
if (counter) counter.textContent = wcState.repairDone + ' / ' + wcState.repairTotal;
|
|
9334
9360
|
if (fileEl) fileEl.textContent = wcState.repairCurrent;
|
|
9335
|
-
if (prog) prog.style.width =
|
|
9361
|
+
if (prog) prog.style.width = pct + '%';
|
|
9362
|
+
// Bug 1 fix: update left sidebar
|
|
9363
|
+
var leftFile = document.getElementById('wcLeftRepairFile');
|
|
9364
|
+
var leftProgress = document.getElementById('wcLeftRepairProgress');
|
|
9365
|
+
if (leftFile) leftFile.textContent = wcState.repairCurrent;
|
|
9366
|
+
if (leftProgress) leftProgress.textContent = wcState.repairDone + ' / ' + wcState.repairTotal + ' file';
|
|
9367
|
+
// Bug 2 fix: update right file tab highlights
|
|
9368
|
+
var activeIdx = wcState.activeFile;
|
|
9369
|
+
wcState.generatedFiles.forEach(function(f, i) {
|
|
9370
|
+
var tab = document.getElementById('wcTab' + i);
|
|
9371
|
+
if (!tab) return;
|
|
9372
|
+
var hasErr = !!f._error || !!f._syntaxError;
|
|
9373
|
+
var isActive = i === activeIdx;
|
|
9374
|
+
tab.style.background = isActive ? 'var(--bg3)' : 'transparent';
|
|
9375
|
+
tab.style.borderLeft = hasErr ? '2px solid #f87171' : isActive ? '2px solid var(--green3)' : '2px solid transparent';
|
|
9376
|
+
var nameSpan = tab.querySelector('span > span:last-child');
|
|
9377
|
+
if (nameSpan) nameSpan.style.color = hasErr ? '#f87171' : isActive ? 'var(--text)' : 'var(--dim)';
|
|
9378
|
+
});
|
|
9336
9379
|
}
|
|
9337
9380
|
|
|
9338
9381
|
function wcTriggerRepair() {
|