(range: ByteRange)
| 776 | // Parse one path-item range to its kept (optionally trimmed) value, applying |
| 777 | // `keepPathItem` identically in both passes so the operation index aligns. |
| 778 | const keptPathItem = (range: ByteRange): readonly [string, PathItemObject] | null => { |
| 779 | const entry = parseEntry(structure.text, range, 2); |
| 780 | if (!entry) return null; |
| 781 | const [path, rawValue] = entry; |
| 782 | if (!isPathItemValue(rawValue)) return null; |
| 783 | if (!keepPathItem) return [path, rawValue as PathItemObject]; |
| 784 | const kept = keepPathItem(path, rawValue); |
| 785 | return kept ? [path, kept as PathItemObject] : null; |
| 786 | }; |
| 787 | |
| 788 | // Pass 1 (light): collect schema-free tool-path planning metadata in |
| 789 | // document order. No bindings, no schemas; one path-item resident at a time. |
no test coverage detected