/**
 * Centralised list of "system" keys that may appear inside `Document.data`
 * but are managed by the CMS rather than the user. Anything here is:
 *
 *  - stripped from API responses (so internal scoring data isn't leaked)
 *  - allowed through field-level write access checks (so plugins can
 *    set them even when the field isn't declared in the collection)
 *
 * Keep this in lockstep with `actions.ts`/`access.ts` to avoid drift.
 */
export const INTERNAL_DATA_KEYS = new Set([
    '_layout',
    '_pageSettings',
    '_aiScore',
    '_embedding',
    '_seoScore',
    '_brandScore',
    '_readabilityScore',
]);
export function isInternalDataKey(key) {
    return key.startsWith('_') || INTERNAL_DATA_KEYS.has(key);
}
/** Return a shallow copy of `data` with all internal/system keys removed. */
export function stripInternalDataKeys(data) {
    const out = {};
    for (const [key, value] of Object.entries(data)) {
        if (isInternalDataKey(key))
            continue;
        out[key] = value;
    }
    return out;
}
//# sourceMappingURL=internal-keys.js.map