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

Function lift

atomic-cli/src/commands/intent/bridge.rs:83–87  ·  view source on GitHub ↗

Lift the given inputs into a canonical node, mapping a lift failure (unknown directive, missing `id`, malformed `:::ref`, …) to a clean argument error so the CLI reports it gracefully instead of surfacing an internal error.

(inputs: &LiftInputs)

Source from the content-addressed store, hash-verified

81/// directive, missing `id`, malformed `:::ref`, …) to a clean argument error so
82/// the CLI reports it gracefully instead of surfacing an internal error.
83pub fn lift(inputs: &LiftInputs) -> CliResult<CanonicalNode> {
84 lift_intent(&inputs.frontmatter, &inputs.body).map_err(|e| CliError::InvalidArgument {
85 message: format!("could not lift intent: {e}"),
86 })
87}
88
89/// Sanitize an intent id/key for use as a directory name in the sidecar/vault
90/// path. Keeps ASCII alphanumerics, `-` and `_`; everything else becomes `_`.

Callers 3

runMethod · 0.70
runMethod · 0.70
runMethod · 0.70

Calls 1

lift_intentFunction · 0.85

Tested by 1

runMethod · 0.56