Add worker_preflight() check at dispatch time for commands that target remote hosts. Enforces three conditions: 1. Session has delegation authority 2. Target host is in delegation scope 3. Target host posture satisfies required shell class OrgCommands trait extended with target_host() method (default: None for local commands). SessionContext enriched with delegation_scope. Lightweight DelegationScope duplicate avoids bascule-core dep chain. Target posture reader stubbed — requires gateway posture query API (tracked as follow-up). Fail-closed: unknown delegation -> denied, unknown posture -> denied. 11 unit tests for delegation and preflight. Signed-off-by: Tyler King <tking@guildhouse.dev> Signed-off-by: Tyler J King <tking727@gmail.com> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||