nothumanallowed 11.1.1 → 11.2.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 +1 -1
- package/src/commands/collab.mjs +16 -8
- package/src/constants.mjs +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nothumanallowed",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
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/collab.mjs
CHANGED
|
@@ -121,11 +121,15 @@ function getOrCreateIdentity() {
|
|
|
121
121
|
let id = loadIdentity();
|
|
122
122
|
if (!id) {
|
|
123
123
|
id = generateKeypair();
|
|
124
|
-
// Use profile name from config if available
|
|
124
|
+
// Use profile name from NHA config if available
|
|
125
125
|
try {
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
const cfgFile = path.join(NHA_DIR, 'config.json');
|
|
127
|
+
if (fs.existsSync(cfgFile)) {
|
|
128
|
+
const cfg = JSON.parse(fs.readFileSync(cfgFile, 'utf-8'));
|
|
129
|
+
id.displayName = cfg.profile?.name || `Agent-${id.fingerprint.slice(0, 6)}`;
|
|
130
|
+
} else {
|
|
131
|
+
id.displayName = `Agent-${id.fingerprint.slice(0, 6)}`;
|
|
132
|
+
}
|
|
129
133
|
} catch {
|
|
130
134
|
id.displayName = `Agent-${id.fingerprint.slice(0, 6)}`;
|
|
131
135
|
}
|
|
@@ -316,8 +320,9 @@ async function cmdRead(args) {
|
|
|
316
320
|
const channel = getActiveChannel();
|
|
317
321
|
if (!channel) { fail('No active channel. Create or join one first.'); return; }
|
|
318
322
|
|
|
319
|
-
const
|
|
320
|
-
const
|
|
323
|
+
const showAll = args.includes('--all');
|
|
324
|
+
const limit = showAll ? 9999 : 10; // default: last 10 messages
|
|
325
|
+
const query = `?fp=${identity.fingerprint}&limit=${limit}`;
|
|
321
326
|
const result = await apiGet(`/channels/${channel.id}/messages${query}`);
|
|
322
327
|
if (result.error) { fail(result.error); return; }
|
|
323
328
|
|
|
@@ -329,9 +334,12 @@ async function cmdRead(args) {
|
|
|
329
334
|
// Derive channel key from ID + secret
|
|
330
335
|
const channelKey = deriveChannelKey(channel.id, channel.secret);
|
|
331
336
|
|
|
332
|
-
|
|
337
|
+
const msgs = result.messages.slice(-limit);
|
|
338
|
+
const total = result.total || result.messages.length;
|
|
339
|
+
const showing = msgs.length;
|
|
340
|
+
console.log(`\n ${BOLD}${channel.name}${NC} ${D}(showing ${showing}/${total} messages${showing < total ? ' — use --all for full history' : ''})${NC}\n`);
|
|
333
341
|
|
|
334
|
-
for (const msg of
|
|
342
|
+
for (const msg of msgs) {
|
|
335
343
|
const time = new Date(msg.timestamp).toLocaleTimeString();
|
|
336
344
|
const sender = result.members?.find(m => m.fingerprint === msg.senderFingerprint);
|
|
337
345
|
const senderName = sender?.displayName || msg.senderFingerprint.slice(0, 8);
|
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.
|
|
8
|
+
export const VERSION = '11.2.0';
|
|
9
9
|
export const BASE_URL = 'https://nothumanallowed.com/cli';
|
|
10
10
|
export const API_BASE = 'https://nothumanallowed.com/api/v1';
|
|
11
11
|
|