log-llm-config 1.3.26 → 1.3.29

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/cli.js CHANGED
@@ -38,6 +38,23 @@ const main = async () => {
38
38
  await import('./compliance_check_runner.js');
39
39
  return;
40
40
  }
41
+ // `npx log-llm-config@latest <name>` runs this file (default bin) with args[0] set — not the named bin file.
42
+ if (args[0] === 'execute-trusted-restarts') {
43
+ const { runExecuteTrustedRestartsFromStdin } = await import('./execute_trusted_restarts.js');
44
+ try {
45
+ runExecuteTrustedRestartsFromStdin();
46
+ }
47
+ catch (e) {
48
+ console.error(e instanceof Error ? e.message : String(e));
49
+ process.exit(1);
50
+ }
51
+ process.exit(0);
52
+ return;
53
+ }
54
+ if (args[0] === 'apply-deferred-vscdb') {
55
+ await import('./apply_deferred_vscdb.js');
56
+ return;
57
+ }
41
58
  // No command matched — output legacy bash script
42
59
  console.log(renderBashScript());
43
60
  };
@@ -141,7 +141,10 @@ export async function runCompliancePromptGate() {
141
141
  hookRunLog('compliance_prompt_gate: Claude — autofix wrote JSON; recheck still flags same UUID(s) — proceeding (immediate apply)');
142
142
  }
143
143
  if (deferredSqlitePending || recheckOk || claudeRecheckStaleAfterImmediateApply) {
144
- const autofixMessage = `Optimus Security auto-fixed ${fixed} policy violation(s):\n${appliedViolations.map((v) => autofixDialogLine(v)).join('\n')}`;
144
+ const violationLabel = fixed === 1 ? 'policy violation' : 'policy violations';
145
+ const autofixMessage = `Optimus Labs auto-fixed ${fixed} ${violationLabel}:\n\n${appliedViolations
146
+ .map((v) => autofixDialogLine(v))
147
+ .join('\n')}`;
145
148
  const payload = { __optimus_autofix: true, autofix_message: autofixMessage };
146
149
  if (restartCommands.length > 0)
147
150
  payload.restart_commands = restartCommands;
@@ -7,7 +7,8 @@ import { readFileSync } from 'node:fs';
7
7
  import { isThisCliModule } from './cli_invocation_match.js';
8
8
  import { appendComplianceRunnerLine, hookRunLog } from './log_config_files/runtime/hook_logger.js';
9
9
  import { executeTrustedRestartCommands } from './log_config_files/runtime/trusted_restarts.js';
10
- function main() {
10
+ /** Invoked by dist entrypoint or by `npx log-llm-config@latest execute-trusted-restarts` (cli.js dispatches here). */
11
+ export function runExecuteTrustedRestartsFromStdin() {
11
12
  let raw;
12
13
  try {
13
14
  raw = readFileSync(0, 'utf8');
@@ -44,7 +45,7 @@ function main() {
44
45
  }
45
46
  if (isThisCliModule(process.argv[1], import.meta.url)) {
46
47
  try {
47
- main();
48
+ runExecuteTrustedRestartsFromStdin();
48
49
  }
49
50
  catch (e) {
50
51
  hookRunLog(`execute_trusted_restarts: ${e instanceof Error ? e.message : String(e)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "log-llm-config",
3
- "version": "1.3.26",
3
+ "version": "1.3.29",
4
4
  "description": "CLI helpers for logging hardware UUIDs and posting startup payloads to Optimus Security.",
5
5
  "type": "module",
6
6
  "bin": {