Spaces:
Paused
Paused
Commit History
-
Upload src/ai.js with huggingface_hub
Verified signature7dd3927
-
Add You.com as primary web search (youcom_rag + youcom_search), SearXNG as fallback
Verified signaturec9f249a -
Add You.com search provider (primary web search)
Verified signature4c4689d
-
Fix RAM: Disable local AI models (node-llama-cpp) on HF Spaces — saves 5GB+ RAM
Z UserLocal models (RigoChat-7B ~4.36GB + Qwen3-0.6B + embeddings) were causing RSS 5GB+ on HF Spaces cpu-basic which has limited RAM. This caused OOM risk. Now uses only cloud AI (GLM-4) on HF Spaces.ebb11af
-
v13 FIX: reasoning_content edge cases — empty content fallback + leak stripping
Z UserBug: GLM-5.1 sometimes puts everything in reasoning_content with empty content, or reasoning_content leaks into content field. Fix: 1. Edge case: content empty, extract last line from reasoning_content 2. Edge case: reasoning_content leaked into content, strip matching prefix 3. Log extraction/stripping for debugging4d4c4ac
-
fix: triplication dedup guard + safer Argentine→Mexican corrections + bore tunnel fix
Z User1. TRIPPLICATION FIX: Added dedup guard (hasAlreadyResponded/markResponded) to ALL zelinRespond() call sites: - Owner DM path (was missing) - RestPoll handler (was missing) - isAddressed path (already had it) - Scan intervention path (already had it) This prevents the same message from triggering multiple responses when processed by different message handler paths. 2. ARGENTINE→MEXICAN FIX: Made 'sos' → 'eres' replacement context-aware: - Only replaces standalone 'sos' (not inside words like sospechoso) - Removed unnecessary 'estás' → 'estás' and 'vas a' → 'vas a' replacements - Removed 'chorro' → 'un chorro' (chorro is valid Mexican Spanish) 3. BORE TUNNEL FIX: (in agent-nav-3d space, already pushed) - Fixed bore download URL (was wrong filename/arch/format)da9f039 -
v12: Fix triplicated responses, Argentine→Mexican auto-correction, anti-thinking leak v12
Z User3863aca
-
v12: Fix Argentine voseo in system prompt + stronger thinking leak detection
Z UserCRITICAL FIX - Argentine voseo in prompt: - 'Escribís' → 'Escribe', 'sabés' → 'sabes', 'tenés' → 'tienes' - 'Recordá' → 'Recuerda', 'usá' → 'usa', 'HABLÁ' → 'HABLA' - 'decí' → 'di', 'alcanza' → 'basta' - Added explicit voseo blacklist in NUNCA HACER section - The system prompt was TEACHING the model Argentine conjugation! Thinking leak improvements: - v11: Spanish analytical thinking detection (Bien, Debo, Tengo que...) - v11: More aggressive numbered list detection for reasoning leaks - v11: Auto-correct Argentine voseo in model output (safety net) - v11: Replace 'dale' with 'sale' when used as affirmation - v11: Remove 'che' filler from output Mexican dialect improvements: - Added 'simón', 'nel', 'qué padre' to jerga list - Added explicit tú conjugation examples (tú eres, tú tienes, tú puedes) - Replaced 'dale' with 'sale'/'va'/'simón' in response examplesdd6cb0b -
v10.1: Fix thinking leak - remove injectThinking(), improve cleanThinkingArtifacts() v10
Z User700ff3e -
v9: Fix thinking leak - chain-of-thought no longer visible in Discord responses
Z User- cleanThinkingArtifacts v9: Detect and remove plain-text thinking (numbered lists, English reasoning, prompt recitation patterns) - oai() now handles GLM-5.1 reasoning_content separately from content - Prevents AI from showing internal thought process to users130c230 -
Upload src/db.js with huggingface_hub
Verified signature4e8bbb9 -
Upload src/hive.js with huggingface_hub
Verified signature7176c86 -
Upload src/local-ai.js with huggingface_hub
Verified signaturef6fe532 -
Upload src/prompt.js with huggingface_hub
Verified signature9983775 -
Upload src/ai.js with huggingface_hub
Verified signature5801f6d -
v8.0: GLM-4-flash free + MC server + bug fixes
Zelin Bot- GLM-4-flash (free) primary, GLM-4.7-flash (free, reasoning) for complex - MC Paper server runs in container + ngrok for spectator - Fix: triplicated responses, Mexican Spanish, timeouts - API: /api/mc endpoint for ngrok URL0fff6b4
-
HIVE v2.0: Load Balance + Best-of-N + Hybrid Adaptive
Z User4491115 -
feat: HIVE - Hierarchical Inference via Ensemble
Z User- New hive.js: Combines ALL RigoChat-7B workers (not Promise.any!) - 5 strategies: Consensus, Speculative, Parallel, Race+Consensus, Adaptive - Consensus: ALL workers respond, merge best parts by voting - Speculative: Draft + parallel verify + merge - Adaptive: Auto-selects best strategy per message complexity - Workers auto-discovered via health checks - Paused workers auto-wake on demand - Added as PRIMARY provider in all cascades (before Groq/Cerebras) - No daily limits (our own cluster) - Circuit breaker with higher threshold (workers can be slow)288b602
-
v7.1.6: Final personality polish — psyche + diary + welcome
Z User- psyche.js: Added Mexican personality touches to mood descriptions - welcome.js: Mexican personality in welcome AI prompt - zelin-diary.js: Mexican personality in diary summary prompt - All AI prompts across the entire codebase now consistently use Mexican personality43ea0fb -
v7.1.5: Complete personality consistency — removed ALL 'IA'/'bot' self-references
Z UserIMPROVEMENTS: - reasoning-engine.js: ZELIN_PERSONALITY now says 'la chava del server' instead of 'la IA' - brain.js: All prompts now use 'la chava del server' instead of 'la IA' - admin_tools.js: transformToZelinStyle uses Mexican personality - welcome.js: Welcome messages use Mexican personality - zelin-diary.js: Diary prompts use Mexican personality - This ensures Zelin NEVER refers to herself as 'IA' or 'bot' in ANY context94f262c -
v7.1.4: More conservative detection prompt + personality consistency
Z User- prompt.js: Made buildDetectionPrompt much more conservative - Added explicit 'should NOT respond' criteria - Added gaming message filter - Added 'conservative' instruction to the AI - This reduces unnecessary AI interventions significantly7f4ccd8 -
v7.1.3: Personality consistency across ALL modules
Z UserIMPROVEMENTS: - proactive.js: Mexican personality in system prompt + sanitize/humanize output - moderation.js: Mexican personality in moderation AI prompt - prompt-optimizer.js: All A/B variants now include Mexican personality - proactive.js: Added sanitizeOutput + humanize before sending (was raw AI output) - learning.js: User affinity learning system integrated into reaction handler805b42c -
v7.1.2: Learning improvements, user affinity, timezone consistency
Z UserIMPROVEMENTS: - learning.js: User Affinity system — Zelin adapts her tone per user - Tracks: tone preference, humor tolerance, topic history - getUserToneHint() injects personalized hints into prompt - Automatically updated on reactions to Zelin's messages - learning.js: Fixed dynamic cooldowns (90min base, was 15min) - index.js: Integrated user tone hint into prompt pipeline - index.js: Update user affinity on message reactions - memory.js: Anti-echo-chamber filter for channel context - memory.js: Fixed es-ES → es-MX locale for date formatting - prompt.js: Fixed es-ES → es-MX for user join date display8998d4a -
v7.1.1: Quality improvements — anti-echo-chamber, more few-shot examples, timezone fixes
Z UserIMPROVEMENTS: - memory.js: Anti-echo-chamber filter — limits Zelin's own messages in context to prevent self-reinforcement - memory.js: Fixed es-ES → es-MX locale (Zelin is Mexican) - mexican-personality.js: Added 10 more few-shot examples covering: - English questions (Zelin responds in Spanish) - Confusing messages (asdasdasd, ...) - Prompt injection attempts - Questions about Zelin herself - Private data questions (hours played, server seed) - All new examples reinforce: Mexican personality, Spanish always, no data invention7827278 -
v7.1: CRITICAL fixes — 20+ bugs from deep audit
Z UserCRITICAL FIXES: - prompt.js: Argentine conjugations (tenés→tienes, decí→di, podés→puedes) - mexican-personality.js: mexicanize() now replaces ALL occurrences (was only first) - index.js: Removed hardcoded owner ID fallback (security risk) - index.js: Removed duplicate disconnect/error handlers (caused double reconnects) - index.js: Added body size limit + Mexican personality to HTTP chat server - index.js: Added sanitization to agentic send_message tool - index.js: Wrapped scheduleRenewalReminder in try-catch (crashed on missing config) HIGH FIXES: - brain.js: Fixed timezone Europe/Madrid → America/Mexico_City (Zelin is MEXICAN) - brain.js: Fixed TOCTOU race condition in sendBrainMessage (record before send) - proactive.js: 'Dale la bienvenida' → 'Da la bienvenida' (Argentine imperative) - moa.js: Removed 'dale' from valid short responses, added 'sale'/'va' - moderation.js: 'chévere' → 'chido'/'padre' (not Mexican) - react.js: Added rate limit + sanitize to send_discord_message tool -…5cef531 -
v7.0.4: Add absolute language rule - always respond in Spanish
Z User- Added IDIOMA section to BASE_IDENTITY in prompt.js - Rule: ALWAYS respond in Spanish regardless of input language - Only exception: owner explicitly requests another language - Reinforces Mexican Spanish (not Spain or Argentine) - This prevents Zelin from switching to English when addressed in English862e90d -
v7.0.1: Additional anti-spam + quality improvements
Z User- shouldZelinRespond: reduced from 3 AI calls to 1 (less API waste) - quality-gate.js: added 'dale' to Argentine detection patterns - More conservative default: don't respond unless clearly addressedbd38ae2 -
v7.0: FIX critical spam bug + Mexican personality consistency
Z UserCRITICAL BUG FIXES: - Fixed Zelin sending messages non-stop in chat channel - Scan system now uses global autonomous rate limiter (was unlimited!) - Proactive helper now uses global autonomous rate limiter (was unlimited!) - Conflict mediation now uses global autonomous rate limiter (was unlimited!) - Added 'Zelin was last to speak' check to prevent self-loop - Reduced autonomous messages from 3/hour to 2/hour - Increased minimum interval from 15min to 20min between autonomous messages - Scan channel cooldown increased from 15s to 5min - Conflict mediation cooldown increased from 45s to 10min - Proactive helper cooldown increased from 30s to 10min - Unanswered question threshold increased from 90s to 5min AUTONOMY ENGINE v7.0: - Tick interval increased from 3min to 5min - Will growth interval increased from 2min to 5min - Decision interval increased from 5min to 10min - All action cooldowns doubled (social 60min, revival 90min, etc.) BRAIN v7.0: - Spontaneous cooldown increased from …bac3009 -
v6.0: Anti-spam overhaul + Mexican personality fixes
Z UserBUG FIX - Autonomous Message Spam: - Added Global Autonomous Message Rate Limiter in state.js - Max 3 autonomous messages per hour across ALL systems - Min 15 min between any autonomous messages - Tracks source, type, and channel for each message - brain.js: Integrated rate limiter, increased cooldowns - Spontaneous: 15min → 45min - Revival: 45min → 60min, min silence 30→45min - MC comment: 20min → 40min - proactive.js: DISABLED setupActivityMonitor (10% chance per msg = #1 spam cause) - Increased cooldowns 30min → 60min - Alerts: every 30min → every 2h - MC events: every 1min → every 5min - autonomy-engine.js: Complete rewrite with anti-spam - Will growth reduced 5x (was way too fast) - Decision interval: 30s → 5min - Tick interval: 60s → 3min - Will growth tick: 30s → 2min - All cooldowns increased 3-10x - Chat actions must pass global rate limiter - Observation system feeds will 5x more slowly - Will thresholds raised (need more will to act) - Added…e371430 -
v7.2: Mexican Enhancement Pipeline - personality engine, RAG cultural, quality gate, refinement, MoA
Z Usera1f87e6
-
Zelin v6.1: Add Natural Language Refiner module + integrate in pipeline
Verified signature33ffb5b -
Zelin v6.1: Fix emojis + mejor prompt + Qwen3-4B model - src/local-ai.js
Verified signature0f0b1dc -
Zelin v6.1: Fix emojis + mejor prompt + Qwen3-4B model - src/prompt.js
Verified signature97896ff -
Zelin v6.1: Fix emojis + mejor prompt + Qwen3-4B model - src/reasoning-engine.js
Verified signaturedf33509 -
Zelin v6.1: Fix emojis + mejor prompt + Qwen3-4B model - src/emoji-awareness.js
Verified signature01f5902 -
CRITICAL FIX: DB no-op proxy returns async functions
Z UserThe no-op proxy was returning sync functions (() => {}) that return undefined. When calling code chained .catch() on the result, it threw: TypeError: Cannot read properties of undefined (reading 'catch') This was the ROOT CAUSE of 'algo salió mal' errors: - db.getContext(...).catch(() => []) → undefined.catch → TypeError - db.saveMessage(...).catch(() => {}) → undefined.catch → TypeError Now all proxy methods return async functions that resolve to proper values: - getContext → [] (empty array) - saveMessage → undefined (void) - memGet → undefined - All others → async no-ops This means Zelin can respond even when the database is unavailable.959c250 -
CRITICAL FIX: Export localChatPrimary from local-ai.js
Z UserThe AI router was trying to import localChatPrimary from local-ai.js but it didn't exist — only localChat (private), localChatWithThinking, and emergencyFallback were exported. This caused the 'local' provider to always fail with an import error, making Zelin respond 'algo salió mal' to every message. Now localChatPrimary is properly exported and calls localChat() with the correct parameters.d818c0e -
CRITICAL FIX v11: Local-first AI - Qwen3-4B as primary provider
Z UserBug: Zelin no responde porque todos los API models fallan (Pollinations rate-limited, GLM sin key, Mistral sin key) Fix: 1. CASCADES changed: local FIRST, API models as FALLBACK 2. initLocalAI() is now BLOCKING (awaited) at startup 3. Primary model: Qwen3-4B (excellent Spanish, ~2.5GB RAM) 4. Fast model: Qwen3-0.6B (security/classification) 5. config.json/template: Qwen3-4B replaces SmolLM3-3B/Gemma 6. Removed duplicate initLocalAI() call at bottom of index.js Before: pollinations -> glm51 -> local -> mistral (API-first) After: local -> pollinations -> glm51 -> mistral (LOCAL-first)6eda6a8 -
CRITICAL FIX: Pollinations always first in cascades + no-key providers don't spam circuit breaker
Z User- Reordered ALL cascades: pollinations → glm51 → local → mistral (mistral requires API key that may be PLACEHOLDER) - Providers without API key now get OPEN circuit breaker immediately without logging spam or affecting other providers - ensureAvailability() no longer resets breakers for 'no key' providers preventing infinite retry loops on unconfigured providers - This ensures Zelin ALWAYS responds via Pollinations (free, unlimited)79a213c
-
CRITICAL FIX: Zelin never stays silent — Pollinations GET fallback guaranteed
Z User- ai.js: Added Pollinations GET direct as ultimate fallback in _route and _routeOwner - index.js: When callAI returns empty, try Pollinations GET before giving up - index.js: When sanitizeOutput empties response, use rawOut instead of silence - NUNCA más Zelin se queda sin responder — siempre hay un fallback0ca1fda -
v10.2: AI cascade fix only - Pollinations+Mistral primary
Z User89037eb -
v7.0.3: CRITICAL FIX - db.js no longer blocks import
Z UserRoot cause: db.js executed createClient() and runMigrations() at module level, which blocked the entire ESM import chain when Turso was unavailable. Fix: - db.js: Check if Turso URL is valid (not PLACEHOLDER) before creating client - db.js: If invalid, export a no-op Proxy that returns empty results - db.js: Move migrations to setTimeout(5s) so they don't block import - loader.mjs: Add 60s timeout on import('./index.js')f099fa7 -
Update src/emoji-awareness.js — v6.0: watchdog, thinking mode, emoji awareness, humanizer rewrite
Verified signature0043ea0 -
Update src/humanizer.js — v6.0: watchdog, thinking mode, emoji awareness, humanizer rewrite
Verified signatureb0da1b6 -
Update src/ai.js — v6.0: watchdog, thinking mode, emoji awareness, humanizer rewrite
Verified signature1b2844e
-
feat: Neural Processor v1.0 — replace ALL regex with AI+Map/Set hybrid system + Emoji Awareness
Z User- NEW: src/neural-processor.js — 3-layer hybrid engine: Layer 1: Lexicon Engine (Map/Set lookups, instant 0ms) Layer 2: Structural Analyzer (string operations, tokenization) Layer 3: Neural Engine (local Qwen/Gemma for semantic understanding) - NEW: src/emoji-awareness.js — Discord server emoji system: Extracts custom emojis with names and descriptions Generates context block for system prompt injection Zelin can now understand and use server emojis like a human - REMOVED ALL REGEX from core files: src/ai.js — cleanThinkingArtifacts, INTENT_PATTERNS, BAD_PATTERNS, isValidResponse, _ttl, getBestModel src/humanizer.js — detectEmotion, convertEmphasis, addImperfections, maybeAddLaughter, all .replace() src/local-ai.js — securityPreScan HARD patterns, suspicious detection, isRefusal src/security.js — HARD_BLOCK_PATTERNS, COMPROMISED_PATTERNS, sanitizeOutput, isDirectCall, maskSensitiveData src/moderation.js — SPAM_PATTERNS, detectConflictSignals src/coordinator.js…ba355eb -
🧠 Neural Validator v2.0 — CERO regex, 100% advanced system
Z UserCAPA 1: Token Analyzer — statistical token analysis (garbled detection, repetition, language mixing, code leaks, emoji spam) — all via string ops + Maps/Sets CAPA 2: Syntactic Analyzer — Spanish grammar via adjacency rules (Map<word, Set<invalid_followers>>) — 'nop' before verb/article detected by table lookup, not regex CAPA 3: Context Coherence — semantic analysis (echo detection, AI self-reference, prompt leaks, question complexity scoring) — all via Set lookups + string comparison CAPA 4: Neural Judge — local AI model (Qwen3-0.6B/Gemma4) as quality judge with caching — only called when layers 1-3 are inconclusive CAPA 5: Auto-Correction Engine — dictionary-based typo fixes + adjacency rule corrections + abbreviation expansion — all via Map lookups, zero regex humanizer.js: replaced regex post-validation (nop+verb, sip+verb, typo fixes) with delegation to autoCorrect() from Neural Validator 26/26 tests passed, 0 regex found in response-validator.js61b8b33 -
feat: Response Validator v1.0 + Humanizer v3.0 + Thinking Mode v2.0
Z User- NEW: response-validator.js — 5-layer validation system that prevents incoherent/garbled text, word misplacement (nop hay problema), grammar errors, and misunderstanding before sending to Discord. Auto-corrects when possible, retries with stricter prompt when needed. - FIX: humanizer.js v3.0 — Context-aware casual substitutions: - 'no' → 'nop' ONLY when standalone response (never before verb/article) - 'para' → 'pa' only before articles (not in 'paraguas') - 'también' → 'tmb' only in natural positions - Removed AI-obvious typos: etsa, bine, cmoo, sloo (humans dont write these) - Post-validation: auto-fix nop/sip before verbs even if they slip through - Reduced probabilities to avoid over-humanizing - FIX: psyche.js — Removed fake typos (etsa/bine/cmoo/sloo) that made Zelin sound MORE like an AI, not less - FIX: ai.js Thinking Mode v2.0 — More specific instructions with: - Concrete examples of GOOD and BAD responses - Explicit anti-error rules (nop before ver…cec08aa -
FIX: edge-tts long-form flags — shorthand -t/-v/-r/-f not supported in Docker
Z UserUse --text, --voice, --write-media, --rate, --pitch instead of shorthand -t, -v, -f, -r, -p which cause exit code 2.e19c6da -
HUMANIZER v2.0: Massive upgrade to human-like Discord speech
Z UserBased on analysis of real human conversation patterns: - Added emotional expressions (wtf, nice, uff, jajaja, xd) - Added natural starters/fillers (bueno, pues, o sea, tipo) - Added rhythm variation (pauses, dramatic '...', em-dashes) - Added subtle imperfections (occasional typos, missing accents) - Added context-aware laughter - Expanded robotic phrase dictionary (30+ new entries) - Expanded formal→informal connectors (15+ new entries) - Added emphasis exaggeration reduction - Principle: If it sounds like AI, it's wrong4172920