@macroforge/mcp-server 0.1.42 → 0.1.50

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 (71) hide show
  1. package/LICENSE +22 -0
  2. package/docs/BOOK.md +165 -0
  3. package/docs/api/api-overview.md +67 -48
  4. package/docs/api/expand-sync.md +88 -53
  5. package/docs/api/native-plugin.md +121 -71
  6. package/docs/api/position-mapper.md +115 -55
  7. package/docs/api/transform-sync.md +86 -60
  8. package/docs/builtin-macros/clone.md +0 -20
  9. package/docs/builtin-macros/debug.md +0 -23
  10. package/docs/builtin-macros/default.md +1 -40
  11. package/docs/builtin-macros/deserialize/example.md +8 -1416
  12. package/docs/builtin-macros/deserialize.md +8 -1416
  13. package/docs/builtin-macros/hash.md +0 -42
  14. package/docs/builtin-macros/macros-overview/detailed-documentation.md +13 -0
  15. package/docs/builtin-macros/macros-overview/enum-support.md +30 -0
  16. package/docs/builtin-macros/macros-overview/interface-support.md +28 -0
  17. package/docs/builtin-macros/macros-overview/overview.md +36 -0
  18. package/docs/builtin-macros/macros-overview/type-alias-support.md +62 -0
  19. package/docs/builtin-macros/macros-overview.md +171 -130
  20. package/docs/builtin-macros/ord.md +0 -25
  21. package/docs/builtin-macros/partial-eq.md +0 -84
  22. package/docs/builtin-macros/partial-ord.md +2 -32
  23. package/docs/builtin-macros/serialize.md +2 -62
  24. package/docs/concepts/architecture.md +125 -48
  25. package/docs/concepts/derive-system/built-in-vs-custom-macros.md +13 -0
  26. package/docs/concepts/derive-system/overview.md +200 -0
  27. package/docs/concepts/derive-system.md +157 -104
  28. package/docs/concepts/how-macros-work.md +98 -47
  29. package/docs/custom-macros/custom-overview.md +79 -57
  30. package/docs/custom-macros/rust-setup.md +138 -99
  31. package/docs/custom-macros/ts-macro-derive/accessing-field-data.md +40 -31
  32. package/docs/custom-macros/ts-macro-derive/adding-imports.md +14 -11
  33. package/docs/custom-macros/ts-macro-derive/attribute-options.md +20 -25
  34. package/docs/custom-macros/ts-macro-derive/complete-example.md +40 -38
  35. package/docs/custom-macros/ts-macro-derive/deriveinput-structure.md +49 -47
  36. package/docs/custom-macros/ts-macro-derive/function-signature.md +12 -0
  37. package/docs/custom-macros/ts-macro-derive/overview.md +9 -7
  38. package/docs/custom-macros/ts-macro-derive/parsing-input.md +20 -18
  39. package/docs/custom-macros/ts-macro-derive/returning-errors.md +15 -13
  40. package/docs/custom-macros/ts-macro-derive.md +322 -228
  41. package/docs/custom-macros/ts-quote/backtick-template-literals.md +19 -7
  42. package/docs/custom-macros/ts-quote/comments-and.md +56 -22
  43. package/docs/custom-macros/ts-quote/complete-example-json-derive-macro.md +89 -98
  44. package/docs/custom-macros/ts-quote/conditionals-ifif.md +35 -29
  45. package/docs/custom-macros/ts-quote/identifier-concatenation-content.md +30 -22
  46. package/docs/custom-macros/ts-quote/iteration-for.md +48 -40
  47. package/docs/custom-macros/ts-quote/local-constants-let.md +23 -21
  48. package/docs/custom-macros/ts-quote/match-expressions-match.md +46 -38
  49. package/docs/custom-macros/ts-quote/overview.md +5 -10
  50. package/docs/custom-macros/ts-quote/pattern-matching-iflet.md +39 -0
  51. package/docs/custom-macros/ts-quote/quick-reference.md +50 -129
  52. package/docs/custom-macros/ts-quote/side-effects-do.md +13 -78
  53. package/docs/custom-macros/ts-quote/string-interpolation-textexpr.md +36 -0
  54. package/docs/custom-macros/ts-quote/tsstream-injection-typescript.md +43 -35
  55. package/docs/custom-macros/ts-quote/while-loops-while.md +31 -23
  56. package/docs/custom-macros/ts-quote.md +800 -520
  57. package/docs/getting-started/first-macro.md +98 -71
  58. package/docs/getting-started/installation.md +109 -65
  59. package/docs/integration/cli.md +214 -105
  60. package/docs/integration/configuration.md +115 -72
  61. package/docs/integration/integration-overview.md +55 -18
  62. package/docs/integration/mcp-server.md +84 -43
  63. package/docs/integration/svelte-preprocessor.md +183 -126
  64. package/docs/integration/typescript-plugin.md +101 -53
  65. package/docs/integration/vite-plugin.md +116 -76
  66. package/docs/language-servers/ls-overview.md +37 -21
  67. package/docs/language-servers/svelte.md +69 -38
  68. package/docs/language-servers/zed.md +81 -44
  69. package/docs/roadmap/roadmap.md +75 -53
  70. package/docs/sections.json +1 -242
  71. package/package.json +27 -28
@@ -1,52 +1,4 @@
1
1
  [
2
- {
3
- "id": "installation",
4
- "title": "Installation",
5
- "category": "getting-started",
6
- "category_title": "Getting Started",
7
- "path": "getting-started/installation.md",
8
- "use_cases": "setup, install, npm, getting started, quick start, init"
9
- },
10
- {
11
- "id": "first-macro",
12
- "title": "First Macro",
13
- "category": "getting-started",
14
- "category_title": "Getting Started",
15
- "path": "getting-started/first-macro.md",
16
- "use_cases": "tutorial, example, hello world, beginner, learn"
17
- },
18
- {
19
- "id": "how-macros-work",
20
- "title": "How Macros Work",
21
- "category": "concepts",
22
- "category_title": "Core Concepts",
23
- "path": "concepts/how-macros-work.md",
24
- "use_cases": "architecture, overview, understanding, basics, fundamentals"
25
- },
26
- {
27
- "id": "derive-system",
28
- "title": "The Derive System",
29
- "category": "concepts",
30
- "category_title": "Core Concepts",
31
- "path": "concepts/derive-system.md",
32
- "use_cases": "@derive, decorator, annotation, derive macro"
33
- },
34
- {
35
- "id": "architecture",
36
- "title": "Architecture",
37
- "category": "concepts",
38
- "category_title": "Core Concepts",
39
- "path": "concepts/architecture.md",
40
- "use_cases": "internals, rust, swc, napi, how it works"
41
- },
42
- {
43
- "id": "macros-overview",
44
- "title": "Overview",
45
- "category": "builtin-macros",
46
- "category_title": "Built-in Macros",
47
- "path": "builtin-macros/macros-overview.md",
48
- "use_cases": "all macros, list, available macros, macro list"
49
- },
50
2
  {
51
3
  "id": "debug",
52
4
  "title": "Debug",
@@ -103,46 +55,13 @@
103
55
  "path": "builtin-macros/partial-ord.md",
104
56
  "use_cases": "compareTo, partial ordering, sorting, nullable comparison"
105
57
  },
106
- {
107
- "id": "serialize/overview",
108
- "title": "Serialize: Overview",
109
- "category": "builtin-macros",
110
- "category_title": "Built-in Macros",
111
- "path": "builtin-macros/serialize/overview.md",
112
- "use_cases": "toJSON, serialization, serialize, classnameserialize(value), enumnameserialize(value), enumnameserializewithcontext",
113
- "parent_id": "serialize"
114
- },
115
- {
116
- "id": "serialize/type-specific-serialization",
117
- "title": "Serialize: Type-Specific Serialization",
118
- "category": "builtin-macros",
119
- "category_title": "Built-in Macros",
120
- "path": "builtin-macros/serialize/type-specific-serialization.md",
121
- "use_cases": "toJSON, serialization, date, toisostring(), serializewithcontext(ctx)",
122
- "parent_id": "serialize"
123
- },
124
- {
125
- "id": "serialize/example",
126
- "title": "Serialize: Example",
127
- "category": "builtin-macros",
128
- "category_title": "Built-in Macros",
129
- "path": "builtin-macros/serialize/example.md",
130
- "use_cases": "toJSON, serialization",
131
- "parent_id": "serialize"
132
- },
133
58
  {
134
59
  "id": "serialize",
135
60
  "title": "Serialize",
136
61
  "category": "builtin-macros",
137
62
  "category_title": "Built-in Macros",
138
63
  "path": "builtin-macros/serialize.md",
139
- "use_cases": "toJSON, serialization, json, api, data transfer",
140
- "is_chunked": true,
141
- "chunk_ids": [
142
- "serialize/overview",
143
- "serialize/type-specific-serialization",
144
- "serialize/example"
145
- ]
64
+ "use_cases": "toJSON, serialization, json, api, data transfer"
146
65
  },
147
66
  {
148
67
  "id": "deserialize/overview",
@@ -204,165 +123,5 @@
204
123
  "deserialize/union-type-deserialization",
205
124
  "deserialize/example"
206
125
  ]
207
- },
208
- {
209
- "id": "custom-overview",
210
- "title": "Overview",
211
- "category": "custom-macros",
212
- "category_title": "Custom Macros",
213
- "path": "custom-macros/custom-overview.md",
214
- "use_cases": "custom, extending, creating macros, own macro"
215
- },
216
- {
217
- "id": "rust-setup",
218
- "title": "Rust Setup",
219
- "category": "custom-macros",
220
- "category_title": "Custom Macros",
221
- "path": "custom-macros/rust-setup.md",
222
- "use_cases": "rust, cargo, napi, compilation, building"
223
- },
224
- {
225
- "id": "ts-macro-derive",
226
- "title": "#[ts_macro_derive]",
227
- "category": "custom-macros",
228
- "category_title": "Custom Macros",
229
- "path": "custom-macros/ts-macro-derive.md",
230
- "use_cases": "attribute, proc macro, derive attribute, rust macro"
231
- },
232
- {
233
- "id": "ts-quote",
234
- "title": "Template Syntax",
235
- "category": "custom-macros",
236
- "category_title": "Custom Macros",
237
- "path": "custom-macros/ts-quote.md",
238
- "use_cases": "ts_quote, template, code generation, interpolation"
239
- },
240
- {
241
- "id": "integration-overview",
242
- "title": "Overview",
243
- "category": "integration",
244
- "category_title": "Integration",
245
- "path": "integration/integration-overview.md",
246
- "use_cases": "setup, integration, tools, ecosystem"
247
- },
248
- {
249
- "id": "cli",
250
- "title": "CLI",
251
- "category": "integration",
252
- "category_title": "Integration",
253
- "path": "integration/cli.md",
254
- "use_cases": "command line, macroforge command, expand, terminal"
255
- },
256
- {
257
- "id": "typescript-plugin",
258
- "title": "TypeScript Plugin",
259
- "category": "integration",
260
- "category_title": "Integration",
261
- "path": "integration/typescript-plugin.md",
262
- "use_cases": "vscode, ide, language server, intellisense, autocomplete"
263
- },
264
- {
265
- "id": "vite-plugin",
266
- "title": "Vite Plugin",
267
- "category": "integration",
268
- "category_title": "Integration",
269
- "path": "integration/vite-plugin.md",
270
- "use_cases": "vite, build, bundler, react, svelte, sveltekit"
271
- },
272
- {
273
- "id": "svelte-preprocessor",
274
- "title": "Svelte Preprocessor",
275
- "category": "integration",
276
- "category_title": "Integration",
277
- "path": "integration/svelte-preprocessor.md",
278
- "use_cases": "svelte, preprocessor, svelte components, .svelte files, sveltekit"
279
- },
280
- {
281
- "id": "mcp-server",
282
- "title": "MCP Server",
283
- "category": "integration",
284
- "category_title": "Integration",
285
- "path": "integration/mcp-server.md",
286
- "use_cases": "mcp, ai, claude, llm, model context protocol, assistant"
287
- },
288
- {
289
- "id": "configuration",
290
- "title": "Configuration",
291
- "category": "integration",
292
- "category_title": "Integration",
293
- "path": "integration/configuration.md",
294
- "use_cases": "macroforge.json, config, settings, options"
295
- },
296
- {
297
- "id": "ls-overview",
298
- "title": "Overview",
299
- "category": "language-servers",
300
- "category_title": "Language Servers",
301
- "path": "language-servers/ls-overview.md",
302
- "use_cases": "lsp, language server, editor support"
303
- },
304
- {
305
- "id": "svelte",
306
- "title": "Svelte",
307
- "category": "language-servers",
308
- "category_title": "Language Servers",
309
- "path": "language-servers/svelte.md",
310
- "use_cases": "svelte, svelte language server, .svelte files"
311
- },
312
- {
313
- "id": "zed",
314
- "title": "Zed Extensions",
315
- "category": "language-servers",
316
- "category_title": "Language Servers",
317
- "path": "language-servers/zed.md",
318
- "use_cases": "zed, zed editor, extension"
319
- },
320
- {
321
- "id": "api-overview",
322
- "title": "Overview",
323
- "category": "api",
324
- "category_title": "API Reference",
325
- "path": "api/api-overview.md",
326
- "use_cases": "api, functions, exports, programmatic"
327
- },
328
- {
329
- "id": "expand-sync",
330
- "title": "expandSync()",
331
- "category": "api",
332
- "category_title": "API Reference",
333
- "path": "api/expand-sync.md",
334
- "use_cases": "expandSync, expand, transform, macro expansion"
335
- },
336
- {
337
- "id": "transform-sync",
338
- "title": "transformSync()",
339
- "category": "api",
340
- "category_title": "API Reference",
341
- "path": "api/transform-sync.md",
342
- "use_cases": "transformSync, transform, metadata, low-level"
343
- },
344
- {
345
- "id": "native-plugin",
346
- "title": "NativePlugin",
347
- "category": "api",
348
- "category_title": "API Reference",
349
- "path": "api/native-plugin.md",
350
- "use_cases": "NativePlugin, caching, language server, stateful"
351
- },
352
- {
353
- "id": "position-mapper",
354
- "title": "PositionMapper",
355
- "category": "api",
356
- "category_title": "API Reference",
357
- "path": "api/position-mapper.md",
358
- "use_cases": "PositionMapper, source map, diagnostics, position"
359
- },
360
- {
361
- "id": "roadmap",
362
- "title": "Roadmap",
363
- "category": "roadmap",
364
- "category_title": "Roadmap",
365
- "path": "roadmap/roadmap.md",
366
- "use_cases": "roadmap, future, planned features, upcoming"
367
126
  }
368
127
  ]
package/package.json CHANGED
@@ -1,41 +1,15 @@
1
1
  {
2
- "name": "@macroforge/mcp-server",
3
- "version": "0.1.42",
4
- "description": "MCP server for Macroforge documentation and code analysis",
5
- "type": "module",
6
- "main": "dist/index.js",
7
2
  "bin": {
8
3
  "macroforge-mcp": "./dist/index.js"
9
4
  },
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/rymskip/macroforge-ts.git",
13
- "directory": "packages/mcp-server"
14
- },
15
- "scripts": {
16
- "build": "tsc && chmod +x dist/index.js",
17
- "build:docs": "node scripts/extract-docs.cjs",
18
- "clean": "rm -rf dist",
19
- "cleanbuild": "npm run clean && npm run build",
20
- "dev": "npx @modelcontextprotocol/inspector dist/index.js",
21
- "start": "node dist/index.js",
22
- "test": "node --test tests/**/*.test.js"
23
- },
24
5
  "dependencies": {
25
6
  "@modelcontextprotocol/sdk": "^1.11.1"
26
7
  },
8
+ "description": "MCP server for Macroforge documentation and code analysis",
27
9
  "devDependencies": {
28
10
  "@types/node": "^22.0.0",
29
11
  "typescript": "^5.7.0"
30
12
  },
31
- "peerDependencies": {
32
- "macroforge": "^0.1.42"
33
- },
34
- "peerDependenciesMeta": {
35
- "macroforge": {
36
- "optional": true
37
- }
38
- },
39
13
  "files": [
40
14
  "dist",
41
15
  "docs"
@@ -47,5 +21,30 @@
47
21
  "macros",
48
22
  "documentation"
49
23
  ],
50
- "license": "MIT"
24
+ "license": "MIT",
25
+ "main": "dist/index.js",
26
+ "name": "@macroforge/mcp-server",
27
+ "peerDependencies": {
28
+ "macroforge": "^0.1.50"
29
+ },
30
+ "peerDependenciesMeta": {
31
+ "macroforge": {
32
+ "optional": true
33
+ }
34
+ },
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/macroforge-ts/mcp-server.git"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc && chmod +x dist/index.js",
41
+ "build:docs": "rust-script scripts/extract-docs.rs",
42
+ "clean": "rm -rf dist",
43
+ "cleanbuild": "npm run clean && npm run build",
44
+ "dev": "npx @modelcontextprotocol/inspector dist/index.js",
45
+ "start": "node dist/index.js",
46
+ "test": "node --test tests/**/*.test.js"
47
+ },
48
+ "type": "module",
49
+ "version": "0.1.50"
51
50
  }