nothumanallowed 15.1.29 → 15.1.30

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.29",
3
+ "version": "15.1.30",
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": {
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.29';
8
+ export const VERSION = '15.1.30';
9
9
  export const BASE_URL = 'https://nothumanallowed.com/cli';
10
10
  export const API_BASE = 'https://nothumanallowed.com/api/v1';
11
11
 
@@ -808,6 +808,33 @@ class TelegramResponder {
808
808
  if (lastCtx.history && lastCtx.history.length > 0) {
809
809
  preHistory = lastCtx.history;
810
810
  }
811
+
812
+ // ── Pending-action force execution ──────────────────────────────
813
+ // The classic failure: assistant proposes "Cercherò X, poi eliminerò,
814
+ // poi mostrerò la lista — Procedo?" → user says "Si" → model replies
815
+ // "Procedo. Cosa vuoi?" (amnesia). Liara/Qwen3 don't always pick up
816
+ // that a short confirmation = execute the proposed plan.
817
+ // Fix: if the previous assistant reply asks for confirmation AND the
818
+ // user message is a short confirmation, REWRITE the user message into
819
+ // an explicit "execute now" instruction with the original plan inline.
820
+ const lowerReply = (lastCtx.agentReply || '').toLowerCase();
821
+ const proposedAction = /procedo\??|confermi\??|conferma\??|posso (?:procedere|farlo|cancellarlo|eliminarlo|crearlo|inserirlo|aggiungere|inviarlo|spostarlo)|vuoi che (?:lo )?(?:cancelli|elimini|crei|inserisca|invii|sposti|modifichi|aggiunga)|shall i|should i|do you want me/.test(lowerReply);
822
+ const shortConfirm = /^(s[ìi]\.?|ok\.?|okay\.?|yes\.?|yep\.?|sure\.?|certo\.?|procedi\.?|fallo\.?|vai\.?|go\.?|do it\.?|conferma\.?|certo che s[ìi]\.?|fallo pure\.?)$/i.test(cleanText.trim());
823
+
824
+ if (proposedAction && shortConfirm) {
825
+ enrichedMessage =
826
+ `[CONFERMA UTENTE — Esegui SUBITO l'azione che hai proposto nel turno precedente]\n\n` +
827
+ `Tuo turno precedente:\n"${(lastCtx.agentReply || '').slice(0, 800)}"\n\n` +
828
+ `Risposta utente: "${cleanText.trim()}"\n\n` +
829
+ `ISTRUZIONI OBBLIGATORIE:\n` +
830
+ `1. L'utente sta confermando il piano che TU hai proposto. NON chiedere altri chiarimenti.\n` +
831
+ `2. NON dire "procedo" senza eseguire — emetti SUBITO i tool block JSON.\n` +
832
+ `3. Se hai promesso N step (cercare, eliminare, mostrare la lista, etc.) — emetti TUTTI gli N tool block in sequenza nel TUO prossimo messaggio.\n` +
833
+ `4. Esempio: se hai detto "cercherò l'evento, lo eliminerò, mostrerò la lista" → emetti calendar_find → quando ricevi il risultato emetti calendar_delete con l'eventId trovato → infine calendar_month/calendar_week.\n` +
834
+ `5. NON ripetere "Procedo. Cosa vuoi?" — sai già cosa vuole, lo hai proposto tu. Esegui.`;
835
+ this.log(`[Telegram] ${fromUser}: pending-action force (proposal detected in prev reply, user confirmed short)`);
836
+ }
837
+
811
838
  this.log(`[Telegram] ${fromUser}: continuation → ${agent.toUpperCase()} (ctx ${Math.round(stickyAge/1000)}s ago, history=${preHistory ? preHistory.length : 0})`);
812
839
  } else {
813
840
  // Fresh request — route normally