Rebased onto current main (origin fix/jail-staged-env was stale).
spawner.rs:
- Add JailConfig.root_path for host-visible jail root
- Add prepare_spawn_command() — stages env vars + working dir into
launch.sh + env.sh inside the jail filesystem instead of relying on
env inheritance across jexec/mdo
- PreparedSpawnCommand struct with cleanup_dir tracking
- Staged dirs cleaned up on agent stop/fail/poll-error
- 2 new tests: staged_named_jail_writes_launcher_and_env,
staged_jail_requires_root_path
external.rs:
- Refactor to use prepare_spawn_command() for jailed MCP servers
- Remove resolved_command() method (superseded)
- Cleanup dir tracked on session shutdown
Gates: clippy + 89 tests pass on Linux/domedog.