@macroforge/mcp-server 0.1.37 → 0.1.38
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/docs/builtin-macros/clone.md +43 -23
- package/docs/builtin-macros/debug.md +50 -18
- package/docs/builtin-macros/default.md +79 -28
- package/docs/builtin-macros/deserialize/cycleforward-reference-support.md +11 -0
- package/docs/builtin-macros/deserialize/example.md +1625 -0
- package/docs/builtin-macros/deserialize/overview.md +15 -10
- package/docs/builtin-macros/deserialize/union-type-deserialization.md +27 -0
- package/docs/builtin-macros/deserialize/validation.md +34 -0
- package/docs/builtin-macros/deserialize.md +1608 -23
- package/docs/builtin-macros/hash.md +87 -20
- package/docs/builtin-macros/ord.md +56 -31
- package/docs/builtin-macros/partial-eq/example.md +526 -0
- package/docs/builtin-macros/partial-eq/overview.md +39 -0
- package/docs/builtin-macros/partial-eq.md +184 -26
- package/docs/builtin-macros/partial-ord.md +68 -30
- package/docs/builtin-macros/serialize/example.md +139 -0
- package/docs/builtin-macros/serialize/overview.md +32 -0
- package/docs/builtin-macros/serialize/type-specific-serialization.md +22 -0
- package/docs/builtin-macros/serialize.md +130 -28
- package/docs/concepts/derive-system.md +20 -34
- package/docs/concepts/how-macros-work.md +8 -4
- package/docs/getting-started/first-macro.md +36 -26
- package/docs/sections.json +88 -2
- package/package.json +2 -2
|
@@ -8,18 +8,10 @@ including circular references.
|
|
|
8
8
|
|
|
9
9
|
| Type | Generated Code | Description |
|
|
10
10
|
|------|----------------|-------------|
|
|
11
|
-
| Class | `
|
|
12
|
-
| Enum | `
|
|
13
|
-
| Interface | `
|
|
14
|
-
| Type Alias | `
|
|
15
|
-
|
|
16
|
-
## Configuration
|
|
17
|
-
|
|
18
|
-
The `functionNamingStyle` option in `macroforge.json` controls naming:
|
|
19
|
-
- `"prefix"` (default): Prefixes with type name (e.g., `myTypeToStringifiedJSON`)
|
|
20
|
-
- `"suffix"`: Suffixes with type name (e.g., `toStringifiedJSONMyType`)
|
|
21
|
-
- `"generic"`: Uses TypeScript generics (e.g., `toStringifiedJSON<T extends MyType>`)
|
|
22
|
-
- `"namespace"`: Legacy namespace wrapping
|
|
11
|
+
| Class | `classNameSerialize(value)` + `static serialize(value)` | Standalone function + static wrapper method |
|
|
12
|
+
| Enum | `enumNameSerialize(value)`, `enumNameSerializeWithContext` | Standalone functions |
|
|
13
|
+
| Interface | `interfaceNameSerialize(value)`, etc. | Standalone functions |
|
|
14
|
+
| Type Alias | `typeNameSerialize(value)`, etc. | Standalone functions |
|
|
23
15
|
|
|
24
16
|
## Cycle Detection Protocol
|
|
25
17
|
|
|
@@ -45,11 +37,11 @@ When an object is serialized:
|
|
|
45
37
|
|------|------------------------|
|
|
46
38
|
| Primitives | Direct value |
|
|
47
39
|
| `Date` | `toISOString()` |
|
|
48
|
-
| Arrays | For primitive-like element types, pass through; for `Date`/`Date | null`, map to ISO strings; otherwise map and call `
|
|
49
|
-
| `Map<K,V>` | For primitive-like values, `Object.fromEntries(map.entries())`; for `Date`/`Date | null`, convert to ISO strings; otherwise call `
|
|
40
|
+
| Arrays | For primitive-like element types, pass through; for `Date`/`Date | null`, map to ISO strings; otherwise map and call `SerializeWithContext(ctx)` when available |
|
|
41
|
+
| `Map<K,V>` | For primitive-like values, `Object.fromEntries(map.entries())`; for `Date`/`Date | null`, convert to ISO strings; otherwise call `SerializeWithContext(ctx)` per value when available |
|
|
50
42
|
| `Set<T>` | Convert to array; element handling matches `Array<T>` |
|
|
51
|
-
| Nullable | Include `null` explicitly; for primitive-like and `Date` unions the generator avoids runtime `
|
|
52
|
-
| Objects | Call `
|
|
43
|
+
| Nullable | Include `null` explicitly; for primitive-like and `Date` unions the generator avoids runtime `SerializeWithContext` checks |
|
|
44
|
+
| Objects | Call `SerializeWithContext(ctx)` if available (to support user-defined implementations) |
|
|
53
45
|
|
|
54
46
|
Note: the generator specializes some code paths based on the declared TypeScript type to
|
|
55
47
|
avoid runtime feature detection on primitives and literal unions.
|
|
@@ -58,34 +50,144 @@ avoid runtime feature detection on primitives and literal unions.
|
|
|
58
50
|
|
|
59
51
|
The `@serde` decorator supports:
|
|
60
52
|
|
|
61
|
-
- `skip` / `
|
|
53
|
+
- `skip` / `skipSerializing` - Exclude field from serialization
|
|
62
54
|
- `rename = "jsonKey"` - Use different JSON property name
|
|
63
55
|
- `flatten` - Merge nested object's fields into parent
|
|
64
56
|
|
|
65
57
|
## Example
|
|
66
58
|
|
|
67
|
-
```typescript
|
|
68
|
-
@derive(Serialize)
|
|
59
|
+
```typescript before
|
|
60
|
+
/** @derive(Serialize) */
|
|
69
61
|
class User {
|
|
70
62
|
id: number;
|
|
71
63
|
|
|
72
|
-
@serde(rename
|
|
64
|
+
/** @serde({ rename: "userName" }) */
|
|
73
65
|
name: string;
|
|
74
66
|
|
|
75
|
-
@serde(
|
|
67
|
+
/** @serde({ skipSerializing: true }) */
|
|
76
68
|
password: string;
|
|
77
69
|
|
|
78
|
-
@serde(flatten)
|
|
70
|
+
/** @serde({ flatten: true }) */
|
|
79
71
|
metadata: UserMetadata;
|
|
80
72
|
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
```typescript after
|
|
76
|
+
import { SerializeContext } from 'macroforge/serde';
|
|
77
|
+
|
|
78
|
+
class User {
|
|
79
|
+
id: number;
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
name: string;
|
|
82
|
+
|
|
83
|
+
password: string;
|
|
84
|
+
|
|
85
|
+
metadata: UserMetadata;
|
|
86
|
+
/** Serializes a value to a JSON string.
|
|
87
|
+
@param value - The value to serialize
|
|
88
|
+
@returns JSON string representation with cycle detection metadata */
|
|
89
|
+
|
|
90
|
+
static serialize(value: User): string {
|
|
91
|
+
return userSerialize(value);
|
|
92
|
+
}
|
|
93
|
+
/** @internal Serializes with an existing context for nested/cyclic object graphs.
|
|
94
|
+
@param value - The value to serialize
|
|
95
|
+
@param ctx - The serialization context */
|
|
96
|
+
|
|
97
|
+
static serializeWithContext(value: User, ctx: SerializeContext): Record<string, unknown> {
|
|
98
|
+
return userSerializeWithContext(value, ctx);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
86
101
|
|
|
87
|
-
|
|
88
|
-
|
|
102
|
+
/** Serializes a value to a JSON string.
|
|
103
|
+
@param value - The value to serialize
|
|
104
|
+
@returns JSON string representation with cycle detection metadata */ export function userSerialize(
|
|
105
|
+
value: User
|
|
106
|
+
): string {
|
|
107
|
+
const ctx = SerializeContext.create();
|
|
108
|
+
return JSON.stringify(userSerializeWithContext(value, ctx));
|
|
109
|
+
} /** @internal Serializes with an existing context for nested/cyclic object graphs.
|
|
110
|
+
@param value - The value to serialize
|
|
111
|
+
@param ctx - The serialization context */
|
|
112
|
+
export function userSerializeWithContext(
|
|
113
|
+
value: User,
|
|
114
|
+
ctx: SerializeContext
|
|
115
|
+
): Record<string, unknown> {
|
|
116
|
+
const existingId = ctx.getId(value);
|
|
117
|
+
if (existingId !== undefined) {
|
|
118
|
+
return { __ref: existingId };
|
|
119
|
+
}
|
|
120
|
+
const __id = ctx.register(value);
|
|
121
|
+
const result: Record<string, unknown> = { __type: 'User', __id };
|
|
122
|
+
result['id'] = value.id;
|
|
123
|
+
result['userName'] = value.name;
|
|
124
|
+
{
|
|
125
|
+
const __flattened = userMetadataSerializeWithContext(value.metadata, ctx);
|
|
126
|
+
const { __type: _, __id: __, ...rest } = __flattened as any;
|
|
127
|
+
Object.assign(result, rest);
|
|
128
|
+
}
|
|
129
|
+
return result;
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Generated output:
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import { SerializeContext } from 'macroforge/serde';
|
|
137
|
+
|
|
138
|
+
class User {
|
|
139
|
+
id: number;
|
|
140
|
+
|
|
141
|
+
name: string;
|
|
142
|
+
|
|
143
|
+
password: string;
|
|
144
|
+
|
|
145
|
+
metadata: UserMetadata;
|
|
146
|
+
/** Serializes a value to a JSON string.
|
|
147
|
+
@param value - The value to serialize
|
|
148
|
+
@returns JSON string representation with cycle detection metadata */
|
|
149
|
+
|
|
150
|
+
static serialize(value: User): string {
|
|
151
|
+
return userSerialize(value);
|
|
152
|
+
}
|
|
153
|
+
/** @internal Serializes with an existing context for nested/cyclic object graphs.
|
|
154
|
+
@param value - The value to serialize
|
|
155
|
+
@param ctx - The serialization context */
|
|
156
|
+
|
|
157
|
+
static serializeWithContext(value: User, ctx: SerializeContext): Record<string, unknown> {
|
|
158
|
+
return userSerializeWithContext(value, ctx);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** Serializes a value to a JSON string.
|
|
163
|
+
@param value - The value to serialize
|
|
164
|
+
@returns JSON string representation with cycle detection metadata */ export function userSerialize(
|
|
165
|
+
value: User
|
|
166
|
+
): string {
|
|
167
|
+
const ctx = SerializeContext.create();
|
|
168
|
+
return JSON.stringify(userSerializeWithContext(value, ctx));
|
|
169
|
+
} /** @internal Serializes with an existing context for nested/cyclic object graphs.
|
|
170
|
+
@param value - The value to serialize
|
|
171
|
+
@param ctx - The serialization context */
|
|
172
|
+
export function userSerializeWithContext(
|
|
173
|
+
value: User,
|
|
174
|
+
ctx: SerializeContext
|
|
175
|
+
): Record<string, unknown> {
|
|
176
|
+
const existingId = ctx.getId(value);
|
|
177
|
+
if (existingId !== undefined) {
|
|
178
|
+
return { __ref: existingId };
|
|
179
|
+
}
|
|
180
|
+
const __id = ctx.register(value);
|
|
181
|
+
const result: Record<string, unknown> = { __type: 'User', __id };
|
|
182
|
+
result['id'] = value.id;
|
|
183
|
+
result['userName'] = value.name;
|
|
184
|
+
{
|
|
185
|
+
const __flattened = userMetadataSerializeWithContext(value.metadata, ctx);
|
|
186
|
+
const { __type: _, __id: __, ...rest } = __flattened as any;
|
|
187
|
+
Object.assign(result, rest);
|
|
188
|
+
}
|
|
189
|
+
return result;
|
|
190
|
+
}
|
|
89
191
|
```
|
|
90
192
|
|
|
91
193
|
## Required Import
|
|
@@ -78,46 +78,32 @@ class User {
|
|
|
78
78
|
|
|
79
79
|
metadata: Record<string, unknown>;
|
|
80
80
|
|
|
81
|
-
toString(): string {
|
|
82
|
-
|
|
83
|
-
parts.push("userId: " + this.id);
|
|
84
|
-
parts.push("name: " + this.name);
|
|
85
|
-
parts.push("metadata: " + this.metadata);
|
|
86
|
-
return "User { " + parts.join(", ") + " }";
|
|
81
|
+
static toString(value: User): string {
|
|
82
|
+
return userToString(value);
|
|
87
83
|
}
|
|
84
|
+
/** Serializes a value to a JSON string.
|
|
85
|
+
@param value - The value to serialize
|
|
86
|
+
@returns JSON string representation with cycle detection metadata */
|
|
88
87
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
return JSON.stringify(this.__serialize(ctx));
|
|
88
|
+
static serialize(value: User): string {
|
|
89
|
+
return userSerialize(value);
|
|
92
90
|
}
|
|
91
|
+
/** @internal Serializes with an existing context for nested/cyclic object graphs.
|
|
92
|
+
@param value - The value to serialize
|
|
93
|
+
@param ctx - The serialization context */
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return this.__serialize(ctx);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
__serialize(ctx: SerializeContext): Record<string, unknown> {
|
|
100
|
-
const existingId = ctx.getId(this);
|
|
101
|
-
if (existingId !== undefined) {
|
|
102
|
-
return {
|
|
103
|
-
__ref: existingId
|
|
104
|
-
};
|
|
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;
|
|
95
|
+
static serializeWithContext(value: User, ctx: SerializeContext): Record<string, unknown> {
|
|
96
|
+
return userSerializeWithContext(value, ctx);
|
|
119
97
|
}
|
|
120
98
|
}
|
|
99
|
+
|
|
100
|
+
export function userToString(value: User): string {const parts: string[]= []; parts.push("userId: " + value.id); parts.push("name: " + value.name); parts.push("metadata: " + value.metadata); return "User { " + parts.join(", " )+ " }" ; }
|
|
101
|
+
|
|
102
|
+
/** Serializes a value to a JSON string.
|
|
103
|
+
@param value - The value to serialize
|
|
104
|
+
@returns JSON string representation with cycle detection metadata */export function userSerialize(value: User): string {const ctx = SerializeContext.create(); return JSON.stringify(userSerializeWithContext(value, ctx));}/** @internal Serializes with an existing context for nested/cyclic object graphs.
|
|
105
|
+
@param value - The value to serialize
|
|
106
|
+
@param ctx - The serialization context */export function userSerializeWithContext(value: User, ctx: SerializeContext): Record<string, unknown>{const existingId = ctx.getId(value); if(existingId!== undefined){return {__ref: existingId};}const __id = ctx.register(value); const result: Record<string, unknown>= {__type: "User" , __id,}; result["user_id" ]= value.id; result["name" ]= value.name; {const __flattened = record<string, unknown>SerializeWithContext(value.metadata, ctx); const {__type: _, __id: __,...rest}= __flattened as any; Object.assign(result, rest);}return result;}
|
|
121
107
|
``` Syntax rules:
|
|
122
108
|
- Must be inside a JSDoc comment immediately before the field
|
|
123
109
|
- Options use object literal syntax: `@attr({ key: value })`
|
|
@@ -18,12 +18,16 @@ class User {
|
|
|
18
18
|
class User {
|
|
19
19
|
name: string;
|
|
20
20
|
|
|
21
|
-
toString(): string {
|
|
22
|
-
|
|
23
|
-
parts.push('name: ' + this.name);
|
|
24
|
-
return 'User { ' + parts.join(', ') + ' }';
|
|
21
|
+
static toString(value: User): string {
|
|
22
|
+
return userToString(value);
|
|
25
23
|
}
|
|
26
24
|
}
|
|
25
|
+
|
|
26
|
+
export function userToString(value: User): string {
|
|
27
|
+
const parts: string[] = [];
|
|
28
|
+
parts.push('name: ' + value.name);
|
|
29
|
+
return 'User { ' + parts.join(', ') + ' }';
|
|
30
|
+
}
|
|
27
31
|
``` ## Zero Runtime Overhead
|
|
28
32
|
Because code generation happens at compile time, there's no:
|
|
29
33
|
- Runtime reflection or metadata
|
|
@@ -30,33 +30,39 @@ export class User {
|
|
|
30
30
|
this.email = email;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
toString(): string {
|
|
34
|
-
|
|
35
|
-
parts.push('name: ' + this.name);
|
|
36
|
-
parts.push('age: ' + this.age);
|
|
37
|
-
parts.push('email: ' + this.email);
|
|
38
|
-
return 'User { ' + parts.join(', ') + ' }';
|
|
33
|
+
static toString(value: User): string {
|
|
34
|
+
return userToString(value);
|
|
39
35
|
}
|
|
40
36
|
|
|
41
|
-
clone(): User {
|
|
42
|
-
|
|
43
|
-
cloned.name = this.name;
|
|
44
|
-
cloned.age = this.age;
|
|
45
|
-
cloned.email = this.email;
|
|
46
|
-
return cloned;
|
|
37
|
+
static clone(value: User): User {
|
|
38
|
+
return userClone(value);
|
|
47
39
|
}
|
|
48
40
|
|
|
49
|
-
equals(
|
|
50
|
-
|
|
51
|
-
if (!(other instanceof User)) return false;
|
|
52
|
-
const typedOther = other as User;
|
|
53
|
-
return (
|
|
54
|
-
this.name === typedOther.name &&
|
|
55
|
-
this.age === typedOther.age &&
|
|
56
|
-
this.email === typedOther.email
|
|
57
|
-
);
|
|
41
|
+
static equals(a: User, b: User): boolean {
|
|
42
|
+
return userEquals(a, b);
|
|
58
43
|
}
|
|
59
44
|
}
|
|
45
|
+
|
|
46
|
+
export function userToString(value: User): string {
|
|
47
|
+
const parts: string[] = [];
|
|
48
|
+
parts.push('name: ' + value.name);
|
|
49
|
+
parts.push('age: ' + value.age);
|
|
50
|
+
parts.push('email: ' + value.email);
|
|
51
|
+
return 'User { ' + parts.join(', ') + ' }';
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function userClone(value: User): User {
|
|
55
|
+
const cloned = Object.create(Object.getPrototypeOf(value));
|
|
56
|
+
cloned.name = value.name;
|
|
57
|
+
cloned.age = value.age;
|
|
58
|
+
cloned.email = value.email;
|
|
59
|
+
return cloned;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function userEquals(a: User, b: User): boolean {
|
|
63
|
+
if (a === b) return true;
|
|
64
|
+
return a.name === b.name && a.age === b.age && a.email === b.email;
|
|
65
|
+
}
|
|
60
66
|
``` ## Using the Generated Methods
|
|
61
67
|
```
|
|
62
68
|
const user = new User("Alice", 30, "alice@example.com");
|
|
@@ -110,13 +116,17 @@ export class User {
|
|
|
110
116
|
this.password = password;
|
|
111
117
|
}
|
|
112
118
|
|
|
113
|
-
toString(): string {
|
|
114
|
-
|
|
115
|
-
parts.push('userId: ' + this.id);
|
|
116
|
-
parts.push('name: ' + this.name);
|
|
117
|
-
return 'User { ' + parts.join(', ') + ' }';
|
|
119
|
+
static toString(value: User): string {
|
|
120
|
+
return userToString(value);
|
|
118
121
|
}
|
|
119
122
|
}
|
|
123
|
+
|
|
124
|
+
export function userToString(value: User): string {
|
|
125
|
+
const parts: string[] = [];
|
|
126
|
+
parts.push('userId: ' + value.id);
|
|
127
|
+
parts.push('name: ' + value.name);
|
|
128
|
+
return 'User { ' + parts.join(', ') + ' }';
|
|
129
|
+
}
|
|
120
130
|
``` ```
|
|
121
131
|
const user = new User(42, "Alice", "secret123");
|
|
122
132
|
console.log(user.toString());
|
package/docs/sections.json
CHANGED
|
@@ -103,13 +103,91 @@
|
|
|
103
103
|
"path": "builtin-macros/partial-ord.md",
|
|
104
104
|
"use_cases": "compareTo, partial ordering, sorting, nullable comparison"
|
|
105
105
|
},
|
|
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
|
+
},
|
|
106
133
|
{
|
|
107
134
|
"id": "serialize",
|
|
108
135
|
"title": "Serialize",
|
|
109
136
|
"category": "builtin-macros",
|
|
110
137
|
"category_title": "Built-in Macros",
|
|
111
138
|
"path": "builtin-macros/serialize.md",
|
|
112
|
-
"use_cases": "toJSON, serialization, json, api, data transfer"
|
|
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
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"id": "deserialize/overview",
|
|
149
|
+
"title": "Deserialize: Overview",
|
|
150
|
+
"category": "builtin-macros",
|
|
151
|
+
"category_title": "Built-in Macros",
|
|
152
|
+
"path": "builtin-macros/deserialize/overview.md",
|
|
153
|
+
"use_cases": "fromJSON, deserialization, deserialize, classnamedeserialize(input), enumnamedeserialize(input)",
|
|
154
|
+
"parent_id": "deserialize"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"id": "deserialize/cycleforward-reference-support",
|
|
158
|
+
"title": "Deserialize: Cycle/Forward-Reference Support",
|
|
159
|
+
"category": "builtin-macros",
|
|
160
|
+
"category_title": "Built-in Macros",
|
|
161
|
+
"path": "builtin-macros/deserialize/cycleforward-reference-support.md",
|
|
162
|
+
"use_cases": "fromJSON, deserialization, pendingref, ctx.applypatches(), __ref",
|
|
163
|
+
"parent_id": "deserialize"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"id": "deserialize/validation",
|
|
167
|
+
"title": "Deserialize: Validation",
|
|
168
|
+
"category": "builtin-macros",
|
|
169
|
+
"category_title": "Built-in Macros",
|
|
170
|
+
"path": "builtin-macros/deserialize/validation.md",
|
|
171
|
+
"use_cases": "fromJSON, deserialization, @serde(validate(...)), email, url, uuid",
|
|
172
|
+
"parent_id": "deserialize"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"id": "deserialize/union-type-deserialization",
|
|
176
|
+
"title": "Deserialize: Union Type Deserialization",
|
|
177
|
+
"category": "builtin-macros",
|
|
178
|
+
"category_title": "Built-in Macros",
|
|
179
|
+
"path": "builtin-macros/deserialize/union-type-deserialization.md",
|
|
180
|
+
"use_cases": "fromJSON, deserialization, typeof, __type",
|
|
181
|
+
"parent_id": "deserialize"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "deserialize/example",
|
|
185
|
+
"title": "Deserialize: Example",
|
|
186
|
+
"category": "builtin-macros",
|
|
187
|
+
"category_title": "Built-in Macros",
|
|
188
|
+
"path": "builtin-macros/deserialize/example.md",
|
|
189
|
+
"use_cases": "fromJSON, deserialization",
|
|
190
|
+
"parent_id": "deserialize"
|
|
113
191
|
},
|
|
114
192
|
{
|
|
115
193
|
"id": "deserialize",
|
|
@@ -117,7 +195,15 @@
|
|
|
117
195
|
"category": "builtin-macros",
|
|
118
196
|
"category_title": "Built-in Macros",
|
|
119
197
|
"path": "builtin-macros/deserialize.md",
|
|
120
|
-
"use_cases": "fromJSON, deserialization, parsing, validation, json"
|
|
198
|
+
"use_cases": "fromJSON, deserialization, parsing, validation, json",
|
|
199
|
+
"is_chunked": true,
|
|
200
|
+
"chunk_ids": [
|
|
201
|
+
"deserialize/overview",
|
|
202
|
+
"deserialize/cycleforward-reference-support",
|
|
203
|
+
"deserialize/validation",
|
|
204
|
+
"deserialize/union-type-deserialization",
|
|
205
|
+
"deserialize/example"
|
|
206
|
+
]
|
|
121
207
|
},
|
|
122
208
|
{
|
|
123
209
|
"id": "custom-overview",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@macroforge/mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
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.
|
|
32
|
+
"macroforge": "^0.1.38"
|
|
33
33
|
},
|
|
34
34
|
"peerDependenciesMeta": {
|
|
35
35
|
"macroforge": {
|