Worker Boundary¶
This component page maps the worker-boundary package that keeps worker discovery, gate inspection, public A2A transport parsing, and task snapshot rehydration in shared source code instead of app-local ad hoc parsing.
Concept Model¶
Worker boundary is the shared translator at the public worker edge. It keeps orchestrator,
worker, and operator-facing code from each inventing their own interpretation of Agent Cards,
ExecuteSkill envelopes, readiness checks, or task polling snapshots. The package does not run
worker tasks and does not schedule work; it validates the shape and meaning of the A2A-facing
payloads before they become or leave project-owned contracts. Execution remains deterministic:
the orchestrator dispatches assigned atomic TaskNode work over A2A, and workers execute only those
assigned tasks.
The shipped boundary has three conceptual halves. gate.py models worker readiness as an
ordered checkpoint pipeline with prerequisite blocking, so a failed early check explains why
later checks did not run. agent_card.py owns A2A Agent Card build, parse, HTTP+JSON
selection, and OMEGA capability projection. transport.py models ExecuteSkill envelopes and
task snapshots as strict adapters that either parse into typed project objects or fail closed.
Implementation Flow¶
During discovery and gate inspection, consumers provide the configured worker endpoint, the expected advertised base URL, observed Agent Card details, and checkpoint evaluators. The gate runner executes checkpoints in canonical order, marks blocked checks as not run, derives a ready flag from the blocking checkpoints, and returns a structured failure summary when the worker is not usable.
During dispatch, the orchestrator builds an ExecuteSkill transport envelope from the shared execution request and attempt number. The worker parses that envelope back through the same boundary rules, requiring the user role, JSON media type, return-immediately behavior, and positive attempt metadata. During observation, task polling payloads are rehydrated into worker task snapshots, worker reports are validated, and task state is reconciled against the latest report phase. Agent Cards are accepted only when they advertise the current HTTP+JSON protocol version and include the project capability extension defined by source-owned contracts.
Worker-private MCP dependencies sit below this public worker boundary. Public worker profiles
publish skills through skill_allowlist; worker settings and private MCP config choose the
implementation after the assigned task is accepted. The public worker edge still exposes only
workers, assigned task state, public worker reports, and readiness. Private MCP servers are not
discovered through A2A, do not publish Agent Cards, and are not called directly by the orchestrator.
Boundary Gate Diagram¶
This diagram shows the two halves of the shared boundary package: ordered gate inspection and fail-closed transport parsing.
flowchart TD
Consumer["orchestrator, worker, or operator-facing consumer"]
Endpoint["configured worker endpoint"]
AgentCard["observed Agent Card"]
Gate["gate.py checkpoint pipeline"]
GateResult["GateInspectionResult"]
ExecuteEnvelope["ExecuteSkill envelope"]
Transport["transport.py parsers"]
TaskSnapshot["WorkerTaskSnapshot"]
WorkerReport["worker report"]
PrivateMcp["worker-private MCP operation"]
Contracts["project-owned contracts"]
FailClosed["fail closed with boundary error"]
Consumer --> Endpoint
Consumer --> AgentCard
Endpoint --> Gate
AgentCard --> Gate
Gate --> GateResult
Consumer --> ExecuteEnvelope
ExecuteEnvelope --> Transport
Transport --> Contracts
Transport --> TaskSnapshot
Transport --> WorkerReport
WorkerReport -. public projection only .-> PrivateMcp
Transport -. invalid payload .-> FailClosed
Responsibility¶
Provide shared gate inspection and transport parsing helpers for the public worker boundary: readiness gate pipelines, Agent Card capability extraction, ExecuteSkill A2A envelope parsing, task polling snapshot parsing, and task/report consistency checks.
Owns¶
- Worker-boundary package surface in
packages/worker_boundary/. - A2A Agent Card build, parse, HTTP+JSON interface selection, and OMEGA projection in
omega_worker_boundary.agent_card. - Shared boundary objects such as
GateInspectionResult,GateCheckpointResult, and transport snapshots used by orchestrator, worker, and operator-facing consumers. - Guardrails that keep worker execution authority on the worker side of the A2A boundary.
- Fail-closed parsing of public A2A-facing worker payloads before they become project-owned contract objects.
- The documented boundary that keeps worker-private MCP operation details below the public worker edge while allowing public worker reports and readiness summaries.
Does Not Own¶
- Global task scheduling.
- Worker-private MCP adapter implementation.
- Deploy topology resolution.
- Pydantic contract definitions owned by
packages/contracts/. - Public A2A route assembly owned by the worker service.
- Worker-private MCP implementation config, private MCP payloads, or private runner lifecycle internals.
Current Status¶
Shipped. packages/worker_boundary/ is the current shared boundary helper authority for
orchestrator, worker, and operator-facing consumers that need to inspect or parse worker-edge
state without crossing into worker-local execution code. Current OMEGA docs also use this
page to reinforce that worker-private MCP operation flow stays below the A2A worker edge.
Source Of Truth¶
Package code in packages/worker_boundary/ and shared contract models remain
canonical. Documentation explains ownership; it does not replace the package API.
Key Source Paths¶
| Path | Purpose |
|---|---|
packages/worker_boundary/ |
Package root for worker-boundary source. |
packages/worker_boundary/src/omega_worker_boundary/agent_card.py |
OmegaAgentCardSource, OmegaAgentCardProjection, Agent Card builder, Agent Card parser, HTTP+JSON interface selection, and capability snapshot projection. |
packages/worker_boundary/src/omega_worker_boundary/gate.py |
GateInspectionResult, ordered readiness checkpoint results, and dependency-aware gate pipeline helpers. |
packages/worker_boundary/src/omega_worker_boundary/transport.py |
ExecuteSkill envelope builders/parsers and task snapshot builders/parsers. |
packages/worker_boundary/src/omega_worker_boundary/errors.py |
Boundary parse and gate pipeline error taxonomy. |
apps/orchestrator/src/omega_orchestrator/clients/worker_a2a_client.py |
Orchestrator-side consumer of worker-boundary parsing and gate results. |
apps/worker_agent/src/omega_worker_agent/a2a/routes.py |
Worker-side public A2A route assembly that emits payloads consumed by the boundary helpers. |
apps/worker_agent/src/omega_worker_agent/a2a/sdk_server.py |
SDK-native worker request handling and task-store projection. |
apps/worker_agent/src/omega_worker_agent/execution/skill_executor.py |
Worker-local validator that accepts an assigned TaskNode and builds the worker-owned MCP start request. |
apps/worker_agent/src/omega_worker_agent/execution/worker_service.py |
Assigned-task lifecycle owner, report projection, cancel handling, timeout convergence, and bounded failure mapping. |
apps/worker_agent/src/omega_worker_agent/mcp/execution_adapter.py |
Worker-private MCP adapter that starts, reads, cancels, and projects operation snapshots. |
apps/worker_agent/src/omega_worker_agent/mcp/operation.py |
Worker-owned MCP operation DTOs and private sub-identity containment. |
apps/worker_agent/src/omega_worker_agent/mcp/operation_projector.py |
Steady-state read, cancel, and timeout convergence for one worker-owned MCP operation. |
docs/design/worker-private-omega-runtime-boundary.md |
Documentation map for the worker-private OMEGA naming and runtime boundary. |
Out Of Scope¶
This page does not document worker-private MCP server internals, new scheduling semantics, private MCP payloads, private operation identifiers, or mission-level realtime transport observation behavior.
Related Pages¶
docs/design/a2a-boundary.mddocs/components/worker-agent.mddocs/components/contracts.mddocs/design/worker-private-omega-runtime-boundary.md