nothumanallowed 15.1.66 → 15.1.67

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": "15.1.66",
3
+ "version": "15.1.67",
4
4
  "description": "NotHumanAllowed — 38 AI agents, 80 tools, Studio (visual agentic workflows). Email, calendar, browser automation, screen capture, canvas, cron/heartbeat, Alexandria E2E messaging, GitHub, Notion, Slack, voice chat, free AI (Liara), 28 languages. Zero-dependency CLI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -97,8 +97,18 @@ export async function cmdOps(args) {
97
97
  const telegramConfigured = !!config.responder?.telegram?.token;
98
98
  const discordConfigured = !!config.responder?.discord?.token;
99
99
  console.log(`\n ${BOLD}Message Responder${NC}\n`);
100
- console.log(` Telegram: ${responder.telegram ? G + 'active' + NC : telegramConfigured ? Y + 'configured (daemon restart needed)' + NC : D + 'not configured' + NC}`);
101
- console.log(` Discord: ${responder.discord ? G + 'active' + NC : discordConfigured ? Y + 'configured (daemon restart needed)' + NC : D + 'not configured' + NC}`);
100
+ // Surface the exact reason the responder didn't activate (missing
101
+ // LLM key on a paid provider, missing token, etc.) instead of the
102
+ // generic "daemon restart needed" — which is misleading because the
103
+ // daemon IS running, the responder just refused to spin up.
104
+ const reason = responder.reason || '';
105
+ let inactiveHintTel = 'configured but inactive (try: nha ops stop && nha ops start)';
106
+ if (reason.startsWith('missing_key:')) {
107
+ const p = reason.slice('missing_key:'.length);
108
+ inactiveHintTel = `configured but LLM key missing for provider "${p}" — fix with: nha config set provider nha (free Liara) OR nha config set ${p}-key YOUR_KEY`;
109
+ }
110
+ console.log(` Telegram: ${responder.telegram ? G + 'active' + NC : telegramConfigured ? Y + inactiveHintTel + NC : D + 'not configured' + NC}`);
111
+ console.log(` Discord: ${responder.discord ? G + 'active' + NC : discordConfigured ? Y + inactiveHintTel + NC : D + 'not configured' + NC}`);
102
112
  console.log(` Auto-route: ${config.responder?.autoRoute !== false ? G + 'keyword routing' + NC : D + 'CONDUCTOR only' + NC}`);
103
113
 
104
114
  console.log('');
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 = '15.1.66';
8
+ export const VERSION = '15.1.67';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -2749,12 +2749,19 @@ export function startResponder(config, log, wsBroadcast) {
2749
2749
  const hasAnyToken = config.responder?.telegram?.token || config.responder?.discord?.token;
2750
2750
  if (!hasAnyToken) {
2751
2751
  log('[Responder] No tokens configured — skipping');
2752
- return { telegram: false, discord: false };
2753
- }
2754
-
2755
- if (!config.llm?.apiKey) {
2756
- log('[Responder] No LLM API key cannot respond to messages');
2757
- return { telegram: false, discord: false };
2752
+ return { telegram: false, discord: false, reason: 'no_token' };
2753
+ }
2754
+
2755
+ // Liara (provider 'nha') is the default free tier — it does NOT require an
2756
+ // API key. Only refuse to start if the user explicitly picked a paid
2757
+ // provider (anthropic, openai, gemini, ...) and forgot to set the key.
2758
+ // Previously we rejected ALL providers including Liara, leaving the user
2759
+ // stuck on "configured (daemon restart needed)" with no actionable hint.
2760
+ const provider = (config.llm?.provider || 'nha').toLowerCase();
2761
+ const PAID_PROVIDERS = new Set(['anthropic', 'openai', 'gemini', 'deepseek', 'grok', 'mistral', 'cohere']);
2762
+ if (PAID_PROVIDERS.has(provider) && !config.llm?.apiKey) {
2763
+ log(`[Responder] Provider "${provider}" requires an API key — cannot respond. Run: nha config set provider nha (to switch to free Liara) OR nha config set ${provider}-key YOUR_KEY`);
2764
+ return { telegram: false, discord: false, reason: `missing_key:${provider}` };
2758
2765
  }
2759
2766
 
2760
2767
  const result = { telegram: false, discord: false };