You open your DeepSeek Harness profile and find a package you didn't invite. Before you panic or blindly delete it, run dsh plugin --profile
The Four Layers of Evidence
The DSH ecosystem separates package management from runtime behavior. The why output answers only one question: which packages depend on the target? It does not confirm if the bundle is enabled, if the plugin is running, or if the code is trustworthy. You need four distinct pieces of evidence: the dependency path, the bundle declaration, the startup behavior, and the market card. Relying solely on pnpm's output is like checking a shipping manifest without inspecting the cargo.
Wrapper Side Effects and Profile Reconciliation
Here is the insider trap: the dsh plugin wrapper is not guaranteed to be read-only. When you invoke it, the tool initializes missing profiles using shipped templates and reconciles the dsh.profile.bundles against the installed state after every successful run. Even a simple why query can alter disk state if the profile name is typoed or missing. In shared or controlled environments, this means your diagnostic command might inadvertently create files or update bundle lists before you've even read the output.
Reading the Reverse Tree Correctly
pnpm outputs a reverse tree where the searched package sits at the root, with dependents forming branches back to the workspace. Direct dependencies and transitive dependencies look different here. If you see multiple branches, removing one parent won't necessarily eliminate the package. Also, watch for 'deduped' markers; these indicate repeated structures that pnpm hides for brevity, not irrelevant paths. Use --json for machine parsing and --depth to limit output, but remember that a filtered view isn't the complete graph.
Key Takeaways
- The dsh plugin why command uses pnpm to show reverse dependencies but does not verify runtime status or security.
- The DSH wrapper may create profile files or reconcile bundle states even during diagnostic queries, so verify profile names first.
- A package appearing in the dependency tree does not prove it is an active DSH bundle; check for bundle declarations separately.
- Always cross-reference dependency traces with bundle compositions and startup behavior before removing any packages.
The Bottom Line
Treat dsh plugin why as a map, not a verdict. It tells you how the package got there, not whether it should be there. Always verify bundle declarations and runtime behavior separately before touching your profile configuration.