log-llm-config 1.3.8 → 1.3.10

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,8 +6,8 @@
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, statSync } from 'node:fs';
10
- import { pathToFileURL } from 'node:url';
9
+ import { existsSync, realpathSync, statSync } from 'node:fs';
10
+ import { fileURLToPath } from 'node:url';
11
11
  import { resolve } 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';
@@ -65,7 +65,11 @@ function isRunAsCliModule() {
65
65
  if (!entry)
66
66
  return false;
67
67
  try {
68
- return import.meta.url === pathToFileURL(resolve(entry)).href;
68
+ // realpathSync on both sides: npx installs bins as symlinks, so process.argv[1] is the
69
+ // symlink path while import.meta.url is already the real (dereferenced) path in Node ESM.
70
+ const realEntry = realpathSync(resolve(entry));
71
+ const realSelf = realpathSync(fileURLToPath(import.meta.url));
72
+ return realEntry === realSelf;
69
73
  }
70
74
  catch {
71
75
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "log-llm-config",
3
- "version": "1.3.8",
3
+ "version": "1.3.10",
4
4
  "description": "CLI helpers for logging hardware UUIDs and posting startup payloads to Optimus Security.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -9,7 +9,9 @@
9
9
  "log_config_files": "dist/log_config_files/index.js",
10
10
  "log_sensitive_paths_audit": "dist/log_sensitive_paths_audit.js",
11
11
  "apply-deferred-vscdb": "dist/apply_deferred_vscdb.js",
12
- "execute-trusted-restarts": "dist/execute_trusted_restarts.js"
12
+ "execute-trusted-restarts": "dist/execute_trusted_restarts.js",
13
+ "compliance_prompt_gate": "dist/compliance_prompt_gate.js",
14
+ "compliance_check_runner": "dist/compliance_check_runner.js"
13
15
  },
14
16
  "scripts": {
15
17
  "build": "tsc -p tsconfig.json",