locus-product-planning 1.2.7 → 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 +13 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -12615,6 +12615,9 @@ function getLocusAgentsDir() {
|
|
|
12615
12615
|
return root + sep + "agents";
|
|
12616
12616
|
}
|
|
12617
12617
|
function extractFrontmatter(filePath) {
|
|
12618
|
+
if (typeof filePath !== "string" || !filePath) {
|
|
12619
|
+
return { name: "", description: "" };
|
|
12620
|
+
}
|
|
12618
12621
|
try {
|
|
12619
12622
|
const content = (0, import_fs.readFileSync)(filePath, "utf-8");
|
|
12620
12623
|
const lines = content.replace(/\r\n/g, "\n").split("\n");
|
|
@@ -12699,6 +12702,9 @@ function extractFrontmatter(filePath) {
|
|
|
12699
12702
|
}
|
|
12700
12703
|
}
|
|
12701
12704
|
function stripFrontmatter(content) {
|
|
12705
|
+
if (typeof content !== "string") {
|
|
12706
|
+
return "";
|
|
12707
|
+
}
|
|
12702
12708
|
const lines = content.split("\n");
|
|
12703
12709
|
let inFrontmatter = false;
|
|
12704
12710
|
let frontmatterEnded = false;
|
|
@@ -12720,6 +12726,7 @@ function stripFrontmatter(content) {
|
|
|
12720
12726
|
}
|
|
12721
12727
|
function findSkillsInDir(dir, sourceType, maxDepth = 4) {
|
|
12722
12728
|
const skills = [];
|
|
12729
|
+
if (typeof dir !== "string" || !dir) return skills;
|
|
12723
12730
|
if (!(0, import_fs.existsSync)(dir)) return skills;
|
|
12724
12731
|
function recurse(currentDir, depth) {
|
|
12725
12732
|
if (depth > maxDepth) return;
|
|
@@ -12757,6 +12764,7 @@ function findSkillsInDir(dir, sourceType, maxDepth = 4) {
|
|
|
12757
12764
|
}
|
|
12758
12765
|
function findAgentsInDir(dir, maxDepth = 3) {
|
|
12759
12766
|
const agents = [];
|
|
12767
|
+
if (typeof dir !== "string" || !dir) return agents;
|
|
12760
12768
|
if (!(0, import_fs.existsSync)(dir)) return agents;
|
|
12761
12769
|
function recurse(currentDir, depth, category) {
|
|
12762
12770
|
if (depth > maxDepth) return;
|
|
@@ -12787,6 +12795,9 @@ function findAgentsInDir(dir, maxDepth = 3) {
|
|
|
12787
12795
|
return agents;
|
|
12788
12796
|
}
|
|
12789
12797
|
function resolveSkillPath(skillName, locusSkillsDir, personalSkillsDir, projectSkillsDir) {
|
|
12798
|
+
if (typeof skillName !== "string" || !skillName) {
|
|
12799
|
+
return null;
|
|
12800
|
+
}
|
|
12790
12801
|
const forceProject = skillName.startsWith("project:");
|
|
12791
12802
|
const forceLocus = skillName.startsWith("locus:");
|
|
12792
12803
|
const actualSkillName = skillName.replace(/^project:/, "").replace(/^locus:/, "");
|
|
@@ -12804,6 +12815,8 @@ function resolveSkillPath(skillName, locusSkillsDir, personalSkillsDir, projectS
|
|
|
12804
12815
|
return null;
|
|
12805
12816
|
}
|
|
12806
12817
|
function findSkillByName(baseDir, skillName, sourceType) {
|
|
12818
|
+
if (typeof baseDir !== "string" || !baseDir) return null;
|
|
12819
|
+
if (typeof skillName !== "string" || !skillName) return null;
|
|
12807
12820
|
if (!(0, import_fs.existsSync)(baseDir)) return null;
|
|
12808
12821
|
const directPath = safeJoin(baseDir, skillName);
|
|
12809
12822
|
const directSkillFile = safeJoin(directPath, "SKILL.md");
|