detect_shadowed_dcode() -> ShadowedDcode | NoneReturn the shadowing dcode entry point on the user's PATH, if any.
After a successful uv tool upgrade, the upgraded binary only takes effect
on the next manual launch if the user's PATH resolves to uv's tool bin dir
for dcode (and deepagents-code) — or to a link into it, which the
resolved-target check below also accepts. A pre-uv install earlier on PATH
will silently win and report the old version, which looks like "the upgrade
didn't work" to the user.
This compares each supported console script against uv's tool bin dir. A mismatch means a different binary will run the next time the user launches that entry point themselves.
The primary comparison is between directories rather than resolved
symlink targets (see the inline note below for why), but a directory
mismatch alone would misreport a dcode symlink that lives in an
unrelated bin dir and points into the upgraded tool venv (e.g. a
manually-created convenience symlink, or a package manager that
re-exposes uv's shim). Those launches do run the upgraded entry point, so
a second check compares resolved targets before reporting a conflict.