locus-product-planning 1.2.8 → 1.2.9
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/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12579,6 +12579,9 @@ function getLocusAgentsDir() {
|
|
|
12579
12579
|
return root + sep + "agents";
|
|
12580
12580
|
}
|
|
12581
12581
|
function extractFrontmatter(filePath) {
|
|
12582
|
+
if (typeof filePath !== "string" || !filePath) {
|
|
12583
|
+
return { name: "", description: "" };
|
|
12584
|
+
}
|
|
12582
12585
|
try {
|
|
12583
12586
|
const content = readFileSync(filePath, "utf-8");
|
|
12584
12587
|
const lines = content.replace(/\r\n/g, "\n").split("\n");
|
|
@@ -12663,6 +12666,9 @@ function extractFrontmatter(filePath) {
|
|
|
12663
12666
|
}
|
|
12664
12667
|
}
|
|
12665
12668
|
function stripFrontmatter(content) {
|
|
12669
|
+
if (typeof content !== "string") {
|
|
12670
|
+
return "";
|
|
12671
|
+
}
|
|
12666
12672
|
const lines = content.split("\n");
|
|
12667
12673
|
let inFrontmatter = false;
|
|
12668
12674
|
let frontmatterEnded = false;
|
|
@@ -12684,6 +12690,7 @@ function stripFrontmatter(content) {
|
|
|
12684
12690
|
}
|
|
12685
12691
|
function findSkillsInDir(dir, sourceType, maxDepth = 4) {
|
|
12686
12692
|
const skills = [];
|
|
12693
|
+
if (typeof dir !== "string" || !dir) return skills;
|
|
12687
12694
|
if (!existsSync(dir)) return skills;
|
|
12688
12695
|
function recurse(currentDir, depth) {
|
|
12689
12696
|
if (depth > maxDepth) return;
|
|
@@ -12721,6 +12728,7 @@ function findSkillsInDir(dir, sourceType, maxDepth = 4) {
|
|
|
12721
12728
|
}
|
|
12722
12729
|
function findAgentsInDir(dir, maxDepth = 3) {
|
|
12723
12730
|
const agents = [];
|
|
12731
|
+
if (typeof dir !== "string" || !dir) return agents;
|
|
12724
12732
|
if (!existsSync(dir)) return agents;
|
|
12725
12733
|
function recurse(currentDir, depth, category) {
|
|
12726
12734
|
if (depth > maxDepth) return;
|