(secs)
| 151 | out: list[dict] = [] |
| 152 | |
| 153 | def walk(secs): |
| 154 | for s in secs: |
| 155 | anc = s.get("anchor") |
| 156 | summary = s.get("agent_summary") |
| 157 | if anc and summary: |
| 158 | out.append({ |
| 159 | "anchor": anc, |
| 160 | "title": _norm_title(s.get("title", "")), |
| 161 | "summary": summary, |
| 162 | }) |
| 163 | walk(s.get("children", [])) |
| 164 | |
| 165 | walk(sections) |
| 166 | return out |
no test coverage detected