skill-os 0.1.5 → 0.1.6
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/lib/sync.js +11 -11
- package/package.json +1 -1
package/lib/sync.js
CHANGED
|
@@ -96,22 +96,22 @@ function cmdSync() {
|
|
|
96
96
|
// 解析 frontmatter
|
|
97
97
|
const fm = parseSkillMdFrontmatter(skillMdPath);
|
|
98
98
|
|
|
99
|
-
if (!fm || !fm.name) {
|
|
100
|
-
errors.push({ path: skillPath, error: 'Missing or invalid frontmatter (
|
|
99
|
+
if (!fm || !fm.name || !fm.description) {
|
|
100
|
+
errors.push({ path: skillPath, error: 'Missing or invalid frontmatter (requires "name" and "description" fields)' });
|
|
101
101
|
skippedCount++;
|
|
102
102
|
continue;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
//
|
|
106
|
-
const v = new Validator();
|
|
107
|
-
const result = v.validate(fm, skillSchema);
|
|
105
|
+
// 基础校验(根据需求放宽其他条件校验)
|
|
106
|
+
// const v = new Validator();
|
|
107
|
+
// const result = v.validate(fm, skillSchema);
|
|
108
108
|
|
|
109
|
-
if (!result.valid) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
109
|
+
// if (!result.valid) {
|
|
110
|
+
// const msgs = result.errors.map(e => e.stack.replace('instance.', '')).join('; ');
|
|
111
|
+
// errors.push({ path: skillPath, error: msgs });
|
|
112
|
+
// skippedCount++;
|
|
113
|
+
// continue;
|
|
114
|
+
// }
|
|
115
115
|
|
|
116
116
|
// 构建索引条目
|
|
117
117
|
newSkills[skillPath] = {
|