MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / is_path_shaped

Function is_path_shaped

atomic-cli/src/commands/memory/validate.rs:97–99  ·  view source on GitHub ↗

Is the argument *shaped* like a filesystem path (rather than a memory id)? True when it ends in `.md` or contains a path separator. A `memory/ ` (no `.md`) form is NOT path-shaped — it is a valid id form the bridge normalizes. A bare `memory/ .md` IS path-shaped, so `validate` would try to read it as a file; callers wanting the vault entry use the bare ` `.

(arg: &str)

Source from the content-addressed store, hash-verified

95/// normalizes. A bare `memory/<id>.md` IS path-shaped, so `validate` would try
96/// to read it as a file; callers wanting the vault entry use the bare `<id>`.
97fn is_path_shaped(arg: &str) -> bool {
98 arg.ends_with(".md")
99}
100
101/// Serialize a [`ValidationReport`] to the documented JSON shape:
102/// `{conforms, results: [{focus_node, shape, path, message}]}`.

Callers 1

runMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected