Expand description
Scope gating for incoming A2A tasks and bus events.
Agents must only act on work that falls within their declared scope. This module centralises the “is this task/event for me?” check so every intake path (SSE, polling, bus broadcast) applies the same rules.
§Scope dimensions
| Dimension | Where it comes from | Reject if |
|---|---|---|
target_agent | task metadata target_agent_name | non-empty AND ≠ worker agent name |
target_worker | task metadata target_worker_id | non-empty AND ≠ worker ID |
workspace | task workspace_id / metadata | not in worker’s registered set* |
* An empty/absent workspace ID is treated as a global broadcast (virtual task) and is always accepted.
Functions§
- check_
task_ scope - Whether a task is within scope for a given worker.