Repository navigation
Proxima v1.0.1
What's changed
Added
SessionMode.safenow enforced inPermissionGate— any tool abovesaferisk level is denied without prompt when the session is in safe mode (step 3a, audited assafe_mode_blocked)ToolErrorCodeenum onToolError(notFound | permissionDenied | pathViolation | timeout | parseError | unknown) — tools can now classify errors for actionable LLM feedback_formatToolError()helper inAgentLoop— tool errors now return structured context (Tool: …\nError: …\nSuggestion: …) instead of bare'Error: $e'stringsAgentCallbacks.onUsageReport(turnUsage, cumulative)— called after every completed turn;Rendererdisplays↑N ↓N total: Nas a dim line after each response- System prompt overhauled in
ContextBuilder._buildSystemPrompt(): identity section, 7 ordered operating rules (read-before-write, patch-over-write, verify-after-write, diagnose-before-retry, no-identical-duplicate-calls, safe-mode-tool-list, test-fix-cycle limit), and session state (mode + cumulative token count) - 3 new permission gate tests: safe mode blocks confirm tools, safe mode allows safe tools, deny list pre-empts risk classification
TestOutputParser— parses raw test runner output into structuredTestResult/TestFailureobjects; supports Dart, Jest, Pytest, Cargo, Go; graceful fallback to raw string on unparseable outputrun_teststool now embedsFRAMEWORK:<name>marker in output and returns a concise structured failure summary (test name, file, message) before the raw output; LLM gets actionable context instead of wall-of-text stdout- 15 new parser tests covering all five frameworks and the framework marker extractor
- Critic subagent (
SubagentType.critic) — pre-commit review agent that fires before the permission prompt onwrite_file/patch_fileatconfirmrisk; returnsCriticResultwithapprove | warn | block_suggestionverdict; advisory only, never a hard gate; silent onapprove; displays amber/red note above y/n prompt forwarn/block_suggestion CriticResult,CriticVerdict,CriticIssuetypes added tosubagent_runner.dartSubagentRunner.runCritic()— never throws; graceful fallback toapproveon LLM error or malformed JSON; strips markdown fences; capped at 1024 tokensPermissionGate.criticCallback— optionalCriticCallback?wired in before step 6 (user prompt); only fires for confirm-level write tools, never inautomodePromptCallbackextended with{CriticResult? criticResult}named parametercritic_on_write: trueconfig field in.proxima/config.yaml(default: true)ProximaConfig.criticOnWritefield with yaml keycritic_on_write- Critic wired in
repl.dartusing the active model and a fresh provider per invocation - 7 new critic tests (approve/warn/block_suggestion/malformed JSON/LLM error/system prompt/markdown fence)
ProximaSession.fileCache—Map<String, String>keyed by canonical path; populated by the agent loop after every successfulread_filecallCompaction.deduplicateFileReads()— new Pass 0 that replaces all but the most recentread_filetool result for any given path with[File already in context]; integrated intoCompaction.compact()via optionalfileCacheparam; estimated 15–30% token savings in file-heavy sessionsContextBuilderpassessession.fileCachetoCompaction.compact()- 11 new compaction tests covering deduplication, pruning, and truncation
FallbackProvider(lib/providers/fallback_provider.dart) — wraps a primaryLLMProviderwith a secondary; transparently retries on non-authLLMError; auth errors rethrown immediately;listModels()also falls back; no changes toAgentLoopProviderRegistry.create()accepts optionalfallbackModelstring; wraps primary inFallbackProviderwhen set; best-effort (ignores fallback config errors)ProximaConfig.fallbackModelfield with yaml keyfallback_model(default: null)- Fallback model wired in
repl.dart_getAgentLoop() - 5 new fallback provider tests
Fixed
FallbackProvider.stream()never reached secondary — on primary stream failure the old implementation yielded a done chunk withhasToolUse: false, which the agent loop treated as a successful empty response; secondary was never tried. Fixed by rethrowing the non-authLLMErrorso_streamResponse's catch block falls back tocomplete(), which correctly retries on the secondary- Token usage display appeared before response separator —
onUsageReportwas called beforeonFinalResponse/onClarify, so the dim token line printed above the separator instead of below it. Swapped order: text → separator → usage Compaction.deduplicateFileReads()missing role guard — assumedmessages[i-1]was always an assistant message; added explicitif (assistantMsg.role != MessageRole.assistant) continueguard for malformed history- Critic
diffOrContentfallback was too verbose —toolCall.args.toString()sent the full serialized args map to the critic LLM when neithercontentnorpatchwas present; replaced with''to avoid wasting tokens on irrelevant data - 4 additional tests (streaming fallback, auth rethrow, fallback path, orphaned tool message)
- 237 tests total
Installation
macOS / Linux — install script
curl -fsSL https://raw.githubusercontent.com/jizzel/proxima/main/install.sh | shmacOS (Apple Silicon + Intel via Rosetta 2)
curl -fsSL https://github.com/jizzel/proxima/releases/download/v1.0.1/proxima-macos-arm64 \
-o /usr/local/bin/proxima && chmod +x /usr/local/bin/proximaLinux (x86_64)
curl -fsSL https://github.com/jizzel/proxima/releases/download/v1.0.1/proxima-linux-x64 \
-o /usr/local/bin/proxima && chmod +x /usr/local/bin/proximaWindows (x86_64) — PowerShell
irm https://raw.githubusercontent.com/jizzel/proxima/main/install.ps1 | iexOr download proxima-windows-x64.exe below and add it to a directory on your PATH.