Deny a write-class connector call carrying an LLM _background override
that asks for background execution. This complements createConnector's
hard _background argument rejection.
This evaluator sees only the override present in the connector arguments.
Mastra removes _background before dispatching agent tool calls, so the
check primarily protects direct and nested programmatic calls. Breakwater
connectors do not enable Mastra background execution by default, which
prevents an agent override from opting them in upstream. Read-only calls and
explicit { enabled: false } overrides pass. Approval grants in the trusted
request context remain the final write boundary on every execution path.
Register the evaluator through ConnectorPolicies.evaluators.
Deny a write-class connector call carrying an LLM
_backgroundoverride that asks for background execution. This complementscreateConnector's hard_backgroundargument rejection.This evaluator sees only the override present in the connector arguments. Mastra removes
_backgroundbefore dispatching agent tool calls, so the check primarily protects direct and nested programmatic calls. Breakwater connectors do not enable Mastra background execution by default, which prevents an agent override from opting them in upstream. Read-only calls and explicit{ enabled: false }overrides pass. Approval grants in the trusted request context remain the final write boundary on every execution path. Register the evaluator throughConnectorPolicies.evaluators.