nothumanallowed 8.8.1 → 8.8.2

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.8.1",
3
+ "version": "8.8.2",
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": {
@@ -831,15 +831,15 @@ export async function cmdUI(args) {
831
831
  return;
832
832
  }
833
833
  const agentFile = path.join(AGENTS_DIR, `${name}.mjs`);
834
- if (fs.existsSync(agentFile)) {
835
- sendJSON(res, 409, { error: `Agent "${name}" already exists` });
836
- logRequest(method, pathname, 409, Date.now() - start);
837
- return;
838
- }
839
834
  const content = `// NHA Custom Agent: ${name}\n// Created: ${new Date().toISOString()}\n\nexport const CARD = {\n name: '${name}',\n displayName: '${name.toUpperCase()}',\n category: 'custom',\n tagline: '${tagline.replace(/'/g, "\\'")}',\n};\n\nexport const SYSTEM_PROMPT = \`${systemPrompt.replace(/`/g, '\\`')}\`;\n`;
840
835
  if (!fs.existsSync(AGENTS_DIR)) fs.mkdirSync(AGENTS_DIR, { recursive: true });
841
836
  fs.writeFileSync(agentFile, content, 'utf-8');
842
- agentCards.push({ name, displayName: name.toUpperCase(), category: 'custom', tagline });
837
+ const existingIdx = agentCards.findIndex(a => a.name === name);
838
+ if (existingIdx >= 0) {
839
+ agentCards[existingIdx] = { name, displayName: name.toUpperCase(), category: 'custom', tagline };
840
+ } else {
841
+ agentCards.push({ name, displayName: name.toUpperCase(), category: 'custom', tagline });
842
+ }
843
843
  sendJSON(res, 201, { ok: true, agent: { name, category: 'custom', tagline } });
844
844
  logRequest(method, pathname, 201, Date.now() - start);
845
845
  return;
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.8.1';
8
+ export const VERSION = '8.8.2';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11