Skip to content

Release v0.8.2

Choose a tag to compare

@github-actions github-actions released this 26 Aug 18:56
· 58 commits to main since this release

Release v0.8.2

🛠 Fixed

  • Cross-platform CI green again: repaired three platform-dependent/flaky test assumptions (POSIX process-group assertion vs /bin/sh fork-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: Direct rg --json subprocess 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] and local-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_question tool with default write-in and programmatic simulation.
    • Dynamic todo_write checklist 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-Length and JSONL codec framing.
    • Subcommand: local-agent serve-acp [--workspace ...] [--profile ...] [--framing ...].
  • Continuable Background Subagents & External Agent Hook Bridges (local_coding_agent.subagent, local_coding_agent.hooks) (R30):
    • In-process continuable subagent worker loops with isolated TaskEnvelope sandboxes and structured mailboxes.
    • External lifecycle hook bridges with full wire-protocol adapters for Claude Code and OpenAI Codex.

🔍 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_delegate construction, cancel Events passed into the Controller, records persisted at <workspace>/.local_agent_tasks.json (cap 100, stale-running recovery on restart), injectable controller_factory test seam; UI panel with live status badges and Apply/Rollback reusing the existing /api/apply + /api/rollback endpoints.
  • 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_tests subprocess 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), Windows CREATE_NO_WINDOW.
  • OpenAI-compatible /v1 router in the Desktop Harness: GET /v1/models and POST /v1/chat/completions now 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 via http.client). Unknown models get a prescriptive 404 listing available ids.
  • local-agent init-agent subcommand: emits agent-native wiring pointing at the harness /v1 endpoint — Codex [model_providers.local_agent] TOML (wire_api = "chat", CODEX_HOME-aware, duplicate-safe with exit code 1 on refusal) or generic OPENAI_BASE_URL/OPENAI_API_KEY env instructions. Preview by default, --write to persist, --json supported.

✅ Adoption pass completed (handoff — prior "🚧 In progress")

  1. 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).
  2. Parser → controller integration: controller/_controller.py run-loop falls back to extract_tool_calls(content, allowed_names=...) when _decode_content_tool_call returns None; promotes to message.tool_calls + text_tool_call_promoted audit event (now carrying formats).
  3. Compaction → CLI REPL wiring: cli/_handlers2.py multi-turn loop guards each model call with fit_history(messages, max(1024, profile.num_ctx-1024), sticky_boundary); sticky boundary persisted per session; [context compacted] notice on trigger.
  4. VRAM auto-fit → desktop model load wiring: desktop/server/_handlers.py _handle_model_load accepts num_ctx:"auto" on the GGUF branch via _auto_fit_llama_ctx (read_gguf_ctx_params + free VRAM from get_nvidia_gpu_telemetry() → max_fitting_ctx, guarded on all-None metadata); explicit int behavior stays byte-identical.
  5. 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 /props and stores llama_effective_ctx on the server; when the served n_ctx differs from the requested -c value (llama.cpp silently clamps to the model's native context length), a ctx_warning is surfaced in /api/model/load responses 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 as tool_arguments_healed.
  • CLI parity fix: chat subcommand now declares its own --num-ctx flag (previously only reachable as a root-level option before the subcommand).

Full Changelog: v0.7.0...v0.8.2