/**
 * Typed render contracts — tree (flattened hierarchy).
 *
 * Part of the Human Render Contract (Epic T10114, ADR-077). The flat-tree shape
 * is the canonical wire format for hierarchical task / saga / epic listings —
 * presenters re-materialise the parent/child structure from `parentId` + `depth`.
 *
 * @epic T10114
 * @task T10138
 */
/**
 * Runtime type guard for `TreeResponse<T>`.
 *
 * Verifies the envelope shape without inspecting node payloads — the generic
 * `T` cannot be checked at runtime, so callers must layer per-node validation
 * separately if they need stronger guarantees.
 *
 * @param value — candidate value to inspect.
 * @returns `true` iff `value` matches the `TreeResponse<T>` envelope shape.
 */
export function isTreeResponse(value) {
    if (typeof value !== 'object' || value === null)
        return false;
    const v = value;
    return (Array.isArray(v.tree) &&
        typeof v.root === 'string' &&
        typeof v.totalNodes === 'number' &&
        typeof v.maxDepth === 'number');
}
//# sourceMappingURL=tree.js.map