log-llm-config 1.5.14 → 1.5.15

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.
@@ -119,20 +119,20 @@ function autofixDialogLine(v) {
119
119
  const short = d.length > 160 ? `${d.slice(0, 157)}…` : d;
120
120
  return `• [${v.finding_formatted_id}] ${short}`;
121
121
  }
122
- /** Policy name(s) for preventive enforcement dialog copy. */
123
- function uniquePolicyLabelsFromViolations(appliedViolations) {
124
- const policyNames = [
122
+ /** Ruleset name(s) for preventive enforcement dialog copy. */
123
+ function uniqueRulesetLabelsFromViolations(appliedViolations) {
124
+ const rulesetNames = [
125
125
  ...new Set(appliedViolations
126
- .map((v) => v.policy_name?.trim() || v.finding_title?.trim() || '')
126
+ .map((v) => v.ruleset_name?.trim() || v.finding_title?.trim() || '')
127
127
  .filter(Boolean)),
128
128
  ];
129
- return policyNames.length > 0 ? policyNames.join('\n\n') : 'Agent security policy';
129
+ return rulesetNames.length > 0 ? rulesetNames.join('\n\n') : 'Agent security policy';
130
130
  }
131
131
  function formatPreventiveAutofixDialog(appliedViolations, applyLine) {
132
132
  const changePreview = formatRemediationChangePreviewForApplied(appliedViolations);
133
133
  const changePreviewBlock = changePreview ? `${changePreview}\n\n` : '';
134
134
  return ('Optimus Labs enforced a preventive agent security policy as determined by your security team:\n\n' +
135
- `${uniquePolicyLabelsFromViolations(appliedViolations)}\n\n` +
135
+ `${uniqueRulesetLabelsFromViolations(appliedViolations)}\n\n` +
136
136
  changePreviewBlock +
137
137
  `${applyLine}\n\n` +
138
138
  'Click OK to continue');
@@ -339,7 +339,7 @@ export async function runCompliancePromptGate() {
339
339
  ? formatCopilotAutofixDialog(appliedViolations)
340
340
  : ide === 'opencode'
341
341
  ? formatOpenCodeAutofixDialog(appliedViolations)
342
- : `Optimus Labs auto-fixed ${fixed} ${fixed === 1 ? 'policy violation' : 'policy violations'}:\n\n${appliedViolations
342
+ : `Optimus Labs auto-fixed ${fixed} ${fixed === 1 ? 'ruleset violation' : 'ruleset violations'}:\n\n${appliedViolations
343
343
  .map((v) => autofixDialogLine(v))
344
344
  .join('\n')}${changePreviewSuffix}`;
345
345
  const payload = { __optimus_autofix: true, autofix_message: autofixMessage };
@@ -349,7 +349,7 @@ export async function runCompliancePromptGate() {
349
349
  // Restarts: always executed by optimus-compliance-check.sh via execute_trusted_restarts (TS allowlist + spawn).
350
350
  return;
351
351
  }
352
- const msg = recheck.violations[0]?.message ?? 'A security policy violation has been detected.';
352
+ const msg = recheck.violations[0]?.message ?? 'A security ruleset violation has been detected.';
353
353
  logRemediationApplyFailure('prompt_gate_block_recheck_failed', {
354
354
  reason: 'after autofix, local compliance recheck still reports violations',
355
355
  ide,
@@ -372,7 +372,7 @@ export async function runCompliancePromptGate() {
372
372
  console.log(blockPayload(ide, msg));
373
373
  return;
374
374
  }
375
- const msg = status.violations[0]?.message ?? 'A security policy violation has been detected.';
375
+ const msg = status.violations[0]?.message ?? 'A security ruleset violation has been detected.';
376
376
  logRemediationApplyFailure('prompt_gate_block_violations_no_autofix_applied', {
377
377
  reason: 'violations on submit but autofix did not succeed — see autofix_skipped_not_allowed, enforceRemediation, or compliance_check entries',
378
378
  ide,
@@ -212,7 +212,7 @@ function violationFromSecretScanFinding(entry, compliance, finding) {
212
212
  description: compliance.description,
213
213
  finding_title: entry.finding_title,
214
214
  finding_description: entry.finding_description,
215
- policy_name: entry.policy_name,
215
+ ruleset_name: entry.ruleset_name,
216
216
  severity: compliance.severity,
217
217
  autofix_allowed: compliance.autofix_allowed,
218
218
  config_file_path: entry.config_file_path,
@@ -353,7 +353,7 @@ function violationFromCheck(entry, compliance, check, expected) {
353
353
  description: check.description,
354
354
  finding_title: entry.finding_title,
355
355
  finding_description: entry.finding_description,
356
- policy_name: entry.policy_name,
356
+ ruleset_name: entry.ruleset_name,
357
357
  severity: compliance.severity,
358
358
  autofix_allowed: compliance.autofix_allowed,
359
359
  config_file_path: entry.config_file_path,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "log-llm-config",
3
- "version": "1.5.14",
3
+ "version": "1.5.15",
4
4
  "description": "CLI helpers for logging hardware UUIDs and posting startup payloads to Optimus Security.",
5
5
  "type": "module",
6
6
  "bin": {