Closes #2408 Plugin run targets were static argv wrappers: a plugin couldn't refuse a built-in Run/Test/Debug launch through its target (for example when its container project is stopped), so the wrapper started and could start the environment as a side effect. API 1.5 adds an optional run-target-validation export: after trust, ownership, process-grant and pin checks the host calls validate with the operation, bare program name and working directory; an error refuses the launch with the plugin's (prefixed, bounded) message and keeps the selected target. Plugins without the export behave as before. Calls wake reclaimed instances, use the host call timeout, are cancelled with the launch, and fail closed on trap/timeout; for remote projects validation runs on the server. SDK helpers, plugins/README.md and fixtures updated.
container-runner — API 1.4 example
Put this directory on PATH before installing/granting the plugin, so
process:openidea-example-wrapper resolves to the included executable. Run
Example: Register Container Wrapper in a trusted project. It registers a
project run target, opens a keyed terminal, writes an Output channel and sets
a window status item. The owned terminal-exited event updates that window.
Disable withdraws the target; terminal/output lifetimes follow the host rules.
The fake wrapper just executes argv locally and exits its demo terminal.
To adapt it to DDEV, declare process:ddev, change program to ddev,
args to ["exec"], and use command overrides such as
("composer", ["composer"]). For Lando declare process:lando and supply its
CLI's command prefixes. Only approved executables run; selecting one in
Settings › Plugins reapproves/pins it. No shell command strings are evaluated.
For mapped working directories set container_root and workdir_args using
your wrapper's documented argv convention (for example --cwd {cwd}), or let
the wrapper manage cwd. Environment forwarding also belongs to that wrapper.
Build from the repository root:
plugins/build.sh official/container-runner
cargo test --manifest-path plugins/official/container-runner/Cargo.toml
cargo run -p ide-host --bin openidea-plugin -- check plugins/official/container-runner
Install the built package folder through Settings › Plugins › Install from Disk. See the plugin guide and official/community policy.
On Windows, supply an equivalent approved executable; the included demo script requires a POSIX shell. The host API itself is cross-platform.