Autonomous artificial intelligence agents executing over extensible tool interfaces (such as Anthropic's Model Context Protocol) operate with ambient authority over connected tools. Because autoregressive Transformers ingest instructions and untrusted third-party data within a single homogeneous context window, adversarial observations can manipulate the model into executing unintended privileged actions — the classic Confused Deputy problem. In this paper, we introduce a compositional, externally enforced execution-security architecture that treats LLM agents as potentially compromised, untrusted principals. Rather than relying on linguistic moderation alone or standalone tool-allowlist proxies, tool dispatch is governed by an external capability-mediated reference monitor enforcing a compositional execution-security contract in which deterministic structural dimensions intersect monotonically (A_struct = A_CBAC ∩ A_DIFC ∩ A_Workflow ∩ A_Relational^det) and learned semantic auditing is strictly subordinate (A_final = A_struct ∩ A_Semantic^emp ⊆ A_struct), coupled with distributed execution-certainty semantics (WorkflowState ≠ ExecutionCertainty). We distinguish three orthogonal defense guarantees: (i) deterministic tool-scope confinement provable conditional on complete mediation assumptions (A1–A5) over the trusted computing base (TCB); (ii) empirical, distribution-bounded semantic parameter auditing; and (iii) explicit taint-flow tracking over tracked fragments. Under complete mediation axioms (A1–A5) over the TCB, out-of-scope tool invocation is deterministically rejected at the transport boundary (A_1 ∧ ... ∧ A_5 ∧ T_i ∉ Scope(τ_i) ⟹ Execute(a_i) = ⊥), formalized as an Inductive Multi-Step Tool Chain Composability Invariant (Proposition 1), while distributed side-effect uncertainty is formalized via the Conditional Non-Advancement Theorem (Theorem 3) proving that dependent tools cannot advance under unconfirmed execution state. However, in-scope parameter poisoning within authorized tools and cross-tool data exfiltration present harder challenges: semantic neural validation is distribution-bounded (exhibiting an empirical false-negative rate of 21.5% on in-scope manipulations prior to boundary sharpening and remaining susceptible to adversarial optimization), while cross-tool exfiltration requires explicit decentralized information-flow tracking (DIFC, Theorem 2) to block explicitly tracked source-to-sink fragments. We further introduce declarative stateful workflow authorization, which constrains specified multi-step action sequences as a restrictive intersection with CBAC and DIFC, and validate the integrated gateway through 23 author-constructed adversarial workflow tests covering trajectory, concurrency, desynchronization, execution uncertainty, and receipt-integrity attacks. We report empirical evaluations across both foundational baseline studies (a 50,000-sample macro benchmark containing 15,892 parametrically scaled template variants and a 3,000-case ablation matrix) and a Six-Regime Empirical Validation Program totaling 6,662 evaluation cases with frozen checkpoint V_6, distinguishing public third-party benchmark datasets (InjecAgent, ASB, AgentDojo: 5,942 cases evaluated via self-administered harness) from author-constructed boundary suites (720 cases): achieving 100% Correct Identification Rate on internal factorized diagnostics (N = 145), 100% accuracy on a pre-sealed holdout suite (75/75, SHA-256: 22bc736c...), 98.43% defense on the 4,216-instance InjecAgent evaluation (P_50: 267.7 ms), 92.44% defense on AI Safety Bench (416/450 attacks blocked, 550/550 benign operations allowed), 99.52% attack defense on interactive AgentDojo (N = 629), alongside an empirical clean-task control evaluation (6/97 tasks) where small-model baseline capacity limits govern task completion, and 100% defense across a 500-sample author-constructed boundary-focused red-team evaluation. Finally, we systemize the runtime into the Mastyf Security Gateway: the evaluated research runtime was v0.1.0-RC1 (verifying 38/38 security invariant tests), while the subsequently hardened commercial-pilot runtime is v0.1.1-rc1 (verifying 50/50 tests), establishing complete mediation non-executability (Decision ∈ {BLOCK, ESCALATE} ⟹ BackendToolInvocations = 0) and >330,000 deterministic authorization decisions/s in an isolated in-memory microbenchmark (strictly excluding socket IPC framing, DIFC taint propagation, cryptographic receipts, and neural fallback) under an Ed25519-signed release manifest. We contextualize Mastyf as an empirically evaluated pre-production architecture, highlighting residual risks and outlining requirements for broader production-scale validation.