Skip to content

v0.7.0 — Fleet SSH Console (cxs), Forensic Audit, File Locks & DeepSeek Search/Fetch

Choose a tag to compare

@github-actions github-actions released this 17 Oct 15:47
· 14 commits to main since this release

Release v0.7.0

Added

Fleet & SysAdmin Multi-Server Orchestration (crates/corex-fleet, cxs)

  • Direct Interactive Fleet TUI Launch (cxs, cx --fleet): Invocations without subcommands launch directly into the live dual-pane SysAdmin console (AI agent chat on the left, live SSH terminal and node telemetry on the right).
  • Headless Automation CLI: Preserved scripting subcommands (cxs status, cxs ping, cxs top, cxs telemetry, cxs run, cxs broadcast).
  • Interactive Remote PTY (vt100) & /fleet wide: Native PTY terminal session with wide 3-column layout (chat | terminal | telemetry), asynchronous node polling (up to 8 in parallel), and take_dirty() atomic flag rendering eliminating idle 60 FPS redraws.
  • Mandatory Sudo Escalation Guards: Enforced interactive confirmation prompts for any fleet command requiring sudo: true or node.sudo, wrapped in POSIX sudo -n -- sh -c '<cmd>' with shell_quote_single escaping.
  • OpenSSH-Compliant Config Parser (~/.ssh/config): Supports Key=Value syntax, multiple host aliases, ignores non-host Match blocks, respects first-match-wins, expands ~/ paths, and enforces 0600 private file permissions.
  • Multi-Distro Resilient Telemetry Probing: Section-delimited parsing (===CX_*===) with LC_ALL=C, supporting Docker overlay, ZFS, and LVM root partitions with CPU core detection.

DeepSeek Ecosystem & Native Search / Fetch Protocol

  • DeepSeek Native Search & Fetch API Integration (crates/corex-tools/src/web.rs): Direct integration with DeepSeek's official POST https://api.deepseek.com/v1/tools/search and POST https://api.deepseek.com/v1/tools/fetch endpoints for autonomous web research, markdown scraping, and query operator filtering (site:, lang:, after:, before:, -"...").
  • DeepSeek-V4.1-Flash-1017 Model Engine Support: Added first-class recognition, CLI parsing (cx -m deepseek-v4.1-flash-1017), and status display for DeepSeek's newly released model ("wish-driven programming", faster task completion, lower latency).

Security & Sandbox Hardening

  • Forensic Audit Logging & 7-Day Auto-Retention (corex-core::forensic): Integrated ForensicLogger recording structured audit trails to ~/.corex/logs/corex-forensic-YYYY-MM-DD.log and .corex/forensic.log, capturing every tool call, shell command, file change, and LLM exchange with millisecond timestamps and 7-day retention cleanup.
  • Per-Path Advisory Concurrency Locking (corex-core::file_lock): Implemented PathGuard and per-path advisory sidecar file locking (~/.corex/locks/<hash>.lock) using FNV-1a hashing to eliminate silent lost updates across concurrent Tokio background tasks and multiple Corex processes.
  • Secret Leak Prevention (Config::strip_secrets): Strips provider_api_keys and mcp_servers alongside api_key before persisting workspace .corex/settings.json, preventing accidental repository credential leaks.
  • DeepSeek API Key Isolation (Config::endpoint): self.api_key is strictly isolated and never forwarded as fallback to third-party endpoints unless the base URL explicitly matches.
  • Universal SSRF Guarding on Provider Endpoints: All resolution branches enforce validate_base_url(&p.base_url).is_ok(), blocking insecure HTTP schemes on non-loopback hosts and embedded credentials.
  • HTTP Redirect Anti-SSRF Validation (web.rs): Replaced automatic redirects with manual 5-hop redirect following, resolving DNS and validating against private IP ranges and wildcard DNS rebinders (*.nip.io, *.sslip.io, *.xip.io).
  • Ephemeral Sudo Credential Guard (AskpassGuard): Enforces RAII cleanup of .askpass_cred immediately upon tool completion, timeout, or backgrounding, securing /tmp/corex-askpass-<uid> with 0700 permissions.
  • Shell Sandbox Obfuscation Defense: Blocks variable expansion ($VAR), quote-wrapped flags (e.g. find . '-delete'), and sensitive path wildcards (cat ~/.ssh/id_*) across all shell executions, even when matching allowed_commands.
  • Cancellation-Safe Bounded MCP Transport (mcp.rs): Replaced unbounded reader with 16 MiB line-bounded reader, routed child stderr to Stdio::null() to eliminate 64 KB pipe deadlocks, and sanitized environment variables passed to child MCP processes.
  • Fail-Closed SHA-256 Update Verification (update.rs): Rejects updates if .sha256 signature is missing, invalid, or mismatched, with a 200 MiB decompression bomb limit (MAX_EXTRACTED_BINARY_BYTES).

Performance, Memory (RAM) & Token Management

  • Visible Viewport Chat Rendering ($O(\text{viewport})$): Replaced full conversation cloning at 60 FPS with segmented index tracking (SelectionLines), rendering only lines visible in the viewport.
  • Streaming Markdown Cache (streaming_md_cache): Caches partial markdown structures during token streaming, eliminating re-parsing from byte 0 on non-growing frames.
  • Local LLM Context Shielding (local_client.rs): Routes local models through preventative tool truncation, automated context compaction (compact_messages), and emergency history capping (24,000 tokens), preventing context_length_exceeded crashes in llama-server and Ollama.
  • Deterministic Background & Subagent Log Truncation: Bounded system event messages (TASK_DONE, SUBAGENT_DONE) to 8,000 characters while retaining the last 12 KB in memory and full forensic traces on disk.
  • FIM Bounded Context Windowing (/fim): Enforces 2 MB metadata file limits and extracts a ~24 KB bidirectional context window around <FIM_HOLE>.
  • Accurate Token Estimation: Refined token calculation heuristic to s.len().div_ceil(3) and included m.tool_calls tokens to prevent prompt overflows.
  • Prompt Builder TTL Cache: Caches on-disk skill lookups and memory rules for 15 seconds (cached_skills_and_memory), eliminating redundant synchronous filesystem calls.
  • Deterministic Reasoning Cache (reasoning_cache.rs): Persists up to 100 entries with SHA-256 key hashing and FIFO eviction to ~/.corex/reasoning_cache.json.

TUI, UX & Visual Identity Redesign

  • Discrete Terminal Mint User Badge ([You]): Replaced You: with a sleek badge in terminal mint green (#82D7A0) with dark gray brackets and auto-aligned 8-column multiline indentation.
  • Collapsible Reasoning Badge ([• Thought · 2.3s]): Replaced geometric headers with a clean badge displaying real-time millisecond elapsed timer, toggled via Ctrl+T.
  • Multi-Line Wrapped Command Approval Boxes (diff_view.rs): Confirmation boxes now wrap long commands and complex flag pipelines (format_boxed_wrapped) preserving all paths and flags without ... truncation.
  • Sequential Step-by-Step Tool Approval Modal: Presents multi-tool batches individually ([1 of N]) with options [y] allow this change, [a] allow all remaining, [n] deny, and [w] deny with feedback.
  • Compact Status Bar Layout: Replaced redundant badges with an ultra-compact center telemetry indicator (1 task · 2 agents).
  • Global & Project Personality Guidelines: Automatically discovers and injects persistent instructions from ~/.corex/SYSTEM.md, ~/.corex/COREX.md, ./.corex/SYSTEM.md, ./COREX.md, and ./AGENTS.md.
  • Embedded Procedural Skills (corex-config, corex-fleet): Added first-class built-in skills with instantaneous fallback.
  • Shell Autocompletions: Bundled updated completion scripts for Zsh and Bash supporting cxs, --fleet, and --fetch, with automatic .zcompdump cache refresh.

Fixed

  • Fleet TUI Direct Invocation: Fixed issue where cxs or cx --fleet exited immediately to bash with status Ok(()) by properly initializing FleetDialogState and entering SysAdmin mode on empty argument invocations.
  • Data Race / Undefined Behavior Elimination: Removed unsafe std::env::set_var calls in multithreaded runtime during config loading and /key updates.
  • 100% CPU Background Channel Busy Loop: Fixed select! loop busy polling when child process stdin closes.
  • Grep Empty Query Display (grep ""): Resolved discrepancy between tool schema (pattern/dir_path) and renderer (query/path).
  • UTF-8 Slicing Panics: Replaced raw byte slicing with safe_truncate_str across json_repair.rs, session.rs, and email markdown parsers.
  • Nested Truncated JSON Repair: Fixed stream truncation parser so inner braces do not cause premature closure.
  • Symlink Workspace Escape Shield: Canonized paths and ancestors to ensure symlinks cannot escape workspace boundaries.
  • Selective Safe Command Validation: Permitted read-only inspection commands (hostnamectl, systemctl status/--failed, lsblk, lscpu, dmesg, vmstat, echo) with discard redirections (2>/dev/null, 2>&1), while strictly preserving confirmation for destructive actions (systemctl restart/stop/kill).
  • Subagent ID Collision Prevention: Fixed bit-shift zeroing bug in rand_u32 with atomic sequence counters.
  • URL Balance Query: Stripped /v1 suffix when querying /user/balance.

Canonical Release Checksums (SHA-256)

Platform Archive File SHA-256 Checksum
macOS Apple Silicon corex-v0.7.0-aarch64-apple-darwin.tar.gz 0f6ac6e561fa40d9b8282bbc6e1ca113277713e8523b27f093c4e7756ceae7a4
Android Termux corex-v0.7.0-aarch64-linux-android.tar.gz 98a1fd35b133dead927604e9738a300dd5f4fe59cd3dda907cc2648689218b41
Linux ARM64 corex-v0.7.0-aarch64-unknown-linux-gnu.tar.gz afb8f4a256f77368929f5f363287a5cc8f191a5237eeae309d6aabfc0b6b43e5
macOS Intel corex-v0.7.0-x86_64-apple-darwin.tar.gz afbc5f3f45fc4f68d38e34f90f395d5fe286bdc059e9f8f3206c8db7b0fe5d80
Windows x86_64 corex-v0.7.0-x86_64-pc-windows-msvc.zip 6e89f1ef29a3e14055365db76d7ff192337aba1d9d3a7458cb62311788c107b6
Linux x86_64 corex-v0.7.0-x86_64-unknown-linux-gnu.tar.gz eed7bdfd5707bfbfe2b038d3d56a67995a617949bf6fd4bdec08257d56208455

Installation & Upgrade

Via In-Place Self-Updater

cx update

Via npm

npm install -g @sluisr/corex
# or run directly:
npx @sluisr/corex

Pre-compiled Binary (Linux, macOS, Android Termux)

curl -fsSL https://raw.githubusercontent.com/sluisr/corex/main/install.sh | bash

From Source via Cargo / Crates.io

cargo install corex-cli --locked

Via Nix Flake

nix run github:sluisr/corex