log-llm-config-staging 1.3.86 → 1.3.89
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
|
* When autofix returns restart_commands, this process does not spawn them — the shell hook pipes
|
|
7
7
|
* the same JSON line to execute_trusted_restarts (TS allowlist + spawn).
|
|
8
8
|
*/
|
|
9
|
-
import { applyAutofixViolations, normalizeAgentToken, pruneSatisfiedOneTimeRemediations, reportPostRestartVerificationOutcomes, runLocalRemediationComplianceCheck, uploadSatisfiedManifestConfigs, } from './log_config_files/runtime/compliance_check.js';
|
|
10
|
-
import { isRemediationQuarantined
|
|
9
|
+
import { applyAutofixViolations, confirmAppliedAutofixVerified, normalizeAgentToken, pruneSatisfiedOneTimeRemediations, reportPostRestartVerificationOutcomes, runLocalRemediationComplianceCheck, uploadSatisfiedManifestConfigs, } from './log_config_files/runtime/compliance_check.js';
|
|
10
|
+
import { isRemediationQuarantined } from './log_config_files/runtime/remediation_apply_tracking.js';
|
|
11
11
|
import { existsSync, readFileSync, statSync } from 'node:fs';
|
|
12
12
|
import { getRemediationInstructionsPath } from './log_config_files/runtime/management_storage.js';
|
|
13
13
|
import { hookLogSessionBanner, hookRunLog, logRemediationApplyFailure } from './log_config_files/runtime/hook_logger.js';
|
|
@@ -249,12 +249,12 @@ export async function runCompliancePromptGate() {
|
|
|
249
249
|
hookRunLog('compliance_prompt_gate: Claude — autofix wrote JSON; recheck still flags same UUID(s) — proceeding (immediate apply)');
|
|
250
250
|
}
|
|
251
251
|
if (deferredSqlitePending || recheckOk || claudeRecheckStaleAfterImmediateApply) {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
252
|
+
const immediateVerified = restartCommands.length === 0 &&
|
|
253
|
+
!deferredSqlitePending &&
|
|
254
|
+
(recheckOk || claudeRecheckStaleAfterImmediateApply);
|
|
255
|
+
if (immediateVerified) {
|
|
256
|
+
confirmAppliedAutofixVerified(appliedViolations, reportPromises);
|
|
257
|
+
await Promise.allSettled(reportPromises);
|
|
258
258
|
}
|
|
259
259
|
const changePreview = formatRemediationChangePreviewForApplied(appliedViolations);
|
|
260
260
|
const changePreviewSuffix = changePreview ? `\n\n${changePreview}` : '';
|
|
@@ -17,7 +17,7 @@ import { mergeComposerShadowKeysFromReactiveBlob, readVscdbItemTableJson, } from
|
|
|
17
17
|
import { readRemediationInstructionsFile, writeRemediationInstructionsFile, } from './management_storage.js';
|
|
18
18
|
import { resolveRemediationConfigPath } from './remediation_config_path.js';
|
|
19
19
|
import { resolveOpsTargetPath } from './ops_target_path.js';
|
|
20
|
-
import { isRemediationQuarantined, markRemediationApplyPendingVerification, processPendingPostRestartVerifications, readRemediationApplyTrackingFile, writeRemediationApplyTrackingFile, } from './remediation_apply_tracking.js';
|
|
20
|
+
import { isRemediationQuarantined, markRemediationApplyPendingVerification, markRemediationApplyVerified, processPendingPostRestartVerifications, readRemediationApplyTrackingFile, writeRemediationApplyTrackingFile, } from './remediation_apply_tracking.js';
|
|
21
21
|
import { complianceRunnerDiag, hookRunLog, logRemediationApplyFailure } from './hook_logger.js';
|
|
22
22
|
import { loadEndpointBase } from '../sender/endpoint_config.js';
|
|
23
23
|
import { resolveHardwareUuid, tryResolveHardwareUuid } from './hardware_uuid.js';
|
|
@@ -487,6 +487,17 @@ export function reportPostRestartVerificationOutcomes(violations) {
|
|
|
487
487
|
});
|
|
488
488
|
return { outcomes, reportPromises };
|
|
489
489
|
}
|
|
490
|
+
/**
|
|
491
|
+
* Immediate autofix succeeded (inline recheck OK or Claude stale-recheck tolerance).
|
|
492
|
+
* Clear pending verification locally and report verified so the next prompt does not POST
|
|
493
|
+
* verification_failed while the user already saw a successful fix.
|
|
494
|
+
*/
|
|
495
|
+
export function confirmAppliedAutofixVerified(appliedViolations, reportPromises) {
|
|
496
|
+
for (const v of appliedViolations) {
|
|
497
|
+
markRemediationApplyVerified(v.uuid);
|
|
498
|
+
reportPromises.push(reportAutofixApplied(v.uuid, 'verified'));
|
|
499
|
+
}
|
|
500
|
+
}
|
|
490
501
|
export function applyAutofixViolations(violations, agent = 'cursor') {
|
|
491
502
|
for (const v of violations) {
|
|
492
503
|
if (!v.autofix_allowed) {
|