From 3493801b302e6a1957c61b710d17897b719a5da5 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Tue, 24 Nov 2026 21:53:37 +0530 Subject: Add Lua addon system and full coding toolset to Solo engine - src/agentux/addons.py: sandboxed LuaJIT addon manager with seven lifecycle hooks (on_start, on_prompt, on_system_prompt, on_tool_call, on_tool_result, on_answer, on_event). Addons load from ~/.agentux/addons/ or /.agentux/addons/. - src/agentux/solo_engine.py: Solo now gets the full workspace toolset (filesystem, shell, git, project, search, outline_symbols, todo, view_image, repomap, checkpoint) plus shadow checkpointing, so it can read, edit, run, and test code rather than only researching. - src/agentux/agent.py: wires AddonManager into the agent lifecycle. - tests/test_addons.py: 22 tests for loading, hooks, sandbox isolation, and agent integration. - tests/test_solo_engine.py: 6 tests for Solo's coding tools and checkpointing. 547 tests pass. Co-Authored-By: Claude Code --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 3ec3981..673a178 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,24 @@ The model provider is interchangeable infrastructure. Agentux speaks the OpenAI- **Local-model optimizations.** `--lean` cuts turn latency from 40s to 1.1s on small models. `--text-tools` lets quantized models execute tools through Markdown/XML when native tool calling is limited. Context compaction kicks in past 30 messages. +**Lua addon system.** Community scripts that hook the agent lifecycle. Drop a `.lua` file in `~/.agentux/addons/` or `/.agentux/addons/` and it loads automatically. Addons run in a sandboxed LuaJIT runtime and can mutate prompts, intercept tool calls, rewrite answers, and observe events. + +```lua +-- ~/.agentux/addons/prefix.lua +agentux.register({ + name = "prefixer", + version = "1.0", + on_prompt = function(p) + return "[prefixed] " .. p + end, + on_answer = function(a) + return a .. " [signed]" + end, +}) +``` + +Available hooks: `on_start`, `on_prompt`, `on_system_prompt`, `on_tool_call`, `on_tool_result`, `on_answer`, `on_event`. Addons can also block tool calls or rewrite their arguments. + --- ## Quick Start -- cgit v1.2.3