nothumanallowed 11.2.0 → 11.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 +1 -1
- package/src/constants.mjs +1 -1
- package/src/services/notification.mjs +11 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "11.2.
|
|
3
|
+
"version": "11.2.1",
|
|
4
4
|
"description": "NotHumanAllowed — 38 AI agents, 53 tools. Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, GitHub, Notion, Slack, voice chat, 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 = '11.2.
|
|
8
|
+
export const VERSION = '11.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
|
|
|
@@ -46,13 +46,19 @@ function sendDesktop(title, body) {
|
|
|
46
46
|
const platform = os.platform();
|
|
47
47
|
try {
|
|
48
48
|
if (platform === 'darwin') {
|
|
49
|
-
const escaped = body.replace(/"/g, '\\"').slice(0, 200);
|
|
50
|
-
|
|
49
|
+
const escaped = body.replace(/"/g, '\\"').replace(/'/g, "'").slice(0, 200);
|
|
50
|
+
const escapedTitle = 'NHA: ' + title.replace(/"/g, '\\"');
|
|
51
|
+
// Try terminal-notifier first (supports click-to-open)
|
|
52
|
+
try {
|
|
53
|
+
execSync(`which terminal-notifier`, { stdio: 'ignore' });
|
|
54
|
+
execSync(`terminal-notifier -title "${escapedTitle}" -message "${escaped}" -open "http://127.0.0.1:3847" -appIcon "" -group nha 2>/dev/null`);
|
|
55
|
+
} catch {
|
|
56
|
+
// Fallback to osascript — use "NHA" as subtitle so click goes nowhere confusing
|
|
57
|
+
execSync(`osascript -e 'display notification "${escaped}" with title "${escapedTitle}" subtitle "Open nha ui to see details"'`);
|
|
58
|
+
}
|
|
51
59
|
} else if (platform === 'linux') {
|
|
52
60
|
execSync(`notify-send "NHA: ${title}" "${body.slice(0, 200)}"`);
|
|
53
|
-
}
|
|
54
|
-
// Windows: PowerShell toast (best effort)
|
|
55
|
-
else if (platform === 'win32') {
|
|
61
|
+
} else if (platform === 'win32') {
|
|
56
62
|
execSync(`powershell -Command "New-BurntToastNotification -Text 'NHA: ${title}', '${body.slice(0, 200)}'" 2>NUL`);
|
|
57
63
|
}
|
|
58
64
|
} catch { /* non-fatal */ }
|