log-llm-config 1.3.10 → 1.3.11
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.
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* the same JSON line to execute_trusted_restarts (TS allowlist + spawn).
|
|
7
7
|
*/
|
|
8
8
|
import { applyAutofixViolations, pruneSatisfiedOneTimeRemediations, runLocalRemediationComplianceCheck, } from './log_config_files/runtime/compliance_check.js';
|
|
9
|
-
import { existsSync,
|
|
9
|
+
import { existsSync, statSync } from 'node:fs';
|
|
10
10
|
import { fileURLToPath } from 'node:url';
|
|
11
|
-
import {
|
|
11
|
+
import { basename } from 'node:path';
|
|
12
12
|
import { getRemediationInstructionsPath } from './log_config_files/runtime/management_storage.js';
|
|
13
13
|
import { hookLogSessionBanner, hookRunLog } from './log_config_files/runtime/hook_logger.js';
|
|
14
14
|
const MANIFEST_STALE_MS = 7 * 24 * 60 * 60 * 1000;
|
|
@@ -64,16 +64,11 @@ function isRunAsCliModule() {
|
|
|
64
64
|
const entry = process.argv[1];
|
|
65
65
|
if (!entry)
|
|
66
66
|
return false;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return realEntry === realSelf;
|
|
73
|
-
}
|
|
74
|
-
catch {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
67
|
+
// Compare by basename only: npx bins are symlinks (no .js extension) while import.meta.url
|
|
68
|
+
// is the real resolved path with extension — full-path comparison reliably fails across setups.
|
|
69
|
+
const entryBase = basename(entry).replace(/\.[cm]?js$/, '');
|
|
70
|
+
const selfBase = basename(fileURLToPath(import.meta.url)).replace(/\.[cm]?js$/, '');
|
|
71
|
+
return entryBase !== '' && entryBase === selfBase;
|
|
77
72
|
}
|
|
78
73
|
/** Short line for success dialog: finding title/sentence from manifest, not per-check remediation technical text. */
|
|
79
74
|
function autofixDialogLine(v) {
|