AiVisibility.h header
#include <ew/app/AiVisibility.h>
Namespace ew::app
Functions
bool ew::app::policy::isReadableByAi(const ew::core::project::Project &project, const ew::core::content::ContentObject &object)
Whether the AI may read object – the one place that answers it.
AI EXCLUSION IS INHERITED. An object is hidden when it is excluded or when anything it sits inside is, walking its own containment chain: a document's parent documents, a timeline event's parent events, a comment's parent comments. Excluding a book excludes the book – a subtree is a unit, and hiding only the container would send the chapters of a manuscript the writer had already withheld.
This is F-0063, finished. That defect was fixed at two call sites (get_manuscript_tree, which never descends into an excluded node, and the search tools) while roughly fifty others kept testing the object's own flag. So a chapter written inside an excluded book was protected from find_replace and still sent to the model by entity extraction, voice consistency and the desktop's batch AI. One function, so there is one answer.
Types with no container of their own (entities, spreadsheets, maps, ...) are simply their own flag. Entities in particular have no parent: codex nesting runs entity -> category -> Category::parentEntityId, a different chain that this deliberately does not follow.
A malformed project whose parents form a cycle reads as not excluded rather than hanging – the safe answer for a tree that is already broken, and the bound is the object count.
project resolves the ancestors; object need not belong to it, in which case the walk stops at the first unresolvable parent.