@mwillbanks/ast-mcp 0.3.0 → 0.4.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 (36) hide show
  1. package/README.md +5 -5
  2. package/dist/ast-mcp.js +172 -156
  3. package/dist/ast-mcp.js.map +35 -31
  4. package/package.json +11 -11
  5. package/src/ast-bro/client.ts +12 -6
  6. package/src/ast-bro/result.ts +79 -0
  7. package/src/ast-bro/tools.json +7 -2
  8. package/src/config-edit.ts +236 -0
  9. package/src/config-migrate.ts +3 -20
  10. package/src/config-registry.ts +8 -0
  11. package/src/config-schema-common.ts +8 -1
  12. package/src/config-v2-schema.ts +12 -0
  13. package/src/config.ts +194 -39
  14. package/src/helpers/config.ts +9 -3
  15. package/src/installer.ts +61 -14
  16. package/src/patch/engine.ts +36 -17
  17. package/src/runtime/config-write.ts +327 -0
  18. package/src/runtime/dependencies.ts +14 -78
  19. package/src/runtime/file-read.ts +4 -13
  20. package/src/runtime/format.ts +27 -5
  21. package/src/runtime/git-worktrees.ts +179 -0
  22. package/src/runtime/path-policy.ts +131 -45
  23. package/src/runtime/path-utils.ts +40 -0
  24. package/src/runtime/paths.ts +29 -3
  25. package/src/tools/ast-bro.ts +106 -8
  26. package/src/tools/configuration.ts +218 -0
  27. package/src/tools/files.ts +1 -1
  28. package/templates/AGENTS.md +5 -1
  29. package/templates/skills/ast-mcp/SKILL.md +30 -1
  30. package/templates/skills/ast-mcp/evals/evals.json +98 -0
  31. package/templates/skills/ast-mcp/references/installation.md +2 -2
  32. package/templates/skills/ast-mcp/references/patch-state-machine.md +2 -2
  33. package/templates/skills/ast-mcp/references/tool-catalog.md +8 -4
  34. package/templates/skills/ast-mcp/scripts/binary-resolution.ts +112 -0
  35. package/templates/skills/ast-mcp/scripts/check-install.ts +162 -39
  36. package/templates/skills/ast-mcp/scripts/managed-hook.ts +34 -2
package/README.md CHANGED
@@ -87,14 +87,14 @@ Add `--service` to create and start a macOS LaunchAgent or Linux systemd user un
87
87
 
88
88
  Bun blocks transitive lifecycle scripts by default, so the explicit trust step runs the pinned ast-bro and dprint installers before the MCP starts. If another package manager blocks dependency build scripts, approve `@ast-bro/cli` and `dprint` through that manager before configuring a host. npm, pnpm, Yarn Classic, and Yarn 2+ project installations are supported. The runtime resolves binaries from ancestor package bins, package metadata, package-manager global bins, and then `PATH`.
89
89
 
90
- Targets are `codex`, `claude`, `copilot`, or `all`. The installer records the invoked executable, creates version 2 configuration, and omits MCP environment fields. Uninstall preserves configuration.
90
+ Targets are `codex`, `claude`, `copilot`, or `all`. Local surfaces always use `./node_modules/.bin/ast-mcp`; global surfaces use a recognized Bun, npm, pnpm, or Yarn global-bin alias. The installer creates version 2 configuration and omits MCP environment fields. Uninstall preserves configuration.
91
91
 
92
92
  ### ast-bro platform support
93
93
 
94
- `@ast-bro/cli@4.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:
94
+ `@ast-bro/cli@4.2.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:
95
95
 
96
96
  ```bash
97
- cargo install ast-bro --version 4.0.0 --locked
97
+ cargo install ast-bro --version 4.2.0 --locked
98
98
  export AST_BRO_BINARY="$HOME/.cargo/bin/ast-bro"
99
99
  printf '%s\n' 'export AST_BRO_BINARY="$HOME/.cargo/bin/ast-bro"' >> "$HOME/.profile"
100
100
  ```
@@ -102,7 +102,7 @@ printf '%s\n' 'export AST_BRO_BINARY="$HOME/.cargo/bin/ast-bro"' >> "$HOME/.prof
102
102
  For Windows PowerShell:
103
103
 
104
104
  ```powershell
105
- cargo install ast-bro --version 4.0.0 --locked
105
+ cargo install ast-bro --version 4.2.0 --locked
106
106
  $env:AST_BRO_BINARY = "$HOME\.cargo\bin\ast-bro.exe"
107
107
  [Environment]::SetEnvironmentVariable("AST_BRO_BINARY", "$HOME\.cargo\bin\ast-bro.exe", "User")
108
108
  ```
@@ -163,7 +163,7 @@ Inspect the result with `ast-mcp config validate` and `ast-mcp config show`. See
163
163
 
164
164
  ## MCP configuration
165
165
 
166
- A stdio definition contains the invoked executable and `mcp` subcommand. Generated definitions omit environment fields. Project configuration supplies local roots. Select `--transport http` during install to generate native URL entries for Codex, Claude Code, Copilot CLI, and VS Code.
166
+ A stdio definition contains the stable local or package-manager global executable alias and `mcp` subcommand. Generated definitions omit environment fields. Project configuration supplies local roots. Select `--transport http` during install to generate native URL entries for Codex, Claude Code, Copilot CLI, and VS Code.
167
167
 
168
168
  Start HTTP manually with `ast-mcp mcp --transport http [--host <address>] [--port <number>]`, or install a user service with `--service`. CLI flags override environment variables, project TOML, global TOML, and built-in defaults. The endpoint is `/mcp`; wildcard bind addresses generate loopback client URLs, while explicit non-loopback addresses deliberately expose the server. MCP session IDs correlate requests and are not authentication; stdio remains the trusted default transport. HTTP uses SSE by default and emits one event per request; JSON-array responses require `enableJsonResponse`.
169
169