Releases: BolivarTech/magi
v0.6.0
BREAKING: the default backend with no magi.toml/env changed from Anthropic
to Ollama (http://localhost:11434/v1, kimi-k2.6:cloud + the qwen3.5/gpt-oss/deepseek
trio). Anthropic still works but is now opt-in (provider = "anthropic" or
MAGI_PROVIDER=anthropic).
Added
src/defaults.rs— single source of truth for the built-in default profile.--init-configCLI flag and/init-configTUI command to scaffold a defaultmagi.toml.- Startup notice (when no
magi.toml) and an actionable error (when Ollama is unreachable),
both DRY-interpolated from the default constants.
Changed
resolve_provider/resolve_openai_base_urldefaults → Ollama-first.resolve_openai_modelno longer errors when unset — returns the built-in default.- The MAGI trio defaults to qwen3.5/gpt-oss/deepseek on the openai path when
[magi]is absent.
Known limitations
- The built-in defaults assume Ollama. If you point
provider=openaiat real OpenAI
(or another non-Ollama service) WITHOUT settingOPENAI_MODEL/[openai].model/[magi],
the defaults (kimi-k2.6:cloud+ the:cloudtrio) will not exist there — set them
explicitly. - The default
:cloudmodel tags reflect the Ollama catalog at release time and may rot over
time; refresh per release. They live in one place (src/defaults.rs) for easy maintenance.
Full Changelog: v0.5.2...v0.6.0
v0.5.2
Reasoning-model streaming (#24). Reasoning models (e.g. kimi-k2.6:cloud,
deepseek-r1) stream their chain-of-thought in delta.reasoning with empty
delta.content; the OpenAI-compatible parser previously ignored it, so the TUI
showed a frozen blank during a long reasoning phase. TUI/provider only — the agent
loop, persistence, crypto, and /consult are unchanged.
Added
- Live "thinking" feedback for reasoning models. By default a compact
🤔 MAGI Pensando…indicator with an animated spinner shows while the model
reasons, instead of a frozen blank. The reasoning text itself is never
persisted to the encrypted store. /toggle-show-thinkingswitches between the compact indicator (default) and
a verbose mode that streams the full chain-of-thought inline (useful for
debugging). Added to/help.
Fixed
- Reasoning-model chats no longer appear frozen: the parser now surfaces
delta.reasoningas a distinct stream instead of dropping it.
Known limitations
- In the verbose mode (
/toggle-show-thinking), the reasoning and the answer are
streamed into the same message bubble and can visually run together; the default
compact mode is unaffected.
Full Changelog: v0.5.1...v0.5.2
v0.5.1
TUI usability patch — makes long output (notably the /consult report) readable.
TUI-only; the agent loop, providers, persistence, and crypto are unchanged.
Added
- Conversation scrollback. Scroll the history line-by-line with
↑/↓, by page
withPgUp/PgDn, and to the top/bottom withHome/End. The pane follows the
tail by default and snaps back to the newest content on a new/streaming reply.
Fixed
- Tall messages were truncated. A single message taller than the pane (e.g. a
MAGI consult report) previously showed only its tail with no way to scroll up; it
is now fully reachable via the new scrollback. - Markdown/table indentation was lost.
wrap_messagenow returns a fitting line
unchanged, preserving leading indentation and internal alignment spaces (bullets,
ASCII tables, box-drawing). Wrapping is measured in terminal display columns, so
CJK/emoji (2-column) glyphs no longer wrap a column early. - Long prompts were cut off at the right border. The input box now grows (up to
6 rows) and wraps long/multi-line prompts instead of truncating them.
Known limitations
wrap_messagestill collapses internal whitespace when reflowing a line that is
wider than the terminal (word-boundary wrap); fitting lines are untouched. Mid-
prompt cursor placement in an input taller than 6 rows is approximate (exact while
typing at the end).
Full Changelog: v0.5.0...v0.5.1
v0.5.0
Per-agent model selection for the three MAGI perspectives (Melchior / Balthasar /
Caspar). Additive and backward-compatible — the Provider trait, the agent loop,
config discovery, the consult tool, MagiCoreProviderAdapter, and encrypted
memory are unchanged; with no [magi] configuration the behavior is identical to
v0.4.0.
Added
- Per-agent MAGI model selection via
magi.toml[magi]section and
MAGI_MODEL_{MELCHIOR,BALTHASAR,CASPAR}env vars. Opt-in; absent = all three
perspectives share the principal model (backward compatible). Overrides reuse
the principal backend's endpoint/key and vary only the model — true
cross-family lineage diversity requires an Ollama-style multi-family endpoint.
Full Changelog: v0.4.0...v0.5.0
v0.4.0
First step of the multi-backend MAGI integration: the magi-core crate (already
declared but unused) is now wired in, giving the agent a three-perspective
consensus capability (Melchior / Balthasar / Caspar). Additive only — the
Provider trait, the agent loop, config discovery, and encrypted memory are
unchanged.
Added
consulttool — exposesmagi-core's 3-perspective consensus as a tool the main LLM can invoke autonomously when a question has genuine trade-offs. Routing emerges from the existing tool loop (no separate classifier); each call passes the inline approval gate, which doubles as cost control for the ≈ 3 model calls./consult <question>command — forces a MAGI consensus directly in the TUI, bypassing the router and approval, rendering the verbatim report (three perspectives + verdict). Runsanalyzein a joined task so a panic inmagi-coresurfaces as a recoverable error instead of killing the runner; blocks the session while it runs, like a normal turn.MagiCoreProviderAdapter(src/agent/magi_adapter.rs) — bridges magi-rs's resolvedProvidertomagi_core::provider::LlmProvider, so the consensus reuses the same backend + credentials (Anthropic or any OpenAI-compatible endpoint). No second LLM config layer.- StaticProvider guard —
consultis registered (and/consultworks) only when a real provider is configured; on the static/no-key path the tool is absent and/consultreports that a provider is required. - Degraded surfacing — a consult that completes with fewer than three agents is prefixed
[DEGRADED: …]so a low-quality consensus is never silent. - New tests for the adapter (assembled text, role-fold delimiter, error mapping), the tool (contract + consensus + invalid-args + empty-query + oversized-query + backend-error via
magi-core'sRoutingMockProvider), and the/consultparser + a full-report render-safety test. Total tests: 147 (was 136).
Changed
magi-coredependency bumped1.0→1.1(no features enabled;reqwest 0.12is not pulled — the adapter reuses magi-rs's existingreqwest 0.11stack).test-utilsenabled as a dev-dependency forRoutingMockProvider.
Security
- The verbatim consult report (LLM-generated) is run through
sanitize_textbefore rendering — strips ANSI escapes / control characters, matching the streaming-delta path. Consult input is length-capped (8192 bytes) on both the tool and forced/consultpaths, and empty queries are rejected before any model call.
Known limitations
- System-prompt fold.
magi-coredifferentiates its three personas via distinct system prompts, but magi-rs'sProviderhas no system-role channel yet, so the system text is folded into the user turn (behind an explicit delimiter). On weak / small local models this can weaken persona divergence and JSON adherence. Revisit when magi-rs gains a system-prompt channel. CompletionConfignot applied. The adapter does not forwardmax_tokens/temperatureto the backend (theProvidertrait exposes no per-call knobs). Deferred.- Deferred follow-ups (internal dev-docs): repetitive-call detection keyed on the consult
queryargument, and anInputTooLargeearly-rejection UX for oversized/consultinput.
Full Changelog: v0.3.1...v0.4.0
v0.3.1
TUI rendering hotfix — two pre-existing UX bugs found during the 0.3.0
end-to-end smoke (long-reply truncation + new-message scroll-off). Both
affect all providers (Anthropic, OpenAI-compatible, Static). Render-only,
no API / trait / contract changes.
Fixed
- Conversation pane truncated long messages at the panel's right border instead of wrapping. New
wrap_messagehelper (src/tui/mod.rs) word-wraps each message bychars().count()(UTF-8 char-safe) to the panel's inner width, preserves existing\nas hard breaks, and hard-splits absurdly long words. One message stays oneListItemso Selection / Visual navigation (app.selected_index → app.messages[i]) is unchanged. - Conversation pane did not auto-scroll when new messages overflowed the bottom. New
effective_selection/effective_highlight_symbolhelpers pin the last message as the selected row in Normal mode (ratatui'sListauto-scrolls to keep the selected item visible) while suppressing the">> "highlight prefix so the pin is invisible. Selection / Visual modes still show the prefix and use the user-chosen index. - Streaming tail of a tall response stayed off-screen (and on some terminals "jumped/reset" when the message exceeded the conversation pane). The follow-tail fix now tail-truncates the rendered last message in Normal mode to its trailing
viewport_inner_heightwrapped lines, so streaming visibly scrolls line-by-line. Selection / Visual modes still render every wrapped line so the full message remains reviewable viaCtrl+S → ↑.
Added
- 15 new tests covering the four render-time helpers (
wrap_message: word wrap normal / multibyte / oversized word / embedded newlines / width-0 / empty;effective_selection: follow-tail in Normal mode / chosen index in Selection / Visual / empty messages;effective_highlight_symbol: by mode;tail_lines: keeps last N / unchanged when max≥len / max=0 no-op / empty / shift-by-one streaming tick). Total tests: 136 (was 121).
Known limitations
- Leading indentation and internal whitespace runs are collapsed when a message is wrapped.
wrap_messageusessplit_whitespace, which drops leading spaces and multi-space gaps. Markdown bullets like" - item"render as"- item"; preformatted blocks lose alignment. Tracked for a follow-up patch (preserve per-line indentation via a different tokenizer). - Wrap width is measured in
chars().count(), not terminal display width. CJK / emoji glyphs that occupy two cells will wrap one column early; combining marks may wrap one column late. Tracked for a follow-up that switches tounicode-width.
Full Changelog: v0.3.0...v0.3.1
v0.3.0
First multi-backend release. Magi can now talk to any OpenAI-compatible Chat
Completions endpoint — local Ollama, OpenAI, Groq, OpenRouter — selected by
a new magi.toml, alongside the existing Anthropic Messages API path. No
regression: the Anthropic surface and all its tests are byte-equivalent.
Added
OpenAiCompatibleProvider(src/agent/provider.rs) — Chat Completions over{base_url}/chat/completionswithstream:true, astream::unfoldSSE state machine that finalizes onfinish_reason/[DONE]/ stream-end with an idempotentdoneguard (MessageDoneemitted exactly once),data:prefix tolerant of optional space, malformed lines swallowed, HTTP non-2xx surfaced asErr,MAX_SSE_BUFFER_BYTES(8 MiB) cap. Constructor takes a named-fieldOpenAiSettingsstruct (no positional same-type swap).magi.tomlconfiguration (src/config.rs) —MagiConfig/OpenAiConfig/AnthropicConfig,serde(deny_unknown_fields)so typos (andapi_key) fail at parse time, env > TOML > defaults precedence (MAGI_PROVIDER/OPENAI_BASE_URL/OPENAI_MODEL).MagiConfig::loaddistinguishesNotFound(silent default) from other I/O errors (surfaced as a TUI startup notice). Referencemagi.toml.exampleis committed; user-localmagi.tomlis gitignored.- Coalesced
map_messages/map_tools. Same-turn parallelContent::ToolUseblocks collapse into ONE assistant message with atool_callsarray; UserText/ToolResultare emitted in content order (each block as its own OpenAI message).Tool::input_schemaforwards astools:[{type:"function",function:{…}}]. - Bounded tool-call accumulator.
MAX_TOOL_CALL_SLOTS = 64caps streamedtool_calls[].index; over-cap warns (eprintln) instead of dropping silently (RF-8). Orphanargumentsfragments (slot has neither id nor name yet) are skipped with a warning to prevent mis-attribution. tests-121(was 95). 26 new tests — config parsing & precedence; coalesced message mapping; mixed-content User ordering; OpenAI text streaming (with [DONE], without [DONE]/finish_reason, malformed line, HTTP error, stream-end-only finalize); fragmentedtool_callsassembly; bounded index; post-stop TextDelta suppression; args-before-id skip;resolve_providerwiring.
Security
OPENAI_API_KEYfrom environment only. Never read frommagi.toml;deny_unknown_fieldsrejects anapi_keyfield at parse time. The dummy"ollama"fallback for local Ollama is documented inline; real backends fail loudly with 401 if the env var is unset.- Keyring separation unchanged. The Anthropic key (
magi-rs) and DB master key (magi-rs-internal) remain in separate keyring services;test_agent_history_resilience_to_key_rotationis untouched.
Documentation
- README "Configuration:
magi.toml" section — full precedence table for the four settings (MAGI_PROVIDER/OPENAI_BASE_URL/OPENAI_MODEL/ANTHROPIC_MODEL), keys-never-in-TOML invariant (and thedeny_unknown_fieldsparse-error consequence), Ollama quickstart. reqwest::Clientno-timeout rationale documented — local Ollama can spend tens of seconds on cold-load before the first SSE event; a total-request timeout would truncate healthy long streams. Stream-side termination is handled by the three finalize triggers +MAX_SSE_BUFFER_BYTES.
Full Changelog: v0.2.1...v0.3.0
v0.2.1
Changed
- Docs/UX: the README and the static-mode startup hint now recommend a standard API key (
ANTHROPIC_API_KEY/key.txt) as the supported path, and mark/login(OAuth) as best-effort — it reuses Anthropic's Claude Code OAuth client, so it may be rate-limited or blocked. No behavior change.
Full Changelog: v0.2.0...v0.2.1
v0.2.0
First public release — the repository is now open-source (MIT OR Apache-2.0). Functionally identical to 0.1.2, promoted to the semver-correct minor version for the breaking on-disk format change made during the 0.1.x security hardening (a pre-0.1.1 .magi-rs-memory.db resets on upgrade). See [0.1.1] for the security-audit remediation and [0.1.2] for the docs + release-pipeline work this consolidates.
Full Changelog: v0.1.2...v0.2.0
v0.1.2
Changed
- Internal development docs are no longer shipped. The audit, strategy, and roadmap notes moved to a gitignored
dev-docs/directory — excluded from the repository and the published crate.
Added
docs/OVERVIEW.md— a public overview of Magi, themagi-corefoundation, and the multi-perspective (MAGI) philosophy.- Windows binary in releases. Tagged releases now attach
magi-rs-vX.Y.Z-windows-x86_64.zip(the compiledmagi-rs.exe+ README + licenses) alongside the source archives.
Full Changelog: v0.1.1...v0.1.2