@mu-agent/mu 0.2.3 → 0.3.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.
Files changed (64) hide show
  1. package/README.md +22 -13
  2. package/dist/index.js +465 -312
  3. package/dist/mu.js +651 -468
  4. package/dist/types/ai/errors.d.ts +2 -0
  5. package/dist/types/ai/index.d.ts +4 -3
  6. package/dist/types/ai/providers/citation-markup.d.ts +12 -0
  7. package/dist/types/ai/providers/inception.d.ts +3 -0
  8. package/dist/types/ai/providers/llama-cpp.d.ts +1 -1
  9. package/dist/types/ai/retry.d.ts +7 -0
  10. package/dist/types/ai/sse.d.ts +2 -1
  11. package/dist/types/ai/thinking.d.ts +2 -0
  12. package/dist/types/ai/types.d.ts +5 -0
  13. package/dist/types/core/checkpoint.d.ts +4 -1
  14. package/dist/types/core/commands.d.ts +3 -0
  15. package/dist/types/core/compaction.d.ts +2 -0
  16. package/dist/types/core/events.d.ts +43 -0
  17. package/dist/types/core/extensions.d.ts +10 -1
  18. package/dist/types/core/index.d.ts +6 -6
  19. package/dist/types/core/loop.d.ts +2 -0
  20. package/dist/types/core/messages.d.ts +3 -1
  21. package/dist/types/core/microcompaction.d.ts +2 -0
  22. package/dist/types/core/permission.d.ts +28 -1
  23. package/dist/types/core/process.d.ts +13 -2
  24. package/dist/types/core/profile.d.ts +12 -2
  25. package/dist/types/core/testing/fake-provider.d.ts +3 -1
  26. package/dist/types/core/tools.d.ts +6 -2
  27. package/dist/types/profile-browser/actions/click.d.ts +1 -0
  28. package/dist/types/profile-browser/actions/input.d.ts +1 -0
  29. package/dist/types/profile-browser/actions/navigate.d.ts +1 -0
  30. package/dist/types/profile-browser/actions/types.d.ts +1 -1
  31. package/dist/types/profile-browser/agent/handoff.d.ts +6 -1
  32. package/dist/types/profile-browser/agent/permissions.d.ts +8 -1
  33. package/dist/types/profile-browser/browser/lease.d.ts +22 -0
  34. package/dist/types/profile-browser/browser/manager.d.ts +9 -0
  35. package/dist/types/profile-browser/browser/tabs.d.ts +7 -1
  36. package/dist/types/profile-browser/index.d.ts +1 -2
  37. package/dist/types/profile-browser/page/model.d.ts +1 -0
  38. package/dist/types/profile-browser/page/text.d.ts +4 -2
  39. package/dist/types/profile-browser/testing/fixture-site.d.ts +1 -0
  40. package/dist/types/profile-browser/tools/shared.d.ts +9 -0
  41. package/dist/types/profile-coding/checkpoint.d.ts +39 -5
  42. package/dist/types/profile-coding/index.d.ts +5 -7
  43. package/dist/types/profile-coding/permissions.d.ts +16 -1
  44. package/dist/types/profile-coding/prompts.d.ts +0 -1
  45. package/dist/types/profile-coding/shell-permissions.d.ts +5 -0
  46. package/dist/types/profile-coding/terminal-text.d.ts +1 -0
  47. package/dist/types/profile-coding/tools/bash.d.ts +7 -2
  48. package/dist/types/profile-coding/tools/diff.d.ts +8 -0
  49. package/dist/types/profile-coding/tools/files.d.ts +5 -0
  50. package/dist/types/profile-coding/tools/tasks.d.ts +2 -1
  51. package/dist/types/profile-coding/track-commands.d.ts +9 -0
  52. package/dist/types/sdk/agent.d.ts +53 -2
  53. package/dist/types/sdk/commands.d.ts +1 -0
  54. package/dist/types/sdk/index.d.ts +14 -12
  55. package/dist/types/sdk/markdown-commands.d.ts +3 -1
  56. package/dist/types/sdk/mcp-catalog.d.ts +36 -0
  57. package/dist/types/sdk/mcp-config.d.ts +61 -0
  58. package/dist/types/sdk/mcp.d.ts +12 -18
  59. package/dist/types/sdk/skills.d.ts +39 -5
  60. package/dist/types/sdk/structured-output.d.ts +8 -1
  61. package/dist/types/sdk/subagents.d.ts +53 -5
  62. package/dist/types/sdk/tool.d.ts +5 -1
  63. package/package.json +1 -1
  64. 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 `search`, `counsel`, and `recall` subagents.
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 uses
64
- Search's same-provider model routing with the current model as fallback. Explicit-only
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,6 +80,7 @@ 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 |
@@ -86,7 +88,7 @@ user's repository.
86
88
  | `/export [path.md]` | Export the complete active branch |
87
89
  | `/btw [question]` | Open an ephemeral read-only side conversation |
88
90
  | `/instructions [reload]`, `/reload` | Inspect or reload repository instructions |
89
- | `/subagents` | List subagents, their roles, and how to invoke them |
91
+ | `/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) |
90
92
  | `/cost` | Show session token and cost totals |
91
93
  | `/keybindings` | Show Mu-specific keyboard controls |
92
94
 
@@ -98,15 +100,19 @@ are still recorded as session context.
98
100
  ## Providers
99
101
 
100
102
  Account sign-in is available for OpenAI Codex/ChatGPT, GitHub Copilot, Kimi Code,
101
- OpenRouter, and xAI. API-key routes include Anthropic, OpenAI, Google, Z.AI Coding Plan,
102
- Qwen Token Plan, and providers supported by Mu's shared OpenAI-compatible and
103
- Gemini-compatible transports. Anthropic subscription OAuth is not supported.
103
+ OpenRouter, and xAI. API-key routes include Anthropic, OpenAI, Google, Inception Labs,
104
+ Z.AI Coding Plan, Qwen Token Plan, and providers supported by Mu's shared OpenAI-compatible
105
+ and Gemini-compatible transports. Anthropic subscription OAuth is not supported.
104
106
 
105
107
  OpenAI API-key models use the `openai/*` namespace. ChatGPT-plan models use
106
108
  `openai-codex/*`; the credentials are separate and may coexist. Both routes receive
107
109
  provider-hosted web search automatically. Other providers currently run without web
108
110
  search.
109
111
 
112
+ For Inception Labs, use `/login` → API key → Inception Labs or set `INCEPTION_API_KEY`,
113
+ then run `mu --model inception/mercury-3`. Mercury 2.5 and Mercury 2 are also supported;
114
+ `/thinking` selects `instant`, `low`, `medium`, or `high` reasoning.
115
+
110
116
  A local `llama-server` is discovered at `http://127.0.0.1:8000` and exposed as
111
117
  `llama-cpp/<alias>`. Set `LLAMA_CPP_BASE_URL` or `LLAMA_CPP_API_KEY` when needed.
112
118
 
@@ -137,8 +143,10 @@ The CLI also discovers:
137
143
 
138
144
  - TypeScript extensions in `~/.mu/extensions` and `.mu/extensions`;
139
145
  - Markdown slash commands in `~/.mu/commands` and `.mu/commands`;
140
- - skills in `~/.mu/skills` and `.mu/skills`;
141
- - MCP servers from user and project `.mu/config.json`.
146
+ - skills in `.mu/skills`, `.agents/skills`, `.claude/skills`, `.codex/skills` and
147
+ `.opencode/skills` (project and home);
148
+ - MCP servers from user and project `.mu/config.json`, and those configured for Claude Code,
149
+ Codex, Cursor, opencode, Gemini and VS Code.
142
150
 
143
151
  ```json
144
152
  {
@@ -146,14 +154,15 @@ The CLI also discovers:
146
154
  "docs": {
147
155
  "command": "bunx",
148
156
  "args": ["-y", "your-mcp-server"],
149
- "env": { "SERVER_TOKEN": "..." }
157
+ "env": { "SERVER_TOKEN": "${DOCS_TOKEN}" }
150
158
  }
151
159
  }
152
160
  }
153
161
  ```
154
162
 
155
- MCP tools are named `mcp_<server>_<tool>` and use the same permission, event, and abort
156
- paths as local tools.
163
+ The model opens a server to see its tools and calls them through `mcp_call`, which uses the
164
+ same permission, event, and abort paths as local tools. Project-defined servers need
165
+ `/mcp approve <name>`; `/mcp` and `/skills` show what was found.
157
166
 
158
167
  ## TypeScript SDK
159
168
 
@@ -185,7 +194,7 @@ console.log(result.reason, result.usage);
185
194
 
186
195
  `createAgent()` adds managed `task` delegation. With `profile: "coding"`, it also loads
187
196
  the shipped coding tools, project instructions, permissions, checkpoints, background
188
- runtime, and `search`/`counsel`/`recall` specialists. Recall can access only history in the
197
+ runtime, and `counsel`/`recall` specialists. Recall can access only history in the
189
198
  configured session store; SDK agents use an in-memory store by default.
190
199
 
191
200
  ```ts