6c70a2ceaf
fix: TUI overflow, scrollable header, tool output, git branch
...
- Fixed: chat content no longer overflows past allocated height.
Lines are measured for physical width and hard-truncated to
exactly the chat area height. Input + status bar always visible.
- Header scrolls with chat (not pinned), only input/status fixed
- Git branch in status bar (green, via git rev-parse)
- Alt screen mode — terminal scrollback disabled
- Mouse wheel + PgUp/PgDown scroll within TUI
- New EventToolResult: tool output as dimmed indented block
- Separator lines above/below input, no status bar backgrounds
2026-04-03 15:53:42 +02:00
b9faa30ea8
feat: add router foundation with task classification and arm selection
...
internal/router/ — core routing layer:
- Task classification: 10 types (boilerplate, generation, refactor,
review, unit_test, planning, orchestration, security_review, debug,
explain) with keyword heuristics and complexity scoring
- Arm registry: provider+model pairs with capabilities and cost
- Limit pools: shared resource budgets with scarcity multipliers,
optimistic reservation, use-it-or-lose-it discounting
- Heuristic selector: score = (quality × value) / effective_cost
Prefers tools, thinking for planning, penalizes small models on
complex tasks
- Router: Select() picks best feasible arm, ForceArm() for CLI override
Engine now routes through router.Select() when configured.
Wired into CLI — arm registered per --provider/--model flags.
20 router tests. 173 tests total across 13 packages.
2026-04-03 14:23:15 +02:00
33dec722b8
feat: add security firewall with secret scanning and incognito mode
...
internal/security/ — core security layer baked into gnoma:
- Secret scanner: gitleaks-derived regex patterns (Anthropic, OpenAI,
AWS, GitHub, GitLab, Slack, Stripe, private keys, DB URLs, generic
secrets) + Shannon entropy detection for unknown formats
- Redactor: replaces matched secrets with [REDACTED], merges
overlapping ranges, preserves surrounding context
- Unicode sanitizer: NFKC normalization, strips Cf/Co categories,
tag characters (ASCII smuggling), zero-width chars, RTL overrides
- Incognito mode: suppresses persistence, learning, content logging
- Firewall: wraps engine, scans outgoing messages + system prompt +
tool results before they reach the provider
Wired into engine and CLI. 21 security tests.
2026-04-03 14:07:50 +02:00
f0633d8ac6
feat: complete M1 — core engine with Mistral provider
...
Mistral provider adapter with streaming, tool calls (single-chunk
pattern), stop reason inference, model listing, capabilities, and
JSON output support.
Tool system: bash (7 security checks, shell alias harvesting for
bash/zsh/fish), file ops (read, write, edit, glob, grep, ls).
Alias harvesting collects 300+ aliases from user's shell config.
Engine agentic loop: stream → tool execution → re-query → until
done. Tool gating on model capabilities. Max turns safety limit.
CLI pipe mode: echo "prompt" | gnoma streams response to stdout.
Flags: --provider, --model, --system, --api-key, --max-turns,
--verbose, --version.
Provider interface expanded: Models(), DefaultModel(), Capabilities
(ToolUse, JSONOutput, Vision, Thinking, ContextWindow, MaxOutput),
ResponseFormat with JSON schema support.
Live verified: text streaming + tool calling with devstral-small.
117 tests across 8 packages, 10MB binary.
2026-04-03 12:01:55 +02:00