nothumanallowed 8.2.0 → 8.2.1

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": "8.2.0",
3
+ "version": "8.2.1",
4
4
  "description": "NotHumanAllowed — 38 AI agents + unified productivity suite. Gmail, Calendar, Drive, Contacts, Tasks, GitHub, Notion, Slack, voice chat, smart scheduler. 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 = '8.2.0';
8
+ export const VERSION = '8.2.1';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -171,6 +171,16 @@ export async function updateContact(config, resourceName, fields) {
171
171
  body.addresses = [{ formattedValue: fields.address }];
172
172
  updateFields.push('addresses');
173
173
  }
174
+ if (fields.birthday !== undefined) {
175
+ // birthday format: "YYYY-MM-DD" or "MM-DD"
176
+ const parts = fields.birthday.split('-').map(Number);
177
+ if (parts.length === 3) {
178
+ body.birthdays = [{ date: { year: parts[0], month: parts[1], day: parts[2] } }];
179
+ } else if (parts.length === 2) {
180
+ body.birthdays = [{ date: { month: parts[0], day: parts[1] } }];
181
+ }
182
+ updateFields.push('birthdays');
183
+ }
174
184
 
175
185
  const data = await peopleFetch(config, `/${resourceName}:updateContact?updatePersonFields=${updateFields.join(',')}`, {
176
186
  method: 'PATCH',
@@ -260,6 +260,9 @@ TOOLS:
260
260
  45. birthdays_upcoming(days?: number)
261
261
  Check upcoming birthdays from Google Contacts in the next N days (default 30).
262
262
 
263
+ 46. birthday_add(name: string, date: string)
264
+ Add or update a birthday for a contact. Name is the contact name (must exist in Google Contacts — creates one if not found). Date is MM-DD (e.g. "04-06" for April 6) or YYYY-MM-DD.
265
+
263
266
  RULES:
264
267
  - For search/read operations, execute immediately and present results conversationally.
265
268
  - For write/send/delete operations (gmail_send, gmail_reply, gmail_delete, calendar_create, calendar_move, calendar_update, contact_delete, task_done, notify_remind), DESCRIBE what you're about to do and include the JSON block so the system can ask the user for confirmation.
@@ -991,6 +994,34 @@ export async function executeTool(action, params, config) {
991
994
  }).join('\n');
992
995
  }
993
996
 
997
+ // ── Birthday Add ──────────────────────────────────────────────────
998
+ case 'birthday_add': {
999
+ const gc = await import('./google-contacts.mjs');
1000
+ const name = params.name;
1001
+ const date = params.date;
1002
+ if (!name || !date) return 'Both name and date are required. Date format: MM-DD or YYYY-MM-DD.';
1003
+
1004
+ // Search for existing contact
1005
+ let contacts = await gc.searchContacts(config, name, 5);
1006
+ let contact = contacts.find(c => c.name.toLowerCase().includes(name.toLowerCase()));
1007
+
1008
+ if (!contact) {
1009
+ // Create the contact first
1010
+ contact = await gc.createContact(config, { name });
1011
+ }
1012
+
1013
+ // Update birthday
1014
+ await gc.updateContact(config, contact.resourceName, { birthday: date });
1015
+
1016
+ // Parse date for display
1017
+ const parts = date.split('-').map(Number);
1018
+ const month = parts.length === 3 ? parts[1] : parts[0];
1019
+ const day = parts.length === 3 ? parts[2] : parts[1];
1020
+ const monthName = new Date(2000, month - 1, 1).toLocaleDateString('en-US', { month: 'long' });
1021
+
1022
+ return `Birthday set for ${contact.name}: ${monthName} ${day}. It will appear in the Birthdays tab.`;
1023
+ }
1024
+
994
1025
  default:
995
1026
  return `Unknown action: ${action}`;
996
1027
  }