// Client-safe: the tree definition (no database imports). /** Your tree of content. Add nodes here; each node pulls its numbers from the areas / taxonomy nodes it lists. */ export interface ContentNode { id: string; title: string; blurb: string; areas: string[]; // work-type areas (areas.id) taxonomy: string[]; // taxonomy node ids children: ContentNode[]; } export const CONTENT_TREE: ContentNode = { id: 'root', title: 'Contents', blurb: 'The structure of the survey write-up.', areas: [], taxonomy: [], children: [ { id: 'tools-of-agents', title: 'Tools of agents', blurb: 'How agents call tools: function calling, MCP, API use and tool-integrated reasoning.', areas: ['tool-use'], taxonomy: ['agents/tools'], children: [], }, ], }; export function findNode(id: string, n: ContentNode = CONTENT_TREE): ContentNode | null { if (n.id === id) return n; for (const c of n.children) { const f = findNode(id, c); if (f) return f; } return null; }