Whether path is an artifact in a cargo output directory on this disk:
directly in a profile directory (<profile>/lean-ctx) or in its
deps/examples (test and example binaries).
True when command is <our hook binary> hook <operation>: the binary is
ours (is_lean_ctx_hook_binary) and carries no shell metacharacters, so
a user wrapper is never mistaken for a LeanCTX hook.