log-llm-config 1.3.16 → 1.3.17
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.
|
@@ -100,12 +100,16 @@ export function readVscdbItemTableJson(dbPath, itemKey) {
|
|
|
100
100
|
return { [itemKey]: parsed };
|
|
101
101
|
}
|
|
102
102
|
// Bare JSON primitives. Scalar toggles must be wrapped so getByPath(key.field) works in compliance checks.
|
|
103
|
+
// Match coerceScalarForItemTableField in remediation_sync: Cursor may store toggles as JSON 0/1, not only booleans.
|
|
103
104
|
if (typeof parsed === 'boolean' || typeof parsed === 'number' || typeof parsed === 'string') {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
if (
|
|
105
|
+
const field = CURSOR_SCALAR_ITEMTABLE_FIELDS[itemKey];
|
|
106
|
+
if (field) {
|
|
107
|
+
if (typeof parsed === 'boolean') {
|
|
107
108
|
return { [itemKey]: { [field]: parsed } };
|
|
108
109
|
}
|
|
110
|
+
if (typeof parsed === 'number' && !Number.isNaN(parsed)) {
|
|
111
|
+
return { [itemKey]: { [field]: parsed !== 0 } };
|
|
112
|
+
}
|
|
109
113
|
}
|
|
110
114
|
return { [itemKey]: parsed };
|
|
111
115
|
}
|