@macroforge/mcp-server 0.1.65 → 0.1.66

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 (86) hide show
  1. package/README.md +7 -4
  2. package/dist/index.js +3 -3
  3. package/dist/index.js.map +1 -1
  4. package/dist/tools/docs-loader.d.ts.map +1 -1
  5. package/dist/tools/docs-loader.js +1 -1
  6. package/dist/tools/docs-loader.js.map +1 -1
  7. package/dist/tools/index.d.ts.map +1 -1
  8. package/dist/tools/index.js +84 -85
  9. package/dist/tools/index.js.map +1 -1
  10. package/docs/BOOK.md +8 -33
  11. package/docs/api/api-overview.md +4 -4
  12. package/docs/api/expand-sync.md +3 -2
  13. package/docs/api/native-plugin.md +5 -2
  14. package/docs/api/position-mapper.md +7 -4
  15. package/docs/api/transform-sync.md +7 -5
  16. package/docs/builtin-macros/deserialize/all-options.md +7 -21
  17. package/docs/builtin-macros/deserialize/combining-with-serialize.md +7 -5
  18. package/docs/builtin-macros/deserialize/enum-support.md +8 -6
  19. package/docs/builtin-macros/deserialize/error-handling.md +10 -9
  20. package/docs/builtin-macros/deserialize/interface-support.md +9 -4
  21. package/docs/builtin-macros/deserialize/runtime-validation.md +10 -21
  22. package/docs/builtin-macros/deserialize/serde-options.md +19 -31
  23. package/docs/builtin-macros/deserialize/type-alias-support.md +7 -6
  24. package/docs/builtin-macros/macros-overview/detailed-documentation.md +9 -9
  25. package/docs/builtin-macros/macros-overview/enum-support.md +3 -2
  26. package/docs/builtin-macros/macros-overview/interface-support.md +3 -2
  27. package/docs/builtin-macros/macros-overview/overview.md +13 -12
  28. package/docs/builtin-macros/macros-overview/type-alias-support.md +3 -2
  29. package/docs/builtin-macros/macros-overview.md +27 -23
  30. package/docs/builtin-macros/partial-eq/example.md +188 -232
  31. package/docs/builtin-macros/partial-eq/overview.md +18 -18
  32. package/docs/builtin-macros/serialize/example.md +11 -3
  33. package/docs/builtin-macros/serialize/overview.md +12 -11
  34. package/docs/builtin-macros/serialize/type-specific-serialization.md +12 -12
  35. package/docs/concepts/architecture.md +23 -22
  36. package/docs/concepts/derive-system/built-in-vs-custom-macros.md +4 -3
  37. package/docs/concepts/derive-system/overview.md +27 -24
  38. package/docs/concepts/derive-system.md +31 -27
  39. package/docs/concepts/how-macros-work.md +23 -21
  40. package/docs/custom-macros/custom-overview.md +9 -8
  41. package/docs/custom-macros/rust-setup.md +11 -10
  42. package/docs/custom-macros/ts-macro-derive/accessing-field-data.md +2 -1
  43. package/docs/custom-macros/ts-macro-derive/adding-imports.md +2 -1
  44. package/docs/custom-macros/ts-macro-derive/attribute-options.md +1 -1
  45. package/docs/custom-macros/ts-macro-derive/complete-example.md +1 -1
  46. package/docs/custom-macros/ts-macro-derive/deriveinput-structure.md +1 -1
  47. package/docs/custom-macros/ts-macro-derive/function-signature.md +1 -1
  48. package/docs/custom-macros/ts-macro-derive/overview.md +3 -2
  49. package/docs/custom-macros/ts-macro-derive/parsing-input.md +1 -1
  50. package/docs/custom-macros/ts-macro-derive/returning-errors.md +1 -1
  51. package/docs/custom-macros/ts-macro-derive.md +7 -4
  52. package/docs/custom-macros/ts-quote/backtick-template-literals.md +5 -3
  53. package/docs/custom-macros/ts-quote/comments-and.md +3 -2
  54. package/docs/custom-macros/ts-quote/complete-example-json-derive-macro.md +12 -11
  55. package/docs/custom-macros/ts-quote/conditionals-ifif.md +1 -1
  56. package/docs/custom-macros/ts-quote/identifier-concatenation-content.md +5 -3
  57. package/docs/custom-macros/ts-quote/interpolation-expr.md +18 -11
  58. package/docs/custom-macros/ts-quote/iteration-for.md +1 -1
  59. package/docs/custom-macros/ts-quote/local-constants-let.md +1 -1
  60. package/docs/custom-macros/ts-quote/match-expressions-match.md +1 -1
  61. package/docs/custom-macros/ts-quote/overview.md +4 -2
  62. package/docs/custom-macros/ts-quote/pattern-matching-if-let.md +2 -2
  63. package/docs/custom-macros/ts-quote/pattern-matching-iflet.md +1 -1
  64. package/docs/custom-macros/ts-quote/quick-reference.md +24 -23
  65. package/docs/custom-macros/ts-quote/side-effects-do.md +6 -5
  66. package/docs/custom-macros/ts-quote/string-interpolation-text-expr.md +3 -3
  67. package/docs/custom-macros/ts-quote/string-interpolation-textexpr.md +1 -1
  68. package/docs/custom-macros/ts-quote/tsstream-injection-typescript.md +3 -2
  69. package/docs/custom-macros/ts-quote/while-loops-while.md +1 -1
  70. package/docs/custom-macros/ts-quote.md +30 -19
  71. package/docs/getting-started/first-macro.md +5 -4
  72. package/docs/getting-started/installation.md +20 -17
  73. package/docs/integration/cli.md +11 -5
  74. package/docs/integration/configuration.md +7 -9
  75. package/docs/integration/integration-overview.md +5 -5
  76. package/docs/integration/mcp-server.md +17 -8
  77. package/docs/integration/svelte-preprocessor.md +18 -14
  78. package/docs/integration/typescript-plugin.md +14 -12
  79. package/docs/integration/vite-plugin.md +13 -11
  80. package/docs/language-servers/ls-overview.md +18 -12
  81. package/docs/language-servers/svelte-ls.md +9 -11
  82. package/docs/language-servers/svelte.md +18 -17
  83. package/docs/language-servers/zed-extensions.md +14 -11
  84. package/docs/language-servers/zed.md +19 -13
  85. package/docs/roadmap/roadmap.md +8 -6
  86. package/package.json +4 -4
@@ -1,14 +1,19 @@
1
1
  # Language Servers
2
2
 
3
- Macroforge provides language server integrations for enhanced IDE support beyond the TypeScript plugin.
3
+ Macroforge provides language server integrations for enhanced IDE support beyond the TypeScript
4
+ plugin.
4
5
 
5
6
  Work in Progress
6
7
 
7
- Language server integrations are currently experimental. They work in the repository but are not yet published as official extensions. You'll need to fork the repo and install them as developer extensions.
8
+ Language server integrations are currently experimental. They work in the repository but are not yet
9
+ published as official extensions. You'll need to fork the repo and install them as developer
10
+ extensions.
8
11
 
9
12
  ## Overview
10
13
 
11
- While the [TypeScript Plugin](../docs/integration/typescript-plugin) provides macro support in any TypeScript-aware editor, dedicated language servers offer deeper integration for specific frameworks and editors.
14
+ While the [TypeScript Plugin](../docs/integration/typescript-plugin) provides macro support in any
15
+ TypeScript-aware editor, dedicated language servers offer deeper integration for specific frameworks
16
+ and editors.
12
17
 
13
18
  | Integration | Purpose | Status |
14
19
  | --------------------------------------------------------- | ----------------------------------- | --------------------- |
@@ -17,11 +22,12 @@ While the [TypeScript Plugin](../docs/integration/typescript-plugin) provides ma
17
22
 
18
23
  ## Current Status
19
24
 
20
- The language servers are functional and used during development of macroforge itself. However, they require manual installation:
25
+ The language servers are functional and used during development of macroforge itself. However, they
26
+ require manual installation:
21
27
 
22
- 1. Fork or clone the [macroforge-ts repository](https://github.com/rymskip/macroforge-ts)
23
- 2. Build the extension you need
24
- 3. Install it as a developer extension in your editor
28
+ 1. Fork or clone the [macroforge-ts repository](https://github.com/rymskip/macroforge-ts)
29
+ 2. Build the extension you need
30
+ 3. Install it as a developer extension in your editor
25
31
 
26
32
  See the individual pages for detailed installation instructions.
27
33
 
@@ -29,11 +35,11 @@ See the individual pages for detailed installation instructions.
29
35
 
30
36
  We're working on official extension releases for:
31
37
 
32
- * VS Code (via VTSLS)
33
- * Zed (native extensions)
34
- * Other editors with LSP support
38
+ - VS Code (via VTSLS)
39
+ - Zed (native extensions)
40
+ - Other editors with LSP support
35
41
 
36
42
  ## Detailed Guides
37
43
 
38
- * [Svelte Language Server](../docs/language-servers/svelte) - Full Svelte IDE support
39
- * [Zed Extensions](../docs/language-servers/zed) - VTSLS and Svelte for Zed
44
+ - [Svelte Language Server](../docs/language-servers/svelte) - Full Svelte IDE support
45
+ - [Zed Extensions](../docs/language-servers/zed) - VTSLS and Svelte for Zed
@@ -1,6 +1,6 @@
1
1
  # Svelte Language Server
2
2
 
3
- *`@macroforge/svelte-language-server` provides full Svelte IDE support with macroforge integration.*
3
+ _`@macroforge/svelte-language-server` provides full Svelte IDE support with macroforge integration._
4
4
 
5
5
  <Alert type="warning" title="Developer Installation Required">
6
6
  This package is not yet published as an official extension. You'll need to build and install it manually.
@@ -42,7 +42,8 @@ npm run build
42
42
 
43
43
  ### 3. Configure Your Editor
44
44
 
45
- The language server exposes a `svelteserver` binary that implements the Language Server Protocol (LSP). Configure your editor to use it:
45
+ The language server exposes a `svelteserver` binary that implements the Language Server Protocol
46
+ (LSP). Configure your editor to use it:
46
47
 
47
48
  ```bash
48
49
  # The binary is located at:
@@ -51,17 +52,13 @@ The language server exposes a `svelteserver` binary that implements the Language
51
52
 
52
53
  ## Package Info
53
54
 
54
- | Package
55
- | `@macroforge/svelte-language-server`
55
+ | Package | `@macroforge/svelte-language-server`
56
56
 
57
- | Version
58
- | 0.1.7
57
+ | Version | 0.1.7
59
58
 
60
- | CLI Command
61
- | `svelteserver`
59
+ | CLI Command | `svelteserver`
62
60
 
63
- | Node Version
64
- | >= 18.0.0
61
+ | Node Version | >= 18.0.0
65
62
 
66
63
  ## How It Works
67
64
 
@@ -77,4 +74,5 @@ The Svelte language server extends the standard Svelte language tooling with mac
77
74
 
78
75
  ## Using with Zed
79
76
 
80
- For Zed editor, see the [Zed Extensions]({base}/docs/language-servers/zed) page for the dedicated `svelte-macroforge` extension.
77
+ For Zed editor, see the [Zed Extensions]({base}/docs/language-servers/zed) page for the dedicated
78
+ `svelte-macroforge` extension.
@@ -4,16 +4,17 @@
4
4
 
5
5
  Developer Installation Required
6
6
 
7
- This package is not yet published as an official extension. You'll need to build and install it manually.
7
+ This package is not yet published as an official extension. You'll need to build and install it
8
+ manually.
8
9
 
9
10
  ## Features
10
11
 
11
- * **Svelte syntax diagnostics** - Errors and warnings in .svelte files
12
- * **HTML support** - Hover info, autocompletions, Emmet, outline symbols
13
- * **CSS/SCSS/LESS** - Diagnostics, hover, completions, formatting, Emmet, color picking
14
- * **TypeScript/JavaScript** - Full language features with macroforge macro expansion
15
- * **Go-to-definition** - Navigate to macro-generated code
16
- * **Code actions** - Quick fixes and refactorings
12
+ - **Svelte syntax diagnostics** - Errors and warnings in .svelte files
13
+ - **HTML support** - Hover info, autocompletions, Emmet, outline symbols
14
+ - **CSS/SCSS/LESS** - Diagnostics, hover, completions, formatting, Emmet, color picking
15
+ - **TypeScript/JavaScript** - Full language features with macroforge macro expansion
16
+ - **Go-to-definition** - Navigate to macro-generated code
17
+ - **Code actions** - Quick fixes and refactorings
17
18
 
18
19
  ## Installation
19
20
 
@@ -41,7 +42,8 @@ npm run build
41
42
 
42
43
  ### 3\. Configure Your Editor
43
44
 
44
- The language server exposes a `svelteserver` binary that implements the Language Server Protocol (LSP). Configure your editor to use it:
45
+ The language server exposes a `svelteserver` binary that implements the Language Server Protocol
46
+ (LSP). Configure your editor to use it:
45
47
 
46
48
  Bash
47
49
 
@@ -52,20 +54,19 @@ Bash
52
54
 
53
55
  ## Package Info
54
56
 
55
- | Package | `@macroforge/svelte-language-server` |
56
- | Version | 0.1.7 |
57
- | CLI Command | `svelteserver` |
58
- | Node Version | \>= 18.0.0 |
57
+ | Package | `@macroforge/svelte-language-server` | | Version | 0.1.7 | | CLI Command |
58
+ `svelteserver` | | Node Version | \>= 18.0.0 |
59
59
 
60
60
  ## How It Works
61
61
 
62
62
  The Svelte language server extends the standard Svelte language tooling with macroforge integration:
63
63
 
64
- 1. Parses `.svelte` files and extracts TypeScript/JavaScript blocks
65
- 2. Expands macros using the `@macroforge/typescript-plugin`
66
- 3. Maps diagnostics back to original source positions
67
- 4. Provides completions for macro-generated methods
64
+ 1. Parses `.svelte` files and extracts TypeScript/JavaScript blocks
65
+ 2. Expands macros using the `@macroforge/typescript-plugin`
66
+ 3. Maps diagnostics back to original source positions
67
+ 4. Provides completions for macro-generated methods
68
68
 
69
69
  ## Using with Zed
70
70
 
71
- For Zed editor, see the [Zed Extensions](../../docs/language-servers/zed) page for the dedicated `svelte-macroforge` extension.
71
+ For Zed editor, see the [Zed Extensions](../../docs/language-servers/zed) page for the dedicated
72
+ `svelte-macroforge` extension.
@@ -1,6 +1,7 @@
1
1
  # Zed Extensions
2
2
 
3
- *Macroforge provides two extensions for the [Zed editor](https://zed.dev): one for TypeScript via VTSLS, and one for Svelte.*
3
+ _Macroforge provides two extensions for the [Zed editor](https://zed.dev): one for TypeScript via
4
+ VTSLS, and one for Svelte._
4
5
 
5
6
  <Alert type="warning" title="Developer Installation Required">
6
7
  These extensions are not yet in the Zed extension registry. You'll need to install them as developer extensions.
@@ -8,13 +9,11 @@ These extensions are not yet in the Zed extension registry. You'll need to insta
8
9
 
9
10
  ## Available Extensions
10
11
 
11
- | `vtsls-macroforge`
12
- | VTSLS with macroforge support for TypeScript
13
- | `crates/extensions/vtsls-macroforge`
12
+ | `vtsls-macroforge` | VTSLS with macroforge support for TypeScript |
13
+ `crates/extensions/vtsls-macroforge`
14
14
 
15
- | `svelte-macroforge`
16
- | Svelte language support with macroforge
17
- | `crates/extensions/svelte-macroforge`
15
+ | `svelte-macroforge` | Svelte language support with macroforge |
16
+ `crates/extensions/svelte-macroforge`
18
17
 
19
18
  ## Installation
20
19
 
@@ -39,7 +38,8 @@ cd crates/extensions/svelte-macroforge
39
38
 
40
39
  ### 3. Install as Dev Extension in Zed
41
40
 
42
- In Zed, open the command palette and run **zed: install dev extension**, then select the extension directory.
41
+ In Zed, open the command palette and run **zed: install dev extension**, then select the extension
42
+ directory.
43
43
 
44
44
  Alternatively, symlink the extension to your Zed extensions directory:
45
45
 
@@ -53,7 +53,8 @@ ln -s /path/to/macroforge-ts/crates/extensions/vtsls-macroforge ~/.config/zed/ex
53
53
 
54
54
  ## vtsls-macroforge
55
55
 
56
- This extension wraps [VTSLS](https://github.com/yioneko/vtsls) (a TypeScript language server) with macroforge integration. It provides:
56
+ This extension wraps [VTSLS](https://github.com/yioneko/vtsls) (a TypeScript language server) with
57
+ macroforge integration. It provides:
57
58
 
58
59
  - Full TypeScript language features
59
60
 
@@ -77,8 +78,10 @@ This extension provides Svelte support using the `@macroforge/svelte-language-se
77
78
 
78
79
  ### Extension not loading
79
80
 
80
- Make sure you've restarted Zed after installing the extension. Check the Zed logs for any error messages.
81
+ Make sure you've restarted Zed after installing the extension. Check the Zed logs for any error
82
+ messages.
81
83
 
82
84
  ### Macros not expanding
83
85
 
84
- Ensure your project has the `macroforge` package installed and a valid `tsconfig.json` with the TypeScript plugin configured.
86
+ Ensure your project has the `macroforge` package installed and a valid `tsconfig.json` with the
87
+ TypeScript plugin configured.
@@ -1,10 +1,12 @@
1
1
  # Zed Extensions
2
2
 
3
- Macroforge provides two extensions for the [Zed editor](https://zed.dev): one for TypeScript via VTSLS, and one for Svelte.
3
+ Macroforge provides two extensions for the [Zed editor](https://zed.dev): one for TypeScript via
4
+ VTSLS, and one for Svelte.
4
5
 
5
6
  Developer Installation Required
6
7
 
7
- These extensions are not yet in the Zed extension registry. You'll need to install them as developer extensions.
8
+ These extensions are not yet in the Zed extension registry. You'll need to install them as developer
9
+ extensions.
8
10
 
9
11
  ## Available Extensions
10
12
 
@@ -40,7 +42,8 @@ cd crates/extensions/svelte-macroforge
40
42
 
41
43
  ### 3\. Install as Dev Extension in Zed
42
44
 
43
- In Zed, open the command palette and run **zed: install dev extension**, then select the extension directory.
45
+ In Zed, open the command palette and run **zed: install dev extension**, then select the extension
46
+ directory.
44
47
 
45
48
  Alternatively, symlink the extension to your Zed extensions directory:
46
49
 
@@ -56,27 +59,30 @@ ln -s /path/to/macroforge-ts/crates/extensions/vtsls-macroforge ~/.config/zed
56
59
 
57
60
  ## vtsls-macroforge
58
61
 
59
- This extension wraps [VTSLS](https://github.com/yioneko/vtsls) (a TypeScript language server) with macroforge integration. It provides:
62
+ This extension wraps [VTSLS](https://github.com/yioneko/vtsls) (a TypeScript language server) with
63
+ macroforge integration. It provides:
60
64
 
61
- * Full TypeScript language features
62
- * Macro expansion at edit time
63
- * Accurate error positions in original source
64
- * Completions for macro-generated methods
65
+ - Full TypeScript language features
66
+ - Macro expansion at edit time
67
+ - Accurate error positions in original source
68
+ - Completions for macro-generated methods
65
69
 
66
70
  ## svelte-macroforge
67
71
 
68
72
  This extension provides Svelte support using the `@macroforge/svelte-language-server`. It includes:
69
73
 
70
- * Svelte component syntax support
71
- * HTML, CSS, and TypeScript features
72
- * Macroforge integration in script blocks
74
+ - Svelte component syntax support
75
+ - HTML, CSS, and TypeScript features
76
+ - Macroforge integration in script blocks
73
77
 
74
78
  ## Troubleshooting
75
79
 
76
80
  ### Extension not loading
77
81
 
78
- Make sure you've restarted Zed after installing the extension. Check the Zed logs for any error messages.
82
+ Make sure you've restarted Zed after installing the extension. Check the Zed logs for any error
83
+ messages.
79
84
 
80
85
  ### Macros not expanding
81
86
 
82
- Ensure your project has the `macroforge` package installed and a valid `tsconfig.json` with the TypeScript plugin configured.
87
+ Ensure your project has the `macroforge` package installed and a valid `tsconfig.json` with the
88
+ TypeScript plugin configured.
@@ -1,6 +1,7 @@
1
1
  # Roadmap
2
2
 
3
- Planned features and improvements for Macroforge. This roadmap reflects our current priorities but may change based on community feedback.
3
+ Planned features and improvements for Macroforge. This roadmap reflects our current priorities but
4
+ may change based on community feedback.
4
5
 
5
6
  ## IDE Extensions
6
7
 
@@ -27,7 +28,8 @@ Expanding Macroforge to work seamlessly with popular frontend frameworks.
27
28
 
28
29
  ## Pure TypeScript Macro Creation
29
30
 
30
- While Rust provides the best performance and type safety, we recognize that not everyone wants to write Rust. We're exploring options for writing macros in pure TypeScript.
31
+ While Rust provides the best performance and type safety, we recognize that not everyone wants to
32
+ write Rust. We're exploring options for writing macros in pure TypeScript.
31
33
 
32
34
  | Feature | Status | Description |
33
35
  | -------------------- | ------- | ------------------------------------------------ |
@@ -71,7 +73,7 @@ Improvements to the developer experience.
71
73
 
72
74
  Interested in helping? We welcome contributions of all kinds:
73
75
 
74
- * Feature requests and feedback on [GitHub Issues](https://github.com/rymskip/macroforge-ts/issues)
75
- * Pull requests for new macros or improvements
76
- * Documentation improvements
77
- * Framework integrations
76
+ - Feature requests and feedback on [GitHub Issues](https://github.com/rymskip/macroforge-ts/issues)
77
+ - Pull requests for new macros or improvements
78
+ - Documentation improvements
79
+ - Framework integrations
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "main": "dist/index.js",
26
26
  "name": "@macroforge/mcp-server",
27
27
  "peerDependencies": {
28
- "macroforge": "^0.1.65"
28
+ "macroforge": "^0.1.66"
29
29
  },
30
30
  "peerDependenciesMeta": {
31
31
  "macroforge": {
@@ -40,11 +40,11 @@
40
40
  "build": "tsc && chmod +x dist/index.js",
41
41
  "build:docs": "rust-script scripts/extract-docs.rs",
42
42
  "clean": "rm -rf dist",
43
- "cleanbuild": "npm run clean && npm run build",
44
- "dev": "npx @modelcontextprotocol/inspector dist/index.js",
43
+ "cleanbuild": "deno task clean && deno task build",
44
+ "dev": "deno run -A npm:@modelcontextprotocol/inspector dist/index.js",
45
45
  "start": "node dist/index.js",
46
46
  "test": "node --test tests/**/*.test.js"
47
47
  },
48
48
  "type": "module",
49
- "version": "0.1.65"
49
+ "version": "0.1.66"
50
50
  }