log-llm-config 1.2.3 → 1.2.6

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.
@@ -206,23 +206,30 @@ export function applyAutofixViolations(violations) {
206
206
  fixed++;
207
207
  hookRunLog(`autofix: applied uuid=${inst.uuid} path=${inst.config_file_path}`);
208
208
  reportPromises.push(reportAutofixApplied(inst.uuid, 'success'));
209
- if (inst.file_type) {
210
- const authKey = readStoredAuthKey();
211
- if (authKey) {
212
- let updatedContent;
213
- try {
214
- updatedContent = JSON.parse(readFileSync(inst.config_file_path, 'utf8'));
215
- }
216
- catch {
217
- updatedContent = undefined;
218
- }
219
- if (updatedContent !== undefined) {
220
- reportPromises.push(sendConfigFile({ file_type: inst.file_type, file_path: inst.config_file_path, raw_content: updatedContent }, resolveHardwareUuid(), authKey).then((ok) => {
221
- hookRunLog(`autofix: re-sent updated file uuid=${inst.uuid} ok=${ok}`);
209
+ const authKey = readStoredAuthKey();
210
+ if (authKey) {
211
+ let updatedContent;
212
+ try {
213
+ updatedContent = JSON.parse(readFileSync(inst.config_file_path, 'utf8'));
214
+ }
215
+ catch {
216
+ updatedContent = undefined;
217
+ }
218
+ if (updatedContent !== undefined) {
219
+ const fileType = (inst.file_type ?? '').trim();
220
+ if (fileType) {
221
+ reportPromises.push(sendConfigFile({ file_type: fileType, file_path: inst.config_file_path, raw_content: updatedContent }, resolveHardwareUuid(), authKey).then((sentOk) => {
222
+ hookRunLog(`autofix: uploaded remediated file uuid=${inst.uuid} path=${inst.config_file_path} ok=${sentOk}`);
222
223
  }));
223
224
  }
225
+ else {
226
+ hookRunLog(`autofix: skip upload uuid=${inst.uuid} — remediation_instructions.json missing file_type (re-sync manifest)`);
227
+ }
224
228
  }
225
229
  }
230
+ else {
231
+ hookRunLog(`autofix: skip re-upload uuid=${inst.uuid} (no stored auth key)`);
232
+ }
226
233
  const spec = remediationFixSpec(inst);
227
234
  if (spec?.restart_required && spec.restart_command) {
228
235
  hookRunLog(`autofix: restart required uuid=${inst.uuid} command=${spec.restart_command}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "log-llm-config",
3
- "version": "1.2.3",
3
+ "version": "1.2.6",
4
4
  "description": "CLI helpers for logging hardware UUIDs and posting startup payloads to Optimus Security.",
5
5
  "type": "module",
6
6
  "bin": {