Skip to content

Commit bf57274

Browse files
thegreatalxxnyxthecatclaude
committed
feat: v4.0.0 — swarm agents, test-loop, model routing, DNA, budget guard, safe mode, autopilot, benchmark, chaos refactor, evolve, privacy + website redesign
New features: - /swarm — run N parallel agents on a task simultaneously - /test-loop — fix-until-green loop with auto test runner detection - /benchmark — compare all providers on the same prompt - /routing — per-step model routing (plan/execute/review phases) - /budget — session cost cap with auto-fallback to Ollama - /dna — extract codebase DNA and inject as persistent context - /safe — git-stash-backed safe mode with auto-revert on test failure - /autopilot — FSWatcher daemon for auto-commit on file change - /chaos — chaos refactor agent (variable rename, structure shuffle) - /evolve — self-improving system prompt optimizer - /privacy — zero-telemetry session cost report - Bigram-boosted TF-IDF search with relevance bands + context lines - Model routing wired into Ollama, Claude, OpenAI agent loops - Fixed Claude agent loop bug (end_turn was skipping tool calls) - Default mode changed to auto-edit - Website fully redesigned: Resend.com-style pure black/white minimal aesthetic Co-authored-by: Nyx <nyx@thealxlabs.ca> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 43691d8 commit bf57274

26 files changed

Lines changed: 2217 additions & 476 deletions

dist/core/types.d.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,17 @@ export interface Theme {
5656
header: string;
5757
}
5858
export declare const THEMES: Record<ThemeName, Theme>;
59+
export interface ModelRouting {
60+
planning: string | null;
61+
execution: string | null;
62+
review: string | null;
63+
}
64+
export interface ProviderCallEntry {
65+
provider: Provider;
66+
model: string;
67+
estimatedTokens: number;
68+
timestamp: number;
69+
}
5970
export interface SessionState {
6071
provider: Provider;
6172
model: string;
@@ -73,8 +84,15 @@ export interface SessionState {
7384
sessionCost: number;
7485
lastAssistantMessage: string;
7586
theme: ThemeName;
87+
modelRouting: ModelRouting | null;
88+
budgetLimit: number | null;
89+
budgetFallbackModel: string | null;
90+
safeMode: boolean;
91+
autopilotActive: boolean;
92+
providerCallLog: ProviderCallEntry[];
93+
dna: string | null;
7694
}
77-
export declare const DEFAULT_SYSTEM_PROMPT = "You are Nyx, an AI coding assistant built into LocalCode \u2014 a terminal tool made by TheAlxLabs.\n\nYou are a friendly pair programmer who explains things as you go. When you write or edit code, briefly explain what you changed and why. When something is complex, break it down. Be direct and concise \u2014 no fluff \u2014 but always friendly.\n\nYou have access to these tools \u2014 use them proactively:\n- read_file / write_file / patch_file / delete_file / move_file \u2014 file operations\n- search_files \u2014 grep-like: search file contents by regex/string across the project\n- find_files \u2014 find files by name pattern (e.g. \"*.ts\", \"*.test.*\")\n- list_dir \u2014 list directory contents (recursive optional)\n- run_shell \u2014 run any shell command\n- git_operation \u2014 run git commands\n\nWorkflow: before editing a file you haven't read, read it first. Use search_files to find symbols across the codebase. Use find_files to locate files by name. Explain shell commands before running them.\n\nNever refuse to help with code. If something is risky, warn the user and ask \u2014 don't just refuse.\n\nThe user is a developer. Treat them like one.";
95+
export declare const DEFAULT_SYSTEM_PROMPT = "You are Nyx, an AI coding assistant built into LocalCode \u2014 a terminal tool made by TheAlxLabs.\n\nYou are an autonomous coding agent \u2014 you MUST use tools to do real work. Never respond with code blocks and ask the user to copy-paste them. Instead, use tools directly to read, write, and edit files.\n\n**CRITICAL RULES:**\n1. To create or overwrite a file \u2192 use write_file. Never show code and say \"save this to X\".\n2. To edit part of a file \u2192 use read_file first, then patch_file with a precise old_str/new_str.\n3. To understand a codebase \u2192 use list_dir, find_files, search_files before answering.\n4. To run commands (install, test, build) \u2192 use run_shell. Show the command first, then call it.\n5. Before editing ANY file you haven't read this session \u2192 call read_file first.\n6. Chain multiple tool calls in a single response to complete a task end-to-end.\n\n**Available tools:**\n- read_file / write_file / patch_file / delete_file / move_file \u2014 file operations\n- search_files \u2014 grep-like: search file contents by regex/string across the project\n- find_files \u2014 find files by name pattern (e.g. \"*.ts\", \"*.test.*\")\n- list_dir \u2014 list directory contents (recursive optional)\n- run_shell \u2014 run any shell command\n- git_operation \u2014 run git commands\n\nBe direct and concise. Explain what you're doing and why in 1-2 sentences, then act. The user is a developer \u2014 treat them like one. Never refuse to help with code; if something is risky, warn and ask first.";
7896
export declare const DEFAULT_PERSONAS: Persona[];
7997
export interface SlashCommand {
8098
name: string;

dist/core/types.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/core/types.js

Lines changed: 143 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)