nothumanallowed 10.3.0 → 10.3.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/commands/ui.mjs +9 -3
- package/src/constants.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "10.3.
|
|
3
|
+
"version": "10.3.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/commands/ui.mjs
CHANGED
|
@@ -383,11 +383,17 @@ export async function cmdUI(args) {
|
|
|
383
383
|
|
|
384
384
|
if (collabAction === 'send' && method === 'POST') {
|
|
385
385
|
const body = await parseBody(req);
|
|
386
|
-
//
|
|
387
|
-
|
|
386
|
+
// Encrypt with the same channel key used by CLI
|
|
387
|
+
const channelKey = crypto.createHash('sha256').update('alexandria-channel-key-v1').update(body.channelId).digest();
|
|
388
|
+
const nonce = crypto.randomBytes(12);
|
|
389
|
+
const cipher = crypto.createCipheriv('aes-256-gcm', channelKey, nonce);
|
|
390
|
+
const encrypted = Buffer.concat([cipher.update(body.message, 'utf-8'), cipher.final()]);
|
|
391
|
+
const tag = cipher.getAuthTag();
|
|
392
|
+
const ciphertext = Buffer.concat([encrypted, tag]).toString('base64');
|
|
393
|
+
|
|
388
394
|
const r = await fetch(ALEX_API + '/channels/' + body.channelId + '/messages', {
|
|
389
395
|
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
390
|
-
body: JSON.stringify({ senderFingerprint: identity.fingerprint, nonce:
|
|
396
|
+
body: JSON.stringify({ senderFingerprint: identity.fingerprint, nonce: nonce.toString('base64'), ciphertext, type: 'text' }),
|
|
391
397
|
});
|
|
392
398
|
sendJSON(res, 200, await r.json());
|
|
393
399
|
logRequest(method, pathname, 200, Date.now() - start);
|
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 = '10.3.
|
|
8
|
+
export const VERSION = '10.3.1';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|