1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//! pmpx -- one command surface that detects the project type and forwards to the real tool.
//!
//! This binary contains no plugin code: support for cargo / pnpm lives in the plugin crates
//! themselves and is `dlopen`ed at runtime.
//!
//! # Layers
//! ```text
//! main.rs / cli.rs process boundary and argument parsing
//! commands.rs / app.rs subcommand handling and flow orchestration
//! config.rs / discovery.rs config reading and project root discovery
//! plugins.rs / detect.rs / hints.rs plugin manifests, resolution, hints with zero plugins
//! runtime.rs / spawn.rs load the selected plugin, start the process
//! ```
//!
//! One hard rule: detection never loads any plugin code (`plugins.rs` only reads manifests)
//! -- running `pmpx` in a repo that never installed a plugin executes no third-party code.
use Parser;
/// Run once and return the process exit code -- which may come from the backend.