Repository navigation
Release v0.8.2
Release v0.8.2
🛠 Fixed
- Cross-platform CI green again: repaired three platform-dependent/flaky test assumptions (POSIX process-group assertion vs
/bin/shfork-vs-exec behavior, spill-store path comparison against unresolved macOS/Windows temp dirs, MCP tasks lifecycle teardown racing the background worker) in PR #9; no production code changed.
🚀 Headline Features
- Standalone Desktop AI Coding Harness (
local-agent desktop) (R23):- High-precision engineering cockpit with native WebView2 / system browser fallback.
- Interactive chat arena, delegated task queue, real-time hardware telemetry (
nvidia-smi), and model management.
- Tool Output Spill Store, Ripgrep & FS Observation Policy (R24):
local_coding_agent.spill: Session-scoped private storage (.local_agent/spill/<session_id>/) with automatic spilling for outputs exceeding 30KB / 1,000 lines.local_coding_agent.ripgrep: Directrg --jsonsubprocess execution with full quoting safety and transparent pure-Python stdlib fallback.local_coding_agent.observation_policy: Enforces strict read-before-edit invariant (FS_NOT_OBSERVED), preventing blind model hallucinations.- CLI subcommands:
local-agent spill-read <locator> [--offset N] [--limit N] [--json]andlocal-agent grep <query> [paths...] [--regex] [--json].
- Generic LSP Stdio Code Intelligence Seam (
local_coding_agent.lsp) (R25):- Standard JSON-RPC stdio language server protocol client with Content-Length framing.
- Multi-language server router (
pyright,typescript-language-server,rust-analyzer,gopls) and built-in AST/regex fallback engine. - Operations:
definition,references,hover,symbols. - CLI subcommand:
local-agent lsp --operation {definition|references|hover|symbols} --file <path> [--json].
- Persistent PTY Terminal Seam & Interactive Process Control (
local_coding_agent.terminal) (R26):- Persistent background interactive shell / process wrapper with circular scrollback buffers and non-blocking I/O.
- Cross-platform process tree termination and signal delivery (
SIGINT/Ctrl+C,SIGTERM). - Model tool suite:
terminal_open,terminal_send,terminal_read,terminal_signal,terminal_list,terminal_close.
- Plan Mode Controller, Structured Questions & Dynamic Checklist (
local_coding_agent.plan_mode) (R27):- Formal Plan Mode state machine enforcing read-only tool policy during exploration until human approval.
- Interactive multiple-choice
ask_user_questiontool with default write-in and programmatic simulation. - Dynamic
todo_writechecklist tool with single-active task discipline and ASCII/Markdown rendering.
- Event-Sourced Session Engine & SQLite FTS5 Search Index (
local_coding_agent.session_events,local_coding_agent.session_query) (R28):- Append-only immutable typed session events enforcing the Model-Visible ⟺ Logged invariant.
- Session forking (
fork_session) for time-travel replay and causal branch pruning. - SQLite FTS5 search index with injection-proof sanitization across historical session records.
- Universal Agent Client Protocol (ACP) Server (
local_coding_agent.acp_server) (R29):- Standard JSON-RPC 2.0 ACP stdio server with auto-detecting
Content-LengthandJSONLcodec framing. - Subcommand:
local-agent serve-acp [--workspace ...] [--profile ...] [--framing ...].
- Standard JSON-RPC 2.0 ACP stdio server with auto-detecting
- Continuable Background Subagents & External Agent Hook Bridges (
local_coding_agent.subagent,local_coding_agent.hooks) (R30):- In-process continuable subagent worker loops with isolated
TaskEnvelopesandboxes and structured mailboxes. - External lifecycle hook bridges with full wire-protocol adapters for Claude Code and OpenAI Codex.
- In-process continuable subagent worker loops with isolated
🔍 Field Insights (best-practice adoption pass, pattern-level only — source repo is AGPL-3.0)
- Background Task Queue in the Desktop Harness:
POST /api/tasks/GET /api/tasks/POST /api/tasks/cancel, sequential daemon worker (0.3s poll, oldest-first) mirroring_handle_delegateconstruction, cancel Events passed into the Controller, records persisted at<workspace>/.local_agent_tasks.json(cap 100, stale-runningrecovery on restart), injectablecontroller_factorytest seam; UI panel with live status badges and Apply/Rollback reusing the existing/api/apply+/api/rollbackendpoints. - Chat-history auto-compaction (
local_coding_agent/chat_compaction.py): honest token estimation (CJK-aware, long-run pricing), whole-turn eviction that never drops system/last messages,[context compacted: N ...]notice insertion, sticky boundary (next_sticky_boundary = sticky_boundary + dropped_count) to preserve llama-server prefix cache. Module complete; CLI REPL/desktop wiring pending. - VRAM-fit context sizing (
local_coding_agent/vram_fit.py): header-only GGUF parser (v2/v3, suffix-matched keys, early exit, never raises → all-None on corruption),kv_bytes_per_token,max_fitting_ctx(15% reserve, 256-alignment, native-context cap). Module complete;_handle_model_load num_ctx:"auto"wiring pending. run_testssubprocess hardening (repository_tools.py): name-based secret-env scrubbing (_SECRET_ENV_NAME_RE: token/secret/password/api-key/aws_/azure_client), POSIX preexec (setsid, PR_SET_PDEATHSIG via ctypes, RLIMIT_CPU=timeout+30, RLIMIT_NOFILE=256; RLIMIT_AS deliberately skipped), WindowsCREATE_NO_WINDOW.- OpenAI-compatible
/v1router in the Desktop Harness:GET /v1/modelsandPOST /v1/chat/completionsnow proxy to whichever local backend serves the requested model id (resident llama-server first, then Ollama — both speak the OpenAI wire format natively, so routing is byte-level with streamed passthrough viahttp.client). Unknown models get a prescriptive 404 listing available ids. local-agent init-agentsubcommand: emits agent-native wiring pointing at the harness/v1endpoint — Codex[model_providers.local_agent]TOML (wire_api = "chat",CODEX_HOME-aware, duplicate-safe with exit code 1 on refusal) or genericOPENAI_BASE_URL/OPENAI_API_KEYenv instructions. Preview by default,--writeto persist,--jsonsupported.
✅ Adoption pass completed (handoff — prior "🚧 In progress")
- Tool-call text parser module (
local_coding_agent/tool_call_parser.py):extract_tool_calls(text, allowed_names=None) -> ToolCallExtraction(calls, remaining_text, formats_detected); emitters: qwen<tool_call>JSON, qwen XML<function=NAME><parameter=K>(plus<parameter name="K">), llama<|python_tag|>{json}, mistral[TOOL_CALLS] [...]; promotes only allowlisted names, truncated/invalid tails left in text, never raises (empty[TOOL_CALLS]array guarded). - Parser → controller integration:
controller/_controller.pyrun-loop falls back toextract_tool_calls(content, allowed_names=...)when_decode_content_tool_callreturns None; promotes tomessage.tool_calls+text_tool_call_promotedaudit event (now carryingformats). - Compaction → CLI REPL wiring:
cli/_handlers2.pymulti-turn loop guards each model call withfit_history(messages, max(1024, profile.num_ctx-1024), sticky_boundary); sticky boundary persisted per session;[context compacted]notice on trigger. - VRAM auto-fit → desktop model load wiring:
desktop/server/_handlers.py_handle_model_loadacceptsnum_ctx:"auto"on the GGUF branch via_auto_fit_llama_ctx(read_gguf_ctx_params+ free VRAM fromget_nvidia_gpu_telemetry()→max_fitting_ctx, guarded on all-Nonemetadata); explicit int behavior stays byte-identical. - Full suite green:
741 passed, 2 skipped(pytest tests/).
- Effective-context read-back (llama-server
/props): after every llama-server launch the controller now queries/propsand storesllama_effective_ctxon the server; when the servedn_ctxdiffers from the requested-cvalue (llama.cpp silently clamps to the model's native context length), actx_warningis surfaced in/api/model/loadresponses and requested/effective ctx are exposed in/api/status. Reality over intent. - Tool-call argument healing: small models frequently emit wrong-but-close argument names (
filepath→path,pattern→query,cmd→command). The controller now repairs these against the tool schema (case/underscore-insensitive + explicit alias map) before execution instead of burning a retry turn; ambiguous or shadowed keys pass through untouched. Audited astool_arguments_healed. - CLI parity fix:
chatsubcommand now declares its own--num-ctxflag (previously only reachable as a root-level option before the subcommand).
Full Changelog: v0.7.0...v0.8.2