@mu-agent/mu 0.0.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.
Files changed (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +81 -0
  3. package/THIRD_PARTY_LICENSES.txt +32 -0
  4. package/dist/index.js +226 -0
  5. package/dist/mu.js +397 -0
  6. package/dist/types/ai/auth.d.ts +2 -0
  7. package/dist/types/ai/catalog.d.ts +20 -0
  8. package/dist/types/ai/cost.d.ts +4 -0
  9. package/dist/types/ai/errors.d.ts +13 -0
  10. package/dist/types/ai/index.d.ts +22 -0
  11. package/dist/types/ai/json.d.ts +4 -0
  12. package/dist/types/ai/provider-config.d.ts +15 -0
  13. package/dist/types/ai/providers/anthropic.d.ts +4 -0
  14. package/dist/types/ai/providers/gemini.d.ts +4 -0
  15. package/dist/types/ai/providers/github-copilot.d.ts +2 -0
  16. package/dist/types/ai/providers/openai-completions.d.ts +4 -0
  17. package/dist/types/ai/providers/openai.d.ts +6 -0
  18. package/dist/types/ai/providers/radius.d.ts +5 -0
  19. package/dist/types/ai/providers/request.d.ts +6 -0
  20. package/dist/types/ai/providers/shared.d.ts +6 -0
  21. package/dist/types/ai/registry.d.ts +4 -0
  22. package/dist/types/ai/retry.d.ts +6 -0
  23. package/dist/types/ai/sse.d.ts +5 -0
  24. package/dist/types/ai/stream.d.ts +18 -0
  25. package/dist/types/ai/testing/replay.d.ts +31 -0
  26. package/dist/types/ai/types.d.ts +187 -0
  27. package/dist/types/core/checkpoint.d.ts +39 -0
  28. package/dist/types/core/commands.d.ts +30 -0
  29. package/dist/types/core/compaction.d.ts +45 -0
  30. package/dist/types/core/events.d.ts +109 -0
  31. package/dist/types/core/extensions.d.ts +97 -0
  32. package/dist/types/core/index.d.ts +27 -0
  33. package/dist/types/core/loop.d.ts +69 -0
  34. package/dist/types/core/messages.d.ts +15 -0
  35. package/dist/types/core/microcompaction.d.ts +14 -0
  36. package/dist/types/core/permission.d.ts +27 -0
  37. package/dist/types/core/process.d.ts +79 -0
  38. package/dist/types/core/profile.d.ts +46 -0
  39. package/dist/types/core/recovery.d.ts +14 -0
  40. package/dist/types/core/session.d.ts +103 -0
  41. package/dist/types/core/testing/fake-provider.d.ts +19 -0
  42. package/dist/types/core/tools.d.ts +22 -0
  43. package/dist/types/index.d.ts +10 -0
  44. package/dist/types/profile-coding/checkpoint.d.ts +29 -0
  45. package/dist/types/profile-coding/context.d.ts +76 -0
  46. package/dist/types/profile-coding/index.d.ts +35 -0
  47. package/dist/types/profile-coding/permissions.d.ts +13 -0
  48. package/dist/types/profile-coding/prompts.d.ts +2 -0
  49. package/dist/types/profile-coding/shell.d.ts +12 -0
  50. package/dist/types/profile-coding/state.d.ts +10 -0
  51. package/dist/types/profile-coding/tools/bash.d.ts +21 -0
  52. package/dist/types/profile-coding/tools/files.d.ts +32 -0
  53. package/dist/types/profile-coding/tools/search.d.ts +23 -0
  54. package/dist/types/profile-coding/tools/tasks.d.ts +9 -0
  55. package/dist/types/profile-coding/tools/todo.d.ts +16 -0
  56. package/dist/types/profile-coding/truncate.d.ts +8 -0
  57. package/dist/types/sdk/agent.d.ts +144 -0
  58. package/dist/types/sdk/auth-page.d.ts +9 -0
  59. package/dist/types/sdk/auth.d.ts +78 -0
  60. package/dist/types/sdk/budget.d.ts +9 -0
  61. package/dist/types/sdk/commands.d.ts +30 -0
  62. package/dist/types/sdk/extension-loader.d.ts +15 -0
  63. package/dist/types/sdk/file-store.d.ts +13 -0
  64. package/dist/types/sdk/index.d.ts +31 -0
  65. package/dist/types/sdk/markdown-commands.d.ts +29 -0
  66. package/dist/types/sdk/mcp.d.ts +22 -0
  67. package/dist/types/sdk/profile.d.ts +6 -0
  68. package/dist/types/sdk/shell-hooks.d.ts +14 -0
  69. package/dist/types/sdk/skills.d.ts +12 -0
  70. package/dist/types/sdk/structured-output.d.ts +5 -0
  71. package/dist/types/sdk/testing/mcp-fixture-server.d.ts +1 -0
  72. package/dist/types/sdk/tool.d.ts +19 -0
  73. package/package.json +72 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Spandan Chavan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # @mu-agent/mu
2
+
3
+ The terminal and TypeScript SDK distribution of Mu, a general-purpose extensible AI
4
+ agent platform. Coding is the default profile, not a constraint of the underlying kernel.
5
+
6
+ ```sh
7
+ # npm (requires Bun)
8
+ npm install -g @mu-agent/mu
9
+
10
+ # Bun
11
+ bun install -g @mu-agent/mu
12
+ mu
13
+ ```
14
+
15
+ Update a global npm or Bun installation:
16
+
17
+ ```sh
18
+ mu self update
19
+ ```
20
+
21
+ Install the package locally to embed Mu:
22
+
23
+ ```sh
24
+ npm install @mu-agent/mu
25
+ # or: bun add @mu-agent/mu
26
+ ```
27
+
28
+ ```ts
29
+ import { Agent, createAgent } from "@mu-agent/mu";
30
+
31
+ // A domain-neutral agent with a general prompt and no tools.
32
+ const assistant = new Agent();
33
+ console.log((await assistant.run("Explain how an AI agent loop works")).text);
34
+
35
+ // Mu's built-in coding profile: file, search, shell, task, and checkpoint tools.
36
+ const codingAgent = await createAgent({
37
+ profile: "coding",
38
+ profileOptions: { root: process.cwd() },
39
+ });
40
+ console.log((await codingAgent.run("Summarize this directory")).text);
41
+ await codingAgent.shutdown();
42
+ ```
43
+
44
+ The matching OS/CPU package supplies a pinned ripgrep binary for fast search; installs
45
+ without it fall back to `rg` on `PATH` or mu's built-in search.
46
+
47
+ Run `/login` to sign in with an account or API key and `/logout` to remove a credential
48
+ saved that way. Environment variables are not changed by `/logout`. `/model` only lists
49
+ providers authenticated through `/login`; `openai-codex/*` rows use the ChatGPT plan and
50
+ `openai/*` rows use a saved API key. Both OpenAI routes default to GPT-5.6 Sol. See the
51
+ project repository for configuration, SDK, and development documentation.
52
+
53
+ Interactive runs are saved by working-directory scope under `~/.mu/sessions`; use
54
+ `/resume` to choose one or `mu --resume <session-id>` to continue it directly. Mu prints
55
+ the direct resume command when an interactive session closes. Use `/new` to clear the
56
+ terminal and start a fresh chat without deleting the previous saved session. Use
57
+ `/permissions` to choose `default`, `accept-edits`, `plan-readonly`, or full-access
58
+ behavior, including while the agent is running.
59
+
60
+ Mu loads coding instructions from `~/.mu/AGENTS.md` and from the active project, stopping
61
+ at its Git root. `AGENTS.override.md` takes precedence over `AGENTS.md`; Claude-compatible
62
+ fallback files, `.mu/rules/`, `.claude/rules/`, conditional `paths` frontmatter, and safe
63
+ `@file` imports are supported. Run `/instructions` to see the exact loaded files and
64
+ warnings, `/instructions reload` (or `/reload`) to rescan, or start with
65
+ `--no-instructions` to disable loading for one invocation.
66
+
67
+ Instruction settings can be placed in user or project `.mu/config.json`; project values
68
+ override user values:
69
+
70
+ ```json
71
+ {
72
+ "instructions": {
73
+ "enabled": true,
74
+ "maxBytes": 32768,
75
+ "fallbackFilenames": [".mu/AGENTS.md", "CLAUDE.md"],
76
+ "projectRootMarkers": [".git"],
77
+ "imports": true,
78
+ "claudeRules": true
79
+ }
80
+ }
81
+ ```
@@ -0,0 +1,32 @@
1
+ highlight.js 11.11.1
2
+ https://github.com/highlightjs/highlight.js
3
+
4
+ BSD 3-Clause License
5
+
6
+ Copyright (c) 2006, Ivan Sagalaev.
7
+ All rights reserved.
8
+
9
+ Redistribution and use in source and binary forms, with or without
10
+ modification, are permitted provided that the following conditions are met:
11
+
12
+ * Redistributions of source code must retain the above copyright notice, this
13
+ list of conditions and the following disclaimer.
14
+
15
+ * Redistributions in binary form must reproduce the above copyright notice,
16
+ this list of conditions and the following disclaimer in the documentation
17
+ and/or other materials provided with the distribution.
18
+
19
+ * Neither the name of the copyright holder nor the names of its
20
+ contributors may be used to endorse or promote products derived from
21
+ this software without specific prior written permission.
22
+
23
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.