min-agent 0.5.0 → 0.6.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/README.md +32 -18
- package/dist/cli.js +538 -12
- package/docs/API.md +25 -8
- package/package.json +6 -6
- package/skills/self-config/SKILL.md +7 -3
- package/skills/self-config/reference.md +8 -4
- package/dist/agent.js +0 -1342
- package/dist/assistant-stream.js +0 -131
- package/dist/cli/commands/chat.js +0 -13
- package/dist/cli/commands/exec.js +0 -35
- package/dist/cli/commands/history.js +0 -58
- package/dist/cli/commands/index.js +0 -241
- package/dist/cli/commands/init.js +0 -18
- package/dist/cli/commands/mcp.js +0 -173
- package/dist/cli/commands/memory.js +0 -87
- package/dist/cli/commands/models.js +0 -21
- package/dist/cli/commands/permission.js +0 -12
- package/dist/cli/commands/rules.js +0 -33
- package/dist/cli/commands/sandbox.js +0 -13
- package/dist/cli/commands/serve.js +0 -9
- package/dist/cli/commands/setup.js +0 -4
- package/dist/cli/commands/shared.js +0 -16
- package/dist/cli/commands/skills.js +0 -119
- package/dist/cli/commands/think.js +0 -12
- package/dist/cli/commands/update.js +0 -7
- package/dist/cli/commands/write-config.js +0 -52
- package/dist/cli/errors.js +0 -36
- package/dist/cli/exec-prompt.js +0 -26
- package/dist/cli/option-helpers.js +0 -65
- package/dist/cli/program.js +0 -217
- package/dist/clipboard.js +0 -142
- package/dist/code-mode.js +0 -184
- package/dist/compaction.js +0 -644
- package/dist/config.js +0 -470
- package/dist/confirm.js +0 -172
- package/dist/context-window.js +0 -246
- package/dist/doom-loop.js +0 -278
- package/dist/fetch-timeout.js +0 -152
- package/dist/http-approvals.js +0 -60
- package/dist/http.js +0 -119
- package/dist/instructions.js +0 -196
- package/dist/logger.js +0 -95
- package/dist/markdown.js +0 -259
- package/dist/mcp.js +0 -1036
- package/dist/memory-cli.js +0 -33
- package/dist/memory.js +0 -295
- package/dist/model-catalog.js +0 -285
- package/dist/output.js +0 -76
- package/dist/paste-handler.js +0 -41
- package/dist/permission-cli.js +0 -40
- package/dist/plugins.js +0 -131
- package/dist/pricing.js +0 -119
- package/dist/provider.js +0 -63
- package/dist/question-format.js +0 -60
- package/dist/reasoning-stream.js +0 -158
- package/dist/sandbox-cli.js +0 -79
- package/dist/sandbox.js +0 -403
- package/dist/save-throttle.js +0 -45
- package/dist/scope.js +0 -23
- package/dist/serve/common.js +0 -425
- package/dist/serve/routes-chat.js +0 -367
- package/dist/serve/routes-mcp.js +0 -212
- package/dist/serve/routes-memory.js +0 -95
- package/dist/serve/routes-meta.js +0 -233
- package/dist/serve/routes-sessions.js +0 -61
- package/dist/serve/routes-skills.js +0 -70
- package/dist/serve.js +0 -138
- package/dist/sessions.js +0 -265
- package/dist/skills.js +0 -599
- package/dist/structured-output.js +0 -29
- package/dist/synthetic.js +0 -7
- package/dist/think-cli.js +0 -36
- package/dist/thinking-wire.js +0 -228
- package/dist/thinking.js +0 -142
- package/dist/title-gen.js +0 -55
- package/dist/token-display.js +0 -39
- package/dist/tool-display.js +0 -178
- package/dist/tool-output.js +0 -126
- package/dist/tools/apply_patch.js +0 -265
- package/dist/tools/atomic-file.js +0 -35
- package/dist/tools/backend.js +0 -61
- package/dist/tools/bash.js +0 -231
- package/dist/tools/code_search.js +0 -98
- package/dist/tools/edit.js +0 -68
- package/dist/tools/explore.js +0 -232
- package/dist/tools/glob.js +0 -40
- package/dist/tools/grep.js +0 -174
- package/dist/tools/index.js +0 -34
- package/dist/tools/question.js +0 -54
- package/dist/tools/read.js +0 -109
- package/dist/tools/search-searxng.js +0 -223
- package/dist/tools/search-serper.js +0 -189
- package/dist/tools/task.js +0 -165
- package/dist/tools/todo.js +0 -213
- package/dist/tools/web_fetch.js +0 -195
- package/dist/tools/web_search.js +0 -228
- package/dist/tools/write.js +0 -55
- package/dist/tui/App.js +0 -126
- package/dist/tui/ConfirmBar.js +0 -66
- package/dist/tui/InputBar.js +0 -616
- package/dist/tui/MessageList.js +0 -718
- package/dist/tui/ModelPicker.js +0 -113
- package/dist/tui/QuestionBar.js +0 -136
- package/dist/tui/SessionPicker.js +0 -79
- package/dist/tui/Spinner.js +0 -6
- package/dist/tui/StatusBar.js +0 -22
- package/dist/tui/ThinkPicker.js +0 -77
- package/dist/tui/agent-runner.js +0 -223
- package/dist/tui/bracketed-paste.js +0 -37
- package/dist/tui/caret-pos.js +0 -179
- package/dist/tui/caret.js +0 -69
- package/dist/tui/click-count.js +0 -13
- package/dist/tui/diff-view.js +0 -61
- package/dist/tui/drag-state.js +0 -49
- package/dist/tui/hydrate.js +0 -129
- package/dist/tui/index.js +0 -258
- package/dist/tui/input-history.js +0 -125
- package/dist/tui/layout.js +0 -105
- package/dist/tui/mouse.js +0 -46
- package/dist/tui/overlay-input.js +0 -12
- package/dist/tui/paste-draft.js +0 -173
- package/dist/tui/prompt-queue.js +0 -24
- package/dist/tui/selection.js +0 -232
- package/dist/tui/session-switch.js +0 -28
- package/dist/tui/slash-commands.js +0 -123
- package/dist/tui/slash-handler.js +0 -589
- package/dist/tui/text-width.js +0 -113
- package/dist/tui/theme.js +0 -12
- package/dist/tui/token-info.js +0 -7
- package/dist/tui/tool-children.js +0 -19
- package/dist/tui/types.js +0 -1
- package/dist/tui/undo-stack.js +0 -14
- package/dist/tui/use-sgr-mouse.js +0 -29
- package/dist/tui-chat.js +0 -456
- package/dist/updater.js +0 -116
- package/dist/xml-search.js +0 -194
- package/docs/superpowers/plans/2026-08-16-batch1-tui-improvements.md +0 -1510
- package/docs/superpowers/plans/2026-08-16-batch2-cli-tools-api.md +0 -2105
- package/docs/superpowers/plans/2026-08-16-batch3-config-engineering.md +0 -1595
- package/docs/superpowers/plans/2026-08-16-input-caret.md +0 -782
- package/docs/superpowers/plans/2026-08-20-tui-completeness.md +0 -873
- package/docs/superpowers/plans/2026-08-20-unified-tui-default.md +0 -631
- package/docs/superpowers/plans/2026-08-23-input-paste-attachments.md +0 -475
- package/docs/superpowers/plans/2026-08-23-thinking-wire-profile.md +0 -450
- package/docs/superpowers/specs/2026-08-16-batch1-tui-improvements-design.md +0 -183
- package/docs/superpowers/specs/2026-08-16-batch2-cli-tools-api-design.md +0 -220
- package/docs/superpowers/specs/2026-08-16-batch3-config-engineering-design.md +0 -196
- package/docs/superpowers/specs/2026-08-16-input-caret-design.md +0 -63
- package/docs/superpowers/specs/2026-08-17-mouse-selection-design.md +0 -116
- package/docs/superpowers/specs/2026-08-20-config-http-alignment-design.md +0 -47
- package/docs/superpowers/specs/2026-08-20-mcp-plugins-alignment-design.md +0 -37
- package/docs/superpowers/specs/2026-08-20-sandbox-permissions-design.md +0 -68
- package/docs/superpowers/specs/2026-08-20-tui-completeness-design.md +0 -273
- package/docs/superpowers/specs/2026-08-20-unified-tui-default-design.md +0 -165
- package/docs/superpowers/specs/2026-08-23-input-paste-attachments-design.md +0 -174
- package/docs/superpowers/specs/2026-08-23-thinking-wire-profile-design.md +0 -140
package/README.md
CHANGED
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
npm install -g min-agent
|
|
36
|
-
min-agent
|
|
37
|
-
min-agent
|
|
36
|
+
min-agent # Start chatting (a built-in model is ready)
|
|
37
|
+
min-agent setup # Optional: add or switch your own AI provider
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
## Basic Usage
|
|
@@ -59,13 +59,13 @@ min-agent --provider anthropic "your message"
|
|
|
59
59
|
|
|
60
60
|
## While Chatting
|
|
61
61
|
|
|
62
|
-
Type `/` to open a command menu.
|
|
62
|
+
Type `/` to open a command menu; **↑ / ↓** moves the highlight. With an empty input, **↑ / ↓** recalls previous messages.
|
|
63
63
|
|
|
64
64
|
| Command | Description |
|
|
65
65
|
|---|---|
|
|
66
66
|
| `/new` | Start a new session |
|
|
67
67
|
| `/model` | Switch model |
|
|
68
|
-
| `/provider` | Switch provider |
|
|
68
|
+
| `/provider` | Switch provider (interactive picker) |
|
|
69
69
|
| `/plan` | Toggle plan mode (look, don't touch) |
|
|
70
70
|
| `/think` | Choose thinking intensity |
|
|
71
71
|
| `/memory` | Turn memory on/off, or save a note |
|
|
@@ -76,19 +76,20 @@ Type `/` to open a command menu. Use **↑ / ↓** to recall previous messages.
|
|
|
76
76
|
| `/mcp` | Show connected MCP servers |
|
|
77
77
|
| `/skills` | Manage skills |
|
|
78
78
|
| `/tokens` | Usage and estimated cost |
|
|
79
|
+
| `/ctx` | Choose local-model context window |
|
|
79
80
|
| `/help` | Show all commands |
|
|
80
81
|
| `/exit` | Exit |
|
|
81
82
|
|
|
82
|
-
Shortcuts: **Ctrl+C** clears the input (press twice to exit) · **Ctrl+V** pastes an image · a multi-line paste becomes a snippet · **Ctrl+B** selects text to copy · mouse drag-select also copies on release · click a tool or thinking block to expand or collapse it.
|
|
83
|
+
Shortcuts: **Ctrl+C** clears the input (press twice to exit) · **Ctrl+V** pastes an image · a multi-line paste becomes a snippet · **Ctrl+B** selects text to copy · mouse drag-select also copies on release · click a tool or thinking block to expand or collapse it · when it asks you to choose, use **↑/↓** and **Enter** (Space checks items in multi-select).
|
|
83
84
|
|
|
84
85
|
## Staying in Control
|
|
85
86
|
|
|
86
|
-
min-agent asks for confirmation before risky actions by default.
|
|
87
|
+
min-agent asks for confirmation before risky actions by default. File edits are auto-approved unless you change this.
|
|
87
88
|
|
|
88
89
|
```bash
|
|
89
90
|
min-agent permission # Show current setting
|
|
90
|
-
min-agent --permission ask # Confirm before risky actions
|
|
91
|
-
min-agent --permission accept-edits # Auto-approve file edits only
|
|
91
|
+
min-agent --permission ask # Confirm before risky actions
|
|
92
|
+
min-agent --permission accept-edits # Auto-approve file edits only (default)
|
|
92
93
|
min-agent --permission allow-all # Auto-approve everything — use with care
|
|
93
94
|
```
|
|
94
95
|
|
|
@@ -115,7 +116,13 @@ In chat, `/memory on` or `/memory off` toggles it; `/memory` lists notes; `/memo
|
|
|
115
116
|
|
|
116
117
|
## Configuration
|
|
117
118
|
|
|
118
|
-
Run `min-agent setup`
|
|
119
|
+
Run `min-agent setup` to add or switch AI providers. If you skip it, min-agent uses a built-in OpenRouter model (`openrouter/free`). Your own providers in `~/.min-agent/config.json` always take over.
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
min-agent setup --type ollama
|
|
123
|
+
min-agent setup --type openai-compatible --url https://api.example.com/v1 --api-key "$KEY" --name groq --default-model llama-3.1-70b
|
|
124
|
+
min-agent setup --switch ollama
|
|
125
|
+
```
|
|
119
126
|
|
|
120
127
|
Settings live in `~/.min-agent/config.json` (global). A project can have its own `.min-agent/config.json` that only applies there.
|
|
121
128
|
|
|
@@ -151,8 +158,8 @@ MIT
|
|
|
151
158
|
|
|
152
159
|
```bash
|
|
153
160
|
npm install -g min-agent
|
|
154
|
-
min-agent
|
|
155
|
-
min-agent
|
|
161
|
+
min-agent # 开始对话(已内置可用模型)
|
|
162
|
+
min-agent setup # 可选:添加或切换你自己的 AI 服务商
|
|
156
163
|
```
|
|
157
164
|
|
|
158
165
|
## 基本用法
|
|
@@ -177,13 +184,13 @@ min-agent --provider anthropic "你的消息"
|
|
|
177
184
|
|
|
178
185
|
## 对话中的操作
|
|
179
186
|
|
|
180
|
-
输入 `/`
|
|
187
|
+
输入 `/` 弹出命令菜单,用 **↑ / ↓** 移动高亮。输入框为空时,**↑ / ↓** 翻看之前的消息。
|
|
181
188
|
|
|
182
189
|
| 命令 | 说明 |
|
|
183
190
|
|---|---|
|
|
184
191
|
| `/new` | 开始新会话 |
|
|
185
192
|
| `/model` | 切换模型 |
|
|
186
|
-
| `/provider` |
|
|
193
|
+
| `/provider` | 交互式切换服务商 |
|
|
187
194
|
| `/plan` | 切换"计划模式"(只看不改) |
|
|
188
195
|
| `/think` | 选择思考强度 |
|
|
189
196
|
| `/memory` | 开关记忆,或保存一条 |
|
|
@@ -194,19 +201,20 @@ min-agent --provider anthropic "你的消息"
|
|
|
194
201
|
| `/mcp` | 查看已连接的 MCP 服务 |
|
|
195
202
|
| `/skills` | 管理技能 |
|
|
196
203
|
| `/tokens` | 查看用量与预估费用 |
|
|
204
|
+
| `/ctx` | 选择本地模型上下文窗口 |
|
|
197
205
|
| `/help` | 查看全部命令 |
|
|
198
206
|
| `/exit` | 退出 |
|
|
199
207
|
|
|
200
|
-
快捷键:**Ctrl+C** 清空输入框(连按两次退出)· **Ctrl+V** 粘贴图片 · 多行粘贴会收成片段 · **Ctrl+B** 选中文本以复制 · 也支持鼠标拖拽选中并自动复制 ·
|
|
208
|
+
快捷键:**Ctrl+C** 清空输入框(连按两次退出)· **Ctrl+V** 粘贴图片 · 多行粘贴会收成片段 · **Ctrl+B** 选中文本以复制 · 也支持鼠标拖拽选中并自动复制 · 点击工具或思考块可展开或收起 · 需要你做选择时用 **↑/↓** 移动、**Enter** 确认(多选时用空格勾选)。
|
|
201
209
|
|
|
202
210
|
## 掌控风险
|
|
203
211
|
|
|
204
|
-
min-agent
|
|
212
|
+
min-agent 默认自动批准文件修改,危险命令仍会询问。可按需调整:
|
|
205
213
|
|
|
206
214
|
```bash
|
|
207
215
|
min-agent permission # 查看当前设置
|
|
208
|
-
min-agent --permission ask #
|
|
209
|
-
min-agent --permission accept-edits #
|
|
216
|
+
min-agent --permission ask # 有风险操作前先询问
|
|
217
|
+
min-agent --permission accept-edits # 仅自动批准文件修改(默认)
|
|
210
218
|
min-agent --permission allow-all # 自动批准所有操作 —— 请谨慎使用
|
|
211
219
|
```
|
|
212
220
|
|
|
@@ -233,7 +241,13 @@ min-agent memory add "prefer bun"
|
|
|
233
241
|
|
|
234
242
|
## 配置
|
|
235
243
|
|
|
236
|
-
|
|
244
|
+
未配置服务商时,min-agent 会使用内置的 OpenRouter 模型(`openrouter/free`)。运行 `min-agent setup` 可添加或切换你自己的服务商;写在 `~/.min-agent/config.json` 里的配置优先于内置预设。
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
min-agent setup --type ollama
|
|
248
|
+
min-agent setup --type openai-compatible --url https://api.example.com/v1 --api-key "$KEY" --name groq --default-model llama-3.1-70b
|
|
249
|
+
min-agent setup --switch ollama
|
|
250
|
+
```
|
|
237
251
|
|
|
238
252
|
配置保存在 `~/.min-agent/config.json`(全局生效)。也可以在某个项目下单独创建 `.min-agent/config.json`,仅对该项目生效。
|
|
239
253
|
|