117
*/
118
toCustomizations(): PluginCustomization[] {
120
>
const base = plugin.synced.customization;
121
>
const children = plugin.parsed ? parsedPluginChildren(plugin.parsed) : base.children;
122
>
return {
123
>
...base,
124
>
enabled: this._isEnabled(base.id),
125
>
...(children ? { children } : {}),
126
>
};
127
>
});
128
>
}
129
}
130
131
/** Collects every child customization a parsed plugin exposes, deduped by id. */
133
>
const byId = new Map<string, ChildCustomization>();
134
>
const add = (c: ChildCustomization) => { if (!byId.has(c.id)) { byId.set(c.id, c); } };
135
>
for (const a of parsed.agents) { add(a.customization); }
136
>
for (const s of parsed.skills) { add(s.customization); }
137
>
for (const r of parsed.instructions) { add(r.customization); }
138
>
for (const h of parsed.hooks) { add(h.customization); }
139
>
for (const m of parsed.mcpServers) { add(m.customization); }
140
>
return [...byId.values()];
141
>
}
142
143
/**