@mu-agent/mu 0.2.4 → 0.3.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 +24 -14
- package/dist/index.js +358 -285
- package/dist/mu.js +553 -450
- package/dist/types/ai/errors.d.ts +2 -0
- package/dist/types/ai/index.d.ts +5 -4
- package/dist/types/ai/json.d.ts +11 -0
- package/dist/types/ai/provider-config.d.ts +2 -0
- package/dist/types/ai/providers/citation-markup.d.ts +12 -0
- package/dist/types/ai/providers/inception.d.ts +3 -0
- package/dist/types/ai/retry.d.ts +7 -0
- package/dist/types/ai/sse.d.ts +2 -1
- package/dist/types/ai/thinking.d.ts +2 -0
- package/dist/types/ai/types.d.ts +5 -0
- package/dist/types/core/checkpoint.d.ts +4 -1
- package/dist/types/core/commands.d.ts +6 -1
- package/dist/types/core/events.d.ts +37 -0
- package/dist/types/core/extensions.d.ts +10 -1
- package/dist/types/core/index.d.ts +6 -5
- package/dist/types/core/loop.d.ts +9 -9
- package/dist/types/core/messages.d.ts +3 -1
- package/dist/types/core/permission.d.ts +28 -1
- package/dist/types/core/process.d.ts +13 -2
- package/dist/types/core/profile.d.ts +18 -2
- package/dist/types/core/session.d.ts +5 -0
- package/dist/types/core/testing/fake-provider.d.ts +3 -1
- package/dist/types/core/tools.d.ts +6 -2
- package/dist/types/core/wire.d.ts +16 -0
- package/dist/types/profile-browser/actions/input.d.ts +1 -0
- package/dist/types/profile-browser/agent/handoff.d.ts +6 -1
- package/dist/types/profile-browser/agent/permissions.d.ts +1 -0
- package/dist/types/profile-browser/index.d.ts +0 -2
- package/dist/types/profile-coding/checkpoint.d.ts +39 -5
- package/dist/types/profile-coding/context.d.ts +1 -0
- package/dist/types/profile-coding/index.d.ts +5 -7
- package/dist/types/profile-coding/permissions.d.ts +17 -1
- package/dist/types/profile-coding/prompts.d.ts +1 -2
- package/dist/types/profile-coding/shell-permissions.d.ts +5 -0
- package/dist/types/profile-coding/terminal-text.d.ts +1 -0
- package/dist/types/profile-coding/tools/bash.d.ts +7 -2
- package/dist/types/profile-coding/tools/diff.d.ts +8 -0
- package/dist/types/profile-coding/tools/files.d.ts +5 -0
- package/dist/types/profile-coding/tools/tasks.d.ts +2 -1
- package/dist/types/profile-coding/track-commands.d.ts +9 -0
- package/dist/types/sdk/agent.d.ts +80 -10
- package/dist/types/sdk/commands.d.ts +15 -15
- package/dist/types/sdk/cost-report.d.ts +64 -0
- package/dist/types/sdk/file-store.d.ts +3 -0
- package/dist/types/sdk/index.d.ts +18 -14
- package/dist/types/sdk/markdown-commands.d.ts +3 -1
- package/dist/types/sdk/mcp-catalog.d.ts +36 -0
- package/dist/types/sdk/mcp-config.d.ts +61 -0
- package/dist/types/sdk/mcp.d.ts +12 -18
- package/dist/types/sdk/permission-gate.d.ts +15 -0
- package/dist/types/sdk/recall.d.ts +1 -1
- package/dist/types/sdk/session-replacements.d.ts +21 -0
- package/dist/types/sdk/side.d.ts +1 -0
- package/dist/types/sdk/skills.d.ts +57 -5
- package/dist/types/sdk/structured-output.d.ts +8 -1
- package/dist/types/sdk/subagents.d.ts +53 -5
- package/dist/types/sdk/tool.d.ts +5 -1
- package/dist/types/sdk/turn-changes.d.ts +18 -0
- package/package.json +1 -1
- package/dist/types/sdk/todo.d.ts +0 -16
package/README.md
CHANGED
|
@@ -56,12 +56,13 @@ The CLI loads the coding profile by default. It includes:
|
|
|
56
56
|
- read-before-write checks and diff previews for approvals;
|
|
57
57
|
- shadow-git workspace checkpoints with `/undo`, `/redo`, `/fork`, and `/diff`;
|
|
58
58
|
- durable sessions, automatic context compaction, and Markdown transcript export;
|
|
59
|
-
- managed `task` delegation and coding-specific `
|
|
59
|
+
- managed `task` delegation when you ask for subagents, and coding-specific `counsel` and
|
|
60
|
+
`recall` subagents.
|
|
60
61
|
|
|
61
62
|
Explicitly ask **“Ask Recall why we rejected SQLite”** to investigate retained project
|
|
62
63
|
sessions, including compacted history and alternate branches. Recall has only read-only
|
|
63
|
-
history tools, no workspace or network tools, and cites session/entry references. It
|
|
64
|
-
|
|
64
|
+
history tools, no workspace or network tools, and cites session/entry references. It runs on
|
|
65
|
+
the current model at `low` reasoning unless pinned under `/subagents`. Explicit-only
|
|
65
66
|
invocation is a parent-model instruction, not a classifier or runtime authorization gate.
|
|
66
67
|
Separate project directories, including other clones/worktrees, are not automatically joined.
|
|
67
68
|
|
|
@@ -79,15 +80,17 @@ user's repository.
|
|
|
79
80
|
|---|---|
|
|
80
81
|
| `/login`, `/logout` | Add or remove credentials stored by Mu |
|
|
81
82
|
| `/model` | Select the active model |
|
|
83
|
+
| `/thinking [level]` | Set the active model's reasoning level (same as ctrl+t); bare, it lists the levels |
|
|
82
84
|
| `/permissions` | Change the current permission mode |
|
|
83
85
|
| `/resume`, `/new`, `/rename` | Open, create, or name conversations |
|
|
84
86
|
| `/compact [focus]` | Compact the active model context |
|
|
85
87
|
| `/undo`, `/redo`, `/fork`, `/diff` | Navigate the session and workspace history |
|
|
86
88
|
| `/export [path.md]` | Export the complete active branch |
|
|
87
89
|
| `/btw [question]` | Open an ephemeral read-only side conversation |
|
|
90
|
+
| `/skills` | List skills and set each on, manual or off |
|
|
88
91
|
| `/instructions [reload]`, `/reload` | Inspect or reload repository instructions |
|
|
89
|
-
| `/subagents` | List subagents,
|
|
90
|
-
| `/cost` | Show
|
|
92
|
+
| `/subagents` | List subagents, the model and reasoning level each runs on, and how to invoke them; choose a different model or level for any of them (coding profile) |
|
|
93
|
+
| `/cost` | Show spend by source and model, and what fills the context |
|
|
91
94
|
| `/keybindings` | Show Mu-specific keyboard controls |
|
|
92
95
|
|
|
93
96
|
During a run, Enter steers the current turn and Tab queues a follow-up. `Ctrl+O` opens
|
|
@@ -98,15 +101,19 @@ are still recorded as session context.
|
|
|
98
101
|
## Providers
|
|
99
102
|
|
|
100
103
|
Account sign-in is available for OpenAI Codex/ChatGPT, GitHub Copilot, Kimi Code,
|
|
101
|
-
OpenRouter, and xAI. API-key routes include Anthropic, OpenAI, Google,
|
|
102
|
-
Qwen Token Plan, and providers supported by Mu's shared OpenAI-compatible
|
|
103
|
-
Gemini-compatible transports. Anthropic subscription OAuth is not supported.
|
|
104
|
+
OpenRouter, and xAI. API-key routes include Anthropic, OpenAI, Google, Inception Labs,
|
|
105
|
+
Z.AI Coding Plan, Qwen Token Plan, and providers supported by Mu's shared OpenAI-compatible
|
|
106
|
+
and Gemini-compatible transports. Anthropic subscription OAuth is not supported.
|
|
104
107
|
|
|
105
108
|
OpenAI API-key models use the `openai/*` namespace. ChatGPT-plan models use
|
|
106
109
|
`openai-codex/*`; the credentials are separate and may coexist. Both routes receive
|
|
107
110
|
provider-hosted web search automatically. Other providers currently run without web
|
|
108
111
|
search.
|
|
109
112
|
|
|
113
|
+
For Inception Labs, use `/login` → API key → Inception Labs or set `INCEPTION_API_KEY`,
|
|
114
|
+
then run `mu --model inception/mercury-3`. Mercury 2.5 and Mercury 2 are also supported;
|
|
115
|
+
`/thinking` selects `instant`, `low`, `medium`, or `high` reasoning.
|
|
116
|
+
|
|
110
117
|
A local `llama-server` is discovered at `http://127.0.0.1:8000` and exposed as
|
|
111
118
|
`llama-cpp/<alias>`. Set `LLAMA_CPP_BASE_URL` or `LLAMA_CPP_API_KEY` when needed.
|
|
112
119
|
|
|
@@ -137,8 +144,10 @@ The CLI also discovers:
|
|
|
137
144
|
|
|
138
145
|
- TypeScript extensions in `~/.mu/extensions` and `.mu/extensions`;
|
|
139
146
|
- Markdown slash commands in `~/.mu/commands` and `.mu/commands`;
|
|
140
|
-
- skills in
|
|
141
|
-
|
|
147
|
+
- skills in `.mu/skills`, `.agents/skills`, `.claude/skills`, `.codex/skills` and
|
|
148
|
+
`.opencode/skills` (project and home);
|
|
149
|
+
- MCP servers from user and project `.mu/config.json`, and those configured for Claude Code,
|
|
150
|
+
Codex, Cursor, opencode, Gemini and VS Code.
|
|
142
151
|
|
|
143
152
|
```json
|
|
144
153
|
{
|
|
@@ -146,14 +155,15 @@ The CLI also discovers:
|
|
|
146
155
|
"docs": {
|
|
147
156
|
"command": "bunx",
|
|
148
157
|
"args": ["-y", "your-mcp-server"],
|
|
149
|
-
"env": { "SERVER_TOKEN": "
|
|
158
|
+
"env": { "SERVER_TOKEN": "${DOCS_TOKEN}" }
|
|
150
159
|
}
|
|
151
160
|
}
|
|
152
161
|
}
|
|
153
162
|
```
|
|
154
163
|
|
|
155
|
-
|
|
156
|
-
paths as local tools.
|
|
164
|
+
The model opens a server to see its tools and calls them through `mcp_call`, which uses the
|
|
165
|
+
same permission, event, and abort paths as local tools. Project-defined servers need
|
|
166
|
+
`/mcp approve <name>`; `/mcp` and `/skills` show what was found.
|
|
157
167
|
|
|
158
168
|
## TypeScript SDK
|
|
159
169
|
|
|
@@ -185,7 +195,7 @@ console.log(result.reason, result.usage);
|
|
|
185
195
|
|
|
186
196
|
`createAgent()` adds managed `task` delegation. With `profile: "coding"`, it also loads
|
|
187
197
|
the shipped coding tools, project instructions, permissions, checkpoints, background
|
|
188
|
-
runtime, and `
|
|
198
|
+
runtime, and `counsel`/`recall` specialists. Recall can access only history in the
|
|
189
199
|
configured session store; SDK agents use an in-memory store by default.
|
|
190
200
|
|
|
191
201
|
```ts
|