@macroforge/mcp-server 0.1.36 → 0.1.37

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.
@@ -16,8 +16,8 @@ independent copies of values.
16
16
  ## Configuration
17
17
 
18
18
  The `functionNamingStyle` option in `macroforge.json` controls naming:
19
- - `"suffix"` (default): Suffixes with type name (e.g., `cloneMyType`)
20
- - `"prefix"`: Prefixes with type name (e.g., `myTypeClone`)
19
+ - `"prefix"` (default): Prefixes with type name (e.g., `myTypeClone`)
20
+ - `"suffix"`: Suffixes with type name (e.g., `cloneMyType`)
21
21
  - `"generic"`: Uses TypeScript generics (e.g., `clone<T extends MyType>`)
22
22
  - `"namespace"`: Legacy namespace wrapping
23
23
 
@@ -19,8 +19,8 @@ complex types, or field enumeration for object types.
19
19
  ## Configuration
20
20
 
21
21
  The `functionNamingStyle` option in `macroforge.json` controls naming:
22
- - `"suffix"` (default): Suffixes with type name (e.g., `toStringMyType`)
23
- - `"prefix"`: Prefixes with type name (e.g., `myTypeToString`)
22
+ - `"prefix"` (default): Prefixes with type name (e.g., `myTypeToString`)
23
+ - `"suffix"`: Suffixes with type name (e.g., `toStringMyType`)
24
24
  - `"generic"`: Uses TypeScript generics (e.g., `toString<T extends MyType>`)
25
25
  - `"namespace"`: Legacy namespace wrapping
26
26
 
@@ -16,8 +16,8 @@ a standard way to create "zero" or "empty" instances of types.
16
16
  ## Configuration
17
17
 
18
18
  The `functionNamingStyle` option in `macroforge.json` controls naming:
19
- - `"suffix"` (default): Suffixes with type name (e.g., `defaultValueMyType`)
20
- - `"prefix"`: Prefixes with type name (e.g., `myTypeDefaultValue`)
19
+ - `"prefix"` (default): Prefixes with type name (e.g., `myTypeDefaultValue`)
20
+ - `"suffix"`: Suffixes with type name (e.g., `defaultValueMyType`)
21
21
  - `"generic"`: Uses TypeScript generics (e.g., `defaultValue<T extends MyType>`)
22
22
  - `"namespace"`: Legacy namespace wrapping
23
23
 
@@ -16,8 +16,8 @@ safe parsing of complex JSON structures including circular references.
16
16
  ## Configuration
17
17
 
18
18
  The `functionNamingStyle` option in `macroforge.json` controls naming:
19
- - `"suffix"` (default): Suffixes with type name (e.g., `fromStringifiedJSONMyType`)
20
- - `"prefix"`: Prefixes with type name (e.g., `myTypeFromStringifiedJSON`)
19
+ - `"prefix"` (default): Prefixes with type name (e.g., `myTypeFromStringifiedJSON`)
20
+ - `"suffix"`: Suffixes with type name (e.g., `fromStringifiedJSONMyType`)
21
21
  - `"generic"`: Uses TypeScript generics (e.g., `fromStringifiedJSON<T extends MyType>`)
22
22
  - `"namespace"`: Legacy namespace wrapping
23
23
 
@@ -16,8 +16,8 @@ objects to be used as keys in hash-based collections.
16
16
  ## Configuration
17
17
 
18
18
  The `functionNamingStyle` option in `macroforge.json` controls naming:
19
- - `"suffix"` (default): Suffixes with type name (e.g., `hashCodeMyType`)
20
- - `"prefix"`: Prefixes with type name (e.g., `myTypeHashCode`)
19
+ - `"prefix"` (default): Prefixes with type name (e.g., `myTypeHashCode`)
20
+ - `"suffix"`: Suffixes with type name (e.g., `hashCodeMyType`)
21
21
  - `"generic"`: Uses TypeScript generics (e.g., `hashCode<T extends MyType>`)
22
22
  - `"namespace"`: Legacy namespace wrapping
23
23
 
@@ -16,8 +16,8 @@ compared with a guaranteed ordering relationship.
16
16
  ## Configuration
17
17
 
18
18
  The `functionNamingStyle` option in `macroforge.json` controls naming:
19
- - `"suffix"` (default): Suffixes with type name (e.g., `compareMyType`)
20
- - `"prefix"`: Prefixes with type name (e.g., `myTypeCompare`)
19
+ - `"prefix"` (default): Prefixes with type name (e.g., `myTypeCompare`)
20
+ - `"suffix"`: Suffixes with type name (e.g., `compareMyType`)
21
21
  - `"generic"`: Uses TypeScript generics (e.g., `compare<T extends MyType>`)
22
22
  - `"namespace"`: Legacy namespace wrapping
23
23
 
@@ -16,8 +16,8 @@ enabling value-based equality semantics instead of reference equality.
16
16
  ## Configuration
17
17
 
18
18
  The `functionNamingStyle` option in `macroforge.json` controls naming:
19
- - `"suffix"` (default): Suffixes with type name (e.g., `equalsMyType`)
20
- - `"prefix"`: Prefixes with type name (e.g., `myTypeEquals`)
19
+ - `"prefix"` (default): Prefixes with type name (e.g., `myTypeEquals`)
20
+ - `"suffix"`: Suffixes with type name (e.g., `equalsMyType`)
21
21
  - `"generic"`: Uses TypeScript generics (e.g., `equals<T extends MyType>`)
22
22
  - `"namespace"`: Legacy namespace wrapping
23
23
 
@@ -16,8 +16,8 @@ between values where some pairs may be incomparable.
16
16
  ## Configuration
17
17
 
18
18
  The `functionNamingStyle` option in `macroforge.json` controls naming:
19
- - `"suffix"` (default): Suffixes with type name (e.g., `partialCompareMyType`)
20
- - `"prefix"`: Prefixes with type name (e.g., `myTypePartialCompare`)
19
+ - `"prefix"` (default): Prefixes with type name (e.g., `myTypePartialCompare`)
20
+ - `"suffix"`: Suffixes with type name (e.g., `partialCompareMyType`)
21
21
  - `"generic"`: Uses TypeScript generics (e.g., `partialCompare<T extends MyType>`)
22
22
  - `"namespace"`: Legacy namespace wrapping
23
23
 
@@ -16,8 +16,8 @@ including circular references.
16
16
  ## Configuration
17
17
 
18
18
  The `functionNamingStyle` option in `macroforge.json` controls naming:
19
- - `"suffix"` (default): Suffixes with type name (e.g., `toStringifiedJSONMyType`)
20
- - `"prefix"`: Prefixes with type name (e.g., `myTypeToStringifiedJSON`)
19
+ - `"prefix"` (default): Prefixes with type name (e.g., `myTypeToStringifiedJSON`)
20
+ - `"suffix"`: Suffixes with type name (e.g., `toStringifiedJSONMyType`)
21
21
  - `"generic"`: Uses TypeScript generics (e.g., `toStringifiedJSON<T extends MyType>`)
22
22
  - `"namespace"`: Legacy namespace wrapping
23
23
 
@@ -62,56 +62,61 @@ class User {
62
62
  ```
63
63
  **After:**
64
64
  ```
65
- import { SerializeContext } from 'macroforge/serde';
65
+ import { SerializeContext } from "macroforge/serde";
66
66
 
67
67
  class User {
68
- id: number;
68
+
69
+
70
+ id: number;
69
71
 
70
- name: string;
72
+ name: string;
71
73
 
72
- password: string;
74
+
75
+
76
+ password: string;
73
77
 
74
- metadata: Record<string, unknown>;
78
+
79
+ metadata: Record<string, unknown>;
75
80
 
76
- toString(): string {
77
- const parts: string[] = [];
78
- parts.push('userId: ' + this.id);
79
- parts.push('name: ' + this.name);
80
- parts.push('metadata: ' + this.metadata);
81
- return 'User { ' + parts.join(', ') + ' }';
82
- }
81
+ toString(): string {
82
+ const parts: string[] = [];
83
+ parts.push("userId: " + this.id);
84
+ parts.push("name: " + this.name);
85
+ parts.push("metadata: " + this.metadata);
86
+ return "User { " + parts.join(", ") + " }";
87
+ }
83
88
 
84
- toStringifiedJSON(): string {
85
- const ctx = SerializeContext.create();
86
- return JSON.stringify(this.__serialize(ctx));
87
- }
89
+ toStringifiedJSON(): string {
90
+ const ctx = SerializeContext.create();
91
+ return JSON.stringify(this.__serialize(ctx));
92
+ }
88
93
 
89
- toObject(): Record<string, unknown> {
90
- const ctx = SerializeContext.create();
91
- return this.__serialize(ctx);
92
- }
94
+ toObject(): Record<string, unknown> {
95
+ const ctx = SerializeContext.create();
96
+ return this.__serialize(ctx);
97
+ }
93
98
 
94
- __serialize(ctx: SerializeContext): Record<string, unknown> {
95
- const existingId = ctx.getId(this);
96
- if (existingId !== undefined) {
97
- return {
98
- __ref: existingId
99
- };
100
- }
101
- const __id = ctx.register(this);
102
- const result: Record<string, unknown> = {
103
- __type: 'User',
104
- __id
99
+ __serialize(ctx: SerializeContext): Record<string, unknown> {
100
+ const existingId = ctx.getId(this);
101
+ if (existingId !== undefined) {
102
+ return {
103
+ __ref: existingId
105
104
  };
106
- result['user_id'] = this.id;
107
- result['name'] = this.name;
108
- {
109
- const __flattened = __serializeRecord<string, unknown>(this.metadata, ctx);
110
- const { __type: _, __id: __, ...rest } = __flattened as any;
111
- Object.assign(result, rest);
112
- }
113
- return result;
114
105
  }
106
+ const __id = ctx.register(this);
107
+ const result: Record<string, unknown> = {
108
+ __type: "User",
109
+ __id
110
+ };
111
+ result["user_id"] = this.id;
112
+ result["name"] = this.name;
113
+ {
114
+ const __flattened = record < string, unknown;
115
+ const { __type: _, __id: __, ...rest } = __flattened as any;
116
+ Object.assign(result, rest);
117
+ }
118
+ return result;
119
+ }
115
120
  }
116
121
  ``` Syntax rules:
117
122
  - Must be inside a JSDoc comment immediately before the field
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@macroforge/mcp-server",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "description": "MCP server for Macroforge documentation and code analysis",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "typescript": "^5.7.0"
30
30
  },
31
31
  "peerDependencies": {
32
- "macroforge": "^0.1.36"
32
+ "macroforge": "^0.1.37"
33
33
  },
34
34
  "peerDependenciesMeta": {
35
35
  "macroforge": {