@sweny-ai/core 0.1.103 → 0.1.104
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/dist/skills/custom-loader.js +12 -6
- package/package.json +1 -1
|
@@ -249,14 +249,20 @@ export function configuredSkillsWithDiagnostics(env = process.env, cwd) {
|
|
|
249
249
|
// Custom skills can override built-in IDs. When overriding, merge:
|
|
250
250
|
// keep the built-in's tools and config, add the custom instruction/mcp.
|
|
251
251
|
const configuredMap = new Map(configured.map((s) => [s.id, s]));
|
|
252
|
+
// Resolve override targets against the FULL built-in set, not the
|
|
253
|
+
// env-filtered `configured` list. Otherwise a custom override of a built-in
|
|
254
|
+
// whose required env var happens to be unset falls through to the
|
|
255
|
+
// "net-new custom skill" branch and silently drops the built-in's tools.
|
|
256
|
+
// The tool surface of a built-in must not hinge on an unrelated env check.
|
|
257
|
+
const builtinById = new Map(builtinSkills.map((s) => [s.id, s]));
|
|
252
258
|
for (const skill of custom) {
|
|
253
|
-
const
|
|
254
|
-
if (
|
|
259
|
+
const base = configuredMap.get(skill.id) ?? builtinById.get(skill.id);
|
|
260
|
+
if (base) {
|
|
255
261
|
configuredMap.set(skill.id, {
|
|
256
|
-
...
|
|
257
|
-
config: { ...
|
|
258
|
-
instruction: skill.instruction ??
|
|
259
|
-
mcp: skill.mcp ??
|
|
262
|
+
...base,
|
|
263
|
+
config: { ...base.config, ...skill.config },
|
|
264
|
+
instruction: skill.instruction ?? base.instruction,
|
|
265
|
+
mcp: skill.mcp ?? base.mcp,
|
|
260
266
|
});
|
|
261
267
|
}
|
|
262
268
|
else {
|