Whether this is a freeform memory rather than a malformed canonical one. `memory write` and the default `MEMORY.md` have only simple metadata. Once any canonical identity/kind field is present, lift errors stay visible instead of silently falling back to raw output.
(inputs: &MemLiftInputs)
| 123 | /// any canonical identity/kind field is present, lift errors stay visible |
| 124 | /// instead of silently falling back to raw output. |
| 125 | pub fn is_freeform_memory(inputs: &MemLiftInputs) -> bool { |
| 126 | ["@id", "uid", "id", "memoryKind", "kind"] |
| 127 | .iter() |
| 128 | .all(|key| !inputs.frontmatter.contains_key(*key)) |
| 129 | } |
| 130 | |
| 131 | /// Sanitize a memory id for use as a directory name in the sidecar/vault path. |
| 132 | /// Keeps ASCII alphanumerics, `-` and `_`; everything else becomes `_`. |
no test coverage detected