@lousy-agents/cli 2.6.1 → 2.7.0
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.js +287 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +85 -0
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -45578,6 +45578,90 @@ async function watchConfig(options) {
|
|
|
45578
45578
|
return new FileSystemSkillFileGateway();
|
|
45579
45579
|
}
|
|
45580
45580
|
|
|
45581
|
+
;// CONCATENATED MODULE: ./src/gateways/skill-lint-gateway.ts
|
|
45582
|
+
/**
|
|
45583
|
+
* Gateway for skill lint file system operations.
|
|
45584
|
+
* Discovers skill files and parses YAML frontmatter.
|
|
45585
|
+
*/
|
|
45586
|
+
|
|
45587
|
+
|
|
45588
|
+
|
|
45589
|
+
/**
|
|
45590
|
+
* File system implementation of the skill lint gateway.
|
|
45591
|
+
*/ class FileSystemSkillLintGateway {
|
|
45592
|
+
async discoverSkills(targetDir) {
|
|
45593
|
+
const skillsDir = join(targetDir, ".github", "skills");
|
|
45594
|
+
if (!await fileExists(skillsDir)) {
|
|
45595
|
+
return [];
|
|
45596
|
+
}
|
|
45597
|
+
const entries = await readdir(skillsDir, {
|
|
45598
|
+
withFileTypes: true
|
|
45599
|
+
});
|
|
45600
|
+
const skills = [];
|
|
45601
|
+
for (const entry of entries){
|
|
45602
|
+
if (!entry.isDirectory()) {
|
|
45603
|
+
continue;
|
|
45604
|
+
}
|
|
45605
|
+
if (entry.name.includes("..") || entry.name.includes("/") || entry.name.includes("\\")) {
|
|
45606
|
+
continue;
|
|
45607
|
+
}
|
|
45608
|
+
const skillFilePath = join(skillsDir, entry.name, "SKILL.md");
|
|
45609
|
+
if (await fileExists(skillFilePath)) {
|
|
45610
|
+
skills.push({
|
|
45611
|
+
filePath: skillFilePath,
|
|
45612
|
+
skillName: entry.name
|
|
45613
|
+
});
|
|
45614
|
+
}
|
|
45615
|
+
}
|
|
45616
|
+
return skills;
|
|
45617
|
+
}
|
|
45618
|
+
async readSkillFileContent(filePath) {
|
|
45619
|
+
return readFile(filePath, "utf-8");
|
|
45620
|
+
}
|
|
45621
|
+
parseFrontmatter(content) {
|
|
45622
|
+
const lines = content.split("\n");
|
|
45623
|
+
if (lines[0]?.trim() !== "---") {
|
|
45624
|
+
return null;
|
|
45625
|
+
}
|
|
45626
|
+
let endIndex = -1;
|
|
45627
|
+
for(let i = 1; i < lines.length; i++){
|
|
45628
|
+
if (lines[i]?.trim() === "---") {
|
|
45629
|
+
endIndex = i;
|
|
45630
|
+
break;
|
|
45631
|
+
}
|
|
45632
|
+
}
|
|
45633
|
+
if (endIndex === -1) {
|
|
45634
|
+
return null;
|
|
45635
|
+
}
|
|
45636
|
+
const yamlContent = lines.slice(1, endIndex).join("\n");
|
|
45637
|
+
let data;
|
|
45638
|
+
try {
|
|
45639
|
+
const parsed = parseYaml(yamlContent);
|
|
45640
|
+
data = parsed !== null && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {};
|
|
45641
|
+
} catch {
|
|
45642
|
+
return null;
|
|
45643
|
+
}
|
|
45644
|
+
const fieldLines = new Map();
|
|
45645
|
+
for(let i = 1; i < endIndex; i++){
|
|
45646
|
+
// Match YAML top-level field names: non-whitespace start, any chars except colon, then colon+space
|
|
45647
|
+
const match = lines[i]?.match(/^([^\s:][^:]*?):\s/);
|
|
45648
|
+
if (match?.[1]) {
|
|
45649
|
+
fieldLines.set(match[1], i + 1);
|
|
45650
|
+
}
|
|
45651
|
+
}
|
|
45652
|
+
return {
|
|
45653
|
+
data: data ?? {},
|
|
45654
|
+
fieldLines,
|
|
45655
|
+
frontmatterStartLine: 1
|
|
45656
|
+
};
|
|
45657
|
+
}
|
|
45658
|
+
}
|
|
45659
|
+
/**
|
|
45660
|
+
* Creates and returns the default skill lint gateway.
|
|
45661
|
+
*/ function createSkillLintGateway() {
|
|
45662
|
+
return new FileSystemSkillLintGateway();
|
|
45663
|
+
}
|
|
45664
|
+
|
|
45581
45665
|
;// CONCATENATED MODULE: ./src/gateways/tool-discovery-gateway.ts
|
|
45582
45666
|
/**
|
|
45583
45667
|
* Gateway for discovering CLI tools and commands from GitHub Actions workflows
|
|
@@ -46034,6 +46118,7 @@ async function watchConfig(options) {
|
|
|
46034
46118
|
|
|
46035
46119
|
|
|
46036
46120
|
|
|
46121
|
+
|
|
46037
46122
|
;// CONCATENATED MODULE: ./src/mcp/tools/types.ts
|
|
46038
46123
|
/**
|
|
46039
46124
|
* Shared types and utilities for MCP tool handlers.
|