@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
@@ -0,0 +1,19 @@
1
+ import type { AnyTool, Tool, ToolPermissionDetails, ToolResult } from "../core/index.js";
2
+ import { z } from "zod";
3
+ export type { ToolResult };
4
+ export interface ToolDefinition<Schema extends z.ZodType> {
5
+ name: string;
6
+ description: string;
7
+ inputSchema: Schema;
8
+ isConcurrencySafe?: (args: z.infer<Schema>) => boolean;
9
+ executionMode?: "sequential";
10
+ changesState?: boolean | ((args: z.infer<Schema>) => boolean);
11
+ permissionDetails?: (args: z.infer<Schema>) => ToolPermissionDetails | undefined | Promise<ToolPermissionDetails | undefined>;
12
+ execute: (args: z.infer<Schema>, ctx: {
13
+ toolCallId: string;
14
+ signal: AbortSignal;
15
+ update: (text: string) => void;
16
+ }) => Promise<ToolResult | string> | ToolResult | string;
17
+ }
18
+ export declare function tool<Schema extends z.ZodType>(definition: ToolDefinition<Schema>): Tool<z.infer<Schema>>;
19
+ export declare function asAnyTool<Schema extends z.ZodType>(t: Tool<z.infer<Schema>>): AnyTool;
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@mu-agent/mu",
3
+ "version": "0.0.1",
4
+ "description": "Mu, a general-purpose extensible AI agent platform for the terminal and TypeScript",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/types/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "bin": {
16
+ "mu": "./dist/mu.js"
17
+ },
18
+ "files": [
19
+ "dist/mu.js",
20
+ "dist/index.js",
21
+ "dist/types",
22
+ "README.md",
23
+ "LICENSE",
24
+ "THIRD_PARTY_LICENSES.txt"
25
+ ],
26
+ "scripts": {
27
+ "build": "bun build src/main.ts --target=bun --minify --outfile dist/mu.js && bun build src/sdk.ts --target=bun --minify --external zod --outfile dist/index.js && bun ../../node_modules/typescript/bin/tsc -b ./tsconfig.json --force && bun ../../scripts/prepare-sdk-declarations.ts",
28
+ "verify:sdk": "bun run build && bun ../../node_modules/typescript/bin/tsc --noEmit --strict --allowImportingTsExtensions --target ESNext --module ESNext --moduleResolution bundler --types bun testing/sdk-consumer.ts && bun testing/sdk-consumer.ts",
29
+ "prepack": "bun run build"
30
+ },
31
+ "keywords": [
32
+ "ai",
33
+ "agent",
34
+ "cli",
35
+ "coding-agent",
36
+ "tui",
37
+ "sdk",
38
+ "typescript"
39
+ ],
40
+ "author": "Spandan Chavan",
41
+ "license": "MIT",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/Spandan7724/mu.git",
45
+ "directory": "packages/cli"
46
+ },
47
+ "homepage": "https://github.com/Spandan7724/mu#readme",
48
+ "bugs": {
49
+ "url": "https://github.com/Spandan7724/mu/issues"
50
+ },
51
+ "engines": {
52
+ "bun": ">=1.3.0"
53
+ },
54
+ "dependencies": {
55
+ "zod": "4.4.3"
56
+ },
57
+ "optionalDependencies": {
58
+ "@mu-agent/ripgrep-darwin-arm64": "0.0.1",
59
+ "@mu-agent/ripgrep-linux-x64": "0.0.1",
60
+ "@mu-agent/ripgrep-windows-x64": "0.0.1"
61
+ },
62
+ "publishConfig": {
63
+ "access": "public",
64
+ "registry": "https://registry.npmjs.org/"
65
+ },
66
+ "devDependencies": {
67
+ "@mu/profile-coding": "0.0.1",
68
+ "@mu/tui": "0.0.1",
69
+ "mu": "0.0.1",
70
+ "@mu/core": "0.0.1"
71
+ }
72
+ }