@lousy-agents/cli 2.11.0 → 3.0.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 +70 -29
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +27 -0
- package/dist/mcp-server.js.map +1 -1
- package/package.json +1 -1
package/dist/mcp-server.js
CHANGED
|
@@ -45574,6 +45574,15 @@ const RulesetSchema = schemas_object({
|
|
|
45574
45574
|
enforcement: schemas_string(),
|
|
45575
45575
|
rules: schemas_array(RulesetRuleSchema).optional()
|
|
45576
45576
|
});
|
|
45577
|
+
const RepoSecuritySchema = schemas_object({
|
|
45578
|
+
// biome-ignore lint/style/useNamingConvention: GitHub API schema requires snake_case
|
|
45579
|
+
security_and_analysis: schemas_object({
|
|
45580
|
+
// biome-ignore lint/style/useNamingConvention: GitHub API schema requires snake_case
|
|
45581
|
+
advanced_security: schemas_object({
|
|
45582
|
+
status: schemas_string()
|
|
45583
|
+
})
|
|
45584
|
+
}).optional()
|
|
45585
|
+
});
|
|
45577
45586
|
/**
|
|
45578
45587
|
* Parses a GitHub remote URL to extract owner and repo name
|
|
45579
45588
|
*/ function parseRepoFromRemoteUrl(remoteUrl) {
|
|
@@ -45648,6 +45657,24 @@ function defaultExec(command, args, options) {
|
|
|
45648
45657
|
return null;
|
|
45649
45658
|
}
|
|
45650
45659
|
}
|
|
45660
|
+
async hasAdvancedSecurity(owner, repo) {
|
|
45661
|
+
if (!this.octokit) {
|
|
45662
|
+
return false;
|
|
45663
|
+
}
|
|
45664
|
+
try {
|
|
45665
|
+
const { data } = await this.octokit.rest.repos.get({
|
|
45666
|
+
owner,
|
|
45667
|
+
repo
|
|
45668
|
+
});
|
|
45669
|
+
const parsed = RepoSecuritySchema.safeParse(data);
|
|
45670
|
+
if (!parsed.success) {
|
|
45671
|
+
return false;
|
|
45672
|
+
}
|
|
45673
|
+
return parsed.data.security_and_analysis?.advanced_security?.status === "enabled";
|
|
45674
|
+
} catch {
|
|
45675
|
+
return false;
|
|
45676
|
+
}
|
|
45677
|
+
}
|
|
45651
45678
|
async listRulesets(owner, repo) {
|
|
45652
45679
|
if (!this.octokit) {
|
|
45653
45680
|
throw new Error("Not authenticated");
|