@mwillbanks/ast-mcp 0.1.0 → 0.1.2
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/CONTRIBUTING.md +1 -1
- package/README.md +31 -9
- package/dist/ast-mcp.js +82 -48
- package/dist/ast-mcp.js.map +12 -7
- package/package.json +7 -8
- package/src/ast-bro/capability.ts +19 -9
- package/src/ast-bro/client.ts +3 -4
- package/src/cli.ts +26 -0
- package/src/installer.ts +19 -17
- package/src/runtime/dependencies.ts +54 -0
- package/src/runtime/format.ts +3 -2
- package/templates/skills/ast-mcp/references/installation.md +14 -6
- package/templates/skills/ast-mcp/scripts/check-install.ts +42 -24
- package/dist/ast-mcp-hook.js +0 -7
- package/dist/ast-mcp-hook.js.map +0 -11
- package/dist/ast-mcp-install.js +0 -22
- package/dist/ast-mcp-install.js.map +0 -12
package/CONTRIBUTING.md
CHANGED
|
@@ -57,4 +57,4 @@ The formatter command intentionally applies Biome's safe and unsafe fixes and tr
|
|
|
57
57
|
|
|
58
58
|
## Releases
|
|
59
59
|
|
|
60
|
-
Releases are automated from `main`. Release Please opens and maintains the release pull request; merging it creates the GitHub release, builds
|
|
60
|
+
Releases are automated from `main`. Release Please opens and maintains the release pull request; merging it creates the GitHub release, builds the single `ast-mcp` Bun executable, and publishes the package to npm with provenance.
|
package/README.md
CHANGED
|
@@ -46,11 +46,7 @@ A stale hash, ambiguous match, capped preview, unsupported route, formatter reje
|
|
|
46
46
|
|
|
47
47
|
## Distribution
|
|
48
48
|
|
|
49
|
-
Bun is required. The package publishes
|
|
50
|
-
|
|
51
|
-
- `ast-mcp` — protocol-safe stdio server
|
|
52
|
-
- `ast-mcp-hook` — blocking host hook
|
|
53
|
-
- `ast-mcp-install` — host configuration and skill reconciler
|
|
49
|
+
Bun is required. The package publishes one Bun-bundled `ast-mcp` CLI with `install`, `update`, `uninstall`, `hook`, and `mcp` subcommands. Host configurations reference the stable installed CLI, so its pinned `@ast-bro/cli` and `dprint` dependencies remain available for the lifetime of the installation.
|
|
54
50
|
|
|
55
51
|
Runtime dependencies are pinned where binary compatibility matters. `@ast-bro/cli` powers code intelligence and structural rewrites; dprint and its configured plugins format candidate writes across supported languages.
|
|
56
52
|
|
|
@@ -59,19 +55,42 @@ Runtime dependencies are pinned where binary compatibility matters. `@ast-bro/cl
|
|
|
59
55
|
Install the MCP server, blocking hooks, unified skill, and managed instructions into the current repository:
|
|
60
56
|
|
|
61
57
|
```bash
|
|
62
|
-
|
|
58
|
+
bun add --dev @mwillbanks/ast-mcp
|
|
59
|
+
bun pm trust @ast-bro/cli dprint
|
|
60
|
+
./node_modules/.bin/ast-mcp install \
|
|
63
61
|
--scope local \
|
|
64
62
|
--target all \
|
|
65
63
|
--root "$PWD"
|
|
66
64
|
```
|
|
67
65
|
|
|
68
|
-
Targets are `codex`, `claude`, `copilot`, or `all`. Use
|
|
66
|
+
Bun blocks transitive lifecycle scripts by default, so the explicit trust step runs the pinned ast-bro and dprint installers before the MCP starts. Targets are `codex`, `claude`, `copilot`, or `all`. Use `./node_modules/.bin/ast-mcp update` to reconcile every managed surface and `./node_modules/.bin/ast-mcp uninstall` to remove only ast-mcp-managed configuration.
|
|
67
|
+
|
|
68
|
+
### ast-bro platform support
|
|
69
|
+
|
|
70
|
+
`@ast-bro/cli@3.0.0` currently publishes a precompiled binary only for macOS Apple Silicon. The ast-mcp installer verifies that the pinned binary can execute before writing host configuration. On Linux, Windows, or macOS Intel, install it through Cargo and set `AST_BRO_BINARY` to the resulting executable before rerunning the installer:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
cargo install ast-bro --version 3.0.0 --locked
|
|
74
|
+
export AST_BRO_BINARY="$HOME/.cargo/bin/ast-bro"
|
|
75
|
+
printf '%s\n' 'export AST_BRO_BINARY="$HOME/.cargo/bin/ast-bro"' >> "$HOME/.profile"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
For Windows PowerShell:
|
|
79
|
+
|
|
80
|
+
```powershell
|
|
81
|
+
cargo install ast-bro --version 3.0.0 --locked
|
|
82
|
+
$env:AST_BRO_BINARY = "$HOME\.cargo\bin\ast-bro.exe"
|
|
83
|
+
[Environment]::SetEnvironmentVariable("AST_BRO_BINARY", "$HOME\.cargo\bin\ast-bro.exe", "User")
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Install Rust and Cargo from [rustup](https://rustup.rs/) first when they are not already available. The example persists the variable for POSIX login shells; zsh users can write the same line to `~/.zprofile` instead. GUI-launched hosts must be started from that configured environment or receive `AST_BRO_BINARY` through their launcher. Restart the host after installation. The installer fails without changing host configuration when the binary is missing or has the wrong version.
|
|
69
87
|
|
|
70
88
|
From a source checkout:
|
|
71
89
|
|
|
72
90
|
```bash
|
|
73
91
|
bun install
|
|
74
|
-
bun run
|
|
92
|
+
bun run build
|
|
93
|
+
bun run bin/ast-mcp.ts install --scope local --target all --root "$PWD"
|
|
75
94
|
```
|
|
76
95
|
|
|
77
96
|
## MCP configuration
|
|
@@ -83,7 +102,10 @@ A minimal stdio configuration is:
|
|
|
83
102
|
"mcpServers": {
|
|
84
103
|
"ast-mcp": {
|
|
85
104
|
"command": "bun",
|
|
86
|
-
"args": [
|
|
105
|
+
"args": [
|
|
106
|
+
"/absolute/path/to/node_modules/@mwillbanks/ast-mcp/dist/ast-mcp.js",
|
|
107
|
+
"mcp"
|
|
108
|
+
],
|
|
87
109
|
"env": { "AST_MCP_ROOTS": "/absolute/project/root" }
|
|
88
110
|
}
|
|
89
111
|
}
|