nothumanallowed 3.6.1 → 3.7.0
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": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents for security, code, DevOps, data & daily ops. Ask agents directly, plan your day with 5 specialist agents, manage tasks, connect Gmail + Calendar.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/commands/ui.mjs
CHANGED
|
@@ -84,7 +84,7 @@ RULES:
|
|
|
84
84
|
- For write/send/delete operations, describe what you're about to do and include the JSON block.
|
|
85
85
|
- When presenting results, format them clearly in natural language. Never dump raw JSON to the user.
|
|
86
86
|
- If you need multiple actions in sequence, do them ONE AT A TIME.
|
|
87
|
-
- Dates: today is {{TODAY}}. The user's timezone is {{TIMEZONE}}.
|
|
87
|
+
- Dates: today is {{TODAY}}. The user's timezone is {{TIMEZONE}}. CRITICAL: when creating calendar events, always use LOCAL time in format "YYYY-MM-DDTHH:MM:SS" WITHOUT any Z suffix or timezone offset. Example: if user says "8pm", use "{{TODAY}}T20:00:00". NEVER add Z or +00:00.
|
|
88
88
|
`.trim();
|
|
89
89
|
|
|
90
90
|
// ── Tool execution (all imports are at top of file) ──────────
|
|
@@ -133,18 +133,23 @@ export async function getUpcomingEvents(config, hours = 2) {
|
|
|
133
133
|
* @param {string} calendarId
|
|
134
134
|
*/
|
|
135
135
|
export async function createEvent(config, event, calendarId = 'primary') {
|
|
136
|
+
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
137
|
+
// If the date string has no Z or offset, treat as local time — don't convert to UTC
|
|
138
|
+
const startStr = String(event.start);
|
|
139
|
+
const endStr = String(event.end);
|
|
140
|
+
const startDT = (startStr.endsWith('Z') || /[+-]\d{2}:\d{2}$/.test(startStr))
|
|
141
|
+
? new Date(startStr).toISOString()
|
|
142
|
+
: startStr; // Keep as-is (local time for the timeZone)
|
|
143
|
+
const endDT = (endStr.endsWith('Z') || /[+-]\d{2}:\d{2}$/.test(endStr))
|
|
144
|
+
? new Date(endStr).toISOString()
|
|
145
|
+
: endStr;
|
|
146
|
+
|
|
136
147
|
const body = {
|
|
137
148
|
summary: event.summary,
|
|
138
149
|
description: event.description || '',
|
|
139
150
|
location: event.location || '',
|
|
140
|
-
start: {
|
|
141
|
-
|
|
142
|
-
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
143
|
-
},
|
|
144
|
-
end: {
|
|
145
|
-
dateTime: new Date(event.end).toISOString(),
|
|
146
|
-
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
147
|
-
},
|
|
151
|
+
start: { dateTime: startDT, timeZone: tz },
|
|
152
|
+
end: { dateTime: endDT, timeZone: tz },
|
|
148
153
|
};
|
|
149
154
|
|
|
150
155
|
if (event.attendees?.length) {
|
package/src/services/web-ui.mjs
CHANGED
|
@@ -284,7 +284,11 @@ function sendChat(){
|
|
|
284
284
|
else{chatHistory.push({role:'assistant',content:'Error: no response from server'})}
|
|
285
285
|
renderMessages();
|
|
286
286
|
// Refresh data if an action was executed
|
|
287
|
-
if(r&&r.actions&&r.actions.length>0){
|
|
287
|
+
if(r&&r.actions&&r.actions.length>0){
|
|
288
|
+
// Clear calendar cache so new events show up
|
|
289
|
+
calEventsCache={};
|
|
290
|
+
loadDash().catch(function(){});
|
|
291
|
+
}
|
|
288
292
|
});
|
|
289
293
|
}
|
|
290
294
|
|