log-llm-config 1.3.55 → 1.3.56

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.
@@ -24,5 +24,7 @@ export function isThisCliModule(argv1, thisImportMetaUrl) {
24
24
  return false;
25
25
  const entry = normalizedCliScriptBasename(argv1);
26
26
  const self = normalizedCliScriptBasename(thisImportMetaUrl);
27
- return entry !== '' && entry === self;
27
+ if (entry === '' || self === '')
28
+ return false;
29
+ return entry === self || entry === `${self}_staging`;
28
30
  }
@@ -8,10 +8,9 @@
8
8
  */
9
9
  import { applyAutofixViolations, normalizeAgentToken, pruneSatisfiedOneTimeRemediations, runLocalRemediationComplianceCheck, } from './log_config_files/runtime/compliance_check.js';
10
10
  import { existsSync, statSync } from 'node:fs';
11
- import { fileURLToPath } from 'node:url';
12
- import { basename } from 'node:path';
13
11
  import { getRemediationInstructionsPath } from './log_config_files/runtime/management_storage.js';
14
12
  import { hookLogSessionBanner, hookRunLog, logRemediationApplyFailure } from './log_config_files/runtime/hook_logger.js';
13
+ import { isThisCliModule } from './cli_invocation_match.js';
15
14
  const MANIFEST_STALE_MS = 7 * 24 * 60 * 60 * 1000;
16
15
  function parseIde() {
17
16
  const eq = process.argv.find((a) => a.startsWith('--ide='));
@@ -74,14 +73,7 @@ function getManifestStalenessMs() {
74
73
  }
75
74
  }
76
75
  function isRunAsCliModule() {
77
- const entry = process.argv[1];
78
- if (!entry)
79
- return false;
80
- // Compare by basename only: npx bins are symlinks (no .js extension) while import.meta.url
81
- // is the real resolved path with extension — full-path comparison reliably fails across setups.
82
- const entryBase = basename(entry).replace(/\.[cm]?js$/, '');
83
- const selfBase = basename(fileURLToPath(import.meta.url)).replace(/\.[cm]?js$/, '');
84
- return entryBase !== '' && entryBase === selfBase;
76
+ return isThisCliModule(process.argv[1], import.meta.url);
85
77
  }
86
78
  /** Short line for success dialog: finding title/sentence from manifest, not per-check remediation technical text. */
87
79
  function autofixDialogLine(v) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "log-llm-config",
3
- "version": "1.3.55",
3
+ "version": "1.3.56",
4
4
  "description": "CLI helpers for logging hardware UUIDs and posting startup payloads to Optimus Security.",
5
5
  "type": "module",
6
6
  "bin": {