Lift the given inputs into a canonical `MemoryNode`, mapping a lift failure (missing `uid`, missing `memoryKind`, …) to a clean argument error.
(inputs: &MemLiftInputs)
| 110 | /// Lift the given inputs into a canonical `MemoryNode`, mapping a lift failure |
| 111 | /// (missing `uid`, missing `memoryKind`, …) to a clean argument error. |
| 112 | pub fn lift(inputs: &MemLiftInputs) -> CliResult<MemoryNode> { |
| 113 | lift_memory(&inputs.frontmatter, &inputs.body).map_err(|e| CliError::InvalidArgument { |
| 114 | message: format!("could not lift memory: {e}"), |
| 115 | }) |
| 116 | } |
| 117 | |
| 118 | /// Sanitize a memory id for use as a directory name in the sidecar/vault path. |
| 119 | /// Keeps ASCII alphanumerics, `-` and `_`; everything else becomes `_`. |