import { DURABLE_MEMORY_HARD_MAX_TOPIC_FILES, DURABLE_MEMORY_INDEX_MAX_CHARS } from './constants.js';
export function validateWorkspaceState(workspace) {
    const index = workspace.readIndex();
    if (index && index.length > DURABLE_MEMORY_INDEX_MAX_CHARS) {
        return {
            error: `Durable memory index exceeded max size (${DURABLE_MEMORY_INDEX_MAX_CHARS} chars).`
        };
    }
    const topicFiles = workspace.listTopicFiles();
    if (topicFiles.length > DURABLE_MEMORY_HARD_MAX_TOPIC_FILES) {
        return {
            error: `Durable memory exceeded hard file cap (${DURABLE_MEMORY_HARD_MAX_TOPIC_FILES}).`
        };
    }
    return {};
}
//# sourceMappingURL=validator.js.map