micro-models-agent 0.63.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/CHANGELOG.md +174 -0
  2. package/dist/cli/cache-line.js +30 -0
  3. package/dist/cli/command-suggest.js +38 -0
  4. package/dist/cli/commands.js +285 -60
  5. package/dist/cli/completer.js +16 -16
  6. package/dist/cli/json-payload.js +32 -0
  7. package/dist/cli/main.js +165 -77
  8. package/dist/cli/plugin-commands.js +5 -4
  9. package/dist/cli/relaunch.js +37 -0
  10. package/dist/cli/repl-commands.js +441 -307
  11. package/dist/cli/repl.js +360 -83
  12. package/dist/cli/run-result.js +12 -6
  13. package/dist/cli/security-commands.js +64 -60
  14. package/dist/cli/setup-order.js +57 -0
  15. package/dist/cli/setup-prompt.js +49 -0
  16. package/dist/cli/setup.js +52 -48
  17. package/dist/config/budget.js +48 -0
  18. package/dist/config/config.js +132 -70
  19. package/dist/config/defaults.js +37 -11
  20. package/dist/config/domains.js +9 -50
  21. package/dist/config/utils.js +56 -0
  22. package/dist/core/agent/audit-gate.js +49 -0
  23. package/dist/core/agent/compaction.js +89 -0
  24. package/dist/core/agent/constants.js +61 -0
  25. package/dist/core/agent/context-renderer.js +40 -0
  26. package/dist/core/agent/hallucination-gate.js +87 -0
  27. package/dist/core/agent/loop-state.js +53 -0
  28. package/dist/core/agent/prefix-monitor.js +101 -0
  29. package/dist/core/agent/reasoning-resolver.js +56 -0
  30. package/dist/core/agent/token-tracker.js +96 -0
  31. package/dist/core/agent/tool-batch.js +237 -0
  32. package/dist/core/agent/tool-output.js +62 -0
  33. package/dist/core/agent-moe.js +214 -69
  34. package/dist/core/agent.js +506 -546
  35. package/dist/core/bootstrap.js +297 -98
  36. package/dist/core/crash-handler.js +2 -1
  37. package/dist/core/prompt-builder.js +3 -0
  38. package/dist/core/prompt-overflow.js +307 -0
  39. package/dist/core/session-logger.js +34 -2
  40. package/dist/i18n/en.json +8 -4
  41. package/dist/i18n/ru.json +8 -4
  42. package/dist/index.js +5 -1
  43. package/dist/llm/cache-usage.js +76 -0
  44. package/dist/llm/image-utils.js +20 -16
  45. package/dist/llm/llm-errors.js +41 -0
  46. package/dist/llm/model-loader.js +30 -0
  47. package/dist/llm/openai-compat.js +287 -101
  48. package/dist/llm/orchestrator.js +140 -68
  49. package/dist/llm/provider-budget.js +68 -0
  50. package/dist/llm/provider.js +0 -1
  51. package/dist/llm/stream-state.js +26 -0
  52. package/dist/llm/token-counter.js +28 -0
  53. package/dist/logger/app-logger.js +12 -15
  54. package/dist/main.js +1755 -841
  55. package/dist/migration/detect.js +3 -1
  56. package/dist/modules/browser/actions.js +0 -3
  57. package/dist/modules/browser/bridge-client.js +2 -0
  58. package/dist/modules/browser/bridge-server.mjs +37 -4
  59. package/dist/modules/browser/driver.js +46 -4
  60. package/dist/modules/certification/cli.js +85 -42
  61. package/dist/modules/certification/loader.js +15 -1
  62. package/dist/modules/certification/manifest.js +126 -15
  63. package/dist/modules/certification/runner.js +4 -26
  64. package/dist/modules/certification/scenarios.js +184 -5
  65. package/dist/modules/certification/syntax-scenarios.js +51 -0
  66. package/dist/modules/context/chunk-query.js +25 -5
  67. package/dist/modules/context/fact-extractor.js +6 -2
  68. package/dist/modules/context/manager.js +23 -7
  69. package/dist/modules/execution/audit-runners.js +7 -1
  70. package/dist/modules/execution/auditor.js +3 -3
  71. package/dist/modules/execution/execution-plugin.js +22 -15
  72. package/dist/modules/execution/input-from.js +46 -0
  73. package/dist/modules/execution/module.js +107 -18
  74. package/dist/modules/execution/moe-executor.js +166 -54
  75. package/dist/modules/execution/plan-actions.js +524 -0
  76. package/dist/modules/execution/plan-steps.js +23 -0
  77. package/dist/modules/execution/plan-store.js +15 -3
  78. package/dist/modules/execution/plan-tool.js +6 -488
  79. package/dist/modules/execution/plan-validator.js +24 -0
  80. package/dist/modules/execution/stuck-detector.js +3 -18
  81. package/dist/modules/execution/tracker.js +14 -5
  82. package/dist/modules/execution/transient-error.js +30 -0
  83. package/dist/modules/execution/verifier.js +94 -7
  84. package/dist/modules/execution/windows-commands.js +11 -0
  85. package/dist/modules/hallucination/confidence.js +36 -23
  86. package/dist/modules/hallucination/consistency.js +3 -0
  87. package/dist/modules/hallucination/detector.js +8 -3
  88. package/dist/modules/hallucination/factual.js +26 -7
  89. package/dist/modules/hallucination/llm-judge.js +12 -2
  90. package/dist/modules/indexer/map-command.js +35 -0
  91. package/dist/modules/indexer/map-select.js +87 -0
  92. package/dist/modules/indexer/module.js +34 -22
  93. package/dist/modules/indexer/symbols.js +189 -0
  94. package/dist/modules/indexer/walker.js +96 -42
  95. package/dist/modules/lsp/check-tool.js +2 -1
  96. package/dist/modules/lsp/client.js +49 -32
  97. package/dist/modules/lsp/config.js +55 -2
  98. package/dist/modules/lsp/module.js +38 -5
  99. package/dist/modules/lsp/probe.js +4 -3
  100. package/dist/modules/lsp/project-root.js +41 -1
  101. package/dist/modules/lsp/startup-check.js +12 -4
  102. package/dist/modules/mcp/client.js +153 -104
  103. package/dist/modules/mcp/module.js +165 -41
  104. package/dist/modules/memory/module.js +4 -3
  105. package/dist/modules/plugins/builtin/lint-on-write.js +36 -6
  106. package/dist/modules/plugins/manager.js +47 -84
  107. package/dist/modules/pricing/index.js +17 -7
  108. package/dist/modules/pricing/prices.js +30 -12
  109. package/dist/modules/processes/index.js +1 -0
  110. package/dist/modules/processes/kill-tree.js +56 -0
  111. package/dist/modules/processes/registry.js +2 -54
  112. package/dist/modules/providers/cache.js +23 -0
  113. package/dist/modules/providers/factory.js +28 -0
  114. package/dist/modules/providers/fallback.js +7 -5
  115. package/dist/modules/providers/health.js +2 -1
  116. package/dist/modules/providers/index.js +1 -0
  117. package/dist/modules/providers/manager.js +17 -2
  118. package/dist/modules/providers/presets.js +79 -6
  119. package/dist/modules/reasoning/policy.js +40 -0
  120. package/dist/modules/reasoning/probe.js +111 -0
  121. package/dist/modules/security/audit-notifier.js +42 -27
  122. package/dist/modules/security/command-validator.js +25 -20
  123. package/dist/modules/security/encryption.js +6 -12
  124. package/dist/modules/security/network-validator.js +76 -5
  125. package/dist/modules/security/path-validator.js +77 -34
  126. package/dist/modules/security/rate-limiter.js +11 -0
  127. package/dist/modules/security/security-policies.js +1 -1
  128. package/dist/modules/security/session-encryption.js +13 -2
  129. package/dist/modules/security/session-isolation.js +2 -9
  130. package/dist/modules/session/manager.js +11 -0
  131. package/dist/modules/session/module.js +11 -3
  132. package/dist/modules/session/store.js +41 -5
  133. package/dist/modules/skills/loader.js +7 -1
  134. package/dist/modules/skills/module.js +2 -1
  135. package/dist/modules/updater/changelog-reader.js +94 -0
  136. package/dist/modules/updater/dev-detect.js +17 -0
  137. package/dist/modules/updater/index.js +1 -0
  138. package/dist/modules/updater/module.js +14 -3
  139. package/dist/output/bus.js +32 -0
  140. package/dist/output/channel.js +233 -0
  141. package/dist/output/format.js +14 -0
  142. package/dist/output/index.js +7 -0
  143. package/dist/output/json-sink.js +22 -0
  144. package/dist/output/machine.js +8 -0
  145. package/dist/output/session-sink.js +27 -0
  146. package/dist/output/types.js +1 -0
  147. package/dist/tools/approve.js +6 -2
  148. package/dist/tools/attach-image.js +11 -11
  149. package/dist/tools/auto-fixer.js +198 -0
  150. package/dist/tools/bash.js +142 -89
  151. package/dist/tools/chunk-query.js +10 -6
  152. package/dist/tools/download-file.js +1 -1
  153. package/dist/tools/edit-file.js +20 -2
  154. package/dist/tools/executor.js +54 -9
  155. package/dist/tools/glob-tool.js +7 -0
  156. package/dist/tools/grep-tool.js +15 -1
  157. package/dist/tools/index.js +3 -1
  158. package/dist/tools/list-dir.js +3 -1
  159. package/dist/tools/load-skill.js +2 -1
  160. package/dist/tools/mcp-call.js +1 -1
  161. package/dist/tools/move-file.js +5 -4
  162. package/dist/tools/path-utils.js +7 -0
  163. package/dist/tools/pipeline-run.js +1 -1
  164. package/dist/tools/prompt-io.js +28 -0
  165. package/dist/tools/question.js +12 -12
  166. package/dist/tools/scope-request.js +91 -0
  167. package/dist/tools/session-info.js +44 -0
  168. package/dist/tools/set-thinking.js +71 -0
  169. package/dist/tools/subagent.js +50 -9
  170. package/dist/tools/syntax-validator.js +177 -0
  171. package/dist/tools/user-input.js +16 -9
  172. package/dist/tools/write-file.js +17 -1
  173. package/dist/ui/diff.js +10 -0
  174. package/dist/ui/line-editor.js +179 -26
  175. package/dist/ui/line-math.js +20 -3
  176. package/dist/ui/md-formatter.js +100 -10
  177. package/dist/ui/output.js +5 -4
  178. package/dist/ui/plan-view.js +2 -7
  179. package/dist/ui/renderer.js +89 -85
  180. package/dist/ui/spinner.js +14 -4
  181. package/dist/utils/error.js +4 -0
  182. package/dist/utils/index.js +4 -0
  183. package/dist/utils/retry.js +17 -0
  184. package/dist/utils/sleep.js +23 -0
  185. package/dist/utils/truncate.js +9 -0
  186. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,17 +4,98 @@ All notable changes to Micro Models Agent (MMA) will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).
6
6
 
7
+ ## [1.1.0] - 2026-09-19
8
+
9
+ ### Added
10
+
11
+ - **Reasoning mode in the REPL prompt** (`src/cli/repl.ts`, i18n `repl.you_reasoning`/`repl.you_reasoning_cont`, en+ru): the input prompt now shows the active reasoning state - `You [auto]:` under the auto policy, `You [auto→high]:` when a level override is in effect, and the effective level (`You [high]:`) in a fixed mode. The label is rebuilt after every slash command and after a run, so a `set_thinking` override and `/reasoning <level>` are reflected immediately.
12
+
13
+ ### Fixed
14
+
15
+ - **`/reasoning <level>` had no effect in auto mode** (`src/core/agent/reasoning-resolver.ts`, `src/core/agent.ts`, `src/tools/set-thinking.ts`): the chosen level was stored in `reasoningState.level` but never consulted while `reasoning.mode` was `auto`, so the policy always won. It is now a **persistent manual override** (`ReasoningState.manual`) that takes priority over the auto policy and is cleared by `/reasoning auto`; `set_thinking` keeps its transient cooldown behavior.
16
+
17
+ ## [1.0.1] - 2026-09-18
18
+
19
+ ### Fixed
20
+
21
+ - **Garbled streamed output** (`src/ui/md-formatter.ts`): the live partial line was streamed raw and then overwritten with the formatted line using a cursor rewind equal to the **last chunk's** length (and, on completion, it re-formatted only the tail). Any line delivered in multiple chunks — i.e. every real answer — left the raw prefix on screen and mixed it with the formatted text (missing/swapped Cyrillic characters, leaked `▍` markers, broken tables; observed in `ses_mu6w6jmk`). The stream now tracks the **cumulative** displayed line, rewinds the full display width, and opts in to partial streaming only for rich terminals (`reservedCols` keeps the `- ` prefix from wrapping). A partial that would exceed the terminal width now freezes instead of wrapping, where a relative cursor move is meaningless.
22
+ - **REPL banner directory** (`src/cli/repl.ts`): `Директория` showed `process.cwd()`, which `bun run` sets to the package root — so `mma -d <dir>` reported the wrong folder. It now shows the agent workspace (`baseDir`).
23
+ - **Misleading prompt-overflow warning** (`src/core/bootstrap.ts`, `src/core/agent.ts`, i18n en+ru): the per-block startup/summary warning compared a single block's size against the whole system-prompt budget and claimed e.g. "AGENTS.md (3232 tok) exceeds the budget (3276 tok)" when the block fits and only the aggregate does not. Both messages now state the total requirement (`~N tok`) alongside the block that gets compressed.
24
+ - **Interactive-command hint** (`src/tools/bash.ts`): a command that aborts waiting on stdin without a TTY (`Operation cancelled`, `stdin is not a TTY` — e.g. a bare `bun create`) now returns a non-interactive remedy instead of letting the model retry it unchanged.
25
+ - **Infinite status-tool loop** (`src/core/agent.ts`): identical `session_info`/`process_list`/`process_log`/`file_info`/`project_map` calls are nudged and then hard-stopped in interactive runs. Mutating tools stay nudge-only, so a legitimate edit/build/read cycle is not cut short.
26
+ - **Removed the "short/empty response" uncertainty warning** (`src/modules/hallucination/confidence.ts`): a short but valid reply (greeting, terse acknowledgement, one-line confirmation) was flagged as uncertain even though the warning neither retried nor blocked anything. Real truncation is already caught by the provider's `finish_reason: "length"` and emptiness by the empty-response retry, so the check only produced false positives on legitimate answers.
27
+ - **First-run input freeze + wizard corruption** (`src/cli/relaunch.ts`, `src/cli/main.ts`, `src/ui/line-editor.ts`): the wizard and the REPL must not share a process. On Bun/Windows the raw-mode `LineEditor` only receives keypresses when it is the first stdin consumer, and reusing one editor across `wizard → bootstrap → REPL` leaked prompt/frame state. First run now collects settings with the cooked-mode `SetupPrompt` (no raw-mode/readline), persists them, and **re-execs the CLI in a fresh process** (`spawnSync`, inherited stdio, `MMA_POST_SETUP=1` guard) — the new process sees the config, skips the wizard, and creates its editor first thing. Separately, the DSR cursor query is now **opt-in on Windows** (`MMA_DSR=1`; default on elsewhere) because ConPTY could mis-decode the `ESC[row;colR` reply as typed input (every wizard prompt answered "R"); it is also never sent while a `question()` is pending.
28
+
29
+ ## [1.0.0] - 2026-09-18
30
+
31
+ ### Added
32
+
33
+ - **Unified output bus**: new `src/output/` layer — `OutputEvent`/`OutputBus` (`types.ts`, `bus.ts`) with monotonic ids, one-to-many fan-out and per-subscriber exception isolation. Producers emit events instead of writing to the terminal directly.
34
+ - **Single terminal writer**: `OutputChannel` (`channel.ts`) owns `process.stdout`/`stderr` and coordinates with the REPL prompt. Four ownership modes — `idle` (prompt owns the screen; `log`/`block` go through `printAbove`), `streaming` (direct passthrough; a partial line is closed before any `log`), `modal` (events queued FIFO, flushed on `endModal`), `quiet` (human output dropped for `--json`). One singleton per process (`getDefaultChannel()`); `clearScreen()` clears via the prompt sink, and synchronous bursts are batched into a single `printAbove` + frame render.
35
+ - **Prompt-aware line editor**: `LineEditor.printAbove()` prints a block above the input frame and redraws it; `suspendFrame()`/`resumeFrame()` hand the terminal to the agent during streaming; `setInputEnabled(false)` swallows printable keys while keeping Ctrl+C. The DSR cursor anchor is re-enabled with a 150 ms timeout fallback and `MMA_DSR=0` opt-out (ConPTY can buffer DSR replies).
36
+ - **Machine-readable sinks**: JSON (`json-sink.ts`) and session (`session-sink.ts`) subscribers on the bus; `--json` results now include a `diagnostics` array of warn/error events. `writeMachineJson()` (`machine.ts`) is the one sanctioned raw-stdout JSON contract.
37
+ - **Plugin output surface**: `HostBridge.subscribeOutput()` (`src/modules/types.ts`) lets plugins (web-ui, trace-server) observe log/probe/banner events and re-broadcast them.
38
+
39
+ ### Changed
40
+
41
+ - **All output routes through the bus**: `Logger`, `Renderer`, `Spinner`, REPL, CLI subcommands, setup wizard, certification, security commands and the MCP client now emit to `OutputBus`/`OutputChannel` instead of writing directly. The REPL drives terminal ownership explicitly (`beginStreaming`/`endStreaming`, `suspendFrame`/`resumeFrame`).
42
+ - **Background probes log silently**: the startup context/reasoning probes (`src/core/bootstrap.ts`) write to `app.jsonl` via `logger.logSilent` and no longer interleave with the wizard or prompt.
43
+ - **Setup wizard runs before bootstrap**: first-run orchestration (`src/cli/setup-order.ts`) runs `setup` → `applyAnswers` → `bootstrap`, so no background probe starts while the wizard owns the terminal.
44
+ - **Interactive tools use `PromptIO`**: `question`/`approve` read through an injected `PromptIO` (`src/tools/prompt-io.ts`) instead of opening a competing readline interface.
45
+ - **Root logger lines gain a `[mma]` source tag**: the default logger emits with `source: "mma"`, so root log lines are now `[INFO] [mma] <ISO> — <text>` (previously `[INFO] <ISO> — <text>`). Subsystem loggers keep their own prefix and are unchanged.
46
+
47
+ ### Removed
48
+
49
+ - **Direct `console.*` / `process.*.write` in `src/`**: forbidden by the new guard test (`tests/output/no-direct-console.test.ts`), with a tiny allowlist — `crash-handler` (must survive a broken output layer), `output/machine.ts` (JSON contract), `browser/bridge-server.mjs` (child-process JSON-RPC pipe) and the non-TTY REPL `printAbove` fallback.
50
+ - **Unused Logger color helpers** (`LEVEL_COLORS`/`isColorEnabled`) — colors moved to `formatEventLine` (`src/output/format.ts`).
51
+ - **Dead `PluginOutputBridge`** — superseded by `HostBridge.subscribeOutput`.
52
+
53
+ ## [0.63.3] - 2026-09-17
54
+
55
+ ### Fixed
56
+
57
+ - **Plan-alignment false positives hard-blocked legitimate writes**: `checkPlanAlignment` (`src/modules/execution/module.ts`) could accumulate 3 "outside the current step" warnings and block a tool call the agent needed for the current step (observed in `ses_mu5wed4r`: the current step's own `src/main.ts` was blocked). Causes fixed:
58
+ - **Path separators were not normalized** (root cause): model tool calls pass absolute Windows paths (`C:\…\src\main.ts`) while plan steps name files relatively (`src/main.ts`); the raw substring comparison never intersected backslash vs forward slash, so _every_ write was treated as off-path. Both sides now go through `planPathToken` (forward slashes + lowercase) before matching.
59
+ - The completed-step rewrite exemption compared paths one-directionally (`finishedPaths.some((s) => s.includes(p))`), so a done step naming `main.ts` did not exempt a rewrite of `src/main.ts` — the overlap check is now bidirectional, mirroring the current-step comparison.
60
+ - Read-only diagnostic/structural tools were not exempt: `lsp_check` (mandated by the system prompt after every write) and `project_map` now join the allow-list (`PLAN_ALIGNMENT_EXEMPT_TOOLS`), alongside the other filesystem-reads, web/memory/session reads, process introspection and interactive prompts. Only file-mutating tools are pinned to the current step's file tokens.
61
+ - **Plugin-blocked calls were treated as real tool failures**: a guard refusal (`onBeforeTool` → `false`/string) is now flagged `blocked` on `ToolResult` and propagated to the context message (`src/tools/executor.ts`, `src/core/agent/tool-batch.ts`, `src/modules/context/manager.ts`). Blocked calls no longer feed the compaction "Already tried & failed — do NOT repeat" memory, the per-tool repeated-failure rule, or the consecutive-failure recovery counter — so a transient guard (or a guard bug) cannot convince the agent to never retry a correct action.
62
+
63
+ ### Added
64
+
65
+ - **Browser launch overrides**: `MMA_BROWSER_EXECUTABLE` (absolute path) and `MMA_BROWSER_CHANNEL` (`chrome`/`msedge`/`chromium`) let the browser tool use an installed system browser instead of Playwright's pinned Chromium. When the bundled revision is missing (offline / blocked CDN) it now falls back to `chrome`, then `msedge`, automatically (`src/modules/browser/driver.ts`, `bridge-server.mjs`).
66
+
67
+ ## [0.63.2] - 2026-09-17
68
+
69
+ ### Fixed
70
+
71
+ - **Long answers were silently cut by the completion cap**: `max_tokens` (default 4096) is sent on every request; when the model hit it while already streaming text, `finish_reason: "length"` was ignored and the truncated text was accepted as the final answer. The provider now emits a non-fatal `warning` chunk (`src/llm/openai-compat.ts`, streaming and non-streaming paths) that the agent renders in the chat — the answer still arrives, but the user sees it was cut off. Tool-call/empty-response truncation keeps the existing recoverable-error path.
72
+ - **Resumed sessions lost their history**: `saveAssistantMessage` and `logToolResult` (`src/core/session-logger.ts`) persisted only the first 500 chars of each assistant/tool message, so `/resume` seeded the model with truncated context. Full content is stored now; the context budget still trims what actually goes to the LLM.
73
+
74
+ ## [0.63.1] - 2026-09-17
75
+
76
+ ### Added
77
+
78
+ - **`ui.verbose`**: opt-in chatty mode for internal orchestration status. MoE planning / re-plan / execution / scope one-liners (`src/core/agent-moe.ts`) are now behind this flag (default `false`) instead of always being written to the chat.
79
+
80
+ ### Changed
81
+
82
+ - **Failed tool output is no longer echoed verbatim**: the chat used to print the full model-facing `result.output` of any tool without a `display` — including `Hint:` / recovery directives / "Do NOT …" instructions written for the agent. Only the first non-empty line (the gist of the error) is shown now, in red (`compactToolError`, `src/core/agent/tool-output.ts`).
83
+ - **Live busy spinners for tool runs**: the renderer animates while `read_file` / `write_file` / `edit_file` / `bash` / … execute and restarts the spinner on every LLM "thinking" phase. Previously the spinner stopped at the first tool call and the rest of the run looked frozen. Interactive tools (`question`, `approve`) never spin; dead `BUSY_TOOLS` set removed.
84
+
7
85
  ## [0.63.0] - 2026-09-17
8
86
 
9
87
  ### Added
88
+
10
89
  - **REPL `/provider add`**: add a provider without leaving the agent. Mirrors `mma provider add` — `/provider add <name> [--url <url>] [--key <key>] [--priority <n>] [--context-window <n>] [--rpm <n>] [--parallel <n>]`. Seeds the legacy provider into `provider.entries` on first use, saves the config and hot-reloads the agent; switch with `/provider use <name>`. `/provider` autocompletion now includes `add`; i18n `repl.provider_add_missing_value`, `repl.provider_switch_hint` (en+ru).
11
90
 
12
91
  ### Changed
92
+
13
93
  - **Subcommand dispatch via handler maps** (new architecture rule #17): `/provider`, `/model` and `/skill` (`src/cli/repl-commands.ts`) and `SkillNameProvider.complete` (`src/cli/completer.ts`) now resolve subcommands through a `Record<string, handler>` map instead of `if (subcmd === …)` chains.
14
94
 
15
95
  ## [0.62.0] - 2026-09-17
16
96
 
17
97
  ### Added
98
+
18
99
  - **Prompt-cache awareness (cloud + local)**: every provider declares its cache behavior via a new `CacheCapability` (`ProviderCapabilities.cache`, overridable per entry with `provider.entries[].cache`). The OpenAI-compatible provider now sends the right request hints per backend — `cache_prompt` (llama.cpp), `prompt_cache_key` (OpenAI), `session_id` (OpenRouter sticky routing) — while `x-opencode-session` is gated by `sessionHeader` (legacy behavior preserved when no capability is set). `parseCacheUsage` (`src/llm/cache-usage.ts`) normalizes response formats (OpenAI/LM Studio/llama.cpp/vLLM/OpenRouter/Zen/Go, DeepSeek, Anthropic, Ollama) into `Chunk.usage.cache`.
19
100
  - **Cache metrics & savings**: `ModelPrice.cachedInput`/`cacheWrite`, `calculateCostDetailed` and `CostTracker.saved` bill cached reads at the cached rate and report the savings; builtin cached-read prices for MiniMax/GLM. A client-side prefix monitor (`src/core/agent/prefix-monitor.ts`) classifies why a cacheable prefix broke (`system`/`tools`/`history`/`volatile`) even when the provider reports nothing.
20
101
  - **Cache display**: a single footer line (`Cache: 87% hit · saved $0.42`, or `Prefix stable: 93% · broke: tool set`) in the REPL, single-run result and `--json` (`cache`); `mma session show <id>` aggregates `llm_usage` into token totals and cache hit rate.
@@ -22,10 +103,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
22
103
  - **`mma usage`**: shows the active provider's balance/usage. OpenRouter is supported (`GET /key` for per-key usage/limit, plus `GET /credits` for account balance when a management key is configured); other providers report that they do not expose an API balance (OpenCode Zen/Go show it in the web dashboard).
23
104
 
24
105
  ### Changed
106
+
25
107
  - **Code comments are Russian** (new architecture rule #15).
26
108
  - **Cross-platform rule** (new architecture rule #16): processes/paths/shell/FS code must work on Windows, macOS and Linux (no `mklink`, no `npx` for local tools, quote paths, skip-not-fail tests when an OS lacks a primitive).
27
109
 
28
110
  ### Fixed
111
+
29
112
  - **One-shot subcommands hung when piped**: `mma session show <id> | cat` never exited because `bootstrap()` fired the background startup health check, which spawns an LSP/npx child that `process.exit` does not reap — the orphan kept the stdout pipe open. Subcommands never run an agent, so `setOneShotMode` now skips that check (detected in `main.ts` before `program.parse`). The recursive `postAction → process.exit(0)` hook (nested subcommands previously never fired it) is kept, and the startup check's `npx tsc` fallback now uses the local tsc.
30
113
  - **Prefix-cache line false alarm**: the footer treated the first iteration (`cause: unknown`, ratio 0) and normal history appends (`cause: none`) as a broken prefix. It now shows `Prefix stable …` only for a real break (`system`/`tools`/`history`/`volatile`) and surfaces the most recent such break even if later iterations are stable again.
31
114
  - **TypeScript checks were slow and unreliable**: syntax/type checks shelled out to `npx tsc`, which on Windows takes 5–13s (and tries the network without a local `typescript`), tripping test timeouts and stalling writes. New `resolveTscCommand` (`src/modules/lsp/project-root.ts`) runs the nearest local `tsc` via the current runtime (`process.execPath`), used by `verifier.ts`, `lint-on-write.ts` and `audit-runners.ts`; when no local tsc exists the check is skipped fast instead of hanging. The nested-project verifier test now links TypeScript with a cross-platform `symlinkSync(..., "junction")` instead of Windows-only `mklink`, and `bash.test.ts` resets the leaked grace window between tests.
@@ -33,35 +116,42 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
33
116
  ## [0.61.1] - 2026-09-16
34
117
 
35
118
  ### Fixed
119
+
36
120
  - **OpenCode Go rejected every request**: `/chat/completions` returned `400 MissingSessionID` because the OpenAI-compatible provider sent no `x-opencode-session` header. The provider now sends the live session id (threaded through `ProviderOptions` → `ProviderManager` → `Agent`/`bootstrap`, plus the MoE orchestrator) and a `micro-models-agent/<version>` User-Agent on every chat and `listModels` request.
37
121
  - **Dev runs self-updated the global install**: running from TypeScript sources (`bun run mma`, `bun --watch src/cli/main.ts`) read the checkout's `package.json` version and `npm install -g`'d the published one over the user's install. The background updater is now skipped when the entry is a TS source; real installs (`dist/main.js` via `bin/mma.mjs`) still update.
38
122
 
39
123
  ## [0.61.0] - 2026-09-15
40
124
 
41
125
  ### Added
126
+
42
127
  - **Budget share controls**: `mma context --system <f>` / `--reserve <f>` and REPL `/context system <f>` / `reserve <f>` set `contextBudget.systemPrompt` / `responseReserve` (validated 0.05–0.9, system + reserve < 0.95). `mma context` and `/context` with no argument now print the budget breakdown (system / reserve / history in tokens and %). `mma config set contextBudget.systemPrompt <f>` keeps working.
43
128
 
44
129
  ### Changed
130
+
45
131
  - **Overflow fix advice**: the "system prompt exceeds budget" warning no longer only snaps to a coarse standard context size — a 32K project was jumping straight to `131072`, which looked arbitrary and was often unusable on a local model. The hint (`prompt.overflow.hint_*`, en+ru) now states the raw requirement (`needs ~N system tokens; current budget: W × f = B`) and both levers: raise `contextWindow` to the exact minimum (with the standard size) **or** keep the window and raise `contextBudget.systemPrompt` to the required share (`mma context --system <f>`).
46
132
 
47
133
  ### Fixed
134
+
48
135
  - **`mma context` ignored `MMA_CONFIG_DIR`**: it saved to a hardcoded `~/.mma/config.json`; it now writes to the config dir resolved by bootstrap.
49
136
 
50
137
  ## [0.60.1] - 2026-09-15
51
138
 
52
139
  ### Fixed
140
+
53
141
  - **Silent prompt-overflow summarization**: the startup dry-run warns that AGENTS.md / the project map "will be summarized before the first run", but the actual summarization ran with no notice — the first prompt appeared to hang while a local model rewrote a large AGENTS.md. `resolvePromptOverflow` now emits (en+ru, `prompt.overflow.*`): a "compressing N block(s)…" line before it starts, a per-block "summarizing \"label\" (N → M tok)…" line before the model call, a "truncating …" line on the fallback, and a failure line before falling back to truncation.
54
142
  - **Hardcoded English startup logs**: model auto-load success/failure, reasoning probe result, project indexing start/finish/failure, unreadable index entries and background-processes-killed-on-shutdown were untranslated; they now use `env.*` keys (en+ru). Project indexing now announces start and completion (`Indexed N file(s)`), so a slow first walk no longer pauses startup silently.
55
143
 
56
144
  ## [0.60.0] - 2026-09-15
57
145
 
58
146
  ### Added
147
+
59
148
  - **`session_info` tool** (`src/tools/session-info.ts`, `alwaysOn`): the model can now answer questions about the session it is running in — id, name, model, provider, context window, message count, timestamps and **live context usage** (`tokens / history budget (percent)` from `ContextManager.getSnapshot()`). Reads live metadata through a new `sessionManager` getter on `ToolContext` (like `sessionId`/`sessionContext`), so a REPL `/new` or `/resume` is reflected immediately. Previously the model reported having "no access to session metadata".
60
149
  - **Session prompt block** (`session.info_full`, en+ru): the system prompt carries a compact `[Session: "name" (id) | model: … | context: … tokens]` line so session identity is available passively as well.
61
150
  - **Project-map command**: `mma map [summary|refresh|find <query>]` (CLI) and `/map [summary|refresh|find <query>]` (REPL) let the user inspect the index directly — `summary` prints the exact text injected into the system prompt, `refresh` re-indexes, `find` searches by path or exported symbol. Shared implementation in `src/modules/indexer/map-command.ts` (also used by the `project_map` tool for `find`).
62
151
  - **Multi-language index**: symbol extraction was TS/JS-only and the extension whitelist stopped at 10 types. New `src/modules/indexer/symbols.ts` is a data-driven registry — adding a language is one rule plus extensions. It now indexes and extracts symbols for TypeScript/JavaScript, Python, Rust, Go, Java, Kotlin, C#, Ruby, PHP, Swift, Scala, C/C++, Shell and Lua (plus data formats: JSON, Markdown, YAML, TOML, XML, HTML/CSS); symbols are deduped and capped at 40 per file. `map-select.ts` now reuses `isCodeLanguage()` instead of its own list.
63
152
 
64
153
  ### Fixed
154
+
65
155
  - **Session metadata never reached the model**: `SessionModule.getSystemPromptBlock()` was collected once during bootstrap, but the session is created during that same bootstrap with `messageCount === 0`, so the block was always `null`. It is now collected through `getDynamicPromptBlocks`; content is deliberately limited to stable per-session fields (no message count) so the system prompt does not mutate every turn and the prefix KV-cache survives.
66
156
  - **Prompt-overflow messages not localized**: the overflow warnings emitted by `agent.ts` and the startup check in `bootstrap.ts` were hardcoded English; they now use `t("prompt.overflow.*")` and respect the configured locale (en+ru). The model-facing hint block stays English by design.
67
157
  - **Project map showed no source files**: the map listed the first 100 files in `readdir` walk order, which on a real workspace can be entirely docs/config/tests — on this repo the first 100 walked files contained **zero** `src/` entries, so the model had no idea about the project's code structure. New `selectMapFiles` (`src/modules/indexer/map-select.ts`) ranks source above tests above docs/config, puts the densest source directory first (no directory names hardcoded), drops lockfile noise, and sorts deterministically (KV-cache); the listing is capped at 80 files. The index still contains every file, so `project_map find` is unaffected.
@@ -70,6 +160,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
70
160
  ## [0.59.0] - 2026-09-05
71
161
 
72
162
  ### Added
163
+
73
164
  - **Instructions overflow handling**: AGENTS.md and the project map that exceed the system-prompt budget are no longer silently dropped — they are summarized by the LLM into the remaining budget (disk-cached in `<project>/.mma/cache/prompt-summaries`, invalidated by file edits/budget changes) or truncated with a marker; a small essential hint block tells the model what was compressed and to `read_file` the full source
74
165
  - **Startup overflow warning**: bootstrap dry-runs the system budget with the real block set and warns the user when instructions/project map will not fit, with a concrete fix — `mma context <N>` for a global `contextWindow`, or an edit of `provider.entries[].contextWindow` in `config/provider.json` when the active entry overrides it
75
166
  - **Context probe**: at startup MMA asks LM Studio's native API for the context length the model is actually loaded with and compares it with the configured `contextWindow` — warning on overflow risk (no auto-clamp, user decides), info suggestion when the model supports more; result logged as a `context_probe` session entry
@@ -78,16 +169,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
78
169
  ## [0.58.2] - 2026-09-01
79
170
 
80
171
  ### Fixed
172
+
81
173
  - **Stale i18n in published package**: `build:copy-assets` did not refresh `dist/i18n/en.json`/`ru.json`, so the 0.58.1 release shipped the old startup-check wording in the standalone JSON files (only `dist/main.js` had the fix). The copy step now ships the current dictionaries.
82
174
 
83
175
  ## [0.58.1] - 2026-09-01
84
176
 
85
177
  ### Fixed
178
+
86
179
  - **Startup check overreach**: the `lsp.startup_header` prompt block instructed the model to "fix these before continuing", overriding `SCOPE DISCIPLINE` — the 9B model started fixing pre-existing project errors the user never asked about (and skipped clarifying questions). The block is now informational (baseline only): errors are listed but the model is told to ignore them unless the current request is about them (en+ru).
87
180
 
88
181
  ## [0.58.0] - 2026-08-31
89
182
 
90
183
  ### Added
184
+
91
185
  - **MoE experts**: dynamic expert registry — `config.experts` (with optional `ExpertConfig.description`) is rendered into the MoE planner prompt instead of a hardcoded code/research/browser/vision list (fallback: `tool_tags`)
92
186
  - **MoE orchestrator provider**: `OrchestratorClient` builds its provider through `ProviderManager` — per-entry `contextWindow`/`retry`/`rateLimits` and failover entries are honored; `orchestrator.contextWindow` is the global fallback (legacy `{type,baseUrl,apiKey}` configs keep working)
93
187
  - **MoE success criteria**: machine-readable `success_criteria` (`file-exists:<path>`, `substring-in-file:<path>:<text>`, `command-exit-0:<cmd>`) verified by `StepVerifier.verifySubtaskCriteria` before merge; LLM-only criteria surface as warnings in the Router context
@@ -97,9 +191,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
97
191
  - **ToolResult.usage**: sub-agent token usage propagated to the MoE executor for cost attribution
98
192
 
99
193
  ### Changed
194
+
100
195
  - **Reasoning policy baseline**: configurable via `reasoning.baseline` (default `medium`) — the auto policy's quiet-iteration level is no longer hardcoded, so trivial Q&A turns can start at `low`
101
196
 
102
197
  ### Fixed
198
+
103
199
  - **MoE hang**: sub-agents spawned by the `subagent` tool re-entered `runWithMoE` when the parent config had `moe.enabled=true` — each MoE sub-agent planned its own subtasks and spawned nested sub-agents recursively (bounded only by `maxRecursionDepth`), hanging execution for many minutes with zero progress events. Sub-agents now always run the plain single-agent loop (`moe` is a top-level orchestration mode only).
104
200
  - **MoE fallback visibility**: missing `orchestrator.model` with `moe.enabled=true` now logs a WARN with a fix hint instead of a debug-only message that made silent fallback to single-agent invisible.
105
201
  - **CLI one-shot commands hang**: `config`, `session`, `model`, `provider`, `context`, `security`, `plugins`, `changelog` printed their result but never exited — bootstrap leaves open handles (reasoning-probe fetch, indexer) and only the prompt/REPL paths called `process.exit`. Subcommand roots now exit via a `postAction` hook (verified: `session list` 2.7s / exit 0, chained `config set` persists correctly).
@@ -116,6 +212,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
116
212
  ## [0.57.2] - 2026-08-30
117
213
 
118
214
  ### Changed
215
+
119
216
  - **KV-cache**: plan block removed from system prompt; plan status now injected into `<system-summary>` envelope after every tool batch. System prompt is immutable per session — local backends retain prefix cache.
120
217
  - **Provenance**: provider entry resolution uses active entry label, not bare `provider.type`
121
218
  - **Reasoning signals**: `consecutiveToolSuccesses` and `isRepetitive` now feed real values to the reasoning policy (were hardcoded)
@@ -129,6 +226,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
129
226
  - **errMsg**: replaces 23 occurrences of `e instanceof Error ? e.message : String(e)` across 12 files
130
227
 
131
228
  ### Fixed
229
+
132
230
  - **chunk_query**: one failing chunk no longer kills the entire query; per-chunk `catch` → `[FAILED]`
133
231
  - **chunk_query**: synthesis prompt capped at 20K chars with `[TRUNCATED]` marker
134
232
  - **chunk_query**: `AbortSignal` propagated to `chatText` for cancellation support
@@ -140,6 +238,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
140
238
  - **LSP /lsp check**: fixed latent bug where `.execute()` was called with `.executeByName` signature
141
239
 
142
240
  ### Added
241
+
143
242
  - **Plan Reminder**: static `[Plan Reminder]` block in system prompt (never mutates)
144
243
  - **Documentation**: reentrancy warning on `executeByName()`, `PlanResult` JSDoc
145
244
  - **Tests**: `probe.test.ts` (6 cases), `command-suggest.test.ts`, `providers-factory.test.ts`, `subagent-tool.test.ts`, `agent-moe-write.test.ts`, `chunk-query.test.ts`
@@ -148,21 +247,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
148
247
  - **Security-policies**: `comparePolicies` typed (`keyof SecurityConfig` replaces `as any`)
149
248
 
150
249
  ### Removed
250
+
151
251
  - **Browser**: dead `buildWaitScript` export (never imported)
152
252
 
153
253
  ## [0.57.1] - 2026-08-28
154
254
 
155
255
  ### Fixed
256
+
156
257
  - **Publish**: republish after version bump
157
258
 
158
259
  ## [0.57.0] - 2026-08-28
159
260
 
160
261
  ### Changed
262
+
161
263
  - **MCP**: lazy connect — server connections deferred to first tool call. Startup no longer blocks on unreachable MCP servers (e.g. context7 offline). Discovery runs in background with 5s timeout.
162
264
  - **Updater**: `checkOnStart` and `autoInstall` disabled by default. Reduced `waitForIdle` timeout from 130s to 10s.
163
265
  - **Config**: `updater.checkOnStart` default changed from `true` to `false`
164
266
 
165
267
  ### Added
268
+
166
269
  - **MCP**: HTTP request timeouts (10s) on `connectSSE`, `listToolsHTTP`, `callToolHTTP`
167
270
  - **MCP**: `failedServers` tracking — servers that fail discovery are not retried
168
271
  - **MCP**: placeholder `connect` tool for not-yet-discovered servers (LLM can trigger lazy discovery)
@@ -171,17 +274,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
171
274
  ## [0.56.5] - 2026-08-27
172
275
 
173
276
  ### Fixed
277
+
174
278
  - **Hallucination**: `FactualCheck` now receives deleted files from `ConsistencyCheck` — no longer false-positives on files that were intentionally deleted in the same session
175
279
 
176
280
  ## [0.56.4] - 2026-08-27
177
281
 
178
282
  ### Fixed
283
+
179
284
  - **Tools**: `list_dir` now filters `.mma/`, `node_modules/`, `.git/`, `dist/`, `build/`, `coverage/` from directory listings (consistent with indexer)
180
285
  - **Hallucination**: `dotfileVariants` now tries dot-prefixing each directory component, not just basename (fixes false positive on `.mma/index-cache.json` → `mma/index-cache.json`)
181
286
 
182
287
  ## [0.56.1] - 2026-08-27
183
288
 
184
289
  ### Added
290
+
185
291
  - **CLI**: `mma changelog` command — show latest changelog entry or diff between versions (`--from <version>`)
186
292
  - **Updater**: show changelog after auto-update install (`updater.installed` message includes new version's changelog)
187
293
  - **Docs**: `CHANGELOG.md` included in npm package (visible via `npm info micro-models-agent`)
@@ -190,6 +296,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
190
296
  ## [0.56.0] - 2026-08-27
191
297
 
192
298
  ### Added
299
+
193
300
  - **MoE**: live re-plan loop in `runWithMoE` — orchestrator re-plans on structural failures
194
301
  - **MoE**: scope expansion protocol (`scope_request`) for cross-expert file access
195
302
  - **MoE**: Esc/interrupt support in the MoE execution path
@@ -198,6 +305,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
198
305
  - **Tools**: syntax pre-validation and auto-fix for `write_file`/`edit_file`
199
306
 
200
307
  ### Fixed
308
+
201
309
  - **Security**: SSRF via IPv6-mapped IPv4 and raw numeric hostnames
202
310
  - **Security**: command-validator blacklist bypasses (shell expansions, encoded chars)
203
311
  - **Security**: audit webhook retry queue drained forever (infinite loop + duplicate notifications)
@@ -217,6 +325,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
217
325
  ## [0.55.1] - 2026-08-25
218
326
 
219
327
  ### Fixed
328
+
220
329
  - **LLM**: NDJSON-tolerant stream parser for Ollama backends
221
330
  - **LLM**: mid-stream provider errors surfaced (Ollama generation failures)
222
331
  - **LLM**: `delta.reasoning` alias for thinking models
@@ -225,63 +334,75 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
225
334
  ## [0.55.0] - 2026-08-25
226
335
 
227
336
  ### Added
337
+
228
338
  - **Certification**: targeted re-run (`--scenarios <ids>`) with result merging
229
339
  - **Certification**: per-rep timeout (`--timeout <ms>` + per-scenario `timeoutMs`)
230
340
  - **Certification**: audit-gate bypass fix for `--exit-on-complete`
231
341
 
232
342
  ### Fixed
343
+
233
344
  - **Certification**: stale-label wording (removed impossible user instruction)
234
345
  - **Dependencies**: typescript pinned to ^5.9 (TS7 preview breaks `@types/node`)
235
346
 
236
347
  ## [0.54.0] - 2026-08-24
237
348
 
238
349
  ### Added
350
+
239
351
  - **Certification**: global manifest shipped with package updates (`~/.mma/certifications.json`)
240
352
  - **Certification**: bundled manifest + startup sync from package
241
353
 
242
354
  ### Fixed
355
+
243
356
  - **Certification**: marks only showed when running from repo root
244
357
 
245
358
  ## [0.53.0] - 2026-08-24
246
359
 
247
360
  ### Added
361
+
248
362
  - **Certification**: qwen3.5-9b certified 20/20
249
363
  - **Config**: `provider.maxCompletionTokens` option
250
364
  - **Certification**: label text in `mma model list` and REPL `/model`
251
365
 
252
366
  ### Fixed
367
+
253
368
  - **Certification**: reasoning-heavy models truncated tool_call arguments at default 4096 cap
254
369
  - **Certification**: scenario 3.5 prompt disambiguation
255
370
 
256
371
  ## [0.52.0] - 2026-08-23
257
372
 
258
373
  ### Added
374
+
259
375
  - **Execution**: `FS_MUTATING_TOOLS` — plan auto-advance after bash/download/subagent/mcp/pipeline/browser tools
260
376
  - **Config**: `provider.maxCompletionTokens` plumbing through ProviderManager → agent
261
377
 
262
378
  ### Fixed
379
+
263
380
  - **Execution**: small models create files via bash instead of `write_file`, stalling plans
264
381
  - **Execution**: `maxCompletionTokens` was never read from config
265
382
 
266
383
  ## [0.51.0] - 2026-08-23
267
384
 
268
385
  ### Added
386
+
269
387
  - **Plugin**: `HostBridge` interface for bidirectional agent communication
270
388
  - **Plugin**: `onTurnEnd(ctx, TurnSummary)` hook — dispatched once per completed run
271
389
  - **Plugin**: `web-ui` example plugin — browser-based chat with SSE streaming
272
390
  - **CLI**: REPL bridge wiring for web-ui submit/interrupt
273
391
 
274
392
  ### Fixed
393
+
275
394
  - **REPL**: `/config migrate` unreachable
276
395
 
277
396
  ## [0.50.3] - 2026-08-22
278
397
 
279
398
  ### Fixed
399
+
280
400
  - **UI**: REPL line editor scroll-proof rendering (absolute anchoring via DSR query)
281
401
 
282
402
  ## [0.50.2] - 2026-08-22
283
403
 
284
404
  ### Fixed
405
+
285
406
  - **LLM**: idle stream timeout increased 60s → 180s (LM Studio buffering)
286
407
  - **LLM**: stall diagnosis with dedicated message for SSE buffering
287
408
  - **LLM**: truncation no longer masquerades as empty response
@@ -291,6 +412,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
291
412
  ## [0.50.1] - 2026-08-21
292
413
 
293
414
  ### Fixed
415
+
294
416
  - **Security**: no longer silently overrides explicit user opt-out
295
417
  - **Lint**: skips missing lint binary (was appending error to every write)
296
418
  - **Stuck**: anti-spam for stuck-warnings (dedup via key, decay per-tool counters)
@@ -302,17 +424,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
302
424
  ## [0.50.0] - 2026-08-21
303
425
 
304
426
  ### Added
427
+
305
428
  - **Provider**: health probe (`probeProviders()` + `mma provider check`)
306
429
  - **Provider**: code-only capability routing (`ProviderManager.pickFor()`)
307
430
  - **Provider**: per-entry isolation + priority fallback order
308
431
  - **Pricing**: per-provider cost attribution + breakdown
309
432
 
310
433
  ### Fixed
434
+
311
435
  - **Provider**: transparent failover on 429/5xx/network errors
312
436
 
313
437
  ## [0.49.0] - 2026-08-20
314
438
 
315
439
  ### Fixed
440
+
316
441
  - **REPL**: stale-plan leaks — plan state no longer persists across sessions
317
442
  - **REPL**: plan checklist prints only on plan/todo tool-end events
318
443
  - **Plan**: `PlanStore` is single source of truth for UI consumers
@@ -320,22 +445,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
320
445
  ## [0.48.3] - 2026-08-20
321
446
 
322
447
  ### Fixed
448
+
323
449
  - **Hallucination**: dotfile false-positive (`.prettierrc.json` extracted as `prettierrc.json`)
324
450
 
325
451
  ## [0.48.2] - 2026-08-20
326
452
 
327
453
  ### Fixed
454
+
328
455
  - **REPL**: stale plan printed on first agent run of a session
329
456
 
330
457
  ## [0.47.0] - 2026-08-19
331
458
 
332
459
  ### Added
460
+
333
461
  - **Session**: startup diagnostics logging (environment, LSP probe, baseline typecheck)
334
462
  - **Session**: `logBaselineTypecheck()` for post-mortem visibility
335
463
 
336
464
  ## [0.46.1] - 2026-08-19
337
465
 
338
466
  ### Fixed
467
+
339
468
  - **LLM**: connection-break hardening (stream-level retry, no-data timeout, `[DONE]` tracking)
340
469
  - **LLM**: non-streaming timeout (was missing, could hang forever)
341
470
  - **Config**: `retry.maxStreamRetries`, `retry.noDataTimeoutMs` options
@@ -343,17 +472,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
343
472
  ## [0.46.0] - 2026-08-19
344
473
 
345
474
  ### Added
475
+
346
476
  - **Provider**: multi-provider + hot-swap + per-message provenance
347
477
  - **Provider**: `ProviderManager` with entry-based config
348
478
  - **CLI**: `mma provider add/list/use`
349
479
  - **REPL**: `/provider list/use`
350
480
 
351
481
  ### Fixed
482
+
352
483
  - **Path**: `safeResolvePath` POSIX bug (absolute paths re-resolved against baseDir)
353
484
 
354
485
  ## [0.45.0] - 2026-08-18
355
486
 
356
487
  ### Added
488
+
357
489
  - **Provider**: provider module Phase 1 (registry, presets, `createProvider()`)
358
490
  - **Provider**: `openrouter` preset
359
491
  - **Setup**: wizard menu built from `BUILTIN_PROVIDERS`
@@ -361,15 +493,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
361
493
  ## [0.44.0] - 2026-08-18
362
494
 
363
495
  ### Added
496
+
364
497
  - **Plugins**: folder plugins (subdirectory with entry file)
365
498
  - **Plugin**: `trace-server` split into folder plugin
366
499
 
367
500
  ### Fixed
501
+
368
502
  - **Plugin**: template-literal page inlining broke `\n` in JS strings
369
503
 
370
504
  ## [0.43.2] - 2026-08-17
371
505
 
372
506
  ### Fixed
507
+
373
508
  - **Execution**: plan done-gate on known compile failures (typecheck gate)
374
509
  - **Bootstrap**: live getters for `sessionId`/`sessionContext` after session switch
375
510
  - **Edit**: `edit_file` "String not found" hint to `read_file` first
@@ -377,6 +512,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
377
512
  ## [0.43.1] - 2026-08-17
378
513
 
379
514
  ### Fixed
515
+
380
516
  - **Agent**: session-interrupt no longer renders tool results after "Session ended"
381
517
  - **Executor**: `onAfterTool` plugins skipped when signal is aborted
382
518
  - **Lint**: abortable syntax checks on Esc
@@ -384,12 +520,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
384
520
  ## [0.43.0] - 2026-08-17
385
521
 
386
522
  ### Added
523
+
387
524
  - **Plan**: `plan delete <id>` + `plan purge` actions
388
525
  - **Plan**: `abort` honors `id` parameter
389
526
  - **Plan**: `replan` renumbers ids for kept steps
390
527
  - **Audit**: `resolveTestCommand` picks the project's real test runner
391
528
 
392
529
  ### Fixed
530
+
393
531
  - **Plan**: `switch` to already-active plan is a no-op
394
532
  - **Plan**: final audit runs for a completed plan
395
533
  - **Plan**: evidence-based plan nudge (replaces iteration counter)
@@ -400,15 +538,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
400
538
  ## [0.42.0] - 2026-08-16
401
539
 
402
540
  ### Added
541
+
403
542
  - **Execution**: automatic error web search (≥5 same-error repeats → web search → inject results)
404
543
  - **Config**: `errorWebSearch` section
405
544
 
406
545
  ### Fixed
546
+
407
547
  - **Execution**: `onAfterTool` double-counted typecheck + failure errors
408
548
 
409
549
  ## [0.41.1] - 2026-08-16
410
550
 
411
551
  ### Fixed
552
+
412
553
  - **LSP**: `typescript@5` pin + `--yes` for npx
413
554
  - **LSP**: sequential probing (waves) to avoid npx cache lock contention
414
555
  - **LSP**: stale config normalization
@@ -419,6 +560,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
419
560
  ## [0.41.0] - 2026-08-15
420
561
 
421
562
  ### Added
563
+
422
564
  - **REPL**: live plan checklist with progress bar
423
565
  - **UI**: tool-to-step binding (`← step N` suffix in tool headers)
424
566
  - **UI**: background command output preview
@@ -426,11 +568,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
426
568
  ## [0.40.1] - 2026-08-15
427
569
 
428
570
  ### Fixed
571
+
429
572
  - **LSP**: broken package names (`vscode-html-languageserver` → `vscode-langservers-extracted`)
430
573
 
431
574
  ## [0.40.0] - 2026-08-15
432
575
 
433
576
  ### Added
577
+
434
578
  - **Tools**: tool-set narrowing (on-demand enable via `enable_tools`)
435
579
  - **Config**: `tools.defaultTags` + `tools.enableOnDemand`
436
580
  - **Tools**: `alwaysOn` flag for structural tools
@@ -438,40 +582,48 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
438
582
  ## [0.39.1] - 2026-08-14
439
583
 
440
584
  ### Fixed
585
+
441
586
  - **Plugins**: dedup by version, compatibility gate, source tracking
442
587
  - **CLI**: `mma plugins list` command
443
588
 
444
589
  ## [0.38.0] - 2026-08-14
445
590
 
446
591
  ### Added
592
+
447
593
  - **LSP**: `lsp_check` tool for on-demand diagnostics
448
594
  - **Plan**: `plan create` guard (blocks when active plan has progress)
449
595
 
450
596
  ### Fixed
597
+
451
598
  - **Context**: compaction summary carries plan + read state
452
599
  - **Browser**: bridge path resolution in bundled dist
453
600
 
454
601
  ## [0.37.0] - 2026-08-13
455
602
 
456
603
  ### Added
604
+
457
605
  - **Plugins**: folder plugin support in `PluginLoader`
458
606
 
459
607
  ### Fixed
608
+
460
609
  - **Plugin**: template-literal page inlining broke `\n` in JS
461
610
 
462
611
  ## [0.36.3] - 2026-08-13
463
612
 
464
613
  ### Fixed
614
+
465
615
  - **UI**: REPL paste fix (batch single-render, CRLF collapse)
466
616
 
467
617
  ## [0.36.2] - 2026-08-13
468
618
 
469
619
  ### Fixed
620
+
470
621
  - **Updater**: silent logger, one-shot `process.exit()` killed background install, semver-aware check
471
622
 
472
623
  ## [0.36.1] - 2026-08-13
473
624
 
474
625
  ### Fixed
626
+
475
627
  - **Audit**: nested-file resolution, non-zero test run blocks
476
628
  - **Browser**: bridge diagnostics + one-shot restart
477
629
  - **LSP**: per-server disable + initialize retry + CSS timeout
@@ -480,11 +632,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
480
632
  ## [0.36.0] - 2026-08-12
481
633
 
482
634
  ### Added
635
+
483
636
  - **Plan**: model-declared `kind: "create"|"delete"` for steps
484
637
  - **Execution**: `FS_MUTATING_TOOLS` for plan auto-advance
485
638
  - **Config**: `provider.maxCompletionTokens` option
486
639
 
487
640
  ### Fixed
641
+
488
642
  - **Context**: compaction preserves session `mission`
489
643
  - **Context**: deleted files leave compaction `[Files:]` list
490
644
  - **Audit**: final audit runs real `tsc --noEmit --skipLibCheck`
@@ -493,12 +647,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
493
647
  ## [0.35.5] - 2026-08-12
494
648
 
495
649
  ### Fixed
650
+
496
651
  - **Execution**: plan-alignment phantom paths (domains/extensions treated as files)
497
652
  - **Execution**: hint/recovery dedup in `StuckDetector`
498
653
 
499
654
  ## [0.35.3] - 2026-08-11
500
655
 
501
656
  ### Fixed
657
+
502
658
  - **LSP**: workspace root resolved from edited file's project
503
659
  - **Audit**: skipped steps treated as terminal
504
660
  - **Bash**: Windows hint keys on original command word
@@ -507,17 +663,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
507
663
  ## [0.35.0] - 2026-08-11
508
664
 
509
665
  ### Added
666
+
510
667
  - **Tools**: `download_file` tool for binary file downloads
511
668
 
512
669
  ## [0.34.0] - 2026-08-10
513
670
 
514
671
  ### Added
672
+
515
673
  - **Indexer**: project profile (`[Stack: ...]` summary from manifest)
516
674
  - **Indexer**: dynamic map refresh inside sessions
517
675
 
518
676
  ## [0.33.3] - 2026-08-10
519
677
 
520
678
  ### Fixed
679
+
521
680
  - **Audit**: nested-file resolution (basename + path-suffix match)
522
681
  - **Plan**: `plan show` honors `id` parameter
523
682
  - **Context**: compaction interval reset per user turn
@@ -532,18 +691,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
532
691
  ## [0.33.2] - 2026-08-09
533
692
 
534
693
  ### Fixed
694
+
535
695
  - **UI**: REPL conversation layout (user/agent message dividers)
536
696
  - **Tools**: `isFilePathLike` uses allow-list of file extensions
537
697
 
538
698
  ## [0.33.1] - 2026-08-09
539
699
 
540
700
  ### Fixed
701
+
541
702
  - **UI**: REPL line editor redraw fix (no duplicated multi-line input)
542
703
  - **Tools**: `web_fetch`/`web_browse` description clarifications
543
704
 
544
705
  ## [0.33.0] - 2026-08-09
545
706
 
546
707
  ### Added
708
+
547
709
  - **RLM**: pass-by-reference sub-agent results (`ArtifactStore`)
548
710
  - **RLM**: chunked parallel queries (`chunk_query` tool)
549
711
  - **Config**: `subagent.resultMode`, `maxSummaryChars`, `artifactsDir`, `stableSystemPrompt`
@@ -551,6 +713,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
551
713
  ## [0.32.0] - 2026-08-08
552
714
 
553
715
  ### Added
716
+
554
717
  - **Browser**: driver abstraction (`PlaywrightDriver` + `BridgeDriver`)
555
718
  - **Browser**: Node bridge for Bun compatibility
556
719
  - **Config**: `browser.maxConsoleLineChars`
@@ -558,6 +721,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
558
721
  ## [0.31.0] - 2026-08-08
559
722
 
560
723
  ### Added
724
+
561
725
  - **Security**: session file encryption (AES-256-GCM)
562
726
  - **Security**: audit notifications (file + webhook)
563
727
  - **Security**: security policies (strict/balanced/permissive)
@@ -566,16 +730,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
566
730
  ## [0.30.0] - 2026-08-07
567
731
 
568
732
  ### Added
733
+
569
734
  - **Execution**: final audit gate (runs `bun test` for verification steps)
570
735
  - **Execution**: `detectTestResults()` auto-verification in bash
571
736
 
572
737
  ### Fixed
738
+
573
739
  - **Execution**: empty-CLI entry-point hint
574
740
  - **Bash**: Windows anti-patterns documentation
575
741
 
576
742
  ## [0.29.0] - 2026-08-07
577
743
 
578
744
  ### Added
745
+
579
746
  - **Bash**: smart UTF-8/OEM line decoding (fixes Cyrillic on Windows)
580
747
  - **Bash**: behavior-based background detection
581
748
  - **Bash**: stuck-detector bash awareness
@@ -583,6 +750,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
583
750
  ## [0.28.0] - 2026-08-06
584
751
 
585
752
  ### Fixed
753
+
586
754
  - **Agent**: double-Esc interrupt fix (Bun readline keypress collapsing)
587
755
  - **Agent**: abortable in-flight LLM requests on interrupt
588
756
  - **UI**: clipboard paste hint
@@ -590,12 +758,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
590
758
  ## [0.27.0] - 2026-08-06
591
759
 
592
760
  ### Fixed
761
+
593
762
  - **Security**: Windows hardening
594
763
  - **Hallucination**: fixes
595
764
 
596
765
  ## [0.26.0] - 2026-08-05
597
766
 
598
767
  ### Added
768
+
599
769
  - **UI**: opencode-style inline tool headers (`ui.toolStyle`)
600
770
  - **UI**: model commentary next to tool calls (`ui.toolComments`)
601
771
  - **UI**: diffs without background color
@@ -603,6 +773,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
603
773
  ## [0.25.0] - 2026-08-05
604
774
 
605
775
  ### Added
776
+
606
777
  - **LSP**: LSP module (typescript, CSS, HTML, JSON, Python, Rust, Go)
607
778
  - **Execution**: audit gate language-agnostic
608
779
  - **Bash**: Windows command hints
@@ -610,18 +781,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
610
781
  ## [0.24.0] - 2026-08-04
611
782
 
612
783
  ### Added
784
+
613
785
  - **Context**: quality formula upgrade (token load + compaction loss + error density + freshness)
614
786
  - **Read**: display mode (show only header in REPL, full content to LLM)
615
787
 
616
788
  ## [0.23.0] - 2026-08-04
617
789
 
618
790
  ### Added
791
+
619
792
  - **Certification**: model certification module (`mma model certify`)
620
793
  - **CLI**: cert checkmarks in model lists
621
794
 
622
795
  ## [0.22.0] - 2026-08-03
623
796
 
624
797
  ### Added
798
+
625
799
  - **Security**: `enabled` flag (disabled by default)
626
800
  - **CLI**: init/first-run apply wizard security answers
627
801
  - **Prompt**: system prompt & recovery messages cleanup