min-agent 0.7.8 → 1.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "min-agent",
3
- "version": "0.7.8",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "description": "Minimal AI coding agent with tool use, MCP, and skills support",
6
6
  "license": "MIT",
@@ -53,15 +53,16 @@
53
53
  "@ai-sdk/provider": "~3.0.8",
54
54
  "@modelcontextprotocol/sdk": "~1.27.1",
55
55
  "ai": "~6.0.177",
56
- "commander": "14.0.3",
57
- "glob": "~13.0.5",
58
- "ink": "5",
59
- "ink-spinner": "5",
60
- "react": "18"
56
+ "zod": "^4.1.8"
61
57
  },
62
58
  "devDependencies": {
63
59
  "@types/node": "22.13.9",
64
60
  "@types/react": "18",
61
+ "commander": "14.0.3",
62
+ "glob": "~13.0.5",
63
+ "ink": "5",
64
+ "ink-spinner": "5",
65
+ "react": "18",
65
66
  "tsx": "4.19.4",
66
67
  "typescript": "5.8.2"
67
68
  }
@@ -31,12 +31,12 @@ Config files are **strict JSON** (no comments). Read the file before editing. Pr
31
31
  | Project skill toggles; overlay `activeProvider` / `defaultModel` / `sampling` / `permission` / `thinking` / `memory` / `sandbox` / `compaction` / `agent` | `.min-agent/config.json` | Overlay is field-by-field; `sampling`/`sandbox`/`compaction`/`agent` merge keys |
32
32
  | MCP servers | `~/.min-agent/mcp.json` or `.min-agent/mcp.json` | Merge by server **name**; project replaces the same name |
33
33
  | Memories | `memory.json` in the same dirs | Prefer `memory_save` / `memory_search` tools over editing the file |
34
- | Global rules | `~/.min-agent/rules.md` | Always loaded |
35
- | Project rules | `AGENTS.md`, `RULES.md`, or `CLAUDE.md` in cwd (or `.min-agent/AGENTS.md`) | First match wins when walking up from cwd |
34
+ | Global rules | `~/.min-agent/rules.md` and/or `~/.min-agent/AGENTS.md` | Both always loaded when present |
35
+ | Project rules | `AGENTS.md`, `RULES.md`, or `CLAUDE.md` in cwd (or `.min-agent/AGENTS.md`) | First match wins when walking up from cwd; skips the global `~/.min-agent/AGENTS.md` |
36
36
  | Extra instruction files | `instructions` array in global `config.json` | Paths or URLs |
37
37
  | Custom tools | `.min-agent/tools/*.ts` or `~/.min-agent/tools/*.ts` | See reference.md |
38
38
  | Project skills | `.min-agent/skills/<name>/SKILL.md` | Or `min-agent skills new <name>` |
39
- | Global skills | `~/.agents/skills/<name>/SKILL.md` | `min-agent skills new <name> --global` |
39
+ | Global skills | `~/.min-agent/skills/<name>/SKILL.md` (also `~/.agents/skills/`) | `min-agent skills new <name> --global` (or `min-agent --global skills new <name>`) writes under `~/.min-agent/skills/` |
40
40
 
41
41
  ## MCP
42
42
 
@@ -46,15 +46,17 @@ Write `{ "mcpServers": { "<name>": { ... } } }`.
46
46
  - Remote: `"url": "https://..."`. Optional `token`, `headers`, `remoteTransport` (`auto` default, or `streamable-http` / `sse`), `oauth` (`{}` to login in a browser, or `false` to disable).
47
47
  - `enabled: false` disables without deleting. Project `.min-agent/mcp.json` wins on the same name.
48
48
 
49
- CLI (user shell, not a substitute for writing the file in this session): `min-agent mcp add|update|list|info|enable|disable|remove|check` with `--project` for repo scope. `update` only changes the fields you pass (`--token ""` removes the token, `--env`/`--headers` merge, a new command switches the server to stdio and clears remote fields).
49
+ CLI (user shell, not a substitute for writing the file in this session): `min-agent mcp add|update|rename|list|info|enable|disable|remove|check`. Put `--project` on the mcp subcommand or on the root (`min-agent --project mcp …`) for repo scope. Prefer `mcp add --name <name> …` (positional name still works). `update --rename <new> <old>` or `mcp rename <old> <new>` renames. `add` refuses to overwrite unless `--force` (or root `-y`). `update` only changes the fields you pass (`--token ""` removes the token, `--env`/`--headers` merge, a new command switches the server to stdio and clears remote fields).
50
50
 
51
51
  **This session:** editing `mcp.json` is persisted, but connected servers will not change until the user restarts. Say so after you write the file. HTTP `POST /v1/mcp` / `PATCH /v1/mcp/:name` on a running `min-agent serve` reconnects; a coding session does not.
52
52
 
53
53
  Connected servers already expose `mcp_list_resources`, `mcp_read_resource`, `mcp_list_prompts`, `mcp_get_prompt`. Do not invent per-resource tools.
54
54
 
55
+ MCP *tools* from connected servers are inlined when there are 8 or fewer. More than 8 (or `tools.mcpTools: "catalog"`) exposes only `mcp_list_tools` then `mcp_call_tool` — list or search first, then call by the listed id. `"inline"` always sends every schema; `"auto"` is the default. Plan mode still keeps only read-only MCP tools, whether inlined or behind the dispatcher.
56
+
55
57
  ## Skills
56
58
 
57
- User-skill roots, later overriding earlier: `~/.agents/skills/` → `.min-agent/skills/` → `.agents/skills/` → `.opencode/skills/` → `.claude/skills/`. Symlinks are followed. `MIN_AGENT_SKILLS_DIRS` (path-delimiter separated) replaces that user list. Built-in skills shipped with min-agent still load and **win on name**; they are not overridden by user copies. `MIN_AGENT_NO_BUILTIN_SKILLS=1` skips built-ins.
59
+ User-skill roots, later overriding earlier: `~/.agents/skills/` → `~/.min-agent/skills/` → `.min-agent/skills/` → `.agents/skills/` → `.opencode/skills/` → `.claude/skills/`. Symlinks are followed. `MIN_AGENT_SKILLS_DIRS` (path-delimiter separated) replaces that user list. Built-in skills shipped with min-agent still load and **win on name**; they are not overridden by user copies. `MIN_AGENT_NO_BUILTIN_SKILLS=1` skips built-ins.
58
60
 
59
61
  Enable/disable:
60
62
 
@@ -62,7 +64,7 @@ Enable/disable:
62
64
  - Project disable: `disabledSkills` in `.min-agent/config.json` (wins)
63
65
  - Re-enable a globally disabled skill in this repo: add the name to project `enabledSkills`
64
66
 
65
- Toggles take effect on the next turn. A **new** `SKILL.md` is invisible until skills are rediscovered (`/skills` in the interactive session, `POST /v1/skills/reload` on serve, or restart).
67
+ Toggles take effect on the next turn. CLI: `min-agent skills enable|disable <name...> [--project|--global]` (flag on the skills subcommand or on the root). Interactive: `/skills enable|disable <name...> [--project]`. `skills enable <orphan>` clears that name from **all** config lists (global `disabledSkills` and project `disabledSkills`/`enabledSkills`) — no need to guess scope. `skills list` shows orphan entries with their lists. A **new** `SKILL.md` is invisible until skills are rediscovered (`/skills` in the interactive session, `POST /v1/skills/reload` on serve, or restart). `skills new` warns if the name collides with a built-in or another discovered skill.
66
68
 
67
69
  Scaffold:
68
70
 
@@ -81,7 +83,7 @@ Instructions...
81
83
  - Rules: edit the files in the table above. `/reload` reloads rules only, not MCP.
82
84
  - 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
85
  - 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 (any deleting command such as plain `rm file`, `rm -r/-f`, `truncate -s 0`, `drop`/`truncate table`/`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`), `git stash drop`/`git stash clear`, any `rm` with target files, in-place edits (`sed -i`, `perl -i`, `awk -i inplace`), plus `git reset --hard`, `git clean -f`, `git checkout .`, `sudo`, disk/db operations. Shell quoting is respected: dangerous-looking words inside quotes (e.g. `grep "delete from users" src/`) do not prompt; in `accept-edits` a redirect into the project (`cmd > out.log`) mirrors the edit tools and stays silent, while absolute/system/device targets (`> /etc/hosts`) still ask — in `ask` mode any file-writing redirect prompts. Confirmation prompts are coalesced: when several actions in one step need approval, a single overlay lists them all and one decision applies to the whole batch instead of stacking separate prompts. The overlay offers 允许 / 总是允许 / 拒绝 (hotkeys y / a / n): choosing 总是允许 remembers that action for the current process so identical repeats (same normalized shell command, same custom/MCP tool) never prompt again until exit; MCP tools without a read-only hint confirm on each distinct tool exactly once this way, `allow-all` / `--yes` remain fully silent.
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.
86
+ - 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. Non-Ollama models without a detected window use 128k; if a request overflows and reports `n_ctx`, that value is remembered for 24 hours (it does not override an explicit `contextWindow`). Results are cached in `~/.min-agent/ollama-model-cache.json` for 7 days.
85
87
  - 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. On Windows there is no seatbelt/bwrap: `strict` rejects bash; `workspace` still path-checks file tools; bash prefers Git Bash when installed, otherwise `cmd.exe`.
86
88
 
87
89
  ## Providers
@@ -32,10 +32,10 @@ Read this when you need exact keys. Files are strict JSON.
32
32
  "extraWriteRoots": [],
33
33
  "extraReadRoots": []
34
34
  },
35
- "pricing": { "gpt-5.5": { "inputPerMillion": 1.25, "outputPerMillion": 10 } },
35
+ "pricing": { "gpt-5.5": { "inputPerMillion": 1.25, "outputPerMillion": 10, "cacheReadPerMillion": 0.125 } },
36
36
  "sampling": { "temperature": 0.7, "maxTokens": 4096, "topP": 1 },
37
- "compaction": { "model": "gemini-2.0-flash", "autoContinue": true },
38
- "tools": { "bashTimeoutMs": 600000 },
37
+ "compaction": { "model": "gemini-2.0-flash", "autoContinue": true, "chunkChars": 20000 },
38
+ "tools": { "bashTimeoutMs": 600000, "outputMaxLines": 400, "outputMaxBytes": 24576, "mcpTools": "auto" },
39
39
  "agent": {
40
40
  "maxSteps": 40,
41
41
  "maxContinues": 40,
@@ -44,8 +44,9 @@ Read this when you need exact keys. Files are strict JSON.
44
44
  "emptyRetryDelayMs": 1000,
45
45
  "requestTimeoutMs": 180000,
46
46
  "streamIdleTimeoutMs": 90000,
47
- "subAgentMaxSteps": 15,
48
- "exploreMaxSteps": 20,
47
+ "subAgentMaxSteps": 40,
48
+ "exploreMaxSteps": 30,
49
+ "streamChunkSteps": 16,
49
50
  "researchSteerAfter": 3,
50
51
  "researchStopAfter": 5,
51
52
  "researchTotalCap": 24
@@ -55,14 +56,20 @@ Read this when you need exact keys. Files are strict JSON.
55
56
 
56
57
  - `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.
57
58
  - `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.
58
- - `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.
59
+ - `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 128k fallback. If a request overflows and the error reports `n_ctx`, that value is remembered for 24h (does not override an explicit `contextWindow`).
60
+ - `pricing.<model>`: USD per 1M tokens (`inputPerMillion`, `outputPerMillion`). Optional `cacheReadPerMillion` / `cacheWritePerMillion` for reused / written prefix tokens; omit to price reuse at the input rate.
59
61
  - `agent.autoContinue` omitted → uses `compaction.autoContinue` (default true).
62
+ - `compaction.chunkChars`: max characters of older history sent in one summary call (default 20000, clamped 4000–80000). Longer history is summarized slice-by-slice, then merged. A summary that is missing required headings (`## Goal`, `## Relevant Files`, …) or drops the current goal / known file paths is repaired once; if it still fails, compaction keeps pruned messages instead of replacing history with a bad summary. Project overlay merges this field.
60
63
  - `agent.maxSteps` omitted → no tool-step ceiling. `agent.maxContinues` omitted → no auto-continue ceiling.
61
64
  - `agent.maxEmptyAttempts` / `agent.emptyRetryDelayMs`: retries when the provider returns an empty stream (HTTP 200, no content). First retry is immediate, later ones back off exponentially, capped at 8s.
62
65
  - `agent.requestTimeoutMs` / `agent.streamIdleTimeoutMs`: abort a request that never starts responding, or a stream that goes quiet mid-response; the run then retries it like an empty reply. 0 disables. Env overrides: `MIN_AGENT_REQUEST_TIMEOUT_MS`, `MIN_AGENT_STREAM_IDLE_TIMEOUT_MS`.
63
- - `agent.subAgentMaxSteps` / `agent.exploreMaxSteps`: step ceilings for the `task` and `explore` sub-agents. Sub-agents share the parent's research budget.
64
- - `agent.researchSteerAfter` / `researchStopAfter`: research *rounds that returned no new source* before steering / dropping `search_web` and `web_fetch`; `researchTotalCap` is the hard number of research calls per turn. Productive research (new URLs or domains each round) is not penalised.
66
+ - `agent.subAgentMaxSteps` / `agent.exploreMaxSteps`: step ceilings for the `task` and `explore` sub-agents (defaults 40 and 30). Each sub-agent has its own research and repeat budget (same thresholds as the parent, empty counters). Child searches do not spend the parent's allowance, and parallel tasks do not mix in-flight counts. The child returns a structured report (conclusion, files changed or inspected, unfinished work, errors), not only its last text.
67
+ - `agent.subAgentModel` / `agent.exploreModel`: optional model ids for those sub-agents. Omit or leave blank to use the parent's model. Use this to send exploration / bulk file work to a cheaper model.
68
+ - `agent.streamChunkSteps`: tool steps in one model request before old tool payloads are pruned and the next request starts. Default 16. Does not inject a continue prompt and does not count toward `maxContinues`. Omit or values below 1 use 16.
69
+ - `agent.researchSteerAfter` / `researchStopAfter`: research *rounds that returned no new source* before steering / stubbing `search_web` and `web_fetch` (the tools stay in the schema so the prompt prefix stays stable); `researchTotalCap` is the hard number of research calls per turn. Productive research (new URLs or domains each round) is not penalised. Further search/fetch calls then return a stop-and-write notice instead of new results.
65
70
  - `tools.bashTimeoutMs`: default kill timeout for `bash` (10 minutes; the model can override per call, 0 disables). On Windows, shell commands prefer Git Bash when `bash` is on PATH; otherwise `cmd.exe`. Timeouts / abort use `taskkill /T` to kill the process tree.
71
+ - `tools.outputMaxLines` / `tools.outputMaxBytes`: how much of a tool result stays in the conversation (default 400 lines / 24KiB). The rest is saved under `~/.min-agent/tool-output/` with a path the model can `read`. Clamped to 20–20000 lines and 1KiB–1MiB. A caller that passes explicit limits (for example a skill) wins over these defaults. Global only (not a project overlay).
72
+ - `tools.mcpTools`: `auto` (default) | `catalog` | `inline`. `auto` inlines MCP server tool schemas up to 8 tools, then switches to the stable pair `mcp_list_tools` / `mcp_call_tool` so adding or removing a server tool does not rewrite the whole tool list. `catalog` always uses that pair; `inline` always sends every schema. Sub-agents follow the same setting. Global only (not a project overlay).
66
73
  - `MIN_AGENT_TRACE=1` logs a request/response summary for every model call (model, message and tool counts, status, time to first byte).
67
74
  - Logs live in `~/.min-agent/logs/min-agent.YYYY-MM-DD.log` (kept 7 days) and are also shipped to a hardcoded Loki endpoint (`POST https://loki.lonae.com/loki/api/v1/push`, labels `job=min-agent` + `level`). Shipping is fire-and-forget (batched, 2s); the file log stays the source of truth. There is no config switch for it.
68
75
  - Web search/fetch that has not yet produced the requested output still continues even when `autoContinue` is false; further search/fetch calls return a stop-and-write notice instead of new results.
@@ -152,4 +159,4 @@ Array of `{ "content": string, "tags": string[], "created": string }`. Prefer me
152
159
 
153
160
  ## HTTP (only if the user is running `min-agent serve`)
154
161
 
155
- Skills: `GET /v1/skills`, `GET /v1/skills/:name`, `POST /v1/skills/reload`, `POST /v1/skills/:name/enable|disable` with `{ "scope": "project"|"global" }`. MCP enable/disable similarly. Thinking: `GET/POST /v1/thinking`. Memory switch: `GET/POST /v1/memory/mode`. Ollama context level: `GET/POST /v1/context` with `{ "level": "8k" }` or `"auto"`. Full list is `docs/API.md` in the min-agent package; do not treat that file as this skill's replacement.
162
+ Skills: `GET /v1/skills`, `GET /v1/skills/:name`, `POST /v1/skills/reload`, `POST /v1/skills/:name/enable|disable` with `{ "scope": "project"|"global" }` (`project` without `.min-agent/` → `400 project_dir_missing`). `stale_disabled` entries are `{ "name", "in": ["global_disabled"|"project_disabled"|"project_enabled"] }`; enabling an orphan name clears it from every list (`cleared_stale` in the response). MCP enable/disable similarly. Thinking: `GET/POST /v1/thinking`. Memory switch: `GET/POST /v1/memory/mode`. Ollama context level: `GET/POST /v1/context` with `{ "level": "8k" }` or `"auto"`. Full list is `docs/API.md` in the min-agent package; do not treat that file as this skill's replacement.