min-agent 0.4.1 → 0.5.1
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/README.md +46 -2
- package/dist/agent.js +89 -29
- package/dist/cli/commands/chat.js +3 -0
- package/dist/cli/commands/ctx.js +7 -0
- package/dist/cli/commands/exec.js +3 -0
- package/dist/cli/commands/index.js +32 -7
- package/dist/cli/commands/memory.js +33 -15
- package/dist/cli/commands/setup.js +55 -3
- package/dist/cli/commands/shared.js +10 -1
- package/dist/cli/commands/think.js +12 -0
- package/dist/cli/commands/write-config.js +22 -0
- package/dist/cli/option-helpers.js +13 -1
- package/dist/cli/program.js +57 -14
- package/dist/cli/setup/detect.js +17 -0
- package/dist/cli/setup/flags.js +12 -0
- package/dist/cli/setup/flow.js +108 -0
- package/dist/cli/setup/provider-form.js +102 -0
- package/dist/cli/setup/ui.js +534 -0
- package/dist/code-mode.js +1 -1
- package/dist/config.js +93 -159
- package/dist/context-window.js +39 -49
- package/dist/ctx-cli.js +30 -0
- package/dist/ctx.js +80 -0
- package/dist/memory-cli.js +33 -0
- package/dist/memory.js +127 -46
- package/dist/model-catalog.js +285 -0
- package/dist/ollama-model.js +234 -0
- package/dist/ollama-openai-bridge.js +383 -0
- package/dist/permission-cli.js +1 -4
- package/dist/provider.js +4 -1
- package/dist/reasoning-stream.js +158 -0
- package/dist/sandbox-cli.js +1 -4
- package/dist/scope.js +23 -0
- package/dist/serve/common.js +22 -1
- package/dist/serve/routes-chat.js +21 -1
- package/dist/serve/routes-memory.js +31 -2
- package/dist/serve/routes-meta.js +69 -6
- package/dist/think-cli.js +36 -0
- package/dist/thinking-wire.js +239 -0
- package/dist/thinking.js +166 -0
- package/dist/token-display.js +10 -7
- package/dist/tools/todo.js +22 -8
- package/dist/tui/App.js +48 -8
- package/dist/tui/CtxPicker.js +68 -0
- package/dist/tui/InputBar.js +112 -37
- package/dist/tui/MessageList.js +53 -22
- package/dist/tui/StatusBar.js +7 -3
- package/dist/tui/ThinkPicker.js +75 -0
- package/dist/tui/bracketed-paste.js +37 -0
- package/dist/tui/caret-pos.js +10 -8
- package/dist/tui/index.js +13 -1
- package/dist/tui/layout.js +17 -0
- package/dist/tui/overlay-input.js +12 -0
- package/dist/tui/paste-draft.js +173 -0
- package/dist/tui/selection.js +8 -2
- package/dist/tui/slash-commands.js +24 -1
- package/dist/tui/slash-handler.js +88 -18
- package/dist/tui/text-width.js +6 -6
- package/dist/tui-chat.js +85 -7
- package/docs/API.md +69 -6
- package/docs/superpowers/plans/2026-08-23-cli-setup.md +501 -0
- package/docs/superpowers/plans/2026-08-23-input-paste-attachments.md +475 -0
- package/docs/superpowers/plans/2026-08-23-thinking-wire-profile.md +450 -0
- package/docs/superpowers/specs/2026-08-23-cli-setup-design.md +282 -0
- package/docs/superpowers/specs/2026-08-23-input-paste-attachments-design.md +174 -0
- package/docs/superpowers/specs/2026-08-23-thinking-wire-profile-design.md +140 -0
- package/package.json +1 -1
- package/skills/self-config/SKILL.md +7 -4
- package/skills/self-config/reference.md +12 -6
|
@@ -24,6 +24,8 @@ Read this when you need exact keys. Files are strict JSON.
|
|
|
24
24
|
"instructions": ["./docs/rules.md"],
|
|
25
25
|
"disabledSkills": [],
|
|
26
26
|
"permission": "ask",
|
|
27
|
+
"thinking": "max",
|
|
28
|
+
"memory": "on",
|
|
27
29
|
"sandbox": {
|
|
28
30
|
"mode": "off",
|
|
29
31
|
"network": "allow",
|
|
@@ -54,7 +56,9 @@ Read this when you need exact keys. Files are strict JSON.
|
|
|
54
56
|
}
|
|
55
57
|
```
|
|
56
58
|
|
|
57
|
-
- `
|
|
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.
|
|
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
|
+
- `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.
|
|
58
62
|
- `agent.autoContinue` omitted → uses `compaction.autoContinue` (default true).
|
|
59
63
|
- `agent.maxSteps` omitted → no tool-step ceiling.
|
|
60
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.
|
|
@@ -66,14 +70,15 @@ Read this when you need exact keys. Files are strict JSON.
|
|
|
66
70
|
- `MIN_AGENT_TRACE=1` logs a request/response summary for every model call (model, message and tool counts, status, time to first byte).
|
|
67
71
|
- 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.
|
|
68
72
|
- Old single-provider configs migrate on first run; write the `providers` array for new files.
|
|
73
|
+
- Interactive and non-interactive provider setup both go through `min-agent setup`. API keys are written only to the global config.
|
|
69
74
|
|
|
70
75
|
## Project `.min-agent/config.json`
|
|
71
76
|
|
|
72
77
|
Allowed keys (no `providers`, no API keys, no search secrets):
|
|
73
78
|
|
|
74
|
-
`disabledSkills`, `enabledSkills`, `activeProvider`, `defaultModel`, `sampling`, `budget`, `permission`, `sandbox`, `compaction`, `agent`.
|
|
79
|
+
`disabledSkills`, `enabledSkills`, `activeProvider`, `defaultModel`, `sampling`, `budget`, `permission`, `thinking`, `memory`, `sandbox`, `compaction`, `agent`.
|
|
75
80
|
|
|
76
|
-
Present keys overlay the global file. Nested objects `sampling` / `budget` / `sandbox` / `compaction` / `agent` merge per field. `defaultModel` overrides the active provider's model without copying keys.
|
|
81
|
+
Present keys overlay the global file. Nested objects `sampling` / `budget` / `sandbox` / `compaction` / `agent` merge per field. `defaultModel` overrides the active provider's model without copying keys. Writing `thinking` or `memory` to global config also removes the matching project overlay.
|
|
77
82
|
|
|
78
83
|
## `mcp.json`
|
|
79
84
|
|
|
@@ -127,16 +132,17 @@ Default: confirm before run. `readOnly: true` or `dangerous: false` skips confir
|
|
|
127
132
|
|
|
128
133
|
## Memory `memory.json`
|
|
129
134
|
|
|
130
|
-
Array of `{ "content": string, "tags": string[], "created": string }`. Prefer memory tools.
|
|
135
|
+
Array of `{ "content": string, "tags": string[], "created": string }`. Prefer memory tools when `memory` is `on`. Injected as background reference each turn only when enabled, not as pending work. Do not store secrets or API keys. The enable switch lives in config (`memory`), not in this file.
|
|
131
136
|
|
|
132
137
|
## Environment overrides
|
|
133
138
|
|
|
134
139
|
| Variable | Role |
|
|
135
140
|
|----------|------|
|
|
136
|
-
| `MIN_AGENT_CONFIG_DIR` | Replaces `~/.min-agent` |
|
|
141
|
+
| `MIN_AGENT_CONFIG_DIR` | Replaces `~/.min-agent` (includes `model-catalog-cache.json`, `thinking-wire-cache.json`, `ollama-model-cache.json`) |
|
|
137
142
|
| `MIN_AGENT_SKILLS_DIRS` | Replaces user skill roots (path-delimiter separated) |
|
|
138
143
|
| `MIN_AGENT_NO_BUILTIN_SKILLS` | `1` / `true` skips packaged skills |
|
|
139
144
|
| `MIN_AGENT_SANDBOX` / `MIN_AGENT_SANDBOX_NETWORK` | Isolation |
|
|
145
|
+
| `MIN_AGENT_MODELS_API_URL` | Model catalog base (default `https://models.lonae.com`) |
|
|
140
146
|
| `MIN_AGENT_SERPER_API_KEY` | Overrides `serperApiKey` |
|
|
141
147
|
| `MIN_AGENT_SEARXNG_URL` | Overrides `webSearchURL` (SearXNG instead of Serper) |
|
|
142
148
|
| `MIN_AGENT_SEARXNG_FALLBACK_ENGINES` | Default `google,bing`; empty string disables retry |
|
|
@@ -146,4 +152,4 @@ Array of `{ "content": string, "tags": string[], "created": string }`. Prefer me
|
|
|
146
152
|
|
|
147
153
|
## HTTP (only if the user is running `min-agent serve`)
|
|
148
154
|
|
|
149
|
-
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. Full list is `docs/API.md` in the min-agent package; do not treat that file as this skill's replacement.
|
|
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.
|