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
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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}`);
|