Skip to content

Latest commit

 

History

History
191 lines (156 loc) · 9.73 KB

File metadata and controls

191 lines (156 loc) · 9.73 KB

ANARCHY Changelog

All notable changes to this project are documented here.


[1.1.1] — 2026-06-02

Summary

Maintenance release: repository cleanup, CI fixes, and packaging improvements.

Removed

  • 15 stray/empty files committed by audit scripts ('content', 'tool_name', 0.82, ANARCHY, app.hardware, app.memory, console, core.text, from, import_test.txt, individual, install_check_out.txt, install_test_out.txt, intent_confidence, project_root, total_files).

Fixed

  • IndentationError in test/test_safety.py (test_self_modify_is_high_risk function had a stale comment block causing a nested def with no body).
  • CI green across Python 3.10 / 3.11 / 3.12 on Linux and Windows.

Changed

  • pyproject.toml: bumped version to 1.1.1; updated author name and email.
  • Dependency: pytest pinned to >=9.0.3 via Dependabot update.

[1.1.0] — 2026-05-27

Summary

Major internal restructure: 34 single-purpose files collapsed into 9 domain modules, core/main.py split into a core/handlers/ package, and install.py rewritten with a strict 3-phase install gate that cannot silently fail on any device or OS.


✨ New Features

3-Phase Hard-Gated Installer (install.py)

  • Phase 1 — DETECT: stdlib only, no network, no installs. Reads OS, CPU, RAM, GPU, CUDA version, compute capability, ROCm, and Apple Metal via nvidia-smi, nvcc, rocminfo, and sysctl. Every probe is individually try/except-wrapped with safe fallbacks — Phase 1 is physically incapable of failing on any device.
  • Phase 2 — INSTALL: Installs requirements.txt, builds llama-cpp-python with the correct GPU flags (CUDA / ROCm / Metal / Termux ARM), pulls Ollama model. Each step tracked in p2_failures[]; on any critical failure prints an itemised report and hard-exits with sys.exit(1) before Phase 3 starts.
  • Phase 3 — BUILD & VERIFY: Runs python -m compileall across all source dirs, verifies core imports (requests, psutil, rich, numpy). Hard-exits before suggesting launch if anything fails.
  • Hardware-adaptive model selection: 7 VRAM tiers map to optimal (model, gpu_layers, context_length) and are written to config/config.json automatically.

Cloud Provider Hybrid Routing (phases 1–5)

  • Added Groq, OpenRouter, Gemini (1M tok/day free), and Cerebras cloud providers
  • LLMManager now supports offline / online / auto provider modes
  • Auto mode uses cloud when a key is available and the request is non-sensitive; silently falls back to local Ollama/GGUF if offline or rate-limited
  • provider REPL command: list, add, switch, test, remove providers live
  • Cloud keys stored encrypted in secrets.vault (Fernet, base64 fallback), never in plain text or config.json

MCP Server

  • core/mcp_server.py exposes memory reads and skill listings over stdio MCP transport
  • Compatible with any MCP-capable host (Claude Desktop, custom agents)

New Subsystems (added since v1.0.0)

Subsystem Purpose
ContextCompactor Auto-summarises conversation history when context window fills
IntentRouter 3-stage confidence-scored routing (regex → NLP → LLM fallback)
StructuredOutput Schema-enforced LLM calls returning validated JSON
SubAgentRunner Spawns parallel sub-agent tasks with isolated context
AgentCoordinator Coordinates multiple isolated agents and merges results
TokenTracker Budget tracking with EMA-based token estimation
MemDir Filesystem-backed agent memory directory
MemoryRouterBridge Closes the learning loop between router decisions and memory
ProviderRegistry Multi-backend LLM abstraction (local + cloud)
Migrator Schema auto-upgrade for episodic memory, config, and vector stores
ProjectState Per-repo .anarchy context that persists across sessions
AutoDoc Generates tool + skill documentation from live registry
DebugCLI 8-stage pipeline trace with per-step timing

Smart Routing & Rate Limits

  • Confidence-scored routing: routes to LLM only when NLP confidence < threshold
  • Per-provider rate limit tracking with automatic fallback on 429
  • Knowledge question short-circuit: factual questions answered without LLM call

🔧 Improvements

Domain Module Consolidation

34 single-purpose files merged into 9 domain modules for cleaner imports and faster startup (fewer module loads, better cache locality):

New module Absorbed files
core/text.py formatter.py, system_prompt.py
core/Config.py (in-place) + secrets.py + migrations.py
core/monitoring.py quality_metrics.py, performance_manager.py, health.py, watchdog.py
core/dev_tools.py git_wizard.py, hook_manager.py, autodoc.py, lsp_client.py
core/llm.py llm_manager.py, model_router.py, token_tracker.py, cache_manager.py, connectivity.py, context_compactor.py, structured_output.py
core/cognition.py nlp_engine.py, reasoner.py, dialogue_state_tracker.py, intent_router.py
core/execution.py executor.py, task_scheduler.py, subagent.py, multi_agent.py
core/extensions.py plugin_system.py, skill_installer.py, persona_engine.py
core/project.py project_indexer.py, project_state.py, discovery_engine.py, knowledge_base.py, blueprint.py

Handler Package (core/handlers/)

core/main.py reduced from 3,110 → 899 lines — the REPL loop and main() only. All 85 handle_* functions extracted into 10 focused modules:

Module Commands
handlers/ui.py banners, help, status, diagnostics
handlers/system.py reload, reset, panic, exec, eval, debug shell, crashes
handlers/backend.py backend, models, mode, provider, tokens
handlers/memory.py memory, index, ask, scratchpad, resume, events
handlers/code.py code, autodoc, test, regress, diagnose, dev-*
handlers/git.py git, github, repo, commit, hooks
handlers/skills.py tools, skills, discover, plugins
handlers/planning.py plan, route, schedule, blueprints, agents
handlers/config_handlers.py config, logs, secret, perf, sandbox, permissions, migrate
handlers/voice.py voice

launch.py Improvements

  • Hardware profile display at startup (GPU, VRAM, RAM, detection timestamp)
  • Falls back to live detection if hardware_profile not yet in config
  • CLI flags: --offline, --cpu, --gpu, --model <name>, --context <n>

Platform Compatibility

  • Windows 11 correctly identified (build ≥ 22000), not misreported as Windows 10
  • Termux (Android): faiss-cpu and pyautogui auto-skipped (no ARM64 wheels); llama-cpp-python built with LLAMA_NATIVE=OFF for Termux cross-compile
  • iSH (iOS): heavy source-build packages skipped automatically
  • PEP 668 (Debian/Ubuntu externally-managed Python): --break-system-packages added automatically when EXTERNALLY-MANAGED sentinel file is detected

🐛 Bug Fixes

  • lsp_client.py: SERVERS dict was closed prematurely after the "rust" entry, leaving go, c, ruby, and lua as orphaned syntax outside the dict literal. Fixed — all language servers now correctly inside SERVERS.
  • nlp_engine.py: _extract_temporal_expressions() was called in the NLP pipeline at step 6b but was never defined anywhere in the codebase. Implemented with a full regex-based temporal extractor (relative, absolute, ISO date, time, duration, frequency patterns). Applied to both nlp_engine.py and merged cognition.py.
  • UTF-8 BOM: Stripped from several Windows-authored source files that caused SyntaxError: invalid non-printable character U+FEFF on Linux/macOS.
  • install.py: Fixed multiple silent failure paths — every install step now reports pass/fail explicitly. Progress bar redraws correctly on Windows terminals.
  • launch.py: Fixed incorrect entry-point check (core/main.py vs root main.py).
  • Intent routing: Knowledge questions (factual, non-tool) no longer incorrectly routed to tool-execution pipeline.

📦 Infrastructure

  • Added CHANGELOG.md (this file)
  • Added .github/workflows/ci.yml — automated test + lint on push/PR
  • pyproject.toml: bumped to 1.1.0, added core.handlers package, updated classifier to Production/Stable
  • core/_absorbed/ — original single-file sources archived for reference (git-ignored)
  • models/.gitkeep — ensures models/ directory tracked by git for GGUF placement

[1.0.0] — 2026-04-01

Initial public release.

Core Engine (40 subsystems)

  • Local LLM via Ollama (llama3.2:3b default) with llama-cpp-python GGUF fallback
  • NLP/NLU pipeline: intent classification, entity extraction, sentiment, urgency scoring
  • Tool execution: 20+ tools behind 4-tier permission gate (SAFE / CONFIRM / HIGH_RISK / DENIED)
  • Semantic memory: FAISS vector store + JSON episodic memory across sessions
  • RAG search: semantic indexing of any local codebase via index + ask commands
  • LSP code intelligence: diagnostics via pyright, clangd, rust-analyzer, gopls
  • Smart git workflow: auto-draft commit messages, commit→push→PR in one command
  • Git hook manager: install/remove/show ANARCHY pre-commit hooks
  • Voice input: local Whisper transcription (tiny/base/small/medium/large)
  • Autonomous task scheduler: cron-style recurring tasks with natural-language intervals
  • Community skill system: install/share skills from GitHub URLs or local paths
  • Plugin system: extend ANARCHY with tool + skill bundles
  • Blueprint system: AI-generated multi-tool execution plans
  • Recovery manager: crash snapshots, session resume, auto-repair
  • Universal installer: one-command setup on Windows, macOS, Linux, Termux, iSH