micro-models-agent 0.63.3 → 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 (185) hide show
  1. package/CHANGELOG.md +148 -1
  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 +7 -4
  41. package/dist/i18n/ru.json +7 -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 +1606 -800
  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/driver.js +46 -4
  59. package/dist/modules/certification/cli.js +85 -42
  60. package/dist/modules/certification/loader.js +15 -1
  61. package/dist/modules/certification/manifest.js +126 -15
  62. package/dist/modules/certification/runner.js +4 -26
  63. package/dist/modules/certification/scenarios.js +184 -5
  64. package/dist/modules/certification/syntax-scenarios.js +51 -0
  65. package/dist/modules/context/chunk-query.js +25 -5
  66. package/dist/modules/context/fact-extractor.js +6 -2
  67. package/dist/modules/context/manager.js +23 -7
  68. package/dist/modules/execution/audit-runners.js +7 -1
  69. package/dist/modules/execution/auditor.js +3 -3
  70. package/dist/modules/execution/execution-plugin.js +22 -15
  71. package/dist/modules/execution/input-from.js +46 -0
  72. package/dist/modules/execution/module.js +107 -18
  73. package/dist/modules/execution/moe-executor.js +166 -54
  74. package/dist/modules/execution/plan-actions.js +524 -0
  75. package/dist/modules/execution/plan-steps.js +23 -0
  76. package/dist/modules/execution/plan-store.js +15 -3
  77. package/dist/modules/execution/plan-tool.js +6 -488
  78. package/dist/modules/execution/plan-validator.js +24 -0
  79. package/dist/modules/execution/stuck-detector.js +3 -18
  80. package/dist/modules/execution/tracker.js +14 -5
  81. package/dist/modules/execution/transient-error.js +30 -0
  82. package/dist/modules/execution/verifier.js +94 -7
  83. package/dist/modules/execution/windows-commands.js +11 -0
  84. package/dist/modules/hallucination/confidence.js +36 -23
  85. package/dist/modules/hallucination/consistency.js +3 -0
  86. package/dist/modules/hallucination/detector.js +8 -3
  87. package/dist/modules/hallucination/factual.js +26 -7
  88. package/dist/modules/hallucination/llm-judge.js +12 -2
  89. package/dist/modules/indexer/map-command.js +35 -0
  90. package/dist/modules/indexer/map-select.js +87 -0
  91. package/dist/modules/indexer/module.js +34 -22
  92. package/dist/modules/indexer/symbols.js +189 -0
  93. package/dist/modules/indexer/walker.js +96 -42
  94. package/dist/modules/lsp/check-tool.js +2 -1
  95. package/dist/modules/lsp/client.js +49 -32
  96. package/dist/modules/lsp/config.js +55 -2
  97. package/dist/modules/lsp/module.js +38 -5
  98. package/dist/modules/lsp/probe.js +4 -3
  99. package/dist/modules/lsp/project-root.js +41 -1
  100. package/dist/modules/lsp/startup-check.js +12 -4
  101. package/dist/modules/mcp/client.js +153 -104
  102. package/dist/modules/mcp/module.js +165 -41
  103. package/dist/modules/memory/module.js +4 -3
  104. package/dist/modules/plugins/builtin/lint-on-write.js +36 -6
  105. package/dist/modules/plugins/manager.js +47 -84
  106. package/dist/modules/pricing/index.js +17 -7
  107. package/dist/modules/pricing/prices.js +30 -12
  108. package/dist/modules/processes/index.js +1 -0
  109. package/dist/modules/processes/kill-tree.js +56 -0
  110. package/dist/modules/processes/registry.js +2 -54
  111. package/dist/modules/providers/cache.js +23 -0
  112. package/dist/modules/providers/factory.js +28 -0
  113. package/dist/modules/providers/fallback.js +7 -5
  114. package/dist/modules/providers/health.js +2 -1
  115. package/dist/modules/providers/index.js +1 -0
  116. package/dist/modules/providers/manager.js +17 -2
  117. package/dist/modules/providers/presets.js +79 -6
  118. package/dist/modules/reasoning/policy.js +40 -0
  119. package/dist/modules/reasoning/probe.js +111 -0
  120. package/dist/modules/security/audit-notifier.js +42 -27
  121. package/dist/modules/security/command-validator.js +25 -20
  122. package/dist/modules/security/encryption.js +6 -12
  123. package/dist/modules/security/network-validator.js +76 -5
  124. package/dist/modules/security/path-validator.js +77 -34
  125. package/dist/modules/security/rate-limiter.js +11 -0
  126. package/dist/modules/security/security-policies.js +1 -1
  127. package/dist/modules/security/session-encryption.js +13 -2
  128. package/dist/modules/security/session-isolation.js +2 -9
  129. package/dist/modules/session/manager.js +11 -0
  130. package/dist/modules/session/module.js +11 -3
  131. package/dist/modules/session/store.js +41 -5
  132. package/dist/modules/skills/loader.js +7 -1
  133. package/dist/modules/skills/module.js +2 -1
  134. package/dist/modules/updater/changelog-reader.js +94 -0
  135. package/dist/modules/updater/dev-detect.js +17 -0
  136. package/dist/modules/updater/index.js +1 -0
  137. package/dist/modules/updater/module.js +14 -3
  138. package/dist/output/bus.js +32 -0
  139. package/dist/output/channel.js +233 -0
  140. package/dist/output/format.js +14 -0
  141. package/dist/output/index.js +7 -0
  142. package/dist/output/json-sink.js +22 -0
  143. package/dist/output/machine.js +8 -0
  144. package/dist/output/session-sink.js +27 -0
  145. package/dist/output/types.js +1 -0
  146. package/dist/tools/approve.js +6 -2
  147. package/dist/tools/attach-image.js +11 -11
  148. package/dist/tools/auto-fixer.js +198 -0
  149. package/dist/tools/bash.js +142 -89
  150. package/dist/tools/chunk-query.js +10 -6
  151. package/dist/tools/download-file.js +1 -1
  152. package/dist/tools/edit-file.js +20 -2
  153. package/dist/tools/executor.js +54 -9
  154. package/dist/tools/glob-tool.js +7 -0
  155. package/dist/tools/grep-tool.js +15 -1
  156. package/dist/tools/index.js +3 -1
  157. package/dist/tools/list-dir.js +3 -1
  158. package/dist/tools/load-skill.js +2 -1
  159. package/dist/tools/mcp-call.js +1 -1
  160. package/dist/tools/move-file.js +5 -4
  161. package/dist/tools/path-utils.js +7 -0
  162. package/dist/tools/pipeline-run.js +1 -1
  163. package/dist/tools/prompt-io.js +28 -0
  164. package/dist/tools/question.js +12 -12
  165. package/dist/tools/scope-request.js +91 -0
  166. package/dist/tools/session-info.js +44 -0
  167. package/dist/tools/set-thinking.js +71 -0
  168. package/dist/tools/subagent.js +50 -9
  169. package/dist/tools/syntax-validator.js +177 -0
  170. package/dist/tools/user-input.js +16 -9
  171. package/dist/tools/write-file.js +17 -1
  172. package/dist/ui/diff.js +10 -0
  173. package/dist/ui/line-editor.js +179 -26
  174. package/dist/ui/line-math.js +20 -3
  175. package/dist/ui/md-formatter.js +100 -10
  176. package/dist/ui/output.js +5 -4
  177. package/dist/ui/plan-view.js +2 -7
  178. package/dist/ui/renderer.js +89 -85
  179. package/dist/ui/spinner.js +14 -4
  180. package/dist/utils/error.js +4 -0
  181. package/dist/utils/index.js +4 -0
  182. package/dist/utils/retry.js +17 -0
  183. package/dist/utils/sleep.js +23 -0
  184. package/dist/utils/truncate.js +9 -0
  185. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,44 +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
+
7
53
  ## [0.63.3] - 2026-09-17
8
54
 
9
55
  ### Fixed
56
+
10
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:
11
- - **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.
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.
12
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.
13
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.
14
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.
15
62
 
16
63
  ### Added
64
+
17
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`).
18
66
 
19
67
  ## [0.63.2] - 2026-09-17
20
68
 
21
69
  ### Fixed
70
+
22
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.
23
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.
24
73
 
25
74
  ## [0.63.1] - 2026-09-17
26
75
 
27
76
  ### Added
77
+
28
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.
29
79
 
30
80
  ### Changed
81
+
31
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`).
32
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.
33
84
 
34
85
  ## [0.63.0] - 2026-09-17
35
86
 
36
87
  ### Added
88
+
37
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).
38
90
 
39
91
  ### Changed
92
+
40
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.
41
94
 
42
95
  ## [0.62.0] - 2026-09-17
43
96
 
44
97
  ### Added
98
+
45
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`.
46
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.
47
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.
@@ -49,10 +103,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
49
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).
50
104
 
51
105
  ### Changed
106
+
52
107
  - **Code comments are Russian** (new architecture rule #15).
53
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).
54
109
 
55
110
  ### Fixed
111
+
56
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.
57
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.
58
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.
@@ -60,35 +116,42 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
60
116
  ## [0.61.1] - 2026-09-16
61
117
 
62
118
  ### Fixed
119
+
63
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.
64
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.
65
122
 
66
123
  ## [0.61.0] - 2026-09-15
67
124
 
68
125
  ### Added
126
+
69
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.
70
128
 
71
129
  ### Changed
130
+
72
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>`).
73
132
 
74
133
  ### Fixed
134
+
75
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.
76
136
 
77
137
  ## [0.60.1] - 2026-09-15
78
138
 
79
139
  ### Fixed
140
+
80
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.
81
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.
82
143
 
83
144
  ## [0.60.0] - 2026-09-15
84
145
 
85
146
  ### Added
147
+
86
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".
87
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.
88
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`).
89
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.
90
152
 
91
153
  ### Fixed
154
+
92
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.
93
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.
94
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.
@@ -97,6 +160,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
97
160
  ## [0.59.0] - 2026-09-05
98
161
 
99
162
  ### Added
163
+
100
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
101
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
102
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
@@ -105,16 +169,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
105
169
  ## [0.58.2] - 2026-09-01
106
170
 
107
171
  ### Fixed
172
+
108
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.
109
174
 
110
175
  ## [0.58.1] - 2026-09-01
111
176
 
112
177
  ### Fixed
178
+
113
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).
114
180
 
115
181
  ## [0.58.0] - 2026-08-31
116
182
 
117
183
  ### Added
184
+
118
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`)
119
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)
120
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
@@ -124,9 +191,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
124
191
  - **ToolResult.usage**: sub-agent token usage propagated to the MoE executor for cost attribution
125
192
 
126
193
  ### Changed
194
+
127
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`
128
196
 
129
197
  ### Fixed
198
+
130
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).
131
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.
132
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).
@@ -143,6 +212,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
143
212
  ## [0.57.2] - 2026-08-30
144
213
 
145
214
  ### Changed
215
+
146
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.
147
217
  - **Provenance**: provider entry resolution uses active entry label, not bare `provider.type`
148
218
  - **Reasoning signals**: `consecutiveToolSuccesses` and `isRepetitive` now feed real values to the reasoning policy (were hardcoded)
@@ -156,6 +226,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
156
226
  - **errMsg**: replaces 23 occurrences of `e instanceof Error ? e.message : String(e)` across 12 files
157
227
 
158
228
  ### Fixed
229
+
159
230
  - **chunk_query**: one failing chunk no longer kills the entire query; per-chunk `catch` → `[FAILED]`
160
231
  - **chunk_query**: synthesis prompt capped at 20K chars with `[TRUNCATED]` marker
161
232
  - **chunk_query**: `AbortSignal` propagated to `chatText` for cancellation support
@@ -167,6 +238,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
167
238
  - **LSP /lsp check**: fixed latent bug where `.execute()` was called with `.executeByName` signature
168
239
 
169
240
  ### Added
241
+
170
242
  - **Plan Reminder**: static `[Plan Reminder]` block in system prompt (never mutates)
171
243
  - **Documentation**: reentrancy warning on `executeByName()`, `PlanResult` JSDoc
172
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`
@@ -175,21 +247,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
175
247
  - **Security-policies**: `comparePolicies` typed (`keyof SecurityConfig` replaces `as any`)
176
248
 
177
249
  ### Removed
250
+
178
251
  - **Browser**: dead `buildWaitScript` export (never imported)
179
252
 
180
253
  ## [0.57.1] - 2026-08-28
181
254
 
182
255
  ### Fixed
256
+
183
257
  - **Publish**: republish after version bump
184
258
 
185
259
  ## [0.57.0] - 2026-08-28
186
260
 
187
261
  ### Changed
262
+
188
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.
189
264
  - **Updater**: `checkOnStart` and `autoInstall` disabled by default. Reduced `waitForIdle` timeout from 130s to 10s.
190
265
  - **Config**: `updater.checkOnStart` default changed from `true` to `false`
191
266
 
192
267
  ### Added
268
+
193
269
  - **MCP**: HTTP request timeouts (10s) on `connectSSE`, `listToolsHTTP`, `callToolHTTP`
194
270
  - **MCP**: `failedServers` tracking — servers that fail discovery are not retried
195
271
  - **MCP**: placeholder `connect` tool for not-yet-discovered servers (LLM can trigger lazy discovery)
@@ -198,17 +274,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
198
274
  ## [0.56.5] - 2026-08-27
199
275
 
200
276
  ### Fixed
277
+
201
278
  - **Hallucination**: `FactualCheck` now receives deleted files from `ConsistencyCheck` — no longer false-positives on files that were intentionally deleted in the same session
202
279
 
203
280
  ## [0.56.4] - 2026-08-27
204
281
 
205
282
  ### Fixed
283
+
206
284
  - **Tools**: `list_dir` now filters `.mma/`, `node_modules/`, `.git/`, `dist/`, `build/`, `coverage/` from directory listings (consistent with indexer)
207
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`)
208
286
 
209
287
  ## [0.56.1] - 2026-08-27
210
288
 
211
289
  ### Added
290
+
212
291
  - **CLI**: `mma changelog` command — show latest changelog entry or diff between versions (`--from <version>`)
213
292
  - **Updater**: show changelog after auto-update install (`updater.installed` message includes new version's changelog)
214
293
  - **Docs**: `CHANGELOG.md` included in npm package (visible via `npm info micro-models-agent`)
@@ -217,6 +296,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
217
296
  ## [0.56.0] - 2026-08-27
218
297
 
219
298
  ### Added
299
+
220
300
  - **MoE**: live re-plan loop in `runWithMoE` — orchestrator re-plans on structural failures
221
301
  - **MoE**: scope expansion protocol (`scope_request`) for cross-expert file access
222
302
  - **MoE**: Esc/interrupt support in the MoE execution path
@@ -225,6 +305,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
225
305
  - **Tools**: syntax pre-validation and auto-fix for `write_file`/`edit_file`
226
306
 
227
307
  ### Fixed
308
+
228
309
  - **Security**: SSRF via IPv6-mapped IPv4 and raw numeric hostnames
229
310
  - **Security**: command-validator blacklist bypasses (shell expansions, encoded chars)
230
311
  - **Security**: audit webhook retry queue drained forever (infinite loop + duplicate notifications)
@@ -244,6 +325,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
244
325
  ## [0.55.1] - 2026-08-25
245
326
 
246
327
  ### Fixed
328
+
247
329
  - **LLM**: NDJSON-tolerant stream parser for Ollama backends
248
330
  - **LLM**: mid-stream provider errors surfaced (Ollama generation failures)
249
331
  - **LLM**: `delta.reasoning` alias for thinking models
@@ -252,63 +334,75 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
252
334
  ## [0.55.0] - 2026-08-25
253
335
 
254
336
  ### Added
337
+
255
338
  - **Certification**: targeted re-run (`--scenarios <ids>`) with result merging
256
339
  - **Certification**: per-rep timeout (`--timeout <ms>` + per-scenario `timeoutMs`)
257
340
  - **Certification**: audit-gate bypass fix for `--exit-on-complete`
258
341
 
259
342
  ### Fixed
343
+
260
344
  - **Certification**: stale-label wording (removed impossible user instruction)
261
345
  - **Dependencies**: typescript pinned to ^5.9 (TS7 preview breaks `@types/node`)
262
346
 
263
347
  ## [0.54.0] - 2026-08-24
264
348
 
265
349
  ### Added
350
+
266
351
  - **Certification**: global manifest shipped with package updates (`~/.mma/certifications.json`)
267
352
  - **Certification**: bundled manifest + startup sync from package
268
353
 
269
354
  ### Fixed
355
+
270
356
  - **Certification**: marks only showed when running from repo root
271
357
 
272
358
  ## [0.53.0] - 2026-08-24
273
359
 
274
360
  ### Added
361
+
275
362
  - **Certification**: qwen3.5-9b certified 20/20
276
363
  - **Config**: `provider.maxCompletionTokens` option
277
364
  - **Certification**: label text in `mma model list` and REPL `/model`
278
365
 
279
366
  ### Fixed
367
+
280
368
  - **Certification**: reasoning-heavy models truncated tool_call arguments at default 4096 cap
281
369
  - **Certification**: scenario 3.5 prompt disambiguation
282
370
 
283
371
  ## [0.52.0] - 2026-08-23
284
372
 
285
373
  ### Added
374
+
286
375
  - **Execution**: `FS_MUTATING_TOOLS` — plan auto-advance after bash/download/subagent/mcp/pipeline/browser tools
287
376
  - **Config**: `provider.maxCompletionTokens` plumbing through ProviderManager → agent
288
377
 
289
378
  ### Fixed
379
+
290
380
  - **Execution**: small models create files via bash instead of `write_file`, stalling plans
291
381
  - **Execution**: `maxCompletionTokens` was never read from config
292
382
 
293
383
  ## [0.51.0] - 2026-08-23
294
384
 
295
385
  ### Added
386
+
296
387
  - **Plugin**: `HostBridge` interface for bidirectional agent communication
297
388
  - **Plugin**: `onTurnEnd(ctx, TurnSummary)` hook — dispatched once per completed run
298
389
  - **Plugin**: `web-ui` example plugin — browser-based chat with SSE streaming
299
390
  - **CLI**: REPL bridge wiring for web-ui submit/interrupt
300
391
 
301
392
  ### Fixed
393
+
302
394
  - **REPL**: `/config migrate` unreachable
303
395
 
304
396
  ## [0.50.3] - 2026-08-22
305
397
 
306
398
  ### Fixed
399
+
307
400
  - **UI**: REPL line editor scroll-proof rendering (absolute anchoring via DSR query)
308
401
 
309
402
  ## [0.50.2] - 2026-08-22
310
403
 
311
404
  ### Fixed
405
+
312
406
  - **LLM**: idle stream timeout increased 60s → 180s (LM Studio buffering)
313
407
  - **LLM**: stall diagnosis with dedicated message for SSE buffering
314
408
  - **LLM**: truncation no longer masquerades as empty response
@@ -318,6 +412,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
318
412
  ## [0.50.1] - 2026-08-21
319
413
 
320
414
  ### Fixed
415
+
321
416
  - **Security**: no longer silently overrides explicit user opt-out
322
417
  - **Lint**: skips missing lint binary (was appending error to every write)
323
418
  - **Stuck**: anti-spam for stuck-warnings (dedup via key, decay per-tool counters)
@@ -329,17 +424,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
329
424
  ## [0.50.0] - 2026-08-21
330
425
 
331
426
  ### Added
427
+
332
428
  - **Provider**: health probe (`probeProviders()` + `mma provider check`)
333
429
  - **Provider**: code-only capability routing (`ProviderManager.pickFor()`)
334
430
  - **Provider**: per-entry isolation + priority fallback order
335
431
  - **Pricing**: per-provider cost attribution + breakdown
336
432
 
337
433
  ### Fixed
434
+
338
435
  - **Provider**: transparent failover on 429/5xx/network errors
339
436
 
340
437
  ## [0.49.0] - 2026-08-20
341
438
 
342
439
  ### Fixed
440
+
343
441
  - **REPL**: stale-plan leaks — plan state no longer persists across sessions
344
442
  - **REPL**: plan checklist prints only on plan/todo tool-end events
345
443
  - **Plan**: `PlanStore` is single source of truth for UI consumers
@@ -347,22 +445,26 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
347
445
  ## [0.48.3] - 2026-08-20
348
446
 
349
447
  ### Fixed
448
+
350
449
  - **Hallucination**: dotfile false-positive (`.prettierrc.json` extracted as `prettierrc.json`)
351
450
 
352
451
  ## [0.48.2] - 2026-08-20
353
452
 
354
453
  ### Fixed
454
+
355
455
  - **REPL**: stale plan printed on first agent run of a session
356
456
 
357
457
  ## [0.47.0] - 2026-08-19
358
458
 
359
459
  ### Added
460
+
360
461
  - **Session**: startup diagnostics logging (environment, LSP probe, baseline typecheck)
361
462
  - **Session**: `logBaselineTypecheck()` for post-mortem visibility
362
463
 
363
464
  ## [0.46.1] - 2026-08-19
364
465
 
365
466
  ### Fixed
467
+
366
468
  - **LLM**: connection-break hardening (stream-level retry, no-data timeout, `[DONE]` tracking)
367
469
  - **LLM**: non-streaming timeout (was missing, could hang forever)
368
470
  - **Config**: `retry.maxStreamRetries`, `retry.noDataTimeoutMs` options
@@ -370,17 +472,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
370
472
  ## [0.46.0] - 2026-08-19
371
473
 
372
474
  ### Added
475
+
373
476
  - **Provider**: multi-provider + hot-swap + per-message provenance
374
477
  - **Provider**: `ProviderManager` with entry-based config
375
478
  - **CLI**: `mma provider add/list/use`
376
479
  - **REPL**: `/provider list/use`
377
480
 
378
481
  ### Fixed
482
+
379
483
  - **Path**: `safeResolvePath` POSIX bug (absolute paths re-resolved against baseDir)
380
484
 
381
485
  ## [0.45.0] - 2026-08-18
382
486
 
383
487
  ### Added
488
+
384
489
  - **Provider**: provider module Phase 1 (registry, presets, `createProvider()`)
385
490
  - **Provider**: `openrouter` preset
386
491
  - **Setup**: wizard menu built from `BUILTIN_PROVIDERS`
@@ -388,15 +493,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
388
493
  ## [0.44.0] - 2026-08-18
389
494
 
390
495
  ### Added
496
+
391
497
  - **Plugins**: folder plugins (subdirectory with entry file)
392
498
  - **Plugin**: `trace-server` split into folder plugin
393
499
 
394
500
  ### Fixed
501
+
395
502
  - **Plugin**: template-literal page inlining broke `\n` in JS strings
396
503
 
397
504
  ## [0.43.2] - 2026-08-17
398
505
 
399
506
  ### Fixed
507
+
400
508
  - **Execution**: plan done-gate on known compile failures (typecheck gate)
401
509
  - **Bootstrap**: live getters for `sessionId`/`sessionContext` after session switch
402
510
  - **Edit**: `edit_file` "String not found" hint to `read_file` first
@@ -404,6 +512,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
404
512
  ## [0.43.1] - 2026-08-17
405
513
 
406
514
  ### Fixed
515
+
407
516
  - **Agent**: session-interrupt no longer renders tool results after "Session ended"
408
517
  - **Executor**: `onAfterTool` plugins skipped when signal is aborted
409
518
  - **Lint**: abortable syntax checks on Esc
@@ -411,12 +520,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
411
520
  ## [0.43.0] - 2026-08-17
412
521
 
413
522
  ### Added
523
+
414
524
  - **Plan**: `plan delete <id>` + `plan purge` actions
415
525
  - **Plan**: `abort` honors `id` parameter
416
526
  - **Plan**: `replan` renumbers ids for kept steps
417
527
  - **Audit**: `resolveTestCommand` picks the project's real test runner
418
528
 
419
529
  ### Fixed
530
+
420
531
  - **Plan**: `switch` to already-active plan is a no-op
421
532
  - **Plan**: final audit runs for a completed plan
422
533
  - **Plan**: evidence-based plan nudge (replaces iteration counter)
@@ -427,15 +538,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
427
538
  ## [0.42.0] - 2026-08-16
428
539
 
429
540
  ### Added
541
+
430
542
  - **Execution**: automatic error web search (≥5 same-error repeats → web search → inject results)
431
543
  - **Config**: `errorWebSearch` section
432
544
 
433
545
  ### Fixed
546
+
434
547
  - **Execution**: `onAfterTool` double-counted typecheck + failure errors
435
548
 
436
549
  ## [0.41.1] - 2026-08-16
437
550
 
438
551
  ### Fixed
552
+
439
553
  - **LSP**: `typescript@5` pin + `--yes` for npx
440
554
  - **LSP**: sequential probing (waves) to avoid npx cache lock contention
441
555
  - **LSP**: stale config normalization
@@ -446,6 +560,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
446
560
  ## [0.41.0] - 2026-08-15
447
561
 
448
562
  ### Added
563
+
449
564
  - **REPL**: live plan checklist with progress bar
450
565
  - **UI**: tool-to-step binding (`← step N` suffix in tool headers)
451
566
  - **UI**: background command output preview
@@ -453,11 +568,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
453
568
  ## [0.40.1] - 2026-08-15
454
569
 
455
570
  ### Fixed
571
+
456
572
  - **LSP**: broken package names (`vscode-html-languageserver` → `vscode-langservers-extracted`)
457
573
 
458
574
  ## [0.40.0] - 2026-08-15
459
575
 
460
576
  ### Added
577
+
461
578
  - **Tools**: tool-set narrowing (on-demand enable via `enable_tools`)
462
579
  - **Config**: `tools.defaultTags` + `tools.enableOnDemand`
463
580
  - **Tools**: `alwaysOn` flag for structural tools
@@ -465,40 +582,48 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
465
582
  ## [0.39.1] - 2026-08-14
466
583
 
467
584
  ### Fixed
585
+
468
586
  - **Plugins**: dedup by version, compatibility gate, source tracking
469
587
  - **CLI**: `mma plugins list` command
470
588
 
471
589
  ## [0.38.0] - 2026-08-14
472
590
 
473
591
  ### Added
592
+
474
593
  - **LSP**: `lsp_check` tool for on-demand diagnostics
475
594
  - **Plan**: `plan create` guard (blocks when active plan has progress)
476
595
 
477
596
  ### Fixed
597
+
478
598
  - **Context**: compaction summary carries plan + read state
479
599
  - **Browser**: bridge path resolution in bundled dist
480
600
 
481
601
  ## [0.37.0] - 2026-08-13
482
602
 
483
603
  ### Added
604
+
484
605
  - **Plugins**: folder plugin support in `PluginLoader`
485
606
 
486
607
  ### Fixed
608
+
487
609
  - **Plugin**: template-literal page inlining broke `\n` in JS
488
610
 
489
611
  ## [0.36.3] - 2026-08-13
490
612
 
491
613
  ### Fixed
614
+
492
615
  - **UI**: REPL paste fix (batch single-render, CRLF collapse)
493
616
 
494
617
  ## [0.36.2] - 2026-08-13
495
618
 
496
619
  ### Fixed
620
+
497
621
  - **Updater**: silent logger, one-shot `process.exit()` killed background install, semver-aware check
498
622
 
499
623
  ## [0.36.1] - 2026-08-13
500
624
 
501
625
  ### Fixed
626
+
502
627
  - **Audit**: nested-file resolution, non-zero test run blocks
503
628
  - **Browser**: bridge diagnostics + one-shot restart
504
629
  - **LSP**: per-server disable + initialize retry + CSS timeout
@@ -507,11 +632,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
507
632
  ## [0.36.0] - 2026-08-12
508
633
 
509
634
  ### Added
635
+
510
636
  - **Plan**: model-declared `kind: "create"|"delete"` for steps
511
637
  - **Execution**: `FS_MUTATING_TOOLS` for plan auto-advance
512
638
  - **Config**: `provider.maxCompletionTokens` option
513
639
 
514
640
  ### Fixed
641
+
515
642
  - **Context**: compaction preserves session `mission`
516
643
  - **Context**: deleted files leave compaction `[Files:]` list
517
644
  - **Audit**: final audit runs real `tsc --noEmit --skipLibCheck`
@@ -520,12 +647,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
520
647
  ## [0.35.5] - 2026-08-12
521
648
 
522
649
  ### Fixed
650
+
523
651
  - **Execution**: plan-alignment phantom paths (domains/extensions treated as files)
524
652
  - **Execution**: hint/recovery dedup in `StuckDetector`
525
653
 
526
654
  ## [0.35.3] - 2026-08-11
527
655
 
528
656
  ### Fixed
657
+
529
658
  - **LSP**: workspace root resolved from edited file's project
530
659
  - **Audit**: skipped steps treated as terminal
531
660
  - **Bash**: Windows hint keys on original command word
@@ -534,17 +663,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
534
663
  ## [0.35.0] - 2026-08-11
535
664
 
536
665
  ### Added
666
+
537
667
  - **Tools**: `download_file` tool for binary file downloads
538
668
 
539
669
  ## [0.34.0] - 2026-08-10
540
670
 
541
671
  ### Added
672
+
542
673
  - **Indexer**: project profile (`[Stack: ...]` summary from manifest)
543
674
  - **Indexer**: dynamic map refresh inside sessions
544
675
 
545
676
  ## [0.33.3] - 2026-08-10
546
677
 
547
678
  ### Fixed
679
+
548
680
  - **Audit**: nested-file resolution (basename + path-suffix match)
549
681
  - **Plan**: `plan show` honors `id` parameter
550
682
  - **Context**: compaction interval reset per user turn
@@ -559,18 +691,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
559
691
  ## [0.33.2] - 2026-08-09
560
692
 
561
693
  ### Fixed
694
+
562
695
  - **UI**: REPL conversation layout (user/agent message dividers)
563
696
  - **Tools**: `isFilePathLike` uses allow-list of file extensions
564
697
 
565
698
  ## [0.33.1] - 2026-08-09
566
699
 
567
700
  ### Fixed
701
+
568
702
  - **UI**: REPL line editor redraw fix (no duplicated multi-line input)
569
703
  - **Tools**: `web_fetch`/`web_browse` description clarifications
570
704
 
571
705
  ## [0.33.0] - 2026-08-09
572
706
 
573
707
  ### Added
708
+
574
709
  - **RLM**: pass-by-reference sub-agent results (`ArtifactStore`)
575
710
  - **RLM**: chunked parallel queries (`chunk_query` tool)
576
711
  - **Config**: `subagent.resultMode`, `maxSummaryChars`, `artifactsDir`, `stableSystemPrompt`
@@ -578,6 +713,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
578
713
  ## [0.32.0] - 2026-08-08
579
714
 
580
715
  ### Added
716
+
581
717
  - **Browser**: driver abstraction (`PlaywrightDriver` + `BridgeDriver`)
582
718
  - **Browser**: Node bridge for Bun compatibility
583
719
  - **Config**: `browser.maxConsoleLineChars`
@@ -585,6 +721,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
585
721
  ## [0.31.0] - 2026-08-08
586
722
 
587
723
  ### Added
724
+
588
725
  - **Security**: session file encryption (AES-256-GCM)
589
726
  - **Security**: audit notifications (file + webhook)
590
727
  - **Security**: security policies (strict/balanced/permissive)
@@ -593,16 +730,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
593
730
  ## [0.30.0] - 2026-08-07
594
731
 
595
732
  ### Added
733
+
596
734
  - **Execution**: final audit gate (runs `bun test` for verification steps)
597
735
  - **Execution**: `detectTestResults()` auto-verification in bash
598
736
 
599
737
  ### Fixed
738
+
600
739
  - **Execution**: empty-CLI entry-point hint
601
740
  - **Bash**: Windows anti-patterns documentation
602
741
 
603
742
  ## [0.29.0] - 2026-08-07
604
743
 
605
744
  ### Added
745
+
606
746
  - **Bash**: smart UTF-8/OEM line decoding (fixes Cyrillic on Windows)
607
747
  - **Bash**: behavior-based background detection
608
748
  - **Bash**: stuck-detector bash awareness
@@ -610,6 +750,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
610
750
  ## [0.28.0] - 2026-08-06
611
751
 
612
752
  ### Fixed
753
+
613
754
  - **Agent**: double-Esc interrupt fix (Bun readline keypress collapsing)
614
755
  - **Agent**: abortable in-flight LLM requests on interrupt
615
756
  - **UI**: clipboard paste hint
@@ -617,12 +758,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
617
758
  ## [0.27.0] - 2026-08-06
618
759
 
619
760
  ### Fixed
761
+
620
762
  - **Security**: Windows hardening
621
763
  - **Hallucination**: fixes
622
764
 
623
765
  ## [0.26.0] - 2026-08-05
624
766
 
625
767
  ### Added
768
+
626
769
  - **UI**: opencode-style inline tool headers (`ui.toolStyle`)
627
770
  - **UI**: model commentary next to tool calls (`ui.toolComments`)
628
771
  - **UI**: diffs without background color
@@ -630,6 +773,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
630
773
  ## [0.25.0] - 2026-08-05
631
774
 
632
775
  ### Added
776
+
633
777
  - **LSP**: LSP module (typescript, CSS, HTML, JSON, Python, Rust, Go)
634
778
  - **Execution**: audit gate language-agnostic
635
779
  - **Bash**: Windows command hints
@@ -637,18 +781,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
637
781
  ## [0.24.0] - 2026-08-04
638
782
 
639
783
  ### Added
784
+
640
785
  - **Context**: quality formula upgrade (token load + compaction loss + error density + freshness)
641
786
  - **Read**: display mode (show only header in REPL, full content to LLM)
642
787
 
643
788
  ## [0.23.0] - 2026-08-04
644
789
 
645
790
  ### Added
791
+
646
792
  - **Certification**: model certification module (`mma model certify`)
647
793
  - **CLI**: cert checkmarks in model lists
648
794
 
649
795
  ## [0.22.0] - 2026-08-03
650
796
 
651
797
  ### Added
798
+
652
799
  - **Security**: `enabled` flag (disabled by default)
653
800
  - **CLI**: init/first-run apply wizard security answers
654
801
  - **Prompt**: system prompt & recovery messages cleanup