luplo.core.import_pipeline.refusal

3-layer self-documenting refusal helper.

Used whenever a destructive/lossy import operation is rejected. The agent-hint layer is the most important: it tells the calling agent NOT to silently retry but to surface the situation to the user first.

Functions

build_refusal(→ dict[str, str])

Return a refusal payload with stable key order: status, why, override, agent_hint.

render_refusal_text(→ str)

Render a refusal dict as multi-line human text for CLI stderr.

Module Contents

luplo.core.import_pipeline.refusal.build_refusal(*, why: str, override_flag: str, agent_hint: str) dict[str, str]

Return a refusal payload with stable key order: status, why, override, agent_hint.

luplo.core.import_pipeline.refusal.render_refusal_text(refusal: dict[str, str]) str

Render a refusal dict as multi-line human text for CLI stderr.