@lousy-agents/cli 2.10.1 → 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.
@@ -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");
@@ -65785,7 +65812,9 @@ const remark = unified().use(remarkParse).use(remarkStringify).freeze()
65785
65812
  commandScores: [],
65786
65813
  overallQualityScore: 0,
65787
65814
  suggestions: [
65788
- "No agent instruction files found. Supported formats: .github/copilot-instructions.md, .github/instructions/*.md, .github/agents/*.md, AGENTS.md, CLAUDE.md"
65815
+ {
65816
+ message: "No agent instruction files found. Supported formats: .github/copilot-instructions.md, .github/instructions/*.md, .github/agents/*.md, AGENTS.md, CLAUDE.md"
65817
+ }
65789
65818
  ],
65790
65819
  parsingErrors: []
65791
65820
  },
@@ -65852,7 +65881,10 @@ const remark = unified().use(remarkParse).use(remarkStringify).freeze()
65852
65881
  const suggestions = this.generateSuggestions(commandScores);
65853
65882
  if (parsingErrors.length > 0) {
65854
65883
  const skippedFiles = parsingErrors.map((pe)=>pe.filePath).join(", ");
65855
- suggestions.push(`${parsingErrors.length} file(s) could not be parsed and were skipped: ${skippedFiles}. Analysis may be incomplete.`);
65884
+ suggestions.push({
65885
+ message: `${parsingErrors.length} file(s) could not be parsed and were skipped: ${skippedFiles}. Analysis may be incomplete.`,
65886
+ ruleId: "instruction/parse-error"
65887
+ });
65856
65888
  }
65857
65889
  return {
65858
65890
  result: {
@@ -66066,22 +66098,33 @@ const remark = unified().use(remarkParse).use(remarkStringify).freeze()
66066
66098
  const lowStructural = commandScores.filter((s)=>s.structuralContext === 0 && s.bestSourceFile !== "");
66067
66099
  if (lowStructural.length > 0) {
66068
66100
  const names = lowStructural.map((s)=>s.commandName).join(", ");
66069
- suggestions.push(`Commands not under a dedicated section: ${names}. Add a heading like "## Validation" or "## Feedback Loop" above these commands.`);
66101
+ suggestions.push({
66102
+ message: `Commands not under a dedicated section: ${names}. Add a heading like "## Validation" or "## Feedback Loop" above these commands.`,
66103
+ ruleId: "instruction/command-outside-section"
66104
+ });
66070
66105
  }
66071
66106
  const lowExecution = commandScores.filter((s)=>s.executionClarity === 0 && s.bestSourceFile !== "");
66072
66107
  if (lowExecution.length > 0) {
66073
66108
  const names = lowExecution.map((s)=>s.commandName).join(", ");
66074
- suggestions.push(`Commands not in code blocks: ${names}. Document these commands in fenced code blocks for clarity.`);
66109
+ suggestions.push({
66110
+ message: `Commands not in code blocks: ${names}. Document these commands in fenced code blocks for clarity.`,
66111
+ ruleId: "instruction/command-not-in-code-block"
66112
+ });
66075
66113
  }
66076
66114
  const lowLoop = commandScores.filter((s)=>s.loopCompleteness === 0 && s.executionClarity === 1 && s.bestSourceFile !== "");
66077
66115
  if (lowLoop.length > 0) {
66078
66116
  const names = lowLoop.map((s)=>s.commandName).join(", ");
66079
- suggestions.push(`Commands missing error handling guidance: ${names}. Add instructions for what to do if the command fails.`);
66117
+ suggestions.push({
66118
+ message: `Commands missing error handling guidance: ${names}. Add instructions for what to do if the command fails.`,
66119
+ ruleId: "instruction/missing-error-handling"
66120
+ });
66080
66121
  }
66081
66122
  const notFound = commandScores.filter((s)=>s.bestSourceFile === "");
66082
66123
  if (notFound.length > 0) {
66083
66124
  const names = notFound.map((s)=>s.commandName).join(", ");
66084
- suggestions.push(`Commands not found in any instruction file: ${names}. Document these feedback loop commands in your instruction files.`);
66125
+ suggestions.push({
66126
+ message: `Commands not found in any instruction file: ${names}. Document these feedback loop commands in your instruction files.`
66127
+ });
66085
66128
  }
66086
66129
  return suggestions;
66087
66130
  }
@@ -66126,7 +66169,7 @@ const remark = unified().use(remarkParse).use(remarkStringify).freeze()
66126
66169
  bestSourceFile: s.bestSourceFile
66127
66170
  })),
66128
66171
  overallQualityScore: output.result.overallQualityScore,
66129
- suggestions: output.result.suggestions,
66172
+ suggestions: output.result.suggestions.map((s)=>s.message),
66130
66173
  parsingErrors: output.result.parsingErrors,
66131
66174
  diagnostics: output.diagnostics.map((d)=>({
66132
66175
  filePath: d.filePath,