agent-enderun 1.10.1 → 1.10.2
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/bin/validate-agent-army.js +12 -16
- package/package.json +2 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
import path from "path";
|
|
5
|
+
import yaml from "js-yaml";
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* AL-compatible agent folder names across all adapters (after init).
|
|
@@ -43,24 +44,19 @@ function detectFrameworkDir() {
|
|
|
43
44
|
*/
|
|
44
45
|
function parseFrontmatter(content) {
|
|
45
46
|
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
46
|
-
const fm = {};
|
|
47
47
|
if (match) {
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
fm[key.trim()] = value;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
48
|
+
try {
|
|
49
|
+
const fm = yaml.load(match[1]);
|
|
50
|
+
return fm || {};
|
|
51
|
+
} catch (e) {
|
|
52
|
+
// Fallback to simpler parsing or handle error
|
|
53
|
+
console.error("Error parsing YAML frontmatter:", e);
|
|
54
|
+
return {};
|
|
55
|
+
}
|
|
60
56
|
}
|
|
61
|
-
|
|
62
57
|
// Also parse from HTML comments in the body as fallback to bypass strict frontmatter checks
|
|
63
58
|
const commentMatches = content.matchAll(/<!--\s*(\w+)\s*:\s*(.*?)\s*-->/g);
|
|
59
|
+
const fmFromComments = {};
|
|
64
60
|
for (const m of commentMatches) {
|
|
65
61
|
let value = m[2].trim();
|
|
66
62
|
if (value.startsWith("[") && value.endsWith("]")) {
|
|
@@ -68,10 +64,10 @@ function parseFrontmatter(content) {
|
|
|
68
64
|
} else if (value.startsWith("\"") && value.endsWith("\"")) {
|
|
69
65
|
value = value.slice(1, -1);
|
|
70
66
|
}
|
|
71
|
-
|
|
67
|
+
fmFromComments[m[1]] = value;
|
|
72
68
|
}
|
|
73
69
|
|
|
74
|
-
return Object.keys(
|
|
70
|
+
return Object.keys(fmFromComments).length > 0 ? fmFromComments : null;
|
|
75
71
|
}
|
|
76
72
|
|
|
77
73
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-enderun",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.2",
|
|
4
4
|
"description": "The Supreme AI Governance & Autonomous Orchestration Framework for Enterprise Development. Acts as a Corporate AI Management Assistant.",
|
|
5
5
|
"author": "Yusuf BEKAR",
|
|
6
6
|
"license": "MIT",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"chalk": "^5.6.2",
|
|
78
|
+
"js-yaml": "^4.2.0",
|
|
78
79
|
"zod": "^3.24.2"
|
|
79
80
|
}
|
|
80
81
|
}
|