min-agent 3.13.2610240727 → 3.16.2610242304

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 CHANGED
@@ -47,10 +47,13 @@ min-agent models # list the models your provider offers
47
47
  ```bash
48
48
  min-agent "your message" # start a session and send a message (agent mode)
49
49
  min-agent ask "your question" # start in ask mode — web Q&A & search only
50
- min-agent exec "your message" # one-shot question, then exit
51
- min-agent push # shortcut: git commit and push your changes
50
+ min-agent exec "your message" # one-shot question, then exit (--quiet/--json for scripts)
51
+ min-agent push # shortcut: stage all changes, commit and push the current branch
52
52
  min-agent --resume <id> # resume a previous session
53
- min-agent sessions # list saved sessions
53
+ min-agent --continue # resume the most recent session
54
+ min-agent sessions # list saved sessions (--all shows every entry, --json for scripts)
55
+ min-agent models --provider x # list models for a specific provider
56
+ min-agent help [command] # show help for the root or any subcommand
54
57
  min-agent scope global # share one history across projects (default: per working directory)
55
58
  min-agent -i photo.png "..." # attach an image
56
59
  min-agent -m gpt-5.5 "..." # pick a model for one message
@@ -67,7 +70,7 @@ Type `/` to open the command menu; **↑/↓** selects. On an empty input, **↑
67
70
  |---|---|
68
71
  | `/new` · `/sessions` | New session · switch between sessions (`--global` shows global history) |
69
72
  | `/scope` | Where history is saved: per working directory (default) or global |
70
- | `/model` · `/provider` | Switch model / provider |
73
+ | `/model` · `/models` · `/provider` | Current provider's models · every provider's models · switch provider |
71
74
  | `/ask` · `/agent` | Switch to ask (web Q&A) / agent (coding) mode |
72
75
  | `/plan` | Plan mode — look, don't touch |
73
76
  | `/think` · `/ctx` | Thinking intensity · local-model context window |
@@ -80,10 +83,12 @@ Type `/` to open the command menu; **↑/↓** selects. On an empty input, **↑
80
83
 
81
84
  The input box stays live while the agent works: press Enter and the message joins a queue that runs in order once the current turn ends (the status bar and spinner show the backlog). Use `/queue` to inspect it, `/queue rm <n>` to pull one out, `/queue clear` to drop them all; Esc cancels the running turn and drops the queue. Slash commands never enter that queue. A reply that degenerates into repeating the same block of text is cut off automatically, with a notice, and the repetition is not saved to the history. If a change already passed its check but the agent keeps building scratch harnesses or re-verifying it, it is nudged once to wrap up and then stopped, rather than spinning for hours.
82
85
 
83
- Commands that only read state or write config — `/permission`, `/sandbox`, `/memory`, `/plan`, `/ask`, `/agent`, `/reload`, `/rename`, and the picker commands given an argument (`/model <id>`, `/think low`, `/ctx 8k`, …) — run immediately even mid-turn, so a permission change applies to the very next tool call instead of waiting behind the whole turn. Commands that would mutate the conversation or open an overlay (`/undo`, `/new`, `/compact`, `/model`, …) are refused mid-turn with a notice; they never queue as a user message.
86
+ Commands that only read state or write config — `/permission`, `/sandbox`, `/memory`, `/plan`, `/ask`, `/agent`, `/reload`, `/rename`, and the picker commands given an argument (`/model <id>`, `/think low`, `/ctx 8k`, …) — run immediately even mid-turn, so a permission change applies to the very next tool call instead of waiting behind the whole turn. Commands that would mutate the conversation or open an overlay (`/undo`, `/new`, `/compact`, `/model`, `/models`, …) are refused mid-turn with a notice; they never queue as a user message.
84
87
 
85
88
  Shortcuts: **Ctrl+C** clears input (press twice to exit) · **Shift+Enter** / **Ctrl+J** inserts a newline · **Ctrl+V** pastes an image · **Ctrl+B** copies selected text · **Ctrl+O** expands the tool or thinking row in view · click a tool or thinking block to expand it.
86
89
 
90
+ When the agent asks several questions at once they share one panel: a tab strip at the top shows progress (✓ = answered), **Enter** answers the current question and jumps to the next unanswered one, **Tab** / **Shift+Tab** switch between questions (drafts are kept), and the final 提交 page lists every answer — Enter submits them all (unanswered ones count as skipped), **Esc** cancels the whole set. Long prompts and option lists scroll inside the panel instead of filling the screen. In `exec` the questions are asked one after another; type option numbers (`1,3` for multi-select) or leave a line empty to skip. The Web UI shows the same set as one card with a step per question and a summary step that submits everything together.
91
+
87
92
  ## Staying in Control
88
93
 
89
94
  File edits are auto-approved by default; risky actions always ask. When several actions in one step need approval, they're combined into a single prompt instead of a stack of separate ones. Each prompt offers 允许 / 总是允许 / 拒绝 — choosing 总是允许 remembers that action for the current session, so repeated identical commands or MCP tools won't ask again.
@@ -123,12 +128,14 @@ min-agent models # list the models your provider offers
123
128
 
124
129
  `min-agent provider <name>` switches the active provider (add/edit/remove go through `min-agent setup`).
125
130
 
126
- Adding an OpenCode Go / OpenCode Zen endpoint (e.g. `https://opencode.ai/zen/go/v1`) is detected during setup, and every request then carries the `x-opencode-session` header that endpoint requires — one stable id per conversation. Use `--opencode-session` / `--no-opencode-session` to force it on or off (e.g. for a gateway that proxies OpenCode Go under another host).
131
+ Adding an OpenCode Go / OpenCode Zen endpoint (e.g. `https://opencode.ai/zen/go/v1`) is detected during setup. The wizard turns the session id on by default (you can turn it off); every request then carries the `x-opencode-session` header that endpoint requires — one stable id per conversation. Use `--opencode-session` / `--no-opencode-session` to force it on or off (e.g. for a gateway that proxies OpenCode Go under another host).
127
132
 
128
133
  The built-in OpenRouter preset (`openrouter/free`) is never written to disk. Set `MIN_AGENT_BUILTIN_API_KEY` to override it with a key of your own. While the preset is active it can't be edited or switched away from, but adding your own provider takes over automatically; `MIN_AGENT_NO_BUILTIN_PROVIDER=1` disables it outright.
129
134
 
130
135
  Settings live in `~/.min-agent/config.json` (global). Per-project settings go to `~/.min-agent/sessions/<project-key>/config.json` (auto-created; nothing is written inside the project directory).
131
136
 
137
+ `min-agent settings` prints every active setting in one screen — value, where it comes from (default / global / project / env / this run) and which file to edit.
138
+
132
139
  Conversation history is saved per working directory by default, in `~/.min-agent/sessions/<project-key>/sessions/` — still inside the global config dir, never in the project. To share one history across projects, run `min-agent scope global` (or `/scope global`); `min-agent scope` shows the current setting.
133
140
 
134
141
  ## Extending It
@@ -175,10 +182,13 @@ min-agent models # 查看当前服务商可用的模型
175
182
  ```bash
176
183
  min-agent "你的消息" # 进入交互会话并立即发送消息(agent 模式)
177
184
  min-agent ask "你的问题" # 以 ask 模式进入——仅联网问答与搜索
178
- min-agent exec "你的消息" # 单次提问后自动退出
179
- min-agent push # 快捷指令:git 提交并推送代码
185
+ min-agent exec "你的消息" # 单次提问后自动退出(--quiet / --json 适合脚本)
186
+ min-agent push # 快捷指令:暂存全部改动并提交推送当前分支
180
187
  min-agent --resume <id> # 恢复之前的会话
181
- min-agent sessions # 查看已保存的会话
188
+ min-agent --continue # 继续最近一次会话
189
+ min-agent sessions # 查看已保存的会话(--all 显示全部,--json 机器可读输出)
190
+ min-agent models --provider x # 查看指定服务商的模型列表
191
+ min-agent help [命令] # 查看根命令或任意子命令的帮助
182
192
  min-agent scope global # 所有项目共用一个历史(默认按工作目录分别保存)
183
193
  min-agent -i photo.png "..." # 为一条消息附带图片
184
194
  min-agent -m gpt-5.5 "..." # 为一条消息指定模型
@@ -195,7 +205,7 @@ min-agent --provider anthropic "..." # 为一条消息指定服务商
195
205
  |---|---|
196
206
  | `/new` · `/sessions` | 新建会话 · 切换会话(`--global` 查看全局历史) |
197
207
  | `/scope` | 对话历史保存位置:按工作目录(默认)或全局共用 |
198
- | `/model` · `/provider` | 切换模型 / 服务商 |
208
+ | `/model` · `/models` · `/provider` | 当前服务商的模型 · 全部服务商的模型 · 切换服务商 |
199
209
  | `/ask` · `/agent` | 切换 ask(联网问答)/ agent(编码)会话模式 |
200
210
  | `/plan` | 计划模式——只看不改 |
201
211
  | `/think` · `/ctx` | 思考强度 · 本地模型上下文窗口 |
@@ -208,10 +218,12 @@ min-agent --provider anthropic "..." # 为一条消息指定服务商
208
218
 
209
219
  任务执行时输入框依然可用:按 Enter 会把消息排进队列,当前任务结束后按顺序执行(运行提示行显示排队数量)。`/queue` 查看队列,`/queue rm <序号>` 移出一条,`/queue clear` 全部清空;Esc 取消当前任务,并丢弃排队消息。斜杠命令不会进入消息队列。模型输出陷入重复循环(同一段文字连续重复)时会自动截断本轮并提示,重复内容不会写入历史。改动已通过检查后若仍在反复搭临时脚本/重复验证,会先提醒一次收尾,仍未停止则结束本轮,避免长时间空转。
210
220
 
211
- 只读取状态或只写配置的命令——`/permission`、`/sandbox`、`/memory`、`/plan`、`/ask`、`/agent`、`/reload`、`/rename`,以及带参数的选择类命令(`/model <id>`、`/think low`、`/ctx 8k` 等)——在任务执行中也会立即执行:改完确认模式马上对下一次工具调用生效,不必等整轮结束。会改动对话内容或打开浮层的命令(`/undo`、`/new`、`/compact`、`/model` 等)在任务执行中会被拒绝并提示等本轮结束,不会作为用户消息排队。
221
+ 只读取状态或只写配置的命令——`/permission`、`/sandbox`、`/memory`、`/plan`、`/ask`、`/agent`、`/reload`、`/rename`,以及带参数的选择类命令(`/model <id>`、`/think low`、`/ctx 8k` 等)——在任务执行中也会立即执行:改完确认模式马上对下一次工具调用生效,不必等整轮结束。会改动对话内容或打开浮层的命令(`/undo`、`/new`、`/compact`、`/model`、`/models` 等)在任务执行中会被拒绝并提示等本轮结束,不会作为用户消息排队。
212
222
 
213
223
  快捷键:**Ctrl+C** 清空输入(连按两次退出)· **Shift+Enter** / **Ctrl+J** 换行 · **Ctrl+V** 粘贴图片 · **Ctrl+B** 复制选中的文本 · **Ctrl+O** 展开视图中间的工具/思考行 · 点击工具或思考块可展开收起。
214
224
 
225
+ 智能体一次提出多个问题时,会在同一个面板里分页显示:顶部标签栏显示进度(已答的带 ✓),**Enter** 回答当前题并跳到下一道未答的题,**Tab** / **Shift+Tab** 在题目之间切换(填了一半的内容会保留),最后一页「提交」汇总所有回答,按 Enter 一起提交(没答的题算跳过),**Esc** 取消整组。题目或选项太长时,面板内部可以滚动,不会把屏幕撑满。`exec` 模式下则按顺序逐题提问,可以输入编号(多选写成 `1,3`),留空表示跳过该题。Web 界面把整组问题放在一张卡片里分步作答,最后在「汇总」一步统一提交。
226
+
215
227
  ## 掌控风险
216
228
 
217
229
  文件修改默认自动批准,危险操作仍会询问;同一步里有多个操作需要授权时,会合并成一个弹窗逐条列出,而不是弹出一堆。弹窗提供 允许 / 总是允许 / 拒绝 三个选项——选「总是允许」会在本次会话内记住该操作,之后重复的相同命令或 MCP 工具不再询问。
@@ -253,12 +265,14 @@ min-agent models # 查看当前服务商可用的模型
253
265
 
254
266
  `min-agent provider <name>` 切换当前服务商(增、删、改走 `min-agent setup`)。
255
267
 
256
- 添加 OpenCode Go / OpenCode Zen 接口(如 `https://opencode.ai/zen/go/v1`)时会自动识别,之后每次调用都会带上该接口要求的 `x-opencode-session` 头,同一会话固定一个 id。用 `--opencode-session` / `--no-opencode-session` 可强制开启或关闭(例如换了域名的自建网关)。
268
+ 添加 OpenCode Go / OpenCode Zen 接口(如 `https://opencode.ai/zen/go/v1`)时会自动识别。向导里会话编号默认打开,也可以关掉;之后每次调用都会带上该接口要求的 `x-opencode-session` 头,同一会话固定一个 id。用 `--opencode-session` / `--no-opencode-session` 可强制开启或关闭(例如换了域名的自建网关)。
257
269
 
258
270
  min-agent 内置一个免费的 OpenRouter 预设(`openrouter/free`),开箱即用,该预设不会写入配置文件。如果要换成自己的 key,设置 `MIN_AGENT_BUILTIN_API_KEY` 即可覆盖默认 key。预设生效期间不可编辑、不可切换或删除,但添加自己的服务商后会自动接管;`MIN_AGENT_NO_BUILTIN_PROVIDER=1` 可彻底关闭预设。
259
271
 
260
272
  配置保存在 `~/.min-agent/config.json`(全局生效)。项目级配置保存在 `~/.min-agent/sessions/<project-key>/config.json`(自动创建,不会在项目目录里生成任何文件),仅对该项目生效。
261
273
 
274
+ `min-agent settings` 一屏列出所有生效设置——当前值、来源(默认 / 全局 / 项目 / 环境变量 / 本次运行)以及该改哪个文件。
275
+
262
276
  对话历史默认按工作目录保存:`~/.min-agent/sessions/<project-key>/sessions/`,同样在全局配置目录下,不会写进项目目录。想让所有项目共用一个历史,执行 `min-agent scope global`(或对话中 `/scope global`);`min-agent scope` 查看当前设置。
263
277
 
264
278
  ## 扩展能力