min-agent 0.7.2 → 0.7.3

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "min-agent",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "type": "module",
5
5
  "description": "Minimal AI coding agent with tool use, MCP, and skills support",
6
6
  "license": "MIT",
@@ -81,7 +81,7 @@ Instructions...
81
81
  - Rules: edit the files in the table above. `/reload` reloads rules only, not MCP.
82
82
  - Memory: **off** by default. Config `memory` is `on` | `off` (`true`/`enable` → on, `false`/`disable` → off). Project overlays global; writing `memory` globally also removes a project `memory` overlay. When off, memories are not injected and `memory_save` / `memory_search` / `memory_delete` are not registered (takes effect next turn after you change the file). CLI `min-agent memory on|off` / `--memory` follow the same write-vs-this-run rule as permission. `/memory on|off` writes **global** by default (and clears a project overlay); `/memory --project` writes only the project file. `/memory` lists the switch plus stored entries; `/memory <text>` still writes `memory.json` even when off. Default save scope is project when `.min-agent/` exists. Shape: `{ "content": string, "tags": string[], "created": ISO string }` array. When on, memories are injected each turn as background reference, not as work to resume. Do not store secrets or API keys. HTTP: `GET/POST /v1/memory/mode`, chat body `memory`, and `GET /v1/memory` include `memory` / `source` / `label`.
83
83
  - Permission: `accept-edits` (default) | `ask` | `allow-all` in config `permission`. CLI `min-agent permission …` / `--permission` without a message writes config and exits; with a message it is this session only. `--yes` is this session only and does not write config. `min-agent exec` (one-shot) uses a permissive default when neither `--permission` nor `--yes` is given: file edits and ordinary commands run without asking, and only genuinely destructive commands (deleting files/dirs, `drop`/`truncate`/`delete from`, `mkfs`/`dd`/raw-device writes, `shred`/`wipefs`, `git reset --hard`/`git clean -f`, `docker rm`/`prune`, `find … -delete`/`-exec rm`) still prompt. An explicit `--permission` (or `--yes`) overrides this and behaves exactly as in interactive sessions (`allow-all` runs even destructive commands silently). In `ask` / `accept-edits`, "dangerous commands" that still prompt do NOT include ordinary `git push`, `git stash`/`git stash pop`, `git rebase`, or `chmod` — only their harmful forms count: force pushes (`git push --force`/`-f`/`--force-with-lease`) and `git stash drop`/`git stash clear` (plus `git reset --hard`, `git clean -f`, `git checkout .`, `rm -r/-f`, `sudo`, disk/db operations, etc.). Confirmation prompts are coalesced: when several actions in one step need approval, a single overlay lists them all and one allow/deny decision applies to the whole batch instead of stacking separate prompts.
84
- - Thinking intensity: `off` | `low` | `medium` | `high` | `max` in config `thinking`. Omit the field to use **medium**, then clamp to levels the current model actually exposes (from the model catalog). `/think` opens an interactive picker of those English levels and writes **global** config; that also clears a project `thinking` overlay so a leftover project `off` cannot hide the new value after restart. `/think --project` writes only the project file. Typed `/think off|low|medium|high|max` still works when the model supports that value. `min-agent think …` / `--think` follow the same write-vs-this-run rule as permission. `xhigh` / `extra-high` / `none` are accepted as aliases (`xhigh` → `max`, `none` → `off`). Each request maps that intensity onto the current model and gateway (MiniMax uses `adaptive`/`disabled`; official OpenAI omits `thinking` and maps `max` to `xhigh`; an `ollama` provider uses native chat with `think` plus the configured window). Learned mappings are cached in `~/.min-agent/thinking-wire-cache.json` for 7 days. Per-model context window and supported effort values are loaded from the model catalog (`https://models.lonae.com`, override with `MIN_AGENT_MODELS_API_URL`) and cached in `~/.min-agent/model-catalog-cache.json` for 7 days after a successful lookup. When the provider host is unknown, effort levels are the majority across offerings that actually list efforts (toggle-only rows do not vote), so a single gateway cannot invent `medium`. An `ollama` provider skips that catalog and uses native `POST /api/show` instead (whether the model advertises thinking, plus the loaded window: Modelfile `num_ctx` if set, otherwise the architecture length capped at 32768). Chat completions are sent to native `POST /api/chat` so `options.num_ctx` and `think` actually apply — the OpenAI-compatible `/v1` endpoint ignores both. `/ctx` opens a picker of `2k` / `4k` / `8k` / `12k` / `16k` / `32k` / `64k` / `128k` / `256k` / `auto` and writes the active provider's `contextWindow` (global only; providers are not in project config). Typed `/ctx 8k` and CLI `min-agent ctx 8k` do the same; `auto` clears the override. The menu item is hidden unless the active provider is ollama. Results are cached in `~/.min-agent/ollama-model-cache.json` for 7 days.
84
+ - Thinking intensity: `off` | `low` | `medium` | `high` | `max` in config `thinking`. Omit the field to use **high**, then clamp to levels the current model actually exposes (from the model catalog). If the live gateway rejects that level, the same request retries remaining levels (high → medium → max → low → off) without surfacing the error, and the working level is remembered per model. `/think` opens an interactive picker of those English levels and writes **global** config; that also clears a project `thinking` overlay so a leftover project `off` cannot hide the new value after restart. `/think --project` writes only the project file. Typed `/think off|low|medium|high|max` still works when the model supports that value. `min-agent think …` / `--think` follow the same write-vs-this-run rule as permission. `xhigh` / `extra-high` / `none` are accepted as aliases (`xhigh` → `max`, `none` → `off`). Each request maps that intensity onto the current model and gateway (MiniMax uses `adaptive`/`disabled`; official OpenAI omits `thinking` and maps `max` to `xhigh`; an `ollama` provider uses native chat with `think` plus the configured window). Some models (Gemini, and any gateway that answers “reasoning is mandatory”) cannot turn thinking off: the request is sent with reasoning still on, `off` is dropped from `/think` for that model, and the mapping is cached. Learned wire mappings are cached in `~/.min-agent/thinking-wire-cache.json` and learned default intensities in `~/.min-agent/thinking-default-cache.json`, both for 7 days. Per-model context window and supported effort values are loaded from the model catalog (`https://models.lonae.com`, override with `MIN_AGENT_MODELS_API_URL`) and cached in `~/.min-agent/model-catalog-cache.json` for 7 days after a successful lookup. When the provider host is unknown, effort levels are the majority across offerings that actually list efforts (toggle-only rows do not vote), so a single gateway cannot invent `medium`. An `ollama` provider skips that catalog and uses native `POST /api/show` instead (whether the model advertises thinking, plus the loaded window: Modelfile `num_ctx` if set, otherwise the architecture length capped at 32768). Chat completions are sent to native `POST /api/chat` so `options.num_ctx` and `think` actually apply — the OpenAI-compatible `/v1` endpoint ignores both. `/ctx` opens a picker of `2k` / `4k` / `8k` / `12k` / `16k` / `32k` / `64k` / `128k` / `256k` / `auto` and writes the active provider's `contextWindow` (global only; providers are not in project config). Typed `/ctx 8k` and CLI `min-agent ctx 8k` do the same; `auto` clears the override. The menu item is hidden unless the active provider is ollama. Results are cached in `~/.min-agent/ollama-model-cache.json` for 7 days.
85
85
  - Sandbox default is **off**. `mode`: `off` | `workspace` | `strict`. Optional `network`, `extraWriteRoots`, `extraReadRoots`. Isolation is independent of permission. `--sandbox` / `--network` without a message write config and exit.
86
86
 
87
87
  ## Providers
@@ -56,7 +56,7 @@ Read this when you need exact keys. Files are strict JSON.
56
56
  }
57
57
  ```
58
58
 
59
- - `thinking`: `off` | `low` | `medium` | `high` | `max`; omit to use medium. A project `thinking` value overlays global; writing thinking globally removes the project overlay so the chosen level is what later sessions use. `/think --project` writes only the project file.
59
+ - `thinking`: `off` | `low` | `medium` | `high` | `max`; omit to use **high**, then clamp to what the current model supports (catalog first; a working level is remembered per model in `thinking-default-cache.json`). A project `thinking` value overlays global; writing thinking globally removes the project overlay so the chosen level is what later sessions use. `/think --project` writes only the project file.
60
60
  - `memory`: `on` | `off`; omit to keep **off**. When off, stored `memory.json` entries are not injected and memory tools are unavailable. A project `memory` value overlays global; writing memory globally removes the project overlay. `/memory --project` writes only the project file.
61
61
  - `contextWindow`: tokens; omit to query the API. An `ollama` provider uses `POST /api/show`: Modelfile `num_ctx` if set, otherwise min(architecture context_length, 32768), else 2048. Chat goes to native `POST /api/chat` with that value as `options.num_ctx` (OpenAI-compatible `/v1` ignores it). Interactive `/ctx` (and `min-agent ctx`) sets this field on the active ollama provider to a fixed level (`2k` / `4k` / `8k` / `12k` / `16k` / `32k` / `64k` / `128k` / `256k`) or `auto` to clear it. Other providers then 512k fallback.
62
62
  - `agent.autoContinue` omitted → uses `compaction.autoContinue` (default true).
@@ -140,7 +140,7 @@ Array of `{ "content": string, "tags": string[], "created": string }`. Prefer me
140
140
 
141
141
  | Variable | Role |
142
142
  |----------|------|
143
- | `MIN_AGENT_CONFIG_DIR` | Replaces `~/.min-agent` (includes `model-catalog-cache.json`, `thinking-wire-cache.json`, `ollama-model-cache.json`) |
143
+ | `MIN_AGENT_CONFIG_DIR` | Replaces `~/.min-agent` (includes `model-catalog-cache.json`, `thinking-wire-cache.json`, `thinking-default-cache.json`, `ollama-model-cache.json`) |
144
144
  | `MIN_AGENT_SKILLS_DIRS` | Replaces user skill roots (path-delimiter separated) |
145
145
  | `MIN_AGENT_NO_BUILTIN_SKILLS` | `1` / `true` skips packaged skills |
146
146
  | `MIN_AGENT_NO_BUILTIN_PROVIDER` | `1` / `true` skips the built-in OpenRouter fallback |